Universal Script 📌
822 Views
2.1k Executions

Script Verified Hook library emulation

Keyless
Universal Script 📌
depso
depso
Verified Badge
Verified User
100 followers
2 months ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No 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

View Raw
--[[
	@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

0
Log in to join the conversation. Login
No comments yet. Be the first!

Tags

More universal scripts

See all
Universal Script 📌
2.2k
24.3k
Bumped 26 minutes ago
Script hub
17
0
Approved 26 minutes ago
Universal Script 📌
1.4M
696.9k
Bumped 44 minutes ago
Universal Script 📌
29
7
Approved 44 minutes ago