13 - Punishing cheaters
Goal: You will learn how to decide what happens when cheating is found, from a built-in punishment to quietly collecting facts for a later review.
This guide works in the Free and the Pro version. The Exit Game punisher and your own punishers work in both. The Mirror Camera and Reduce FPS punishers need Pro.
The problem
You know that a cheat can be found (see Reacting to detected cheating). The open question is what happens next.
You want a consequence that runs on its own. But a detector can be wrong. A false alarm that closes the game hurts an honest player, and you get bad reviews and support mail.
The solution
Use punishers. A punisher is an automatic reaction. Each detector find adds to the threat score of the Anti-Cheat Monitor. Each punisher has a limit. When the score reaches that limit, the punisher runs.
A low limit suits a soft reaction. A high limit suits a hard one.
Step 1: Choose a strategy
Decide this before you add anything.
Punish at once. It stops the cheater and makes them less likely to try again. But no detection is perfect. If you act too fast, you may punish an honest player.
Anti-Cheat already softens that risk:
- A find that is more likely a false alarm adds less to the score.
- The score slowly falls again over time. A one-off hitch does not add up.
Still, the score is a likelihood, not proof.
Collect facts first. This is often safer, most of all before a ban. Note the find, on the device or on your server, and look at it later.
Limit quietly. A soft limit can work better than a hard ban. Match suspected cheaters only with each other, or cut their rewards. The cheater does not learn that they were caught.
A simple rule:
- Low limit: a soft or annoying reaction, or a silent log entry.
- High limit: a hard reaction, such as closing the game.
- Bans: look at the facts yourself before you ban someone for good.
Step 2: Make your own monitor prefab
Anti-Cheat adds the Anti-Cheat Monitor to your game when it starts. The predefined Anti-Cheat-Monitor prefab has no punisher. To use one, you need your own monitor prefab.
- Copy the predefined prefab
Anti-Cheat-MonitorfromAssets/GUPS/AntiCheat/Resources/Prefabsinto your own folder. - Open Edit > Project Settings > GuardingPearSoftware > AntiCheat.
- Assign your copy to the Anti-Cheat Monitor field at the top.
If you already did this in Getting started, use that prefab.
Step 3: Add a built-in punisher
The punisher prefabs are in Assets/GUPS/AntiCheat/Resources/Prefabs/Punishers. Open your monitor prefab and drag a punisher onto the monitor so it becomes a child. It then registers itself.

Image 1: The punisher prefabs in Assets/GUPS/AntiCheat/Resources/Prefabs/Punishers.
| Punisher | Free | Pro | What the player sees | Default limit |
|---|---|---|---|---|
| Mirror Camera | + | The view is flipped. Annoying, most of all in first-person games | 450 | |
| Reduce FPS | + | The game becomes very slow | 550 | |
| Exit Game | + | + | The game closes | 850 |
The built-in punishers run only once per session. You can add more than one. A soft one runs early, a hard one later.
Step 4: Set the limit
Select the punisher. The Inspector shows two fields:

Image 2: The Exit Game punisher in the Inspector. It runs when the threat score reaches 850.
- Is Active: Turns the punisher on or off.
- Threat Rating: The limit. The punisher runs when the threat score reaches this number.
Raise the limit for fewer and safer punishments. Lower it for an earlier, soft reaction.
Step 5: Know how fast the score rises
One find adds this much to the score:
(1 - false alarm chance) x threat rating of the detector x sensitive level
The Sensitive Level is set on the Anti-Cheat Monitor. The default is Moderate, which counts as 2. With that, the detector defaults give these numbers:
| Find | One find adds about | Reaches |
|---|---|---|
| Memory tampering, edited Android app, app with a changed package name, mod loader | 1000 | All three punishers |
| Kernel-mode debugger | 1500 | All three punishers |
| Normal debugger, blocked Android app, second copy of the game | 750 to 800 | Mirror Camera and Reduce FPS. A second find reaches Exit Game |
| Moved device clock | 600 | Mirror Camera and Reduce FPS. A second find reaches Exit Game |
| Install from a store you did not allow | 525 to 700 | Mirror Camera, and in most cases Reduce FPS |
| Jailbroken iPhone or iPad | 500 | Mirror Camera only |
| Virtual machine | 175 | No punisher on its own |
| Speed hack | 70, again about every 2.5 seconds | Exit Game after about half a minute |
| Auto clicker | 105 per button, again every 5 seconds | Exit Game after about 40 seconds |
A jailbreak and a virtual machine are places where cheating is possible. They are not cheating itself. That is why they add less.
The other levels change every number in the table:
- Less Sensitive counts as 1. All numbers are halved. Only the first two rows still reach a punisher with one find.
- Sensitive counts as 3, and Very Sensitive as 4. At Very Sensitive, even a jailbreak reaches Exit Game with one find.
- Not Sensitive counts as 0. No find adds to the score, and no punisher runs.
Step 6: Write your own punisher (optional)
When the built-in punishers do not fit, write your own. Add the IPunisher interface to a MonoBehaviour and put it on a child of the monitor in your prefab. It runs like a built-in punisher.
This one only writes a log entry. It is a soft reaction with a low limit:
using GUPS.AntiCheat.Core.Punisher;
using UnityEngine;
public class LogPunisher : MonoBehaviour, IPunisher
{
public string Name => "Log Punisher";
public bool IsSupported => true;
public bool IsActive => true;
public uint ThreatRating => 300;
public bool PunishOnce => true;
public bool HasPunished { get; private set; }
public void Punish()
{
HasPunished = true;
Debug.LogWarning("Possible cheating. Flag this session for a review.");
// Send a report to your server here.
}
}
- ThreatRating is the limit.
- PunishOnce decides if it runs one time, or every time a find comes in while the score is over the limit.
- HasPunished tells the monitor that it already ran.
If you do not want a limit at all, listen to a detector as shown in Reacting to detected cheating and note each find for a later review.
The result
With a punisher on your monitor prefab:
- When the threat score reaches the Threat Rating of a punisher, it runs.
- The built-in punishers can flip the camera, slow the game down, or close it, each at its own limit.
- Your own
IPunishercan flag a session for a review and leave the player alone.
You decide how hard the consequence is, and how sure Anti-Cheat must be before it acts.
Settings reference: Punisher, Exit game, Mirror camera, and Reduce FPS.
Next steps
- Reacting to detected cheating shows how to note a find without a punisher.
- The Detector overview lists everything that can raise the threat score.
Back to the Guides overview.