cloneclosure
The same function as clonefunction, under another name. The copy runs the original's code with its own identity, so hooking or restoring one does not change the other.
Syntax
cloneclosure(target: function) -> function
Parameters
| Parameter | Type | Description |
|---|---|---|
target | function | The function to copy. |
Returns
| Type | Description |
|---|---|
function | A copy that behaves like the original. |
Example
local copy = cloneclosure(print)
print(copy == print)
These are Game executor contracts. Check build requirements and session lifetimes before using them.
