$execute if score @a[tag=playing,limit=1] $(key).press matches 0 run return run data merge entity @s {start_interpolation:0,transformation:{translation:[0.0f,0.5f,0.0f]}}
$data merge entity @s {start_interpolation:0,transformation:{translation:[0.0f,0.58f,0.0f]},item:{id:"minecraft:stone",count:1,components:{"minecraft:item_model":"funkalot:input/$(key)_pressed"}}}
$execute at @s as @n[tag=key.note.$(key),scores={note.pos.relative=..1500}] run return run function funkalot:notesystem/hitnote {key:$(key)}
$execute if score @a[tag=playing,limit=1,tag=!record] difficulty matches 3..4 run function funkalot:notesystem/missdifficulty {key:$(key)}
execute unless entity @a[tag=record] run return 0
scoreboard players operation .recordnote constants = @a[tag=record] timeline
execute store result storage funkalot:current song.record int 1 run scoreboard players remove .recordnote constants 81
$data modify storage funkalot:current song.key set value $(key)
function funkalot:recordnotes with storage funkalot:current song