This is a Deathghost skript this cancels the player's death then puts them in spectator (sets their flyspeed to 0) pushes them back ~3 blocks then uses action bar to make a counter of 3 seconds then tp's them to spawn
You will need to change the statsedit part to work with the plugins you are using***