Universal Script 📌
772 Views
1.7k Executions

Script Verified Hook library emulation

Keyless
Universal Script 📌
depso
depso
Verified Badge
Verified User
100 followers
1 month 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
Script hub
5.5M
1.0M
Bumped 3 hours ago
Key System
Script hub
150.3k
462.4k
Bumped 4 hours ago
Key System

Script hub

Hall of Fame #6

Verified script badgeAcro Hub | Easy Key System

Script hub
3.2k
3.7k
Bumped 5 hours ago
Key System
Universal Script 📌
718
699
Bumped 5 hours ago
Script hub
21.5k
77.0k
Bumped 7 hours ago
Key System