Review my awesome anticheat code please

Hello, developers!

Recently, I posted an amazing anticheat I made. Sadly, it got closed and unlisted :sob:. 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)
29 Likes

Thank you so much for this piece of work, I can now rest knowing that cheaters are away from my game.

NoCheat Xtreme ON TOP!

9 Likes

I love your work.

I am going to use this in my games.
This is clearly the future of anticheats.

11 Likes

I’m so sorry about the last post getting taken down.

I’m so inspired by you because you’ve still persisted thru the take down of your previous (and very amazing post).

Thus, I assume that you’re losing motivation. But don’t! This is a very helpful resource.

I don’t want to point hands at who could’ve caused this but… :point_right:-> (“WHYI_M” is jealous of this masterpiece)

TOP SECRET

no more secret :sweat:

edit: this is sarcasm

10 Likes

bro got jealous that this anticheat is 1000% better

8 Likes

Yessss bro, been looking for something like this for time. The amount of games I’ve made that have had cheaters and stuff on… But Ik it says review it so I will I give it a 10/10. Gonna use this sweet system in my raise a special baby simulator!! appreciate you bro

8 Likes

How can I become a contributor?

I’d like to contribute to a debug.getinfo protocolonization that detects Scriptware???

Plz help
Ty

7 Likes

PM me on devforum and we can get it done!

7 Likes

I feel like that last bit was a little… out of pocket

8 Likes

Quite possibly, but I’m a man of culture and would like Disabilities like these to be seen to the world and to show people who end up raising one, that’s it’s not so bad and how everyone is very unique in their on way!

8 Likes

AND

Truly gamebreaking… not like you could just use “game”. That would take too much effort!!

edit: THIS IS SARCASM

7 Likes

You didn’t needa call us the r word tho…

7 Likes

That’s the most inspirational words I’ve even seen. I’m about to cry :sob:

8 Likes

I have my own unique scripting style, and I believe its the most comfortable one. Thanks for pointing it out to the entire world :smile:

8 Likes

My apologies straight from the heart, it completely flew over my head that the word was offensive (I’m not the smartest person) HENCE why I’m using this anticheat in all games

8 Likes

This is the best anticheat i have ever seen on rooblox :pray: I have never seen anyting liek this it detcted me speed walking!!! I hope that this anti cheet go very far :fire:

8 Likes

It’s peak variable naming and security!

8 Likes

very good job. it is sad the moderation is very harsh to the devs . instead of being nice and explaining to the devs how they can fix their post , they take it down .

4 Likes

I like how you used peepee and poopoo for the code

also it got taken down cuz of WHYI_MFAT

2 Likes

I’ve literally been looking for a way to convert my numbers into strings for 2 years, thank you!

1 Like