execute as @s[scores={shiftreload=2},nbt={SelectedItem:{components:{"minecraft:custom_data":{weapon:"scoutrifle"}}}},tag=scoutReloading] at @s run playsound minecraft:weapon.sniperrifle_reload player @s ~ ~ ~
execute as @s[scores={shiftreload=24},nbt={SelectedItem:{components:{"minecraft:custom_data":{weapon:"scoutrifle"}}}},tag=scoutReloading] run function ray_demo:math/reloadscout
scoreboard players operation @s animation.calculator = .scoutriflereload animation.calculator
scoreboard players operation @s animation.calculator += @s shiftreload
execute as @s[scores={shiftreload=2..},nbt={SelectedItem:{components:{"minecraft:custom_data":{weapon:"scoutrifle"}}}},tag=scoutReloading] run item modify entity @s weapon.mainhand ray_demo:animate
execute as @s[scores={shiftreload=25..},nbt={SelectedItem:{components:{"minecraft:custom_data":{weapon:"scoutrifle"}}}},tag=scoutReloading] run item modify entity @s weapon.mainhand ray_demo:scout/def