If the game freezes, just click inside it (games can get unresponsive if you click elsewhere on the page).
Dive your submarine for treasure. Get money from treasure to buy better sub. Go deeper for more gold
Arrow keys - Navigate ship / Dive (Submarine).
Space bar - Drop / Attach submarine to boat.
A - Grab treasure.