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.
include_tables
: (Optional) If true, includes tables and userdata in the result.
Returns: A table containing all garbage collector objects.
filtergc(type_name: string, options: table, return_one?: boolean)
Filters garbage collector objects based on specified criteria for functions or tables.
-- Example finding functions with specific constants
local func = filtergc("function", {
Constants = {"Player", "Character"},
IgnoreExecutor = true
}, true)
-- Example finding tables with specific keys
local tables = filtergc("table", {
Keys = {"Health", "Speed"},
Values = {100}
})
Parameters:
type_name
: String, must be either "function" or "table"
options
: Table containing filter criteria
return_one
: (Optional) Boolean, if true returns only the first match
Function Filter Options:
Name
: String - Function name to match
Constants
: Table - Array of constants that must all exist in the function
Upvalues
: Table - Array of upvalues that must all exist in the function
Hash
: String - Specific function hash to match
Environment
: Table - Specific environment table to match
StartLine
: Number - Starting line number to match
IgnoreExecutor
: Boolean - If true (default), ignores Nihon functions
Table Filter Options:
Keys
: Table - Key names that must exist in the table
Values
: Table - Values that must exist in the table
KeyValuePairs
: Table - Specific key-value pairs that must match exactly
Metatable
: Table - Specific metatable to match
Returns:
If return_one
is true
: Returns the first matching object or nil if none found
If return_one
is false
: Returns an array of all matching objects
-- Find a function with specific constants and name
local result = filtergc("function", {
Constants = {"Health", "Damage"},
Name = "calculateDamage"
}, true)
-- Find all tables with specific values and metatable
local results = filtergc("table", {
Values = {100, 200},
Metatable = getrawmetatable(game)
})
-- Find tables with specific key-value pairs
local tables = filtergc("table", {
KeyValuePairs = {
PlayerName = "John",
Score = 100
}
})
getgenv()
Retrieves the global environment of the exploit's Lua state.
Returns: The global environment table.
getrenv()
Retrieves the global environment of the Roblox Lua state.
Returns: The Roblox global environment table.
getscriptbytecode(script: Instance)
dumpstring(script: Instance)
Retrieves the bytecode of a Roblox script.
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.
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.
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.
thread
: A Lua thread (coroutine).
Returns: The environment table of the specified thread.
getscriptfromthread(thread: thread)
Retrieves the Roblox script associated with a thread.
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.
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.
identity
: An integer representing the desired security context level.
Returns: The previous security context level.
getallthreads()
Retrieves all Lua threads in the current state.
Returns: A table containing all Lua threads.
getsenv(script: Instance)
Retrieves the environment of a running Roblox script.
script
: A Script, LocalScript, or ModuleScript instance.
Returns: The environment table of the specified script if it's running, otherwise throws an error.
decompile(script: Instance)
Decompiles and returns readable Lua output from a LocalScript or ModuleScript
script
: A Script, LocalScript, or ModuleScript instance.
Returns: The script in a readable, decompiled output.