title @p[tag=tfp] actionbar "defending"
function template:the_fool/remove/all
execute at @p[tag=sb] run kill @e[distance=..3,type=minecraft:arrow]
attribute @p[tag=tfp] minecraft:sneaking_speed base set 0.01
effect give @p[tag=tfp] minecraft:resistance 1 1 true
execute at @p[tag=tfp] run effect give @e[distance=..3,tag=!tfp] slowness 1 3 true
execute at @p[tag=tfp] unless entity @e[tag=sb] run function template:sand_barrier/summon {args:{}}
execute at @p[tag=tfp] unless entity @e[type=marker,tag=sbpa] run summon marker ~ ~ ~ {Tags:["sbpa"]}
execute at @p rotated ~ 0 run tp @e[type=marker,tag=sbpa] ^ ^-0.5 ^
execute at @e[type=marker,tag=sbpa] as @e[tag=sb] facing entity @p[tag=tfp] feet run tp @s ~ ~0.5 ~ ~ 0
schedule function template:the_fool/settle 3t