reinstall OS on a new HDD
You can just install the new hard drive and if you have a connection to the internet when you first boot up you can download Mac OS X directly from apple.  If you hold the alt key while the machine is booting it will take you directly to Internet Recovery. 

Some features like iPhoto will be missing from this "free" version however they are very cheap and easy to install afterwards via the app store.

This process was tested on a 2011 MBP, also because you have to download the entire OS the process is quite lengthy.