function MakeZako34a(y,level){MakeZako(GCSD~"\Stage\Zako\Enemy34.txt",0,y,0,0,level);}
function MakeZako34b(y,level){MakeZako(GCSD~"\Stage\Zako\Enemy34.txt",Mx+32,y,0,0,level);}
function MakeZako35(x,stopy,level){MakeZako(GCSD~"\Stage\Zako\Enemy35.txt",x,stopy,0,0,level);}

function MakeZako36(x,y,level){MakeZako(GCSD~"\Stage\Zako\Enemy36.txt",x,y,0,0,level);}
function MakeZako37(x,y,level){MakeZako(GCSD~"\Stage\Zako\Enemy37.txt",x,y,0,0,level);}

function EasyStage6A{
SetCommonData("STAGE",6);
SetCommonData("STAGE6_CHOOSE",1);
let level = 0;
Wait(150);

loop(10){
MakeZako34a(64,level);
Wait(10);
}

loop(10){
MakeZako34b(64,level);
Wait(10);
}

Wait(120);

MakeZako25(cx,level);

Wait(250);

loop(10){
MakeZako34a(64,level);
Wait(10);
}

loop(10){
MakeZako34b(64,level);
Wait(10);
}

Wait(250);

MakeZako35(cx - 20,80,level);
MakeZako35(cx + 20,80,level);
MakeZako35(cx - 180,80,level);
MakeZako35(cx + 180,80,level);

Wait(50);

MakeZako35(cx - 60,80,level);
MakeZako35(cx + 60,80,level);
MakeZako35(cx - 140,80,level);
MakeZako35(cx + 140,80,level);

Wait(50);

MakeZako35(cx - 120,80,level);
MakeZako35(cx + 120,80,level);
MakeZako35(cx - 80,80,level);
MakeZako35(cx + 80,80,level);

loop(10){
MakeZako34a(64,level);
Wait(10);
}

loop(10){
MakeZako34b(64,level);
Wait(10);
}

MakeZako35(cx - 20,80,level);
MakeZako35(cx + 20,80,level);
MakeZako35(cx - 180,80,level);
MakeZako35(cx + 180,80,level);

Wait(50);

MakeZako35(cx - 60,80,level);
MakeZako35(cx + 60,80,level);
MakeZako35(cx - 140,80,level);
MakeZako35(cx + 140,80,level);

Wait(50);

MakeZako35(cx - 120,80,level);
MakeZako35(cx + 120,80,level);
MakeZako35(cx - 80,80,level);
MakeZako35(cx + 80,80,level);

Wait(250);

MakeZako36(cx,cy - 120,level);

WaitForZeroEnemy();
Wait(550);

if(ChackThePlayer == 1){MakeEvent("REIMU61");}
if(ChackThePlayer == 2){MakeEvent("MARISA61");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA61");}
if(ChackThePlayer == 4){MakeEvent("RUMIA61");}
WaitForEvent();


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

if(GetAllowedContinueCount != 3||GetCommonData("EASY_START") > 0)
{//コンティニューをしたかEasyなら、バッドエンド
if(ChackThePlayer == 1){MakeEvent("REIMU102");}
if(ChackThePlayer == 2){MakeEvent("MARISA102");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA102");}
if(ChackThePlayer == 4){MakeEvent("RUMIA102");}
WaitForEvent();
Wait(120);
ClearStage();
}

else if(GetPlayerLife <= 2)
{//残機が１以下だったら、ノーマルエンド
if(ChackThePlayer == 1){MakeEvent("REIMU101");}
if(ChackThePlayer == 2){MakeEvent("MARISA101");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA101");}
if(ChackThePlayer == 4){MakeEvent("RUMIA101");}
WaitForEvent();
Wait(120);
ClearStage();
}

else
{//上記のいずれでもなかったら、会話イベント
if(ChackThePlayer == 1){MakeEvent("REIMU62");}
if(ChackThePlayer == 2){MakeEvent("MARISA62");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA62");}
if(ChackThePlayer == 4){MakeEvent("RUMIA62");}
WaitForEvent();
}

}

function EasyStage6B{
SetCommonData("STAGE",6);
SetCommonData("STAGE6_CHOOSE",2);
let level = 0;
Wait(150);

loop(10){
MakeZako34a(64,level);
Wait(10);
}

loop(10){
MakeZako34b(64,level);
Wait(10);
}

Wait(120);

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

Wait(250);

loop(10){
MakeZako34a(64,level);
Wait(10);
}

loop(10){
MakeZako34b(64,level);
Wait(10);
}

loop(10){
MakeZako34a(64,level);
Wait(10);
}

Wait(250);

MakeZako35(cx - 120,80,level);
MakeZako35(cx + 120,80,level);
MakeZako35(cx - 80,80,level);
MakeZako35(cx + 80,80,level);

Wait(50);

MakeZako35(cx - 60,80,level);
MakeZako35(cx + 60,80,level);
MakeZako35(cx - 140,80,level);
MakeZako35(cx + 140,80,level);

Wait(50);

MakeZako35(cx - 20,80,level);
MakeZako35(cx + 20,80,level);
MakeZako35(cx - 180,80,level);
MakeZako35(cx + 180,80,level);


Wait(60);

loop(10){
MakeZako34b(64,level);
Wait(10);
}

loop(10){
MakeZako34a(64,level);
Wait(10);
}

loop(10){
MakeZako34b(64,level);
Wait(10);
}

Wait(60);

MakeZako35(cx - 120,80,level);
MakeZako35(cx + 120,80,level);
MakeZako35(cx - 80,80,level);
MakeZako35(cx + 80,80,level);

Wait(50);

MakeZako35(cx - 60,80,level);
MakeZako35(cx + 60,80,level);
MakeZako35(cx - 140,80,level);
MakeZako35(cx + 140,80,level);

Wait(50);

MakeZako35(cx - 20,80,level);
MakeZako35(cx + 20,80,level);
MakeZako35(cx - 180,80,level);
MakeZako35(cx + 180,80,level);

Wait(250);

MakeZako37(cx,cy - 120,level);

WaitForZeroEnemy();
Wait(550);

if(ChackThePlayer == 1){MakeEvent("REIMU63");}
if(ChackThePlayer == 2){MakeEvent("MARISA63");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA63");}
if(ChackThePlayer == 4){MakeEvent("RUMIA63");}
WaitForEvent();


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

if(GetAllowedContinueCount != 3||GetCommonData("EASY_START") > 0){//コンティニューをしたかEasyなら、バッドエンド
if(ChackThePlayer == 1){MakeEvent("REIMU104");}
if(ChackThePlayer == 2){MakeEvent("MARISA104");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA104");}
if(ChackThePlayer == 4){MakeEvent("RUMIA104");}
WaitForEvent();

Wait(120);
ClearStage();
}
else if(GetPlayerLife <= 2){//残機が１以下だったら、ノーマルエンド
if(ChackThePlayer == 1){MakeEvent("REIMU103");}
if(ChackThePlayer == 2){MakeEvent("MARISA103");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA103");}
if(ChackThePlayer == 4){MakeEvent("RUMIA103");}
WaitForEvent();

Wait(120);
ClearStage();
}
else{//上記のいずれでもなかったら、会話イベント
if(ChackThePlayer == 1){MakeEvent("REIMU64");}
if(ChackThePlayer == 2){MakeEvent("MARISA64");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA64");}
if(ChackThePlayer == 4){MakeEvent("RUMIA64");}
WaitForEvent();
}

}

function NormalStage6A{
SetCommonData("STAGE",6);
SetCommonData("STAGE6_CHOOSE",1);
let level = 1;
Wait(150);

loop(10){
MakeZako34a(64,level);
Wait(10);
}

loop(10){
MakeZako34b(64,level);
Wait(10);
}

Wait(120);

MakeZako25(cx,level);

Wait(250);

loop(10){
MakeZako34a(64,level);
Wait(10);
}

loop(10){
MakeZako34b(64,level);
Wait(10);
}

Wait(250);

MakeZako35(cx - 20,80,level);
MakeZako35(cx + 20,80,level);
MakeZako35(cx - 180,80,level);
MakeZako35(cx + 180,80,level);

Wait(50);

MakeZako35(cx - 60,80,level);
MakeZako35(cx + 60,80,level);
MakeZako35(cx - 140,80,level);
MakeZako35(cx + 140,80,level);

Wait(50);

MakeZako35(cx - 120,80,level);
MakeZako35(cx + 120,80,level);
MakeZako35(cx - 80,80,level);
MakeZako35(cx + 80,80,level);

loop(10){
MakeZako34a(64,level);
Wait(10);
}

loop(10){
MakeZako34b(64,level);
Wait(10);
}

MakeZako35(cx - 20,80,level);
MakeZako35(cx + 20,80,level);
MakeZako35(cx - 180,80,level);
MakeZako35(cx + 180,80,level);

Wait(50);

MakeZako35(cx - 60,80,level);
MakeZako35(cx + 60,80,level);
MakeZako35(cx - 140,80,level);
MakeZako35(cx + 140,80,level);

Wait(50);

MakeZako35(cx - 120,80,level);
MakeZako35(cx + 120,80,level);
MakeZako35(cx - 80,80,level);
MakeZako35(cx + 80,80,level);

Wait(250);

MakeZako36(cx,cy - 120,level);

WaitForZeroEnemy();
Wait(550);

if(ChackThePlayer == 1){MakeEvent("REIMU61");}
if(ChackThePlayer == 2){MakeEvent("MARISA61");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA61");}
if(ChackThePlayer == 4){MakeEvent("RUMIA61");}
WaitForEvent();


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

if(GetAllowedContinueCount != 3||GetCommonData("EASY_START") > 0){//コンティニューをしたかEasyなら、バッドエンド
if(ChackThePlayer == 1){MakeEvent("REIMU102");}
if(ChackThePlayer == 2){MakeEvent("MARISA102");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA102");}
if(ChackThePlayer == 4){MakeEvent("RUMIA102");}
WaitForEvent();

Wait(120);
ClearStage();
}
else if(GetPlayerLife <= 2){//残機が１以下だったら、ノーマルエンド
if(ChackThePlayer == 1){MakeEvent("REIMU101");}
if(ChackThePlayer == 2){MakeEvent("MARISA101");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA101");}
if(ChackThePlayer == 4){MakeEvent("RUMIA101");}
WaitForEvent();

Wait(120);
ClearStage();
}
else{//上記のいずれでもなかったら、会話イベント
if(ChackThePlayer == 1){MakeEvent("REIMU62");}
if(ChackThePlayer == 2){MakeEvent("MARISA62");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA62");}
if(ChackThePlayer == 4){MakeEvent("RUMIA62");}
WaitForEvent();
}
}

function NormalStage6B{
SetCommonData("STAGE",6);
SetCommonData("STAGE6_CHOOSE",2);
let level = 1;
Wait(150);

loop(10){
MakeZako34a(64,level);
Wait(10);
}

loop(10){
MakeZako34b(64,level);
Wait(10);
}

Wait(120);

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

Wait(250);

loop(10){
MakeZako34a(64,level);
Wait(10);
}

loop(10){
MakeZako34b(64,level);
Wait(10);
}

loop(10){
MakeZako34a(64,level);
Wait(10);
}

Wait(250);

MakeZako35(cx - 120,80,level);
MakeZako35(cx + 120,80,level);
MakeZako35(cx - 80,80,level);
MakeZako35(cx + 80,80,level);

Wait(50);

MakeZako35(cx - 60,80,level);
MakeZako35(cx + 60,80,level);
MakeZako35(cx - 140,80,level);
MakeZako35(cx + 140,80,level);

Wait(50);

MakeZako35(cx - 20,80,level);
MakeZako35(cx + 20,80,level);
MakeZako35(cx - 180,80,level);
MakeZako35(cx + 180,80,level);


Wait(60);

loop(10){
MakeZako34b(64,level);
Wait(10);
}

loop(10){
MakeZako34a(64,level);
Wait(10);
}

loop(10){
MakeZako34b(64,level);
Wait(10);
}

Wait(60);

MakeZako35(cx - 120,80,level);
MakeZako35(cx + 120,80,level);
MakeZako35(cx - 80,80,level);
MakeZako35(cx + 80,80,level);

Wait(50);

MakeZako35(cx - 60,80,level);
MakeZako35(cx + 60,80,level);
MakeZako35(cx - 140,80,level);
MakeZako35(cx + 140,80,level);

Wait(50);

MakeZako35(cx - 20,80,level);
MakeZako35(cx + 20,80,level);
MakeZako35(cx - 180,80,level);
MakeZako35(cx + 180,80,level);

Wait(250);

MakeZako37(cx,cy - 120,level);

WaitForZeroEnemy();
Wait(550);

if(ChackThePlayer == 1){MakeEvent("REIMU63");}
if(ChackThePlayer == 2){MakeEvent("MARISA63");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA63");}
if(ChackThePlayer == 4){MakeEvent("RUMIA63");}
WaitForEvent();


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

if(GetAllowedContinueCount != 3||GetCommonData("EASY_START") > 0){//コンティニューをしたかEasyなら、バッドエンド
if(ChackThePlayer == 1){MakeEvent("REIMU104");}
if(ChackThePlayer == 2){MakeEvent("MARISA104");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA104");}
if(ChackThePlayer == 4){MakeEvent("RUMIA104");}
WaitForEvent();

Wait(120);
ClearStage();
}
else if(GetPlayerLife <= 2){//残機が１以下だったら、ノーマルエンド
if(ChackThePlayer == 1){MakeEvent("REIMU103");}
if(ChackThePlayer == 2){MakeEvent("MARISA103");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA103");}
if(ChackThePlayer == 4){MakeEvent("RUMIA103");}
WaitForEvent();

Wait(120);
ClearStage();
}
else{//上記のいずれでもなかったら、会話イベント
if(ChackThePlayer == 1){MakeEvent("REIMU64");}
if(ChackThePlayer == 2){MakeEvent("MARISA64");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA64");}
if(ChackThePlayer == 4){MakeEvent("RUMIA64");}
WaitForEvent();
}

}

function HardStage6A{
SetCommonData("STAGE",6);
SetCommonData("STAGE6_CHOOSE",1);
let level = 0;
Wait(150);

loop(10){
MakeZako34a(64,level);
Wait(10);
}

loop(10){
MakeZako34b(64,level);
Wait(10);
}

Wait(120);

MakeZako25(cx,level);

Wait(250);

loop(10){
MakeZako34a(64,level);
Wait(10);
}

loop(10){
MakeZako34b(64,level);
Wait(10);
}

Wait(250);

MakeZako35(cx - 20,80,level);
MakeZako35(cx + 20,80,level);
MakeZako35(cx - 180,80,level);
MakeZako35(cx + 180,80,level);

Wait(50);

MakeZako35(cx - 60,80,level);
MakeZako35(cx + 60,80,level);
MakeZako35(cx - 140,80,level);
MakeZako35(cx + 140,80,level);

Wait(50);

MakeZako35(cx - 120,80,level);
MakeZako35(cx + 120,80,level);
MakeZako35(cx - 80,80,level);
MakeZako35(cx + 80,80,level);

loop(10){
MakeZako34a(64,level);
Wait(10);
}

loop(10){
MakeZako34b(64,level);
Wait(10);
}

MakeZako35(cx - 20,80,level);
MakeZako35(cx + 20,80,level);
MakeZako35(cx - 180,80,level);
MakeZako35(cx + 180,80,level);

Wait(50);

MakeZako35(cx - 60,80,level);
MakeZako35(cx + 60,80,level);
MakeZako35(cx - 140,80,level);
MakeZako35(cx + 140,80,level);

Wait(50);

MakeZako35(cx - 120,80,level);
MakeZako35(cx + 120,80,level);
MakeZako35(cx - 80,80,level);
MakeZako35(cx + 80,80,level);

Wait(250);

MakeZako36(cx,cy - 120,level);

WaitForZeroEnemy();
Wait(550);

if(ChackThePlayer == 1){MakeEvent("REIMU61");}
if(ChackThePlayer == 2){MakeEvent("MARISA61");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA61");}
if(ChackThePlayer == 4){MakeEvent("RUMIA61");}
WaitForEvent();


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

if(GetAllowedContinueCount != 3||GetCommonData("EASY_START") > 0){//コンティニューをしたかEasyなら、バッドエンド
if(ChackThePlayer == 1){MakeEvent("REIMU102");}
if(ChackThePlayer == 2){MakeEvent("MARISA102");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA102");}
if(ChackThePlayer == 4){MakeEvent("RUMIA102");}
WaitForEvent();

Wait(120);
ClearStage();
}
else if(GetPlayerLife <= 2){//残機が１以下だったら、ノーマルエンド
if(ChackThePlayer == 1){MakeEvent("REIMU101");}
if(ChackThePlayer == 2){MakeEvent("MARISA101");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA101");}
if(ChackThePlayer == 4){MakeEvent("RUMIA101");}
WaitForEvent();

Wait(120);
ClearStage();
}
else{//上記のいずれでもなかったら、会話イベント
if(ChackThePlayer == 1){MakeEvent("REIMU62");}
if(ChackThePlayer == 2){MakeEvent("MARISA62");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA62");}
if(ChackThePlayer == 4){MakeEvent("RUMIA62");}
WaitForEvent();
}
}

function HardStage6B{
SetCommonData("STAGE",6);
SetCommonData("STAGE6_CHOOSE",2);
let level = 2;
Wait(150);

loop(10){
MakeZako34a(64,level);
Wait(10);
}

loop(10){
MakeZako34b(64,level);
Wait(10);
}

Wait(120);

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

Wait(250);

loop(10){
MakeZako34a(64,level);
Wait(10);
}

loop(10){
MakeZako34b(64,level);
Wait(10);
}

loop(10){
MakeZako34a(64,level);
Wait(10);
}

Wait(250);

MakeZako35(cx - 120,80,level);
MakeZako35(cx + 120,80,level);
MakeZako35(cx - 80,80,level);
MakeZako35(cx + 80,80,level);

Wait(50);

MakeZako35(cx - 60,80,level);
MakeZako35(cx + 60,80,level);
MakeZako35(cx - 140,80,level);
MakeZako35(cx + 140,80,level);

Wait(50);

MakeZako35(cx - 20,80,level);
MakeZako35(cx + 20,80,level);
MakeZako35(cx - 180,80,level);
MakeZako35(cx + 180,80,level);


Wait(60);

loop(10){
MakeZako34b(64,level);
Wait(10);
}

loop(10){
MakeZako34a(64,level);
Wait(10);
}

loop(10){
MakeZako34b(64,level);
Wait(10);
}

Wait(60);

MakeZako35(cx - 120,80,level);
MakeZako35(cx + 120,80,level);
MakeZako35(cx - 80,80,level);
MakeZako35(cx + 80,80,level);

Wait(50);

MakeZako35(cx - 60,80,level);
MakeZako35(cx + 60,80,level);
MakeZako35(cx - 140,80,level);
MakeZako35(cx + 140,80,level);

Wait(50);

MakeZako35(cx - 20,80,level);
MakeZako35(cx + 20,80,level);
MakeZako35(cx - 180,80,level);
MakeZako35(cx + 180,80,level);

Wait(250);

MakeZako37(cx,cy - 120,level);

WaitForZeroEnemy();
Wait(550);

if(ChackThePlayer == 1){MakeEvent("REIMU63");}
if(ChackThePlayer == 2){MakeEvent("MARISA63");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA63");}
if(ChackThePlayer == 4){MakeEvent("RUMIA63");}
WaitForEvent();


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

if(GetAllowedContinueCount != 3||GetCommonData("EASY_START") > 0){//コンティニューをしたかEasyなら、バッドエンド
if(ChackThePlayer == 1){MakeEvent("REIMU104");}
if(ChackThePlayer == 2){MakeEvent("MARISA104");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA104");}
if(ChackThePlayer == 4){MakeEvent("RUMIA104");}
WaitForEvent();

Wait(120);
ClearStage();
}
else if(GetPlayerLife <= 2){//残機が１以下だったら、ノーマルエンド
if(ChackThePlayer == 1){MakeEvent("REIMU103");}
if(ChackThePlayer == 2){MakeEvent("MARISA103");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA103");}
if(ChackThePlayer == 4){MakeEvent("RUMIA103");}
WaitForEvent();

Wait(120);
ClearStage();
}
else{//上記のいずれでもなかったら、会話イベント
if(ChackThePlayer == 1){MakeEvent("REIMU64");}
if(ChackThePlayer == 2){MakeEvent("MARISA64");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA64");}
if(ChackThePlayer == 4){MakeEvent("RUMIA64");}
WaitForEvent();
}


}

function LunaticStage6A{
SetCommonData("STAGE",6);
SetCommonData("STAGE6_CHOOSE",1);
let level = 3;
Wait(150);

loop(10){
MakeZako34a(64,level);
Wait(10);
}

loop(10){
MakeZako34b(64,level);
Wait(10);
}

Wait(120);

MakeZako25(cx,level);

Wait(250);

loop(10){
MakeZako34a(64,level);
Wait(10);
}

loop(10){
MakeZako34b(64,level);
Wait(10);
}

Wait(250);

MakeZako35(cx - 20,80,level);
MakeZako35(cx + 20,80,level);
MakeZako35(cx - 180,80,level);
MakeZako35(cx + 180,80,level);

Wait(50);

MakeZako35(cx - 60,80,level);
MakeZako35(cx + 60,80,level);
MakeZako35(cx - 140,80,level);
MakeZako35(cx + 140,80,level);

Wait(50);

MakeZako35(cx - 120,80,level);
MakeZako35(cx + 120,80,level);
MakeZako35(cx - 80,80,level);
MakeZako35(cx + 80,80,level);

loop(10){
MakeZako34a(64,level);
Wait(10);
}

loop(10){
MakeZako34b(64,level);
Wait(10);
}

MakeZako35(cx - 20,80,level);
MakeZako35(cx + 20,80,level);
MakeZako35(cx - 180,80,level);
MakeZako35(cx + 180,80,level);

Wait(50);

MakeZako35(cx - 60,80,level);
MakeZako35(cx + 60,80,level);
MakeZako35(cx - 140,80,level);
MakeZako35(cx + 140,80,level);

Wait(50);

MakeZako35(cx - 120,80,level);
MakeZako35(cx + 120,80,level);
MakeZako35(cx - 80,80,level);
MakeZako35(cx + 80,80,level);

Wait(250);

MakeZako36(cx,cy - 120,level);

WaitForZeroEnemy();
Wait(550);

if(ChackThePlayer == 1){MakeEvent("REIMU61");}
if(ChackThePlayer == 2){MakeEvent("MARISA61");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA61");}
if(ChackThePlayer == 4){MakeEvent("RUMIA61");}
WaitForEvent();


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

if(GetAllowedContinueCount != 3||GetCommonData("EASY_START") > 0){//コンティニューをしたかEasyなら、バッドエンド
if(ChackThePlayer == 1){MakeEvent("REIMU102");}
if(ChackThePlayer == 2){MakeEvent("MARISA102");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA102");}
if(ChackThePlayer == 4){MakeEvent("RUMIA102");}
WaitForEvent();

Wait(120);
ClearStage();
}
else if(GetPlayerLife <= 2){//残機が１以下だったら、ノーマルエンド
if(ChackThePlayer == 1){MakeEvent("REIMU101");}
if(ChackThePlayer == 2){MakeEvent("MARISA101");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA101");}
if(ChackThePlayer == 4){MakeEvent("RUMIA101");}
WaitForEvent();

Wait(120);
ClearStage();
}
else{//上記のいずれでもなかったら、会話イベント
if(ChackThePlayer == 1){MakeEvent("REIMU62");}
if(ChackThePlayer == 2){MakeEvent("MARISA62");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA62");}
if(ChackThePlayer == 4){MakeEvent("RUMIA62");}
WaitForEvent();
}
}

function LunaticStage6B{
SetCommonData("STAGE",6);
SetCommonData("STAGE6_CHOOSE",2);
let level = 3;
Wait(150);

loop(10){
MakeZako34a(64,level);
Wait(10);
}

loop(10){
MakeZako34b(64,level);
Wait(10);
}

Wait(120);

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

Wait(250);

loop(10){
MakeZako34a(64,level);
Wait(10);
}

loop(10){
MakeZako34b(64,level);
Wait(10);
}

loop(10){
MakeZako34a(64,level);
Wait(10);
}

Wait(250);

MakeZako35(cx - 120,80,level);
MakeZako35(cx + 120,80,level);
MakeZako35(cx - 80,80,level);
MakeZako35(cx + 80,80,level);

Wait(50);

MakeZako35(cx - 60,80,level);
MakeZako35(cx + 60,80,level);
MakeZako35(cx - 140,80,level);
MakeZako35(cx + 140,80,level);

Wait(50);

MakeZako35(cx - 20,80,level);
MakeZako35(cx + 20,80,level);
MakeZako35(cx - 180,80,level);
MakeZako35(cx + 180,80,level);


Wait(60);

loop(10){
MakeZako34b(64,level);
Wait(10);
}

loop(10){
MakeZako34a(64,level);
Wait(10);
}

loop(10){
MakeZako34b(64,level);
Wait(10);
}

Wait(60);

MakeZako35(cx - 120,80,level);
MakeZako35(cx + 120,80,level);
MakeZako35(cx - 80,80,level);
MakeZako35(cx + 80,80,level);

Wait(50);

MakeZako35(cx - 60,80,level);
MakeZako35(cx + 60,80,level);
MakeZako35(cx - 140,80,level);
MakeZako35(cx + 140,80,level);

Wait(50);

MakeZako35(cx - 20,80,level);
MakeZako35(cx + 20,80,level);
MakeZako35(cx - 180,80,level);
MakeZako35(cx + 180,80,level);

Wait(250);

MakeZako37(cx,cy - 120,level);

WaitForZeroEnemy();
Wait(550);

if(ChackThePlayer == 1){MakeEvent("REIMU63");}
if(ChackThePlayer == 2){MakeEvent("MARISA63");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA63");}
if(ChackThePlayer == 4){MakeEvent("RUMIA63");}
WaitForEvent();


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

if(GetAllowedContinueCount != 3||GetCommonData("EASY_START") > 0){//コンティニューをしたかEasyなら、バッドエンド
if(ChackThePlayer == 1){MakeEvent("REIMU104");}
if(ChackThePlayer == 2){MakeEvent("MARISA104");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA104");}
if(ChackThePlayer == 4){MakeEvent("RUMIA104");}
WaitForEvent();

Wait(120);
ClearStage();
}
else if(GetPlayerLife <= 2){//残機が１以下だったら、ノーマルエンド
if(ChackThePlayer == 1){MakeEvent("REIMU103");}
if(ChackThePlayer == 2){MakeEvent("MARISA103");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA103");}
if(ChackThePlayer == 4){MakeEvent("RUMIA103");}
WaitForEvent();

Wait(120);
ClearStage();
}
else{//上記のいずれでもなかったら、会話イベント
if(ChackThePlayer == 1){MakeEvent("REIMU64");}
if(ChackThePlayer == 2){MakeEvent("MARISA64");}
if(ChackThePlayer == 3){MakeEvent("SAKUYA64");}
if(ChackThePlayer == 4){MakeEvent("RUMIA64");}
WaitForEvent();
}


}