Anti Cheat for Beginner Developers

Hello Devs! I wanted to share the product that I made for beginner devs or people that don’t know how to script?! I made an anti-exploit / anti-cheat, that will help new games such as newly released games I believe, this will have good use. It will detect paranormal actions in-game, commands like admin used by a non-admin/player.

Link: Anti-Cheat V2 - Roblox

11 Likes

The anti-cheat appears to only run for players that are on the banlist, which doesn’t make sense. The WalkSpeed and JumpPower checks don’t do anything because client property changes don’t replicate to the server, and people who aren’t admin can’t use admin commands anyway.

4 Likes

No, It doesn’t run on people that are on banlsit :laughing: I think you got It wrong, It has also another function of banning people that are on the list!

They can use it, If they attach a script that gives them same privileges as Admin?

I just realised that none of those player.Name checks work anyway. You’re using “and”, which means the player’s name would have to be all of those strings at once which isn’t possible unless all of the checks are the same. edit nevermind, i misread ~= and ==
It’d be better if it used a table of UserIds and table.find(), but I’m not even sure what the purpose of the checks are.

1 Like

The purpose of it is to ban exploiters that are popular and people that are malicious for our project.

But the script doesn’t do any banning? Are you trying to target specific exploiters?

1 Like

No no no, as I explained the script works for everyone but, I also made separate line for banning people specific user that decides to use my creature, they will be able to put someone on perm ban list, also this isn’t done I am still working on it.

The script will ban every other person than exploiters (it just doesn’t work!).
Also you should add a ban table so it looks and works better. Here’s my script:

--Made by Jermartynojm for hrxin.
local BannedPeople = {} --Add user id's here. Example: 1, 479838273.

game:GetService("Players").PlayerAdded:Connect(function(player)
    if table.find(BannedPeople, player.UserId) then
        player:Kick("You are banned.")
    end
end)

You can update your current script but give credit to me like on the script above.

1 Like

You need to test your scripts before releasing them so people don’t put this in and their entire server gets banned! :sweat_smile:

2 Likes

ugh- you could just use this:

local BannedPeople = {}

local checkBanned = function(p)
   for _,banned in next,BannedPeople do
      if banned == p.Name and type(banned) == "string" then
         return true
      elseif banned == p.UserId and type(banned) == "number" then
         return true
      end
   end
   return false
end

game.Players.PlayerAdded:Connect(function(p)
    if checkBanned(p) then
        p:Kick("Banned.")
    end
end)

Scripting is a category where we make things the shortest as possible. We don’t need to add usernames and id’s where we can just use id’s!

3 Likes

Okay, just wanted to help. :roll_eyes:

Yes, your example is great :grinning_face_with_smiling_eyes:! But mind that I can change my username and the script won’t ban me. That’s why I use user id’s.

5 Likes

That’s why I added the UserId.

1 Like

This wouldn’t ban anyone. And if someone with admin speeds themselves over 50 they would be banned, but people with exploits who speed themselves wouldn’t be banned at all. Same with the jump. I know having an anti exploit on the client could just be deleted but it would be way more efficient than this.

Not necessarily.

In many cases it’s better to have meaningful variable names, take the time to step through functions, make sure your logic is clear, etc.

Short does not always equate to efficiency.

Of course you are right. But in this case we don’t need names, just user id’s. Also ban system with names is not going to work when somebody changes their name.

1 Like

The Player Walkspeed and Jumpower values doesn’t replicate to the server

So even if you change the values on the client they will stay the same on the server

This anticheat will not work. It is a server script, but exploits change their walkspeed/jumppower on the client but not the server meaning that it will not work.
Its also extremely inefficient and will begin causing memory leaks after a player dies, eventually causing server lag.