Hi there and welcome
It is possible the power supply fan or processor fan failed which can cause this, or it can be the PRAM that has crashed.
Can you do the following please.
Locate the following keys on the keyboard: Command (⌘), Option, P, and R. Turn on your Mac.Press and hold the Command-Option-P-R keys immediately after you hear the startup sound.Hold these keys until the computer restarts and you hear the startup sound for a second time.Release the keys.
What then happens?
It is the internal mainboard that has fried, a capacitor will have blown due to the heat. Normally this is caused when a fan faults which causes it to overheat. Your data on the hard disk should be ok as they can take a bit of heat.
I am really sorry about this and you are going to have to return the Macbook to have the mainboard and faulting fan replaced. The processor may also need replacing but they will; test this.
It will be covered by the warranty if this has not expired, and the replacement will be done at no cost to you.
I am really sorry about this, and if you have problems, or would like any additional information or assistance, please do not hesitate to let me know.
And if you can take a second to rate my service, that would be greatly appreciated.
If you need anything else please let me know and please remember the service rating via one of the stars at the top then submit
These are all stores in QLD
But you can also return to the place of purchase as well.