execute as @s[scores={shiftreload=2},nbt={SelectedItem:{components:{"minecraft:custom_data":{weapon:"glock"}}}},tag=glockReloading] at @s run playsound minecraft:weapon.9mm_reload player @s ~ ~ ~
execute as @s[scores={shiftreload=31},nbt={SelectedItem:{components:{"minecraft:custom_data":{weapon:"glock"}}}},tag=glockReloading] run function ray_demo:math/reloadglock
scoreboard players operation @s animation.calculator = .glockreload animation.calculator
scoreboard players operation @s animation.calculator += @s shiftreload
execute as @s[scores={shiftreload=2..},nbt={SelectedItem:{components:{"minecraft:custom_data":{weapon:"glock"}}}},tag=glockReloading] run item modify entity @s weapon.mainhand ray_demo:animate
execute as @s[scores={shiftreload=31..},nbt={SelectedItem:{components:{"minecraft:custom_data":{weapon:"glock"}}}},tag=glockReloading] run item modify entity @s weapon.mainhand ray_demo:glock/def