Tutorial on how to easily create a zone where any player who enters a certain coordinate will die.
The command is very simple — it basically detects if a player is within a specific coordinate area.
The distance
parameter defines the detection radius on the x, y, and z axes; in this case, it expands the detection range around those coordinates.
execute as @a run execute if entity @s[x=61,y=22,z=-850,distance=..2] run kill @s
As soon as a player enters this small radius, the kill
command will be executed only by that player, instantly killing them.
You can also change it to a teleport command, for example, if you want to create an exclusive area instead.