If the game freezes, just click inside it (games can get unresponsive if you click elsewhere on the page).
Move through the levels as you change your hats to change your abilities you need to win each level.
Left / Right Arrow Keys - Move.
Up Arrow Key / X - Jump.
Down Arrow Key / C - Action.
1-5 - change Hat.