execute as @s[scores={shiftreload=2},nbt={SelectedItem:{components:{"minecraft:custom_data":{weapon:"mp5"}}}},tag=mp5Reloading] at @s run playsound minecraft:weapon.mp5_reload player @s ~ ~ ~
execute as @s[scores={shiftreload=20},nbt={SelectedItem:{components:{"minecraft:custom_data":{weapon:"mp5"}}}},tag=mp5Reloading] run function ray_demo:math/reloadmp5
scoreboard players operation @s animation.calculator = .mp5reload animation.calculator
scoreboard players operation @s animation.calculator += @s shiftreload
execute as @s[scores={shiftreload=1..},nbt={SelectedItem:{components:{"minecraft:custom_data":{weapon:"mp5"}}}},tag=mp5Reloading] run item modify entity @s weapon.mainhand ray_demo:animate