Plugins - atlas-labs-org/atlas GitHub Wiki
Welcome to the Atlas Plugins Guide. This page explains how to create, install, and manage plugins for Atlas, including a sample plugin script to help you get started.
Plugins are custom scripts that allow you to extend the functionality of Atlas. They work as custom commands, letting you add unique behavior or features to your Roblox game administration system.
To create a new plugin, follow these steps:
-
Create a ModuleScript
- In Roblox Studio, create a new ModuleScript inside the "Plugins" folder of Atlas.
-
Define the Command
- In the ModuleScript, set the "command" field to the desired command name. This will be the name used to trigger the plugin in-game.
-
Override Permissions
- If the command should only be available to override users, set "override_only" to
true. Otherwise, set it tofalse.
- If the command should only be available to override users, set "override_only" to
-
Player Name Handling
- Set "closest_name" to
trueif the plugin should find the closest matching player name. This is helpful when player names are partial or case-insensitive.
- Set "closest_name" to
-
Define the Command Function
- Create a function named "commandFunction" with parameters for any command arguments. This function contains the logic for what the command does.
Here's an example plugin script that demonstrates the basic structure and functionality:
local plugin_ = {
["command"] = "example",
["override_only"] = false,
["closest_name"] = true,
}
function plugin_.commandFunction(playername)
-- Example: Kills the given player
local playerService = game:GetService("Players")
playerService[playername].Character:FindFirstChild("Humanoid").Health = 0
-- Optional: Set a notification message for the command execution
plugin_.notification = false -- Or set to a message like "Killed playername."
end
return plugin_This example defines a plugin that kills a player when the command is executed. The "commandFunction" is the main function that performs the action based on the provided arguments. You can modify it to create custom commands or additional behaviors.
To install a new plugin, place the ModuleScript into the "Plugins" folder. To remove a plugin, simply delete the corresponding ModuleScript. Ensure that the "plugins_enabled" setting in the Atlas configuration is set to true for plugins to work.
That's it for the Plugins Guide. If you have any questions or need further assistance with creating plugins, visit our Support Page or join our Discord Server for additional help.