
772 Views
1.7k Executions
Hook library emulation
Keyless
Universal Script 📌
1 month ago
Please login to perform these actions:Does it work?
No reports yetNo reports yet. Tried it? Be the first to say.
Also noticed:
Description
This doesn't protect aganist things like stack overflow checks, I don't care. I recommend you use delta, examples are provided in the script
--[[
@author depso (depthso)
@description Hook library emulation, used for having middle hooks
@Examples:
local Old; Old = Emulation:HookFunction(true, MyFunction, function(...)
const Args = {...}
-- Stuff here
return Emulation:Unpack(Args)
end)
local Old; Old = Emulation:HookFunction(true, MyFunction, function(Type, ...)
if Type == "GetItemData" then
return { Amount = 67 }
end
return ...
end)
--// Hooks both __namecall and __index call methods
local Old; Old = Emulation:HookMetaFunc(game.HttpService, "JSONEncode", true, function(IsNameCall: boolean, ...)
return Old(...)
end)
]]
const Module = { -- exposed to gc 🫣
HookedFunctions = {},
UnhookedSpoof = {},
ExeClosureSpoof = {},
MetaHooks = {},
UserHooks = {}
}
--// Protected functions (yes this is messy)
const CloneFunc = clonefunction(clonefunction)
const Hookfunc = clonefunction(hookfunction)
const MakeCFunc = clonefunction(newcclosure)
const IsCClosure = clonefunction(iscclosure)
const Unpack = clonefunction(unpack)
Comments
0Log in to join the conversation. Login
No comments yet. Be the first!





