
execute unless entity @s[scores={asneak1=1..}] at @s[nbt={Inventory:[{Slot:-106b,tag:{fly:1}}]}] run function aop1:sneaksum

execute at @s[scores={sw=..2}] run tag @e[tag=fly,type=armor_stand,distance=..10] remove fly1
scoreboard players remove @s[scores={sw=1..}] sw 1

execute at @s[scores={asneak1=1..},nbt={Inventory:[{Slot:-106b,tag:{fly:1}}]}] run function aop1:tagfly2

execute at @s[scores={asneak1=1..},nbt={SelectedItem:{tag:{fly:1}}}] run function aop1:tagfly1

execute at @s[nbt={SelectedItem:{tag:{fly:1}}}] run function aop1:selected
execute at @s[scores={re=5..}] run playsound entity.drowned.shoot voice @a ~ ~ ~ 0.1 2
execute at @s[scores={re=10..}] run playsound entity.drowned.shoot voice @a ~ ~ ~ 0.1 2
execute at @s[scores={re=15..}] run playsound entity.drowned.shoot voice @a ~ ~ ~ 0.1 2
execute at @s[scores={re=20..}] run playsound entity.drowned.shoot voice @a ~ ~ ~ 0.1 2
execute at @s[scores={re=25..}] run playsound entity.drowned.shoot voice @a ~ ~ ~ 0.1 2
execute at @s[scores={re=30..}] run playsound entity.drowned.shoot voice @a ~ ~ ~ 0.1 2
execute at @s[scores={re=35..}] run playsound entity.drowned.shoot voice @a ~ ~ ~ 0.1 2
execute at @s[scores={re=40..}] run playsound entity.drowned.shoot voice @a ~ ~ ~ 0.1 2

execute unless entity @e[tag=fly1,distance=..3] run scoreboard players set @s re 1

execute unless entity @s[scores={asneak1=1..}] run scoreboard players set @s re 1



#execute at @s[nbt={SelectedItem:{tag:{fly:1}}},scores={playerHit=1..}] run tag @e[nbt={HurtTime:10s}] add damm
#execute at @s[nbt={SelectedItem:{tag:{fly:1}}},scores={playerHit=1..}] run scoreboard players set @e[nbt={HurtTime:10s}] sw2 20
execute at @s[nbt={SelectedItem:{tag:{fly:1}}},scores={playerHit=1..}] run scoreboard players set @s di 20
scoreboard players remove @s di 1
execute at @s[scores={di=2..}] run tag @e[tag=fly,type=armor_stand,distance=..10,limit=1,sort=random] add fly22
execute at @s[scores={di=..1}] run tag @e[tag=fly,type=armor_stand,limit=1,sort=random] remove flyk





scoreboard players reset @s playerHit
#execute at @s[nbt={Inventory:[{Slot:-106b,tag:{stick:1}}]}] run function aop1:tp2
#execute unless entity @s[scores={tp=60..}] run scoreboard players add @s tp 1










execute at @s[nbt={Inventory:[{Slot:-106b,tag:{fly:1}}]}] run item replace entity @s weapon.mainhand from entity @s weapon.offhand
execute at @s[nbt={Inventory:[{Slot:-106b,tag:{fly:1}}]}] run item replace entity @s weapon.offhand with air
scoreboard players reset @s asneak1