motherboard problem or issue

Feb 1, 2019
So I have a problem. I think my motherboard Asrock B85m pro3 has an issue. I plan to buy a new processor for the motherboard but Im scared because of the recent issue of the motherboard

This is how it started:

My pc keeps on restarting automatically, like once i reach on the user login in, my pc suddenly turns off and turns to black screen. So after that I Reboot my pc, and when my pc reaches the bios section it suddenly turns off again. It happens over and over again. Until nothing is appearing to my screen. So I went to a computer technician, and he checked my pc problem. and he find out that my Processor and ram are already dead. But, my motherboard still works, he tried other processor and ram. and it works (Btw my processor is g3258 and my ram is Corsair 8gb ddr3).

So, I need your suggestions. If i should buy a new processor and ram for the asrock b85m pro3 or buy a new motherboard, processor and ram. Im just a student, I dont have enough money. Im on a budget.

Any reply will greatly appreciated. Thank you very much!