disable all weapons for 5 seconds

hello. im having some problems with this script. when i press 2 it disables all the scripts. can anyone tell me how to change it so that it only disables the scripts for 5 seconds.

var spell :Transform;

var health : Transform;

function Update () { if(Input.GetButtonDown("cast")) { var bullit = Instantiate(spell, GameObject.Find("castpoint").transform.position, Quaternion.identity); bullit.rigidbody.AddForce(transform.forward * 1000); }

else  if(Input.GetButtonDown("cast2"))
{ //here, when i press 2 it spawns a prefab (health particle system)
   var healthskill = Instantiate(health, GameObject.Find("health cast").transform.position, Quaternion.identity);



function Die () { //if (die) //AudioSource.PlayClipAtPoint(die, transform.position);

// Disable all script behaviours (Essentially deactivating player control)
var coms : Component[] = GetComponentsInChildren(MonoBehaviour);
for (var b in coms) {
    var p : MonoBehaviour = b as MonoBehaviour;
    if (p)
        p.enabled = false;

//LevelLoadFade.FadeAndLoadLevel(Application.loadedLevel, Color.white, 2.0);


Don't disable the script, it's much easier to put a second condition in the attack logic i.e.

if(Input.GetButtonDown("cast2") && canShoot == true){
   startTime = Time.time;
   canShoot = false;
   // other stuff

Then you can set canShoot back to true after 5 seconds of being active with a counter e.g.

      canShoot = true;