> For the complete documentation index, see [llms.txt](https://sbscripts.gitbook.io/sb-scripts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sbscripts.gitbook.io/sb-scripts/sb-vip/admin-panel.md).

# Admin Panel

Open it with `/vipadmin`. You need a group listed in `Config.Permissions`.

| Section             | What you can do                                                                                                                                                  |
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Products**        | Add weapons, items, money, character services, bundles and mystery boxes. Set the price in tokens and/or money, a per-purchase limit and an optional timed sale. |
| **Vehicles**        | Add vehicles to sell, with token and/or money prices and an optional timed sale.                                                                                 |
| **Showroom spots**  | Stand where you want a display vehicle and save the spot. Showroom vehicles rotate through these spots.                                                          |
| **Tabs**            | Add, rename, reorder and remove shop tabs. Products from a removed tab move to the first remaining tab.                                                          |
| **Tebex packages**  | Link each Tebex package name to an amount of VIP tokens.                                                                                                         |
| **Tebex purchases** | See every purchase, who redeemed it and when.                                                                                                                    |
| **Balances**        | View and change players' token balances.                                                                                                                         |

### Adding and editing

Products and vehicles open in a full-width editor. Details (name, picture, description, tab) are on the left, and price, sale and what it gives are on the right. The picture preview updates as you change the image URL.

### Sales

1. Tick **Put On Sale**.
2. Set the sale price in tokens and/or money. It must be lower than the regular price.
3. Set how long it lasts in hours, days or weeks. The editor shows the end date and percentage off.
4. Save.

While a sale runs, the shop shows a **-%** badge, the old price crossed out and a countdown. When the time is up, the regular price returns automatically. Within 30 seconds the ended sale is cleared in the database, printed in the console and posted to the Admin log. Sales that ended while the server was off are cleared on start. The server always charges the live price, and if a sale ends during checkout the player is told the price changed. Sale prices are kept when you untick the sale, so you can run it again later.

### Mystery boxes

Each reward has its own chance, from 0% to 100%. Every reward is rolled separately, so one box can give more than one reward.

### Vehicles

* Players can test drive a vehicle before buying. Test drives can run in a private routing bucket (`Config.TestDrive.PrivateBucket`).
* Buying a vehicle requires holding the buy button to confirm.
* Vehicles bought at the shop spawn at `Config.Vehicles.PurchaseSpawns`. Vehicles bought with `/vipshop` away from the shop are sent to the garage.
