Old tools and drills in particular tend to die from power cords. Here's how I put one on a Bosch jigsaw.
Power cords can be tricky to diagnose. Which is a good thing, because you'll get tools for free and they're easy to fix with random power cords.
I used to do a continuity test by shoving needles into the cable and hooking my meter's clips to those. That way I could find out just where the break was without messing up the insulation.
If it's just the plug at the end you'll want to replace that.
It's also easy to cut the cord and splice a new one on halfway.
Vincent gave me this one with no cord at all so the decision was already made.
I had a scavenged power cord, probably from a computer with the computer end cut off.
I wired it in. This tool had a clamp for keeping the cord from pulling out. If there isn't one of those you can improvise with wire ties or tying a knot in the cord.
Once I looked inside I saw it was an insulated case with no place for a ground attachment. So I cut the green ground wire off my cord. Then I broke off the ground pin from the connector so no one would get confused.
Older tools sometimes have a metal case that is grounded through the third pin. The theory there is that if any wires get loose and short inside, they'll short to the case and blow a fuse instead of electrocuting you.