> For the complete documentation index, see [llms.txt](https://souda-hub.gitbook.io/souda-hub-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://souda-hub.gitbook.io/souda-hub-docs/scripts/bank-robbery.md).

# Bank Robbery

## Dependencies

* community\_bridge (<https://github.com/TheOrderFivem/community_bridge>)\
  souda-uniqueue (Group System and Queue)
* glitch-minigames and glitch-notifications (Optional Just Used for minigames you can use your own)

## Unescrowed

### Shared (config.lua)

```lua
Config = {}

Config.Banks = {
    {
        keypadLoc = vector4(144.34773254395, -1042.8605957031, 29.702436447144, 160.0), --Location of where keypad spawns
        keypaddoor = vector3(144.102, -1042.873, 29.526), --Location Of Keypad Door
        secondDoorLoc = vector3(146.75662231445, -1044.4951171875, 29.525550842285), -- Location of Target of 2nd Door
        seconddoor = vector3(146.75662231445, -1044.4951171875, 29.525550842285), -- Location of 2nd Door
        accessCard = vector3(149.21894836426, -1048.8724365234, 29.227670669556), --Location of Access Card to Spawn
        thirdDoor = vector3(151.034, -1046.974, 25.201), --Location of Stairs Door Location
        ThirdDoorLoc = vector3(151.41986083984, -1047.3114013672, 25.327522277832), --Location of Target of Stairs Door Location
        vaultDoor = 'vaultbankdoor1', --Don't Change
        vaultDoorLoc = vector3(148.91223144531, -1041.7330322266, 25.763179779053), --Vault door Location
        vaultDoorDefaultHeading = 69.846, -- Vault Door Reset Heading
        Objects = { --Money Trolley Each gives MoneyRandom() defined in svconfig.lua
            vector4(148.80917358398, -1037.9716796875, 24.523792266846, 160.0),
            vector4(147.5401763916, -1037.505859375, 24.523792266846, 160.0),
            vector4(146.27117919922, -1037.0401611328, 24.523792266846, 160.0),
            vector4(144.8790435791, -1038.50390625, 24.523792266846, -95.154),
            vector4(144.1844329834, -1040.3966064453, 24.523792266846, -115.154),
            vector4(143.27056884766, -1042.8864746094, 24.523792266846, -35.154),
            vector4(146.77903747559, -1044.4206542969, 24.523792266846, 64.846),
        },
        Crate = {
            vector4(153.08741760254, -1042.7927246094, 24.050647735596, -110.154)
        },
        Safe = {
            vector4(147.49893188477, -1042.3641357422, 24.050647735596, -110.154)
        },
        Loots = { -- Drill Loot Zones
            vector3(143.68, -1039.07, 25.07),
            vector3(142.92, -1040.92, 25.40),
            vector3(143.85, -1043.86, 25.23),
            vector3(145.25, -1044.40, 25.12)
        }
    },
    {
        keypadLoc = vector4(308.57534790039, -281.31723022461, 54.563083648682, 160.0),
        keypaddoor = vector3(308.38787841797, -281.34725952148, 54.315551757812),
        secondDoorLoc = vector3(311.04721069336, -282.96188354492, 54.315551757812),
        seconddoor = vector3(311.04721069336, -282.96188354492, 54.315551757812),
        accessCard = vector3(314.00576782227, -283.76788330078, 54.13597869873),
        thirdDoor = vector3(315.33154296875, -285.4289855957, 49.990550994873),
        ThirdDoorLoc = vector3(315.71798706055, -285.765625, 50.117523193359),
        vaultDoor = 'vaultbankdoor2',
        vaultDoorLoc = vector3(313.19540405273, -280.19403076172, 50.55318069458),
        vaultDoorDefaultHeading = 70.379,
        Objects = { --Money Trolley Each gives MoneyRandom() defined in svconfig.lua
            vector4(313.08224487305, -276.43295288086, 49.313793182373, 160.0),
            vector4(311.81198120117, -275.97064208984, 49.313793182373, 160.0),
            vector4(310.54174804688, -275.50830078125, 49.313793182373, 160.0),
            vector4(309.15356445312, -276.97573852539, 49.313793182373, -95.154),
            vector4(308.46401977539, -278.87020874023, 49.313793182373, -115.154),
            vector4(307.55685424805, -281.36264038086, 49.313793182373, -35.154),
            vector4(311.06942749023, -282.88732910156, 49.313793182373, 64.846),
        },
        Crate = {
            vector4(317.37341308594, -281.24252319336, 48.840648651123, -110.154)
        },
        Safe = {
            vector4(311.78381347656, -280.82888793945, 48.840648651123, -110.154)
        },
        Loots = {
            vector3(308.05, -277.16, 50.12),
            vector3(307.30, -279.49, 50.20),
            vector3(307.85, -282.20, 50.04),
            vector3(309.69, -282.95, 49.73)
        }
    },
    {
        keypadLoc = vector4(-356.51840209961, -52.119369506836, 49.414894104004, 160.0),
        keypaddoor = vector3(-356.73046875, -52.152744293213, 49.162551879883),
        secondDoorLoc = vector3(-354.04959106445, -53.731224060059, 49.162551879883),
        seconddoor = vector3(-354.04959106445, -53.731224060059, 49.162551879883),
        accessCard = vector3(-349.43655395508, -55.002563476562, 48.982978820801),
        thirdDoor = vector3(-349.73229980469, -56.140174865723, 44.837551116943),
        ThirdDoorLoc = vector3(-349.34130859375, -56.471565246582, 44.96452331543),
        vaultDoor = 'vaultbankdoor3',
        vaultDoorLoc = vector3(-351.93902587891, -50.93461227417, 45.40018081665),
        vaultDoorDefaultHeading = 70.985,
        Objects = { --Money Trolley Each gives MoneyRandom() defined in svconfig.lua
            vector4(-352.10305786133, -47.17541885376, 44.160793304443, 160.0),
            vector4(-353.37942504883, -46.730308532715, 44.160793304443, 160.0),
            vector4(-354.65579223633, -46.28519821167, 44.160793304443, 160.0),
            vector4(-356.02401733398, -47.771282196045, 44.160793304443, -95.154),
            vector4(-356.68786621094, -49.674903869629, 44.160793304443, -115.154),
            vector4(-357.5612487793, -52.179351806641, 44.160793304443, -35.154),
            vector4(-354.02835083008, -53.656394958496, 44.160793304443, 64.846),
        },
        Crate = {
            vector4(-347.74722290039, -51.926502227783, 43.687648773193, -110.154)
        },
        Safe = {
            vector4(-353.34188842773, -51.588497161865, 43.687648773193, -110.154)
        },
        Loots = {
            vector3(-356.97, -47.85, 44.93),
            vector3(-357.93, -50.30, 44.86),
            vector3(-357.30, -52.95, 44.73),
            vector3(-355.60, -53.76, 44.79)
        }
    },
    {
        keypadLoc = vector4(-1214.8981933594, -336.26876831055, 38.17244720459, -150.0),
        keypaddoor = vector3(-1215.0048828125, -336.42599487305, 37.931903839111),
        secondDoorLoc = vector3(-1212.0115966797, -335.57745361328, 37.931903839111),
        seconddoor = vector3(-1212.0115966797, -335.57745361328, 37.931903839111),
        accessCard = vector3(-1207.279296875, -336.68182373047, 37.652156829834),
        thirdDoor = vector3(-1207.2878417969, -334.11907958984, 33.606903076172),
        ThirdDoorLoc = vector3(-1206.7780761719, -334.06521606445, 33.733875274658),
        vaultDoor = 'vaultbankdoor4',
        vaultDoorLoc = vector3(-1212.5764160156, -332.11962890625, 34.169532775879),
        vaultDoorDefaultHeading = 117.262,
        Objects = { --Money Trolley Each gives MoneyRandom() defined in svconfig.lua
            vector4(-1215.408203125, -329.6418762207, 32.930145263672, 152.0),
            vector4(-1216.6116943359, -330.25750732422, 32.930145263672, 152.0),
            vector4(-1217.8151855469, -330.87313842773, 32.930145263672, 152.0),
            vector4(-1217.6854248047, -332.88900756836, 32.930145263672, -47.908),
            vector4(-1216.7673339844, -334.68383789062, 32.930145263672, -67.38),
            vector4(-1215.5593261719, -337.0451965332, 32.930145263672, 12.602),
            vector4(-1212.0511474609, -335.51043701172, 32.930145263672, 112.04),
        },
        Crate = {
            vector4(-1208.9639892578, -329.77328491211, 32.457000732422, -62.908)
        },
        Safe = {
            vector4(-1213.0725097656, -333.58575439453, 32.457000732422, -62.08)
        },
        Loots = {
            vector3(-1217.94, -333.59, 33.99),
            vector3(-1217.13, -336.17, 33.64),
            vector3(-1214.84, -337.55, 34.02),
            vector3(-1213.02, -336.59, 33.77)
        }
    },
    {
        keypadLoc = vector4(1179.5989990234, 2710.7736816406, 38.516120910645, 0.0),
        keypaddoor = vector3(1179.7637939453, 2710.8771972656, 38.238162994385),
        secondDoorLoc = vector3(1176.7126464844, 2711.4848632812, 38.238162994385),
        seconddoor = vector3(1176.7126464844, 2711.4848632812, 38.238162994385),
        accessCard = vector3(1172.0318603516, 2711.1938476562, 38.058589935303),
        thirdDoor = vector3(1171.8428955078, 2712.337890625, 33.913162231445),
        ThirdDoorLoc = vector3(1171.3646240234, 2712.5222167969, 34.040134429932),
        vaultDoor = 'vaultbankdoor5',
        vaultDoorLoc = vector3(1175.6407470703, 2708.1494140625, 34.475791931152),
        vaultDoorDefaultHeading = -89.757,
        Objects = { --Money Trolley Each gives MoneyRandom() defined in svconfig.lua
            vector4(1177.0333251953, 2704.6538085938, 33.236404418945, 0.0),
            vector4(1178.3851318359, 2704.6538085938, 33.236404418945, 0.0),
            vector4(1179.7369384766, 2704.6538085938, 33.236404418945, 0.0),
            vector4(1180.5395507812, 2706.5075683594, 33.236404418945, 105.0),
            vector4(1180.5395507812, 2708.5236816406, 33.236404418945, 85.0),
            vector4(1180.5395507812, 2711.1760253906, 33.236404418945, 165.00),
            vector4(1176.7172851562, 2711.4072265625, 33.236404418945, -95.0),
        },
        Crate = {
            vector4(1171.3560791016, 2707.7055664062, 32.763259887695, 90.0)
        },
        Safe = {
            vector4(1176.75, 2709.2287597656, 32.763259887695, 90.0)
        },
        Loots = {
            vector3(1177.91, 2711.88, 34.01),
            vector3(1180.09, 2711.93, 33.92),
            vector3(1181.40, 2709.85, 33.78),
            vector3(1180.99, 2706.61, 34.15)
        }
    },
    {
        keypadLoc = vector4(-2958.8312988281, 478.25329589844, 16.154863357544, -90.0),
        keypaddoor = vector3(-2958.7419433594, 478.08868408203, 15.846946716309),
        secondDoorLoc = vector3(-2958.0183105469, 481.11447143555, 15.846946716309),
        seconddoor = vector3(-2958.0183105469, 481.11447143555, 15.846946716309),
        accessCard = vector3(-2958.189453125, 483.98043823242, 15.667373657227),
        thirdDoor = vector3(-2956.7785644531, 486.41918945312, 11.648917198181),
        ThirdDoorLoc = vector3(-2956.9807128906, 485.9482421875, 11.521946907043),
        vaultDoor = 'vaultbankdoor6',
        vaultDoorLoc = vector3(-2961.3107910156, 482.31265258789, 12.084575653076),
        vaultDoorDefaultHeading = 177.819,
        Objects = { --Money Trolley Each gives MoneyRandom() defined in svconfig.lua
            vector4(-2964.8569335938, 481.0539855957, 10.845189094543, -92.21),
            vector4(-2964.9084472656, 479.70321655273, 10.845189094543, -92.21),
            vector4(-2964.9599609375, 478.35241699219, 10.845189094543, -92.21),
            vector4(-2963.1379394531, 477.47985839844, 10.845189094543, 12.89),
            vector4(-2961.1232910156, 477.40313720703, 10.845189094543, -7.181),
            vector4(-2958.4729003906, 477.30218505859, 10.845189094543, 72.819),
            vector4(-2958.0961914062, 481.11285400391, 10.845189094543, -172.89),
        },
        Crate = {
            vector4(-2961.5910644531, 486.61108398438, 10.372044563293, -2.181)
        },
        Safe = {
            vector4(-2960.2744140625, 481.16305541992, 10.372044563293, -2.181)
        },
        Loots = {
            vector3(-2957.384, 479.333, 11.649),
            vector3(-2957.587, 477.3, 11.618),
            vector3(-2959.593, 476.229, 11.536),
            vector3(-2963.313, 476.473, 11.669)
        }
    },
}

Config.SyncDUI = false -- This will sync dui/tv minigame to all players in the heist,
-- There will be input delay your server ping (EG: 30ms * 2 = 60ms) as it has to send the data to all clients, 
-- but it will make it so everyone sees the same thing.
-- if false only the player doing the minigame will see it. 
-- (Recommended to set to false for performance reasons) 

ItemUsed = {
    card = 'security_card_01',
    lockpick = 'advancedlockpick',
    thirdDoorSecond = 'electronickit',
    thirdDoor = 'security_card_02',
    thermite = 'thermite',
    drill = 'drill',
    crowbar = 'WEAPON_CROWBAR'
}
-- Spawns Loot inside safe according to its offset you can use sollumz/blender to find offsets inside the safe model (xm3_prop_xm3_safe_01a),
-- make sure to add the vector3 offset of where the safe is placed in the world to the offsets 
-- you find in the model to get the correct location to spawn the loot.
Config.SafeLoots = {
    {model = 'vw_prop_vw_key_card_01a', offset = vector3(0.33174, -0.5, 1.02979), heading = 0.0, amount = 1, item = 'security_card_01', chance = 90},
    {model = 'prop_j_neck_disp_02', offset = vector3(-0.235883, 0.03405, 1.13867), heading = 20.0, amount = 1, item = 'goldchain', chance = 50},
    {model = 'hei_prop_heist_gold_bar', offset = vector3(0.01496, 0.0, 1.05762), heading = 0.0, amount = 1, item = 'goldbar', chance = 50},
    {model = 'hei_prop_heist_gold_bar', offset = vector3(0.137939, 0.0, 1.05762), heading = 0.0, amount = 1, item = 'goldbar', chance = 50},
    {model = 'prop_box_ammo04a', offset = vector3(-0.033717, -0.145017, 0.133789), heading = 0.0, amount = {200, 400}, item = 'ammo-9', chance = 30},
}
--60 Seconds
Cooldown = 600
```

### Client Open (clientopen.lua)

```lua
--This returns true on Hack Passed on Failed False Same in below minigames also

function KeypadHack()
    return exports['glitch-minigames']:StartCircuitBreaker(
        1, -- levelNumber
        0, -- difficultyLevel
        1000, -- delayStartMs
        5000, -- minFailureDelayTimeMs
        5000, -- maxFailureDelayTimeMs
        0, -- disconnectChance
        10000, -- disconnectCheckRateMs
        3000, -- minReconnectTimeMs
        30000  -- maxReconnectTimeMs
    )
end

function LockpickHack()
    return exports['glitch-minigames']:StartCircleClickGame(
        5, -- rounds
        2, -- rotationSpeed
        45, -- targetZoneSize
        3, -- maxFailures
        0.3, -- speedIncrease
        true  -- randomizeDirection
    )
end

function LaptopHack()
    return exports['glitch-minigames']:StartCircleClickGame(
        5, -- rounds
        2, -- rotationSpeed
        45, -- targetZoneSize
        3, -- maxFailures
        0.3, -- speedIncrease
        true  -- randomizeDirection
    )
end

function ThermiteHack()
    return exports['glitch-minigames']:StartMemoryGame(
        5, -- gridSize
        8, -- squareCount
        3, -- rounds
        3000, -- showTime
        3  -- maxWrongPresses
    )
end

function DrillHack()
    return exports['glitch-minigames']:StartPlasmaDrilling(5)
end

function DispatchAlert()
    exports['ps-dispatch']:FleecaBankRobbery()
end

LaptopSpawnLocation = vector4(564.8704, -3120.85449, 18.5667534, 0.0)
```

### Server Config (svconfig.lua)

```lua
Items = {
    {item = 'gold', amount = math.random(2, 5)},
    {item = 'goldenmonkey', amount = math.random(1,2)},
    {item = 'goldwatch', amount = math.random(2, 5)},
    {item = 'WEAPON_HAMMER', amount = 1},
    {item = 'heavyarmor', amount = 3},
    {item = 'armor', amount = math.random(1, 4)},
}

CrateLoot = { --Any Random One is picked
    {item = 'armor', amount = math.random(1, 3)},
    {item = 'WEAPON_HAMMER', amount = math.random(1, 1)},
}

JobTypePolice = 'police' -- For Getting on duty count

MinGroupMembersRequired = 3
MaxGroupMembersRequired = 5

MinPoliceRequired = 3

function MoneyRandom()
    return math.random(20000, 25000)
end
```

## Logic

#### Initization of Heist

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

DUI Laptop **/group** to create group memebers according to config min max mumbers needed to start you can interact with laptop with **SPACEBAR**&#x20;

A Location Will be Assigned of Bank Start Hack Here\
&#x20;![](/files/godGlmlli8NeUZuL7NXu)\
\
Find Access Card\
\
Attach it here and MInigames\
![](/files/2dOtCLQhSummrmfZmbjq)

DUI Minigame on Monitor For Safe Code\
![](/files/fUfLKfQ3DNGbEvc8vYZA)\
\
![](/files/Hi5ELpZM1FLm7CdYnqPQ)\
Open Vault via Thermite\
![](/files/dbG5uMTYVkSUAbBf9LzE)\
![](/files/8NrBdde2bIwYnzDF2GQg)

Inside You Can Loot Trolley\
\
Enter the code from minigame inside safe and you get more loot thats it\
\
Full Preview :- <https://www.youtube.com>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://souda-hub.gitbook.io/souda-hub-docs/scripts/bank-robbery.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.
