# Crumbly Cookie!

<figure><img src="/files/LUQYy7bbtnFb4x7wQ2Bs" alt=""><figcaption></figcaption></figure>

This guide will walk you through setting up the **Crumbly Cookie** script for your FiveM server. Follow each step carefully.

***

### 1. Requirements

* <mark style="color:orange;">**xmmx\_bridge**</mark> (Included or download from the free category on [Tebex](https://www.xmmx-scripts.com/product/6827940-1).)
* <mark style="color:orange;">**ox\_lib**</mark> (Download latest version from [Here](https://github.com/overextended/ox_lib).)
* <mark style="color:orange;">**DJ's Collection**</mark>**&#x20;(**&#x43;ookies and Brownies Props, get them [**Here**](https://djscollections.com/package/5686453)**.)**
* <mark style="color:orange;">**Crumbly Cookie MLO**</mark> (Not Included! Purchase [Here](https://jamaring-maps.tebex.io/package/6154822).)

***

### 2. Configuration Files

#### config.lua

Adjust these important settings:

* **Version Check & Debug:**

  ```lua
  Version = true
  Debug = true
  ```
* **Images & Menu:**

  ```lua
  Images = "ox_inventory/web/images/"
  Menu = "ui" -- or "xm" if using xMaddMackx's menu
  MenuTxt = "Keep it Bubbly!"
  MenuScheme = "#b14f4f"
  iconColor = "#b14f4f"
  ```
* **Storage Options:**

  ```lua
  TraySize = 10
  TrayWeight = 20000
  StorageSize = 100
  StorageWeight = 1000000
  ```
* **Special Buffs:**

  ```lua
  SpeedBuff = true
  ArmorBuff = true
  ```
* **Optional:**

  ```lua
  SocietyFunds = true -- Should funds go to business society config in xmmx_bridge
  ToggleHud = true -- Should hud be toggled when a UI is open?
  Receipts = true -- Should customer receive a receipt? limited inventory support.
  ```

***

### 3. Location Setup (location.lua)

* **Enable Location:**

  ```lua
  Enabled = true -- enable the location functions?
  ```
* **Job Permissions:**

  ```lua
  JobName = "crumbly" -- job used for the location
  BossGrade = 4 -- boss grade to access boss menu in office?
  CheckDuty = true -- require on duty to access menus? Only workd for QB and Qbox.
  ```
* **Blips:**\
  Customize map blip settings:

  ```lua
  blipLabel = "Crumbly Cookie"
  blipCoords = vector3(374.41, 95.81, 103.13)
  ```
* **DUI Zone:**\
  If using the DUI monitor:

  ```lua
  DUIZone.Enabled = true
  propModel = "v_med_cor_ceilingmonitor"
  propCoord = vector4(370.523, 95.648, 104.815, -123.0)
  ```
* **Interaction Zones:**\
  Add or modify entries under `CustomerMenu`, `Registers`, `Supplies`, `Prep`, etc.

***

### 4. Items & Pricing

All menu items are set in `config.lua` under `CashierItems`:

* **Categories:** Cookies, Icecream, Specials, Drinks
* **Example Entry:**

  ```lua
  { id = 1, name = 'crumbly_macadamia', category = 'Cookies', price = 300.00 }
  ```

***

### 5. Localization (locales.lua)

Set custom text and prompts:

* **Notifications:**

  ```lua
  Notify.must_wash = "You must wash your hands first!"
  Notify.order_paid = "$%s was Paid to Crumbly Cookie!"
  ```
* **Progress Descriptions:**

  ```lua
  Progress.uniform_on = "Putting on uniform..."
  Progress.opening_combo = "Opening "
  ```

***

### 6. Consumables (consumables.lua)

* Items use animations, props, and buffs when consumed.
* **Speed Buff Items:** Includes large cookies like `crumbly_lrgchocchunk`
* **Armor Buff Items:** Includes drinks like `crumbly_wholemilk`

> Buffs last 10 seconds by default and can be configured.

***

### 7. Inventory Images

Make sure all item icons exist in:\
• Copy the images from the .INSTALL/images folder.\
• Copy the items from .INSTALL/items folder.

```
ox_inventory/web/images/
```

Filenames must match item names from `CashierItems`.

***

### 8. Troubleshooting

* **Missing Icons:** Ensure correct image path and filenames.
* **Menu Doesn’t Open:** Confirm menu type matches (`ui`, `xm`, etc.).
* **Props Not Spawning:** Check `DUIZone.Enabled` and `propCoord` format.

***

### 9. Additional Tips

* Adjust prices as needed per economy.
* Enable/disable buffs depending on server balance.
* Use `Debug = true` for troubleshooting zones and props.

***

This guide covers the basics for getting Crumbly Cookie running on your server. For support or updates please open a ticket via discord.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://xmmx-development.gitbook.io/documentation/product-guides/crumbly-cookie.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
