Skip to main content

Documentation 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.

BAR’s plugin system lets you extend the admin with custom commands without ever touching core files. Each plugin is a Lua ModuleScript that returns a function matching a specific contract — BAR’s MainModule discovers and loads it automatically at startup.

How Plugins Are Loaded

Place your plugin ModuleScripts inside a folder named Plugins that is a direct child of the main BAR script in ServerScriptService. The main_script.lua entry point already handles discovering them: if the folder exists and contains at least one child, it is passed straight into the MainModule for processing.
local Plugins
if script:FindFirstChild('Plugins') and #(script:FindFirstChild('Plugins'):GetChildren()) >= 1 then
    Plugins = script:FindFirstChild('Plugins')
end
If the Plugins folder is absent or empty the variable stays nil and BAR starts normally with only its built-in commands — no errors, no fuss.

The Plugin Contract

Every plugin ModuleScript must return a function (conventionally called Plugin). BAR calls that function at load time and passes a single variadic argument. Inside the function, unpack the first element of the ... vararg to access eight essentials:
KeyTypeDescription
remoteEventRemoteEventThe BAR essentials RemoteEvent used to fire clients
remoteFunctionRemoteFunctionThe BAR essentials RemoteFunction for server↔client calls
returnPermissions(player)functionReturns a player’s permission level as an integer 04
CommandstableThe full commands dictionary — all built-in commands keyed by name
PrefixstringThe current command prefix (default ":")
actionPrefixstringThe action prefix (default "!")
returnPlayers(player, arg, command)functionResolves a string argument (e.g. "all", "others", a username) into a list of Player objects
cleanData(sender, receiver, data)functionFilters and packages user data for safe transmission over the remote event

cleanData quick reference

-- Send data to a specific player, from another player
cleanData(Sender, Receiver, "hi")

-- Broadcast to everyone (receiver is nil)
cleanData(Sender, nil, "hi")

What Your Function Must Return

After defining your command logic, return exactly five values in this order:
return pluginName, pluginFunction, pluginLevel, pluginPrefix, descTable
Return valueTypeDescription
pluginNamestringThe command name (without prefix)
pluginFunctionfunctionThe handler called when the command is used
pluginLevelnumberMinimum permission level required to run the command
pluginPrefixstringWhich prefix triggers the command (Prefix or actionPrefix)
descTabletable{pluginName, pluginUsage, pluginDescription} — shown in :cmds
The descTable controls how the command appears to users:
{pluginName, pluginUsage, pluginDescription}
-- e.g. {"announce", "<text>", "Broadcasts a server-wide message."}
Plugins loaded this way are registered alongside every built-in BAR command and will appear in the :cmds list automatically. No additional registration step is needed.

Next Steps

Creating a Plugin

Step-by-step walkthrough: write your first custom plugin command from scratch using the official template.

Build docs developers (and LLMs) love