Description
Streamer.bot Minigame: Bank Heist
A fully automated, dynamic minigame for Streamer.bot (Twitch). Viewers can form a heist crew by betting channel points and attempt to rob a bank together. The system supports flexible survival chances based on user roles (Broadcaster, Mod, VIP, User), dynamic timer controls, and multiple outcome scenarios.
Default language is German in this bot. But you can change it in the setup.
System Architecture & Workflow
The minigame operates on a **3-phase logic**:
1. **Lobby Phase (Join):**
-
A user initiates the heist with “!heist”.
-
The script saves the start time as an ISO-8601 timestamp and enables the “Join Timer”.
-
Other users can join the heist crew within the entry window (heistJoinTime) using !heist < bet >.
2. **Execution Phase:**
-
When the “Join Timer” expires, Streamer.bot triggers the “ExecuteHeist()” entry point.
-
Each crew member rolls individually against their role-based survival chance.
-
Chat outcome messages are chosen based on success (Full Success, Partial Success, Total Failure).
3. **Cooldown Phase:**
-
After the heist, the bank enters a lockout period (heistCooldown).
-
The “Cooldown Timer” is started.
-
Once elapsed, “ResetCooldown()” clears the lockout **and sends a chat reminder (heistMsgReminder)** announcing that the bank can be raided again.
Video Tutorial
Import File
minigame_bankheist.sb (18.4 KB)
Resources
No extra resources are needed. All within streamer.bot.
Installation
First Step
In Streamer.bot click the Import button in the top menu. Drag the **.sb** file into the Import String field.
Second Step
Initial all Settigs and Timers (default is German).
Via Chat
Execute the following command in your Twitch chat as the Broadcaster or a Moderator:
!raub status setup
Via Trigger - Core > Test
Also a Trigger is in the Action [MINIGAME] [Bankheist] Code - Main with the argument Name: status Value: setup to run the setup.
Configuration
First Step
Copy the Timer IDs by right-clicking each timer (Copy ID) into the 2 variables (heistJoinTimerId, heistCooldownTimerId)
-
[MINIGAME] [Bankheist] Timer - Join
-
[MINIGAME] [Bankheist] Timer - Cooldown
Second Step
Configure all Variables as you wish inside these actions.
-
[MINIGAME] [Bankheist] Settings - Config
-
[MINIGAME] [Bankheist] Settings - Language
[MINIGAME] [Bankheist] Settings - Config → heistPointsVariable : If you use “[Currency] Core System” you need to set this to “points”.
Also you can change the Command for the heist in Commands (default is !raub)
Third Step
Reconfigure all Variables as mention in Installation → Second Step
Commands
| Command | Description |
|---|---|
| !raub status setup | To starting the setup initial (Only as Broadcaster/Mod) |
| !raub 2000 | To join a heist with 2000 Points (must be between heistMinBet and heistMaxBet) |
| !raub status | To get the actual status of the heist or Cooldown |
This is the only command !raub that you need to configure. All others are managed in the C# Code.
Variables & Arguments Overview
1. Global Configuration Variables (`Persisted Globals`)
Action: [MINIGAME] [Bankheist] Settings - Config
These values are stored permanently (Global Variables) in Streamer.bot to control the game rules:
| Variable | Default Value | Description |
|---|---|---|
| heistPointsVariable | “userPoints” | Name of the points variable in Twitch user database. |
| heistDefaultPoints | 1000 | Starting balance for new users without a points record. |
| heistMinBet | 50 | Minimum bet amount per robber. |
| heistMaxBet | 10000 | Maximum bet amount per robber. |
| heistMinParticipants | 1 | Minimum required participants to start. |
| heistWinMultiplier | “1.8” | Payout multiplier for surviving robbers. |
| heistJoinTime | 60 | Duration of the join lobby in seconds. |
| heistCooldown | 300 | Bank lockout period after a heist in seconds. |
| heistJoinTimerId | “” | The GUID of the Join Timer from Streamer.bot. |
| heistCooldownTimerId | “” | The GUID of the Cooldown Timer from Streamer.bot. |
| heistChanceBroadcaster | 95 | Survival chance for the streamer (in %). |
| heistChanceMod | 80 | Survival chance for moderators (in %). |
| heistChanceVip | 70 | Survival chance for VIPs (in %). |
| heistChanceUser | 50 | Survival chance for regular viewers (in %). |
Also you can change and define it in the action
2. Chat & Language Templates (heistMsg…)
Action: [MINIGAME] [Bankheist] Settings - Language
Supports placeholders such as %user%, %command%, %remainingTime%, %amount%, %survivors%, %caught%, %payout%, %min%, %max%:
| Variable | Trigger Event / Function |
|---|---|
| heistMsgStart | Lobby announcement when the first user runs !heist. |
| heistMsgJoined | Confirmation message for joining robbers. |
| heistMsgReminder | Announcement sent when cooldown ends & bank opens again. |
| heistMsgNotEnoughPoints | Error message when a user lacks required points. |
| heistMsgInvalidBet | Error message for bets outside allowed min/max boundaries. |
| heistMsgCooldown | Notice when trying to start a heist during lockout. |
| heistMsgAlreadyIn | Notice when a user attempts to join multiple times. |
| heistMsgNotEnoughPlayers | Cancellation message if minimum participants aren’t met. |
| heistMsgProgress | Message sent when entering the vault. |
| heistMsgSuccess | Chat message when all robbers escape successfully. |
| heistMsgPartial | Chat message when some get caught & others escape. |
| heistMsgFailed | Chat message when all robbers are busted. |
| heistMsgStatusActive | Response to !heist status during an active lobby. |
| heistMsgStatusCooldown | Response to !heist status during the cooldown period. |
| heistMsgStatusIdle | Response to !heist status when game is idle (includes %min%-%max%). |
| heistMsgNobodySurvivors | Variable within (Success/Partial/Failed) |
| heistMsgNobodyCaught | Variable within (Success/Partial/Failed) |
Also you can change and define it in the action for diffrent language (default is german)
3. Dynamic Runtime Variables (Internal)
Managed automatically by the script during execution:
| Variable | Function |
|---|---|
| heist_active (bool) | Indicates whether a join lobby is currently open. |
| heist_cooldown_active (bool) | Indicates whether the bank is currently locked out. |
| heist_participants (Dictionary) | Stores crew data formatted as “userId|userName|betAmount”. |
| heist_start_time_iso (string) | ISO-8601 start timestamp for exact %remainingTime% calculations. |
| heist_last_run_iso (string) | ISO-8601 completion timestamp for cooldown checks & self-healing |
| heist_used_command (string) | Stores the primary chat command used (e.g., !heist or !raub) |
Testing Log
Testing Phase Log
Version 1
Running now multiple Days stable.




