function MakeZako22(x,stopy,angle,level){MakeZako(GCSD~"\Stage\Zako\Enemy22.txt",x,stopy,0,angle,level);}
function MakeZako23(x,level){MakeZako(GCSD~"\Stage\Zako\Enemy23.txt",x,0,0,0,level);}
function MakeZako24(x,y,level){MakeZako(GCSD~"\Stage\Zako\Enemy24.txt",x,y,0,0,level);}
function MakeZako25(x,level){MakeZako(GCSD~"\Stage\Zako\Enemy25.txt",x,0,0,0,level);}
function MakeZako26(x,level){MakeZako(GCSD~"\Stage\Zako\Enemy26.txt",x,0,0,0,level);}
function MakeZako27a(x,y,level){MakeZako(GCSD~"\Stage\Zako\Enemy27A.txt",x,y,0,0,level);}
function MakeZako27b(x,y,level){MakeZako(GCSD~"\Stage\Zako\Enemy27B.txt",x,y,0,0,level);}

function MakeZako28(x,stopy,angle,level){MakeZako(GCSD~"\Stage\Zako\Enemy28.txt",x,stopy,0,angle,level);}
function MakeZako29(x,y,level){MakeZako(GCSD~"\Stage\Zako\Enemy29.txt",x,y,0,0,level);}
function MakeZako30(x,y,level){MakeZako(GCSD~"\Stage\Zako\Enemy30.txt",x,y,0,0,level);}
function MakeZako31(x,y,level){MakeZako(GCSD~"\Stage\Zako\Enemy31.txt",x,y,0,0,level);}
function MakeZako32a(y,level){MakeZako(GCSD~"\Stage\Zako\Enemy32.txt",0,y,0,0,level);}
function MakeZako32b(y,level){MakeZako(GCSD~"\Stage\Zako\Enemy32.txt",Mx+16,y,0,0,level);}
function MakeZako33(x,angle,level){MakeZako(GCSD~"\Stage\Zako\Enemy33.txt",x,0,0,0,[angle,level]);}


function EasyStage4{
SetCommonData("STAGE",4);
let level = 0;
Wait(150);

loop(2){
MakeZako27a(cx - 170,cy - 170,level);
MakeZako27b(cx + 170,cy - 170,level);
Wait(10);
MakeZako27a(cx - 110,cy - 110,level);
MakeZako27b(cx + 110,cy - 110,level);
Wait(10);
MakeZako27a(cx - 50,cy - 50,level);
MakeZako27b(cx + 50,cy - 50,level);
Wait(300);
MakeZako4(cx - 80,0,level);
MakeZako4(cx + 80,0,level);
Wait(120);
}
Wait(300);

let wait = 100;
MakeZako21(cx,level);
Wait(wait);
MakeZako21(cx - 40,level);
Wait(wait);
MakeZako21(cx + 40,level);
Wait(wait);
MakeZako21(cx - 20,level);
Wait(wait);
MakeZako21(cx + 20,level);
Wait(wait);

loop(2){
MakeZako21(cx,level);
loop(10){
MakeZako6a(120,level);
Wait(10);
}
Wait(50);
MakeZako21(cx - 40,level);
loop(10){
MakeZako6b(120,level);
Wait(10);
}
Wait(50);
MakeZako21(cx + 40,level);
loop(10){
MakeZako18(mx + 16,level);
Wait(10);
}
Wait(50);
MakeZako21(cx - 20,level);
loop(10){
MakeZako18(Mx - 16,level);
Wait(10);
}
Wait(50);
MakeZako21(cx + 20,level);
loop(5){
MakeZako18(mx + 16,level);
Wait(10);
MakeZako18(Mx - 16,level);
Wait(10);
}
Wait(250);
}

loop(2){
MakeZako27a(cx - 170,cy - 170,level);
MakeZako27b(cx + 170,cy - 170,level);
Wait(10);
MakeZako27a(cx - 110,cy - 110,level);
MakeZako27b(cx + 110,cy - 110,level);
Wait(10);
MakeZako27a(cx - 50,cy - 50,level);
MakeZako27b(cx + 50,cy - 50,level);
Wait(10);
MakeZako27a(cx - 30,cy,level);
MakeZako27b(cx + 30,cy,level);
Wait(300);
MakeZako19(cx - 150,level);
MakeZako19(cx + 150,level);
Wait(120);
}

WaitForZeroEnemy();
Wait(180);

MakeBoss(GCSD~"\Stage\Boss\No.038　「キャッツウォーク改　-Easy-」.txt");
WaitForZeroEnemy();
Wait(120);

MakeZako25(cx - 100,level);
MakeZako25(cx + 100,level);

Wait(540);

MakeZako25(cx + 150,level);

loop(7){
MakeZako11a(my+80,0);
Wait(30);
}
Wait(200);

MakeZako25(cx - 150,level);

loop(7){
MakeZako11b(my+80,0);
Wait(30);
}
Wait(200);

MakeZako25(cx - 100,level);
MakeZako25(cx + 100,level);

let y = cy - 20;
loop(3){
MakeZako22(cx - 150,y,90,level);
Wait(5);
MakeZako22(cx,y,90,level);
Wait(5);
MakeZako22(cx + 150,y,90,level);
Wait(5);
y -= 50;
}

Wait(360);

MakeZako25(cx - 60,level);
MakeZako25(cx + 60,level);

Wait(600);

MakeZako24(0,64,level);

Wait(60);

loop(6){
MakeZako23(cx - 110,level);
Wait(20);
}

MakeZako24(Mx + 32,64,level);

Wait(60);

loop(6){
MakeZako23(cx + 110,level);
Wait(20);
}

MakeZako24(0,64,level);
MakeZako24(Mx + 32,64,level);
Wait(360);


MakeZako27a(cx - 170,cy - 170,level);
MakeZako27b(cx + 170,cy - 170,level);
Wait(5);
MakeZako27a(cx - 110,cy - 110,level);
MakeZako27b(cx + 110,cy - 110,level);
Wait(5);
MakeZako27a(cx - 50,cy - 50,level);
MakeZako27b(cx + 50,cy - 50,level);
Wait(5);
MakeZako27a(cx - 30,cy,level);
MakeZako27b(cx + 30,cy,level);
Wait(180);
MakeZako19(cx - 150,level);
MakeZako19(cx + 150,level);
Wait(120);
MakeZako27a(cx - 170,cy - 170,level);
MakeZako27b(cx + 170,cy - 170,level);
Wait(5);
MakeZako27a(cx - 110,cy - 110,level);
MakeZako27b(cx + 110,cy - 110,level);
Wait(5);
MakeZako27a(cx - 50,cy - 50,level);
MakeZako27b(cx + 50,cy - 50,level);
Wait(5);
MakeZako27a(cx - 30,cy,level);
MakeZako27b(cx + 30,cy,level);
Wait(180);
MakeZako24(0,64,level);
MakeZako24(Mx + 32,64,level);
Wait(180);
MakeZako27a(cx - 170,cy - 170,level);
MakeZako27b(cx + 170,cy - 170,level);
Wait(5);
MakeZako27a(cx - 110,cy - 110,level);
MakeZako27b(cx + 110,cy - 110,level);
Wait(5);
MakeZako27a(cx - 50,cy - 50,level);
MakeZako27b(cx + 50,cy - 50,level);
Wait(5);
MakeZako27a(cx - 30,cy,level);
MakeZako27b(cx + 30,cy,level);
Wait(180);
MakeZako25(cx - 60,level);
MakeZako25(cx + 60,level);
Wait(360);
MakeZako27a(cx - 170,cy - 170,level);
MakeZako27b(cx + 170,cy - 170,level);
Wait(5);
MakeZako27a(cx - 110,cy - 110,level);
MakeZako27b(cx + 110,cy - 110,level);
Wait(5);
MakeZako27a(cx - 50,cy - 50,level);
MakeZako27b(cx + 50,cy - 50,level);
Wait(5);
MakeZako27a(cx - 30,cy,level);
MakeZako27b(cx + 30,cy,level);
Wait(180);
MakeZako26(cx,level);
MakeZako24(0,64,level);
MakeZako24(Mx + 32,64,level);
loop(12){
MakeZako23(cx - 110,level);
Wait(20);
}
MakeZako24(0,128,level);
MakeZako24(Mx + 32,128,level);
loop(12){
MakeZako23(cx + 110,level);
Wait(20);
}
MakeZako24(0,192,level);
MakeZako24(Mx + 32,192,level);
Wait(240);
MakeZako24(0,64,level);
MakeZako24(Mx + 32,64,level);
Wait(240);
MakeZako27a(cx - 170,cy - 170,level);
MakeZako27b(cx + 170,cy - 170,level);
Wait(5);
MakeZako27a(cx - 110,cy - 110,level);
MakeZako27b(cx + 110,cy - 110,level);
Wait(5);
MakeZako27a(cx - 50,cy - 50,level);
MakeZako27b(cx + 50,cy - 50,level);
Wait(5);
MakeZako27a(cx - 30,cy,level);
MakeZako27b(cx + 30,cy,level);

WaitForZeroEnemy();
Wait(240);

if(ChackThePlayer == 1){MakeEvent("REIMU41");}
if(ChackThePlayer == 2){MakeEvent("MARISA41");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA41");}
if(ChackThePlayer == 4){MakeEvent("RUMIA41");}
WaitForEvent();


MakeBoss(GCSD~"\Stage\Boss\SatoriE.txt");
WaitForZeroEnemy();

if(ChackThePlayer == 1){MakeEvent("REIMU42");}
if(ChackThePlayer == 2){MakeEvent("MARISA42");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA42");}
if(ChackThePlayer == 4){MakeEvent("RUMIA42");}
WaitForEvent();

Wait(120);
}

function NormalStage4{
SetCommonData("STAGE",4);
let level = 1;
Wait(150);

loop(2){
MakeZako27a(cx - 170,cy - 170,level);
MakeZako27b(cx + 170,cy - 170,level);
Wait(10);
MakeZako27a(cx - 110,cy - 110,level);
MakeZako27b(cx + 110,cy - 110,level);
Wait(10);
MakeZako27a(cx - 50,cy - 50,level);
MakeZako27b(cx + 50,cy - 50,level);
Wait(300);
MakeZako4(cx - 80,0,level);
MakeZako4(cx + 80,0,level);
Wait(120);
}
Wait(300);

let wait = 90;
MakeZako21(cx,level);
Wait(wait);
MakeZako21(cx - 40,level);
Wait(wait);
MakeZako21(cx + 40,level);
Wait(wait);
MakeZako21(cx - 20,level);
Wait(wait);
MakeZako21(cx + 20,level);
Wait(wait);

loop(2){
MakeZako21(cx,level);
loop(10){
MakeZako6a(120,level);
Wait(10);
}
Wait(50);
MakeZako21(cx - 40,level);
loop(10){
MakeZako6b(120,level);
Wait(10);
}
Wait(50);
MakeZako21(cx + 40,level);
loop(10){
MakeZako18(mx + 16,level);
Wait(10);
}
Wait(50);
MakeZako21(cx - 20,level);
loop(10){
MakeZako18(Mx - 16,level);
Wait(10);
}
Wait(50);
MakeZako21(cx + 20,level);
loop(5){
MakeZako18(mx + 16,level);
Wait(10);
MakeZako18(Mx - 16,level);
Wait(10);
}
Wait(250);
}

loop(2){
MakeZako27a(cx - 170,cy - 170,level);
MakeZako27b(cx + 170,cy - 170,level);
Wait(10);
MakeZako27a(cx - 110,cy - 110,level);
MakeZako27b(cx + 110,cy - 110,level);
Wait(10);
MakeZako27a(cx - 50,cy - 50,level);
MakeZako27b(cx + 50,cy - 50,level);
Wait(10);
MakeZako27a(cx - 30,cy,level);
MakeZako27b(cx + 30,cy,level);
Wait(300);
MakeZako19(cx - 150,level);
MakeZako19(cx + 150,level);
Wait(120);
}

WaitForZeroEnemy();
Wait(180);

MakeBoss(GCSD~"\Stage\Boss\No.039　「キャッツウォーク改　-Normal-」.txt");
WaitForZeroEnemy();
Wait(120);


MakeZako25(cx - 100,level);
MakeZako25(cx + 100,level);

Wait(540);

MakeZako25(cx + 150,level);

loop(7){
MakeZako11a(my+80,0);
Wait(30);
}
Wait(200);

MakeZako25(cx - 150,level);

loop(7){
MakeZako11b(my+80,0);
Wait(30);
}
Wait(200);

MakeZako25(cx - 100,level);
MakeZako25(cx + 100,level);

let y = cy - 20;
loop(3){
MakeZako22(cx - 150,y,90,level);
Wait(5);
MakeZako22(cx,y,90,level);
Wait(5);
MakeZako22(cx + 150,y,90,level);
Wait(5);
y -= 50;
}

Wait(360);

MakeZako25(cx - 60,level);
MakeZako25(cx + 60,level);

Wait(600);

MakeZako24(0,64,level);

Wait(60);

loop(6){
MakeZako23(cx - 110,level);
Wait(20);
}

MakeZako24(Mx + 32,64,level);

Wait(60);

loop(6){
MakeZako23(cx + 110,level);
Wait(20);
}

MakeZako24(0,64,level);
MakeZako24(Mx + 32,64,level);
Wait(360);


MakeZako27a(cx - 170,cy - 170,level);
MakeZako27b(cx + 170,cy - 170,level);
Wait(5);
MakeZako27a(cx - 110,cy - 110,level);
MakeZako27b(cx + 110,cy - 110,level);
Wait(5);
MakeZako27a(cx - 50,cy - 50,level);
MakeZako27b(cx + 50,cy - 50,level);
Wait(5);
MakeZako27a(cx - 30,cy,level);
MakeZako27b(cx + 30,cy,level);
Wait(180);
MakeZako19(cx - 150,level);
MakeZako19(cx + 150,level);
Wait(120);
MakeZako27a(cx - 170,cy - 170,level);
MakeZako27b(cx + 170,cy - 170,level);
Wait(5);
MakeZako27a(cx - 110,cy - 110,level);
MakeZako27b(cx + 110,cy - 110,level);
Wait(5);
MakeZako27a(cx - 50,cy - 50,level);
MakeZako27b(cx + 50,cy - 50,level);
Wait(5);
MakeZako27a(cx - 30,cy,level);
MakeZako27b(cx + 30,cy,level);
Wait(180);
MakeZako24(0,64,level);
MakeZako24(Mx + 32,64,level);
Wait(180);
MakeZako27a(cx - 170,cy - 170,level);
MakeZako27b(cx + 170,cy - 170,level);
Wait(5);
MakeZako27a(cx - 110,cy - 110,level);
MakeZako27b(cx + 110,cy - 110,level);
Wait(5);
MakeZako27a(cx - 50,cy - 50,level);
MakeZako27b(cx + 50,cy - 50,level);
Wait(5);
MakeZako27a(cx - 30,cy,level);
MakeZako27b(cx + 30,cy,level);
Wait(180);
MakeZako25(cx - 60,level);
MakeZako25(cx + 60,level);
Wait(360);
MakeZako27a(cx - 170,cy - 170,level);
MakeZako27b(cx + 170,cy - 170,level);
Wait(5);
MakeZako27a(cx - 110,cy - 110,level);
MakeZako27b(cx + 110,cy - 110,level);
Wait(5);
MakeZako27a(cx - 50,cy - 50,level);
MakeZako27b(cx + 50,cy - 50,level);
Wait(5);
MakeZako27a(cx - 30,cy,level);
MakeZako27b(cx + 30,cy,level);
Wait(240);
MakeZako26(cx,level);
MakeZako24(0,64,level);
MakeZako24(Mx + 32,64,level);
loop(12){
MakeZako23(cx - 110,level);
Wait(20);
}
MakeZako24(0,128,level);
MakeZako24(Mx + 32,128,level);
loop(12){
MakeZako23(cx + 110,level);
Wait(20);
}
MakeZako24(0,192,level);
MakeZako24(Mx + 32,192,level);
Wait(240);
MakeZako24(0,64,level);
MakeZako24(Mx + 32,64,level);
Wait(240);
MakeZako27a(cx - 170,cy - 170,level);
MakeZako27b(cx + 170,cy - 170,level);
Wait(5);
MakeZako27a(cx - 110,cy - 110,level);
MakeZako27b(cx + 110,cy - 110,level);
Wait(5);
MakeZako27a(cx - 50,cy - 50,level);
MakeZako27b(cx + 50,cy - 50,level);
Wait(5);
MakeZako27a(cx - 30,cy,level);
MakeZako27b(cx + 30,cy,level);

WaitForZeroEnemy();
Wait(240);

if(ChackThePlayer == 1){MakeEvent("REIMU41");}
if(ChackThePlayer == 2){MakeEvent("MARISA41");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA41");}
if(ChackThePlayer == 4){MakeEvent("RUMIA41");}
WaitForEvent();


MakeBoss(GCSD~"\Stage\Boss\SatoriN.txt");
WaitForZeroEnemy();

if(ChackThePlayer == 1){MakeEvent("REIMU42");}
if(ChackThePlayer == 2){MakeEvent("MARISA42");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA42");}
if(ChackThePlayer == 4){MakeEvent("RUMIA42");}
WaitForEvent();


Wait(120);
}

function HardStage4{
SetCommonData("STAGE",4);
let level = 2;
Wait(150);

loop(2){
MakeZako27a(cx - 170,cy - 170,level);
MakeZako27b(cx + 170,cy - 170,level);
Wait(10);
MakeZako27a(cx - 110,cy - 110,level);
MakeZako27b(cx + 110,cy - 110,level);
Wait(10);
MakeZako27a(cx - 50,cy - 50,level);
MakeZako27b(cx + 50,cy - 50,level);
Wait(300);
MakeZako4(cx - 80,0,level);
MakeZako4(cx + 80,0,level);
Wait(120);
}
Wait(300);

let wait = 80;
MakeZako21(cx,level);
Wait(wait);
MakeZako21(cx - 40,level);
Wait(wait);
MakeZako21(cx + 40,level);
Wait(wait);
MakeZako21(cx - 20,level);
Wait(wait);
MakeZako21(cx + 20,level);
Wait(wait);

loop(2){
MakeZako21(cx,level);
loop(10){
MakeZako6a(120,level);
Wait(10);
}
Wait(50);
MakeZako21(cx - 40,level);
loop(10){
MakeZako6b(120,level);
Wait(10);
}
Wait(50);
MakeZako21(cx + 40,level);
loop(10){
MakeZako18(mx + 16,level);
Wait(10);
}
Wait(50);
MakeZako21(cx - 20,level);
loop(10){
MakeZako18(Mx - 16,level);
Wait(10);
}
Wait(50);
MakeZako21(cx + 20,level);
loop(5){
MakeZako18(mx + 16,level);
Wait(10);
MakeZako18(Mx - 16,level);
Wait(10);
}
Wait(250);
}

loop(2){
MakeZako27a(cx - 170,cy - 170,level);
MakeZako27b(cx + 170,cy - 170,level);
Wait(10);
MakeZako27a(cx - 110,cy - 110,level);
MakeZako27b(cx + 110,cy - 110,level);
Wait(10);
MakeZako27a(cx - 50,cy - 50,level);
MakeZako27b(cx + 50,cy - 50,level);
Wait(10);
MakeZako27a(cx - 30,cy,level);
MakeZako27b(cx + 30,cy,level);
Wait(300);
MakeZako19(cx - 150,level);
MakeZako19(cx + 150,level);
Wait(120);
}

WaitForZeroEnemy();
Wait(180);

MakeBoss(GCSD~"\Stage\Boss\No.040　「キャッツウォーク改　-Hard-」.txt");
WaitForZeroEnemy();
Wait(120);


MakeZako25(cx - 100,level);
MakeZako25(cx + 100,level);

Wait(540);

MakeZako25(cx + 150,level);

loop(7){
MakeZako11a(my+80,0);
Wait(30);
}
Wait(200);

MakeZako25(cx - 150,level);

loop(7){
MakeZako11b(my+80,0);
Wait(30);
}
Wait(200);

MakeZako25(cx - 100,level);
MakeZako25(cx + 100,level);

let y = cy - 20;
loop(3){
MakeZako22(cx - 150,y,90,level);
Wait(5);
MakeZako22(cx,y,90,level);
Wait(5);
MakeZako22(cx + 150,y,90,level);
Wait(5);
y -= 50;
}

Wait(360);

MakeZako25(cx - 60,level);
MakeZako25(cx + 60,level);

Wait(600);

MakeZako24(0,64,level);

Wait(60);

loop(6){
MakeZako23(cx - 110,level);
Wait(20);
}

MakeZako24(Mx + 32,64,level);

Wait(60);

loop(6){
MakeZako23(cx + 110,level);
Wait(20);
}

MakeZako24(0,64,level);
MakeZako24(Mx + 32,64,level);
Wait(360);


MakeZako27a(cx - 170,cy - 170,level);
MakeZako27b(cx + 170,cy - 170,level);
Wait(5);
MakeZako27a(cx - 110,cy - 110,level);
MakeZako27b(cx + 110,cy - 110,level);
Wait(5);
MakeZako27a(cx - 50,cy - 50,level);
MakeZako27b(cx + 50,cy - 50,level);
Wait(5);
MakeZako27a(cx - 30,cy,level);
MakeZako27b(cx + 30,cy,level);
Wait(180);
MakeZako19(cx - 150,level);
MakeZako19(cx + 150,level);
Wait(120);
MakeZako27a(cx - 170,cy - 170,level);
MakeZako27b(cx + 170,cy - 170,level);
Wait(5);
MakeZako27a(cx - 110,cy - 110,level);
MakeZako27b(cx + 110,cy - 110,level);
Wait(5);
MakeZako27a(cx - 50,cy - 50,level);
MakeZako27b(cx + 50,cy - 50,level);
Wait(5);
MakeZako27a(cx - 30,cy,level);
MakeZako27b(cx + 30,cy,level);
Wait(180);
MakeZako24(0,64,level);
MakeZako24(Mx + 32,64,level);
Wait(180);
MakeZako27a(cx - 170,cy - 170,level);
MakeZako27b(cx + 170,cy - 170,level);
Wait(5);
MakeZako27a(cx - 110,cy - 110,level);
MakeZako27b(cx + 110,cy - 110,level);
Wait(5);
MakeZako27a(cx - 50,cy - 50,level);
MakeZako27b(cx + 50,cy - 50,level);
Wait(5);
MakeZako27a(cx - 30,cy,level);
MakeZako27b(cx + 30,cy,level);
Wait(180);
MakeZako25(cx - 60,level);
MakeZako25(cx + 60,level);
Wait(360);
MakeZako27a(cx - 170,cy - 170,level);
MakeZako27b(cx + 170,cy - 170,level);
Wait(5);
MakeZako27a(cx - 110,cy - 110,level);
MakeZako27b(cx + 110,cy - 110,level);
Wait(5);
MakeZako27a(cx - 50,cy - 50,level);
MakeZako27b(cx + 50,cy - 50,level);
Wait(5);
MakeZako27a(cx - 30,cy,level);
MakeZako27b(cx + 30,cy,level);
Wait(300);
MakeZako26(cx,level);
MakeZako24(0,64,level);
MakeZako24(Mx + 32,64,level);
loop(12){
MakeZako23(cx - 110,level);
Wait(20);
}
MakeZako24(0,128,level);
MakeZako24(Mx + 32,128,level);
loop(12){
MakeZako23(cx + 110,level);
Wait(20);
}
MakeZako24(0,192,level);
MakeZako24(Mx + 32,192,level);
Wait(240);
MakeZako24(0,64,level);
MakeZako24(Mx + 32,64,level);
Wait(240);
MakeZako27a(cx - 170,cy - 170,level);
MakeZako27b(cx + 170,cy - 170,level);
Wait(5);
MakeZako27a(cx - 110,cy - 110,level);
MakeZako27b(cx + 110,cy - 110,level);
Wait(5);
MakeZako27a(cx - 50,cy - 50,level);
MakeZako27b(cx + 50,cy - 50,level);
Wait(5);
MakeZako27a(cx - 30,cy,level);
MakeZako27b(cx + 30,cy,level);

WaitForZeroEnemy();
Wait(240);

if(ChackThePlayer == 1){MakeEvent("REIMU41");}
if(ChackThePlayer == 2){MakeEvent("MARISA41");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA41");}
if(ChackThePlayer == 4){MakeEvent("RUMIA41");}
WaitForEvent();


MakeBoss(GCSD~"\Stage\Boss\SatoriH.txt");
WaitForZeroEnemy();

if(ChackThePlayer == 1){MakeEvent("REIMU42");}
if(ChackThePlayer == 2){MakeEvent("MARISA42");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA42");}
if(ChackThePlayer == 4){MakeEvent("RUMIA42");}
WaitForEvent();


Wait(120);
}

function LunaticStage4{
SetCommonData("STAGE",4);
let level = 3;
Wait(150);

loop(2){
MakeZako27a(cx - 170,cy - 170,level);
MakeZako27b(cx + 170,cy - 170,level);
Wait(10);
MakeZako27a(cx - 110,cy - 110,level);
MakeZako27b(cx + 110,cy - 110,level);
Wait(10);
MakeZako27a(cx - 50,cy - 50,level);
MakeZako27b(cx + 50,cy - 50,level);
Wait(300);
MakeZako4(cx - 80,0,level);
MakeZako4(cx + 80,0,level);
Wait(120);
}
Wait(300);

let wait = 60;
MakeZako21(cx,level);
Wait(wait);
MakeZako21(cx - 40,level);
Wait(wait);
MakeZako21(cx + 40,level);
Wait(wait);
MakeZako21(cx - 20,level);
Wait(wait);
MakeZako21(cx + 20,level);
Wait(wait);

loop(2){
MakeZako21(cx,level);
loop(10){
MakeZako6a(120,level);
Wait(10);
}
Wait(50);
MakeZako21(cx - 40,level);
loop(10){
MakeZako6b(120,level);
Wait(10);
}
Wait(50);
MakeZako21(cx + 40,level);
loop(10){
MakeZako18(mx + 16,level);
Wait(10);
}
Wait(50);
MakeZako21(cx - 20,level);
loop(10){
MakeZako18(Mx - 16,level);
Wait(10);
}
Wait(50);
MakeZako21(cx + 20,level);
loop(5){
MakeZako18(mx + 16,level);
Wait(10);
MakeZako18(Mx - 16,level);
Wait(10);
}
Wait(250);
}

loop(2){
MakeZako27a(cx - 170,cy - 170,level);
MakeZako27b(cx + 170,cy - 170,level);
Wait(10);
MakeZako27a(cx - 110,cy - 110,level);
MakeZako27b(cx + 110,cy - 110,level);
Wait(10);
MakeZako27a(cx - 50,cy - 50,level);
MakeZako27b(cx + 50,cy - 50,level);
Wait(10);
MakeZako27a(cx - 30,cy,level);
MakeZako27b(cx + 30,cy,level);
Wait(300);
MakeZako19(cx - 150,level);
MakeZako19(cx + 150,level);
Wait(120);
}

WaitForZeroEnemy();
Wait(180);

MakeBoss(GCSD~"\Stage\Boss\No.041　「キャッツウォーク改　-Lunatic-」.txt");
WaitForZeroEnemy();
Wait(120);


MakeZako25(cx - 100,level);
MakeZako25(cx + 100,level);

Wait(540);

MakeZako25(cx + 150,level);

loop(7){
MakeZako11a(my+80,0);
Wait(30);
}
Wait(200);

MakeZako25(cx - 150,level);

loop(7){
MakeZako11b(my+80,0);
Wait(30);
}
Wait(200);

MakeZako25(cx - 100,level);
MakeZako25(cx + 100,level);

let y = cy - 20;
loop(3){
MakeZako22(cx - 150,y,90,level);
Wait(5);
MakeZako22(cx,y,90,level);
Wait(5);
MakeZako22(cx + 150,y,90,level);
Wait(5);
y -= 50;
}

Wait(360);

MakeZako25(cx - 60,level);
MakeZako25(cx + 60,level);

Wait(600);

MakeZako24(0,64,level);

Wait(60);

loop(6){
MakeZako23(cx - 110,level);
Wait(20);
}

MakeZako24(Mx + 32,64,level);

Wait(60);

loop(6){
MakeZako23(cx + 110,level);
Wait(20);
}

MakeZako24(0,64,level);
MakeZako24(Mx + 32,64,level);
Wait(360);


MakeZako27a(cx - 170,cy - 170,level);
MakeZako27b(cx + 170,cy - 170,level);
Wait(5);
MakeZako27a(cx - 110,cy - 110,level);
MakeZako27b(cx + 110,cy - 110,level);
Wait(5);
MakeZako27a(cx - 50,cy - 50,level);
MakeZako27b(cx + 50,cy - 50,level);
Wait(5);
MakeZako27a(cx - 30,cy,level);
MakeZako27b(cx + 30,cy,level);
Wait(180);
MakeZako19(cx - 150,level);
MakeZako19(cx + 150,level);
Wait(120);
MakeZako27a(cx - 170,cy - 170,level);
MakeZako27b(cx + 170,cy - 170,level);
Wait(5);
MakeZako27a(cx - 110,cy - 110,level);
MakeZako27b(cx + 110,cy - 110,level);
Wait(5);
MakeZako27a(cx - 50,cy - 50,level);
MakeZako27b(cx + 50,cy - 50,level);
Wait(5);
MakeZako27a(cx - 30,cy,level);
MakeZako27b(cx + 30,cy,level);
Wait(180);
MakeZako24(0,64,level);
MakeZako24(Mx + 32,64,level);
Wait(180);
MakeZako27a(cx - 170,cy - 170,level);
MakeZako27b(cx + 170,cy - 170,level);
Wait(5);
MakeZako27a(cx - 110,cy - 110,level);
MakeZako27b(cx + 110,cy - 110,level);
Wait(5);
MakeZako27a(cx - 50,cy - 50,level);
MakeZako27b(cx + 50,cy - 50,level);
Wait(5);
MakeZako27a(cx - 30,cy,level);
MakeZako27b(cx + 30,cy,level);
Wait(180);
MakeZako25(cx - 60,level);
MakeZako25(cx + 60,level);
Wait(360);
MakeZako27a(cx - 170,cy - 170,level);
MakeZako27b(cx + 170,cy - 170,level);
Wait(5);
MakeZako27a(cx - 110,cy - 110,level);
MakeZako27b(cx + 110,cy - 110,level);
Wait(5);
MakeZako27a(cx - 50,cy - 50,level);
MakeZako27b(cx + 50,cy - 50,level);
Wait(5);
MakeZako27a(cx - 30,cy,level);
MakeZako27b(cx + 30,cy,level);
Wait(360);
MakeZako26(cx,level);
MakeZako24(0,64,level);
MakeZako24(Mx + 32,64,level);
loop(12){
MakeZako23(cx - 110,level);
Wait(25);
}
MakeZako24(0,128,level);
MakeZako24(Mx + 32,128,level);
loop(12){
MakeZako23(cx + 110,level);
Wait(25);
}
MakeZako24(0,192,level);
MakeZako24(Mx + 32,192,level);
Wait(270);
MakeZako24(0,64,level);
MakeZako24(Mx + 32,64,level);
Wait(270);
MakeZako27a(cx - 170,cy - 170,level);
MakeZako27b(cx + 170,cy - 170,level);
Wait(5);
MakeZako27a(cx - 110,cy - 110,level);
MakeZako27b(cx + 110,cy - 110,level);
Wait(5);
MakeZako27a(cx - 50,cy - 50,level);
MakeZako27b(cx + 50,cy - 50,level);
Wait(5);
MakeZako27a(cx - 30,cy,level);
MakeZako27b(cx + 30,cy,level);

WaitForZeroEnemy();
Wait(240);

if(ChackThePlayer == 1){MakeEvent("REIMU41");}
if(ChackThePlayer == 2){MakeEvent("MARISA41");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA41");}
if(ChackThePlayer == 4){MakeEvent("RUMIA41");}
WaitForEvent();


MakeBoss(GCSD~"\Stage\Boss\SatoriL.txt");
WaitForZeroEnemy();

if(ChackThePlayer == 1){MakeEvent("REIMU42");}
if(ChackThePlayer == 2){MakeEvent("MARISA42");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA42");}
if(ChackThePlayer == 4){MakeEvent("RUMIA42");}
WaitForEvent();


Wait(120);
}


function EasyStage5{
SetCommonData("STAGE",5);
let level = 0;
Wait(150);
MakeZako29(cx + 32,64,level);
yield;
MakeZako29(cx + 96,128,level);

Wait(100);

MakeZako30(cx,cy - 32,level);

Wait(450);
MakeZako28(mx+16,64,90,level);
MakeZako28(Mx-16,64,90,level);
MakeZako33(cx,90,level);
Wait(400);
MakeZako28(mx+16,64,90,level);
MakeZako28(Mx-16,64,90,level);
MakeZako33(cx+100,150,level);
Wait(350);
MakeZako28(mx+16,64,90,level);
MakeZako28(Mx-16,64,90,level);
MakeZako33(cx-100,30,level);
Wait(300);
MakeZako28(mx+16,64,90,level);
MakeZako28(Mx-16,64,90,level);
MakeZako33(cx,90,level);
WaitForZeroEnemy();
Wait(120);

MakeBoss(GCSD~"\Stage\Boss\No.057　魅了・氷精「魅に囚われた者 -チルノ-　-Easy-」.txt");
WaitForZeroEnemy();
Wait(180);

MakeZako31(cx,cy - 32,level);

loop(3){
MakeZako32a(284,level);
Wait(25);
MakeZako32b(221,level);
Wait(50);
MakeZako33(cx,90,level);
MakeZako32b(412,level);
Wait(25);
MakeZako32a(183,level);
Wait(50);
MakeZako32a(67,level);
Wait(25);
MakeZako32b(83,level);
Wait(50);
MakeZako33(cx-100,90,level);
MakeZako32b(267,level);
Wait(25);
MakeZako32a(81,level);
Wait(50);
MakeZako32a(304,level);
Wait(25);
MakeZako32b(211,level);
Wait(50);
MakeZako33(cx+100,90,level);
MakeZako32b(62,level);
Wait(25);
MakeZako32a(231,level);
Wait(100);
}

WaitForZeroEnemy();
Wait(120);

MakeBoss(GCSD~"\Stage\Boss\No.061　魅了・幽剣「魅に囚われた者 -妖夢-　-Easy-」.txt");
WaitForZeroEnemy();
Wait(180);

MakeZako30(cx,cy - 32,level);
MakeZako31(cx,cy - 32,level);

WaitForZeroEnemy();
Wait(450);

if(ChackThePlayer == 1){MakeEvent("REIMU51");}
if(ChackThePlayer == 2){MakeEvent("MARISA51");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA51");}
if(ChackThePlayer == 4){MakeEvent("RUMIA51");}
WaitForEvent();

MakeBoss(GCSD~"\Stage\Boss\YuyukoE.txt");
WaitForZeroEnemy();

Wait(30);

if(ChackThePlayer == 1){MakeEvent("REIMU52");}
if(ChackThePlayer == 2){MakeEvent("MARISA52");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA52");}
if(ChackThePlayer == 4){MakeEvent("RUMIA52");}

WaitForEvent();
Wait(180);
}

function NormalStage5{
SetCommonData("STAGE",5);
let level = 1;
Wait(150);

MakeZako29(cx + 32,64,level);
yield;
MakeZako29(cx + 96,128,level);


Wait(100);

MakeZako30(cx,cy - 32,level);

Wait(450);
MakeZako28(mx+16,64,90,level);
MakeZako28(Mx-16,64,90,level);
MakeZako33(cx,90,level);
Wait(400);
MakeZako28(mx+16,64,90,level);
MakeZako28(Mx-16,64,90,level);
MakeZako33(cx+100,150,level);
Wait(350);
MakeZako28(mx+16,64,90,level);
MakeZako28(Mx-16,64,90,level);
MakeZako33(cx-100,30,level);
Wait(300);
MakeZako28(mx+16,64,90,level);
MakeZako28(Mx-16,64,90,level);
MakeZako33(cx,90,level);
WaitForZeroEnemy();
Wait(120);

MakeBoss(GCSD~"\Stage\Boss\No.058　魅了・氷精「魅に囚われた者 -チルノ-　-Normal-」.txt");
WaitForZeroEnemy();
Wait(180);

MakeZako31(cx,cy - 32,level);

loop(3){
MakeZako32a(284,level);
Wait(25);
MakeZako32b(221,level);
Wait(50);
MakeZako33(cx,90,level);
MakeZako32b(412,level);
Wait(25);
MakeZako32a(183,level);
Wait(50);
MakeZako32a(67,level);
Wait(25);
MakeZako32b(83,level);
Wait(50);
MakeZako33(cx-100,90,level);
MakeZako32b(267,level);
Wait(25);
MakeZako32a(81,level);
Wait(50);
MakeZako32a(304,level);
Wait(25);
MakeZako32b(211,level);
Wait(50);
MakeZako33(cx+100,90,level);
MakeZako32b(62,level);
Wait(25);
MakeZako32a(231,level);
Wait(100);
}

WaitForZeroEnemy();
Wait(120);

MakeBoss(GCSD~"\Stage\Boss\No.062　魅了・幽剣「魅に囚われた者 -妖夢-　-Normal-」.txt");
WaitForZeroEnemy();
Wait(180);

MakeZako30(cx,cy - 32,level);
MakeZako31(cx,cy - 32,level);

WaitForZeroEnemy();
Wait(450);

if(ChackThePlayer == 1){MakeEvent("REIMU51");}
if(ChackThePlayer == 2){MakeEvent("MARISA51");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA51");}
if(ChackThePlayer == 4){MakeEvent("RUMIA51");}
WaitForEvent();

MakeBoss(GCSD~"\Stage\Boss\YuyukoN.txt");
WaitForZeroEnemy();

Wait(30);

if(ChackThePlayer == 1){MakeEvent("REIMU52");}
if(ChackThePlayer == 2){MakeEvent("MARISA52");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA52");}
if(ChackThePlayer == 4){MakeEvent("RUMIA52");}

WaitForEvent();
Wait(180);
}

function HardStage5{
SetCommonData("STAGE",5);
let level = 2;
Wait(150);

MakeZako29(cx + 32,64,level);
yield;
MakeZako29(cx + 96,128,level);

Wait(100);

MakeZako30(cx,cy - 32,level);

Wait(450);
MakeZako28(mx+16,64,90,level);
MakeZako28(Mx-16,64,90,level);
MakeZako33(cx,90,level);
Wait(400);
MakeZako28(mx+16,64,90,level);
MakeZako28(Mx-16,64,90,level);
MakeZako33(cx+100,150,level);
Wait(350);
MakeZako28(mx+16,64,90,level);
MakeZako28(Mx-16,64,90,level);
MakeZako33(cx-100,30,level);
Wait(300);
MakeZako28(mx+16,64,90,level);
MakeZako28(Mx-16,64,90,level);
MakeZako33(cx,90,level);
WaitForZeroEnemy();
Wait(120);

MakeBoss(GCSD~"\Stage\Boss\No.059　魅了・氷精「ホールド・チャーム -チルノ-　-Hard-」.txt");
WaitForZeroEnemy();
Wait(180);

MakeZako31(cx,cy - 32,level);

loop(3){
MakeZako32a(284,level);
Wait(25);
MakeZako32b(221,level);
Wait(50);
MakeZako33(cx,90,level);
MakeZako32b(412,level);
Wait(25);
MakeZako32a(183,level);
Wait(50);
MakeZako32a(67,level);
Wait(25);
MakeZako32b(83,level);
Wait(50);
MakeZako33(cx-100,90,level);
MakeZako32b(267,level);
Wait(25);
MakeZako32a(81,level);
Wait(50);
MakeZako32a(304,level);
Wait(25);
MakeZako32b(211,level);
Wait(50);
MakeZako33(cx+100,90,level);
MakeZako32b(62,level);
Wait(25);
MakeZako32a(231,level);
Wait(100);
}

WaitForZeroEnemy();
Wait(120);

MakeBoss(GCSD~"\Stage\Boss\No.063　魅了・幽剣「ホールド・チャーム -妖夢-　-Hard-」.txt");
WaitForZeroEnemy();
Wait(180);

MakeZako30(cx,cy - 32,level);
MakeZako31(cx,cy - 32,level);

WaitForZeroEnemy();
Wait(450);

if(ChackThePlayer == 1){MakeEvent("REIMU51");}
if(ChackThePlayer == 2){MakeEvent("MARISA51");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA51");}
if(ChackThePlayer == 4){MakeEvent("RUMIA51");}
WaitForEvent();

MakeBoss(GCSD~"\Stage\Boss\YuyukoH.txt");
WaitForZeroEnemy();

Wait(30);

if(ChackThePlayer == 1){MakeEvent("REIMU52");}
if(ChackThePlayer == 2){MakeEvent("MARISA52");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA52");}
if(ChackThePlayer == 4){MakeEvent("RUMIA52");}

WaitForEvent();
Wait(180);
}

function LunaticStage5{
SetCommonData("STAGE",5);
let level = 3;
Wait(150);

MakeZako29(cx + 32,64,level);
yield;
MakeZako29(cx + 96,128,level);

Wait(100);

MakeZako30(cx,cy - 32,level);

Wait(450);
MakeZako28(mx+16,64,90,level);
MakeZako28(Mx-16,64,90,level);
MakeZako33(cx,90,level);
Wait(400);
MakeZako28(mx+16,64,90,level);
MakeZako28(Mx-16,64,90,level);
MakeZako33(cx+100,150,level);
Wait(350);
MakeZako28(mx+16,64,90,level);
MakeZako28(Mx-16,64,90,level);
MakeZako33(cx-100,30,level);
Wait(300);
MakeZako28(mx+16,64,90,level);
MakeZako28(Mx-16,64,90,level);
MakeZako33(cx,90,level);
WaitForZeroEnemy();
Wait(120);

MakeBoss(GCSD~"\Stage\Boss\No.060　魅了・氷精「ホールド・チャーム -チルノ-　-Lunatic-」.txt");
WaitForZeroEnemy();
Wait(180);

MakeZako31(cx,cy - 32,level);

loop(3){
MakeZako32a(284,level);
Wait(25);
MakeZako32b(221,level);
Wait(50);
MakeZako33(cx,90,level);
MakeZako32b(412,level);
Wait(25);
MakeZako32a(183,level);
Wait(50);
MakeZako32a(67,level);
Wait(25);
MakeZako32b(83,level);
Wait(50);
MakeZako33(cx-100,90,level);
MakeZako32b(267,level);
Wait(25);
MakeZako32a(81,level);
Wait(50);
MakeZako32a(304,level);
Wait(25);
MakeZako32b(211,level);
Wait(50);
MakeZako33(cx+100,90,level);
MakeZako32b(62,level);
Wait(25);
MakeZako32a(231,level);
Wait(100);
}

WaitForZeroEnemy();
Wait(120);

MakeBoss(GCSD~"\Stage\Boss\No.064　魅了・幽剣「ホールド・チャーム -妖夢-　-Lunatic-」.txt");
WaitForZeroEnemy();
Wait(180);

MakeZako30(cx,cy - 32,level);
MakeZako31(cx,cy - 32,level);

WaitForZeroEnemy();
Wait(450);

if(ChackThePlayer == 1){MakeEvent("REIMU51");}
if(ChackThePlayer == 2){MakeEvent("MARISA51");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA51");}
if(ChackThePlayer == 4){MakeEvent("RUMIA51");}
WaitForEvent();

MakeBoss(GCSD~"\Stage\Boss\YuyukoL.txt");
WaitForZeroEnemy();

Wait(30);

if(ChackThePlayer == 1){MakeEvent("REIMU52");}
if(ChackThePlayer == 2){MakeEvent("MARISA52");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA52");}
if(ChackThePlayer == 4){MakeEvent("RUMIA52");}

WaitForEvent();
Wait(180);
}