Truth or Dare Game

by angasailakshmi in Living > Toys & Games

49 Views, 0 Favorites, 0 Comments

Truth or Dare Game

ChatGPT Image Sep 10, 2026, 05_10_38 AM.png

Truth or Dare is a fun and interactive game created using Scratch. The game allows the player to choose between Truth and Dare and then generates a random question or challenge.

This project uses Scratch lists, variables, operators, conditions, loops, user input, and random numbers to make the game interactive. The player enters Truth or Dare, and the program responds accordingly. For Truth, it displays a random question from the Truth List. For Dare, it provides a random challenge from the Dare List.

Supplies

  1. Pictoblox Software: Download PictoBlox | Windows, MacOS, Linux, Chromebook, Android & iOS
  2. Laptop/PC
  3. Inbuilt or External Camera Setup
  4. Speaker or Headphones

Create the Lists

Open Scratch.

Create a new project.

Add a suitable background for the Truth or Dare game.

Add or select a sprite to interact with the player.

Rename the project Truth or Dare Game.


Create the Lists

Go to Variables → Make a List and create these three lists:

Truth List

Dare List

Answer

Add at least 5 questions to the Truth List.

Truth Questions

What is your favorite food?

What is your favorite movie?

What is your biggest fear?

Who is your best friend?

What is your dream job?

Dare Challenges

Dance for 10 seconds.

Sing a song.

Act like a robot.

Say the alphabet backwards.

Do 5 jumping jacks.

Truth or Dare – Step-by-Step Block Code

Screenshot 2026-09-10 050013.png

Step 1: Create the Lists

Go to Variables → Make a List and create these 3 lists:

  1. Truth List
  2. Dare List
  3. Answer

Add items to Truth List

For example:

  1. What is your favorite food?
  2. Who is your best friend?
  3. What is your favorite movie?
  4. What is your hobby?
  5. What is your dream job?

Add items to Dare List

  1. Sing a song.
  2. Dance for 10 seconds.
  3. Make a funny face.
  4. Do 5 jumping jacks.
  5. Say the alphabet backwards.

Step 2: Main Starting Code

From Events, drag:

when green flag clicked

From Motion, add:

go to x: (-123) y: (-89)

Then from Variables, add:

hide list [Dare List]
hide list [Truth List]
hide list [Answer]
delete all of [Answer]

So the complete starting code is:

when green flag clicked
go to x: -123 y: -89
hide list [Dare List]
hide list [Truth List]
hide list [Answer]
delete all of [Answer]

Step 3: Create the Forever Loop

From Control, add:

forever

Inside the forever loop, go to Sensing and add:

ask [Truth or Dare?] and wait

So far:

when green flag clicked
go to x: -123 y: -89
hide list [Dare List]
hide list [Truth List]
hide list [Answer]
delete all of [Answer]

forever
ask [Truth or Dare?] and wait

Step 4: Create the Truth Condition

From Control, add:

if <> then

From Operators, use the or block.

You need two OR blocks to create three possible inputs.

Build the condition like this:

if <<(answer) = [Truth]> or
<(answer) = [truth]> or
<(answer) = [t]>> then

This means the game accepts:

  1. Truth
  2. truth
  3. t

Step 5: Add Truth List Blocks

Inside the Truth if block, add:

1. Show Truth List

show list [Truth List]

2. Ask the player to pick a number

From Sensing:

ask [pick random 1 to 5] and wait

For the 1 to 5 part, go to Operators and use:

pick random 1 to 5

So:

ask (pick random 1 to 5) and wait

3. Add answer to Answer list

From Variables:

add (answer) to [Answer]

4. Show Answer list

show list [Answer]

5. Wait

wait 1 seconds

6. Hide Answer list

hide list [Answer]

7. Hide Truth List

hide list [Truth List]

Complete Truth section

if <<(answer) = [Truth]> or
<(answer) = [truth]> or
<(answer) = [t]>> then

show list [Truth List]
ask (pick random 1 to 5) and wait
add (answer) to [Answer]
show list [Answer]
wait 1 seconds
hide list [Answer]
hide list [Truth List]

Step 6: Create the Dare Condition

Below the Truth if block, create another:

if <> then

Build the condition:

if <<(answer) = [Dare]> or
<(answer) = [dare]> or
<(answer) = [D]>> then

This accepts:

  1. Dare
  2. dare
  3. D

Step 7: Add Dare List Blocks

Inside the Dare if block, add:

1. Show Dare List

show list [Dare List]

2. Pick a random number

From Operators:

pick random 1 to 5

Put it inside:

say (pick random 1 to 5) for 10 seconds

3. Add Dare to Answer

add [Dare] to [Answer]

4. Show Answer

show list [Answer]

5. Wait

wait 1 seconds

6. Hide Answer

hide list [Answer]

7. Hide Dare List

hide list [Dare List]

Complete Dare section

if <<(answer) = [Dare]> or
<(answer) = [dare]> or
<(answer) = [D]>> then

show list [Dare List]
say (pick random 1 to 5) for 10 seconds
add [Dare] to [Answer]
show list [Answer]
wait 1 seconds
hide list [Answer]
hide list [Dare List]

Step 8: Add Background Music

Create a separate script.

From Events:

when green flag clicked

From Control:

forever

From Sound:

play sound [Eggs] until done

Complete code:

when green flag clicked
forever
play sound [Eggs] until done

This will continuously play the Eggs sound while the game is running.

Step 9: Complete Block Structure

Your final code should look like this:

when green flag clicked
go to x: -123 y: -89
hide list [Dare List]
hide list [Truth List]
hide list [Answer]
delete all of [Answer]

forever
ask [Truth or Dare?] and wait

if <<answer = Truth> or
<answer = truth> or
<answer = t>> then

show list [Truth List]
ask (pick random 1 to 5) and wait
add (answer) to [Answer]
show list [Answer]
wait 1 seconds
hide list [Answer]
hide list [Truth List]

if <<answer = Dare> or
<answer = dare> or
<answer = D>> then

show list [Dare List]
say (pick random 1 to 5) for 10 seconds
add [Dare] to [Answer]
show list [Answer]
wait 1 seconds
hide list [Answer]
hide list [Dare List]

And separately:

when green flag clicked
forever
play sound [Eggs] until done


Applications of the Truth or Dare Game

Entertainment – Can be played with friends and family for fun.

Classroom Icebreaker – Teachers can use it to help students interact and become comfortable with each other.

Team-Building Activities – Can encourage communication and participation among team members.

Party Games – Can be used as an interactive game during parties and social gatherings.

Learning Programming – Helps students understand Scratch concepts such as lists, conditions, loops, variables, and random numbers.

Conclusion

Truth or dare

The Truth or Dare Game is an interactive Scratch project that combines fun with programming concepts. By using lists, variables, loops, conditions, user input, random numbers, and sounds, the project creates an engaging game experience. This project helps students improve their logical thinking, creativity, problem-solving, and programming skills while learning how to build an interactive game in Scratch.