scoreboard players add @s mobtime 1


execute unless block ~ ~ ~ #aop1:air run tp @s[scores={mobtime=..10}] ~ ~0.35 ~ facing entity @p
execute if block ~ ~-5 ~ #aop1:air run effect give @s slow_falling 1 1 true
execute if block ~ ~0.1 ~ fire run effect give @s fire_resistance 20 1 true
execute if block ~ ~0.1 ~ lava run effect give @s fire_resistance 20 1 true 
execute if block ~ ~0.1 ~ water run effect give @s water_breathing 1 1 true 
execute unless block ~ ~1 ~ #aop1:air run effect give @s resistance 1 100 true
execute unless block ~ ~1 ~ #aop1:air run tp @s ^ ^0.1 ^0.1



execute unless block ^ ^1.5 ^1.6 #aop1:air run scoreboard players add @s[scores={mobtime=30..}] block 1
tp @s[scores={block=10..}] ^ ^0.1 ^0.2
execute if block ^ ^1.5 ^1.6 #aop1:air run scoreboard players reset @s[scores={block=1..}] block




execute at @s[tag=!dr] run function aop1:dr



execute at @s[tag=003] run effect give @p[distance=..1.5] slowness 3 1 true 
execute at @s[tag=004] run effect give @p[distance=..1.5] darkness 3 1 true 
execute at @s[tag=006] run effect give @p[distance=..1.5] hunger 2 30 true 
execute at @s[tag=007] run effect give @p[distance=..1.5] poison 5 0 true 
execute at @s[tag=008] run effect give @p[distance=..1.5] weakness 3 1 true 
execute at @s[tag=013] if entity @p[distance=..1.5] run effect give @s instant_damage 1 0 true 


execute at @s[type=creeper] if entity @p[distance=..3] run effect clear @s


execute unless entity @p[distance=..30] run function aop1:despawn
execute if entity @s[scores={mobtime=6000..}] run function aop1:despawn
