execute positioned 0 188 202 if block ~ ~ ~ minecraft:light_weighted_pressure_plate[power=1] if entity @e[type=armor_stand,name=console,tag=canFinish] as @p[distance=..2,tag=ingame] run function parkour_pyramid:levels/level100/end/finish
execute positioned 0 188 202 if block ~ ~ ~ minecraft:light_weighted_pressure_plate[power=0] run tag @e[type=armor_stand,name=console] add canFinish
scoreboard players add @e[type=armor_stand,name=console,tag=endFireworks] fireworkTimer 1
scoreboard players add @e[type=armor_stand,name=console,tag=endFireworks] fireworkTimer2 1

execute if score @e[type=armor_stand,name=console,limit=1] fireworkTimer matches 1 as @e[type=area_effect_cloud,name=randomF,limit=1,sort=random] at @s run function parkour_pyramid:services/randomfirework
scoreboard players reset @e[scores={fireworkTimer=10..}] fireworkTimer
execute as @e[type=armor_stand,name=console,scores={fireworkTimer2=500..}] run function parkour_pyramid:levels/level100/end/resetfirework
