Script

Documentation of script-related Synapse Z environment functions

getscriptbytecode

string getscriptbytecode(target: <Script/function>)

gets roblox luau format bytecode of the specified target

getscriptclosure

function getscriptclosure(script: Script)

loads the script bytecode and returns the main function

getscripthash

string getscripthash(target: <Script/function>)

returns a hash of the bytecode of the specified target

getscriptthread

thread getscriptthread(script: Script)

returns the target script running thread, returns nil if not running

getsenv

table getsenv(script: Script)

returns the target script running thread environment, returns nil if not running

getcallingscript

Script getcallingscript()

returns the current thread caller script, returns nil if none

getthreadscript

Script getthreadscript(thread: thread)

returns the thread script, returns nil if none

decompile

string decompile(target: <Script/function>)

decompiles the specified target

getloadedmodules

table<ModuleScript> getloadedmodules()

returns a list of all loaded (required) modules

getrunningscripts

table<Script> getrunningscripts()

returns a list of all running scripts

disablescript

void disablescript(script: Script)

"disables" the script by setting the bytecode to return nil