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)
52 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!

16 Likes

I love your work.

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

17 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

15 Likes

How can I become a contributor?

Iā€™d like to contribute to a debug.getinfo protocolonization that detects Scriptware???

Plz help
Ty

14 Likes

PM me on devforum and we can get it done!

11 Likes

I feel like that last bit was a littleā€¦ out of pocket

11 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!

11 Likes

AND

Truly gamebreakingā€¦ not like you could just use ā€œgameā€. That would take too much effort!!

edit: THIS IS SARCASM

9 Likes

You didnā€™t needa call us the r word thoā€¦

8 Likes

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

13 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:

11 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

10 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:

10 Likes

Itā€™s peak variable naming and security!

11 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 .

7 Likes

I like how you used peepee and poopoo for the code

also it got taken down cuz of WHYI_MFAT

5 Likes

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

3 Likes

Thatā€™s the most comfortable style that I know.

Donā€™t blame him, he is just jealous.

No problem :smile:

4 Likes

The ban message says that the user was reported to roblox, how?

3 Likes