playsound item.crossbow.loading_end player @a ~ ~ ~ .5
execute as @p[gamemode=!creative,nbt={SelectedItem:{components:{"minecraft:enchantments":{"survivalplus:auto":1},"minecraft:damage":465}}}] run playsound minecraft:entity.item.break
execute as @p[gamemode=!creative,nbt={SelectedItem:{components:{"minecraft:enchantments":{"survivalplus:auto":1},"minecraft:damage":465}}}] run item replace entity @s weapon.mainhand with air
item modify entity @p[gamemode=!creative,nbt={SelectedItem:{components:{"minecraft:enchantments":{"survivalplus:auto":1}}}}] weapon.mainhand survivalplus:damage_1
item modify entity @p[predicate=survivalplus:has_arrow,nbt={SelectedItem:{components:{"minecraft:enchantments":{"survivalplus:auto":1}}}}] weapon.mainhand survivalplus:gun/reload
execute as @p[gamemode=!creative,nbt=!{SelectedItem:{id:"minecraft:crossbow"}},nbt={equipment:{offhand:{components:{"minecraft:enchantments":{"survivalplus:auto":1},"minecraft:damage":465}}}}] run playsound minecraft:entity.item.break
execute as @p[gamemode=!creative,nbt=!{SelectedItem:{id:"minecraft:crossbow"}},nbt={equipment:{offhand:{components:{"minecraft:enchantments":{"survivalplus:auto":1},"minecraft:damage":465}}}}] run item replace entity @s weapon.offhand with air
item modify entity @p[gamemode=!creative,nbt=!{SelectedItem:{id:"minecraft:crossbow"}},nbt={equipment:{offhand:{components:{"minecraft:enchantments":{"survivalplus:auto":1}}}}}] weapon.offhand survivalplus:damage_1
item modify entity @p[predicate=survivalplus:has_arrow,nbt=!{SelectedItem:{id:"minecraft:crossbow"}},nbt={equipment:{offhand:{components:{"minecraft:enchantments":{"survivalplus:auto":1}}}}}] weapon.offhand survivalplus:gun/reload2
item modify entity @p[gamemode=creative,nbt={SelectedItem:{components:{"minecraft:enchantments":{"survivalplus:auto":1}}}}] weapon.mainhand survivalplus:gun/reload
item modify entity @p[gamemode=creative,nbt=!{SelectedItem:{id:"minecraft:crossbow"}},nbt={equipment:{offhand:{components:{"minecraft:enchantments":{"survivalplus:auto":1}}}}}] weapon.offhand survivalplus:gun/reload2
clear @p[predicate=survivalplus:has_arrow,gamemode=!creative] arrow 1
execute as @n[predicate=survivalplus:gun/auto] at @s run tp @s ~ ~ ~ ~ ~-1