[Question] How to detect if player is off-map

I’m trying to make a workshop rule that will resurrect players unless
(A) They jumped off the map or
(B) They were the victim of an environmental kill.

I want to do this to avoid an endless cycle of resurrection & death due to being off-map.

The best way I can think of implementing this would require knowing if a player is off-map in the conditions, but I haven’t seen a way to do so.
I also thought of checking the player’s Y-position, but every map seems to have a different height at which the player is automatically killed.

You can either do this for each map individually (use the map detection tool), or just teleport(event player, nearest walkable position(position of(event player))) and then ressurect.

I’m not seeing a map detection tool. Where can I find it?

Its made by the community:

Im starting to think that we need a sticky wich gives an overview of useful resources, tools and guides made by the community.

Can’t you just use “Attacker =! NULL”?
That should detect if you die in a death pit.

when u fall into a death pit the attacker is urself, same thing if u die to self dmg. also, maybe u can detect if a player is dying too many times in a short amount of time

In order to handle death by environment I am using:

Team of (Attacker) == Team 2

So I know how to manage it further.