Rigidbody Eraser

i wanted to know if you could use a normal cube attach it to a camera and then add a script that would destroy anything it collides with that is a rigidbody. heres what i have:

function OnCollisionEnter (Collision : Collision) {

  if (collider == Rigidbody)   
    Object.Destroy("Cube");
  collider.isTrigger = true;
}

You should write:

function OnCollisionEnter (col : Collision) {

  if (col.rigidbody){ // if the object has a rigidbody...
    Destroy(col.gameObject);  // destroy it
  }
}