Laptop screen turns black when I unplug from charger
Solution 1:
The first step to diagnose this problem would be to insert a new battery into your laptop, charge it and pull the power plug.
Any other efforts to diagnose will be much more expensive than that.
I expect your battery to be the culprit anyway. A used battery will show effects of fast voltage reduction and high internal resistance. Both effects combined will yield a low battery voltage when there is a load for the battery.
Below a certain battery voltage either the firmware or the operation system takes protective measures but a circuit failing to work due to extreme low voltage could be a possibility for your darkening screen as well.