getscriptclosure
getscriptclosure(script: LuaSourceContainer): function?
A new closure built from the script's bytecode, without running it. The closure gets its own sandboxed thread with script set, so constants and protos can be read without touching the original. Aliased as getscriptfunction.
Example
local f = getscriptclosure(mod)
print(getconstants(f))