Help with creating anti-cheat

im trying to make an anti-cheat for my game but what i really need help with is to check if there is a part and if its deleted it will kick the player(local side works to)

3 Likes

what kind of game are you making?

4 Likes

its complected to explain and i just started but i want to finish the anti-cheat at the start

4 Likes

you don’t need an anticheat unless an exploiter can ruin the game for others and its hard to make an anticheat without the game being complete because there isnt anything to really detect

3 Likes

no like i want to detect if he removed an importend script or part and if the anti-cheat see that there is no longer the part it will kick him

3 Likes

and i want it to be in the serverscriptservice so the exploiters cant delete the script

2 Likes

I dont think this is possible, i mean how would the script know if it was a dev or hacker and how would it even know WHO to kick?

Hm you could make a handshake to make sure that the hacker isn’t tampering with a script. The downside is that an innocent player could lag and it wouldn’t trigger and result in falsely kicking them

I would do it this way:

local part = workspace.specialPart --specialPart is the name of the part you want to monitor

local Players = game:GetService("Players")

game:GetService('RunService').Heartbeat:connect(function()
  if workspace:FindFirstChild("specialPart") == nil then
      local PlayerToKick = Players.LocalPlayer
      PlayerToKick:Kick("You're kicked for cheating!")
  end
end)

But the hacker probably removes it on server so it would be detected for everyone and everyone is kicked then

1 Like

An exploiter could just disconnect that connections and delete it

1 Like

and i want it to bein server script service but what AndroidSuperShow showed is not working if you put it in serverscriptservice