Custom Commands
How to implement custom commands into Pixel Administration.
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local PSStorage = ReplicatedStorage:WaitForChild("PA - Storage") -- The storage folder that's generated by Pixel Administration when you join.
local Modules = PSStorage.Modules -- The modules folder inside of Pixel Administration
local Commands = require(Modules.Commands) -- The commands module for Pixel Administration
Commands:SetCustomCommandsFolder(script.Parent) -- Adds the custom command folder which is the folder you put the script in.return {
CmdName = "YourCommandName", -- This should match your ModuleScript's name
CmdDesc = "A brief description of what your command does",
CmdIcon = "rbxassetid://123456789", -- Optional: An icon for your command
IsServerCommand = true, -- Set to false if it should run on the client instead
Aliases = {"alias1", "alias2"}, -- Optional: Alternative names for your command
Arguments = {
{
Name = "ArgumentName", -- The name for the argument.
Type = "Players", -- The argument's type.
Description = "Argument Description.", -- The argument's description.
Optional = false, -- If the argument is optional.
Default = nil -- The default value if the argument was skipped (only for optional arguments).
}
},
OnActivated = function(arguments, executor) -- The function that runs when the command is ran.
return {Success = true, Message = "Your command executed successfully!"}
end
}Last updated