# Classic Blackjack Game

**URL:** <https://extensions.streamer.bot/t/classic-blackjack-game/2522>\
**Category:** Testing\
**Tags:** chat, youtube, twitch, trovo\
**Created:** [February 8, 2025, 9:53pm UTC](https://extensions.streamer.bot/t/classic-blackjack-game/2522 "2025-02-08T21:53:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bans](https://extensions.streamer.bot/user_avatar/extensions.streamer.bot/bans/32/5669_2.png) [@bans](https://extensions.streamer.bot/u/bans)\
**Post date:** [February 8, 2025, 9:53pm UTC](https://extensions.streamer.bot/t/classic-blackjack-game/2522/1 "2025-02-08T21:53:02Z")

</div>

🃏The Casino feeling we all need in chat!🃏

⠀

**Blackjack Game** here is deprecated. Head over to **[Blackjack Game](https://github.com/aaskjer/Blackjack-Game) on Github**

# Features:

🃏 Cards have their own value to make the game more interesting.  
🃏 Feel risky? Try `!blackjack rnd`!  
🃏 Split hands, doubledown and special wins like 5-card charly are possible!  
🃏 Dealer draws on tie to make the game more interesting!  
🃏 Single instanced games  
🕹 Support all platforms currently supported by streamer.bot  
🕹 OBS is supported (check readme)  
⚙ A well structured GUI is used for all settings  
⚙ Edit cooldown time and cooldown messages directly in the GUI  
⚙ Rich in settings to adjust the behavior of the game and to make it yours!

 ![grafik](https://extensions.streamer.bot/uploads/default/original/2X/b/ba81750f513bcbba177a67fc3b41da678c8f1242.png)

* * *

⠀

# **Import Files**

📥 **[ChatBlackjackGame.zip](https://github.com/aaskjer/blackjackforSB/releases/tag/v14) (GitHub)**

## ⠀

# **Installation**

⚠ **Prerequisite** : A working point system is required.

1. Import the script into Streamer.bot.
2. Extract the ‘cards’ Folder to: `streamer.bot/Chat Games/Classic Blackjack Game`.
3. ‘blackjack\_overlay.html’ gets automatically created in: `streamer.bot/Chat Games/Classic Blackjack Game`.
4. Adjust arguments if needed.  
_(Optional)_ Add the OBS overlay:
  1. Install [Source Copy | OBS Forums](https://obsproject.com/forum/resources/source-copy.1261/)
  2. In OBS: `Tools > Source Copy > Load scene > blackjack-OBS-import.json`
  3. Check if the images are still look fancy.

5. Start playing Blackjack!

* * *

# **Commands**

- `!blackjack (<numbers>|%|all/half/quarter/rnd/|1k)`: Start a new game.
- `hit`: Draw the next card.
- `stand`: End your turn and let the dealer play.
- `split`: Split your hands in two. (Only if you have two identical cards)
- `double`: Doubledown your current hand for twice the payout.
- `repeat`: for crowded chats so you can see your current cards again.
- `quit`: Ends game. Only if no hit/stand/double/split happened already.  
⠀

* * *

Disclaimer: This script has been developed with input from the community and support by AI. If you run into any problems, let me know! 🙂

* * *

# **Changelogs**

**v4**

- Reworked entire Codebase to implement finally a GUI.
- Function `AwardPoints` which decided if players win anything even if they spended points got reworked and now handles if the entire game is a `FreeGame`.
- Dealer now acts more natural and has become slightly more messages to feel more like a real interaction.
- Some features have been reworked:
  - The Tie logic got a little rework, you can now decide if the Dealer only picks one card only and end it’s turn (default) or if the Dealer plays till it’s finished.
  - Blackjack Payout is now a Dropdown Menu with common preset payout ratios.
  - `MaxBet` & `MinBet` are not unlimited anymore.
  - Cooldown for commands now directly editable in the GUI including messages.

- **Many** Messages are now editable directly in the GUI. - WIP!
- Many functions got revised and there shouldn’t be no dead ends anymore (sometimes split stopped after first hand for no apparent reason)
- As other scripts of mine, it now supports StreamUP - Currency Core.
- Renamed the Game from `Classic Blackjack Game` to `Chat Blackjack Game` because it’s not _that_ classic in terms of game mechanics.

**WIP & Known issues:**

- Not all messages available in the GUI yet - Coming with next updates.
- OBS Overlay still didn’t got much love and won’t create itself in OBS automatically.
- Due to the nature of the script, Kick and Trovo may have some issues with messages because of rate limitation. Sadly, not much i can do about.

> **Older Changelogs**
>
> **Update v13**
> 
> - Fix: CBJG now talks with OBS again.
> - Fix: Stats are now persistent.
> - Fix: Rare case when split hands aren’t handled correctly and a hand got resolved while the other one wasn’t even played.
> - Fix: Rare case resolved were `TotalBet` and `TotalWon` showed the same.
> - Check your own stats in chat with `!stats` showing various interesting stats like total wins, total losses, split hand wins, etc.
> - Check the leaderboard who won the most wins with the most payout with `!allstats`.
> - Added a new argument in the `Game Settings` sub-action to adjust the number of leaderboard positions with `topCount`.
> - Removed some unused lines.
> 
> No GUI yet. Way more complicated to implement then i thought, so i ditch this idea for now.
> 
> Please let me know about issues 🙂
> 
> **Update v10**
> 
> - Base preparation of the code for future enhancements and play-styles
> - General - Settings renamed to `Chat Appearance`
> - New argument: `showCapMessage` if you want to show an additional message why the output might missmatch the bet amount.
> - New argument: `showAceMsg` mainly just “QoL” - if enabled, shows the “Ace was reduced to…” message
> - New argument: `numberSeparator` - if enabled, you can set a separator like `.` to make long numbers better readable.
> 
> - New Group: `Game Settings`
> - `dealerStandsOn` - now you can decide when the dealer stops drawing to make the dealer either more aggressive or conservatively (was hardcoded to 17 before)
> - `blackjackPayout` - Bonus multiplier for a natural blackjack which was hardcoded to a rnd 0.5 - 1.5 before
> - `maxGamesPerHour` - To tackle the hardcore addicts in your viewerlist, set a number of rounds a user can play in 1 hour.
> - `numDecks` - you can go wild and make a really big deck to draw from (mainly a future feature, already because it’s a base function and was hardcoded to 1)
> - WIP - `reshuffleAt` - percentage that sets when to reshuffle the deck (mainly a future feature but was added for testing purposes)
> 
> - New arguments for `Points Settings` group
> - `minBet` - Minimum bet for individual bets now must be at least `1`
> - `maxBet` - Maximum bet amount now can be anything you want. (0 = no max)
> - `maxPayout` - If you really hate your viewers and don’t want to let them get rich. Sets max. payout regardless of betamount.
> 
> - Users now can use additional fixed bets like: all, half, quarter, double (double of defaultbet), max (= maxBet) or random (deducted points get announced)
> - Probably more which i have forgot.
> 
> OBS overlay still got not much love :Sadge~1: i promiss to deep dive into it when i have more freetime.
> 
> please let me know if anything isn’t working as expected.
> 
> **Update v9.1**
> 
> - Removed the args `freeGame`. Set `defaultBet` to `0` to run free games.
> - Added total points as _Balance_ to all win/lose messages.
> - Fixed: For some reason there was no final win/lose message at ties on free games.
> - Points will be now correctly deducted on `!blackjack`.
> 
> I know the OBS overlay is still a piece of “meh”, i promise to take care of it when i have a little more freetime.
> 
> **v7**
> 
> - Now, the game creates one shared deck per game instance. Dealer and the player draw from the same shared shuffled deck, unlike before.
> - Renamed the Scene to `Blackjack - Game` to prevent overwriting old setups
> - The Game now correctly set up a scene and a browser source for the cards in OBS.
> - All you need to do is, drop the `cards` folder in the root folder of your streamer.bot and everything should be good.
> - The Design for the game is up to you, but you still can use `source copy` to import my copy of the game if you want to use my images.
> 
> **v6**
> 
> - Added an optional graphical overlay for OBS.
> - Overlay is always locked to one running game.
> - Installation instructions in the zip file
> 
> - Reworked some code structure.
> - Refined Log levels.
> - Fixed: Rare cases special moves aren’t recognized correctly.
> - Fixed: Rare case users with no points variable (new users) weren’t able to play a free game.
> 
> **Hotfix v5.4**
> 
> - Fixed: Cooldown sometimes stopped working in rare cases.
> - Fixed: Game stopped from proceeding in rare cases.
> - Should fixed some unnecessary API Calls.
> - Bots now are also ignored by the inbuilt cooldown.
> - Moderators are exempt from cooldown.
> 
> **v5.3**
> 
> - Took care about some background stuff that could lead to some issues
> - Inbuild cooldown now should properly work for all platforms
> - Added `allowBots` as an true/false argument in `General - Settings` if you want to use your bot account for the game.
> - Added `knownBots` in `General - Settings`, now you can add or remove external bots if there is an issue
> 
> **v5.2**
> 
> - Fixed: negative points or other funny stuff isn’t possible anymore.
> - Added `%defaultBet%` args to set a fixed default bet if users don’t specify in `Points Settings`.
> - Removed herobrine.
> - Added an inbuilt cooldown system in `General Settings`. (Moderators are exempt from cooldown)
> - `%cooldownSeconds%` set the cooldown per user in seconds (default is `60`).
> - `%cooldownMessage%` define a custom message and add {userName} and {timeLeft} to show the target users name and the remaining cooldown time of the user.
> 
> - Updated Bot detection so no bot accidentally triggers the game or a command.
> - Added fallback logic for future updates.
> 
> **v5.1**
> 
> - Fixed: On tie, dealer hand now gets correctly calculated and dealer hand is shown.
> - Rearangement of some lines and fixed some typos.
> - Added a “one-time” tutorial message that show up only once per stream. You can use `cleartut` to have the tutorial triggered again if a user plays blackjack. (script doesn’t respond to it to keep it more like a “admin” command)
> - A basic OBS implementation is done. CBJG automatically creates a .txt file at `C:\Streamer.bot\Extensions` that can be used to be shown as text source in OBS.
> - The text source needs to look like this:  
> ![grafik](https://extensions.streamer.bot/uploads/default/original/2X/5/51b07c265c22d1237bfb616d02ad54234b908655.png)
> - You need a font like `Segoe UI Symbol` that can display the cards correclty.
> 
> - Fixed some messages regarding free games
> - If users don’t have points (0) while `freeGame` = ‘false’, CBJG will start automatically a free game for the users. (_Only if a user doesn’t explicitly add a bet or don’t has a point-system variable at all_)
> 
> **v4**
> 
> - Fix: Script now starts correctly only on “!blackjack” command
> - Added more special win moves
> - Script got enhanced to feature the correct card emotes to the numbers/names
> 
> **v3**  
> Probably a minor step for others, but a big step for me in understanding SB stuff
> 
> - Script now knows by itself from which platform a message comes from. (you could basically play simultaniously on all three at the same time :D)
> - Removed now deprecated arguments
> - Added some emotes to messages to look a little more like a blackjack game :cool\_doge:
> 
> **v2.1**
> 
> - New option in ‘Points - Settings’: `freeGame` let users play without using any points.
> - Bugfix: Points are now getting deducted correctly again if available
> 
> **v2**
> 
> - Fixed: “Final hands” messages are now always displayed correctly.
> - For crowded chats, a new command is added: “`repeat`”. Now you can see the last dealer message in a running game.
> 
> **v1**
> 
> - initial release  
> (_hookers not included)_

---

<div class="post-metadata">

**Author:** ![alacran19](https://extensions.streamer.bot/user_avatar/extensions.streamer.bot/alacran19/32/3111_2.png) [@alacran19](https://extensions.streamer.bot/u/alacran19)\
**Post date:** [February 9, 2025, 8:13pm UTC](https://extensions.streamer.bot/t/classic-blackjack-game/2522/2 "2025-02-09T20:13:43Z")

</div>

How can we see how many points we have and can we award them like 50 to start is it based off watch time?

---

<div class="post-metadata">

**Author:** ![bans](https://extensions.streamer.bot/user_avatar/extensions.streamer.bot/bans/32/5669_2.png) [@bans](https://extensions.streamer.bot/u/bans)\
**Post date:** [February 9, 2025, 9:57pm UTC](https://extensions.streamer.bot/t/classic-blackjack-game/2522/3 "2025-02-09T21:57:33Z")

</div>

As mentioned in the opener: you need a points system in SB like “currency core” to be able to see your points. But i already updated the game now, so people can play it without using points.

---

<div class="post-metadata">

**Author:** ![sizzgotawrench](https://extensions.streamer.bot/user_avatar/extensions.streamer.bot/sizzgotawrench/32/5276_2.png) [@sizzgotawrench](https://extensions.streamer.bot/u/sizzgotawrench)\
**Post date:** [October 1, 2025, 6:10am UTC](https://extensions.streamer.bot/t/classic-blackjack-game/2522/4 "2025-10-01T06:10:07Z")

</div>

im having a problem with the game taking more than its supposed to when someone loses. if someone bets 20k and loses, it takes more than 20k from their points. how can i fix this issue. other than that, this game is awesome, i just cant have people complaining about cheating

---

<div class="post-metadata">

**Author:** ![bans](https://extensions.streamer.bot/user_avatar/extensions.streamer.bot/bans/32/5669_2.png) [@bans](https://extensions.streamer.bot/u/bans)\
**Post date:** [October 5, 2025, 9:09am UTC](https://extensions.streamer.bot/t/classic-blackjack-game/2522/5 "2025-10-05T09:09:42Z")

</div>

Hey, i tried my best but can’t replicate your issue. if someone complains about that, you can check SB Logs, every lose/win is tracked there within the name of the user. Pls check if you really have the latest version i know there were some version where it was broken for some reason.
