I (think) it’d be simple (But I suck with scripting so bugger me), just upon the player going below 5,900 health force them to ragdoll/become invincible. and have to press E or R to revive/unragdoll. (I use 5,900 as its TrainerV’s special god mode setting.
Use Fax Revive it is exactly what you are asking for.