EnvironmentOverview
decompile
Represents recovery of source-like script text.
Details#
Requests a source-like representation of a script. Decompilation does not recover original comments or formatting, and unsupported or unavailable bytecode can fail. The input is a script object, not a source string.
Examples#
Example
local ownScript = Instance.new("LocalScript")
local ok, text = pcall(decompile, ownScript)
print(ok, text) -- a new script may have no bytecode
ownScript:Destroy()