WindowServer crashes
First things first...

You can run the Apple Diagnostics.  While booting, hold down the D key.  Whatever errors are reported, make note of them and post them to your question.

As an alternative, boot into Recovery Mode (CommandR) or Internet Recovery (CommandOptionR) and try seeing what is happening to your screen.

Finally, You need to get that HDD fixed.  There is no point in trying to diagnose further when you have a critical failure taking place; it's the 800lb gorilla in the room.

I am assuming that you have a spinning HDD as these normally came with a 750GB HDD.  I am not going to get into too much detail on how to upgrade your drive, as there are many posts where the answer is very similar if not the same as the answer to (initially) to this question that I won't go into detail here.  

Check out the answers to the questions below:


New SSD problem
My Mac is getting really slow, what should I do?




Suffice to say, the steps you will take are:


Download and create a installation USB flash of OS X El Capitan
Back up your data with Time Machine
Replace Your Drive.  I am partial to Samsung  I am using one in my iMac right now.
Do a clean Install OS X El Capitan
Test your video!


If your video problem persists, then we can start looking at what the cause could be.  Chances are, it will be fixed by this point

Once fixed, restore your files and data from the time machine back up and you will again have a working MBP.