
execute at @p[tag=anubisp] run kill @e[name="Netherite Sword",distance=..5]
execute as @a[scores={player_deaths=1..}] run function template:player_died
scoreboard players set @a[scores={player_deaths=1..}] player_deaths 0
execute as @a[tag=mrp] at @e[tag=cfh] facing entity @s feet if block ~ ~ ~ air run tp @e[tag=cfh] ^ ^ ^-1
execute as @a[tag=mrp] at @e[tag=cfh] facing entity @s feet if block ~ ~ ~ tall_grass run tp @e[tag=cfh] ^ ^ ^-1
execute as @a[tag=mrp] at @e[tag=cfh] facing entity @s feet if block ~ ~ ~ tall_dry_grass run tp @e[tag=cfh] ^ ^ ^-1
execute as @a[tag=mrp] at @e[tag=cfh] facing entity @s feet if block ~ ~ ~ short_grass run tp @e[tag=cfh] ^ ^ ^-1
execute as @a[tag=hgp] at @e[tag=es] facing entity @s feet if block ~ ~ ~ air run tp @e[tag=es] ^ ^ ^-3
execute as @a[tag=dbmp] at @e[name=scales] facing entity @s feet if block ~ ~ ~ air run tp @e[name=scales] ^ ^ ^-3
execute as @a[tag=dbmp] at @e[name=scales] facing entity @s feet if block ~ ~ ~ air run tp @e[name=scaless] ^2 ^ ^-3
execute as @a[tag=dbmp] at @e[name=scales] facing entity @s feet if block ~ ~ ~ air run tp @e[name=scale] ^-2 ^ ^-3
execute as @p[sort=nearest,limit=1] at @e[name=knife] facing entity @s feet if block ~ ~ ~ air run tp @e[name=knife] ^ ^ ^-1.5
execute as @p[sort=nearest,limit=1,tag=hgp] at @e[name=emerald_splash2,type=armor_stand] facing entity @s feet if block ~ ~ ~ air run tp @e[name=emerald_splash2,type=armor_stand] ^ ^ ^-1.5
execute as @p[sort=nearest,limit=1,tag=hgp] at @e[name=emerald_splash1,type=armor_stand] facing entity @s feet if block ~ ~ ~ air run tp @e[name=emerald_splash1,type=armor_stand] ^ ^ ^-1
execute as @p[sort=nearest,limit=1,tag=hgp] at @e[name=emerald_splash3,type=armor_stand] facing entity @s feet if block ~ ~ ~ air run tp @e[name=emerald_splash3,type=armor_stand] ^ ^ ^-1
execute as @p[sort=nearest,limit=1,tag=hgp] at @e[name=emerald_splash2,type=armor_stand] facing entity @s feet if block ~ ~ ~ tall_grass run tp @e[name=emerald_splash2,type=armor_stand] ^ ^ ^-1.5
execute as @p[sort=nearest,limit=1,tag=hgp] at @e[name=emerald_splash1,type=armor_stand] facing entity @s feet if block ~ ~ ~ tall_grass run tp @e[name=emerald_splash1,type=armor_stand] ^ ^ ^-1
execute as @p[sort=nearest,limit=1,tag=hgp] at @e[name=emerald_splash3,type=armor_stand] facing entity @s feet if block ~ ~ ~ tall_grass run tp @e[name=emerald_splash3,type=armor_stand] ^ ^ ^-1
execute as @p[sort=nearest,limit=1,tag=hgp] at @e[name=emerald_splash2,type=armor_stand] facing entity @s feet if block ~ ~ ~ tall_dry_grass run tp @e[name=emerald_splash2,type=armor_stand] ^ ^ ^-1.5
execute as @p[sort=nearest,limit=1,tag=hgp] at @e[name=emerald_splash1,type=armor_stand] facing entity @s feet if block ~ ~ ~ tall_dry_grass run tp @e[name=emerald_splash1,type=armor_stand] ^ ^ ^-1
execute as @p[sort=nearest,limit=1,tag=hgp] at @e[name=emerald_splash3,type=armor_stand] facing entity @s feet if block ~ ~ ~ tall_dry_grass run tp @e[name=emerald_splash3,type=armor_stand] ^ ^ ^-1
execute as @p[sort=nearest,limit=1,tag=hgp] at @e[name=emerald_splash2,type=armor_stand] facing entity @s feet if block ~ ~ ~ short_grass run tp @e[name=emerald_splash2,type=armor_stand] ^ ^ ^-1.5
execute as @p[sort=nearest,limit=1,tag=hgp] at @e[name=emerald_splash1,type=armor_stand] facing entity @s feet if block ~ ~ ~ short_grass run tp @e[name=emerald_splash1,type=armor_stand] ^ ^ ^-1
execute as @p[sort=nearest,limit=1,tag=hgp] at @e[name=emerald_splash3,type=armor_stand] facing entity @s feet if block ~ ~ ~ short_grass run tp @e[name=emerald_splash3,type=armor_stand] ^ ^ ^-1
execute as @p[sort=nearest,limit=1,tag=hgp] at @e[name=emerald_splash2,type=armor_stand] facing entity @s feet if block ~ ~ ~ snow run tp @e[name=emerald_splash2,type=armor_stand] ^ ^ ^-1.5
execute as @p[sort=nearest,limit=1,tag=hgp] at @e[name=emerald_splash1,type=armor_stand] facing entity @s feet if block ~ ~ ~ snow run tp @e[name=emerald_splash1,type=armor_stand] ^ ^ ^-1
execute as @p[sort=nearest,limit=1,tag=hgp] at @e[name=emerald_splash3,type=armor_stand] facing entity @s feet if block ~ ~ ~ snow run tp @e[name=emerald_splash3,type=armor_stand] ^ ^ ^-1
execute at @e[name=knife] if entity @e[distance=..2,tag=!knifer] run effect give @e[distance=..2,tag=!knifer] minecraft:wither 1 2 true
execute as @a[tag=dbmp] at @e[name=scales] facing entity @s feet if block ~ ~ ~ water run tp @e[name=scales] ^ ^ ^-3
execute as @a[tag=dbmp] at @e[name=scales] facing entity @s feet if block ~ ~ ~ water run tp @e[name=scaless] ^2 ^ ^-3
execute at @e[name=tf_hand] run effect give @e[distance=..3,tag=!tfp] wither 3 3 true
execute as @a[tag=dbmp] at @e[name=scales] facing entity @s feet if block ~ ~ ~ water run tp @e[name=scale] ^-2 ^ ^-3
execute as @a[tag=tfp] at @e[name=tf_hand] facing entity @s feet if block ~ ~ ~ air run tp @e[name=tf_hand] ^ ^ ^-3
execute at @e[name=tf_hand] run particle minecraft:block_crumble{block_state:{Name:"minecraft:sand"}} ~ ~1 ~ 0.3 0.3 1 0 10 normal
execute at @e[tag=cfh] run data merge entity @e[limit=1,tag=!punch,distance=..5,sort=random,tag=!mrp] {Fire:300}
execute at @e[name=freezerr] run data merge entity @e[limit=1,sort=nearest,tag=!h,distance=..3,tag=hps] {TicksFrozen:300}
execute at @e[name=freezer] run data merge entity @e[limit=1,sort=nearest,distance=..3,tag=!hps] {TicksFrozen:300}
execute at @e[name=freezer] run fill ~ ~ ~ ~ ~ ~ ice replace
execute at @e[name=freezerr] run fill ~ ~ ~ ~ ~ ~ ice replace
execute as @e[tag=af] run tp @s @e[tag=AI,limit=1]
execute as @e[tag=polenarf] run tp @s @e[tag=AIp,limit=1]
execute as @e[tag=captain_guy] run tp @s @e[tag=AIc,limit=1]
execute at @e[name=scale] run effect give @e[distance=..1,tag=!dbmp] wither 5 5 true
execute at @e[name=scales] run effect give @e[distance=..1,tag=!dbmp] wither 5 5 true
execute at @e[name=scaless] run effect give @e[distance=..1,tag=!dbmp] wither 5 5 true
execute at @e[tag=AIp] run tp @e[tag=sc_p] ^-0.7 ^0.5 ^-1 facing entity @n[tag=AIp] feet
execute at @e[tag=AIc] run tp @e[tag=dbmc] ^-0.7 ^0.5 ^-1 facing entity @n[tag=AIc] feet
execute at @e[tag=AI] run effect give @e[distance=..50,tag=!AI] hunger 1 1 true
execute at @e[tag=AI] run effect give @e[distance=..20,tag=!AI] wither 1 1 true
execute at @e[tag=AI] run data merge entity @e[limit=1,tag=!AI,distance=..50,sort=random] {Fire:300}
execute at @e[name=tongue] run effect give @e[distance=..3,tag=!attacking] wither 5 5 true
execute at @e[tag=AI] run effect give @e[distance=..60,tag=!AI] hunger 5 5 true
execute at @e[tag=AIp] if entity @e[distance=..5] run function template:attack_roll
execute at @e[tag=AIc] if entity @e[distance=..5] run function template:attack_roll_c
execute at @e unless entity @e[tag=AI] run function template:sun_af/remove/all
execute at @e unless entity @e[tag=AI] run function template:arabia_fats/remove/all
execute at @e unless entity @e[tag=AIp] run function template:polenarf/remove/all
execute at @e[name=hpg] if block ~ ~ ~ air positioned ~ ~ ~ run tp @e[name=hpg] ^ ^ ^-1 facing entity @p[tag=hp] feet
execute at @e[name=hpg] if block ~ ~ ~ minecraft:short_grass positioned ~ ~ ~ run tp @e[name=hpg] ^ ^ ^-1 facing entity @p[tag=hp] feet
execute at @e[name=hpg] unless block ^ ^ ^ minecraft:air run function template:hermit_purple/pull
execute at @e[name=hpg] run particle minecraft:dragon_breath ^ ^1 ^
execute at @e[name=hpp] run particle minecraft:dragon_breath ^ ^1 ^
execute at @e unless entity @e[tag=AIc] run function template:captain_guy/remove/all
execute at @e unless entity @e[tag=AIc] run function template:dbm_captain/remove/all
execute at @e unless entity @e[tag=AIp] run function template:sc_polenarf/remove/all
execute as @e[tag=sc_p] run function template:sc_polenarf/set_default_pose
execute as @e[tag=dbmc] at @e[name=whirlpoolaa] if block ~1 ~1 ~1 minecraft:water run particle minecraft:spit ~ ~-1 ~ 2 2 2 0 40 normal
execute as @e[tag=dbmc] at @e[name=whirlpoolaa] if block ~1 ~1 ~1 minecraft:water run effect give @e[distance=..7,tag=!AIc] wither 1 1 true
execute as @e[tag=dbmc] at @e[name=whirlpoolaa] if block ~1 ~1 ~1 minecraft:water run tp @e[distance=..7,tag=!AIc,tag=dbmc,tag=captain_guy] ~ ~ ~
execute as @e[tag=dbmc] run function template:dbm_captain/set_default_pose
execute if items entity @a[tag=scp] weapon.mainhand minecraft:breeze_rod[minecraft:custom_name="silver chariot"] run function template:silver_chariot/stand_display
execute if items entity @a[tag=mrp] weapon.mainhand minecraft:blaze_powder[minecraft:custom_name="magicians red"] run function template:magicians_red/stand_display
execute if items entity @a[tag=scp] weapon.offhand minecraft:breeze_rod[minecraft:custom_name="silver chariot"] run function template:silver_chariot/pre_dash
execute if items entity @a[tag=mrp] weapon.offhand minecraft:blaze_powder[minecraft:custom_name="magicians red"] run function template:magicians_red/fire_balls
execute if items entity @a[tag=spp] weapon.mainhand minecraft:nether_star[minecraft:custom_name="star platinum"] run function template:star_platinum/stand_display
execute if items entity @a[tag=spp] weapon.offhand minecraft:nether_star[minecraft:custom_name="star platinum"] run function template:star_platinum/star_finger_sound
execute if items entity @a[tag=hgp] weapon.offhand minecraft:slime_ball[minecraft:custom_name="hieraphont green"] run function template:hieraphont_green/emerald_splash
execute if items entity @a[tag=hgp] weapon.mainhand minecraft:slime_ball[minecraft:custom_name="hieraphont green"] run function template:hieraphont_green/stand_display
execute if items entity @a[tag=sunp] weapon.mainhand minecraft:magma_cream[minecraft:custom_name="The Sun"] run function template:the_sun/stand_display
execute if items entity @a[tag=dbmp] weapon.mainhand minecraft:heart_of_the_sea[minecraft:custom_name="dark blue moon"] run function template:dark_blue_moon/stand_display
execute if items entity @a[tag=dbmp] weapon.offhand minecraft:heart_of_the_sea[minecraft:custom_name="dark blue moon"] run function template:dark_blue_moon/scale_shoot
execute if items entity @a[tag=togp] weapon.mainhand minecraft:gray_dye[minecraft:custom_name="tower of gray"] run function template:tower_of_gray/stand_display
execute if items entity @a[tag=togp] weapon.offhand minecraft:gray_dye[minecraft:custom_name="tower of gray"] run function template:tower_of_gray/tongue_shot
execute if items entity @a[tag=setp] weapon.mainhand minecraft:clay_ball[minecraft:custom_name="sethan"] run function template:sethan/stand_summon
execute if items entity @a[tag=tohthp] weapon.offhand minecraft:book[minecraft:custom_name="tohth"] run function template:tohth/combat
execute if items entity @a[tag=hp] weapon.offhand minecraft:diamond_sword[minecraft:custom_name="hermit purple"] run function template:hermit_purple/hermit_grapple
execute if items entity @a[tag=hp] weapon.mainhand minecraft:diamond_sword[minecraft:custom_name="hermit purple"] run function template:hermit_purple/stand_display
execute if items entity @a[tag=hps] weapon.mainhand minecraft:clock[minecraft:custom_name="horus"] run function template:horus/stand_display
execute if items entity @a[tag=hps] weapon.offhand minecraft:clock[minecraft:custom_name="horus"] run function template:horus/icicle
execute if items entity @a[tag=tfp] weapon.mainhand minecraft:clock[minecraft:custom_name="the fool"] run function template:the_fool/stand_display
execute if items entity @a[tag=tfp] weapon.offhand minecraft:clock[minecraft:custom_name="the fool"] run function template:the_fool/hand_shoot
execute if items entity @a[tag=ep] weapon.mainhand minecraft:clock[minecraft:custom_name="emperor"] run function template:emperor/stand_display
execute if items entity @a[tag=anubisp] weapon.offhand minecraft:netherite_sword[minecraft:custom_name="Anubis"] run function template:anubis/pre_dash
execute at @p[tag=getting_stand,limit=1] positioned ~ ~10 ~20 if biome ~ ~ ~ minecraft:desert run function template:spawn_roll
execute at @p[tag=getting_stand,limit=1] positioned ~ ~10 ~20 if biome ~ ~ ~ minecraft:plains run function template:spawn_roll_p
execute at @p[tag=getting_stand,limit=1] positioned ~ ~10 ~20 if biome ~ ~ ~ minecraft:deep_ocean run function template:spawn_roll_c
execute at @p[tag=getting_stand,limit=1] positioned ~ ~10 ~20 if biome ~ ~ ~ minecraft:ocean run function template:spawn_roll_c
execute at @p[tag=getting_stand,limit=1] positioned ~ ~10 ~20 if biome ~ ~ ~ minecraft:deep_cold_ocean run function template:spawn_roll_c
execute as @a at @e[name=scales] run particle dust{color:[0.0,0.0,1.0],scale:1.5} ~ ~1 ~ 0.1 0.1 0.1 0 1 force
execute as @a at @e[name=scale] run particle dust{color:[0.0,0.0,1.0],scale:1.5} ~ ~1 ~ 0.1 0.1 0.1 0 1 force
execute as @a at @e[name=scaless] run particle dust{color:[0.0,0.0,1.0],scale:1.5} ~ ~1 ~ 0.1 0.1 0.1 0 1 force
execute as @a at @e[name=freezer] run particle poof ~ ~1 ~ 0.1 0.1 0.1 0 4 normal
execute as @a at @e[name=freezerr] run particle poof ~ ~1 ~ 0.1 0.1 0.1 0 4 normal
execute at @a[tag=anubisp] if entity @e[type=villager,distance=..6] run function template:anubis/kill_villagers  