Commands

Commands are part of the client, and easy to create. There are currently 7 built-in commands in the system that work effectively.

Example (/console)

-- Author: @Jumpathy
-- Name: developerConsole.lua
-- Description: Ability to open developer console via /console

local starterGui = game:GetService("StarterGui")
local command = {}
command.name = "console"
command.aliases = {"c"}
command.call = function()
    local devConsoleVisible = game.StarterGui:GetCore("DevConsoleVisible")
    game:GetService("StarterGui"):SetCore("DevConsoleVisible",not devConsoleVisible)
end
return command

Creating our own

Let's get started on creating our own command that resets the player!

  1. Open it and set something like the following code:

local command = {}
command.name = ... --> Command name
command.aliases = {} --> Command aliases
command.call = function(text) 
	-- Function called when command is run
end
return command

3. Name it whatever you want and then for the function to kill the player it'd go:

game:GetService("Players").LocalPlayer.Character:BreakJoints()

4. That's it! You now have a command named whatever you set it to and when you type it, it'll reset your character. Go crazy!

Working code:

local command = {}
command.name = "reset"
command.aliases = {"die"}
command.call = function(text) 
   game:GetService("Players").LocalPlayer.Character:BreakJoints()
end
return command

Last updated