the early models used a shutoff solenoid mounted on the top of the engine, two 10mm head bolts holding it down. Those types required 12v to pull the fuel lever in to stop the engine. This also required a module to make it happen (combination box). The combination box is a high failure rate item. So is the solenoid itself.
In the old days you had no shut off, it was manual (lever you pull out on). If you rolled the tractor over it would not shut off until the fuel pickup became uncovered and the fuel line ran completely dry....took a while. Then they started using these electric solenoid things like I've described, which was failure prone, along with it's control mechanism. If it were me, I'd replace the solenoid and combination box. Both have new part numbers. Be sure to adjust the solenoid properly as the holes are oblonged (at least oem stuff is) so you can slide the solenoid back & forth just a little bit to make the adjustment.
--but wait. Remember, the government likes clean air. Keep this in mind. In years past a lot of equipment had a "road draft tube", basically a crankcase breather vent tube that ran from the valve cover toward the ground, which vents crankcase vapors. Can't do that anymore so now they have to re-route the vapors back into the engine to be re-burned. Closed crankcase ventilation. Clean air. If one were to roll the tractor over, sometimes the oil in the crankcase is gravity fed to the valve cover area, which is then pulled into the intake manifold, and there is nothing you can do to shut the engine off at that point aside from cutting it's air supply, it is a runaway until it either runs out of oil or hydraulically locks the engine. Kinda ironic how "they" solved "their" problem and created another. I'm not saying it's good bad or otherwise, just saying that's how it works. You wouldn't believe how many engines I've had to replace because of this...a bunch of them. Surprised nobody got hurt in some of the runaway situations, especially when mowing or tilling.
I kind of wish they'd put a air valve in the intake for the purpose of cutting off the air supply in case of a rollover.