s&box Stats / Leaderboard / Achievement Generator
Generate Sandbox.Services C# code for player stats, leaderboards (with all 5 aggregation modes — Sum/Avg/Min/Max/Last), and achievement unlocks. Pulls method signatures direct from the live s&box C# API schema — Stats.Increment, Leaderboards.GetFromStat, Achievements.Unlock — so the snippets always match the engine exactly.
Lowercase + underscore is the s&box convention. The same key feeds into a leaderboard later.
Tag the increment with a string for analytics segmentation.
Sandbox.Services — Stats, Leaderboards, Achievements
Three closely-related APIs on Facepunch's backend power the progression layer of any s&box game. Stats records numeric values per player and globally. Leaderboards aggregate those stats and order them. Achievements are one-shot unlocks per player. All three live under Sandbox.Services and are pulled straight from the s&box C# API schema in the snippets above — no drift when Facepunch revises the API.
Stats API (11 methods)
From Sandbox.Services.Stats:
| Method | Return |
|---|---|
| FlushAsync(token) | Task |
| Flush() | void |
| FlushAndWaitAsync(token) | Task |
| Increment(name, amount) | void |
| Increment(name, amount, context, data) | void |
| Increment(name, amount, data) | void |
| SetValue(name, amount, context, data) | void |
| SetValue(name, amount, data) | void |
| GetGlobalStats(packageIdent) | Stats.GlobalStats |
| GetLocalPlayerStats(packageIdent) | Stats.PlayerStats |
| GetPlayerStats(packageIdent, steamid) | Stats.PlayerStats |
Leaderboard Aggregation Modes
| Method | When to use |
|---|---|
| SetAggregationSum() | Default — total kills, total points, total distance. |
| SetAggregationAvg() | Average per submission — useful for K/D ratios. |
| SetAggregationMin() | Best low score — speedruns, golf-style scoring. |
| SetAggregationMax() | Personal best — high scores, longest run. |
| SetAggregationLast() | Most recent value wins — current state, current rank. |
Related Tools
- ConCmd / ConVar Generator — give admins console commands that record stats or unlock achievements on demand.
- Sync Properties Generator — replicate stat values to other clients in real-time.
- Network Events Reference — tie stat increments to lifecycle events (join, leave, kill).
s&box Stats / Leaderboard / Achievement Generator — FAQ
Is this s&box Stats / Leaderboard / Achievement Generator free to use?
Yes, the s&box Stats / Leaderboard / Achievement Generator is 100% free — no signup required, no hidden fees, no downloads. Everything runs in your browser.
How accurate is the s&box Stats / Leaderboard / Achievement Generator?
Values are pulled from the s&box game files and community-verified formulas. Results match what you see in-game, and we update the tool when the game gets major patches.
Can I host a s&box server with XGamingServer?
Yes. XGamingServer offers instant s&box server hosting with mod support, automatic backups, DDoS protection, and 24/7 support. All popular game settings are pre-configured.
Does the Stats / Leaderboard / Achievement Generator work on mobile?
Yes, the Stats / Leaderboard / Achievement Generator is fully responsive and works on desktop, tablet, and mobile browsers.
You might also need
Launch Command Builder
Build the exact sbox-server.exe launch command — +game (published or local .sbproj), +hostname, +port, +net_query_port, +net_game_server_token, optional map package. Validates branch (main/staging) requirements and outputs ready-to-run Run-Server.bat / run-server.sh.
SteamCMD Builder
Generate copy-paste SteamCMD install/update scripts for the s&box Dedicated Server (app 1892930). Main vs staging branch toggle, validate option, anonymous login, side-by-side Windows .bat and Linux .sh.
users/config.json Generator
Visual editor for the s&box dedicated server admin file — add multiple Steam accounts with their SteamID64, display name, and claims (kick, ban, restart, plus your own custom claims). Validates SteamID format and outputs paste-ready users/config.json.
Steam ID Resolver
Convert any Steam profile URL, vanity URL, SteamID2 (STEAM_0:0:...), or SteamID3 ([U:1:...]) into the SteamID64 format that users/config.json and most server tools require. All formats shown side-by-side with copy buttons.

Config Tool Built Into XGamingServer
Get managed s&box hosting with this tool in your panel — configure, deploy, and play in minutes. No file uploads needed.