Hookfunction dumper
Key RequiredUniversal

Hookfunction dumper

Universal ScriptUnnesscaryInventionsUnnesscaryInventions 5.9K views 17 executesUpdated Jun 28, 2025
5.0/ 5(3 votes)
30100% Positive
Lua Script•12 lines (1541 chars)
local a={}local b={}local c=0;local d,e=clonefunction(hookfunction),clonefunction(newcclosure)local f=function(g)for h,i in pairs(getmetatable(getfenv()))do for h,i in pairs(i)do if i==g then return h end end end end;local function j(k)if k==nil then k=1 end;local l={}for h=1,k do table.insert(l,"arg"..h)end;return table.concat(l,", ")end;a.newcclosure=clonefunction(newcclosure)local m;m=d(newcclosure,e(function(g)b[tostring(c)]=g;return m(g)end))a.hookfunction=clonefunction(hookfunction)local n;n=d(hookfunction,e(function(o,p)local q="hf"..tostring(c)local r=f(o)or"unknown_function"local s=iscclosure(p)local t=debug.getinfo(p)or{}local u="nil"local v=tonumber(t.nparams or t.numparams or 1)local l=j(v)if s==false then local w={}for h,i in ipairs(debug.getconstants(p))do table.insert(w,string.format("-- C_%d = %s",h,typeof(i)=="string"and string.format("%q",i)or tostring(i)))end;u=string.format([[function(%s)
      -- Constants :
      %s
      return %s(...)
    end]],l,table.concat(w,"\n      "),q)end;if s==true then local l=j(tonumber(debug.getinfo(b[tostring(c)]).numparams))local x={}for h,i in ipairs(debug.getconstants(b[tostring(c)]))do table.insert(x,string.format("-- C_%d = %s",h,typeof(i)=="string"and string.format("%q",i)or tostring(i)))end;u=string.format([[newcclosure(function(%s)
      -- Constants :
      %s
      return %s(%s)
    end)]],l,table.concat(x,"\n      "),q,l)end;print(string.format([[
    -- Dumped hookfunction
    local %s; %s = hookfunction(%s, %s)
    ]],q,q,r,u))c=c+1;return n(o,p)end))

Features & Information

Hookfunctions hookfunction to recreate the orginal hookfunction basically if you do hookfunction(request, newcclosure(function(lol) return "skibidi" end)) it will print local hf1; hf1 = hookfunction(request, newcclosure(function(arg1) -- Constants : -- C_1_ = "skibidi" return hf1(arg1) end))
#spy

Community Comments (4)

v1nnzv1nnzJun 28, 2025

omg I no understand I'm just too dumb

zxcvzxcvJun 28, 2025

hook function cool, id choose dex explorer to dump

itsradbruhitsradbruhJun 28, 2025

uh so u hook what u already hooked?

no

More Scripts for Universal Scripts