Advertisement
Guest User

Minecraft Guitar Hero - main.mcfunction

a guest
Jul 1st, 2020
2,171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.57 KB | None | 0 0
  1. ##### IMPORTS #####
  2. scoreboard objectives add new minecraft.custom:minecraft.play_one_minute
  3. execute if score @p new matches 1 run tp @p 0 65.1 -1 0 24
  4. effect give @p night_vision 9999 0 true
  5. effect give @p invisibility 9999 0 true
  6. effect give @p resistance 9999 100 true
  7. effect give @p instant_health 9999 100 true
  8. effect give @p saturation 9999 0 true
  9. team add green
  10. team add red
  11. team add yellow
  12. team add blue
  13. team add orange
  14. execute if score Streak score matches 0..149 run team modify green color green
  15. execute if score Streak score matches 0..149 run team modify red color red
  16. execute if score Streak score matches 0..149 run team modify yellow color yellow
  17. execute if score Streak score matches 0..149 run team modify blue color blue
  18. execute if score Streak score matches 0..149 run team modify orange color gold
  19. execute if score Streak score matches 150 run team modify green color aqua
  20. execute if score Streak score matches 150 run team modify red color aqua
  21. execute if score Streak score matches 150 run team modify yellow color aqua
  22. execute if score Streak score matches 150 run team modify blue color aqua
  23. execute if score Streak score matches 150 run team modify orange color aqua
  24. team join green @e[tag=green]
  25. team join red @e[tag=red]
  26. team join yellow @e[tag=yellow]
  27. team join blue @e[tag=blue]
  28. team join orange @e[tag=orange]
  29. scoreboard objectives add delay dummy
  30. scoreboard players add delay delay 1
  31. execute if score delay delay matches 5.. run scoreboard players set delay delay 0
  32. scoreboard objectives add score dummy {"text":"SCORE","color":"yellow","bold":"true"}
  33. team add main
  34. team modify main color dark_purple
  35. team join main @p
  36. kill @e[type=item]
  37.  
  38.  
  39. ##### MAIN #####
  40. ## Setup
  41. #execute unless entity @e[tag=green,tag=note] run summon minecraft:armor_stand 2 65 10 {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1,Tags:["green","note"],DisabledSlots:4144959,ArmorItems:[{},{},{},{id:"minecraft:egg",Count:1b,tag:{CustomModelData:2}}],Glowing:1b}
  42. #execute unless entity @e[tag=red,tag=note] run summon minecraft:armor_stand 1 65 10 {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1,Tags:["red","note"],DisabledSlots:4144959,ArmorItems:[{},{},{},{id:"minecraft:egg",Count:1b,tag:{CustomModelData:4}}],Glowing:1b}
  43. #execute unless entity @e[tag=yellow,tag=note] run summon minecraft:armor_stand 0 65 10 {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1,Tags:["yellow","note"],DisabledSlots:4144959,ArmorItems:[{},{},{},{id:"minecraft:egg",Count:1b,tag:{CustomModelData:6}}],Glowing:1b}
  44. #execute unless entity @e[tag=blue,tag=note] run summon minecraft:armor_stand -1 65 10 {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1,Tags:["blue","note"],DisabledSlots:4144959,ArmorItems:[{},{},{},{id:"minecraft:egg",Count:1b,tag:{CustomModelData:8}}],Glowing:1b}
  45. #execute unless entity @e[tag=orange,tag=note] run summon minecraft:armor_stand -2 65 10 {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1,Tags:["orange","note"],DisabledSlots:4144959,ArmorItems:[{},{},{},{id:"minecraft:egg",Count:1b,tag:{CustomModelData:10}}],Glowing:1b}
  46.  
  47. execute unless entity @e[tag=green,tag=circle] run summon minecraft:armor_stand 2 65 1 {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1,Tags:["green","circle"],DisabledSlots:4144959,ArmorItems:[{},{},{},{id:"minecraft:egg",Count:1b,tag:{CustomModelData:1}}]}
  48. execute unless entity @e[tag=red,tag=circle] run summon minecraft:armor_stand 1 65 1 {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1,Tags:["red","circle"],DisabledSlots:4144959,ArmorItems:[{},{},{},{id:"minecraft:egg",Count:1b,tag:{CustomModelData:3}}]}
  49. execute unless entity @e[tag=yellow,tag=circle] run summon minecraft:armor_stand 0 65 1 {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1,Tags:["yellow","circle"],DisabledSlots:4144959,ArmorItems:[{},{},{},{id:"minecraft:egg",Count:1b,tag:{CustomModelData:5}}]}
  50. execute unless entity @e[tag=blue,tag=circle] run summon minecraft:armor_stand -1 65 1 {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1,Tags:["blue","circle"],DisabledSlots:4144959,ArmorItems:[{},{},{},{id:"minecraft:egg",Count:1b,tag:{CustomModelData:7}}]}
  51. execute unless entity @e[tag=orange,tag=circle] run summon minecraft:armor_stand -2 65 1 {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1,Tags:["orange","circle"],DisabledSlots:4144959,ArmorItems:[{},{},{},{id:"minecraft:egg",Count:1b,tag:{CustomModelData:9}}]}
  52.  
  53. ## Timer start
  54. scoreboard objectives add timer dummy
  55. scoreboard objectives add reset minecraft.used:minecraft.carrot_on_a_stick
  56. replaceitem entity @p hotbar.0 carrot_on_a_stick
  57. execute unless score @p timer matches 0.. run scoreboard players set @p timer 0
  58. execute unless score @p score matches 0.. run scoreboard players set @p score 0
  59. execute if score @p reset matches 1.. if score @p timer matches 0 run title @p title {"text":"Get ready!","color":"dark_red"}
  60. execute if score @p reset matches 1.. if score @p timer matches 0 run scoreboard players set @p timer 1
  61. execute if score @p reset matches 1.. if score @p timer matches 10.. run title @p title {"text":"Stopped","color":"red"}
  62. execute if score @p reset matches 1.. if score @p timer matches 10.. run scoreboard players set @p timer 0
  63. scoreboard players set @p reset 0
  64.  
  65. execute if score @p timer matches 0..1 as @p at @s run kill @e[tag=symbol]
  66. execute if score @p timer matches 0..1 as @p at @s run fill 3 64 2 3 64 11 soul_soil
  67. execute if score @p timer matches 0..1 as @p at @s run fill 3 65 2 3 65 11 air
  68. execute if score @p timer matches 0..1 as @p at @s run fill -3 63 2 -3 63 11 air
  69.  
  70. # ///// CHANGE STOPSOUND VALUE FOR SONG ///// #
  71. execute if score @p timer matches 0..1 as @p at @s run stopsound @p master minecraft:pigstep_modified
  72. # ///// CHANGE STOPSOUND VALUE FOR SONG ///// #
  73.  
  74. execute if score @p timer matches 0..1 as @p at @s run scoreboard players set @p score 0
  75. execute if score @p timer matches 0..1 as @p at @s run scoreboard players set missed accuracy 0
  76. execute if score @p timer matches 0..1 as @p at @s run scoreboard players set @p accuracy 0
  77. execute if score @p timer matches 0..1 as @p at @s run scoreboard players set progress accuracy 0
  78. execute if score @p timer matches 0..1 as @p at @s run scoreboard players set Accuracy score 0
  79. execute if score @p timer matches 0..1 as @p at @s run scoreboard players set Streak score 0
  80.  
  81. # ///// CHANGE PLAYSOUND VALUE FOR SONG ///// #
  82. execute if score @p timer matches 1 as @p at @s run playsound minecraft:pigstep_modified master @p
  83. # ///// CHANGE PLAYSOUND VALUE FOR SONG ///// #
  84.  
  85. execute if score @p timer matches 1.. as @p at @s run scoreboard players add @s timer 1
  86.  
  87. scoreboard objectives add start dummy
  88.  
  89. # ///// THIS IS A DELAY TO ALLOW THE PLAYER TO GET READY. The song starts after 100 ticks, equivalent to 5 seconds. ///// #
  90. execute if score @p timer matches 0..99 run scoreboard players set @p start 0
  91. execute if score @p timer matches 100.. run scoreboard players set @p start 1
  92. # ///// THIS IS A DELAY TO ALLOW THE PLAYER TO GET READY. The song starts after 100 ticks, equivalent to 5 seconds. ///// #
  93.  
  94. #bossbar add track {"text":"Insert track name"}
  95.  
  96. # ///// CHANGE TEXT VALUE FOR SONG ///// #
  97. execute if score delay delay matches 0 run bossbar set track name {"text":"Lena Raine - Pigstep (2:27)"}
  98. # ///// CHANGE TEXT VALUE FOR SONG ///// #
  99.  
  100. execute if score delay delay matches 0 run bossbar set track players @a
  101. execute if score delay delay matches 0 run execute store result bossbar track max run scoreboard players get track length
  102. execute if score delay delay matches 0 run execute store result bossbar track value run scoreboard players get @p timer
  103.  
  104. ## Note movement
  105. execute if score Streak score matches 0..149 as @e[tag=green,tag=note] run data merge entity @s {ArmorItems:[{},{},{},{id:"minecraft:egg",Count:1b,tag:{CustomModelData:2}}],Glowing:1b,DisabledSlots:4144959,NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1}
  106. execute if score Streak score matches 0..149 as @e[tag=red,tag=note] run data merge entity @s {ArmorItems:[{},{},{},{id:"minecraft:egg",Count:1b,tag:{CustomModelData:4}}],Glowing:1b,DisabledSlots:4144959,NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1}
  107. execute if score Streak score matches 0..149 as @e[tag=yellow,tag=note] run data merge entity @s {ArmorItems:[{},{},{},{id:"minecraft:egg",Count:1b,tag:{CustomModelData:6}}],Glowing:1b,DisabledSlots:4144959,NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1}
  108. execute if score Streak score matches 0..149 as @e[tag=blue,tag=note] run data merge entity @s {ArmorItems:[{},{},{},{id:"minecraft:egg",Count:1b,tag:{CustomModelData:8}}],Glowing:1b,DisabledSlots:4144959,NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1}
  109. execute if score Streak score matches 0..149 as @e[tag=orange,tag=note] run data merge entity @s {ArmorItems:[{},{},{},{id:"minecraft:egg",Count:1b,tag:{CustomModelData:10}}],Glowing:1b,DisabledSlots:4144959,NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1}
  110. execute if score Streak score matches 0..149 as @e[tag=green,tag=line] run data merge entity @s {ArmorItems:[{},{},{},{id:"minecraft:egg",Count:1b,tag:{CustomModelData:11}}],Glowing:1b,DisabledSlots:4144959,NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1}
  111. execute if score Streak score matches 0..149 as @e[tag=red,tag=line] run data merge entity @s {ArmorItems:[{},{},{},{id:"minecraft:egg",Count:1b,tag:{CustomModelData:12}}],Glowing:1b,DisabledSlots:4144959,NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1}
  112. execute if score Streak score matches 0..149 as @e[tag=yellow,tag=line] run data merge entity @s {ArmorItems:[{},{},{},{id:"minecraft:egg",Count:1b,tag:{CustomModelData:13}}],Glowing:1b,DisabledSlots:4144959,NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1}
  113. execute if score Streak score matches 0..149 as @e[tag=blue,tag=line] run data merge entity @s {ArmorItems:[{},{},{},{id:"minecraft:egg",Count:1b,tag:{CustomModelData:14}}],Glowing:1b,DisabledSlots:4144959,NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1}
  114. execute if score Streak score matches 0..149 as @e[tag=orange,tag=line] run data merge entity @s {ArmorItems:[{},{},{},{id:"minecraft:egg",Count:1b,tag:{CustomModelData:15}}],Glowing:1b,DisabledSlots:4144959,NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1}
  115.  
  116. execute if score Streak score matches 150.. as @e[tag=note] run data merge entity @s {ArmorItems:[{},{},{},{id:"minecraft:egg",Count:1b,tag:{CustomModelData:16}}],Glowing:1b,DisabledSlots:4144959,NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1}
  117. execute if score Streak score matches 150.. as @e[tag=line] run data merge entity @s {ArmorItems:[{},{},{},{id:"minecraft:egg",Count:1b,tag:{CustomModelData:17}}],Glowing:1b,DisabledSlots:4144959,NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1}
  118.  
  119. #Speed
  120. execute as @e[tag=symbol] at @s run tp @s ~ ~ ~-0.285
  121.  
  122. ## Mechanics
  123. scoreboard objectives add incr dummy
  124. execute if score Streak score matches 0..9 run scoreboard players set incr incr 50
  125. execute if score Streak score matches 10..19 run scoreboard players set incr incr 100
  126. execute if score Streak score matches 20..29 run scoreboard players set incr incr 150
  127. execute if score Streak score matches 30..149 run scoreboard players set incr incr 200
  128. execute if score Streak score matches 150.. run scoreboard players set incr incr 400
  129.  
  130. #Detect note
  131. execute if score Streak score matches 0..149 if data entity @p {SelectedItemSlot:2} as @e[tag=green,tag=circle] at @s positioned ~ ~ ~-0.4 as @e[tag=symbol,distance=..0.4] at @e[tag=green,tag=circle] run particle flame ~ ~0.25 ~ 0.0 0.0 0.0 1.0 0 force
  132. execute if score Streak score matches 0..149 if data entity @p {SelectedItemSlot:3} as @e[tag=red,tag=circle] at @s positioned ~ ~ ~-0.4 as @e[tag=symbol,distance=..0.4] at @e[tag=red,tag=circle] run particle flame ~ ~0.25 ~ 0.0 0.0 0.0 1.0 0 force
  133. execute if score Streak score matches 0..149 if data entity @p {SelectedItemSlot:4} as @e[tag=yellow,tag=circle] at @s positioned ~ ~ ~-0.4 as @e[tag=symbol,distance=..0.4] at @e[tag=yellow,tag=circle] run particle flame ~ ~0.25 ~ 0.0 0.0 0.0 1.0 0 force
  134. execute if score Streak score matches 0..149 if data entity @p {SelectedItemSlot:5} as @e[tag=blue,tag=circle] at @s positioned ~ ~ ~-0.4 as @e[tag=symbol,distance=..0.4] at @e[tag=blue,tag=circle] run particle flame ~ ~0.25 ~ 0.0 0.0 0.0 1.0 0 force
  135. execute if score Streak score matches 0..149 if data entity @p {SelectedItemSlot:6} as @e[tag=orange,tag=circle] at @s positioned ~ ~ ~-0.4 as @e[tag=symbol,distance=..0.4] at @e[tag=orange,tag=circle] run particle flame ~ ~0.25 ~ 0.0 0.0 0.0 1.0 0 force
  136.  
  137. execute if score Streak score matches 150.. if data entity @p {SelectedItemSlot:2} as @e[tag=green,tag=circle] at @s positioned ~ ~ ~-0.4 as @e[tag=symbol,distance=..0.4] at @e[tag=green,tag=circle] run particle soul_fire_flame ~ ~0.25 ~ 0.0 0.0 0.0 1.0 0 force
  138. execute if score Streak score matches 150.. if data entity @p {SelectedItemSlot:3} as @e[tag=red,tag=circle] at @s positioned ~ ~ ~-0.4 as @e[tag=symbol,distance=..0.4] at @e[tag=red,tag=circle] run particle soul_fire_flame ~ ~0.25 ~ 0.0 0.0 0.0 1.0 0 force
  139. execute if score Streak score matches 150.. if data entity @p {SelectedItemSlot:4} as @e[tag=yellow,tag=circle] at @s positioned ~ ~ ~-0.4 as @e[tag=symbol,distance=..0.4] at @e[tag=yellow,tag=circle] run particle soul_fire_flame ~ ~0.25 ~ 0.0 0.0 0.0 1.0 0 force
  140. execute if score Streak score matches 150.. if data entity @p {SelectedItemSlot:5} as @e[tag=blue,tag=circle] at @s positioned ~ ~ ~-0.4 as @e[tag=symbol,distance=..0.4] at @e[tag=blue,tag=circle] run particle soul_fire_flame ~ ~0.25 ~ 0.0 0.0 0.0 1.0 0 force
  141. execute if score Streak score matches 150.. if data entity @p {SelectedItemSlot:6} as @e[tag=orange,tag=circle] at @s positioned ~ ~ ~-0.4 as @e[tag=symbol,distance=..0.4] at @e[tag=orange,tag=circle] run particle soul_fire_flame ~ ~0.25 ~ 0.0 0.0 0.0 1.0 0 force
  142.  
  143. execute if score @p start matches 1 if data entity @p {SelectedItemSlot:2} as @e[tag=green,tag=circle] at @s positioned ~ ~ ~-0.4 as @e[tag=symbol,distance=..0.4] at @s run scoreboard players add Streak score 1
  144. execute if score @p start matches 1 if data entity @p {SelectedItemSlot:3} as @e[tag=red,tag=circle] at @s positioned ~ ~ ~-0.4 as @e[tag=symbol,distance=..0.4] at @s run scoreboard players add Streak score 1
  145. execute if score @p start matches 1 if data entity @p {SelectedItemSlot:4} as @e[tag=yellow,tag=circle] at @s positioned ~ ~ ~-0.4 as @e[tag=symbol,distance=..0.4] at @s run scoreboard players add Streak score 1
  146. execute if score @p start matches 1 if data entity @p {SelectedItemSlot:5} as @e[tag=blue,tag=circle] at @s positioned ~ ~ ~-0.4 as @e[tag=symbol,distance=..0.4] at @s run scoreboard players add Streak score 1
  147. execute if score @p start matches 1 if data entity @p {SelectedItemSlot:6} as @e[tag=orange,tag=circle] at @s positioned ~ ~ ~-0.4 as @e[tag=symbol,distance=..0.4] at @s run scoreboard players add Streak score 1
  148.  
  149. execute if score @p start matches 1 if data entity @p {SelectedItemSlot:2} as @e[tag=green,tag=circle] at @s positioned ~ ~ ~-0.4 as @e[tag=symbol,distance=..0.4] at @s run scoreboard players operation @p score += incr incr
  150. execute if score @p start matches 1 if data entity @p {SelectedItemSlot:3} as @e[tag=red,tag=circle] at @s positioned ~ ~ ~-0.4 as @e[tag=symbol,distance=..0.4] at @s run scoreboard players operation @p score += incr incr
  151. execute if score @p start matches 1 if data entity @p {SelectedItemSlot:4} as @e[tag=yellow,tag=circle] at @s positioned ~ ~ ~-0.4 as @e[tag=symbol,distance=..0.4] at @s run scoreboard players operation @p score += incr incr
  152. execute if score @p start matches 1 if data entity @p {SelectedItemSlot:5} as @e[tag=blue,tag=circle] at @s positioned ~ ~ ~-0.4 as @e[tag=symbol,distance=..0.4] at @s run scoreboard players operation @p score += incr incr
  153. execute if score @p start matches 1 if data entity @p {SelectedItemSlot:6} as @e[tag=orange,tag=circle] at @s positioned ~ ~ ~-0.4 as @e[tag=symbol,distance=..0.4] at @s run scoreboard players operation @p score += incr incr
  154.  
  155. execute if score @p start matches 1 if data entity @p {SelectedItemSlot:2} as @e[tag=green,tag=circle] at @s positioned ~ ~ ~-0.4 as @e[tag=symbol,distance=..0.4] at @s run scoreboard players add @p accuracy 1
  156. execute if score @p start matches 1 if data entity @p {SelectedItemSlot:3} as @e[tag=red,tag=circle] at @s positioned ~ ~ ~-0.4 as @e[tag=symbol,distance=..0.4] at @s run scoreboard players add @p accuracy 1
  157. execute if score @p start matches 1 if data entity @p {SelectedItemSlot:4} as @e[tag=yellow,tag=circle] at @s positioned ~ ~ ~-0.4 as @e[tag=symbol,distance=..0.4] at @s run scoreboard players add @p accuracy 1
  158. execute if score @p start matches 1 if data entity @p {SelectedItemSlot:5} as @e[tag=blue,tag=circle] at @s positioned ~ ~ ~-0.4 as @e[tag=symbol,distance=..0.4] at @s run scoreboard players add @p accuracy 1
  159. execute if score @p start matches 1 if data entity @p {SelectedItemSlot:6} as @e[tag=orange,tag=circle] at @s positioned ~ ~ ~-0.4 as @e[tag=symbol,distance=..0.4] at @s run scoreboard players add @p accuracy 1
  160.  
  161. execute if score @p start matches 1 if data entity @p {SelectedItemSlot:2} as @e[tag=green,tag=circle] at @s positioned ~ ~ ~-0.4 as @e[tag=symbol,distance=..0.4] at @s run kill @s
  162. execute if score @p start matches 1 if data entity @p {SelectedItemSlot:3} as @e[tag=red,tag=circle] at @s positioned ~ ~ ~-0.4 as @e[tag=symbol,distance=..0.4] at @s run kill @s
  163. execute if score @p start matches 1 if data entity @p {SelectedItemSlot:4} as @e[tag=yellow,tag=circle] at @s positioned ~ ~ ~-0.4 as @e[tag=symbol,distance=..0.4] at @s run kill @s
  164. execute if score @p start matches 1 if data entity @p {SelectedItemSlot:5} as @e[tag=blue,tag=circle] at @s positioned ~ ~ ~-0.4 as @e[tag=symbol,distance=..0.4] at @s run kill @s
  165. execute if score @p start matches 1 if data entity @p {SelectedItemSlot:6} as @e[tag=orange,tag=circle] at @s positioned ~ ~ ~-0.4 as @e[tag=symbol,distance=..0.4] at @s run kill @s
  166.  
  167. #Missed
  168. execute as @e[tag=circle] at @s positioned ~ ~ ~-2 as @e[tag=symbol,distance=..0.15] run scoreboard players set Streak score 0
  169. execute as @e[tag=circle] at @s positioned ~ ~ ~-2 as @e[tag=symbol,distance=..0.15] run scoreboard players add missed accuracy 1
  170. execute as @e[tag=circle] at @s positioned ~ ~ ~-2 as @e[tag=symbol,distance=..0.15] run kill @s
  171.  
  172. #Accuracy
  173. scoreboard objectives add accuracy dummy
  174. scoreboard players set pos100 accuracy 100
  175.  
  176. # ///// CHANGE NUMERICAL VALUE FOR SONG NOTE TOTAL. YOU WILL NEED TO COUNT THIS WHILE YOU'RE CREATING YOUR TRACK IN track.mcfunction. ///// #
  177. scoreboard players set note_total accuracy 1413
  178. # ///// CHANGE NUMERICAL VALUE FOR SONG NOTE TOTAL. YOU WILL NEED TO COUNT THIS WHILE YOU'RE CREATING YOUR TRACK IN track.mcfunction. ///// #
  179.  
  180. execute if score @p timer < track length run scoreboard players operation Accuracy score = @p accuracy
  181. execute if score @p timer < track length run scoreboard players operation progress accuracy = @p accuracy
  182. execute if score @p timer < track length run scoreboard players operation progress accuracy += missed accuracy
  183. execute if score @p timer < track length run scoreboard players operation Accuracy score *= pos100 accuracy
  184. execute if score @p timer < track length run scoreboard players operation Accuracy score /= progress accuracy
  185. execute if score Accuracy score matches 100 if score missed accuracy matches 1.. run scoreboard players set Accuracy score 99
  186.  
  187. ## Track
  188. function scripts:track
  189.  
  190. # Position notes
  191. tp @e[tag=pos,tag=green] 2 65 10
  192. tp @e[tag=pos,tag=red] 1 65 10
  193. tp @e[tag=pos,tag=yellow] 0 65 10
  194. tp @e[tag=pos,tag=blue] -1 65 10
  195. tp @e[tag=pos,tag=orange] -2 65 10
  196. tag @e[tag=pos] remove pos
  197.  
  198. ## End
  199. execute if score @p timer = track length run stopsound @p master
  200. execute if score @p timer = track length run summon lightning_bolt 0 63 7
  201. execute if score @p timer = track length run playsound minecraft:ui.toast.challenge_complete master @p
  202. execute if score @p timer = track length run scoreboard players operation @p accuracy *= pos100 accuracy
  203. execute if score @p timer = track length run scoreboard players operation @p accuracy /= note_total accuracy
  204. execute if score @p timer = track length run title @a title {"text":"YOU ROCK","color":"dark_purple"}
  205. execute if score @p timer = track length run title @a subtitle ["",{"text":"Accuracy: ","color":"light_purple"},{"score":{"name":"Accuracy","objective":"score"},"color":"light_purple"},{"text":"%","bold":true,"color":"light_purple"}]
  206.  
  207.  
  208. ## Extras
  209. execute if score @p start matches 1 run effect clear @e[tag=circle]
  210. execute if score @p start matches 1 if data entity @p {SelectedItemSlot:2} run effect give @e[tag=circle,tag=green] glowing 1 0 true
  211. execute if score @p start matches 1 if data entity @p {SelectedItemSlot:3} run effect give @e[tag=circle,tag=red] glowing 1 0 true
  212. execute if score @p start matches 1 if data entity @p {SelectedItemSlot:4} run effect give @e[tag=circle,tag=yellow] glowing 1 0 true
  213. execute if score @p start matches 1 if data entity @p {SelectedItemSlot:5} run effect give @e[tag=circle,tag=blue] glowing 1 0 true
  214. execute if score @p start matches 1 if data entity @p {SelectedItemSlot:6} run effect give @e[tag=circle,tag=orange] glowing 1 0 true
  215.  
  216. execute unless entity @e[tag=multiplier] run summon minecraft:armor_stand -4 65.5 5 {NoGravity:1b,Invulnerable:1b,Marker:1b,Invisible:1,Tags:["multiplier"],DisabledSlots:4144959,CustomNameVisible:1,CustomName:'{"text":"x1","color":"yellow","bold":"true"}'}
  217. execute if score Streak score matches 0..9 as @e[tag=multiplier] run data merge entity @s {CustomName:'{"text":"x1","color":"yellow","bold":"true"}'}
  218. execute if score Streak score matches 10..19 as @e[tag=multiplier] run data merge entity @s {CustomName:'{"text":"x2","color":"gold","bold":"true"}'}
  219. execute if score Streak score matches 20..29 as @e[tag=multiplier] run data merge entity @s {CustomName:'{"text":"x3","color":"green","bold":"true"}'}
  220. execute if score Streak score matches 30..149 as @e[tag=multiplier] run data merge entity @s {CustomName:'{"text":"x4","color":"aqua","bold":"true"}'}
  221. execute if score Streak score matches 150.. as @e[tag=multiplier] run data merge entity @s {CustomName:'{"text":"x8","color":"dark_blue","bold":"true"}'}
  222.  
  223. execute if score Streak score matches 0 run fill -3 63 2 -3 63 11 air
  224. execute if score Streak score matches 1 run setblock -3 63 2 redstone_block
  225. execute if score Streak score matches 2 run setblock -3 63 3 redstone_block
  226. execute if score Streak score matches 3 run setblock -3 63 4 redstone_block
  227. execute if score Streak score matches 4 run setblock -3 63 5 redstone_block
  228. execute if score Streak score matches 5 run setblock -3 63 6 redstone_block
  229. execute if score Streak score matches 6 run setblock -3 63 7 redstone_block
  230. execute if score Streak score matches 7 run setblock -3 63 8 redstone_block
  231. execute if score Streak score matches 8 run setblock -3 63 9 redstone_block
  232. execute if score Streak score matches 9 run setblock -3 63 10 redstone_block
  233. execute if score Streak score matches 10 run setblock -3 63 11 redstone_block
  234. execute if score Streak score matches 11 run fill -3 63 2 -3 63 11 air
  235. execute if score Streak score matches 11 run setblock -3 63 2 redstone_block
  236. execute if score Streak score matches 12 run setblock -3 63 3 redstone_block
  237. execute if score Streak score matches 13 run setblock -3 63 4 redstone_block
  238. execute if score Streak score matches 14 run setblock -3 63 5 redstone_block
  239. execute if score Streak score matches 15 run setblock -3 63 6 redstone_block
  240. execute if score Streak score matches 16 run setblock -3 63 7 redstone_block
  241. execute if score Streak score matches 17 run setblock -3 63 8 redstone_block
  242. execute if score Streak score matches 18 run setblock -3 63 9 redstone_block
  243. execute if score Streak score matches 19 run setblock -3 63 10 redstone_block
  244. execute if score Streak score matches 20 run setblock -3 63 11 redstone_block
  245. execute if score Streak score matches 21 run fill -3 63 2 -3 63 11 air
  246. execute if score Streak score matches 21 run setblock -3 63 2 redstone_block
  247. execute if score Streak score matches 22 run setblock -3 63 3 redstone_block
  248. execute if score Streak score matches 23 run setblock -3 63 4 redstone_block
  249. execute if score Streak score matches 24 run setblock -3 63 5 redstone_block
  250. execute if score Streak score matches 25 run setblock -3 63 6 redstone_block
  251. execute if score Streak score matches 26 run setblock -3 63 7 redstone_block
  252. execute if score Streak score matches 27 run setblock -3 63 8 redstone_block
  253. execute if score Streak score matches 28 run setblock -3 63 9 redstone_block
  254. execute if score Streak score matches 29 run setblock -3 63 10 redstone_block
  255. execute if score Streak score matches 30 run setblock -3 63 11 redstone_block
  256.  
  257.  
  258. execute if score Streak score matches 0 run fill 3 65 2 3 65 11 air
  259. execute if score Streak score matches 30 run playsound minecraft:block.gilded_blackstone.break master @s ~ ~ ~ 0.5
  260. execute if score Streak score matches 150 run playsound minecraft:entity.lightning_bolt.thunder master @p
  261. execute if score Streak score matches 150 run fill 3 65 2 3 65 11 soul_fire
  262.  
  263. execute if score Streak score matches 50 run title @p actionbar ["",{"score":{"name":"Streak","objective":"score"},"bold":true,"color":"dark_red"},{"text":" Note Streak!","bold":true,"color":"dark_red"}]
  264. execute if score Streak score matches 100 run title @p actionbar ["",{"score":{"name":"Streak","objective":"score"},"bold":true,"color":"dark_red"},{"text":" Note Streak!","bold":true,"color":"dark_red"}]}
  265. execute if score Streak score matches 150 run title @p actionbar {"text":"Star Power Ready","color":"aqua","bold":"true"}
  266. execute if score Streak score matches 200 run title @p actionbar ["",{"score":{"name":"Streak","objective":"score"},"bold":true,"color":"dark_red"},{"text":" Note Streak!","bold":true,"color":"dark_red"}]}
  267. execute if score Streak score matches 300 run title @p actionbar ["",{"score":{"name":"Streak","objective":"score"},"bold":true,"color":"dark_red"},{"text":" Note Streak!","bold":true,"color":"dark_red"}]}
  268. execute if score Streak score matches 400 run title @p actionbar ["",{"score":{"name":"Streak","objective":"score"},"bold":true,"color":"dark_red"},{"text":" Note Streak!","bold":true,"color":"dark_red"}]
  269. execute if score Streak score matches 500 run title @p actionbar ["",{"score":{"name":"Streak","objective":"score"},"bold":true,"color":"dark_red"},{"text":" Note Streak!","bold":true,"color":"dark_red"}]
  270. execute if score Streak score matches 600 run title @p actionbar ["",{"score":{"name":"Streak","objective":"score"},"bold":true,"color":"dark_red"},{"text":" Note Streak!","bold":true,"color":"dark_red"}]
  271. execute if score Streak score matches 700 run title @p actionbar ["",{"score":{"name":"Streak","objective":"score"},"bold":true,"color":"dark_red"},{"text":" Note Streak!","bold":true,"color":"dark_red"}]
  272. execute if score Streak score matches 800 run title @p actionbar ["",{"score":{"name":"Streak","objective":"score"},"bold":true,"color":"dark_red"},{"text":" Note Streak!","bold":true,"color":"dark_red"}]
  273. execute if score Streak score matches 900 run title @p actionbar ["",{"score":{"name":"Streak","objective":"score"},"bold":true,"color":"dark_red"},{"text":" Note Streak!","bold":true,"color":"dark_red"}]
  274. execute if score Streak score matches 1000 run title @p actionbar ["",{"score":{"name":"Streak","objective":"score"},"bold":true,"color":"dark_red"},{"text":" Note Streak!","bold":true,"color":"dark_red"}]
  275.  
  276.  
  277. #bossbar add star_power {"text":"Star power"}
  278. #bossbar set star_power max 150
  279. #bossbar set minecraft:star_power style notched_10
  280. #bossbar set minecraft:star_power color blue
  281. execute if score delay delay matches 0 run bossbar set star_power name {"text":"STAR POWER","color":"aqua","bold":"true"}
  282. execute if score delay delay matches 0 run bossbar set star_power players @a
  283. execute if score delay delay matches 0 run execute store result bossbar star_power value run scoreboard players get Streak score
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement