Hangman Game

Hangman Game

:video_game: Interactive Gameplay: Let your viewers participate in a classic Hangman game directly in chat.
:moneybag: Point System Support: Integrates with existing point systems (not Twitch Channel Points) to reward users for winning.
:ab: Letter Position Reveal: Displays the correct position of guessed letters in the word.
:bulb: Hint System: Provides a hint after every third incorrect guess, up to 50% of the word’s length.
:abc: Multi-Word Support: Now supports multi-word phrases for added variety and challenge.
:scroll: Used Word Tracking: Keeps track of used words to avoid repetition during the same session.
:trophy: Leaderboard: Displays the top 5 players and personal stats for participants.
:arrow_forward: Multi-Platform Support: Twitch, Trovo, Kick and Youtube are supported platforms!


Import File

HangmanGame-v8.sb (36.9 KB)


Installation

:warning: Prerequisite: Ensure you have a working point system in your setup before using this script.

  • Import the script to SB
  • Activate all commands
  • Edit arguments if needed
  • %wordFilePath% needs to look like this: C:\JustPoint\ToYour\DesiredFolder
  • A .txt file gets created automatically at %filePath%.
  • Edit the .txt file this way:
  hello
  this is awesome
  is this 911
  

Usage

  • !hangman: Starts a new game.
  • To participate in the game, there are three supported guessing methods: word, w or partial sentences: single words of a whole sentence. All of them as a message without prefix.
  • !hmleaderboard: show the 5 best players and your own stats if you’re not on the leaderboard.
  • !hmstats: display your own personal stats.
  • !killhangman: moderator roles only ends the game immediately.
  • !hmrepeat: Shows the “Guess the phrase” message again.
  • !hmreset <@userName|all> <points|wins|both/all>: Resets stats for all or a specific user
    â €

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


Changelogs

Update v8

  • Introducing AntiCheat, typical spam patterns like spamming the whole alphabet will be shamed now.
  • Response behavior got revised and the game will now give clearer responses on guessings.

People will still spam random words to reach their goal, there’s not much to prevent that but i think the current solution at least try to force people to write actual words not just nonsense.

Please let me know if there are issues :slight_smile:

â €

Older Changelogs

v7

  • Removed knownBots and allowBots as logic from the game and leaderboard.
  • Added blockedGroups to the game and leaderboard to handle excluded user via SB inbuild group system.
  • Reworked the leaderboard to adress issues mentioned by @samisama
  • Merged the leaderboard with the auto-reset action.
  • If autoReset = true, it resets either points, wins or both for the platforms listed in autoResetPlatforms at the end of the month.
  • SendAction added to the Leaderboard action. (Twitch only)
  • Updated comments.

v6

  • Fix: Some logs had the wrong loglevel.
  • Renamed the Game from Hangman - The Game to Hangman Game

v5

  • Fix: Partial word guessing works again.
  • Fix: Detecting active platforms is now optimized to minimize failures especially on trovo.
  • Supports all platforms now.
  • Starting the game is now an actual command, so you’ll be able to name it however you want again.
  • Killing a running game is also now a actual command
  • Hints are now randomized to minimize predictability in what could be the next letter.
  • Game stop giving hints if most of the letters are guessed succesfully.
  • Renamed Cooldown Settings to Global & User Cooldown Message and add arguments there to edit those messages.
  • Redesigned some sub-actions and comments to be better readable.
  • Redesigned output message, you now see directly how many guesses are left if you picked the wrong letter.
  • A new command is added that shows the “Guess the phrase” message again with !hmrepeat.

v4

  • Added a simple inbuilt cooldown

  • For both actions:

    • 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

  • Cleaned up some log spam

1 Like