Skip to main content
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

This file handles zone creation, drawtext, evidence, stress, and most importantly, the minigame callback. If you want to change the minigames used for each step, this is the only file you need to edit.

Minigame Callback

Each robbery step triggers the projectx-bobcatheist-k4mb1:client:Minigames callback with the step name. You can swap any minigame by replacing the export call inside the matching elseif block.
lib.callback.register('projectx-bobcatheist-k4mb1:client:Minigames', function(Step)
    local p = promise.new()
    if Step == "C4Entrance" then
        if not exports['projectx-bridge']:MinigameCheck("lightsout") then p:resolve(false) return Citizen.Await(p) end
        local success = exports['lightsout']:StartLightsOut(4, 20)
        p:resolve(success)
    elseif Step == "EntranceKeypad" then
        if not exports['projectx-bridge']:MinigameCheck("SN-Hacking") then p:resolve(false) return Citizen.Await(p) end
        local success = exports['SN-Hacking']:Thermite(7, 5, 10000, 2, 2, 3000)
        p:resolve(success)
    elseif Step == "SecurityFingerprint" 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 == "MainKeypad" then
        if not exports['projectx-bridge']:MinigameCheck("SN-Hacking") then p:resolve(false) return Citizen.Await(p) end
        local success = exports['SN-Hacking']:MemoryCards('hard')
        p:resolve(success)
    elseif Step == "VaultPanel" then
        if not exports['projectx-bridge']:MinigameCheck("SN-Hacking") then p:resolve(false) return Citizen.Await(p) end
        local success = exports['SN-Hacking']:ColorPicker(5, 7000, 3000)
        p:resolve(success)
    end
    return Citizen.Await(p)
end)
You can return true unconditionally inside any step block to skip that minigame entirely. This can be useful for testing or for steps you want to make automatic.
The default minigames per step are:
StepMinigame ResourceFunction
C4EntrancelightsoutStartLightsOut
EntranceKeypadSN-HackingThermite
C4SecuritylightsoutStartLightsOut
SecurityFingerprintutk_fingerprintStart (event)
SearchDeskox_libskillCheck
SearchBelongingsox_libskillCheck
ComputerDeskSN-HackingThermite
SmokeHallwaylightsoutStartLightsOut
MainKeypadSN-HackingMemoryCards
Fuseboxox_libskillCheck
SurveillanceRoomKeypadSN-HackingThermite
ComputerSN-HackingMemoryCards
C4VaultlightsoutStartLightsOut
VaultPanelSN-HackingColorPicker
Crateox_libskillCheck

opensource/server/server.lua

This file handles dispatch, item/money functions, logging, and exposes several hooks you can use to run custom logic at specific points in the robbery.

Hooks

Called whenever a player successfully completes a robbery step. Use this to award XP, trigger events, or log individual step completions.
function SuccessfulStep(source, step)
    if step == "EntranceKeypad" then
        -- exports['projectx-bridge']:AddExperience(source, 'criminal', 10)
    end
end
All available step names can be found in Config.BobcatSteps inside config/config.lua.
Called whenever a player fails a robbery step. Use this to remove XP, items, or apply penalties.
function FailedStep(source, step)
    if step == "EntranceKeypad" then
        -- RemoveItem(source, 'x_device', 1)
    end
end
Called before a player can start the robbery. Return false to block them.
function InitialCheck(Interaction)
    return true
    -- Add a group check, tablet requirement, or any other gate here
end
Called whenever the heist resets. Use this to update a scoreboard, trigger an external event, or notify players.
function RobberyResetHook()
    -- TriggerEvent('my-scoreboard:update')
end