#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
#
#    This function has been created by Skilendarz Group.
#             https://skilendarz.com
#
#      GIVE MAP MAKERS THE CREDIT THEY DESERVE!
#             COPYING IS PROHIBITED!
#
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#

data merge entity @s {Offers:{Recipes:[]}}
execute if entity @p[distance=..8] run tp @s ~ ~ ~ facing entity @p[team=!spec]
execute unless entity @p[distance=..8] run tp @s[tag=look_0] ~ ~ ~ 0 0
execute unless entity @p[distance=..8] run tp @s[tag=look_90] ~ ~ ~ 90 0
execute unless entity @p[distance=..8] run tp @s[tag=look_-90] ~ ~ ~ -90 0
execute unless entity @p[distance=..8] run tp @s[tag=look_180] ~ ~ ~ 180 0