scoreboard players operation @s animation.calculator = .glockshoot animation.calculator
scoreboard players operation @s animation.calculator -= @s glockCD
execute as @s[nbt={SelectedItem:{components:{"minecraft:custom_data":{weapon:"glock"}}}},scores={glockCD=2..}] run item modify entity @s weapon.mainhand ray_demo:animate