### Custom Tool Example Source: https://scproleplay.com/docs/server-addons Example of creating a simple custom Tool and giving it to a player. ```APIDOC ## POST /websites/scproleplay/examples/custom_tool ### Description Creates a simple custom Tool with a safe, hidden Handle and gives it to the first player in the server. ### Method POST ### Endpoint `/websites/scproleplay/examples/custom_tool` ### Parameters None ### Request Body None ### Request Example None ### Response #### Success Response (200) - **message** (string) - Indicates the script has been executed. #### Response Example ```json { "message": "Custom tool created and given to the first player." } ``` ### Code Snippet ```lua local function GiveTool(Player) local Tool = Instance.new("Tool") Tool.CanBeDropped = false Tool.Name = "Custom Tool" local Part = Instance.new("Part") Part.Name = "Handle" Part.Anchored = true Part.CanCollide = false Part.CFrame = CFrame.new(999, 9999, 999) f(Tool) Part.Parent = Tool giveTool(Player, Tool) end GiveTool(getPlayers()[1]) ``` ``` -------------------------------- ### Kill Part Example Source: https://scproleplay.com/docs/server-addons Example of how to make a part kill any player who touches it. ```APIDOC ## POST /websites/scproleplay/examples/kill_part ### Description Retrieves a part named "Part" from the map and makes it kill any player who touches it. ### Method POST ### Endpoint `/websites/scproleplay/examples/kill_part` ### Parameters None ### Request Body None ### Request Example None ### Response #### Success Response (200) - **message** (string) - Indicates the script has been executed. #### Response Example ```json { "message": "Kill script applied to 'Part'." } ``` ### Code Snippet ```lua f("Part").Touched:Connect(function(Player) if Player then kill(Player) end end) ``` ``` -------------------------------- ### Play Sound on Interaction Example Source: https://scproleplay.com/docs/server-addons Example of listening for a custom interaction event and playing a sound globally. ```APIDOC ## POST /websites/scproleplay/examples/play_sound_on_interaction ### Description Listens for a custom interaction event and plays a sound globally when a part named "SoundPart" is triggered. ### Method POST ### Endpoint `/websites/scproleplay/examples/play_sound_on_interaction` ### Parameters None ### Request Body None ### Request Example None ### Response #### Success Response (200) - **message** (string) - Indicates the script has been executed. #### Response Example ```json { "message": "Sound play script applied for 'SoundPart' interaction." } ``` ### Code Snippet ```lua event("interaction", function(Data) local Player = Data.Value[1] local Interaction = Data.Value[2] if Interaction == "SoundPart" then local Sound = Instance.new("Sound") Sound.SoundId = "rbxassetid://157636218" playSound(Sound) end end) ``` ``` -------------------------------- ### Retrieving and Tagging Instances with Server Addons API (Lua) Source: https://scproleplay.com/docs/server-addons Shows how to use the `getTagged` function to retrieve all instances with a specific tag and the `f` function to get a single instance by name or tag an instance. These functions are essential for managing and locating game objects. ```Lua -- Get all instances tagged with 'SpawnPoint' local spawnPoints = getTagged("SpawnPoint") -- Get the first instance named 'MainPlatform' local mainPlatform = f("MainPlatform") -- Example of parenting an instance using f() when passed as an argument local anotherPart = Instance.new("Part") f(anotherPart) -- This will parent anotherPart to the map ``` -------------------------------- ### HTTP Request Function (Lua) Source: https://scproleplay.com/docs/server-addons Performs HTTP requests with support for various methods (GET, POST, etc.), custom headers, request bodies, and compression. Defaults to a GET request with no compression. ```lua http("https://api.example.com/data", "post", nil, "some data") ``` -------------------------------- ### World Time Manipulation (Lua) Source: https://scproleplay.com/docs/server-addons Functions to get the current world time and set it to a specific value. Optionally, setting the time can also update the atmosphere. ```lua local currentTime = getClockTime() setClockTime(14, true) -- Set time to 2 PM and update atmosphere ``` -------------------------------- ### Accessing and Parenting Instances in Server Addons (Lua) Source: https://scproleplay.com/docs/server-addons Demonstrates how to access existing instances within the game's workspace and how to parent new instances to the map using the `f()` function. This is crucial for dynamically modifying the game environment. ```Lua -- Access an existing part in the workspace local existingPart = workspace.Part -- Create a new part local newPart = Instance.new("Part") newPart.Size = Vector3.new(2, 2, 2) newPart.BrickColor = BrickColor.new("Bright red") -- Parent the new part to the map using the f() function f(newPart) -- You can also parent an existing instance to the map -- f(existingPart) ``` -------------------------------- ### Available Events Source: https://scproleplay.com/docs/server-addons This section details the various events that can be listened to within the SCP Roleplay game. ```APIDOC ## Available Events This endpoint provides information about the events available in the SCP Roleplay game. ### Parameters None ### Response #### Success Response (200) - **event_name** (string) - The name of the event. - **data_type** (string) - The data type of the event payload. - **description** (string) - A description of the event and its parameters. #### Response Example ```json { "events": [ { "event_name": "joined", "data_type": "string", "description": "Occurs when a player joins the server. (player : string)" }, { "event_name": "left", "data_type": "string", "description": "Occurs when a player leaves the server. (player : string)" }, { "event_name": "chatted", "data_type": "table", "description": "Occurs when a player sends a chat message. (player : string, message : string)" }, { "event_name": "spawned", "data_type": "string", "description": "Occurs when a player spawns. (player : string)" }, { "event_name": "interaction", "data_type": "table", "description": "Occurs when a player interacts with a custom interaction part. (player : string, name : string)" }, { "event_name": "lightswitch", "data_type": "table", "description": "Occurs when a player interacts with a light switch. Includes the player's username, room name, and new state of the light (on/off). (player : string, room : string, state : bool)" }, { "event_name": "death", "data_type": "string", "description": "Occurs when a player dies. (player : string)" }, { "event_name": "kill", "data_type": "table", "description": "Occurs when one player kills another. (killer : string, victim : string)" } ] } ``` ``` -------------------------------- ### Event Handling with `event()` (Lua) Source: https://scproleplay.com/docs/server-addons A simplified method for handling events within the sandboxed environment. The `event()` function allows listening for specific event names and executing a callback function with associated data when the event occurs. ```lua event("joined", function(data) print("Player joined: " .. data.Value) end) ``` -------------------------------- ### Create and Give Custom Tool Source: https://scproleplay.com/docs/server-addons Defines a function 'GiveTool' that creates a custom 'Tool' instance with a hidden 'Handle' part. It then assigns this tool to the first player found in the server using the 'getPlayers' and 'giveTool' functions. The 'f' function is used to parent the tool. ```lua local function GiveTool(Player) local Tool = Instance.new("Tool") Tool.CanBeDropped = false Tool.Name = "Custom Tool" local Part = Instance.new("Part") Part.Name = "Handle" Part.Anchored = true Part.CanCollide = false Part.CFrame = CFrame.new(999, 9999, 999) f(Tool) Part.Parent = Tool giveTool(Player, Tool) end GiveTool(getPlayers()[1]) ``` -------------------------------- ### Tweening and Raycasting with Server Addons API (Lua) Source: https://scproleplay.com/docs/server-addons Illustrates the use of `tween` to animate instance properties and `raycast` to detect intersections in the game world. These are powerful tools for creating dynamic effects and interactive elements. ```Lua -- Define tween information local tweenInfo = TweenInfo.new(2, Enum.EasingStyle.Quad, Enum.EasingDirection.Out) -- Define properties to tween local propertyTable = { Position = Vector3.new(10, 5, 0), Transparency = 0.5 } -- Assuming 'myPart' is an existing part instance -- tween(myPart, tweenInfo, propertyTable) -- Define raycast parameters local origin = Vector3.new(0, 10, 0) local direction = Vector3.new(0, -1, 0) local raycastParams = RaycastParams.new() raycastParams.FilterType = Enum.RaycastFilterType.Blacklist -- raycastParams:AddIntersectionToList(workspace.SomePartToIgnore) -- Perform the raycast local result = raycast(origin, direction, raycastParams) -- Check if the ray hit something if result then print("Ray hit instance: " .. result.Instance.Name) if result.Instance:IsA("BasePart") then print("Hit a BasePart!") end -- If the ray hits a player, result.Instance will be their username string if typeof(result.Instance) == "string" then print("Ray hit player: " .. result.Instance) end end ``` -------------------------------- ### Play Sound (Lua) Source: https://scproleplay.com/docs/server-addons Plays a specified sound. The sound can be played globally or specifically for a given player. An optional 'attach' boolean determines if the sound should be attached to the player. ```lua local sound = game.SoundService.Ambient:FindFirstChild("MySound") playSound(sound, "PlayerName") playSound(sound, nil, true) -- Play globally and attach ``` -------------------------------- ### Manage Map Lights (Lua) Source: https://scproleplay.com/docs/server-addons Functions to control map lighting, including resetting, coloring, disabling lights incrementally, and enabling/disabling a full blackout with optional emergency power. ```lua resetLights() colorLights(1, 0, 0) -- Red lights disableLights(5) blackoutLights(true, true) -- Enable blackout with emergency power ``` -------------------------------- ### Display UI Messages (Lua) Source: https://scproleplay.com/docs/server-addons Functions to display various UI elements like announcements, titles, subtitles, side info, and sub-side info. These can be broadcast to all players or targeted to a specific player if a string is provided as the second argument. ```lua announce("Server maintenance starting soon.") title("Welcome to SCPRP", Color3.new(1, 0, 0)) subtitle("A new SCP has breached containment.") sideinfo("Player count: 50") subsideinfo("Server status: Stable") ``` -------------------------------- ### Server Host and Command Execution (Lua) Source: https://scproleplay.com/docs/server-addons Retrieves the UserId of the server host and executes server commands. Commands that broadcast text require the host to be present. The function returns success status and any error messages. ```lua local hostId = getHost() local success, err = runCommand("announce Server is restarting in 5 minutes") ``` -------------------------------- ### Player Functions API Source: https://scproleplay.com/docs/server-addons This section details the functions available for managing and querying player data and actions. ```APIDOC ## Player Functions API This API provides a comprehensive set of functions to interact with and manage players within the game. ### `kill(name : string)` **Description**: Kills the specified player. **Method**: `Function Call` **Parameters**: #### Path Parameters - **name** (string) - Required - The username of the player to kill. ### `damage(name : string, amount : number)` **Description**: Damages the specified player by the given amount. **Method**: `Function Call` **Parameters**: #### Path Parameters - **name** (string) - Required - The username of the player to damage. - **amount** (number) - Required - The amount of damage to inflict. ### `heal(name : string)` **Description**: Heals the specified player to their maximum health. **Method**: `Function Call` **Parameters**: #### Path Parameters - **name** (string) - Required - The username of the player to heal. ### `getPlayers()` **Description**: Returns a list of the usernames of all players currently in the server. **Method**: `Function Call` **Returns**: `string[]` - An array of player usernames. ### `getPlayerHealth(name : string)` **Description**: Returns the specified player's current health. Returns -1 if the player is not spawned in. **Method**: `Function Call` **Parameters**: #### Path Parameters - **name** (string) - Required - The username of the player. **Returns**: `number` - The player's current health or -1. ### `setPlayerHealth(name : string, amount : number)` **Description**: Sets the specified player's health. **Method**: `Function Call` **Parameters**: #### Path Parameters - **name** (string) - Required - The username of the player. - **amount** (number) - Required - The desired health amount. ### `getPlayerMaxHealth(name : string)` **Description**: Returns the specified player's maximum health. Returns -1 if the player is not spawned in. **Method**: `Function Call` **Parameters**: #### Path Parameters - **name** (string) - Required - The username of the player. **Returns**: `number` - The player's maximum health or -1. ### `setPlayerMaxHealth(name : string, amount : number)` **Description**: Sets the specified player's maximum health. **Method**: `Function Call` **Parameters**: #### Path Parameters - **name** (string) - Required - The username of the player. - **amount** (number) - Required - The desired maximum health amount. ### `getPlayerScore(name : string)` **Description**: Returns the specified player's score. **Method**: `Function Call` **Parameters**: #### Path Parameters - **name** (string) - Required - The username of the player. **Returns**: `number` - The player's score. ### `setPlayerScore(name : string, score : number)` **Description**: Sets the specified player's score. **Method**: `Function Call` **Parameters**: #### Path Parameters - **name** (string) - Required - The username of the player. - **score** (number) - Optional - The desired score value (defaults to 0). ### `getPlayerPosition(name : string)` **Description**: Returns the specified player's position (Vector3 / CFrame) in the map. **Method**: `Function Call` **Parameters**: #### Path Parameters - **name** (string) - Required - The username of the player. **Returns**: `Vector3 | CFrame` - The player's position. ### `setPlayerPosition(name : string, position : Vector3)` **Description**: Sets the specified player's position (Vector3 / CFrame). **Method**: `Function Call` **Parameters**: #### Path Parameters - **name** (string) - Required - The username of the player. - **position** (Vector3) - Required - The desired position. ### `getPlayerKeycard(name : string)` **Description**: Returns the specified player's keycard level (e.g., "L4"). **Method**: `Function Call` **Parameters**: #### Path Parameters - **name** (string) - Required - The username of the player. **Returns**: `string` - The player's keycard level. ### `getTools(name : string)` **Description**: Returns a list of the names of all tools in the specified player's inventory. **Method**: `Function Call` **Parameters**: #### Path Parameters - **name** (string) - Required - The username of the player. **Returns**: `string[]` - An array of tool names. ### `giveTool(name : string, tool : string)` **Description**: Gives the specified player the specified tool. It also supports the tool argument being a Tool, where in that case it will unanchor the Handle before giving it to the player (useful for making custom tools). **Method**: `Function Call` **Parameters**: #### Path Parameters - **name** (string) - Required - The username of the player. - **tool** (string | Tool) - Required - The name or Tool object of the item to give. ### `removeTool(name : string, tool : string)` **Description**: Removes the specified tool from the specified player. **Method**: `Function Call` **Parameters**: #### Path Parameters - **name** (string) - Required - The username of the player. - **tool** (string) - Required - The name of the tool to remove. ### `getUserId(name : string)` **Description**: Returns the specified player's UserId. **Method**: `Function Call` **Parameters**: #### Path Parameters - **name** (string) - Required - The username of the player. **Returns**: `number` - The player's UserId. ### `ownsGamepass(name : string, id : number)` **Description**: Returns whether or not the specified player owns the specified gamepass. **Method**: `Function Call` **Parameters**: #### Path Parameters - **name** (string) - Required - The username of the player. - **id** (number) - Required - The ID of the gamepass. **Returns**: `boolean` - True if the player owns the gamepass, false otherwise. ### `ownsAsset(name : string, id : number)` **Description**: Returns whether or not the specified player owns the specified asset. **Method**: `Function Call` **Parameters**: #### Path Parameters - **name** (string) - Required - The username of the player. - **id** (number) - Required - The ID of the asset. **Returns**: `boolean` - True if the player owns the asset, false otherwise. ### `playEmote(target : string | Instance, id : number, loop : bool)` **Description**: Plays the specified emote or animation on the specified player. You can pass a Humanoid, Animator, AnimationController or an Instance ascending a Humanoid as the target argument, allowing you to animate custom SCPs, for example. Returns a function that stops the animation and another that adjusts its speed, e.g.: `stopFunction, adjustSpeedFunction = playEmote(...)`. **Method**: `Function Call` **Parameters**: #### Path Parameters - **target** (string | Instance) - Required - The player or object to animate. - **id** (number) - Required - The ID of the emote or animation. - **loop** (boolean) - Optional - Whether the animation should loop (defaults to false). **Returns**: `function, function` - A function to stop the animation and a function to adjust its speed. ### `hasTool(name : string, tool : string)` **Description**: Returns whether the specified player has the specified tool. **Method**: `Function Call` **Parameters**: #### Path Parameters - **name** (string) - Required - The username of the player. - **tool** (string) - Required - The name of the tool to check for. **Returns**: `boolean` - True if the player has the tool, false otherwise. ### `getPlayerCurrentTool(name : string)` **Description**: Returns the name of the tool the player is currently using, or `nil` if none. **Method**: `Function Call` **Parameters**: #### Path Parameters - **name** (string) - Required - The username of the player. **Returns**: `string | nil` - The name of the current tool or nil. ### `getPlayerIsInGroup(name : string, id : number)` **Description**: Returns whether the specified player is in the specified group. **Method**: `Function Call` **Parameters**: #### Path Parameters - **name** (string) - Required - The username of the player. - **id** (number) - Required - The ID of the group. **Returns**: `boolean` - True if the player is in the group, false otherwise. ### `getPlayerRankInGroup(name : string, id : number)` **Description**: Returns the player's rank number (0–255) in the specified group. **Method**: `Function Call` **Parameters**: #### Path Parameters - **name** (string) - Required - The username of the player. - **id** (number) - Required - The ID of the group. **Returns**: `number` - The player's rank in the group. ### `getPlayerRoleInGroup(name : string, id : number)` **Description**: Returns the player's role in the specified group. **Method**: `Function Call` **Parameters**: #### Path Parameters - **name** (string) - Required - The username of the player. - **id** (number) - Required - The ID of the group. **Returns**: `string` - The player's role in the group. ### `gunMagSize(name : string)` **Description**: Returns the number of bullets in a magazine for the specified gun. **Method**: `Function Call` **Parameters**: #### Path Parameters - **name** (string) - Required - The username of the player. **Returns**: `number` - The magazine size of the specified gun. ### `gunAddBullets(player : string, gun : string, amount : number)` **Description**: Adds the specified amount of bullets to the specified gun for the given player. **Method**: `Function Call` **Parameters**: #### Path Parameters - **player** (string) - Required - The username of the player. - **gun** (string) - Required - The name of the gun. - **amount** (number) - Required - The number of bullets to add. ### `gunAmmo(player : string, gun : string, mag : bool)` **Description**: Returns the amount of ammo in the specified gun. Returns the amount of bullets left in the magazine if `mag` is true. **Method**: `Function Call` **Parameters**: #### Path Parameters - **player** (string) - Required - The username of the player. - **gun** (string) - Required - The name of the gun. - **mag** (boolean) - Optional - If true, returns bullets in the magazine (defaults to false). **Returns**: `number` - The amount of ammo in the gun. ### `isGun(name : string)` **Description**: Returns whether or not the specified string is a gun; also returns the weapon type. Example: `local IsGun, IsPistol, IsShotgun = isGun("Golden Hawk")`. **Method**: `Function Call` **Parameters**: #### Path Parameters - **name** (string) - Required - The name of the item to check. **Returns**: `boolean, boolean, boolean` - Indicates if it's a gun, and if it's a pistol or shotgun respectively. ``` -------------------------------- ### Create Admin Rank via Command Source: https://scproleplay.com/docs/server-settings This code snippet demonstrates how to create a new admin rank named 'Morpher' using a simple command format. After typing the command, the rank is added via the 'Add New' button, and its permissions can be viewed and edited. ```plaintext * Morpher ``` -------------------------------- ### Audio Information Commands Source: https://scproleplay.com/docs/server-commands Commands to retrieve information about available audio assets within the game. ```text :songs ``` -------------------------------- ### Team Management Functions Source: https://scproleplay.com/docs/server-addons These functions provide control over game teams and their members. They enable retrieval of team information, assignment of players to teams, and management of team rosters. ```lua getTeams() : table getTeamMembers(team : string / BrickColor) : list getTeam(name : string) : string, BrickColor setTeam(name : string, team : string / BrickColor) ``` -------------------------------- ### Play Sound on Custom Interaction Source: https://scproleplay.com/docs/server-addons Listens for a custom 'interaction' event. When triggered, it checks if the interaction name is 'SoundPart'. If it is, a new 'Sound' instance is created with a specific SoundId and played globally using the 'playSound' function. This requires the 'event' function to subscribe to events and 'playSound' to play audio. ```lua event("interaction", function(Data) local Player = Data.Value[1] local Interaction = Data.Value[2] if Interaction == "SoundPart" then local Sound = Instance.new("Sound") Sound.SoundId = "rbxassetid://157636218" playSound(Sound) end end) ``` -------------------------------- ### Basic Moderation Commands Source: https://scproleplay.com/docs/server-commands Core commands for server moderation, including respawning, refreshing characters, kicking, banning, and warning players. ```text :respawn [User] :refresh [User] :kick [User] [Reason] :ban [User] :unban [User] :warn [User] ``` -------------------------------- ### Audio Playback Commands Source: https://scproleplay.com/docs/server-commands Commands for controlling global audio playback, including playing songs with looping options and stopping all audio. Volume and pitch adjustments are also available. ```text :playsong [SoundID] [true / false] :stopsong :songvolume [Number] :songpitch [Number] ``` -------------------------------- ### Set Sign Text (Lua) Source: https://scproleplay.com/docs/server-addons Changes the text displayed on the first TextLabel found within a specified instance in the map. Requires the instance name and the new text content. ```lua setSignText("DoorSign", "Restricted Area") ``` -------------------------------- ### Tweening Calculations (Lua) Source: https://scproleplay.com/docs/server-addons Helper functions for tweening animations. `tweenGetValue` calculates an eased alpha value, while `tweenSmoothDamp` simulates a damped spring for smooth value transitions. ```lua local easedAlpha = tweenGetValue(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.Out) local smoothedValue = tweenSmoothDamp(currentValue, targetValue, currentVelocity, 0.2, 10, deltaTime) ``` -------------------------------- ### Location-Based Teleportation Commands Source: https://scproleplay.com/docs/server-commands Commands to teleport to predefined map locations or custom locations. Includes functionality to create and list goto points. ```text :goto [Location] :gotos :customgotos :creategoto [Name] ``` -------------------------------- ### JSON Encoding and Decoding (Lua) Source: https://scproleplay.com/docs/server-addons Functions to convert Lua tables to JSON strings and vice versa. `jsonEncode` takes a table and returns a JSON string, while `jsonDecode` takes a JSON string and returns a Lua table. ```lua local playerData = { name = "Player1", score = 100 } local jsonString = jsonEncode(playerData) local decodedTable = jsonDecode(jsonString) ``` -------------------------------- ### Kill Player on Touch Source: https://scproleplay.com/docs/server-addons Connects to the Touched event of a part named 'Part'. When a player touches this part, the 'kill' function is called to eliminate the player. This assumes the existence of global functions 'f' to find parts and 'kill' to perform player elimination. ```lua f("Part").Touched:Connect(function(Player) if Player then kill(Player) end end) ``` -------------------------------- ### Player-Specific Sound Playback Commands Source: https://scproleplay.com/docs/server-commands Commands to play specific sounds originating from a player, with detailed control over looping, volume, range, and falloff. Includes options to stop individual or all sounds from a user. ```text :playsound [User] [SoundID] [Loop] [Volume] [Range] [Range Falloff] :stopsound [User] [ID] :stopsounds [User] ``` -------------------------------- ### Player Management Functions Source: https://scproleplay.com/docs/server-addons These functions allow for direct manipulation of player attributes and states. They include actions like killing, damaging, healing, and retrieving player-specific data such as health, score, and inventory. ```lua kill(name : string) damage(name : string, amount : number) heal(name : string) getPlayers() : list getPlayerHealth(name : string) : number setPlayerHealth(name : string, amount : number) getPlayerMaxHealth(name : string) : number setPlayerMaxHealth(name : string, amount : number) getPlayerScore(name : string) : number setPlayerScore(name : string, score : number) getPlayerPosition(name : string) : Vector3 / CFrame setPlayerPosition(name : string, position : Vector3 / CFrame) getPlayerKeycard(name : string) : string getTools(name : string) : list giveTool(name : string, tool : string / Tool) removeTool(name : string, tool : string) getUserId(name : string) : number ownsGamepass(name : string, id : number) : bool ownsAsset(name : string, id : number) : bool playEmote(target : string / Instance, id : number, loop : bool) : function, function hasTool(name : string, tool : string) : bool getPlayerCurrentTool(name : string) : string / nil getPlayerIsInGroup(name : string, id : number) : bool getPlayerRankInGroup(name : string, id : number) : number getPlayerRoleInGroup(name : string, id : number) : string ``` -------------------------------- ### Morph Information Command Source: https://scproleplay.com/docs/server-commands Command to display a list of all available morphs that can be applied to players. ```text :morphs ``` -------------------------------- ### Rig Chat Bubble (Lua) Source: https://scproleplay.com/docs/server-addons Sends a chat bubble message associated with a specified rig. This function requires both the rig's name and the message content. ```lua rigSay("SCP-173", "You cannot move me.") ``` -------------------------------- ### Team Functions API Source: https://scproleplay.com/docs/server-addons This section details the functions available for managing and querying team data and assignments. ```APIDOC ## Team Functions API This API provides functions to manage and retrieve information about teams and their members. ### `getTeams()` **Description**: Returns all teams in the game in the `{ name, color }` format. (e.g. team[1] is the name, team[2] is the color). **Method**: `Function Call` **Returns**: `Array<{ name: string, color: BrickColor }>` - An array of team objects, each containing a name and color. ### `getTeamMembers(team : string | BrickColor)` **Description**: Returns the usernames of the members of the specified team. **Method**: `Function Call` **Parameters**: #### Path Parameters - **team** (string | BrickColor) - Required - The name or BrickColor of the team. **Returns**: `string[]` - An array of usernames of team members. ### `getTeam(name : string)` **Description**: Returns the specified player's team name and color. Example: `local name, color = getTeam("PlayerName")`. **Method**: `Function Call` **Parameters**: #### Path Parameters - **name** (string) - Required - The username of the player. **Returns**: `string, BrickColor` - The player's team name and color. ### `setTeam(name : string, team : string | BrickColor)` **Description**: Sets the specified player's team. **Method**: `Function Call` **Parameters**: #### Path Parameters - **name** (string) - Required - The username of the player. - **team** (string | BrickColor) - Required - The name or BrickColor of the team to set. ``` -------------------------------- ### Set Side Info with RGB Color Source: https://scproleplay.com/docs/server-commands Configures the lower-left side information string with custom text and optional RGB color values. It allows for personalized messages displayed on the server's UI. ```plaintext :sideinfo Hello world! 255 0 255 ``` -------------------------------- ### Create Server Polls Source: https://scproleplay.com/docs/server-commands Initiates a poll for specified users or groups with a 'Yes' or 'No' option. This command is useful for gathering feedback or making server-wide decisions. ```plaintext :poll all Want Cookies? :poll %class Want Cookies? ``` -------------------------------- ### Set Server Title with RGB Color Source: https://scproleplay.com/docs/server-commands Sets the server's title with custom text and RGB color values. The command takes the message and three integer values for Red, Green, and Blue color components. ```plaintext :title SCP: Roleplay | Custom Server Guide 72 0 255 255 180 0 ``` -------------------------------- ### Gun and Ammunition Functions Source: https://scproleplay.com/docs/server-addons These functions are specific to managing firearms within the game. They allow developers to check gun properties, add ammunition, and query current ammo counts. ```lua gunMagSize(name : string) : number gunAddBullets(player : string, gun : string, amount : number) gunAmmo(player : string, gun : string, mag : bool) : number isGun(name : string) : bool, string ``` -------------------------------- ### Send Announcement with Parameters Source: https://scproleplay.com/docs/server-commands Sends an announcement across the server. This function can target all players or a specific player with a given message, facilitating communication. ```javascript announce(player, "message") ``` -------------------------------- ### Apply Permanent Pants with ID Source: https://scproleplay.com/docs/server-commands Grants a user permanent pants based on a provided asset ID. This ensures the cosmetic change remains active across respawns. ```plaintext :permpants me 129458426 ``` -------------------------------- ### Color Name Tag with RGB Source: https://scproleplay.com/docs/server-commands Applies a custom RGB color to the name tag displayed above a user's head. The command requires the user identifier and three integer values for Red, Green, and Blue. ```plaintext :cntag me 150 0 255 ``` -------------------------------- ### Client Rejoin Command Source: https://scproleplay.com/docs/server-commands A client-side command to force the player's client to rejoin the server. ```text !rejoin ``` -------------------------------- ### Apply Permanent Hats with Multiple IDs Source: https://scproleplay.com/docs/server-commands Assigns multiple hats to a user permanently, meaning they persist even after respawning. The command takes the user identifier and a comma-separated list of asset IDs. ```plaintext :permhat me 24112667,28503039 ``` -------------------------------- ### Spectator Commands Source: https://scproleplay.com/docs/server-commands Commands to spectate other players or stop spectating. Allows for viewing gameplay from another user's perspective. ```text :view [User] :unview ``` -------------------------------- ### Player Teleportation Commands Source: https://scproleplay.com/docs/server-commands Commands to facilitate player movement, including teleporting between users, to a specific user, or bringing a user to your location. ```text :tp [User1] [User2] :to [User] :bring [User] ``` -------------------------------- ### Player Damage Multiplier Commands Source: https://scproleplay.com/docs/server-commands Commands to adjust a player's damage output multiplier. Both temporary and permanent changes are supported. ```text :damagemultiplier [User] [Value] :permdamagemultiplier [User] [Value] :unpermdamagemultiplier [User] ``` -------------------------------- ### Color Rank Tag with RGB Source: https://scproleplay.com/docs/server-commands Sets the color of the rank tag displayed above a user's head using RGB values. This allows for visual customization of user ranks on the server. ```plaintext :crtag me 255 0 0 ``` -------------------------------- ### Player Tracking Command Source: https://scproleplay.com/docs/server-commands Command to enable or disable tracking for a specific user. ```text :trackuser [User] [true / false] ``` -------------------------------- ### Player Morph Commands Source: https://scproleplay.com/docs/server-commands Commands to change a player's appearance using available morphs. Supports temporary and permanent morphing, as well as removing permanent morphs. ```text :morph [User] [Morph_Name] :permmorph [User] [Morph_Name] :unpermmorph [User] [Morph_Name] ``` -------------------------------- ### Player Status Effect Commands Source: https://scproleplay.com/docs/server-commands Commands to apply or remove status effects like invincibility, damage reflection, force fields, and infections. Includes options for permanent effects and curing infections. ```text :god [User] :ungod [User] :reflect [User] :ff [User] :unff [User] :infect [User] [409/008] :cure [User] ``` -------------------------------- ### Player Scale Modification Commands Source: https://scproleplay.com/docs/server-commands Commands to adjust a player's visual scale. Some commands offer permanent modifications, while others are temporary. ```text :scale [User] [Head] [Width] [Depth] [Height] :permscale [User] [H] [W] [D] [H] :unpermscale [User] :unpermall [User] ``` -------------------------------- ### Player Night Vision Commands Source: https://scproleplay.com/docs/server-commands Commands to control the color of a player's night vision goggles. Supports temporary color changes and permanent modifications. ```text :nvg [User] [R] [G] [B] :permcolornvg [User] [R] [G] [B] :unpermcolornvg [User] ``` -------------------------------- ### Player Health Modification Commands Source: https://scproleplay.com/docs/server-commands Commands to manipulate a player's health, including setting current and maximum health, and applying damage. Permanent health modifications can also be managed. ```text :health [User] [Amount] :maxhealth [User] [Amount] :permmaxhealth [User] [Amount] :unpermmaxhealth [User] :heal [User] :damage [User] [Amount] ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.