> ## Documentation Index
> Fetch the complete documentation index at: https://docs.projectx.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# Open Source

> Open source customization for the Gabz Casino Heist resource

## opensource/client/client.lua

Minigames are registered on `projectx-casinoheist-gabz:client:Minigames`. This variant does **not** use `pd-safe` or `pure-minigames` in the default callback.

### Minigame Callback (abbreviated)

```lua theme={null}
lib.callback.register('projectx-casinoheist-gabz:client:Minigames', function(Step)
    local p = promise.new()
    if Step == "ElevatorKeycard" then
        if not exports['projectx-bridge']:MinigameCheck("utk_fingerprint") then p:resolve(false) return Citizen.Await(p) end
        TriggerEvent("utk_fingerprint:Start", 4, 6, 2, function(success) p:resolve(success) end)
    elseif Step == "Cashier" then
        p:resolve(true)
    elseif Step == "ComputerSideOffice" then
        if not exports['projectx-bridge']:MinigameCheck("bl_ui") then p:resolve(false) return Citizen.Await(p) end
        p:resolve(exports["bl_ui"]:PathFind(1, { numberOfNodes = 10, duration = 10000 }))
    elseif Step == "C4" then
        return true
    else
        p:resolve(false)
    end
    return Citizen.Await(p)
end)
```

### Default minigame assignments

| Step | Resource | Function |
| - | - | - |
| `ElevatorKeycard` | `utk_fingerprint` | `Start` (event) |
| `Cashier` | — | skipped (`true`) |
| `ComputerSideOffice` | `bl_ui` | `PathFind` |
| `KeypadMainOffice` | `bl_ui` | `DigitDazzle` |
| `LaptopMainOffice` | `bl_ui` | `KeySpam` |
| `SmokeSecurity` | `lightsout` | `StartLightsOut` |
| `ButtonSecurity` | — | skipped (`true`) |
| `ButtonMiniVault` | `SN-Hacking` | `MemoryCards` |
| `LaptopVaultPutDown` | `bl_ui` | `KeySpam` |
| `PlantJammer` | `bl_ui` | `WaveMatch` |
| `FuseboxVault` | `boii_minigames` | `wire_cut` |
| `ComputerVault` | `boii_minigames` | `chip_hack` |
| `ComputerPuzzle` | `SN-Hacking` | `ColorPicker` |
| `Drilling` / `Drill` | `bl_ui` | `CircleShake` |
| `C4` | — | skipped (`return true`) |
| `Penthouse` / `ButtonPenthouse` | `boii_minigames` | `pincode` |
| `Prop` | `bl_ui` | `CircleProgress` |
| `Fusebox1` | `SN-Hacking` | `SkillBar` |
| `Fusebox2` | `bl_ui` | `KeySpam` |
| `Fusebox3` | `bl_ui` | `Progress` |
| `Fusebox4` | `SN-Hacking` | `Thermite` |
| `Fusebox5` | `bl_ui` | `RapidLines` |
| `Fusebox6` | `bl_ui` | `WaveMatch` |

***

## opensource/server/server.lua

Hooks: `SuccessfulStep(source, step)`, `FailedStep(source, step)`, `InitialCheck(source, Interaction)`, `RobberyResetHook()`.

Permissions for `/projectxcasino`:

```lua theme={null}
function CheckPerms(source)
    return exports['projectx-bridge']:CheckPerms(source, GetCurrentResourceName())
end
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.