Would it be something like this?
function isPedDead()
if isPedDead then Dead = showPlayerHudComponent(thePlayer "source, nitroShow",false)
else
getElementHealth(player) if Health then showPlayerHudComponent(thePlayer "source, nitroShow",true)
end
end
end