API Reference
Closure Library
Inspecting, wrapping, and replacing Luau functions.
hookfunction<T>(target: T, hook: function): TReplaces a function and returns the original.
restorefunction(target: function): ()Restores a function that was previously hooked.
newcclosure<T>(fn: T): TWraps a Luau function so it presents as a C closure.
iscclosure(fn: function): booleanReturns whether the function is a C closure.
islclosure(fn: function): booleanReturns whether the function is a Luau closure.
isexecutorclosure(fn: function): booleanReturns whether the function originated from the executor.
getfunctionhash(fn: function): stringReturns a hash of the function bytecode.