After you complete level 39, you get bonus points and the game ends. The key to scoring is take all the interest you can, as it compounds throughout the game. Don't waste money on the fancy weapons, cannons (lots of them) and arrow towers for the air levels!!
Placement of your weapons to optimize firing lines goes a long way as well.