Really surprised this doesn't exist, but there should be a condition to detecting if a player is under water. inblock{m=water} is very crude, and it should really be able to check OXYGEN levels in some way.