> For the complete documentation index, see [llms.txt](https://code-after-sex.gitbook.io/script-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://code-after-sex.gitbook.io/script-documentation/cas-gunsmith/cas-gunsmith-and-weapon-mod.md).

# CAS Gunsmith & Weapon Mod

CAS Gunsmith & Weapon Mod — a RedM gunsmith bench for VORP and RSG Core: parts, finishes, engravings, ammo and maintenance on the real 3D weapon model.

**A full gunsmith bench for RedM on VORP and RSG Core — pick a weapon, fit parts, finishes, engravings, ammunition and maintenance in one work order, and see every change on the real in-game 3D model before you pay.**

{% hint style="success" %}
Players walk up to the bench, choose a weapon from their inventory, build a work order, and pay once. Every price is calculated and verified on the server, and a failed operation is refunded automatically. VORP or RSG Core is detected on start with nothing to switch, and the script needs no database table of its own.
{% endhint %}

## Highlights

* **Live 3D preview** on the real in-game weapon model — drag to turn it, zoom in and focus on the selected part.
* **Studio look** on the bench — depth of field, three-point lighting, Rockstar's own gunsmith colour grade and a vignette around the weapon.
* **24 weapons** across revolvers, pistols, repeaters, rifles and shotguns.
* **Parts:** barrel, rifling, sight, scope, forend, grip and stock.
* **Style:** metal finish, wood tone, engraving and inlay, carving, wrap and wrap colour, named and coloured as in the game.
* **Maintenance:** cleaning, wear repair and rust removal, read live from the weapon's real in-game condition.
* **Ammunition:** switch the loaded ammo type and buy ammo by the box.
* **Presets & favourites:** save a look and load it into the work order with one click.
* **Rank or job locks:** options unlock with the character's XP (on RSG Core, a rep you choose), or run the bench as a job and unlock them by job grade.
* **Fully translatable:** every text is in a language file, English and Turkish are included, and option names can be translated too.
* **Server-authoritative pricing:** every total is recalculated on the server; failed work is refunded.
* **VORP and RSG Core** with no config switch. Bought parts are put back on the weapon every time it is drawn, after a relog too.

## At a glance

|                 |                                                                   |
| --------------- | ----------------------------------------------------------------- |
| **Frameworks**  | VORP and RSG Core (detected on start)                             |
| **On VORP**     | `vorp_core`, `vorp_inventory` (with the weapon-component exports) |
| **On RSG Core** | `rsg-core`, `rsg-inventory`, `rsg-weapons`, `rsg-ammo`, `ox_lib`  |
| **Database**    | None — data is kept in the resource KVP store                     |
| **Weapons**     | 24 (revolvers, pistols, repeaters, rifles, shotguns)              |
| **Access**      | Every player with rank locks, or chosen jobs with grade locks     |
| **Languages**   | English and Turkish included, add your own                        |
| **Interface**   | React NUI, prebuilt in `web/dist` (no build required)             |

## Where to start

| Page                                                                               | What it covers                                                                     |
| ---------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| [Installation](/script-documentation/cas-gunsmith/getting-started/installation.md) | Requirements for VORP and RSG Core, install steps, the Gun Oil item and RSG notes. |
| [Bench Interface](/script-documentation/cas-gunsmith/usage/bench-interface.md)     | Opening the bench, layout, camera, work order and payment.                         |
| [Tabs](/script-documentation/cas-gunsmith/usage/tabs.md)                           | Customize, Style, Condition, Ammunition and Presets.                               |
| [General Settings](/script-documentation/cas-gunsmith/configuration/general.md)    | `config.lua` basics, job access, rank and grade locks and the RSG Core options.    |
| [Localization](/script-documentation/cas-gunsmith/configuration/localization.md)   | Choosing the language, adding your own and translating option names.               |
| [Shops and Interaction](/script-documentation/cas-gunsmith/configuration/shops.md) | Shop list, per-shop jobs, distances, blip and prompt.                              |
| [Weapon Catalogue](/script-documentation/cas-gunsmith/configuration/weapons.md)    | The weapon definitions and how to add your own.                                    |
| [How It Works](/script-documentation/cas-gunsmith/developer/how-it-works.md)       | Framework bridges, languages, server authority, data storage and touchpoints.      |
| [Troubleshooting](/script-documentation/cas-gunsmith/support/troubleshooting.md)   | Notification meanings and common fixes.                                            |

## Get the script

Gunsmith & Custom Weapon Mod is sold on the CAS Scripts store: [codeaftersex.com/script/gunsmith-and-custom-weapon-mod](https://codeaftersex.com/script/gunsmith-and-custom-weapon-mod). Both the Escrow build and the full Open Source build are listed there, with lifetime updates and Discord support.
