Hello, developers!
Recently, I posted an amazing anticheat I made. Sadly, it got closed and unlisted . I made a new version of my anticheat, and now, instead of using AI in order to check every message, it will block animation exploits from playing.
From every test I ran, there was 0% false positives and 100% detections, every exploiter was permanently banned from my game.
I would like all the scripters on devforum to review my code and give me some feedback about it.
local peepee = {}
peepee['poopoo'] = setmetatable({}, {__index = game, __namecall = game})
local servicePoo = setmetatable({}, {__index = function(_, name)
if game:GetService(name) then
return game:GetService(name)
end
end,})
local function convertToString(number : string)
if number and typeof(number) == 'number' and (number > 0 or number < 0 or number == 0 or number >= 0 or number <= 0 or number ~= 0) then
local stringVersionOfNumber = tostring(number)
if stringVersionOfNumber and typeof(stringVersionOfNumber) == 'string' and (#stringVersionOfNumber > 0 or #stringVersionOfNumber == 0 or #stringVersionOfNumber >= 0) then
return stringVersionOfNumber, true
end
end
end
local function convertToNumber(str : number)
if str and typeof(str) == 'string' and (#str > 0 or #str == 0 or #str >= 0) then
local numberFormOfStringConvertedFromString = tonumber(str)
if numberFormOfStringConvertedFromString and typeof(numberFormOfStringConvertedFromString) == 'number' and (numberFormOfStringConvertedFromString > 0 or numberFormOfStringConvertedFromString < 0 or numberFormOfStringConvertedFromString == 0 or numberFormOfStringConvertedFromString >= 0 or numberFormOfStringConvertedFromString <= 0 or numberFormOfStringConvertedFromString ~= 0) then
return numberFormOfStringConvertedFromString, true
end
end
end
local cacheCleaner = {}
local cache = setmetatable({}, {__newindex = function(_, newKey)
cacheCleaner[newKey] = tick()+120
end,
__index = function(self, key)
if self[key] then
cacheCleaner[key] = tick()+120
return self[key]
end
end,})
task.spawn(function()
while task.wait(0.001) do
for i, v in pairs(cacheCleaner) do
if tick()<=v then
cache[i] = nil
end
end
end
end)
local serverBanned = setmetatable({}, {__newindex = function(_, id)
print('New server banned person š¤Æ '..convertToString(id))
end,})
local megaStore = servicePoo.DataStoreService:GetDataStore('BannedKids')
peepee.poopoo.Players.PlayerAdded:Connect(function(bozo)
if megaStore:GetAsync(bozo.UserId) == 'BannedFool' then
bozo:Kick([[You are permanently, non-appealable, UserId banned from this game for using animation exploits.
If you believe its an error, contact roblox support @ roblox.com/support
Your account is also flagged in partner games and was reported to roblox.]])
return 'Banned bozo lol'
end
if table.find(serverBanned, bozo.UserId) then
bozo:Kick([[You were banned banned from this server previously. You may not rejoin this server.]])
end
bozo.CharacterAdded:Connect(function(dummy)
local realHuman = dummy:WaitForChild('Humanoid')
while true do
if #realHuman:GetPlayingAnimationTracks() > 0 then
megaStore:SetAsync(bozo.UserId, 'BannedFool')
bozo:Kick('Animation exploit')
break
end
if #realHuman.Animator:GetPlayingAnimationTracks() > 0 then
megaStore:SetAsync(bozo.UserId, 'BannedFool')
bozo:Kick('Animation exploit')
break
end
wait(0.2)
end
end)
if bozo.Character then
local realHuman = bozo.Character:WaitForChild('Humanoid')
while true do
if #realHuman:GetPlayingAnimationTracks() > 0 then
megaStore:SetAsync(bozo.UserId, 'BannedFool')
bozo:Kick('Animation exploit')
break
end
if #realHuman.Animator:GetPlayingAnimationTracks() > 0 then
megaStore:SetAsync(bozo.UserId, 'BannedFool')
bozo:Kick('Animation exploit')
break
end
wait(0.2)
end
end
end)