> For the complete documentation index, see [llms.txt](https://acestudios.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://acestudios.gitbook.io/docs/inventory-and-items/serial-scratcher.md).

# Serial Scratcher

Let players scratch weapon serial numbers, and let investigators restore them.

**Serial Scratcher** (`ace_serialscratch`) adds items that players use on the weapon they're holding to **scuff** or **wipe** its serial number. Investigators can use a **forensics tool** minigame to try to restore a scuffed serial. Every scratched weapon is saved, and actions can be logged to Discord.

|                   |                                                     |
| ----------------- | --------------------------------------------------- |
| **Resource name** | `ace_serialscratch`                                 |
| **Version**       | Not stated in the manifest                          |
| **Inventory**     | `ox_inventory` (required)                           |
| **Frameworks**    | Framework-independent (works through ox\_inventory) |
| **Dependencies**  | `ox_lib`, `ox_inventory`                            |
| **Storage**       | `storage/scratched_weapons.json` (no SQL database)  |

## Items

|                                                                                                                                                                                                                                                                                        | Item name             | Label               | Use                                                   |
| :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | --------------------- | ------------------- | ----------------------------------------------------- |
|   <img src="https://2698751888-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeduQ6kxfGcEoMzSKJnCJ%2Fuploads%2Fgit-blob-bb91a36193926eb8e92ba28ad342b48999715b90%2Fserialscratch-halfscratch.png?alt=media" alt="Half Serial Scratch item" data-size="original">  | `halfscratch`         | Half Serial Scratch | **Scuffs** the serial of the weapon you're holding.   |
|   <img src="https://2698751888-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeduQ6kxfGcEoMzSKJnCJ%2Fuploads%2Fgit-blob-608382b4d471f1282f2e67bb07ed5a181e53f67b%2Fserialscratch-fullscratch.png?alt=media" alt="Full Serial Scratch item" data-size="original">  | `fullscratch`         | Full Serial Scratch | **Wipes** the serial of the weapon you're holding.    |
| <img src="https://2698751888-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeduQ6kxfGcEoMzSKJnCJ%2Fuploads%2Fgit-blob-791b3e0d05f8296685c53efdefcdef9829e86787%2Fserialscratch-weaponforensicstool.png?alt=media" alt="Forensics Tool item" data-size="original"> | `weaponforensicstool` | Forensics Tool      | Minigame that tries to **restore** a tampered serial. |

## How it works

```
Weapon (original serial)
   │ halfscratch
   ▼
Scuffed serial ──(forensics tool minigame)──► Serial & registration restored
   │ fullscratch
   ▼
Wiped serial  ──(forensics tool)──► "cannot be restored"
```

The messages in `Config.Notifications` describe how the forensics tool responds:

| Weapon state      | Forensics tool result                                            |
| ----------------- | ---------------------------------------------------------------- |
| Not tampered with | *"The serial number on this weapon has not been tampered with."* |
| Scuffed           | Minigame. On success the serial and registration are restored.   |
| Wiped             | *"…it cannot be restored."*                                      |
| Already restored  | *"The serial number cannot be restored any further."*            |

When a serial is removed, the weapon shows `SerialRemoved` as its serial and `RegisterRemoved` (default `Scratched`) as its registration.

## Features

* Half-scratch and full-scratch items with configurable timers
* Forensics tool minigame with `easy`, `medium` or `hard` difficulty
* Custom serial text for tampered weapons
* Scratched weapons saved to a JSON file
* Discord webhook logging
* Optional server-console command that clears saved data

{% content-ref url="/pages/hWxmf7NxNkChM65X9mGp" %}
[Installation](/docs/inventory-and-items/serial-scratcher/installation.md)
{% endcontent-ref %}
