Skip to content
IonizeDocsionize.cc ↗

API Reference

Closure Library

Inspecting, wrapping, and replacing Luau functions.

7 members

hookfunction<T>(target: T, hook: function): T

Replaces a function and returns the original.

restorefunction(target: function): ()

Restores a function that was previously hooked.

newcclosure<T>(fn: T): T

Wraps a Luau function so it presents as a C closure.

iscclosure(fn: function): boolean

Returns whether the function is a C closure.

islclosure(fn: function): boolean

Returns whether the function is a Luau closure.

isexecutorclosure(fn: function): boolean

Returns whether the function originated from the executor.

getfunctionhash(fn: function): string

Returns a hash of the function bytecode.