Entering exiting

hiya, im doing a side scroller and wondering, is there a way i can have one character with the code in the kirupa tutorial for side scrollers and then when your in contact with a vechicle you can press a button and your charcter becomes the tank car etc and there is different code on it, and when you press a button you exit it, is there a way to do this ?