An instance of type 'UnityEngine.Animator' is required to access non static member 'GetBool'

I’m working on a FPS. I’m new in Unity so I don’t know much about scripting. I want to make a script that makes the player able to enter aiming mode. This is the script:

@script RequireComponent(Animator)

function Update () {
	if (Input.GetButtonDown ("Fire2")) {
		if (!Animator.GetBool("aimingMode")) {
			Animator.SetBool("aimingMode", true);
			aimingMode = true;
		}
	}
}

I know it’s unfinished. The problem is that when I take a look at the console in unity, it says:

An instance of type ‘UnityEngine.Animator’ is required to access non static member ‘GetBool’.

I don’t know how to solve this. The gameobject has already got an animator with an animation controller and the booleans set. Please help.

Animator by itself is a class, there is no logic in calling GetBool on it. You need to reference the Animator component on your gameobject.
So, that would be

var animator:Animator;

function Start(){
   animator=GetComponent(Animator)
}

function Update () {
  if (Input.GetButtonDown ("Fire2")) {
    if (!animator.GetBool("aimingMode")) {
      animator.SetBool("aimingMode", true);
      aimingMode = true;
    }
  }
}