execute as @s[scores={sniperCD=12},nbt={SelectedItem:{components:{"minecraft:custom_data":{weapon:"scoutrifle"}}}}] at @s run playsound minecraft:weapon.sniperrifle_bolt player @a ~ ~ ~
scoreboard players operation @s animation.calculator = .scoutrifleshoot animation.calculator
scoreboard players operation @s animation.calculator -= @s sniperCD
execute as @s[nbt={SelectedItem:{components:{"minecraft:custom_data":{weapon:"scoutrifle"}}}},scores={sniperCD=1..}] run item modify entity @s weapon.mainhand ray_demo:animate