VINDICTA.TOP
Closures · Function
Bunni.fun
ChocoSploit
Cryptic
Potassium
Seliware
SirHurt
Solara
Velocity
Volcano
Volt
Wave
Xeno

clonefunction

Creates a deep copy of a Luau function with shared upvalues.

function clonefunction(funcfuncfunctionThe Luau function to clone.: function): functionfunctionA new function object pointing to the same Luau proto as the original.

Usage

Clone before hooking
local original = clonefunction(print)
hookfunction(print, function(...)
	original("[Hooked]", ...)
end)