stopsound @a ambient
function funkalot:results/ispb with storage funkalot:current song
data remove storage funkalot:current song
execute as @a at @s run playsound funkalot:sfx.results ui @a
function funkalot:notesystem/disappear
execute unless score .current score.perfect matches 0.. run scoreboard players set .current score.perfect 0
execute unless score .current score.good matches 0.. run scoreboard players set .current score.good 0
execute unless score .current score.ok matches 0.. run scoreboard players set .current score.ok 0
execute unless score .current score.bad matches 0.. run scoreboard players set .current score.bad 0
execute unless score .current score.early matches 0.. run scoreboard players set .current score.early 0
execute unless score .current score.late matches 0.. run scoreboard players set .current score.late 0
execute unless score .current score.missed matches 0.. run scoreboard players set .current score.missed 0
data merge entity @n[tag=results,type=text_display] {text:[{"text":""}]}
data merge entity @n[tag=results,type=text_display] {start_interpolation:0,interpolation_duration:7,transformation:{scale:[0.5f,0.5f,0.5f]},text:[{"color":"dark_purple","translate":"results.title"},{"color":"gold","bold":true,"translate":"results.perfect","with":[{"score":{"name":".current","objective":"score.perfect"}}]},{"color":"green","bold":false,"translate":"results.good","with":[{"score":{"name":".current","objective":"score.good"}}]},{"color":"yellow","bold":false,"translate":"results.ok","with":[{"score":{"name":".current","objective":"score.ok"}}]},{"color":"red","bold":false,"translate":"results.bad","with":[{"score":{"name":".current","objective":"score.bad"}}]},{"color":"gray","bold":false,"translate":"results.early","with":[{"score":{"name":".current","objective":"score.early"}}]},{"color":"gray","bold":false,"translate":"results.late","with":[{"score":{"name":".current","objective":"score.late"}}]},{"color":"dark_gray","bold":true,"translate":"results.missed","with":[{"score":{"name":".current","objective":"score.missed"}}]},"\n ",{"color":"white","translate":"score","with":[{"score":{"name":"@a[tag=playing,limit=1]","objective":"points"},"color":"gold","bold":true}]},"\n\n",{"color":"white","bold":false,"translate":"results.continue","with":[{"keybind":"key.jump","color":"green"}]}]}
tag @a[tag=playing] add results
tag @a remove playing
tp @n[tag=player.camera] @n[tag=camera.pos]