In my game someone adds a rocket launcher and randomly starts killing everyone so I am trying to make an anti-exploit script for it.Sorry I am kind of new to and I don't know how to script properly,A little help please?
**IMPORTANT EDIT: **An API change has been made, find my anti-hacker script here.
There are several ways to tackle this issue.
First off, my favorite is to impose an age limit. You can put a script in the players backpack, and ask if the player's age is < 50 for example. If it is, kick the player.
The other, more complex way requires time and patience.
If you know all the items there are in your game, you can create a white list. If they player has a tool that is not within that white list, you can kick the player, or even better, remove the tool.
This is as far as I can guide you, to do this you need to do some research like LUA Tables, and a way to get all the players (It's easy and possible).
The best way to stop exploiting is to check FilteringEnabled in workspace, however you would have to learn how to re-code your entire game. Basically what FilteringEnabled does is not replicate the client to the server. So basically anything changed on the 'client' or player's game will not effect the server.