> ## 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 files available for customization in the Default Paleto Bank Robbery resource

Most of the core logic in this resource is handled by the bridge. The open source files let you customize minigames, add hooks for custom systems, and extend the script without touching escrow.

## opensource/client/client.lua

This file handles zone creation, drawtext, evidence, stress, and the minigame callback. To change minigames per step, edit the `projectx-paletobankrobbery-default:client:Minigames` callback.

<Info>
  Return `true` inside any step block to skip that minigame entirely (useful for testing).
</Info>

The default minigames per step are:

| Step              | Minigame Resource | Function         |
| ----------------- | ----------------- | ---------------- |
| `Fusebox`         | `boii_minigames`  | `wire_cut`       |
| `EmployeeDoor`    | `bl_ui`           | `CircleShake`    |
| `Vent`            | `bl_ui`           | `CircleProgress` |
| `BackDoorFusebox` | `boii_minigames`  | `wire_cut`       |
| `Keypad`          | `boii_minigames`  | `pincode`        |
| `Search`          | `bl_ui`           | `KeySpam`        |
| `Puzzle`          | `bl_ui`           | `Progress`       |
| `ElectricBox`     | `SN-Hacking`      | `SkillBar`       |
| `VaultKey`        | `bl_ui`           | `CircleShake`    |
| `VaultGate`       | `SN-Hacking`      | `SkillBar`       |
| `MainComputer1`   | `boii_minigames`  | `chip_hack`      |
| `MainComputer2`   | `SN-Hacking`      | `MemoryCards`    |
| `SideFusebox1`    | `SN-Hacking`      | `Thermite`       |
| `SideFusebox2`    | `boii_minigames`  | `chip_hack`      |
| `SideFusebox3`    | `pure-minigames`  | `numberCounter`  |
| `Vault2`          | `xdecrypto`       | `StartHack`      |

***

## opensource/server/server.lua

This file handles dispatch, item/money helpers, logging, and hooks you can extend.

### Hooks

<AccordionGroup>
  <Accordion title="SuccessfulStep(source, step)" icon="circle-check">
    Called when a player completes a robbery step. Use for XP, logging, or custom rewards.
  </Accordion>

  <Accordion title="FailedStep(source, step)" icon="circle-xmark">
    Called when a player fails a step. Use for penalties or item removal.
  </Accordion>

  <Accordion title="InitialCheck(src, Interaction)" icon="shield-check">
    Return `false` to block the robbery from starting (group checks, tablet gates, etc.).
  </Accordion>

  <Accordion title="RobberyResetHook()" icon="rotate">
    Called when the heist resets. Use for scoreboards or external events.
  </Accordion>
</AccordionGroup>

Step names match keys in `Config.PaletoSteps` inside `config/config.lua`.
