The particle can be activated by pressing M on keyboard. Then the effect shows up in the air like firework. I would like if the radius is 200, then the effect needs to be invissible. But i dont know how to script this.

Code:
VAR fireworkAnzahlPartikel = 1; //number of particles used for this effect
var radius = 0;

SOUND shellknal = <shellknal.wav>;

Function firework_spec_fun()
{
    if(my.size > 0) { my.size -= 0.117 *time; }else{my.lifespan = 0; }
    my.alpha -= 5 *time;
    IF(My.alpha < 0) { my.alpha = 0; my.lifespan = 0; }
}

Function fireworkspezial()
{
    my.blue = 233 ;
    my.green = 156 ;
    my.red = 250 ;
    my.vel_x = random( 3 ) - 1.500 ;
    my.vel_y = random( 3 ) - 1.500 ;
    my.vel_z = random( 3 );
    my.size = 4 ;
    my.alpha = 50 ;
    my.gravity = 0 ;
    my.streak = off;
    my.flare = on;
    my.bright = on;
    my.beam = off;
    my.move = on;
    my.transparent = on;
    my.function = firework_spec_fun;
	}
}


Function firework()
{
  while(1)
  {
     fireworkAnzahlPartikel = 1;
     my.skill9 = 0;
      my.skill11 = 360 ;
      
    if(radius >= 200){ 
    // effect needs to stop but how to do it?
    }
    
     while (my.skill9 < my.skill11)
     {
     	  radius += 0.1; 
        temp.x = my.x + cos(my.skill9)*radius ;
        temp.y = my.y + sin(my.skill9)*radius ;
        temp.z = my.z;
        my.skill9 += 15 ;
        effect(fireworkspezial,max(1,int(fireworkAnzahlPartikel*time)),temp,nullvector);
     }
     wait(1);
  }
}


action firework_action()
{
  my.invisible = on;
  My.passable = on;
  while(!key_m) { wait(1); }
  snd_play(shellknal,100,0);
  firework();
}


And when the effect is dissapered, it must be possible to show the particle effect again with M on the keyboard.

Anyone can help me? Thanks!
Regards, Warkey