So the apple service nearby told me I have to replace the motherboard. But sometimes my macbook could back normal. Yesterday after being kept in my backpack for hours outside in a sunny day, my laptop was so warm and I pressed the power button and it turned on! Now after being turned off and kept in the air con room it went dead again. If anyone knows how to fix it please help
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
it sounds like a hardware problem that Apple has diagnosed for you. The way to fix it is to get a new logic board as they suggested, or a new machine. The only other way to fix a hardware issue is to find someone with a reflow station and serious hardware skills, but that's beyond the scope of this website!