What's Wrong? 2 Problems

I am currently trying to make a script that makes the Player die after colliding with a Plane/Object but when I test the game with the script in the Plane/Object, there is an error:

ApplicationException: Argument is not enumerable (does not implement System.Collections.IEnumerable).
Boo.Lang.Runtime.RuntimeServices.GetEnumerable (System.Object enumerable)

The script is as follows:

function OnTriggerEnter(other : Collider){   
       if(other.gameObject.name == "Player"){ 
              GameObject.Destroy(other.gameObject); 
             for(var child : Transform in transform.gameObject){ 
                            GameObject.Destroy(child.gameObject);  
                 }                                                                            
              Debug.Log("Player was brutalized"); 
       }
 }

I also have another problem with a Reload Level script I put in my game scene. It generates a ‘Restart’ GUI button which reloads the level, but when I click it, the light in the scene turns darker.

The script is as follows:
function OnGUI(){

 if ( GUI.Button( Rect( 1, Screen.height-25, 75, 25 ), "Restart" )) {
 
 Application.LoadLevel(Application.loadedLevel);
 
 }
 
 }

If you could help me fix these two problems, I would appreciate it greatly.

Thanks.

instead of this:

for(var child : Transform in transform.gameObject){ 
    GameObject.Destroy(child.gameObject);  
} 

you should write this:

var children = new List<GameObject>();

foreach (Transform child in transform)
   children.Add(child.gameObject);

children.ForEach(child => Destroy(child));