A BAR plugin is a Lua ModuleScript placed in aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Verveo/Basic-Admin-Remade/llms.txt
Use this file to discover all available pages before exploring further.
Plugins folder inside the main BAR script. It defines a single custom command — its name, permission level, prefix, and the function to run when a player triggers it. Because BAR discovers plugins at startup, you never need to touch any core file.
Create the Plugins folder
In ServerScriptService, locate your BAR script (the model you placed there during setup). Insert a new Folder as a direct child of that script and name it exactly
Plugins.Insert a ModuleScript
Inside the
Plugins folder, insert a new ModuleScript. Give it a descriptive name (e.g. AnnouncePlugin) — the name of the ModuleScript itself is not used by BAR, only the values you return from the function matter.Write the plugin code
Replace the default ModuleScript contents with your plugin, following the contract shown in the template below. The Plugin Contract section of the overview explains every value BAR expects you to return.
Official Plugin Template
The file below is the unmodifiedplugin_script.lua shipped with BAR. Copy it as your starting point.
Template Breakdown
pluginName
The command name without its prefix. Whatever string you set here is what players type after the prefix to trigger the command.
pluginPrefix
Which prefix character activates the command. Set it to:
actionPrefix— uses!(the action prefix, e.g.!help)Prefix— uses:(the standard admin prefix, e.g.:help)
pluginLevel
The minimum permission level a player must have to run the command. BAR uses four levels above the default:
| Value | Role |
|---|---|
0 | Everyone (no admin required) |
1 | Moderator |
2 | Admin |
3 | Super Admin |
4 | Creator (game owner only) |
pluginUsage
A short argument description displayed next to the command name in :cmds. Leave it as an empty string ("") if the command takes no arguments.
pluginDescription
A one-line description of what the command does. Shown alongside pluginUsage in :cmds.
pluginFunction(Args)
The handler that runs when the command is triggered. Always keep the function named pluginFunction — BAR expects that exact identifier when registering the command.
The Args table is structured as follows:
| Index | Value |
|---|---|
Args[1] | The Player object who typed the command |
Args[2] | The command name (string) |
Args[3]+ | Any additional arguments the player provided |
The return statement
The finalreturn at the bottom of the Plugin function ships everything BAR needs to register your command. All five values are required — do not omit any of them.
Real-World Example: :announce <text>
The following plugin adds a :announce <text> command (admin-only) that fires a server-wide notification to every connected player.
The
!help example bundled in plugin_script.lua is a practical demonstration of
returnPermissions in action. When a player runs !help, the handler iterates over
every online player and fires a notification only to those whose permission level
is >= 1 (i.e. moderators and above). This makes it easy to page all active admins
without exposing their identities to regular players.