function Stage2{
   if(phase==0){
      PlayMusic( bgmst2 );
      phase=1;
      time=0;
   }
   if(phase==1){

      if(time==0){Tzakocannon1a( 224-150, 110, 1, 3, 2);}
      if(time==60){Tzakoheli2( 224-270, 140, 0, 7, 6, 2);}
      if(time==120){Tzakoheli2( 224+270, 140, 180, 7, 6, 2);}
      if(time==50){Tzakogun201;}
      if(time==60){Tzakogun202;}
      if(time==280){Tzakoheli2( 224-240, 0, 40, 7, 6, 2);}
      if(time==380){Tzakoheli2( 224+240, 0, 140, 7, 6, 2);}
      if(time==410){Tzakotank1( 224-240, 380, 0, 10, 2);}
      if(time==450){Tzakotank2( 224+240, 430, 180, 9, 2);}
      if(time==560){Tzakoheli2( 224+270, 140, 180, 7, 6, 2);}
      if(time==660){Tzakoheli2( 224-270, 140, 0, 7, 6, 2);}

      if(time==700){
         let a=-2;
         loop(5){
            CreateEnemyFromFile( obj1, 224+a*70, 490, 0, 0, 1);
            CreateEnemyFromFile( obj1, 224+a*70, 550, 0, 0, 1);
            a++;
         }
      }

      if(time==900){Tzakoheli2( 224-270, 140, 0, 7, 6, 2);}
      if(time==950){Tzakoheli2( 224-120, 0, 60, 7, 6, 2);}
      if(time==1000){Tzakoheli2( 224+120, 0, 120, 7, 6, 2);}
      if(time==1050){Tzakoheli2( 224+270, 140, 180, 7, 6, 2);}

      if(time==1130){CreateEnemyFromFile( sky1, 224-100, -50, 2, 1, 1);}
      if(time==1240){CreateEnemyFromFile( sky1, 224+60, -50, 2, 1, -1);}
      if(time==1350){CreateEnemyFromFile( sky1, 224-60, -50, 2, 1, 1);}
      if(time==1460){CreateEnemyFromFile( sky1, 224+100, -50, 2, 1, -1);}
      if(time==1300){Tzakoheli2( 224+120, 0, 120, 7, 6, 2);}
      if(time==1380){Tzakoheli2( 224-120, 0, 60, 7, 6, 2);}
      if(time==1480){Tzakoheli2( 224+270, 140, 180, 7, 6, 2);}
      if(time==1560){Tzakoheli2( 224-270, 140, 0, 7, 10, 2);}

      if(time==1500){CreateEnemyFromFile( hunebig1, 224, 950, 0, 0, 0);}//{X
      if(time==1700){Tzakocannon1b( 224+150, 1060, 180, 2, 2);}
      if(time==1880){Tzakogun203;}

      if(time==2400){Tzakosky1a( -1, 10, 10, 2);}
      if(time==2700){Tzakosky1a( 1, 10, 10, 2);}
      if(time==2000){Tzakocannon1a( 224-150, 1170, 1, 5, 2);}
      if(time==2000){CreateEnemyFromFile( obj2, 224+130, 1130, 0, 0, 0);}
      if(time==2000){CreateEnemyFromFile( obj2, 224+70, 1170, 0, 0, 0);}
      if(time==2200){Tzakohune1( 224-240, 1250, 0, 5, 2);}
      if(time==2280){Tzakohune1( 224+240, 1300, 180, 5, 2);}

      if(time==2850){CreateEnemyFromFile( sky2, 224+224, 30, 1, 140, 0);}
      if(time==3000){Tzakosky1a( -1, 10, 13, 2);}
      if(time==3200){Tzakosky1a( 1, 10, 13, 2);}

      if(time==3350){Tzakosky1b( -1, 10, 13, 2);}
      if(time==3500){Tzakosky1b( 1, 10, 13, 2);}
      if(time==3680){Tzakosky1a( -1, 10, 10, 2);}
      if(time==3790){Tzakosky1a( 1, 10, 10, 2);}
      if(time==3960){Tzakosky1a( -1, 10, 10, 2);}
      if(time==4040){Tzakosky1b( 1, 10, 10, 2);}
      if(time==3350){CreateEnemyFromFile( sky2, 224-224, 30, 1, 40, 0);}
      if(time==3640){CreateEnemyFromFile( sky2, 224+224, 30, 1, 140, 0);}
      if(time==3900){CreateEnemyFromFile( sky2, 224-224, 30, 1, 40, 0);}
      if(time==2800){CreateEnemyFromFile( obj2, 224-130, 1430, 0, 0, 0);}
      if(time==2800){CreateEnemyFromFile( obj2, 224-70, 1470, 0, 0, 0);}
      if(time==3050){CreateEnemyFromFile( tank3, 224+60, 1530, 2, 0, 0);}
      if(time==3250){CreateEnemyFromFile( tank3, 224+0, 1650, 2, 0, 0);}
      if(time==3300){CreateEnemyFromFile( obj2, 224+130, 1680, 0, 0, 0);}
      if(time==3300){CreateEnemyFromFile( obj2, 224+70, 1720, 0, 0, 0);}
      if(time==3450){CreateEnemyFromFile( tank3, 224-100, 1770, 2, 0, 0);}
      if(time==3650){CreateEnemyFromFile( tank3, 224+100, 1890, 2, 0, 0);}
      if(time==3600){CreateEnemyFromFile( obj2, 224-130, 1880, 0, 0, 0);}
      if(time==3600){CreateEnemyFromFile( obj2, 224-70, 1920, 0, 0, 0);}

      if(time==4100){Tzakotank1( 224-240, 2130, 0, 8, 2);}
      if(time==4140){Tzakotank1( 224-240, 2180, 0, 8, 2);}
      if(time==4100){CreateEnemyFromFile( tank2, 224+240, 2060, 2, 180, 1000);}
      if(time==4300){CreateEnemyFromFile( tank2, 224+240, 2060, 2, 180, 1000);}
      if(time==4500){CreateEnemyFromFile( tank2, 224+240, 2060, 2, 180, 1000);}

      if(time==4800){CreateEnemyFromFile( item, 224, 0, 0, 90, 0);}






      if(time==5100){CreateEnemyBossFromFile( st2boss, 224, -150, 0, 0, 0);}

      if(time==4900){DeleteMusic(bgmst2);PlaySE( se4 );}
      if(time==5100){PlayMusic(bgmboss);}

      if(time<1800){SetCommonData("bgy",time*0.6);}
      if(time>=1800&&time<2600){SetCommonData("bgy",1080+(time-1800)*0.1);}
      if(time>=1800&&time<2600&&GetCommonData("haya")==1&&time%5==0){time+=4;}
      if(time>=2600&&time<4000){SetCommonData("bgy",1160+(time-2600)*0.6);}
      if(time>=4000&&time<5000){SetCommonData("bgy",2000+(time-4000)*0.4);}
      if(time>=5000&&time<5100){SetCommonData("bgy",2400+(time-5000)*1);}
      if(time>=5100&&time<5200){SetCommonData("bgy",2500+(time-5100)*2);}
      if(time>=5200){SetCommonData("bgy",2700+((time-5200)*4)%30);}

      if(time>5500&&GetCommonData("bossphase")==0){DeleteMusic(bgmboss);}
      if(time>5500&&IsBossExisting==false&&clear==false){Tclear}
   }
}