Possible Anti Exploit(?)

Hey,

I am currently working on a game with a VIP room, however I don’t want people to be able to glitch, noclip, teleport, etc. inside of the room. I have thought of a script to prevent people from doing so, however I am not sure if this would work or be the best idea.

Anyone who has access to the VIP room will have a bool value of true. Everyone else will have a bool value of false. Every 5 seconds, player’s locations will be checked by using the following method.
Player’s x value will be checked. If it is in between two numbers (if # > 5 < 10 then), then it will check their y value using the same system. This way it essentially created a unexistant box, and the script will know if the player is inside of the box based off of their location. Is checking the player’s location efficient enough for a startup game to prevent players from exploiting?

If this didn’t really make sense let me know and I can try to explain more.

Edit: Example:

Dark green Z position is 33, and light green is 95. So, if the player’s Z position is between 33 and 95, then it will move onto the next check:

Red x position is -86, and blue x position is -23. If the player’s X position is between -86 and -23, then it will move onto the next check:

Yellow’s y position is 60. Orange’s y position is 20. If the player’s y position is between 20 and 60, and the player does not have access to be in the room, they are kicked for exploiting.


https://gyazo.com/b6da4720af2dfe1899ec25d9e7a02fbc

https://gyazo.com/6053735afe49128aa1d0f34af52d4594

Obviously checking it every 5 seconds may be extreme, and I would test out different time checks. I don’t play on the game becoming too popular.

1 Like

I don’t think so because people can inject scripts to delete that script… I’m pretty sure this is the best possible as hackers can delete any script.

You script will depend on how the vip room is setup.

By that I mean how players gain access into it.

Its a good idea having a server side flag as the only way they can get it is if you set it.

If you were to have this script on the sever it should work, though you should also have a client side door. Also make sure that you check if there is a root part on the player first as death may cause it to error if you dont.

As far as how player’s gain access, it will likely be a gamepass with a door they can walk through. The issue is exploiters could easily delete the door or parts set to respawn them.

True they can remove local content.

A simple check every so often is all you would need. It could be position based, distance based or Region3 based (this may be slow using this imo).

All I can add to this is to be smart. If there is content only for vip players within this room e.g tools / gear then also do checks on what player is accessing them.

Overall I would not put a lot of time into anti expoit scripts unless exploits are game breaking. Wait until you have a community of players as they often feedback on exploits.

1 Like

You’ll be fine, even if you checked every heartbeat since it likely won’t lag.

My suggestion is just to make whatever so valuable in the VIP room not work for anyone who gets in unauthorized in the first place. If you have items in there for example, just make them unable to be taken without VIP privileges.

If anything, it is better because exploiters could stay out the room and take whatever is in there by exploitation and go. If the exploiter being there just physically sounds like a problem, your method will work as long as you are doing this on the server (not some local script in a client-based service like StarterGui)

2 Likes

Would be good but I recommend that you make a RemoteEvent that detects if the script has been removed so if the Exploiter deletes it they get Kicked/Banned

If you have a VIP room, there is no need to add security for the access, keep it simple

Instead, add security to the perks that the room gives

But they can still delete the script that will cause the RemoteEvent to get detected.

If it’s in a Script in ServerScriptService i have heard Exploiters can’t view ServerScripts so they wouldn’t know what script it’s in

A simpler way to do this would be to add a brick to the inside of the VIP room that kills/kicks anyone who touches it who doesn’t have the VIP.