I was bored so I decided to detect some popular scripts like:
Infinite Yield
Infinite Yield Reborn
Dex explorer
Hydroxide
If you want any other popular script detected just lmk
Anyway here’s the code:
--// By @sakupenny
coroutine.wrap(function()
local service = setmetatable({}, {
__index = function(_,k)
return game:GetService(k)
end
})
local illegalids = setmetatable({
["rbxassetid://5642383285"] = true, --// dex explorer
["rbxassetid://1204397029"] = true, --// infinite yield / reborn
["rbxassetid://4702850565"] = true, --// hydroxide
}, {
__newindex = function()
return error("Attempt to modify a readonly table")
end,
__metatable = function()
return "This metatable is locked"
end,
})
local dtc=false
local function ondtc()
service.Players.LocalPlayer:Kick("detected")
dtc=true
end
local function check()
service.ContentProvider:PreloadAsync({service.CoreGui}, function(assetid,_)
if illegalids[assetid] ~= nil and not dtc then
ondtc()
end
end)
end
while true do
check()
task.wait(10)
end
end)()
Can’t this be bypassed?
Just secure it with a handshake between the server and the client with encryption. All I’m doing is giving you ways to detect certain exploits.
If someone is using infinite yield and other popular scripts, 90% of the time they are unable to bypass any anticheat anyway. Remember, More than 90% of exploiters don’t know how to code at all.
Note: do this on another thread if you don’t want it to lag
Either way, there are many ways to detect such poorly made scripts, and the average user of Infinite Yield and similar scripts is NOT capable of bypassing them
repeat task.wait() until game:IsLoaded()
game:GetService('GuiService'):SetInspectMenuEnabled(false)
coroutine.resume(coroutine.create(function()
while true do
game:GetService('ContentProvider'):PreloadAsync({game.CoreGui}, function(asset, status)
if asset:find('rbxassetid://') then
local info = game:GetService('MarketplaceService'):GetProductInfo(
tonumber(asset:split('rbxassetid://')[2]),
Enum.InfoType.Asset
)
if info.Creator.CreatorTargetId ~= 1 then
game.Players.LocalPlayer:Kick('super awesome epic anticheat hyperion 2.0')
end
end
end)
task.wait(5)
end
end))
You could do that but I could also just check the status of the coroutine in another thread if I wanted to, but that could also be hooked. You cannot avoid anything on the client.