Script
Script discovery, bytecode, decompiling and execution checks.
Returns loaded ModuleScripts.
for _, module in ipairs(getloadedmodules()) do
print(module)
end
Returns scripts with running threads.
for _, script in ipairs(getrunningscripts()) do
print(script)
end
Returns all known script instances.
for _, script in ipairs(getscripts()) do
print(script)
end
Returns the Lua thread associated with a script.
local script = getscripts()[1]
print(getscriptthread(script))
Returns the script that owns a Lua thread.
local script = getscripts()[1]
print(getscriptfromthread(getscriptthread(script)))
Compiles a script and returns it as a function. getscriptfunction is an alias.
local script = getscripts()[1]
print(getscriptclosure(script), getscriptfunction(script))
Returns raw script bytecode. dumpstring is an alias.
local script = getscripts()[1]
print(#getscriptbytecode(script), #dumpstring(script))
Returns a stable hash of the script bytecode.
print(getscripthash(getscripts()[1]))
Decompiles a script through the local decompiler.
print(decompile(getscripts()[1]):sub(1, 100))
Walks the GC heap and returns tables that directly reference the value.
local box = { holder = { {} } }
print(#getobjectreferences(box.holder[1]) > 0)
Walks the GC heap and returns tables that directly reference the function.
local box = { holder = { function() end } }
print(#getfunctionreferences(box.holder[1]) > 0)
Returns whether a script belongs to Roblox core scripts (CoreGui/CorePackages).
print(iscorescript(workspace:FindFirstChildWhichIsA("Script", true)))