I'm curious as to where you kill switch is unplugged. If it is not already, try unplugging the kill switch wire at the CDI unit itself, should be an orange wire.
Make sure all the connections are clean and good, you could have corrosion on the connector contacts, or a broken wire in the multi pin connector.
What year is your bike?