decompile
Turns a script's bytecode back into readable source. It accepts a script object or raw bytecode.
Read, run and dump the scripts a game contains.
Turns a script's bytecode back into readable source. It accepts a script object or raw bytecode.
Also available as DecompilerFormatter DecompilerOptions.new DecompilerFormatter.new
Creates settings for the decompiler. The formatter lets you set indent width and column limit.
Also available as getscriptbytecode dump_string get_script_bytecode
Returns a script's compiled bytecode as a string (getscriptbytecode). Raises an error if it cannot be read.
function getscriptbytecode(script: BaseScript | ModuleScript): string | nil
Also available as get_calling_script
Returns the script that called the current function, or nil if it was not a script.
function getcallingscript(): BaseScript | ModuleScript | nil
Also available as getmodules get_loaded_modules
Returns every ModuleScript that has been loaded.
function getloadedmodules(): { ModuleScript }
Also available as get_running_scripts
Returns every script that is running right now.
function getrunningscripts(): { BaseScript | ModuleScript }
Also available as getscriptfunction get_script_closure get_script_function
Compiles a script's bytecode and returns it as a new function, without running the original script.
function getscriptclosure(script: BaseScript | ModuleScript): (...any) -> (...any) | nil
Also available as get_script_from_thread
Returns the script a given thread belongs to, or nil.
function getscriptfromthread(thread: thread): BaseScript | ModuleScript | nil
Also available as get_script_hash
Returns a hash of a script's source, so you can tell when it changes.
function getscripthash(script: BaseScript | ModuleScript): string | nil
Also available as get_scripts
Returns every script and module in the game.
function getscripts(): { BaseScript | ModuleScript }
Also available as get_script_thread
Returns the thread a running script is executing on.
Also available as get_senv
Returns the environment of a running script, which gives access to its local functions and variables.
function getsenv(script: BaseScript | ModuleScript): { [any]: any } | nil