execute at @p[tag=tfp] unless entity @e[tag=tf] run playsound minecraft:block.sand.place master @p[tag=tfp] ~ ~ ~
execute at @p[tag=tfp] unless entity @e[type=marker,tag=tfpa] run summon marker ~ ~ ~ {Tags:["tfpa"]}
execute at @p rotated ~ 0 run tp @e[type=marker,tag=tfpa] ^ ^ ^-1
execute at @e[type=marker,tag=tfpa] as @e[tag=tf] facing entity @p[tag=tfp] feet run tp @s ~ ~0.5 ~ ~ 0
execute at @p[tag=tfp] unless entity @e[tag=tf] run particle minecraft:block_crumble{block_state:{Name:"minecraft:sand"}} ~ ~1 ~ 1 1 1 0 100 normal
execute at @p[tag=tfp] unless entity @e[tag=tf] run summon minecraft:text_display ^-1 ^2 ^ {Tags:["custom_font"],background:0,billboard:"center",text:'\uE000'}
execute at @p[tag=tfp] unless entity @e[tag=tf] run summon minecraft:text_display ^-0.6 ^1.8 ^ {Tags:["custom_font"],background:0,billboard:"center",text:'\uE000'}
execute as @e[tag=custom_font] at @s run tp @s ~ ~0.02 ~
execute as @e[tag=menacing3] at @s run tp @s ~ ~0.02 ~
schedule function template:kill_menacing 15t append
execute at @p[tag=tfp] unless entity @e[tag=tf] run function template:the_fool/summon {args:{}}
execute at @e[name=wave1] run particle minecraft:block_crumble{block_state:{Name:"minecraft:sand"}} ~ ~1 ~ 1 1 1 2 500 normal
execute at @e[name=wave2] run particle minecraft:block_crumble{block_state:{Name:"minecraft:sand"}} ~ ~1 ~ 1 1 1 2 500 normal
execute at @e[name=wave3] run particle minecraft:block_crumble{block_state:{Name:"minecraft:sand"}} ~ ~1 ~ 1 1 1 2 500 normal
execute at @e[name=wave4] run particle minecraft:block_crumble{block_state:{Name:"minecraft:sand"}} ~ ~1 ~ 1 1 1 2 500 normal
execute as @a[tag=tfp] at @e[name=wave1] facing entity @s feet if block ~ ~ ~ air run tp @e[name=wave1] ^ ^ ^-3
execute as @a[tag=tfp] at @e[name=wave2] facing entity @s feet if block ~ ~ ~ air run tp @e[name=wave2] ^ ^ ^-3
execute as @a[tag=tfp] at @e[name=wave3] facing entity @s feet if block ~ ~ ~ air run tp @e[name=wave3] ^ ^ ^-3
execute as @a[tag=tfp] at @e[name=wave4] facing entity @s feet if block ~ ~ ~ air run tp @e[name=wave4] ^ ^ ^-3
execute at @e[name=wave1] run effect give @e[distance=..4,tag=!tfp] wither 4 4 true
execute at @e[name=wave2] run effect give @e[distance=..4,tag=!tfp] wither 4 4 true
execute at @e[name=wave3] run effect give @e[distance=..4,tag=!tfp] wither 4 4 true
execute at @e[name=wave4] run effect give @e[distance=..4,tag=!tfp] wither 4 4 true
execute as @a[tag=tfp,predicate=template:is_sneaking] run function template:the_fool/sand_barrier
schedule function template:the_fool/stand_display_end 10t