function NextStage{
	Result=true;
	BS=0;
	GP=0;
	loop(127){
	Alpha_BG-=2;
	yield;
	}
	Alpha_BG-=1;
	if(stage==1){
	DeleteGraphic(BG1_1);
	DeleteGraphic(BG1_2);
	}
	if(stage==2){
	DeleteGraphic(BG2_1);
	DeleteGraphic(BG2_2);
	}
	if(stage==3){
	DeleteGraphic(BG3_1);
	DeleteGraphic(BG3_2);
	}
	if(stage==4){
	DeleteGraphic(BG4_1);
	DeleteGraphic(BG4_2);
	}
	ClearByteCodeCache;
	LoadGraphic(imgresult);
	ForbidShot(true);
	ForbidBomb(true);
	loop(51){
	Alpha_result+=5;
	yield;
	}
	Point=GetPoint;
	pBonus=100;
	loop{
	if(GetPoint>2000){
	AddPoint(-23);
	GP+=pBonus*23;
	}
	if(GetPoint>1000){
	AddPoint(-11);
	GP+=pBonus*11;
	}
	if(GetPoint>500){
	AddPoint(-7);
	GP+=pBonus*7;
	}
	if(GetPoint>200){
	AddPoint(-3);
	GP+=pBonus*3;
	}
	if(GetPoint>0){
	AddPoint(-1);
	GP+=pBonus*1;
	}
	PlaySE("seScore.wav");
	if(GetKeyState(VK_SHOT) == KEY_PUSH) {
	GP=pBonus*Point;
	AddPoint(-GetPoint);
	}
	else{
	yield;
	}
	if(GetPoint==0){break;}
	}
	AddScore(GP+BS_S);
	PlaySE("se1UP.wav");
	Compile;
	SetPlayerX(cx);
	SetPlayerY(cy);
	if(stage==1||stage==2){
	loop(51){
	Alpha_result-=5;
	wait(1);
	}
	}
	if(stage==1){
	LoadGraphic(BG2_1);
	LoadGraphic(BG2_2);
	LoadMusic(bgm3);
	LoadMusic(bgm4);
	stage=2;
	}
	else if(stage==2){
	LoadGraphic(BG3_1);
	LoadGraphic(BG3_2);
	LoadMusic(bgm5);
	LoadMusic(bgm6);
	stage=3;
	}
	else if(stage==3){
	wait(120);
	Clear();
	}
	ForbidShot(false);
	ForbidBomb(false);
	DeleteGraphic(imgresult);
	loop(51){
	Alpha_BG+=5;
	wait(1);
	}
	Result=false;
	}