Add Fresh Script to Game Object

Hi,

I have a OnGUI Character Creation Menu where I can select 2 different characters. Based on my selection I want to add a "fresh" script onto an existing game object.

`using UnityEngine;
using System.Collections;

public class CharacterSelection : MonoBehaviour
{
public static int userCharacter = 0;

void OnGUI()
{
GUI.Box (new Rect (0, 0, Screen.width, Screen.height), “Select Your Character”);

if (GUI.Button (new Rect (100,100,200,20), "CharacterA")) 
{
    userCharacter = 1;
    Debug.Log(userCharacter);
                      gameObject.AddComponent(typeof(CharacterA));

Application.LoadLevel(“CharacterCreationScreen”);
}
if (GUI.Button (new Rect (100,160,200,20), “CharacterB”))
{
userCharacter = 2;
Debug.Log(userCharacter);
gameObject.AddComponent(typeof(CharacterB));
Application.LoadLevel(“CharacterCreationScreen”);
}
}
`

}

What I want is to choose a character and have the game know that I want this script loaded onto a game object that I have in a scene that I eventually get to..........

your descriptiont is not clear but i try to show you ways for connection gameObjects together. 1 you can check the static variable of this class in OnLevelLoaded method of your next level's object and load the script based on it's value. 2 you can have an object that don't destroy when you change the scene (use DontDestroyOnLoad in Awake function) and use it's OnLevelLoaded method to do what you want by this gameObject. for adding a script to a gameObject you should use AddComponent