Battery might be going bad. Parts over heating. Try getting cpuz and/or core temp and see what the average temps on idle and before it shuts down is. Therm compound may be dried up so you might have to reply new one.
If you are playing a lot inside the machine, then I would check that the fan is connected. Seen many forget about the fan or that it somehow disconnected itself.
Sounds like your motherboard or something is just broken to me. But I'm not an engineer or anything, I just play around with computers as a hobby so my opinions are pretty much nothing indifference to others.