Created by OreZAKung
Features:
getgenv().hookconnection = getgenv().hookconnection or {}
getgenv()._getconnections = getgenv()._getconnections or getconnections
getgenv().getconnections = function(signal)
local dat = _getconnections(signal)
for i=#dat,1,-1 do
local v = dat[i]
if table.find(hookconnection,dat[i]) then
table.remove(dat,i)
end
end
return dat
- <function> hookconn(<ScriptSignal> obj, <number> index, <function> hook)
- example
function test()end;function test2()end
workspace.ChildAdded:Connect(test)
workspace.ChildAdded:Connect(test2) -- hooking this
local old
old = hookconn(workspace.ChildAdded,2,function(child)
if child.Name == "A" then
return old(Instance.new"Part")
end
return old(child)
end)
ENJOY!