Skip to content

Environment Helper Functions

Get Global Environment

<table> getgenv(<void>)  

Returns the environment that will be applied to each script ran by Synapse.

Get Roblox Environment

<table> getrenv(<void>)  

Returns the global Roblox environment for the LocalScript state.

Get Registry

<table> getreg(<void>)  

Returns the Lua registry.

Get Garbage Collection

<table> getgc(<void>)  

Returns a copy of the Lua GC list.

Get Instances

<table> getinstances(<void>)  

Returns a list of all instances within the game.

Get Nil Instances

<table> getnilinstances(<void>)  

Returns a list of all instances parented to nil within the game.

Get Scripts

<table> getscripts(<void>)  

Returns a list of all scripts within the game.

Get Loaded Modules

<table> getloadedmodules(<void>)  

Returns all ModuleScripts loaded in the game.

Get Connections

<table> getconnections(<RBXScriptSignal> obj)  

Gets a list of connections to the specified signal. List of things you can do to a connection below.

Example Description
.Function The function connected to the connection
.State The state of the connection
:Enable Enables the connection
:Disable Disables the connection
:Fire Fires the connection

Example

for i, connection in pairs(getconnections(workspace.ChildAdded)) do
    connection:Disable()
end

Fire Signal

<void> firesignal(<RBXScriptSignal> obj)

Fires all the connections connected to the signal obj.

Fire Click Detector

<void> fireclickdetector(<object> ClickDetector, <number> Distance)

Fires the designated ClickDetector with provided Distance. If Distance isn't provided, it will default to 0.

Fire Touch Interest

<void> firetouchinterest(<object> Part, <object> Transmitter, <number> Toggle)

Fires the designated Transmitter with Part. The Toggle argument is used to tell whether the Part is currently being touched.