Disable SCRIPT HELP!!!!

hello i not sure on this i am telling my script to turn of when a new object re-spawns. here is my code:

var spawn : Transform;

//drag your spawn point to here in the inspector - probably make it an empty gameobject so you can move it about on the diving board

//This is the player that it will destroy

var MainPlayer: GameObject;

function Update()

{

if(Input.GetKey(KeyCode.N)){

   transform.position = spawn.position;

    Destroy (MainPlayer);

    GetComponent(NewMoveScript).enabled = false;              

// if i press the N key the new player will respon on the current players position and then // the first player will get destroyed and then the script will disable it self

}

can anyone help please thank you :) }

I hope I have understood your question correctly. I have made some modifications to your script.

//drag your spawn point to here in the inspector - probably make it an empty gameobject so you can move it about on the diving board
var spawn : Transform;
//This is the player that it will destroy
var MainPlayer: GameObject;
//This is the prefab of the new player
var NewPlayerPrefab : Transform;

function Update()
{
    if(Input.GetKey(KeyCode.N))
    {
        Destroy (MainPlayer);
        Instantiate(NewPlayerPrefab,spawn.position,spawn.rotation);
        this.enabled = false;              
    }
}

Is this what you were looking for?