There are 2-3 different sensors on a DT50 that will kill spark, such as kickstand, and low oil sensors. I think there is a 3rd but can't recall.
Any of these could be your problem. In addition to a shorted wire, or a failed part.
Giving us some more back ground info would help.