Press GO! to pull a ball out of the machine. Each ball is worth a different number of points. Get as many points as you can before you get the black ball, which is Game Over.
A smaller, more optimized, and updated version of the original game: scratch.mit.edu/projects/860538087