So I read up a few threads on similar topics but nothing seemed to cover entirely what I'm trying to do. I want to make a command which detects players using each axis separately. For example, instead of doing a circular radius based on where the command originates ( rm, r ), I want to make it Ymin and Ymax. If a player is under the Ymax and above the Ymin, command outputs successfully. Not sure if there is a way to do it but if there is, please tell me.
The reason I need this is to detect a player in a square radius around the target rather than circle. I want to make a Battle Royale style minigame where the game will detect and tell a player if they are in the safezone area. Since worldborder is a square, I would need a square radius. Obviously the whole point is to warn the player before the worldborder begins closing in, so thats why I need the command. Thanks for the help.