Kingdom Life | Servers Lists

Kingdom Life — Custom Server Guide

Commands, server settings, and scripting examples for managing your own custom server.

Contents

Roles and permissions

Role Kick players Ban / unban Edit server and manage ranks Custom-server tools
Owner Yes Yes Yes Yes
Moderator Yes No No No
Admin Yes Yes No No
Developer Yes Yes Yes Yes
Unranked player No No No No

These are the default permissions. Your server’s permissions may differ.

  • Each person can have one server role at a time.
  • Giving someone Developer grants access to scripting, rank management, and custom-server tools. Only give it to people you trust.
  • A server role does not grant staff privileges in the main game.
  • The owner’s role cannot be changed or removed.
  • Ranked players receive a join notification explaining their role and permissions.

Command syntax

Custom-server command prefix: :
  • <argument> is required.
  • [argument] is optional.
  • Replace PlayerName with a player’s username.
  • Replace example numbers with the required UserId or asset ID.
  • Do not type the brackets.

Useful player targets:

me
all
others
PlayerName

Examples:

:heal me
:bring PlayerName
:heal all
:heal others

Use an exact username if a short name matches more than one person.

Find commands available to you:

:cmds
:cmdinfo eRank
:cmdinfo btools

You can run multiple commands using |:

:heal me | :speed me 24

Moderation and ranks

These commands are for custom servers. You must have the permission shown.

Command Permission What it does
:eKick <player> Kick Sends an online player back to the main game.
:eBan <player> [reason] Ban Permanently bans an online player from your custom server and sends them to the main game.
:eUnban <UserId> Ban Removes that person’s custom-server ban. They do not need to be online.
:eRank <player or UserId> <Moderator or Developer> EditServer Assigns a role, replacing the person’s previous server role.
:eUnrank <UserId> EditServer Removes a person’s server role, even while they are offline.
:eRanks EditServer Opens your ranked-player list.

You can also use lowercase names such as :ekick or :eranks.

Current availability: these commands may report “Your player data could not be found” even when you have the correct role. If this happens, contact game staff; changing the command’s arguments will not resolve it.

Kick, ban, and unban

:eKick PlayerName
:eBan PlayerName Repeated rule breaking
:eUnban 123456789
  • eKick returns the player to the main game instead of disconnecting them from Roblox.
  • eBan only bans them from your custom server.
  • A ban reason is optional.
  • eBan does not accept a temporary duration.
  • eUnban requires a numeric UserId, not a username.
  • Unbanning does not automatically bring the player back.

Rank and unrank

:eRank PlayerName Moderator
:eRank PlayerName Developer
:eRank 123456789 Developer
:eUnrank 123456789
  • An online player can be selected by name.
  • Use a UserId to rank someone who is offline.
  • Role names are case-insensitive.
  • eRank accepts Moderator or Developer, not Admin.
  • You can assign the existing Admin role through a script; see Role scripting.

Ranked-player list

:eRanks

The window shows ranked people both in and out of the server, including their name, role, UserId, and online status.

Click the X next to someone to unrank them. The owner is not listed. Re-open the window after changing roles to refresh the list.

Custom-server tools

These tools are available in your custom server to the owner and players with EditServer permission. Use :cmds to check which commands you can use.

The table includes aliases, argument order, and an example for each command family. Examples containing IDs or usernames must be replaced with your own values.

Commands and aliases Arguments in order Purpose Example
:lockmap None Locks the map :lockmap
:btools, :f3x, :buildtools, :buildingtools, :buildertools player Gives the target player(s) F3X building tools. :btools me
:shutdown reason Shuts the server down :shutdown Maintenance
:nuke player, size Nuke the target player(s) :nuke PlayerName 50
:resize, :size, :scale player, mult Resize the target player(s)'s character by :size me 1.5
:gear, :givegear player, id Gives the target player(s) a gear from the catalog based on the ID you supply :gear me 123456789
:explode, :boom, :boomboom player, radius (default: 20 studs), blast pressure (default: 500,000), visible? (default: true) Explodes the target player(s) :explode PlayerName 20 500000 true
:notify, :notification, :notice target, message Sends a notification; use a player name or server. :notify server Welcome to the server
:countdown, :timer, :cd time (in seconds) Countdown :countdown 60
:stopcountdown, :stopcd None Stops all currently running countdowns :stopcountdown
:m, :message message Makes a message :m Welcome to our kingdom
:h, :hint message Makes a hint :h The event starts soon
:heal player Heals the target player(s) (Regens their health) :heal me
:god, :immortal player Makes the target player(s) immortal, makes their health so high that normal non-explosive weapons can’t kill them :god me
:privatechat, :dm, :pchat player, message (optional) Send a private message to a player :privatechat PlayerName Hello
:pm, :privatemessage player, message Send a private message to a player :pm PlayerName Hello
:handto player Hands an item to a player :handto PlayerName
:showtools, :viewtools, :seebackpack, :viewbackpack, :showbackpack, :displaybackpack, :displaytools, :listtools player, autoupdate? (default: false) Shows you a list of items currently in the target player(s) backpack :viewtools PlayerName true
:view, :watch, :nsa, :viewplayer player, persist (default: true) Makes you view the target player :view PlayerName true
:resetview, :rv, :fixview, :fixcam, :unwatch, :unview optional player Resets your view :unview
:tools, :toollist, :toolcenter, :savedtools, :addedtools, :toolpanel, :toolspanel None Opens the available-tool panel. :tools
:clear, :cleargame, :clr None Remove admin objects :clear
:loadavatar, :loadchar, :loadcharacter, :clone, :cloneplayer, :duplicate player, copies (max: 50 | default: 1), appearence (optional), avatar type(R6/R15) (optional) Copies the target character in front of you with the specified amount of copies. :loadavatar PlayerName 1
:refresh, :ref player Refreshes the target player(s)'s character :refresh me
:kill player Kills the target player(s) :kill PlayerName
:respawn, :re, :reset, :res player Respawns the target player(s) :respawn me
:time, :timeofday time, optional player Change Time :time 12
:give, :tool player, tool Gives the target player(s) the desired tool(s) :give me The Force
:copytools player1, player2 Copies player1’s tools and gives them to player2 :copytools PlayerOne PlayerTwo
:health, :sethealth player, number Set the target player(s)'s health and max health to :health me 200
:speed, :setspeed, :walkspeed, :ws player, number Set the target player(s)'s WalkSpeed to :speed me 24
:team, :setteam, :changeteam player, team Set the target player(s)'s team to :team PlayerName TeamName
:tp, :teleport, :transport player1, player2 Teleport player1(s) to player2, a waypoint, or specific coords, use :tp player1 waypoint-WAYPOINTNAME to use waypoints, x,y,z for coords :tp PlayerOne PlayerTwo
:bring player Teleports the target player(s) to your position :bring PlayerName
:to, :goto destination ('<player>'/'waypoint-<name>'/'<x>,<y>,<z>') Teleports you to the target player, waypoint or coordinates :to PlayerName
:avataritem, :giveavtaritem, :catalogitem, :accessory, :hat, :tshirt, :givetshirt, :shirt, :giveshirt, :pants, :givepants, :face, :anim, :torso, :larm, :leftarm, :rarm, :rightarm, :lleg, :leftleg, :rleg, :rightleg, :head, :walkanimation, :walkanim, :runanimation, :runanim, :jumpanimation, :jumpanim, :fallanimation, :fallanim player, ID Give the target player(s) the avatar/catalog item matching and adds it to their HumanoidDescription. :hat me 123456789
:fly, :flight, :flynoclip player, speed, noclip? (default: true) Lets the target player(s) fly :fly me 2 true
:unfly, :ground player Removes the target player(s)'s ability to fly :unfly me
:name, :rename player, name/hide Name the target player(s) or say hide to hide their character name :name me Knight
:unname, :fixname player Put the target player(s)'s back to normal :unname me
:char, :character, :appearance player, username Changes the target player(s)'s character appearence to <ID/Name>. :char me Username
:freecam player Makes it so the target player(s)'s cam can move around freely (Press Shift+P, F, or DPadLeft to toggle freecam) :freecam me
:bot, :trainingbot player, num (max: 50), walk, attack, friendly, health, speed, damage AI bots made for training; ‘:bot scel 5 true true’ :bot me 5 true true

Tools and appearance

:tools
:give me The Force
:btools me
:copytools PlayerOne PlayerTwo
:handto PlayerName
:hat me 123456789
:char me Username
  • Use :tools to find tool names you can give.
  • :give takes a tool name; :gear takes a catalog asset ID.
  • Equip the item you want to hand over before using :handto.
  • Use the correct catalog ID for hats, clothing, and other avatar items.
  • :loadavatar creates character copies; it does not select a custom character for a player.

Movement and camera

:to PlayerName
:bring PlayerName
:tp PlayerOne PlayerTwo
:to 0,10,0
:fly me 2 true
:unfly me
:freecam me

Flight must be enabled for your server and available to the player.

Freecam can be toggled using Shift+P, F, or DPadLeft, depending on your input device.

Messages and events

:pm PlayerName Hello
:privatechat PlayerName Hello
:notify server Welcome everyone
:notify PlayerName Hello
:h The event starts soon
:m Welcome to our kingdom
:countdown 60
:stopcountdown

Use server to notify everyone in your custom server, or a player name to notify that person.

Use disruptive commands carefully

Explosions, nukes, bots, character copies, shutdown, and building tools can disrupt your players. Avoid creating large numbers of bots or copies.

Not every command has an available opposite command. For example, access to :god or :lockmap does not guarantee access to :ungod or an unlock command. Check :cmds first.

Custom scripting editor

You need EditServer permission to use the editor.

  1. Open your custom server’s Editor page.
  2. Create a script.
  3. Paste or write your code.
  4. Click outside the code field to submit the edit.
  5. Enable the script to run it.
  6. Read the Output panel for messages and errors.

New scripts start disabled.

Editing an enabled script runs it again. Disable a script before making changes if you do not want its actions to repeat while editing.

Disabling a script does not undo actions it already performed, such as changing a role, teleporting someone, or creating a character.

Output

print("Ready")
warn("Player is not online")

The Output panel shows the script name and its messages, warnings, and errors. It scrolls to the latest message.

Service names

Use these names directly in your scripts:

PlayerService
RoleService
CharacterService
GearService
Monetization

You can also write Services.PlayerService. Players is another name for PlayerService.

Do not paste ordinary Studio scripts that use game, workspace, Instance.new, or require. Use the methods shown in this guide.

Useful scripting helpers

print
warn
assert
error
pcall
xpcall
tonumber
tostring
type
typeof
pairs
ipairs
next
select

math
string
table
utf8
bit32
os
task

Use task.wait rather than wait.

Available value types:

Vector2
Vector3
UDim
UDim2
CFrame
Color3
Rect
Region3
Ray
BrickColor
NumberRange
NumberSequence
ColorSequence
PhysicalProperties
Axes
Faces
Enum

Player scripting

Select a player

Use a numeric UserId, exact username, or table containing a UserId:

local Player = PlayerService:Get(123456789)
local Player = PlayerService:Get("ExactUsername")
local Player = PlayerService:Get({UserId = 123456789})

A lookup returns nil if the player is not online. Display names and command selectors such as "all" are not supported by these scripting lookups.

Player methods

Method Use
Get(Target) Find an online player.
GetPlayerByUserId(UserId) Find an online player by ID.
GetPlayerByName(Name) Find an online player by exact username.
GetPlayers() List all online players.
GetCharacter(Target) Get player information only when they have a character; this does not return a character model.
OnAdded(Callback) Run a callback when a new player joins.
OnRemoving(Callback) Run a callback when a player leaves.
Damage(Target, Amount) Damage a player.
Heal(Target, Amount?) Restore the specified amount of health; omit Amount to heal fully.
Respawn(Target) Respawn a player.
Teleport(Target, Position) Move a player to a Vector3 or CFrame.
Kick(UserId) Send an online player back to the main game. Use their numeric UserId.

Use the game’s character selection when you want a specific custom character; Respawn is not a character-selection command.

Information you can read

local Player = PlayerService:Get("ExactUsername")
if Player then
    print(Player.UserId)
    print(Player.Name)
    print(Player.DisplayName)
    print(Player.IsLoaded)
    print(Player.IsAlive)
    print(Player.Health)
    print(Player.MaxHealth)
    print(Player.Position)
end

Position can be nil if the player has no character. Look the player up again when you need updated health or position.

List players

for _, Player in PlayerService:GetPlayers() do
    print(Player.Name, Player.UserId, Player.Health)
end

Heal one player

local Player = PlayerService:Get("ExactUsername")
if Player then
    PlayerService:Heal(Player, 25)
else
    warn("Player is not online")
end

Heal everyone

for _, Player in PlayerService:GetPlayers() do
    PlayerService:Heal(Player)
end

Teleport one player

Replace the coordinates with your destination:

local Player = PlayerService:Get("ExactUsername")
if Player then
    PlayerService:Teleport(Player, CFrame.new(0, 10, 0))
else
    warn("Player is not online")
end

Return a player to the main game

local UserId = 123456789
if PlayerService:Get(UserId) then
    local Success, Message = pcall(function()
        PlayerService:Kick(UserId)
    end)
    if not Success then warn(Message) end
end

Join and leave callbacks

The method names are OnAdded and OnRemoving, not OnRemoved.

Do not repeatedly enable or edit scripts that attach these callbacks: you may get duplicate reactions. CharacterAdded callbacks are not currently supported reliably; use the other methods in this guide instead.

Role scripting

Use a table with the person’s UserId. They do not need to be online.

Method Use
GetRole(PlayerInfo) Read their server role.
HasPermission(PlayerInfo, Permission) Check whether they can perform an action.
SetRole(PlayerInfo, RoleName?) Assign a role, or remove it if RoleName is omitted.

Permission names:

"Kick"
"Ban"
"EditServer"

Default assignable roles:

"Moderator"
"Admin"
"Developer"

The owner’s role cannot be assigned, changed, or removed.

Read someone’s role

RoleService:GetRole({UserId = 123456789})
    :andThen(function(RoleName, RoleData)
        if RoleName then
            print("Role:", RoleName)
            print("Can ban:", RoleData.Permissions.Ban)
        else
            print("Player has no server role")
        end
    end)
    :catch(function(Message)
        warn(Message)
    end)

Check a permission

RoleService:HasPermission({UserId = 123456789}, "Kick")
    :andThen(function(IsAllowed)
        print("Can kick:", IsAllowed)
    end)
    :catch(function(Message)
        warn(Message)
    end)

Assign a role

RoleService:SetRole({UserId = 123456789}, "Developer")
    :andThen(function()
        print("Role updated")
    end)
    :catch(function(Message)
        warn(Message)
    end)

To assign Admin, change "Developer" to "Admin".

Assigning a role replaces the person’s previous server role.

Remove a role

RoleService:SetRole({UserId = 123456789})
    :andThen(function()
        print("Role removed")
    end)
    :catch(function(Message)
        warn(Message)
    end)

You can assign existing roles. Creating new role types or changing their permissions through scripts is not currently available.

Custom characters

Create a character that players can choose in character selection.

Method Use
Build(Context) Create a custom character.
Disable(CharacterName) Make a character unavailable for selection.
Enable(CharacterName) Make it selectable again.
Remove(CharacterName) Remove a character you created with CharacterService.

Remove does not remove ordinary built-in characters. Use Disable for those.

Character options

Option Value Required?
CharacterName Unique character name Yes
CharacterIcon Image asset ID or asset string Yes
Shirt Shirt asset ID No
Pants Pants asset ID No
Face Face asset ID No
Scale Positive scale, such as 1 or 1.2 No
SortOrder Number controlling order within the character’s selection options No
Accessories List of accessory asset IDs No
BodyColors Body-part colors using numeric BrickColor IDs No

Available body-color names:

HeadColor
LeftArmColor
LeftLegColor
RightArmColor
RightLegColor
TorsoColor

Build a character

Replace the name, icon, and clothing/accessory IDs with your own choices.

local Built, Message = CharacterService:Build({
    CharacterName = "Dark Vader",
    CharacterIcon = 132871653303816,
    Shirt = 15541048005,
    Pants = 5537612182,
    Scale = 1,
    Accessories = {
        118335867417241,
        136234426899215,
        81502563929640,
        80660398365030
    }
})

if Built then
    print("Character created")
else
    warn(Message)
end
  • Use a unique name.
  • Only use assets available to the game.
  • Accessories must be compatible with the character.
  • Check Output if clothing or accessories do not appear.
  • Building a character makes it available for selection; it does not immediately change everyone’s character.
  • Keep your character-building script enabled if you want the character available when your server starts again.

Set body colors

local Built, Message = CharacterService:Build({
    CharacterName = "Stone Knight",
    CharacterIcon = 132871653303816,
    Scale = 1,
    BodyColors = {
        HeadColor = 194,
        LeftArmColor = 194,
        LeftLegColor = 194,
        RightArmColor = 194,
        RightLegColor = 194,
        TorsoColor = 194
    }
})

if not Built then warn(Message) end

Disable and re-enable

local Success, Message = CharacterService:Disable("The Dark Kingdom")
if not Success then warn(Message) end
local Success, Message = CharacterService:Enable("The Dark Kingdom")
if not Success then warn(Message) end

Disabling prevents selection; it does not remove the character from players already using it.

Remove or replace your custom character

local Success, Message = CharacterService:Remove("Dark Vader")
if not Success then warn(Message) end

Remove your old custom character before building another with the same name. Removing it on its first run can report that no such custom character exists.

Removing tools

Use RemoveGears with an online player and a list of tool names.

local Player = PlayerService:Get(123456789)
if Player then
    local Success, Message = pcall(function()
        GearService:RemoveGears(Player, {"The Force", "V21"})
    end)
    if not Success then warn(Message) end
end

This removes one matching tool per listed name. Use :give for giving tools; giving them through GearService is not currently available reliably.

Support purchase prompts

You can ask an online player to support the server owner.

local Player = PlayerService:Get(123456789)
if Player then
    local Success, Result = Monetization:PromptPurchase(Player, "Server Support", 10)
    if Success then
        print("Purchase prompt opened")
    else
        warn(Result)
    end
end
  • Replace 10 with an integer amount from 1 to 2,000.
  • Choose a nonempty purchase name.
  • Monetization must be enabled for your server.
  • The player must be online.
  • A successful prompt does not mean the player paid.
  • Do not grant paid rewards from this example. Purchase-history checks and completion callbacks are not currently available reliably.

Server settings

Use your server’s Settings page.

Setting What you can change
Enable Flight Allow or disable supported flying features.
Force PVP Require PVP instead of leaving it to each player’s preference.
Server Name Your server’s displayed name.
Server Thumbnail The thumbnail’s numeric image asset ID.
Server Icon The icon’s numeric image asset ID.
Description Your server’s description.

Help and troubleshooting

Problem What to do
A command is unavailable Use :cmds and check your role.
An e-command says “Your player data could not be found” Contact game staff; this is a current issue, not a missing argument.
You cannot open/edit scripts Ask the owner for Developer or another role with EditServer.
A player lookup finds nobody Use their exact username or an online UserId.
You want to rank someone offline Use their numeric UserId.
eRank rejects Admin Use Moderator/Developer, or assign the existing Admin role with RoleService.
You cannot remove a built-in character Use Disable instead.
A character name already exists Choose another name or remove your previous custom character first.
Clothing/accessories are missing Check the asset IDs, compatibility, and Output warnings.
A script repeats actions while you edit Disable it before editing and avoid repeatedly adding join/leave callbacks.
A teleport fails Try it in the live game and check Output.
You want custom chat commands or scripted UI/world tweens These features are not currently available through the custom editor.