Globals - tayjay/SCriPt GitHub Wiki

The following are global variables that can be accessed from anywhere in the code.

Globals can be accessed from anywhere in your code

AdminToys

For spawning and interacting with Admin Toys. These are Unity Primitive objects that can be spawned in the game such as cubes, spheres, and lights.

Type Function Arguments
Primitive AdminToys:Spawn string name
Vector3 position
Quaternion rotation
Color color
Primitive AdminToys:Destroy string name
Primitive AdminToys:Create PrimitiveType type
Vector3 position
Vector3 rotation
Vector3 scale
Color color

Cassie

For interacting with the in-game announcer.

Type Variable Interaction
bool Cassie.IsSpeaking Get
Type Function Arguments
void Cassie:Message string words
bool makeHold = true
bool makeNoise = true
bool isSubtitles = false
void Cassie:GlitchyMessage string message
float glitchChance
float jamChance
bool Cassie:IsValidWord string word
bool Cassie:IsValidSentence string sentence

Config

For interacting with script configs.

See Config Section for more info

Type Function Arguments
int Config:Load string key
int defaultValue
float Config:LoadInt string key
int defaultValue
float Config:Load string key
float defaultValue
float Config:LoadFloat string key
float defaultValue
string Config:Load string key
string defaultValue
string Config:LoadString string key
string defaultValue
bool Config:Load string key
bool defaultValue
bool Config:LoadBool string key
bool defaultValue
int Config:Save string key
int value
float Config:SaveInt string key
int value
float Config:Save string key
float value
float Config:SaveFloat string key
float value
string Config:Save string key
string value
string Config:SaveString string key
string value
bool Config:Save string key
bool value
bool Config:SaveBool string key
bool value

The Load functions are used to create and retrieve a value from the config file. The Save functions are used to update the value in the config file.

Timing

For creating and managing coroutines.

See Coroutines for more info

Type Function Arguments
CoroutineHandle Timing:CallDelayed float delay
Function action
CoroutineHandle Timing:CallDelayed float delay
Function action
object[] args
CoroutineHandle Timing:CallCoroutine Function action
CoroutineHandle Timing:CallCoroutine Function action
object[] args
void Timing:KillCoroutine CoroutineHandle handle
void Timing:Kill CoroutineHandle handle

Decon

For interacting with the LCZ decontamination sequence.

Type Function Arguments
void Decon:Disable

Events

For subscribing to events.

See Events Section for more info

Facility

For interacting with the Map/Facility.

Lobby

For interacting with the lobby.

Player

A helper for interacting with players.

Role

For interacting with player roles.

Round

For interacting with the current round.

Server

For interacting with the server.

Type Variable Interaction
int PlayerCount Get
int NpcCount Get
int ScpCount Get
int HumanCount Get
int DClassCount Get
int ScientistCount Get
int FoundationCount Get
int ChaosCount Get
bool FriendlyFire Get/Set
List(Player) Players Get
List(Player) RemoteAdmins Get
double Tps Get
double Frametime Get
string Ip Get
string Port Get
string Name Get
string Version Get
bool StreamingAllowed Get
bool IsBeta Get
bool IsIdleModeEnabled Get/Set
Type Function Arguments
string Server:RACommand string command
void Server:LACommand string command
void Server:Restart
void Server:Shutdown
void Server:SendBroadcast string message
float duration
object Server:GetSessionVariable string key
void Server:SetSessionVariable string key
object value

Store

For interacting with persistent storage.

See Persistence Section for more info

Type Function Arguments
Table Store:Load string key
Table defaultValue = {}
void Store:Save string key
Table value

Warhead

For interacting with the warhead.

Type Variable Interaction
float Warhead.DetonationTimer Get/Set
bool Warhead.LeverStatus Get/Set
Type Function Arguments
void Warhead:Start
void Warhead:Stop
void Warhead:Lock
void Warhead:Unlock
void Warhead:Shake
⚠️ **GitHub.com Fallback** ⚠️