Terminal
Included commands are for demonstration purposes only.
Designed to mimic the look and feel of a traditional terminal, this app provides an intuitive and powerful tool for executing various commands.

Register Commands
Navigate to
av_laptop/server/editable/_terminal.luaAdd your custom commands to the
allCommandstable using the following structure:
Base Properties
index key:
stringThe command trigger. This must be unique.allowed:
function(playerId, laptopSerial)Returnstrueorfalse. Determines if the player is permitted to see and use the command. Iffalse, the command will be hidden from the/helplist.canProcess:
function(playerId, laptopSerial, args)Verifies that the user meets the requirements to execute the command (e.g., special permissions, specific items, or required arguments).onSuccess:
function(playerId, laptopSerial, args)This function runs only ifcanProcessreturnstrue. Use this to execute any custom server-side logic.actions:
table[]A sequence of actions executed by the terminal in descending order. Each action supports the following properties:
Action Properties
type:
stringThe action to perform. Options:"text","progressbar", or"minigame".input:
stringThe content to be processed (e.g., the text to display or the name of the minigame to trigger). List of available minigames can be found in the Minigames section.delay:
numberThe duration (in milliseconds) to wait before executing the next action in the sequence.style:
stringOptional. Used with the"text"type to apply an"error"or"output"visual style.output:
table[]The final message rendered once all actions and minigames have been successfully completed.message (string): The text content to display.
color (string): The HEX or CSS color for the text.
Client-Side Logic
If you need to execute client-side code or actions, navigate to av_laptop/client/editable/terminal.lua. Inside this file, you will find the following events:
The "external" Action
This event is triggered when an action is set to the "external" type. It allows you to integrate your own custom logic or external resources.
Example: If the terminal receives the command
"atm-crack", you can use this event to trigger a custom ATM hacking minigame or verify if the player is currently standing in front of an ATM. The possibilities are limited only by your imagination.
The "success" Event
This event runs automatically after a command has been successfully executed. It is the client-side equivalent of the onSuccess function.
Parameters: You will receive the
commandandargsvariables, which you can use to trigger specific client-side effects, animations, or scripts based on the completed command.

Last updated