syn
Documentation of Synapse Z syn library
syn.killprocess
void syn.killprocess(exit_code: number?)
kills roblox process with optional exit code
syn.trampoline_call
void syn.trampoline_call(target: function, callstack: table, options: table)
calls the target function on a new thread with the specified callstack and options, callstack is a list of tables with fields:
Field | Type | Description |
---|---|---|
func | function | if specified would overwrite all other options (excluding currentline) |
source | string | chunkname of the function |
name | string | name of the function |
numparams | number | number of function parameters |
is_vararg | number | is function variadic |
nups | number | number of function upvalues |
env | table | function environment |
currentline | number | current line the function is being executed on |
options is a table with the following fields:
Field | Type | Description |
---|---|---|
thread | thread | the thread to create a new thread from |
script | Script | the script that the new thread will be assigned |
env | table | environment of the new thread |
identity | number | identity of the new thread |
NOTE: trampoline_call cannot yield when callstack is provided
syn.protect_gui
void syn.protect_gui(gui: ScreenGui)
would automatically reparent the gui to gethui() when Parent is assigned
syn.unprotect_gui
void syn.unprotect_gui(gui: ScreenGui)
removes the gui protection
syn.get_auroraservice
AuroraService syn.get_auroraservice()
returns AuroraService, mostly a joke function
syn.sandbox
thread syn.sandbox(target: <Script/function>, callback: function)
runs target on a new sandboxed thread which calls callback on each luau instruction execution
syn.sandbox(function()
warn("evil world")
error()
end, function(pc, op, A, B, C, D, E)
if pc == 2 then
debug.setstack(2, 1, print) -- replace warn function with print
elseif pc == 3 then
debug.setstack(2, 2, "hello world") -- replace "evil world" with "hello world"
elseif pc == 6 then
return true -- skip error call
end
end)
syn.spoof_memory_begin
void syn.spoof_memory_begin()
creates a copy of current memory usage and backups it when syn.spoof_memory_end is called
syn.spoof_memory_end
void syn.spoof_memory_end()
backups memory usage counter since syn.spoof_memory_begin call
syn.get_instance_count
void syn.get_instance_count()
equal to stats().InstanceCount
syn.set_instance_count
void syn.set_instance_count(count: number)
sets stats().InstanceCount to the specified count