Swap or modify the script on an object mid-game on key press?

Is it possible to swap the script or modify the script on an object while in-game? If so how?

If you want to rewrite the script during run time, no.

If you want to add, or remove a script, or change the variables inside of a script, yes.

To add a script to a game object at run time, use [GameObject.AddComponent("Script Name")][1];

To remove a script from a game object at run time, use [Destroy(refrenceToYourScript)][2];

To change the values of a varible on a script, either create a method to do so and SendMessage() to call it, you can get a refrence to your script (using something like [GetComponent("Script Name")][3]), and then just modify the values as you would a Vector3 or another object: scriptRefrence.exampleValue = newValue;

Hope this helps