Atomic docs

getscriptbytecode

getscriptbytecode(script: LuaSourceContainer): string?

The compiled bytecode of a LocalScript, ModuleScript or Script. The container offset is rediscovered and cached when Roblox moves it, so the first call after an update costs a scan and every call after is direct. Byte zero is rewritten to the bytecode version the local Luau expects, so the result loads rather than being rejected. Aliased as dumpstring.

Example

lua
local bc = getscriptbytecode(script)
print(#bc)
↑