Hello today I will be showing you how to make a plugin in 2022!
Please this took a while to make!
Okay so time for the tutorial
Create a new folder inside of ServerScriptService.
Then create a new script in that folder.
Rename the folder to your plugins name or something you can remember.
If you want to you can rename the script to something.
Create a new ScreenGui in StarterGUI.
Rename this Gui to UI or anything you want, this name will come up later.
Create a new frame inside the GUI you just created.
Name this anything you want but this will also come up later.
Download the AutoScale Lite plugin.
(this will make your GUI work on all sizes of screens.)
Now select the blue icon and this menu will pop up.
click scale for both.
Create a new Text button or image button.
You can rename the buttons and the name will come up later.
On the button use the Auto Scale Light plugin again with the same steps.
You can now customize you Gui.
Put the Gui into the script we made.
You will have to edit the script, the script explains what you will change.
local toolbar = plugin:CreateToolbar("Toolbar name") -- change to name of plugin
local newScriptButton = toolbar:CreateButton("Button name", "description", "image") -- change to text and for "image" use the image id not the decal id.
local materials = Enum.Material:GetEnumItems()
local Camera = workspace.CurrentCamera
newScriptButton.Click:Connect(function() -- when the button in the plugins tab is pressed
if script:FindFirstChild("UI") then
script.UI.Parent = game:WaitForChild("CoreGui")
game.CoreGui:WaitForChild("UI").Bar.Button.MouseButton1Click:connect(function() -- you will have to change Bar.Button to your ui names in the UI.
local part = Instance.new("Part") -- this is the part were you can make what you want to do happen when the button is pressed.
part.Parent = game.Workspace
end)
else
game.CoreGui:WaitForChild("UI").Parent = script -- hides the UI
end
end)
Now publish your plugin.
To save a plugin that you do not need to instal called a local plugin just press Save as local plugin.