cranks and starts but wont keep ruuning

Then makes no sense LOL Take measurements and wiggle the key? Maybe switch going bad?