execute as @a at @s if block ~ ~-0.2 ~ light_blue_glazed_terracotta run effect give @s speed 1 4 true
execute as @a at @s if block ~ ~-0.2 ~ blue_glazed_terracotta run effect give @s speed 1 7 true
execute as @a at @s if block ~ ~-0.2 ~ lime_glazed_terracotta run effect give @s jump_boost 1 3 true
execute as @a at @s if block ~ ~-0.2 ~ green_glazed_terracotta run effect give @s jump_boost 1 6 true
execute as @a at @s if block ~ ~-0.2 ~ white_glazed_terracotta run effect give @s levitation 3 3 true
execute as @a at @s if block ~ ~-0.2 ~ orange_glazed_terracotta run effect give @s levitation 3 7 true

execute as @a at @s if block ~ ~-0.2 ~ purple_glazed_terracotta run effect give @s slow_falling 3 1 true
execute as @a at @s if block ~ ~-0.2 ~ gray_glazed_terracotta run effect give @s blindness 2 1 true
execute as @a at @s if block ~ ~-0.2 ~ gray_glazed_terracotta run effect give @s blindness 2 1 true
execute as @a at @s if block ~ ~-0.2 ~ pink_glazed_terracotta run effect give @s levitation 4 255 true


execute as @a at @s unless block ~ ~ ~ minecraft:lava unless block ~ ~ ~ minecraft:fire run effect give @s minecraft:fire_resistance 1 0 true
execute as @a at @s if block ~ ~ ~ minecraft:lava run effect clear @s minecraft:fire_resistance
execute as @a at @s if block ~ ~ ~ minecraft:fire run effect clear @s minecraft:fire_resistance

execute as @a at @s if block ~ ~1.8 ~ brown_glazed_terracotta run tp @s ~ ~3 ~

execute as @a[nbt={OnGround:1b},scores={sneak=1..}] at @s if block ~ ~-0.1 ~ black_glazed_terracotta unless block ^ ^ ^1 minecraft:quartz_block unless block ^ ^ ^2 minecraft:quartz_block unless block ^ ^ ^3 minecraft:quartz_block unless block ^ ^ ^4 minecraft:quartz_block unless block ^ ^ ^5 minecraft:quartz_block unless block ^ ^ ^6 minecraft:quartz_block run tp @s ^ ^ ^6

execute as @a[nbt={OnGround:1b},scores={sneak=1..}] at @s if block ~ ~-0.1 ~ yellow_glazed_terracotta run tp @s ~ ~3 ~


execute as @a[nbt={OnGround:1b},scores={sneak=1..}] at @s if block ~ ~-0.1 ~ brown_glazed_terracotta run tp @s ~ ~-3 ~



execute as @a at @s if block ~ ~-0.2 ~ light_gray_glazed_terracotta run summon minecraft:arrow ~ ~5 ~ {Motion:[0.0,-0.1,0.0]}

kill @e[type=arrow,nbt={inGround:1b}]


execute as @a at @s if block ~ ~-0.1 ~ magenta_glazed_terracotta[facing=north] run tp @s ~ ~ ~1
execute as @a at @s if block ~ ~-0.1 ~ magenta_glazed_terracotta[facing=south] run tp @s ~ ~ ~-1
execute as @a at @s if block ~ ~-0.1 ~ magenta_glazed_terracotta[facing=west] run tp @s ~1 ~ ~
execute as @a at @s if block ~ ~-0.1 ~ magenta_glazed_terracotta[facing=east] run tp @s ~-1 ~ ~



execute as @a at @s if block ~ ~-0.9 ~ cyan_glazed_terracotta if predicate ps:random50 run tp @s ~ ~ ~ ~-7 ~
execute as @a at @s if block ~ ~-0.9 ~ cyan_glazed_terracotta if predicate ps:random50 run tp @s ~ ~ ~ ~7 ~

execute as @a[scores={level=58},gamemode=!spectator,gamemode=!creative] at @s if block ~ ~0.05 ~ large_amethyst_bud run kill @s
execute as @a[scores={level=58},gamemode=!spectator,gamemode=!creative] at @s if block ~ ~0.9 ~ large_amethyst_bud run kill @s
execute as @a[scores={level=58},gamemode=!spectator,gamemode=!creative] at @s if block ~ ~1.2 ~ large_amethyst_bud run kill @s

execute if block 70 84 88 minecraft:redstone_block run effect give @a night_vision 100000 255 true
execute unless block 70 84 88 minecraft:redstone_block run effect clear @a night_vision
effect give @a saturation 100000 255 true


execute as @a[scores={level=58},gamemode=!spectator,gamemode=!creative] at @s if block ~ ~ ~ #ps:killing_amethyst run kill @s

scoreboard players reset @a sneak

execute as @e[tag=ghost_block] at @s if entity @a[distance=..4.5] run setblock ~ ~ ~ gray_concrete
execute as @e[tag=ghost_block] at @s unless entity @a[distance=..4.5] run setblock ~ ~ ~ air
execute as @e[tag=ghost_block] at @s if entity @a[distance=..4.5] if block ~ ~ ~ air run kill @s

execute as @e[tag=ghost_block_killer] at @s as @e[tag=ghost_block,distance=..2] at @s run setblock ~ ~ ~ air
execute as @e[tag=ghost_block_killer] at @s as @e[tag=ghost_block,distance=..2] at @s run kill @s
kill @e[tag=ghost_block_killer]