execute as @s[scores={shiftreload=22},nbt={SelectedItem:{components:{"minecraft:custom_data":{weapon:"spas12"}}}},tag=spas12Reloading] at @s run playsound minecraft:weapon_spas12_cock player @s ~ ~ ~
execute as @a[scores={shiftreload=16},nbt={SelectedItem:{components:{"minecraft:custom_data":{weapon:"spas12"}}}},tag=spas12Reloading] at @s run playsound minecraft:weapon_spas12_reload player @s ~ ~ ~
execute as @s[scores={shiftreload=16,magSPAS=0..6},nbt={SelectedItem:{components:{"minecraft:custom_data":{weapon:"spas12"}}}},tag=spas12Reloading] at @s run function ray_demo:math/reloadspas12
execute as @s[scores={shiftreload=25,magSPAS=7},nbt={SelectedItem:{components:{"minecraft:custom_data":{weapon:"spas12"}}}},tag=spas12Reloading] at @s run function ray_demo:math/reloadspas12
scoreboard players operation @s animation.calculator = .spas12reload animation.calculator
scoreboard players operation @s animation.calculator += @s shiftreload
execute as @s[scores={shiftreload=2..},nbt={SelectedItem:{components:{"minecraft:custom_data":{weapon:"spas12"}}}},tag=spas12Reloading] run item modify entity @s weapon.mainhand ray_demo:animate
execute as @s[scores={shiftreload=27..},nbt={SelectedItem:{components:{"minecraft:custom_data":{weapon:"spas12"}}}},tag=spas12Reloading] run scoreboard players set @s shiftreload 0