let SelectEffect=false;
	task TASK_MENU
	{
		if(StageState==Menu)
		{
			ForbidShot(true);
			ForbidBomb(true);
			SetPlayerX(DefaultX);
			SetPlayerY(DefaultY);
		}
/////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////メニュー部//////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
		if(MenuState==Menu)
		{
			if(GetKeyState(VK_UP) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				Select-=1;
				if(Select<=1999)
				{
					Select=2005;
				}
				if(Select==Extra)
				{
					Select-=1;
				}
			//	wait(120);
			}
			if(GetKeyState(VK_DOWN) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				Select+=1;
				if(Select==Extra)
				{
					Select+=1;
				}
				if(Select>=2006)
				{
					Select=2000;
				}
			}
			if(GetKeyState(VK_RIGHT) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				Select+=1;
				if(Select==Extra)
				{
					Select+=1;
				}
				if(Select>=2006)
				{
					Select=2000;
				}
			}
			if(GetKeyState(VK_LEFT) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				Select-=1;
				if(Select<=1999)
				{
					Select=2005;
				}
				if(Select==Extra)
				{
					Select-=1;
				}
			}
			if(GetKeyState(VK_BOMB) == KEY_PUSH)
			{
				PlaySE(MenuSE[1]);
				Select=Quit;
			}		

			if(Select==Start && GetKeyState(VK_SHOT) == KEY_PUSH)
			{
				alternative(StartDifficult)
				case(0)
				{
					PlaySE(MenuSE[0]);
					MenuState=MenuDifficult;
					Select=EASY;
				}
				case(1)
				{
					PlaySE(MenuSE[0]);
					StageState=Exit;
					SelectedDifficult="Moderate";
				}
				case(2)
				{
					PlaySE(MenuSE[0]);
					StageState=Exit;
					SelectedDifficult="Extream";
				}
				case(3)
				{
					PlaySE(MenuSE[0]);
					StageState=Exit;
					SelectedDifficult="Apocalypse";
				}
				wait(5);
			}

			if(Select==Extra && GetKeyState(VK_SHOT) == KEY_PUSH)
			{
			//	MenuState=MenuExtra;
				PlaySE(MenuSE[0]);
				StageState=Exit;
				SelectedDifficult="Extra";
				SetCommonData("STARTPOWER",5000);
				wait(5);
				SetCommonData("STARTPOWER",0);
			}

			if(Select==Practice && GetKeyState(VK_SHOT) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				MenuState=MenuPractice;
				Select=3500;
				wait(5);
			}

			if(Select==Result && GetKeyState(VK_SHOT) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				MenuState=MenuResult;
				Select=5000;
				wait(5);
			}
			if(Select==Config && GetKeyState(VK_SHOT) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				MenuState=MenuConfig;
				Select=100000;
				wait(5);
			}
			if(Select==Quit && GetKeyState(VK_SHOT) == KEY_PUSH)
			{
				ClearStage();
			}
			if(Select==Secret && GetKeyState(VK_SHOT) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				MenuState=MenuSecret;
				wait(5);
			}

		}
///////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////難易度選択部///////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////
		if(MenuState==MenuDifficult)
		{
			if(GetKeyState(VK_UP) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				Select-=1;
				if(Select<=2999)
				{
					Select=3002;
				}
			}
			if(GetKeyState(VK_DOWN) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				Select+=1;
				if(Select>=3003)
				{
					Select=3000;
				}
			}
			if(GetKeyState(VK_BOMB) == KEY_PUSH)
			{
				PlaySE(MenuSE[1]);
				MenuState=Menu;
				Select=2000;
			}
			if(Select==EASY && GetKeyState(VK_SHOT) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				StageState=Exit;
				SelectedDifficult="Moderate";
			}

			if(Select==NORMAL && GetKeyState(VK_SHOT) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				StageState=Exit;
				SelectedDifficult="Extream";
			}

			if(Select==HARD && GetKeyState(VK_SHOT) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				StageState=Exit;
				SelectedDifficult="Apocalypse";
			}

			if(Select==LUNATIC && GetKeyState(VK_SHOT) == KEY_PUSH)
			{

			}
		}
///////////////////////////////////////////////////////////////////////////////
/////////////////////////////プラクティス部//////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////
		if(MenuState==MenuPractice)
		{
				alternative(StartDifficult)
				case(1)
				{
					PlaySE(MenuSE[0]);
					MenuState=MenuPracticeStage;
					SelectedDifficult="Moderate";
					Select=4000;
				}
				case(2)
				{
					PlaySE(MenuSE[0]);
					MenuState=MenuPracticeStage;
					SelectedDifficult="Extream";
					Select=4000;
				}
				case(3)
				{
					PlaySE(MenuSE[0]);
					MenuState=MenuPracticeStage;
					SelectedDifficult="Apocalypse";
					Select=4000;
				}

			if(GetKeyState(VK_UP) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				Select-=1;
				if(Select<=3499)
				{
					Select=3502;
				}
			}
			if(GetKeyState(VK_DOWN) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				Select+=1;
				if(Select>=3503)
				{
					Select=3500;
				}
			}
			if(GetKeyState(VK_BOMB) == KEY_PUSH)
			{
				PlaySE(MenuSE[1]);
				MenuState=Menu;
				Select=2000;
			}
			if(Select==EASYPRACTICE && GetKeyState(VK_SHOT) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				SelectedDifficult="Moderate";
				MenuState=MenuPracticeStage;
				Select=4000;
				wait(5);
			}

			if(Select==NORMALPRACTICE && GetKeyState(VK_SHOT) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				SelectedDifficult="Extream";
				MenuState=MenuPracticeStage;
				Select=4000;
				wait(5);
			}

			if(Select==HARDPRACTICE && GetKeyState(VK_SHOT) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				SelectedDifficult="Apocalypse";
				MenuState=MenuPracticeStage;
				Select=4000;
				wait(5);
			}

			if(Select==LUNATICPRACTICE && GetKeyState(VK_SHOT) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				SelectedDifficult="Lunatic";
				MenuState=MenuPracticeStage;
				Select=4000;
				wait(5);
			}
			if(Select==SPELLCARDPRACTICE && GetKeyState(VK_SHOT) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				MenuState=SpellcardPracticeStageSelect;
				Select=SpellcardPracticeStage1;
				wait(5);
			}
		}
		if(MenuState==MenuPracticeStage)
		{
			alternative(StartStage)
			case(1)
			{
				StagePractice=true;
				StageProgress=1;
				StageState=Exit;
			}
			case(2)
			{
				StagePractice=true;
				StageProgress=2;
				StageState=Exit;
			}
			case(3)
			{
				StagePractice=true;
				StageProgress=3;
				StageState=Exit;
			}
			case(4)
			{
				StagePractice=true;
				StageProgress=4;
				StageState=Exit;
			}
			case(5)
			{
				StagePractice=true;
				StageProgress=5;
				StageState=Exit;
			}
			if(GetKeyState(VK_UP) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				Select-=1;
				if(Select<=3999)
				{
					Select=4004;
				}
			}
			if(GetKeyState(VK_DOWN) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				Select+=1;
				if(Select>=4005)
				{
					Select=4000;
				}
			}
			if(GetKeyState(VK_BOMB) == KEY_PUSH)
			{
				PlaySE(MenuSE[1]);
				if(StartDifficult==0)
				{
				MenuState=MenuPractice;
				Select=3500;
				}
				else
				{
				MenuState=Menu;
				Select=2000;
				}
			}
			if(Select==STAGE1 && GetKeyState(VK_SHOT) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				StagePractice=true;
				StageProgress=1;
				StageState=Exit;
			}
			if(Select==STAGE2 && GetKeyState(VK_SHOT) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				StagePractice=true;
				StageProgress=2;
				StageState=Exit;
			}
			if(Select==STAGE3 && GetKeyState(VK_SHOT) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				StagePractice=true;
				StageProgress=3;
				StageState=Exit;
			}
			if(Select==STAGE4 && GetKeyState(VK_SHOT) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				StagePractice=true;
				StageProgress=4;
				StageState=Exit;
			}
			if(Select==STAGE5 && GetKeyState(VK_SHOT) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				StagePractice=true;
				StageProgress=5;
				StageState=Exit;
			}
			if(Select==STAGE6 && GetKeyState(VK_SHOT) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				StagePractice=true;
				StageProgress=6;
				StageState=Exit;
			}
		}
//////////////////////////////////////////////////////////////////////////////////
/////////////////////////スペルカードプラクティス部//////////////////////////////
//////////////////////////////////////////////////////////////////////////////////


////////////////////////////////////////////////////////////////////////////////
///////////////////////////リザルト部///////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
		if(MenuState==MenuResult)
		{
			if(GetKeyState(VK_UP) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				Select-=1;
				if(Select<=4999)
				{
					Select=5002;
				}
			}
			if(GetKeyState(VK_DOWN) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				Select+=1;
				if(Select>=5003)
				{
					Select=5000;
				}
			}
			if(GetKeyState(VK_BOMB) == KEY_PUSH)
			{
				PlaySE(MenuSE[1]);
				MenuState=Menu;
				Select=2000;
			}


			if(Select==ResultSCORE && GetKeyState(VK_SHOT) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				MenuState=ViewResultScore;
				ResultScoreState=6000;
				wait(5);
			}

			if(Select==ResultSPELL && GetKeyState(VK_SHOT) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				MenuState=ViewAchievement;
				AchievementState=100;
				wait(5);
			}

			if(Select==ResultOTHERS && GetKeyState(VK_SHOT) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				MenuState=ResultOTHERS;
				wait(5);
			}
		}
//////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////スコアリザルト部///////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
		if(MenuState==ViewResultScore)
		{
			if(GetKeyState(VK_SHOT) == KEY_PUSH)
			{
				MenuState=ViewResultStageScore;
				PlaySE(MenuSE[0]);
				wait(5);
			}

			if(GetKeyState(VK_BOMB) == KEY_PUSH)
			{
				PlaySE(MenuSE[1]);
				MenuState=MenuResult;
				ResultScoreState=0;
				Select=5000;
				wait(5);
			}

			if(GetKeyState(VK_LEFT) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				ResultScoreState-=1;
				if(ResultScoreState%10==9)
				{
					ResultScoreState+=3;//EX表示するには５にする
				}
				wait(5);
			}

			if(GetKeyState(VK_RIGHT) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				ResultScoreState+=1;
				if(ResultScoreState%10==3)//EX表示するには５にする
				{
					ResultScoreState-=3;//EX表示するには５にする
				}
				wait(5);
			}

			if(GetKeyState(VK_UP) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				ResultScoreState-=100;
				if(ResultScoreState<6000)
				{
					ResultScoreState+=400;
				}
				wait(5);
			}

			if(GetKeyState(VK_DOWN) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				ResultScoreState+=100;
				if(ResultScoreState>=6400)
				{
					ResultScoreState-=400;
				}
				wait(5);
			}
		}

		if(MenuState==ViewResultStageScore)
		{
			if(GetKeyState(VK_SHOT) == KEY_PUSH)
			{
				MenuState=ViewResultScore;
				PlaySE(MenuSE[0]);
				wait(5);
			}

			if(GetKeyState(VK_BOMB) == KEY_PUSH)
			{
				PlaySE(MenuSE[1]);
				MenuState=MenuResult;
				ResultScoreState=0;
				Select=5000;
				wait(5);
			}

			if(GetKeyState(VK_LEFT) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				ResultScoreState-=1;
				if(ResultScoreState%10==9)
				{
					ResultScoreState+=3;//EX表示するには５にする
				}
				wait(5);
			}

			if(GetKeyState(VK_RIGHT) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				ResultScoreState+=1;
				if(ResultScoreState%10==3)//EX表示するには５にする
				{
					ResultScoreState-=3;//EX表示するには５にする
				}
				wait(5);
			}

			if(GetKeyState(VK_UP) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				ResultScoreState-=100;
				if(ResultScoreState<6000)
				{
					ResultScoreState+=400;
				}
				wait(5);
			}

			if(GetKeyState(VK_DOWN) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				ResultScoreState+=100;
				if(ResultScoreState>=6400)
				{
					ResultScoreState-=400;
				}
				wait(5);
			}
		}

/////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////実績部///////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////
		if(MenuState==ViewAchievement)
		{
			if(GetKeyState(VK_BOMB) == KEY_PUSH)
			{
				PlaySE(MenuSE[1]);
				MenuState=MenuResult;
				Select=5000;
				wait(5);
			}

			if(GetKeyState(VK_LEFT) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				AchievementState-=100;
				if(AchievementState<100)
				{
					AchievementState+=300;
				}
				wait(5);
			}

			if(GetKeyState(VK_RIGHT) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				AchievementState+=100;
				if(AchievementState>=400)
				{
					AchievementState-=300;
				}
				wait(5);
			}

			if(GetKeyState(VK_UP) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				AchievementState-=1;
				if(AchievementState%10==9)
				{
					AchievementState+=10;
				}
				wait(5);
			}

			if(GetKeyState(VK_DOWN) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				AchievementState+=1;
				if(AchievementState%10==0)
				{
					AchievementState-=10;
				}
				wait(5);
			}

		}

/////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////コンフィグ部///////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////
		if(MenuState==MenuConfig)
		{
	if(ConfigBurstCounterChangeMode==0 && ConfigMagicCounterChangeMode==0 && ConfigBurstRankChangeMode==0 && ConfigRushGaugeChangeMode==0)
	{
			if(GetKeyState(VK_BOMB) == KEY_PUSH)
			{
				PlaySE(MenuSE[1]);
				MenuState=Menu;
				Select=2000;
				wait(5);
			}

			if(GetKeyState(VK_UP) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				Select-=1;
				if(Select<100000)
				{
					Select+=11;
				}
				wait(5);
			}

			if(GetKeyState(VK_DOWN) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				Select+=1;
				if(Select>100010)
				{
					Select-=11;
				}
				wait(5);
			}
			
			if(Select==100000)
			{

				if(GetKeyState(VK_LEFT) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					StartDifficult-=1;
					if(StartDifficult<0)
					{
						StartDifficult+=4;
					}
					wait(5);
				}

				if(GetKeyState(VK_RIGHT) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					StartDifficult+=1;
					if(StartDifficult>3)
					{
						StartDifficult-=4;
					}
					wait(5);
				}
			}

			if(Select==100001)
			{

				if(GetKeyState(VK_LEFT) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					StartStage-=1;
					if(StartStage<0)
					{
						StartStage+=6;
					}
					wait(5);
				}

				if(GetKeyState(VK_RIGHT) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					StartStage+=1;
					if(StartStage>5)
					{
						StartStage-=6;
					}
					wait(5);
				}
			}


			if(Select==100002)
			{

				if(GetKeyState(VK_LEFT) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					StagePhaseProgress-=1;
					if(StagePhaseProgress<0)
					{
						StagePhaseProgress+=4;
					}
					wait(5);
				}

				if(GetKeyState(VK_RIGHT) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					StagePhaseProgress+=1;
					if(StagePhaseProgress>3)
					{
						StagePhaseProgress-=4;
					}
					wait(5);
				}
			}

			if(Select==100003)
			{
				if(GetKeyState(VK_SHOT) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					ConfigBurstCounterChangeMode=1;
					ConfigBurstCounterChangefigure=1;
					wait(5);
				}

				if(GetKeyState(VK_LEFT) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					ConfigBurstCounterChangeMode=1;
					ConfigBurstCounterChangefigure=1;
					wait(5);
				}

				if(GetKeyState(VK_RIGHT) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					ConfigBurstCounterChangeMode=1;
					ConfigBurstCounterChangefigure=1;
					wait(5);
				}
			}

			if(Select==100004)
			{
				if(GetKeyState(VK_SHOT) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					ConfigMagicCounterChangeMode=1;
					ConfigMagicCounterChangefigure=1;
					wait(5);
				}

				if(GetKeyState(VK_LEFT) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					ConfigMagicCounterChangeMode=1;
					ConfigMagicCounterChangefigure=1;
					wait(5);
				}

				if(GetKeyState(VK_RIGHT) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					ConfigMagicCounterChangeMode=1;
					ConfigMagicCounterChangefigure=1;
					wait(5);
				}
			}

			if(Select==100005)
			{
				if(GetKeyState(VK_SHOT) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					ConfigBurstRankChangeMode=1;
					ConfigBurstRankChangefigure=1;
					wait(5);
				}

				if(GetKeyState(VK_LEFT) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					ConfigBurstRankChangeMode=1;
					ConfigBurstRankChangefigure=1;
					wait(5);
				}

				if(GetKeyState(VK_RIGHT) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					ConfigBurstRankChangeMode=1;
					ConfigBurstRankChangefigure=1;
					wait(5);
				}
			}


			if(Select==100006)
			{
				if(GetKeyState(VK_SHOT) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					ConfigRushGaugeChangeMode=1;
					ConfigRushGaugeChangefigure=1;
					wait(5);
				}

				if(GetKeyState(VK_LEFT) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					ConfigRushGaugeChangeMode=1;
					ConfigRushGaugeChangefigure=1;
					wait(5);
				}

				if(GetKeyState(VK_RIGHT) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					ConfigRushGaugeChangeMode=1;
					ConfigRushGaugeChangefigure=1;
					wait(5);
				}
			}

			if(Select==100007)
			{
				if(GetKeyState(VK_LEFT) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					if(BGDrawing==1)
					{
						BGDrawing=0;
					}
					else if(BGDrawing==0)
					{
						BGDrawing=1;
					}
					wait(5);
				}

				if(GetKeyState(VK_RIGHT) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					if(BGDrawing==1)
					{
						BGDrawing=0;
					}
					else if(BGDrawing==0)
					{
						BGDrawing=1;
					}
					wait(5);
				}
			}

			if(Select==100008)
			{
				if(GetKeyState(VK_LEFT) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					if(LightMode==1)
					{
						LightMode=0;
					}
					else if(LightMode==0)
					{
						LightMode=1;
					}
					wait(5);
				}

				if(GetKeyState(VK_RIGHT) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					if(LightMode==1)
					{
						LightMode=0;
					}
					else if(LightMode==0)
					{
						LightMode=1;
					}
					wait(5);
				}
			}

			if(Select==100009)
			{
				if(GetKeyState(VK_SHOT) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					StartDifficult=0;
					StartStage=0;
					PracticeStartMagicCounter=0;
					PracticeStartBurstCounter=0;
					PracticeStartBurstRank=0;
					PracticeStartRushGauge=0;
					StagePhaseProgress=0;
					BGDrawing=1;
					LightMode=0;
					AutoBombMode=0;
				}
			}

			if(Select==100010)
			{
				if(GetKeyState(VK_LEFT) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					if(AutoBombMode==1)
					{
						AutoBombMode=0.5;
					}
					else if(AutoBombMode==0.5)
					{
						AutoBombMode=0;
					}
					else if(AutoBombMode==0)
					{
						AutoBombMode=1;
					}
					wait(5);
				}

				if(GetKeyState(VK_RIGHT) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					if(AutoBombMode==1)
					{
						AutoBombMode=0;
					}
					else if(AutoBombMode==0.5)
					{
						AutoBombMode=1;
					}
					else if(AutoBombMode==0)
					{
						AutoBombMode=0.5;
					}
					wait(5);
				}
			}

	}
	else if(ConfigBurstCounterChangeMode==1)
	{
			if(GetKeyState(VK_SHOT) == KEY_PUSH)
			{
				PlaySE(MenuSE[1]);
				ConfigBurstCounterChangeMode=0;
				wait(5);
			}
			if(GetKeyState(VK_BOMB) == KEY_PUSH)
			{
				PlaySE(MenuSE[1]);
				ConfigBurstCounterChangeMode=0;
				wait(5);
			}

			if(GetKeyState(VK_LEFT) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				ConfigBurstCounterChangefigure-=1;
				if(ConfigBurstCounterChangefigure<1)
				{
					ConfigBurstCounterChangefigure+=4;
				}
				wait(5);
			}

			if(GetKeyState(VK_RIGHT) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				ConfigBurstCounterChangefigure+=1;
				if(ConfigBurstCounterChangefigure>4)
				{
					ConfigBurstCounterChangefigure-=4;
				}
				wait(5);
			}

			alternative(ConfigBurstCounterChangefigure)
			case(1)
			{
				if(GetKeyState(VK_UP) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					PracticeStartBurstCounter+=1000;
					if(PracticeStartBurstCounter>=10000)
					{
						PracticeStartBurstCounter-=10000;
					}
					wait(5);
				}

				if(GetKeyState(VK_DOWN) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					PracticeStartBurstCounter-=1000;
					if((PracticeStartBurstCounter%10000/1000)<0)
					{
						PracticeStartBurstCounter+=10000;
					}
					wait(5);
				}
			}
			case(2)
			{
				if(GetKeyState(VK_UP) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					if(trunc(PracticeStartBurstCounter%1000/100)==9)
					{
						PracticeStartBurstCounter-=900;
					}
					else
					{
						PracticeStartBurstCounter+=100;
					}
					wait(5);
				}

				if(GetKeyState(VK_DOWN) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					if(trunc(PracticeStartBurstCounter%1000/100)==0)
					{
						PracticeStartBurstCounter+=900;
					}
					else
					{
						PracticeStartBurstCounter-=100;
					}
					wait(5);
				}
			}
			case(3)
			{
				if(GetKeyState(VK_UP) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					if(trunc(PracticeStartBurstCounter%100/10)==9)
					{
						PracticeStartBurstCounter-=90;
					}
					else
					{
						PracticeStartBurstCounter+=10;
					}
					wait(5);
				}

				if(GetKeyState(VK_DOWN) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					if(trunc(PracticeStartBurstCounter%100/10)==0)
					{
						PracticeStartBurstCounter+=90;
					}
					else
					{
						PracticeStartBurstCounter-=10;
					}
					wait(5);
				}
			}
			case(4)
			{
				if(GetKeyState(VK_UP) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					if(PracticeStartBurstCounter%10==9)
					{
						PracticeStartBurstCounter-=10;
					}
					PracticeStartBurstCounter+=1;
					wait(5);
				}

				if(GetKeyState(VK_DOWN) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					if(PracticeStartBurstCounter%10==0)
					{
						PracticeStartBurstCounter+=10;
					}
					PracticeStartBurstCounter-=1;
					wait(5);
				}
			}
	}
	else if(ConfigMagicCounterChangeMode==1)
	{
			if(GetKeyState(VK_SHOT) == KEY_PUSH)
			{
				PlaySE(MenuSE[1]);
				ConfigMagicCounterChangeMode=0;
				wait(5);
			}
			if(GetKeyState(VK_BOMB) == KEY_PUSH)
			{
				PlaySE(MenuSE[1]);
				ConfigMagicCounterChangeMode=0;
				wait(5);
			}

			if(GetKeyState(VK_LEFT) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				ConfigMagicCounterChangefigure-=1;
				if(ConfigMagicCounterChangefigure<1)
				{
					ConfigMagicCounterChangefigure+=5;
				}
				wait(5);
			}

			if(GetKeyState(VK_RIGHT) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				ConfigMagicCounterChangefigure+=1;
				if(ConfigMagicCounterChangefigure>5)
				{
					ConfigMagicCounterChangefigure-=5;
				}
				wait(5);
			}

			alternative(ConfigMagicCounterChangefigure)
			case(1)
			{
				if(GetKeyState(VK_UP) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					PracticeStartMagicCounter+=10000;
				//	if((PracticeStartMagicCounter%100000/10000)>10)
				//	{
					if(PracticeStartMagicCounter>=100000)
					{
						PracticeStartMagicCounter-=100000;
					}
					wait(5);
				}

				if(GetKeyState(VK_DOWN) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					PracticeStartMagicCounter-=10000;
					if((PracticeStartMagicCounter%100000/10000)<0)
					{
						PracticeStartMagicCounter+=100000;
					}
					wait(5);
				}
			}
			case(2)
			{
				if(GetKeyState(VK_UP) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					if(floor((PracticeStartMagicCounter%10000/1000))==9)
					{
						PracticeStartMagicCounter-=9000;
					}
					else
					{
						PracticeStartMagicCounter+=1000;
					}
					wait(5);
				}

				if(GetKeyState(VK_DOWN) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					if(floor((PracticeStartMagicCounter%10000/1000))==0)
					{
						PracticeStartMagicCounter+=9000;
					}
					else
					{
						PracticeStartMagicCounter-=1000;
					}
					wait(5);
				}
			}
			case(3)
			{
				if(GetKeyState(VK_UP) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					if(trunc(PracticeStartMagicCounter%1000/100)==9)
					{
						PracticeStartMagicCounter-=900;
					}
					else
					{
						PracticeStartMagicCounter+=100;
					}
					wait(5);
				}

				if(GetKeyState(VK_DOWN) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					if(trunc(PracticeStartMagicCounter%1000/100)==0)
					{
						PracticeStartMagicCounter+=900;
					}
					else
					{
						PracticeStartMagicCounter-=100;
					}
					wait(5);
				}
			}
			case(4)
			{
				if(GetKeyState(VK_UP) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					if(trunc(PracticeStartMagicCounter%100/10)==9)
					{
						PracticeStartMagicCounter-=90;
					}
					else
					{
						PracticeStartMagicCounter+=10;
					}
					wait(5);
				}

				if(GetKeyState(VK_DOWN) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					if(trunc(PracticeStartMagicCounter%100/10)==0)
					{
						PracticeStartMagicCounter+=90;
					}
					else
					{
						PracticeStartMagicCounter-=10;
					}
					wait(5);
				}
			}
			case(5)
			{
				if(GetKeyState(VK_UP) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					if(PracticeStartMagicCounter%10==9)
					{
						PracticeStartMagicCounter-=10;
					}
					PracticeStartMagicCounter+=1;
					wait(5);
				}

				if(GetKeyState(VK_DOWN) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					if(PracticeStartMagicCounter%10==0)
					{
						PracticeStartMagicCounter+=10;
					}
					PracticeStartMagicCounter-=1;
					wait(5);
				}
			}
	}
	else if(ConfigBurstRankChangeMode==1)
	{
			if(GetKeyState(VK_SHOT) == KEY_PUSH)
			{
				PlaySE(MenuSE[1]);
				ConfigBurstRankChangeMode=0;
				wait(5);
			}
			if(GetKeyState(VK_BOMB) == KEY_PUSH)
			{
				PlaySE(MenuSE[1]);
				ConfigBurstRankChangeMode=0;
				wait(5);
			}

			if(GetKeyState(VK_LEFT) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				ConfigBurstRankChangefigure-=1;
				if(ConfigBurstRankChangefigure<1)
				{
					ConfigBurstRankChangefigure+=5;
				}
				wait(5);
			}

			if(GetKeyState(VK_RIGHT) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				ConfigBurstRankChangefigure+=1;
				if(ConfigBurstRankChangefigure>5)
				{
					ConfigBurstRankChangefigure-=5;
				}
				wait(5);
			}

			alternative(ConfigBurstRankChangefigure)
			case(1)
			{
				if(GetKeyState(VK_UP) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					PracticeStartBurstRank+=10000;
					if(PracticeStartBurstRank>=100000)
					{
						PracticeStartBurstRank-=100000;
					}
					wait(5);
				}

				if(GetKeyState(VK_DOWN) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					PracticeStartBurstRank-=10000;
					if((PracticeStartBurstRank%100000/10000)<0)
					{
						PracticeStartBurstRank+=100000;
					}
					wait(5);
				}
			}
			case(2)
			{
				if(GetKeyState(VK_UP) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					if(floor((PracticeStartBurstRank%10000/1000))==9)
					{
						PracticeStartBurstRank-=9000;
					}
					else
					{
						PracticeStartBurstRank+=1000;
					}
					wait(5);
				}

				if(GetKeyState(VK_DOWN) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					if(floor((PracticeStartBurstRank%10000/1000))==0)
					{
						PracticeStartBurstRank+=9000;
					}
					else
					{
						PracticeStartBurstRank-=1000;
					}
					wait(5);
				}
			}
			case(3)
			{
				if(GetKeyState(VK_UP) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					if(trunc(PracticeStartBurstRank%1000/100)==9)
					{
						PracticeStartBurstRank-=900;
					}
					else
					{
						PracticeStartBurstRank+=100;
					}
					wait(5);
				}

				if(GetKeyState(VK_DOWN) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					if(trunc(PracticeStartBurstRank%1000/100)==0)
					{
						PracticeStartBurstRank+=900;
					}
					else
					{
						PracticeStartBurstRank-=100;
					}
					wait(5);
				}
			}
			case(4)
			{
				if(GetKeyState(VK_UP) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					if(trunc(PracticeStartBurstRank%100/10)==9)
					{
						PracticeStartBurstRank-=90;
					}
					else
					{
						PracticeStartBurstRank+=10;
					}
					wait(5);
				}

				if(GetKeyState(VK_DOWN) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					if(trunc(PracticeStartBurstRank%100/10)==0)
					{
						PracticeStartBurstRank+=90;
					}
					else
					{
						PracticeStartBurstRank-=10;
					}
					wait(5);
				}
			}
			case(5)
			{
				if(GetKeyState(VK_UP) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					if(PracticeStartBurstRank%10==9)
					{
						PracticeStartBurstRank-=10;
					}
					PracticeStartBurstRank+=1;
					wait(5);
				}

				if(GetKeyState(VK_DOWN) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					if(PracticeStartBurstRank%10==0)
					{
						PracticeStartBurstRank+=10;
					}
					PracticeStartBurstRank-=1;
					wait(5);
				}
			}
	}
	else if(ConfigRushGaugeChangeMode==1)
	{
			if(GetKeyState(VK_SHOT) == KEY_PUSH)
			{
				PlaySE(MenuSE[1]);
				ConfigRushGaugeChangeMode=0;
				wait(5);
			}
			if(GetKeyState(VK_BOMB) == KEY_PUSH)
			{
				PlaySE(MenuSE[1]);
				ConfigRushGaugeChangeMode=0;
				wait(5);
			}

			if(GetKeyState(VK_LEFT) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				ConfigRushGaugeChangefigure-=1;
				if(ConfigRushGaugeChangefigure<1)
				{
					ConfigRushGaugeChangefigure+=5;
				}
				wait(5);
			}

			if(GetKeyState(VK_RIGHT) == KEY_PUSH)
			{
				PlaySE(MenuSE[0]);
				ConfigRushGaugeChangefigure+=1;
				if(ConfigRushGaugeChangefigure>5)
				{
					ConfigRushGaugeChangefigure-=5;
				}
				wait(5);
			}

			alternative(ConfigRushGaugeChangefigure)
			case(1)
			{
				if(GetKeyState(VK_UP) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					PracticeStartRushGauge+=10000;
					if(PracticeStartRushGauge>=100000)
					{
						PracticeStartRushGauge-=100000;
					}
					wait(5);
				}

				if(GetKeyState(VK_DOWN) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					PracticeStartRushGauge-=10000;
					if((PracticeStartRushGauge%100000/10000)<0)
					{
						PracticeStartRushGauge+=100000;
					}
					wait(5);
				}
			}
			case(2)
			{
				if(GetKeyState(VK_UP) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					if(floor((PracticeStartRushGauge%10000/1000))==9)
					{
						PracticeStartRushGauge-=9000;
					}
					else
					{
						PracticeStartRushGauge+=1000;
					}
					wait(5);
				}

				if(GetKeyState(VK_DOWN) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					if(floor((PracticeStartRushGauge%10000/1000))==0)
					{
						PracticeStartRushGauge+=9000;
					}
					else
					{
						PracticeStartRushGauge-=1000;
					}
					wait(5);
				}
			}
			case(3)
			{
				if(GetKeyState(VK_UP) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					if(trunc(PracticeStartRushGauge%1000/100)==9)
					{
						PracticeStartRushGauge-=900;
					}
					else
					{
						PracticeStartRushGauge+=100;
					}
					wait(5);
				}

				if(GetKeyState(VK_DOWN) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					if(trunc(PracticeStartRushGauge%1000/100)==0)
					{
						PracticeStartRushGauge+=900;
					}
					else
					{
						PracticeStartRushGauge-=100;
					}
					wait(5);
				}
			}
			case(4)
			{
				if(GetKeyState(VK_UP) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					if(trunc(PracticeStartRushGauge%100/10)==9)
					{
						PracticeStartRushGauge-=90;
					}
					else
					{
						PracticeStartRushGauge+=10;
					}
					wait(5);
				}

				if(GetKeyState(VK_DOWN) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					if(trunc(PracticeStartRushGauge%100/10)==0)
					{
						PracticeStartRushGauge+=90;
					}
					else
					{
						PracticeStartRushGauge-=10;
					}
					wait(5);
				}
			}
			case(5)
			{
				if(GetKeyState(VK_UP) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					if(PracticeStartRushGauge%10==9)
					{
						PracticeStartRushGauge-=10;
					}
					PracticeStartRushGauge+=1;
					wait(5);
				}

				if(GetKeyState(VK_DOWN) == KEY_PUSH)
				{
					PlaySE(MenuSE[0]);
					if(PracticeStartRushGauge%10==0)
					{
						PracticeStartRushGauge+=10;
					}
					PracticeStartRushGauge-=1;
					wait(5);
				}
			}
	}
		}


/////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////その他部///////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////
		if(MenuState==ResultOTHERS)
		{
			if(GetKeyState(VK_BOMB) == KEY_PUSH)
			{
				PlaySE(MenuSE[1]);
				MenuState=MenuResult;
				Select=5000;
				wait(5);
			}
		}
///////////////////////////////////////////////////////////////////////////////////////
	}