Having a door dissapear once a key is collected

I have a door object in my maze, that has a mesh collider on it so you cant pass through it from the beginning, but i want to make it so that once you activate the trigger animation set up on a chest you will be able to get through the door once this event has happened. This is the code i have for the chest,

var displayMessage = false;

function OnTriggerEnter (Player : Collider) 
{
     animation.Play("Take 001");
     displayMessage = true;
     yield WaitForSeconds(3);
     displayMessage = false;
}

function OnGUI ( )
{
if ( displayMessage ) 
     {
    GUI.Label(new Rect(Screen.width /2.5, Screen.height / 2, 200, 200), "You received rusty key");
}
}

Once that has happened i want it so that when you approach the door you can now get through it, also that this would be the end of the game so id want it to stop after you got through the door.

Thanks in advance for any help

You need to disable the collider attached to the door object. I don't what kinda door is that that you can walk through it tho lol. Anyway you can simply remove the collider:

Destroy(GetComponent(MeshCollider));

And use box collider cause mesh collider is more costly on the performance and it's not really necessary for an object like a door. It'll look something like this:

function OnTriggerEnter (Player : Collider) 
{
     var door:GameObject = GameObject.Find("door");
     Destroy(door.GetComponent(MeshCollider));
     animation.Play("Take 001");
     displayMessage = true;
     yield WaitForSeconds(3);
     displayMessage = false;
     FadeOut.fadeOut = true; //---> change the fadeOut var in FadeOut.js to start fading out.
}

About the game end. You should know what happens when your game is over. For turning the screen to black. You have two options:

put a black plain in front of a camera and make an alpha animation or simply use Lerp to turn the alpha from 0 to 1 over time.

Attach this script to the black plain and name the script "FadeOut.js":

var increment:float;
static var fadeOut:boolean = false;

function Update(){
 if(fadeOut){
  renderer.material.color.a = Mathf.Lerp(0,1,increment);
  increment +=0.02;
 }
}

Or you might wanna try iTween plugin. It's free and does that for you in only one line code.