Magic 8 Ball w/ Result Action


Magic 8 Ball that can be triggered from commands or Twitch Channel Rewards. Any trigger that allows for input of the question being asked.


Import Code (1.6 KB)


Magic 8 (2.8 KB)


In click the Import button in the top menu. Drag the .sb file above into the Import String field.

  1. Extract the zip’s contents into a folder (usually a folder containing your streaming assets).

  2. In OBS add a browser source, name it “Magic 8 Ball”
    a. Tick "Local file" & navigate to the index.html file in the new “Magic 8 Ball” folder.
    b. Set size to be 1920 x 1080
    c. Tick both “Shutdown source when not visible” & “Refresh browser when scene becomes active”

  3. Enable the !8ball command in Commands tab and/or assign/create the Twitch Channel Reward for the trigger

  4. If it is not running, start the websocket server and and tick “Auto Start”.


Action 1: Magic 8 Ball

Set the Scene and Source fields to point to the “Magic 8 Ball” source you just created for both of the Set Source Visibility sub-actions (Visible/Hidden sub-actions)

Action 2: Magic 8 Ball Result

Change the text of the chat message as you like.

If you are using and want the answer spoken via TTS, enable the UDP Broadcast, double-click to edit and change the Voice field to match the one you want to use from your system.

Change the Ball’s Answer Possibilities

In the Magic 8 Ball folder you created is a file called script.js. Open this file in any text editor to edit and change the possible answers.

Keep in mind:

  • Answers need to be kept short to fit in the space

  • Answers will need to be styled each line to fit in a triangle

  • Each answer alternates the direction of the triangle, odd numbered answers have the triangle pointing up and even number answers have the triangle pointing down. Example:
    First one
    Starts short
    On top & longer
    On the bottom line
    The 2nd one would
    Be longer on the
    Top, then get
    Smaller on


Lyfesaver74 & Whipstickgostop

This extension was developed from a Codepen that has been reused so much we are unable to determine the original, true author.