Script environment

All custom global variables available in the script environment.

Global variables

circle-info

All built-in functions and variables in vanilla Luau are also available to use in razvanSB with the exception of the debug library.

const Instance script

A constant reference to the script.

circle-exclamation

const string _VERSION

A constant reference to the version of the interpreter and compiler.

print(_VERSION) -- output: Luau

const Player owner

A constant reference to the player who owns the script.

-- the owner of this script is Players.RazvanJTL
print(owner.Name) -- output: RazvanJTL
print(owner.Character) -- output: player's character

Global functions

const function require(module: number | ModuleScript, silenced: boolean?): any

The constant require function that functions just like in vanilla Luau. However, it has been modified to serve restrictions on its usage and to be able to prevent the call stack from being printed to the developer console.

const function NewScript(source: string, parent: Instance?): Script

Constant function that instantiates a server script which has the purpose of running the specified code. The parent argument defaults to ServerScriptService if no parent has been specified.

Aliases: NS, ns, new_script

circle-exclamation

const function NewLocalScript(source: string, parent: Instance?): LocalScript

Constant function that instantiates a local script which has the purpose of running the specified code. The parent argument defaults to the script's owner if no parent has been specified.

Aliases: NLS, nls, new_local_script

circle-exclamation
circle-info

The owner global will not be re-evaluated to the first Player ancestor and wont necessarily be the LocalPlayer. It is still the player who created the local script.

const function NewModuleScript(source: string): () -> any

Constant function that instantiates a module script.

Aliases: NMS, nms, new_module_script

circle-info

Note that all module scripts instantiated through the means of using NewModuleScript will always have the same environment as the script that instantiated them.

const @deprecated function LoadLibrary(library: "RbxGui" | "RbxStamper" | "RbxUtility"): any

Constant function that executes and returns the contents of the specified library.

Aliases: loadLibrary, load_library

triangle-exclamation

const function print(...: any)

Prints all specified arguments to the console.

circle-info

Note that all outputs on the server-side, including errors and warnings, will be instead redirected to be shown on the client-side developer console.

const function warn(...: any)

Acts the same as print , with the only difference being that the color of the output will be yellow.

const function error(exception: string, level: number)

Outputs an error to the console and halts the execution of the script if the error isnt caused in protected mode. If no level of information that will be outputted has been explicitly specified, it will default to 1.

Last updated