scoreboard players set .weapon_animation sniper 0
scoreboard players set .shift_animation sniper 0
scoreboard players set .q_animation sniper 0
scoreboard players set .shots sniper 1
execute if entity @s[tag=upgrade_5] run scoreboard players set .shots sniper 2
scoreboard players set .rc_animation sniper 7
function main:mechanics/animation/start {"frames":161,"start":"80"}

execute as @s[tag=sniper_rc_triggered] run item replace entity @s armor.head with air 1
# scoreboard players set @s[tag=sniper_rc_triggered] attack_speed 0
execute as @s[tag=sniper_rc_triggered,scores={sniper_shots=1..}] run scoreboard players set @s rc_duration_t 15
execute as @s[tag=sniper_rc_triggered] run return run function main:characters/sniper/rc/id1/unscope

execute as @s[tag=!sniper_rc_triggered] run item replace entity @s armor.head with leather_helmet[enchantments={levels:{"minecraft:binding_curse":1},show_in_tooltip:false},equippable={asset_id:barrier,equip_sound:"item.armor.equip_leather",slot:"head",camera_overlay:"custom/overlay/sniper"}] 1


scoreboard players set @s[tag=!sniper_rc_triggered] attack_speed 0
execute as @s[tag=!sniper_rc_triggered] run tag @s add sniper_rc_triggered

tag @s remove sniper_reload