It turned out to be a hard drive failure. I took it to bits, reseated and checked the board and gave it a nice clean and dust but nothing changed. I then tried a different hard drive and it is working again. I didn't think that it was the gpu because it ran linux from a stick just fine. Ubuntu flagged up disk errors.
check your laptop spec. if the unit has a two gpu (intel and amd or nvidia see if the second gpu is not seated. if you dont think you can open your laptop if it under warranty rma it. also reseat your ram. if the unit still shutting down it can be a bad system board or heat issue. check that the cpu cooler is still on the cpu chip.