Hello developers.
I am working on an anti-cheat system, but I found a critical bug in my system that I don’t have any clue on how to fix.
I have three main file structures to my anti-cheat:
ReplicatedStorage.ACEvents - Houses all the events to my anti-cheat (client and server both)
ServerScriptService.AntiCheat - The main code to my system.
StarterCharacterScripts - Several scripts that don’t have an effect on the system, just simple independent processes, except for one, AC_Client.
AC_Client manages all of the client-side stuff for the anti-cheat, including making sure that all the scripts are present on the client side. Since they are client scripts, the client can delete them and the sever (AnticheatMaster) sees they are still there, even though they are not.
Ensurer communicates to AC_Client via the CheckScriptPresence RemoteFunction in ACEvents to make sure the scripts are present on the client side.
while true do
wait(5)
for _, Player in pairs(game.Players:GetPlayers()) do
local Character = workspace:FindFirstChild(Player.Name)
local PresentScripts = ReplicatedStorage.ACEvents.CheckScriptPresence:InvokeClient(Player)
local MissingScripts = 0
if Character then
local Scripts = script:GetChildren()
for _, Script in pairs(Scripts) do
local ScriptName = Script.Name
if not table.find(PresentScripts, ScriptName) then
local ScriptClone = Script:Clone()
ScriptClone.Parent = Character
ScriptClone.Enabled = true
MissingScripts += 1
end
end
end
end
end
If the client is to delete AC_Client during one of the 5 second waiting periods, the script fails and the Anti-Cheat system is no longer running, leaving this error message behind:
I know I could simply wrap it in a pcall() and call it a day, but I want my system to be fully functional. Is there any way I can fix this?
Side note: I know Byfron exists, but it hardly does its job, I still see exploiters all the time.
Thank you in advance,
Anticitizen One