Admin commands with ranks, bans and a log
38 commands behind a typed parser and ranked permissions (user ids, group ranks, Game Passes, place owner), smart player targeting, timed bans saved to a DataStore and synced across servers, an audit log, rate limits, and a command bar with autocomplete.
For: Roblox developers and moderators who need safe, ranked admin tools.
See it work: real output from the shipped code
Commands typed into the example server
Each line is sent through the example's Run remote exactly as the command bar sends it; Olive is Owner, Max is Mod, Pete is a player. Output is the server's own reply.
| Typed | By | Result | Output |
|---|---|---|---|
;speed pe 32 | Olive | OK | speed 32 for Pete |
;kill p | Olive | Refused | "p" matches 2 players: Pete, Pat; type more of the name usage: ;kill <players> |
;bring bob,pat | heal all | Olive | OK | brought Bob, Pat · healed Olive, Max, Pete, Bob, Pat |
;kick olive | Max | Refused | you can't use this on Olive (same or higher rank) |
;kick bob | Pete | Refused | you need rank Mod to use ;kick |
;ban bob 30m griefing the spawn | Olive | OK | banned Bob (30m) |
;announce Event starts in 5 minutes | Olive | OK | announced to 4 players |
;logs 3 | Olive | OK | [2s ago] Olive: announce Event starts in 5 minutes -> announced to 4 players [3s ago] Olive: ban bob 30m griefing the spawn -> banned Bob (30m) [4s ago] Pete: kick bob x you need rank Mod to use ;kick |
What's inside
| Module | Runs on | What it does | Lines |
|---|---|---|---|
| Admin | Server | The server core that runs command lines from chat or the command bar, with rank checks, protected targets, bans, mutes, server lock and validated remotes. | 552 |
| Commands | Server | The 38 built-in commands (moderation, player, server, info), each a plain definition you can re-rank, disable or copy. | 505 |
| Parser | Shared | Splits a command line into batched commands, tokenises quoted arguments and converts them to typed values. | 418 |
| Targets | Server | Turns "me", "all", "team:red", "@Disp", "#123" or a partial name into a list of players, with clear errors for no match or an ambiguous match. | 195 |
| Ranks | Server | Numeric admin ranks resolved from user ids, group ranks, Game Passes and place ownership, with an equal-or-higher-rank guard. | 219 |
| Registry | Server | The command table: validates definitions, resolves names and aliases, filters by rank and writes usage lines. | 165 |
| BanStore | Server | DataStore-backed timed and permanent bans with retries, a server-only ban list, and cross-server updates over MessagingService. | 243 |
| World | Server | The small adapter between commands and Roblox Instances (characters, teams, chat, lighting, text filtering), so command logic stays testable. | 231 |
| AuditLog (free) | Server | A fixed-size ring buffer of recent commands (who, what, when, result) with filters and readable lines. | 115 |
| RateLimit (free) | Server | A per-key token bucket for remotes and chat, so one client can't flood the server with requests. | 44 |
| Example script | Type | Put it in |
|---|---|---|
| GavelwickConfig | ModuleScript | ServerStorage |
| GavelwickServer | Script | ServerScriptService |
| GavelwickClient | LocalScript | StarterPlayer > StarterPlayerScripts |
Tested like real software
46 automated tests run in a real Luau VM against a Roblox engine mock, on two runtimes (luau-web and native Luau 0.740). They ship in the zip: cd tests && npm install && node run.mjs.
| Spec | Passing | For example |
|---|---|---|
| admin | 15/15 | kick: a mod kicks a player with a reason, the result is logged … |
| bans | 8/8 | ban saves to the DataStore, kicks, and kicks again on rejoin … |
| demo | 1/1 | demo: commands typed into the example server by different ranks |
| example | 4/4 | example server: remotes exist, command list depends on rank and carries no functions … |
| parser | 9/9 | split: prefix required, batches on |, prefix optional after the first … |
| targets | 9/9 | targets: me, all, others, admins, nonadmins, random … |
Install in 5 minutes
- Drag
Gavelwick.rbxmxonto ReplicatedStorage in Roblox Studio. - Drag
GavelwickExamples.rbxmxin and move the three scripts to the services above. - Turn on Studio access to API services and press Play.
INSTALL.mdwalks through an example place step by step.
FAQ
Is this allowed on Roblox?
Yes. It's ordinary Luau using Roblox's own services (DataStoreService, MarketplaceService, Players). Nothing bypasses Roblox rules.
Why not a free model from the Toolbox?
Free models are a fine start. Gavelwick ships its tests (46 of them, run on two Luau runtimes), validates every remote argument, and is original code with a clear licence.
Do I need Rojo?
No. Drag the .rbxmx files into Roblox Studio. A Rojo project file is included if you use it.
Can I use it in a game I sell or a client's game?
Yes: unlimited experiences, commercial or not, for you or your clients. You can't resell or share the code itself.
Is CyberMax affiliated with Roblox?
No. Roblox and Roblox Studio are trademarks of Roblox Corporation, named only to describe compatibility.