As FGT says, is the price a good deal for all the components, assuming the worst-case that the frame is a write-off?
Picture's aside, I'd also be wondering that if the bike took so great a hit to damage the frame, what less obvious component damage might there also be, like bent derailleur, wheel damage, fork damage like bent uppers, etc.
If you're still keen on it, see if you can take it to your LBS for a good check over before committing any cash.