Laptop screen failure; random colors followed by black screen

I recently did a factory restore on my laptop since it was giving me really bad problems before(BSOD on boot, unable to start in safe mode, etc). I assumed that it was caused by a bad video driver installation. Once I did my factory restore, this problem was solved, but it seems like a new one arose.

In the first few days the laptop was working fine, but I recently realised that if I unplug my AC Adapter, my laptop would work for awhile but will eventually die. The screen would just go black, then I would see weird colors and then it would go black again and I would be forced to hold the power button and restart. The funny thing is, this never happens when I have it plugged in.

I then realised that it happened when I plugged it out and moved it around, so I assumed it had something to do with the wiring inside my laptop. But it seems that isn't the case since even if I move it around while it's plugged in, it doesn't happen. I'm pretty sure it has something to do with my power supply at this point, but I'm not really sure.

If anyone can help, I would really appreciate it!

EDIT: It just happened to me as I tried to access my task manager. I did CTLR+ALT+DEL and my screen went black, and my laptop simply restarted itself.
 
EDIT: It seems it has gotten way worse. It happened while it was plugged in, and not only that, but when I tried to turn on my laptop again, the screen remained black and I heard these beeping noises. (6 beeps in succession, over and over) Sometimes I turned it on and it didn't even beep. I managed to actually get my laptop to boot, but I'm afraid it will happen again.
 
Back