My script and unity crash

Hello,
To make it short I made a script which doesnt contain errors,but somehow everytime I run unity with that script unity frezes completly and I have to exit by force.I tested it without my script and it works fine.
Here is the script:

#pragma strict

function Start () {

}

function Update () {
Active_DE();
Shoot_DE ();
Reload_DE ();
Ammo_DE();
}
//SHOOT INPUT
var Shoot : AnimationClip;
function Shoot_DE (){
if(Input.GetMouseButtonUp(1)){
animation.Play("Shoot");
}
}
//RELOAD INPUT
var Reload : AnimationClip;
function Reload_DE (){
if(Input.GetKeyUp(KeyCode.R)){
animation.Play("Reload");
}
}
//OUTPUT STATE
var isActive : boolean = false;
function Active_DE(){
while(isActive){
Shoot_DE();
Ammo_DE();
}
while(!isActive){
Reload_DE();
}
}
//AMMUNITION OUTPUT
var Ammo : int = 7;
function Ammo_DE(){
Ammo = Ammo - 1;
}
//AUTOMATIC RELOAD
function AmmoEND_DE(){
if(Ammo < 1){
animation.Play("Reload");
}
if(animation.IsPlaying("Reload")){
animation.Blend("Shoot",5.0,5.0);
}
}

Edit:I changed while statments to if statments and now it works

You should really indent your code. It makes it so much easier to read - both for yourself and others. Use the tab key.

The problem seems to be in Active_DE. The value of isActive never changes in any of your code. So isActive starts as false and never changes to true - and if you change it to true, it needs to change to false somewhere, otherwise you’ll be stuck in an endless loop again.

   //OUTPUT STATE
    var isActive : boolean = false;
    function Active_DE(){
    	while(isActive){
    		Shoot_DE();
    		Ammo_DE();
    	}
    	while(!isActive){
    		Reload_DE();
    	}
    }