Ending in failure

Remember: if-statements only apply to the things inside them. So the line

end the story saying "[if the player does not wear the hat]You don't have a hat!"

is actually equivalent to

if the player does not wear the hat: end the story saying "You don't have a hat!"; otherwise: end the story saying ""
This is probably not what you want. You should replace those two rules with something like this:

Instead of going north from the Counter:
    if the player wears the hat:
        end the story saying "You have a hat!";
    otherwise:
        end the story saying "You don't have a hat!"

Or, equivalently (assuming neither ending is “final”)

Instead of going north from the Counter:
    end the story saying "You are[if the player does not wear the hat]n't wearing a hat[else] properly dressed[end if]!"

That so did it! Thanks!

In general I would recommend avoiding making two rules with an identical opening line – instead merge them into a single rule. Even putting different conditions into the opening line can cause surprises if they’re not mutually exclusive.