No respawn screen [how?]

I'm creating a pvp arena map and it's really boring to die and having to press the respawn button over and over and having to go thought the respawn lag etc. How do people get teleported in their spawnpoint when their health is 0? Like how hypixel does it? When you get killed you go staight to your respawn point, no death screen, nothing


If you didn't want to use a mod, you could just say that having a half heart is effectively dying and teleport them then. To do this, you'd need to run a function (in a datapack, which works well for maps) every tick which checks a scoreboard set to track all players' health and, when the value is 1 (.5 hearts) give them a potion of instant healing and tp them to the location you want for the spawnpoint:

execute as @a[score={health=..1}] at @s run tp @s <position to spawn at>
execute as @a[score={health=..1}] at @s run effect give @s instant_healing 10

I apologize for any syntax errors I made. Note that if a player gets dealt enough damage to put them over the edge, such as receiving n damage at 2 to n health, they will die. This at best will stop some people from having to go through the respawn screen, but the majority would die. To intercept this you'd need mods, as mentioned above, or maybe a plugin, as dying is a coded-in feature. Also, you'd need to set up the health scoreboard like this in a load function: scoreboard objectives add health health.