function survivalplus:tools/sanity/smiler/idle
execute if entity @p[distance=..5] run function survivalplus:tools/sanity/smiler/chasing
execute if entity @p[distance=..10,predicate=survivalplus:light/2] positioned ^ ^ ^.5 if predicate survivalplus:light/2 run function survivalplus:tools/sanity/smiler/chasing
execute if entity @s[tag=chasing] unless entity @p[distance=..4] run function survivalplus:tools/sanity/smiler/upset
execute positioned ~-.5 ~ ~-.5 if entity @a[dx=0,dy=1] run function survivalplus:tools/sanity/smiler/touch