Last active
March 5, 2026 14:16
-
-
Save depthso/cd1d687982265ca1ee3bf9b3980b998a to your computer and use it in GitHub Desktop.
(⚠️ PATCHED BY ROBLOX)! Detect hooking such as hookmetamethod. You could also detect the executor's env with a __tostring metatable through a bindable event but some like Zenith have patched this.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- ⚠️ PATCHED BY ROBLOX | |
| local StackCount = 0 | |
| local function Overflow() | |
| StackCount += 1 | |
| if StackCount > 195 then | |
| game:GetService("Workspace") | |
| end | |
| --// Recursively until it errors | |
| coroutine.wrap(Overflow)() | |
| end | |
| local function CountMatches(String: string, Match: string): number | |
| local Count = 0 | |
| for _ in String:gmatch(Match) do | |
| Count += 1 | |
| end | |
| return Count | |
| end | |
| while wait(1) do | |
| local _, Error = pcall(Overflow) | |
| local Count = StackCount | |
| local Matches = CountMatches(Error, script:GetFullName()) | |
| StackCount = 0 | |
| --// Mismatch detection | |
| if Count ~= Matches then | |
| warn("Hooks detected thx") | |
| break | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment