> 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-roulette/cas-advanced-roulette-system.md).

# CAS Advanced Roulette System

CAS Advanced Roulette System for RedM, VORP and RSG: American roulette on a real table with Rockstar's own wheel, ball and chips, two croupiers, a real spin and safe money.

**American roulette for RedM on a real table in the world: Rockstar's own table, wheel, ball, rake and chips, two croupiers, a real spin and a HUD that leaves the felt clear. For VORP and RSG.**

[Get the script](https://codeaftersex.com/script/roulette) | [Support Discord](https://discord.gg/codeaftersex)

{% hint style="success" %}
Put the two folders `cas-roulette-assets` and `cas-roulette` in your resources and `ensure` them in that order after your framework. No database, no SQL and no items: the script finds VORP or RSG by itself and keeps its records in its own storage. Start with [Installation](/script-documentation/cas-roulette/install.md).
{% endhint %}

CAS Advanced Roulette System is American roulette for RedM, played on a real table in the world. Everything the player sees is the game's own: Rockstar's roulette table, wheel, ball, marker and rake, the saloon card-game chips, two croupiers on Rockstar bar stools playing Rockstar's dealer animations, and Rockstar's minigame sounds and controls.

There is no full-screen menu. You walk up to the table and hold E. Your character steps up to the rail and the camera goes over the felt. You place chips on the layout with the mouse or the keys. The wheel croupier spins and the ball runs, hops over the frets and drops into the pocket the server drew. The layout croupier marks the number, rakes in the losing chips and pays every winner next to his bet.

## Highlights

* **A real table in the world.** Rockstar's roulette table, wheel, ball, marker and rake with the saloon card-game chips, at La Bastille in Saint Denis and the Valentine saloon. Admins add more tables in game, and a casino MLO's own roulette table is used at its exact spot when a config entry stands near it.
* **Two croupiers.** The wheel croupier takes the ball from its pocket and flicks it onto the turning wheel. The layout croupier waves off the bets, marks the winning number, rakes in the losing chips and pays every winner next to his bet.
* **A real spin.** The wheel turns, the ball runs on the track, spirals in, hops over the frets and drops into the pocket the server drew. Everyone at the table sees it land in the same pocket.
* **Bet on the felt.** A top-down camera over the layout, a ghost chip in your colour, the mouse or W A S D to move and the mouse wheel for the chip value. Rockstar's own minigame controls and prompts.
* **Every American bet at the true odds.** Straight, split, street, trio, corner, top line, six line, column, dozen and the even-money bets: 161 spots, house edge 5.26 %.
* **A HUD that leaves the felt clear.** The croupier's call with a fuse that burns down, the winning number with its groups, the last 12 numbers as a period roulette marquee, hot and cold numbers, the players at the table, your purse and chip rack, and the spot under your cursor.
* **Money that cannot be lost.** The server runs every round. A disconnect, a crash or a restart never eats a bet, and a payment is never paid twice.

## At a glance

| Feature              | Details                                                               |
| -------------------- | --------------------------------------------------------------------- |
| Version              | 1.0.0                                                                 |
| Frameworks           | VORP Core and RSG Core, found by itself (`Config.Framework = 'auto'`) |
| Requirements         | none beyond the framework (no oxmysql, no ox\_lib)                    |
| Database             | none: the resource's own storage (KVP)                                |
| Items                | none: chips are paid from and to cash                                 |
| Folders              | `cas-roulette-assets` (models) and `cas-roulette` (the game)          |
| Tables               | La Bastille (Saint Denis) and Valentine saloon, plus any you add      |
| Seats                | six per table, each with its own chip colour                          |
| Wheel                | American, 0 and 00, Rockstar's own wheel                              |
| Language             | English, every text in `config/locale.lua`                            |
| Open files in Escrow | `config/` and `server/bridge.lua`                                     |

## Where to start

| You want to                                     | Read                                                                 |
| ----------------------------------------------- | -------------------------------------------------------------------- |
| Install the script                              | [Installation](/script-documentation/cas-roulette/install.md)        |
| See the controls, the HUD, the bets and a round | [Gameplay](/script-documentation/cas-roulette/gameplay.md)           |
| Know how bets and payouts stay safe             | [Money and safety](/script-documentation/cas-roulette/money.md)      |
| Move, add or remove tables                      | [Tables](/script-documentation/cas-roulette/tables.md)               |
| Change limits, chips, timing or texts           | [Configuration](/script-documentation/cas-roulette/configuration.md) |
| Look up a command and who may use it            | [Commands](/script-documentation/cas-roulette/commands.md)           |
| Find a quick answer                             | [FAQ](/script-documentation/cas-roulette/faq.md)                     |

## What is in it

* **A real table in the world.** Rockstar's roulette table, wheel, ball, marker and rake, with the chips of the saloon card games. Two default tables: La Bastille in Saint Denis and the Valentine saloon. Admins add more in game.
* **Two croupiers.** One at the wheel takes the ball from its pocket and flicks it onto the turning wheel. One at the layout calls "no more bets", sets the marker on the winning number, rakes in the losing chips and pays winners chip by chip on Rockstar's own pay track.
* **A real spin.** The ball runs on the track, slows down, spirals in, hops over the frets and settles in the drawn pocket. Every player at the table sees it land in the same pocket.
* **Betting on the felt.** A top-down camera over the layout, a ghost chip in your colour where the next chip lands, the mouse or W A S D to move, the mouse wheel for the chip value. Every place at the table has its own chip colour, as at a real roulette table.
* **Every American bet.** Straight, split, street, trio, corner, top line, six line, column, dozen, red / black, odd / even, 1 to 18 / 19 to 36: 161 bet spots, paid at the true American odds (house edge 5.26 %, top line 7.89 %).
* **A HUD that leaves the felt clear.** The table name and limits, the croupier's call with a fuse that burns down while bets are open, the winning number with its groups, the last 12 numbers as a period roulette marquee, hot and cold numbers, the players at the table with their chip colours, your cash and the chip rack, and the spot under your cursor with its payout and limit. See [Gameplay](/script-documentation/cas-roulette/gameplay.md).
* **Money that cannot be lost.** The server runs the rounds and the payouts. Every chip on the felt is on record per character, so a disconnect, a crash or a resource restart never eats a bet. See [Money and safety](/script-documentation/cas-roulette/money.md).
* **No database.** Everything is saved in the resource's own storage (KVP). Nothing to import.
* **VORP and RSG**, detected by themselves.
* **Every text in one file** (`config/locale.lua`), so the script is easy to translate.

## Frameworks

| Framework | Cash                                                  |
| --------- | ----------------------------------------------------- |
| VORP Core | `removeCurrency` / `addCurrency` on currency 0 (cash) |
| RSG Core  | `RemoveMoney` / `AddMoney` on `cash`                  |

The framework is detected by itself (`Config.Framework = 'auto'`). The bridge (`server/bridge.lua`) stays readable in the escrow version, so a server with a changed core can adapt it.

## Requirements

* RedM with Lua 5.4 (`lua54 'yes'`, any recent server build).
* VORP Core or RSG Core.
* The two folders of the download: `cas-roulette-assets` (the table and wheel models) and `cas-roulette` (the game).
* OneSync is recommended: with it the server also checks that a player really stands at the table when he joins.

## Pages

* [Installation](/script-documentation/cas-roulette/install.md)
* [Gameplay](/script-documentation/cas-roulette/gameplay.md): the controls, the HUD, the bet types and payouts, a round
* [Money and safety](/script-documentation/cas-roulette/money.md)
* [Tables](/script-documentation/cas-roulette/tables.md): the default tables, adding your own, custom maps
* [Configuration](/script-documentation/cas-roulette/configuration.md)
* [Commands](/script-documentation/cas-roulette/commands.md)
* [FAQ](/script-documentation/cas-roulette/faq.md)

## More

* [Get CAS Advanced Roulette System (Escrow or Open Source)](https://codeaftersex.com/script/roulette)
* [Support Discord](https://discord.gg/codeaftersex)
* [All CodeAfterSex scripts](https://codeaftersex.com/scripts)
