To answer the question in general ("How do I make ifs inside ifs work"), the if conditions need to be indented or to use "begin." To indent them, you'd do something like this:
Instead of waking your children:
if the safety check is less than 4:
say "You'll have time for that...";
if the safety check is 5:
if the consciousness of your children is 0:
say "Snachala...";
and so on. See ยง11.7. Begin and end in the Inform manual.
As for your specific case, I haven't tested it because I'm not eager to retype the whole example.