Tried all the usual but I think the hard drive is trashed. Was able to save files through Time Machine. When I ran Disk Utilities Repair DIsk it would not repair then I erased the drive and tried to install the system software but it said the hardware was damaged.
Should I replace the harddrive or go for a new machine? I bought it Feb 2010.
Feb 2010 is not so long ago.
If you bought Applecare insurance with this Mac, the hard drive replacement would be covered, as it is not three years yet since you bought it.
Without that insurance, the labour cost of replacing a hard drive in an iMac is not worth it, unless you do it yourself.
Alternatively, you could run it from an external hard drive. The cost of an external hard drive is pretty reasonable.