Skip to content

OperatorDefine commands, not an admin panel.

A command console and permission system for Roblox, in pure Luau. One require, one call, and nothing reaches a player who is not allowed it.

click to try it

The built-in console. Press F2 in game β€” or click above to drive this one.

A command ​

luau
local Operator = require(game:GetService("ServerStorage").Operator)
local Command, Types = Operator.Command, Operator.Types

export type KickArgs = { target: Player, reason: string }

return (Command.new("kick") :: Operator.Builder<KickArgs>)
	:description("Kick a player")
	:arg(Types.Player, "target", "Player to kick")
	:arg(Types.String, "reason", "Reason shown to the player", { rest = true })
	:permission("moderator")
	:destructive()
	:run(function(context, args)
		args.target:Kick(args.reason)
		context:reply(`kicked {args.target.Name}`)
	end)

Inside run, args.target is a Player and args.reason is a string, fully checked.

Starting it ​

luau
local Operator = require(game:GetService("ServerStorage").Operator)

Operator.Start({
	Commands = script.Parent.Commands,
	DefaultCommands = { "debug", "moderation" },

	Roles = {
		owner = { UserIds = { 1234567 }, Inherits = { "moderator" } },
		moderator = { GroupId = 123456, MinRank = 200 },
	},
})

That is the whole setup. Operator.Start({}) also works, and gives you a console for the place owner and nobody else.

Where to next ​

If you want to…Read
install it into a placeInstallation
know what the console accepts as you typeCommand Syntax
write your first commandCommands
decide who can run whatPermissions
look up an exact signatureAPI reference
build your own interface on topCustom Interfaces

Attributions ​

  • Centurion: console interface design and interaction model. Operator's console is a structural port of Centurion's terminal UI, reimplemented in Luau.
  • Cmdr: prior art for Roblox command consoles, and the origin of the quote-aware argument splitting both use.
  • Vide: the reactive UI library the console is built with, vendored under Client/UI/Packages/.

Released under the MIT Licence.