getscriptbytecode(script: Instance) → string
Raw compiled Luau bytecode for a Script/LocalScript/ModuleScript.
aliasesdumpstring
lua
local bc = getscriptbytecode(game.Players.LocalPlayer.PlayerScripts.MyScript) writefile("MyScript.luac", bc)
getscripthash(script: Instance) → string?
SHA of the script's bytecode.
nil for scripts whose bytecode isn't accessible.
lua
print(getscripthash(workspace.Script))
getscriptclosure(script: Instance) → function
Compile and return the script's top-level closure without running it.
aliasesgetscriptfunction
lua
local f = getscriptclosure(game.ReplicatedStorage.Module) local module = f()
getcallingscript() → Instance?
The script that spawned the currently-running thread.
lua
print(getcallingscript() and getcallingscript():GetFullName())
getscripts() → {Instance}
All Scripts, LocalScripts, and ModuleScripts in the DataModel.
lua
for _, s in ipairs(getscripts()) do if s.Name:match("Anticheat") then print(s:GetFullName()) end end
getloadedmodules() → {Instance}
Only ModuleScripts that have been
require()d.
lua
print(#getloadedmodules(), "modules loaded")
getrunningscripts() → {Instance}
Scripts whose top-level thread is still alive.
lua
for _, s in ipairs(getrunningscripts()) do print(s.Name) end
getsenv(script: Instance) → table
The environment table of a Script/LocalScript.
lua
local env = getsenv(game.Players.LocalPlayer.PlayerScripts.Main) print(env.myLocal)
getmenv(module: ModuleScript) → table
The environment table of a
require()d ModuleScript.
lua
local menv = getmenv(game.ReplicatedStorage.SharedModule) print(menv._VERSION)
decompile(script: Instance) → string
Best-effort decompilation of a script's bytecode.
lua
print(decompile(workspace.Script))
setscriptable(instance: Instance, property: string, scriptable: boolean) → boolean
Flip a property's Scriptable flag in-memory. Returns the previous value.
lua
setscriptable(workspace.Camera, "Focus", true) print(workspace.Camera.Focus)
isscriptable(instance: Instance, property: string) → boolean
Whether a property is currently marked Scriptable.
lua
print(isscriptable(workspace.Camera, "Focus"))
gethiddenproperty(instance: Instance, property: string) → any, boolean
Read a property regardless of Scriptable flag. Returns
(value, isHidden).
lua
local val, hidden = gethiddenproperty(workspace.Terrain, "PhysicsGrid") print(hidden, #val)
sethiddenproperty(instance: Instance, property: string, value: any) → boolean
Write a property regardless of Scriptable flag. Handles complex types (CFrame, ColorSequence, BinaryString, Enum, Content, etc.).
lua
sethiddenproperty(workspace.Part, "size", Vector3.new(10, 10, 10))