I’ve noticed in my time playing lots of various Roblox games here that hacker cheating is pretty rampant among the top games. I have read about various client based anti-cheat resources here and I’m not going to wade into any political debate about client anti-cheat vs. server anti-cheat detection. What I am offering to the community is a server based anti-cheat system that covers most of the basic types of cheating with lots of tune-able settings and detailed explanations for how to use them. I understand that developers want to devote their time to “developing” and not so much to combating cheaters. With this resource, anyone can get some good, basic, anti-cheat service going for any game to spend more time doing what you love to do. I’ll post up some video examples, but this first post is just getting the code out and how to install it in your game.
This anti-cheat service detects (4) types of client based cheating and performs a “soft punishment” when detected. The first being Speed cheating. If a player is moving faster than they should, it will stop them in place until they stop. The second detection is Flying detection. If the player is up in the air longer than makes sense for your game, it will “ground” them; over and over until they stop. The third detection is Teleport cheating. Teleport through walls, extreme long distances, etc. will be punished by being force-teleport back to where they started; over and over until they stop. The final detection is Jump cheating. Players that are jumping higher than what you set will have their velocity sapped so they fall back down when detected. Check the “KnightmareConfiguration” script to configure for your game before use.
Don’t ask me about github, I’m going the easy route to maintain updates in this topic alone.
You can now just download a model on the marketplace that has all the latest code and separated into a section for configuration (so you can save between updates) and the main anti-cheat service code. I’ve also added an easy ability to create your own custom punishments that will also not have to be changed between upgrades. No more copy/paste, you can grab it directly from the marketplace now!
How to install this server based anti-cheat service:
- Download Model From Link Above
- After you download the model, it will have 4 scripts attached to it. The “KnightmareConfiguration” is where you want to start.
- The 4 types of cheat detection are disabled by default so you have to actually take the time to read all the configuration settings at the top before turning it on.
- If you want to create your own punishments, look for the “KnightmareCustomPunishment” file, it has examples for all of them, so you can be creative with your cheaters when caught. You have to turn off the default “soft” punishments for the custom ones to kick in. If you want to use both at the same time, there is a configuration option for this too.
- That’s it really. If I make any updates or bug-fixes to this service, you will only need to copy over “KnightmareAntiCheatService” file from the new downloaded model into your in-game object to overwrite and update the engine without having to redo the configuration file or custom punishments you created.
- Once everything is complete, just move the model sphere to anywhere in your map, it will self-delete the floating model after it has a chance to get itself up and running when your game starts.
- Finally, please give this “Model” anti-cheat service some stars or positive feedback to encourage others to use it or at least try it when combating game cheaters.
Auto-Updating Version:
If you want to download the model once and have it automatically download the latest version of the Anti-Cheat Service every-time your server starts, it’s possible. It just takes a little manual setup to avoid triggering Roblox hack detection by accident.
- On the Model you just downloaded, find the “KnightmareConfiguration” file set it for “Disabled” in Roblox Studio. It’s ok, you still do your configuration settings there, but it must be turned off so the auto-update can start first to check for code updates.
- Find the “StartKnightmareAntiCheatService” and “Enable” it.
- Open the file “StartKnightmareAntiCheatService” in Studio and search for this at the top:
local KMModule = require() -- <--Asset ID for Knightmare Anti-Cheat Service Code
- Where you see the require() part, change it to require(15738849753)
- Save and close the script file, that is all you need to change.
- This will direct your server to the correct AssetID of the Knightmare Anti-Cheat Service Code update model.
- Your done! Now, every-time your server starts, it will attempt to download the latest version of the Anti-Cheat Service and run that. If it is unable to download the latest version, it will fall-back to the local version you already have. Easy peasy.
I’ve written a developers guide for nearly all of the configuration settings to this service in the tutorial section of the forum here: