Hello, so I am making my first ever plugin and I am stuck on something
When I press the buttons on the gui (which open when pressing on the plugin button) They just add in a script. They are supposed to add scripts with preset code inside them
How can I do this
local toolbar = plugin:CreateToolbar("EZBadgeScript")
local newScriptButton = toolbar:CreateButton("Create Badge Scripts", "Makes Simple Badge scripts", "rbxassetid://7577357898") -
local materials = Enum.Material:GetEnumItems()
local Camera = workspace.CurrentCamera
newScriptButton.Click:Connect(function()
if script:FindFirstChild("UI") then
script.UI.Parent = game:WaitForChild("CoreGui")
game.CoreGui:WaitForChild("UI").ImageLabel.TextButton1.MouseButton1Click:connect(function()
local squip = Instance.new("Script")
squip.Parent = game.Workspace
end)
else
game.CoreGui:WaitForChild("UI").Parent = script
end
end)
Thank you for checking this out, and if you chose to help, you are a nice person
Have a good day
also, this code was not made by me, I just edited it
if you need to see other things just tell me