execute as @s[gamemode=spectator,tag=ghostpot] at @s anchored eyes positioned ^.1 ^ ^.15 run particle minecraft:small_flame ~ ~ ~ 0 0 0 1 0 force @a[gamemode=!spectator]
execute as @s[gamemode=spectator,tag=ghostpot] at @s anchored eyes positioned ^-.1 ^ ^.15 run particle minecraft:small_flame ~ ~ ~ 0 0 0 1 0 force @a[gamemode=!spectator]
execute as @s[gamemode=spectator,tag=ghostpot] at @s run particle minecraft:squid_ink ~ ~1.5 ~ .2 .3 .2 0 2 force @a[gamemode=!spectator]
execute as @s[gamemode=spectator,tag=ghostpot] at @s run particle cloud ~ ~.5 ~ 0 0 0 0 1 force @a[gamemode=spectator]
execute as @s[predicate=survivalplus:adventuremode,gamemode=spectator,tag=ghostpot] at @s unless block ~ ~1 ~ #survivalplus:respawnable in survivalplus:backrooms run tp @s ~ ~ ~
execute as @s[predicate=survivalplus:adventuremode,gamemode=spectator,tag=ghostpot] at @s unless block ~ ~1 ~ #survivalplus:respawnable run function survivalplus:tools/backroomspread

execute as @s[scores={ghost=1..},tag=ghostpot] run scoreboard players remove @s ghost 1
execute as @s[gamemode=spectator,tag=ghostpot,scores={ghost=1..101}] run function survivalplus:tools/pot/ghostwarn
advancement revoke @s only survivalplus:tools/tick/ghost