Simple Anti-Tamper
LibraryKeep your saves safe from tampering!
thumb_up
5
open_in_new
View on sbox.game
public class PlayerData
{
public int Level { get; set; } // Will be serialized
public int MaxHealth { get; set; } // Will be serialized
public string Username; // Won't be serialized
public static void Save( PlayerData data )
{
FileSystem.Data.WriteJson( "player.json", AntiTamper.Lock( data, 1254854 ) );
}
public static PlayerData Load()
{
return AntiTamper.Unlock(
FileSystem.Data.ReadJson<LockedData>( "player.json" ),
1254854,
new PlayerData()
);
}
}
// later...
try
{
data = PlayerData.Load();
} catch
{
Log.Info( "Naughty cheater!" );
data = new PlayerData();
}This library serializes your struct as usual, then performs a hash on the string and a magic number you've provided.
When you load the save from the disk, the hash is checked before the object is accepted.
Pick a unique number for your project, but NEVER CHANGE IT! If you do, all old saves will be invalid.
Q: Are my saves actually safe from tampering?
A: Haha, no. This library prevents the most basic tampering where you literally just edit values in the json.
To bypass it, someone would have to open your game code and find the magic number you picked, then do annoying hash calculations themselves.
Sample project: https://nixx.is-fantabulo.us/antitamper.zip
When you load the save from the disk, the hash is checked before the object is accepted.
Pick a unique number for your project, but NEVER CHANGE IT! If you do, all old saves will be invalid.
Q: Are my saves actually safe from tampering?
A: Haha, no. This library prevents the most basic tampering where you literally just edit values in the json.
To bypass it, someone would have to open your game code and find the magic number you picked, then do annoying hash calculations themselves.
Sample project: https://nixx.is-fantabulo.us/antitamper.zip
23
Total Users
36
Total Sessions
5.9 hours
Total Playtime
Positive
Negative
How this works: This chart tracks all anonymous thumbs up/down votes, not just the written reviews below. Playtime is permanently recorded at the exact moment the user casts their vote. Data is exactly as returned by the Facepunch API.
32m - 1.1h
1
0 recorded entries
| Rank | Player | Score | Recorded |
|---|---|---|---|
|
refresh
Discovering package leaderboards...
|
|||
Package ID:
quality.simpleantitamper
Created:
2026-02-16 11:06 UTC
Updated:
2026-06-03 11:12 UTC
Type:
library
Public:
Yes
Version:
274617
files:
5
Size:
0.0 MB
Engine Version:
25
Asset Version ID:
274617
Version Created:
2026-06-03 11:12 UTC
Hash:
-2310366957937927840
Manifest: Open manifest
274617
Jun 3, 2026
Use deterministic hashing
153510
Feb 16, 2026
Changes on 2026-02-16
Live API Passthrough & Removal Notice
This file manifest and asset metadata are retrieved live directly from the official Facepunch s&box public API. s&box Explorer does not host, store, or redistribute any package files. All download links route directly to Facepunch CDN servers.