Hangman - The Game

Features

: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 and Youtube are supported platforms


Import File

:inbox_tray: Hangman - The Game.sb (28.7 KB)

HTG may not work properly with alpha version of SB!


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.

Disclaimer: This script was collaboratively developed with community contributions and assisted by AI (ChatGPT & Gemini). It is provided “as-is” but i will try to help as good as i can.


Changelog:

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
Old Changelogs

v3

  • Multi-Platform support for twitch, trovo, youtube!
  • reworked guessing:
    • Users can not guess like this anymore: h e l l o such messages will be ignored.
    • If the word to guess looks like this for example: _____-_____ users can guess the words in single messages.
    • guessing single letters/numbers still works of course, but only one letter per message.
  • guessLimit has also been revised: only incorrect guesses now increase the counter. This way, it’s fairer for users when guessLimit is no longer tied to the character length of the longest word.
  • In favor of multi-platform support, sendAction got removed.
  • Some sub-action changes:
    • wordFilePath got moved to the group general settings.
    • Hangman Settings renamed to Game Settings.
  • The .txt file created by the script is renamed to Hangman-Wordlist.txt and is used across all platforms.

(After overwriting the old script, it is advisable to restart SB to avoid any malfunctions)

Hotfix v2.2
Just some QoL stuff, you don’t need to update to this version if you’re happy with the old version

  • added a new group ‘General Settings’ containing 2 new arguments:
    • useBot decide if messages should be send with broadcaster or bot account
    • sendAction decide if messages should be displays cursive (like with /me) or non-cursive as before.

This applies to all actions

(yes, i know it says v2.1 in the sub-actions. Just forgot to updated)

1 Like