You can just use Inf health then turn on NAN health then turn it off. That way, you have NAN health but don't take damage and won't die when you turn off your hacks.