
# -> If player is not in spectator mode then revive
execute unless entity @s[gamemode=spectator] run \
    return run \
        function overly_realistic:players/revive/revive_player

# -> Spectate player
spectate @p[tag=!OverlyRealistic.Player.IsGhost] @s