Skip to content

Scripts

These functions provide advanced capabilities for interacting with the environment.

getgc([include_tables: boolean])

Retrieves a table of all Lua objects in the garbage collector.

local gc_objects = getgc(true)  -- Include tables
  • include_tables: (Optional) If true, includes tables and userdata in the result.

Returns: A table containing all garbage collector objects.

getgenv()

Retrieves the global environment of the exploit's Lua state.

local env = getgenv()

Returns: The global environment table.

getrenv()

Retrieves the global environment of the Roblox Lua state.

local renv = getrenv()

Returns: The Roblox global environment table.

getscriptbytecode(script: Instance)

dumpstring(script: Instance)

Retrieves the bytecode of a Roblox script.

local bytecode = getscriptbytecode(game.Players.LocalPlayer.PlayerScripts.PlayerModule)
  • script: A Roblox Script, LocalScript, or ModuleScript instance.

Returns: The script's bytecode as a string, or an error message if not available.

getscriptclosure(script: Instance)

getscriptfunction(script: Instance)

Retrieves the closure (function) of a Roblox script.

local closure = getscriptclosure(game.Players.LocalPlayer.PlayerScripts.PlayerModule)
  • script: A Roblox Script, LocalScript, or ModuleScript instance.

Returns: The script's closure as a function, or nil if not available.

getscripthash(script: Instance)

Generates a hash of the script's bytecode.

local hash = getscripthash(game.Players.LocalPlayer.PlayerScripts.PlayerModule)
  • script: A Roblox Script, LocalScript, or ModuleScript instance.

Returns: A SHA-384 hash of the script's bytecode, or nil if not available.

gettenv(thread: thread)

Retrieves the environment of a specified thread.

local env = gettenv(coroutine.create(function() end))
  • thread: A Lua thread (coroutine).

Returns: The environment table of the specified thread.

getscriptfromthread(thread: thread)

Retrieves the Roblox script associated with a thread.

local script = getscriptfromthread(coroutine.create(function() end))
  • thread: A Lua thread (coroutine).

Returns: The Roblox Script instance associated with the thread, or nil if not found.

getthreadidentity()

getidentity()

getthreadcontext()

Gets the current thread's security context level.

local identity = getthreadidentity()

Returns: An integer representing the current thread's security context level.

setthreadidentity(identity: number)

setidentity(identity: number)

setthreadcontext(identity: number)

Sets the current thread's security context level.

local old_identity = setthreadidentity(7)
  • identity: An integer representing the desired security context level.

Returns: The previous security context level.

getallthreads()

Retrieves all Lua threads in the current state.

local threads = getallthreads()

Returns: A table containing all Lua threads.

getsenv(script: Instance)

Retrieves the environment of a running Roblox script.

local env = getsenv(game.Players.LocalPlayer.PlayerScripts.PlayerModule)
  • script: A Script, LocalScript, or ModuleScript instance.

Returns: The environment table of the specified script if it's running, otherwise throws an error.