Heres an example :) Just put the gui stuff in CoreGui
local Plugin = PluginManager():CreatePlugin()
local Toolbar = Plugin:CreateToolbar("MyToolbar")
local Button = Toolbar:CreateButton("MyButton","This is my button","")
function Activate()
Button:SetActive(true)
local gui = Instance.new("ScreenGui", game:GetService("CoreGui"))
local frame = Instance.new("Frame")
frame.Size = UDim2.new(0.1, 0, 0.1, 0)
frame.Position = UDim2.new(0.3, 0, 0.3, 0)
end
local active = false
Button.Click:connect(function()
active = not active
if active then
Plugin:Activate(true)
Activate()
else
Button:SetActive(false)
end
end)
1 comment
I'd imagine you'd put the GUIs in the 'CoreGui' service, but that's just my guess.