> ## 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 Prompt Ammunation Robbery resource

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

## opensource/client/client.lua

Each robbery step triggers the `projectx-ammunationrobbery-prompt:client:Minigames` callback with the step name.

```lua theme={null}
lib.callback.register('projectx-ammunationrobbery-prompt:client:Minigames', function(Step)
    local p = promise.new()
    if Step == "Fusebox" then
        if not exports['projectx-bridge']:MinigameCheck("boii_minigames") then p:resolve(false) return Citizen.Await(p) end
        exports['boii_minigames']:wire_cut({style = 'default', timer = 60000}, function(success)
            p:resolve(success)
        end)
    elseif Step == "Register" then
        if not exports['projectx-bridge']:MinigameCheck("bl_ui") then p:resolve(false) return Citizen.Await(p) end
        local success = exports["bl_ui"]:CircleShake(1, 50, 2)
        p:resolve(success)
    elseif Step == "Computer1" then
        if not exports['projectx-bridge']:MinigameCheck("boii_minigames") then p:resolve(false) return Citizen.Await(p) end
        exports['boii_minigames']:chip_hack({style = 'default', loading_time = 8000, chips = 2, timer = 30000}, function(success)
            p:resolve(success)
        end)
    elseif Step == "Computer2" then
        if not exports['projectx-bridge']:MinigameCheck("bl_ui") then p:resolve(false) return Citizen.Await(p) end
        local success = exports["bl_ui"]:Untangle(1, {numberOfNodes = 10, duration = 15000})
        p:resolve(success)
    elseif Step == "GunCrate" then
        if not exports['projectx-bridge']:MinigameCheck("bl_ui") then p:resolve(false) return Citizen.Await(p) end
        local success = exports["bl_ui"]:RapidLines(2, 50, 4)
        p:resolve(success)
    elseif Step == "ExplosivesCrate" then
        if not exports['projectx-bridge']:MinigameCheck("boii_minigames") then p:resolve(false) return Citizen.Await(p) end
        exports['boii_minigames']:pincode({style = 'default', difficulty = 1, guesses = 10}, function(success)
            p:resolve(success)
        end)
    elseif Step == "ArmorCrate" then
        if not exports['projectx-bridge']:MinigameCheck("bl_ui") then p:resolve(false) return Citizen.Await(p) end
        local success = exports["bl_ui"]:CircleProgress(3, 75)
        p:resolve(success)
    elseif Step == "ElectricBox" then
        if not exports['projectx-bridge']:MinigameCheck("bl_ui") then p:resolve(false) return Citizen.Await(p) end
        local success = exports["bl_ui"]:MineSweeper(3, {grid = 7, duration = 10000, target = 10, previewDuration = 2000})
        p:resolve(success)
    elseif Step == "Timer" then
        if not exports['projectx-bridge']:MinigameCheck("boii_minigames") then p:resolve(false) return Citizen.Await(p) end
        exports['boii_minigames']:safe_crack({style = 'default', difficulty = 1}, function(success)
            p:resolve(success)
        end)
    elseif Step == "OfficeDoor" then
        if not exports['projectx-bridge']:MinigameCheck("bl_ui") then p:resolve(false) return Citizen.Await(p) end
        local success = exports["bl_ui"]:CircleShake(1, 25, 1)
        p:resolve(success)
    elseif Step == "Gun" then
        local success = lib.skillCheck({'easy', 'easy', 'medium', 'hard'}, {'w', 'a', 's', 'd'})
        p:resolve(success)
    elseif Step == "Ammo" then
        if not exports['projectx-bridge']:MinigameCheck("bl_ui") then p:resolve(false) return Citizen.Await(p) end
        local success = exports["bl_ui"]:KeySpam(2, 50)
        p:resolve(success)
    elseif Step == "Keypad" then
        if not exports['projectx-bridge']:MinigameCheck("pure-minigames") then p:resolve(false) return Citizen.Await(p) end
        local gameData = {totalNumbers = 20, seconds = 20, timesToChangeNumbers = 4, amountOfGames = 1, incrementByAmount = 5}
        local success = exports['pure-minigames']:numberCounter(gameData)
        p:resolve(success)
    elseif Step == "Code" then
        if not exports['projectx-bridge']:MinigameCheck("SN-Hacking") then p:resolve(false) return Citizen.Await(p) end
        local success = exports['SN-Hacking']:SkillBar({2000, 3000}, 10, 2)
        p:resolve(success)
    end
    return Citizen.Await(p)
end)
```

| Step              | Minigame Resource | Function         |
| ----------------- | ----------------- | ---------------- |
| `Fusebox`         | `boii_minigames`  | `wire_cut`       |
| `Register`        | `bl_ui`           | `CircleShake`    |
| `Computer1`       | `boii_minigames`  | `chip_hack`      |
| `Computer2`       | `bl_ui`           | `Untangle`       |
| `GunCrate`        | `bl_ui`           | `RapidLines`     |
| `ExplosivesCrate` | `boii_minigames`  | `pincode`        |
| `ArmorCrate`      | `bl_ui`           | `CircleProgress` |
| `ElectricBox`     | `bl_ui`           | `MineSweeper`    |
| `Timer`           | `boii_minigames`  | `safe_crack`     |
| `OfficeDoor`      | `bl_ui`           | `CircleShake`    |
| `Gun`             | `ox_lib`          | `skillCheck`     |
| `Ammo`            | `bl_ui`           | `KeySpam`        |
| `Keypad`          | `pure-minigames`  | `numberCounter`  |
| `Code`            | `SN-Hacking`      | `SkillBar`       |

***

## opensource/server/server.lua

Hooks: `SuccessfulStep(source, location, step)`, `FailedStep(source, location, step)`, `InitialCheck(src, Location, Interaction)`, and `RobberyResetHook(location)`.
