Mayosis

Quiz Game

Oct 27th, 2021 (edited)
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @echo off
  2. color 0a
  3. title -----------------------Quiz Game---------------------------
  4. :menu
  5. cls
  6. echo You can edit this game click donwload and edit!
  7. echo Hey! Welcome to the game!
  8. echo 1) Start!
  9. echo 2) How to play
  10. echo 3) Exit
  11. set /p number=
  12.  
  13. if %number% ==  1  goto Start Game
  14. if %number% ==  2 goto How to play
  15. if %number% ==  3 goto Exit
  16.  
  17. :Start Game
  18. cls
  19. echo Type your name:
  20. set /p name=
  21. echo Hello %name%!
  22. echo Do you want to start the quiz? (y/n)
  23. set/p start=
  24. if %start% == y goto level1
  25. if%start% == n goto main menu
  26. goto Start Game
  27.  
  28. :How to play
  29. cls
  30. echo Press the number of the answer then hit enter.
  31. echo go back? (y/n)
  32. set /p menugoto=
  33. if %menugoto% == y goto menu
  34. if %menugoto% == n goto exit
  35. goto How to play
  36.  
  37. :Exit
  38. echo Thanks for playing %name%
  39. goto Exit
  40.  
  41. :level1
  42. cls
  43. echo Okay , Let's Start the game.
  44. echo What is 10 + 10?
  45. echo 1)  1
  46. echo 2) 20
  47. echo 3) 200
  48.  
  49. set /p answer1=
  50. if %answer1% == 1 goto wrong1
  51. if %answer1% == 2 goto correct1
  52. if %answer1% == 3 goto wrong1
  53. \goto level1
  54.  
  55. :correct1
  56. echo You are right! Next Level?(y/n)
  57. set /p NL1=
  58.  
  59. if  %NL1% == y goto level2
  60. if  %NL1% == n goto menu
  61. goto correct1
  62.  
  63. :wrong1
  64. echo Sadly , you went wrong.  Retry? (y/n)
  65. set /p WA1=
  66. if %WA1% == y goto level1
  67. if %WA1% == n goto menu
  68. goto wrong1
  69.  
  70. :level2
  71.  
  72. cls
  73. echo Who is on the 100 dollar bill?
  74. echo 1) Ben Franklin
  75. echo 2) Tommy King
  76. echo 3) Thomas Train
  77. echo 4) Jeff Dunham
  78. set /p command=
  79. if %command% == 1 goto correct2
  80. if %command% == 2 goto wrong2
  81. if %command% == 3 goto wrong2
  82. if %command% == 4 goto wrong2
  83. goto  level2
  84.  
  85. :correct2
  86. cls
  87. echo Yes! You are right %name% ! Next level (y/n)?
  88. set /p Command=
  89. if %Command% == y goto level3
  90. if %Command% == n goto level2
  91. goto correct2
  92.  
  93. :wrong2
  94. cls
  95. echo You LOST! %name% RETRY GAME? (y/n)
  96. set /p retry=
  97. if %retry% == y goto level2
  98. if %retry% == n goto menu
  99. goto wrong2
  100.  
  101. :level3
  102. cls
  103. echo Who is the Prime Minister of India?
  104. echo 1) %name%
  105. echo 2) Narendra Modi
  106. echo 3) Pranab Mukharjee
  107. echo 4) Rajendra Prasad
  108. set /p command2=
  109. if %command2% == 1 goto wrong3
  110. if %command2% == 2 goto correct3
  111. if %command2% == 3 goto wrong3
  112. if %command2% == 4 goto wrong3
  113. goto level3
  114.  
  115. :correct3
  116. cls
  117. echo Wright answer Next Level(y/n)
  118. set /p CommanD=
  119. if %CommanD% == y goto level4
  120. if %CommanD% == n goto level3
  121. goto correct3
  122.  
  123. :wrong3
  124. cls
  125. echo No it is wrong answer!
  126. echo Do you want to retry? (y/n)
  127. set /p ry=
  128. if %ry% == y goto level3
  129. if %ry% == n goto menu
  130. goto wrong3
  131.  
  132. :level4
  133. cls
  134. echo This is the last level %name%
  135. echo Who is known as the father of the nation?
  136. echo 1) Mahatma Gandhi
  137. echo 2) You
  138. echo 3) Jawarharlal Nehru
  139. echo 4) Bhagat Singh
  140. set /p aa=
  141. if %aa% == 1 goto correct4
  142. if %aa% == 2 goto wrong4
  143. if %aa% == 3 goto wrong4
  144. if %aa% == 4 goto wrong4
  145. goto level4
  146.  
  147. :correct4
  148. cls
  149. echo Congratulations %name% You have won the game friend
  150. goto correct4
  151.  
  152. :wrong4
  153. cls
  154. echo YOU HAVE LOST THE GAME %name%
  155. echo Do you want to restart the whole game? (y/n)
  156. set /p restart=
  157. if %restart% == y goto level1
  158. if %restart% == n goto menu
Add Comment
Please, Sign In to add comment