[RELEASE] [PAID] utility_bank

Utility Bank


Currently works with:


Experience robbing a bank by having to handle hostages, the script contains 2 possible approaches:

  • Keys: find a set of keys for the vault antechamber door.
  • Kaboom: blow that fucking door!

Script designed to work in co-op/multiplayer, so you can rob together with your best friends!
Read all the functionalities in the Contains section.

The community ideas/feedback will be taken into consideration, we care passionately about customer service.


buybutton previewbutton

Dependencies

Utility Library


Screenshots

Contains
  • Hostage Handling: Take control of the situation by managing hostages. Your actions will determine whether the situation escalates or remains under control. Fail to handle hostages properly, and security shutters will come crashing down, complicating your escape plan.
  • Security Shutters: Encourage players to carefully consider to handling hostages, as triggering the shutters can significantly impact their chances of success. (right now there is no method to be able to control them, in a future update there will be an item for the police to control them remotely and a health to give even criminals a chance to escape)
  • Vault Hacking Mini-Game: Minigame to hack the vault and get your hands on all that juicy loot
  • Robust congruence and validity checks of datas on the server-side to keep your server and script safe. First rule of networking, never trust the client!
  • Complete and rich config
  • Ability to modify framework-related functions so that custom or non-compatible frameworks can also be integrated
Config
Config = {}

Config.Intimidation = {
    label = "INTIMIDATION"
}

Config.Interactions = {
    ["pushable_buttons"] = {
        name = "push",
        label = "Push",
        icon = "fas fa-hand",
        
        distance = 2.0
    },
    ["openable_vault"] = {
        name = "toggleVault",
        label = "Toggle Vault",
        icon = "fas fa-lock",

        distance = 2.0
    },
    ["hack_panel_vault"] = {
        name = "hackVault",
        label = "Hack",
        icon = "fas fa-laptop",

        distance = 2.0
    },

    -- For key pickup interaction
    ["key_pickup"] = {
        name = "keyPickup",
        label = "Pickup Key",
        icon = "fas fa-key",

        distance = 2.0
    }
}

Config.Translations = {
    ["key_required"] = "A key is required to open this door",
    ["open_antechamber_door"] = "Press {E} to unlock the antechamber door",
    ["on_key_pickup"] = "Key for the ~y~vault antechamber~w~ collected",

    ["bomb_required"] = "A bomb is required to open this door",

    ["robbery_started_notify"] = "An alarm went off at a bank!"
}

Config.ResetTime = 2 -- (minutes) Time for which the bank, when being robbed must remain empty (no players inside it) to be resetted

-- This will require: ESX or QBCore
Config.BombItem = "bomb_big" 

-- The blip that will be created when someone robs the bank, as soon as the player approaches it will be automatically deleted; 
-- You can customize when and how it is triggered from the config_functions.lua file. 
 Config.RobberyBlip = {
    name = "Bank Robbery",
    sprite = 586,
    color = 1,
    scale = 1.0,

    duration = 30000 -- If the player does not approach the blip after this time it will be eliminated, set to -1 to disable
}

Config.Banks = {
    -- Dont change the order
    [1] = {
        type = "blaine_branche",
        config = {
            hostages = true, -- This also includes players having to manage hostages to keep the shutters from closing

            keys = {
                enabled = true,

                spawnpoints = {
                    vec3(1697.2170, 3786.4980, 34.1345),
                    vec3(1695.7720, 3787.5842, 35.5373),
                    vec3(1703.3497, 3787.2090, 36.0351),
                    vec3(1700.2557, 3787.3711, 35.9956),
                }
            },

            trollies = {
                enabled = true,
                amountPerBundle = {100, 300} -- [min, max] amount of money per single bundle
            },

            vault_hacking = {
                enabled = true
            },

            -- This will require: ESX or QBCore
            bomb = {
                enabled = false
            }
        }
    },
    [2] = {
        type = "blaine_branche",
        config = {
            hostages = true, -- This also includes players having to manage hostages to keep the shutters from closing

            keys = {
                enabled = true,

                spawnpoints = {
                    vec3(1694.5414, 4857.8970, 42.9374),
                    vec3(1692.4832, 4857.3105, 42.4911),
                    vec3(1692.1604, 4853.9512, 43.6367),
                    vec3(1690.6746, 4851.2715, 43.4203),
                }
            },

            trollies = {
                enabled = true,
                amountPerBundle = {100, 300} -- [min, max] amount of money per single bundle
            },

            vault_hacking = {
                enabled = true
            },

            -- This will require: ESX or QBCore
            bomb = {
                enabled = false
            }
        }
    },
    [3] = {
        type = "blaine_branche",
        config = {
            hostages = true, -- This also includes players having to manage hostages to keep the shutters from closing

            keys = {
                enabled = true,

                spawnpoints = {
                    vec3(581.1383, 2668.2275, 42.5814),
                    vec3(580.5016, 2670.0251, 42.1442),
                    vec3(574.4494, 2671.8772, 43.0783),
                    vec3(577.1849, 2670.5120, 43.4273),
                }
            },

            trollies = {
                enabled = true,
                amountPerBundle = {100, 300} -- [min, max] amount of money per single bundle
            },

            vault_hacking = {
                enabled = true
            },

            -- This will require: ESX or QBCore
            bomb = {
                enabled = false
            }
        }
    },
    [4] = {
        type = "blaine_branche",
        config = {
            hostages = true, -- This also includes players having to manage hostages to keep the shutters from closing

            keys = {
                enabled = true,

                spawnpoints = {
                    vec3(2548.0977, 404.4348, 109.3146),
                    vec3(2549.7883, 404.8145, 108.8830),
                    vec3(2552.5266, 410.5005, 109.8189),
                    vec3(2550.7751, 408.0982, 110.0416),
                }
            },

            trollies = {
                enabled = true,
                amountPerBundle = {100, 300} -- [min, max] amount of money per single bundle
            },

            vault_hacking = {
                enabled = true
            },

            -- This will require: ESX or QBCore
            bomb = {
                enabled = false
            }
        }
    },
    [5] = {
        type = "blaine_branche",
        config = {
            hostages = true, -- This also includes players having to manage hostages to keep the shutters from closing

            keys = {
                enabled = true,

                spawnpoints = {
                    vec3(-3155.2610, 1133.5093, 21.4413),
                    vec3(-3153.3896, 1133.0834, 21.0276),
                    vec3(-3148.6270, 1137.2262, 22.0948),
                    vec3(-3151.2827, 1135.6768, 22.3722),
                }
            },

            trollies = {
                enabled = true,
                amountPerBundle = {100, 300} -- [min, max] amount of money per single bundle
            },

            vault_hacking = {
                enabled = true
            },

            -- This will require: ESX or QBCore
            bomb = {
                enabled = false
            }
        }
    }
}
Config (functions)
Config.Functions = {
    StartFramework = function()
        if GetResourceState("es_extended") ~= "missing" then
            ESX = exports["es_extended"]:getSharedObject()
        elseif GetResourceState("qb-core") ~= "missing" then
            QBCore = exports["qb-core"]:GetCoreObject()
        end
    end,

    RegisterBombItem = function(item)
        -- OnBombItemUse: (source, item) => void
        -- source<number> Its the player id that uses the item
        -- item<string>   The name of the item that is being used 

        if GetResourceState("es_extended") ~= "missing" then
            ESX.RegisterUsableItem(item, OnBombItemUse)
        elseif GetResourceState("qb-core") ~= "missing" then
            QBCore.Functions.CreateUseableItem(item, OnBombItemUse)
        end
    end,

    GiveTrollyMoney = function(source, amount)
        -- https://utility-library.github.io/documentation/server/esx_integration/xplayer/AddMoney/
        AddMoney(source, "cash", amount)
    end,

    RemoveItem = function(source, item, amount)
        -- https://utility-library.github.io/documentation/server/esx_integration/xplayer/RemoveItem/
        RemoveItem(source, item, amount)
    end,

    StartAlarm = function(bankId)
        if ESX then
            local xPlayers = ESX.GetExtendedPlayers('job', 'police')
    
            for _, xPlayer in pairs(xPlayers) do
                xPlayer.showNotification(Config.Translations["robbery_started_notify"])
                TriggerClientAction("SetBlipToBank", xPlayer.source, bankId)
            end
        elseif QBCore then
            local players = QBCore.Functions.GetQBPlayers()

            for _, v in pairs(players) do
                if v and v.PlayerData.job.type == "leo" and v.PlayerData.job.onduty then
                    TriggerClientAction('QBCore:Notify', v.PlayerData.source, Config.Translations["robbery_started_notify"], "primary")
                    TriggerClientAction("SetBlipToBank", v.PlayerData.source, bankId)
                end
            end
        end
    end
}

Other Resources

By XenoS (me)
Utility Library
React Wrapper
LoveDiscord
Crosshair Built In
xenos_anti-powergame
xenos_anti-aimglitch

Paid

Utility Weapons
Utility Pause Menu

By MarKz
Blaine County Branches


Code is accessible No
Subscription-based No
Lines (approximately) ~2500
Requirements utility_lib
Support Yes
3 Likes

there’s support and you can open a ticket, if you have any trouble doing it send me a pm.
please don’t draw any hasty sums if you can’t contact support