sub HiScoreLoad
{
	if(SelectedDifficult=="Moderate")
	{
		if(SelectedCharacter==DefinedPlayer1)
		{
			ascent(let i in 0..10)
			{
				Hiscore[i] = GetCommonDataDefaultEx(NsScore,NsHiScoreReimuAEasy[i],0);
				Hiscore2[i] = GetCommonDataDefaultEx(NsScore,NsHiScoreReimuAEasy2[i],0);
			}
		}
		if(SelectedCharacter==DefinedPlayer2)
		{
			ascent(let i in 0..10)
			{
				Hiscore[i] = GetCommonDataDefaultEx(NsScore,NsHiScoreReimuBEasy[i],0);
				Hiscore2[i] = GetCommonDataDefaultEx(NsScore,NsHiScoreReimuBEasy2[i],0);
			}
		}
		if(SelectedCharacter==DefinedPlayer3)
		{
			ascent(let i in 0..10)
			{
				Hiscore[i] = GetCommonDataDefaultEx(NsScore,NsHiScoreReimuCEasy[i],0);
				Hiscore2[i] = GetCommonDataDefaultEx(NsScore,NsHiScoreReimuCEasy2[i],0);
			}
		}
		if(SelectedCharacter==DefinedPlayer4)
		{
			ascent(let i in 0..10)
			{
				Hiscore[i] = GetCommonDataDefaultEx(NsScore,NsHiScoreReimuDEasy[i],0);
				Hiscore2[i] = GetCommonDataDefaultEx(NsScore,NsHiScoreReimuDEasy2[i],0);
			}
		}
	}

	if(SelectedDifficult=="Extream")
	{
		if(SelectedCharacter==DefinedPlayer1)
		{
			ascent(let i in 0..10)
			{
				Hiscore[i] = GetCommonDataDefaultEx(NsScore,NsHiScoreReimuANormal[i],0);
				Hiscore2[i] = GetCommonDataDefaultEx(NsScore,NsHiScoreReimuANormal2[i],0);
			}
		}
		if(SelectedCharacter==DefinedPlayer2)
		{
			ascent(let i in 0..10)
			{
				Hiscore[i] = GetCommonDataDefaultEx(NsScore,NsHiScoreReimuBNormal[i],0);
				Hiscore2[i] = GetCommonDataDefaultEx(NsScore,NsHiScoreReimuBNormal2[i],0);
			}
		}
		if(SelectedCharacter==DefinedPlayer3)
		{
			ascent(let i in 0..10)
			{
				Hiscore[i] = GetCommonDataDefaultEx(NsScore,NsHiScoreReimuCNormal[i],0);
				Hiscore2[i] = GetCommonDataDefaultEx(NsScore,NsHiScoreReimuCNormal2[i],0);
			}
		}
		if(SelectedCharacter==DefinedPlayer4)
		{
			ascent(let i in 0..10)
			{
				Hiscore[i] = GetCommonDataDefaultEx(NsScore,NsHiScoreReimuDNormal[i],0);
				Hiscore2[i] = GetCommonDataDefaultEx(NsScore,NsHiScoreReimuDNormal2[i],0);
			}
		}
	}


	if(SelectedDifficult=="Apocalypse")
	{
		if(SelectedCharacter==DefinedPlayer1)
		{
			ascent(let i in 0..10)
			{
				Hiscore[i] = GetCommonDataDefaultEx(NsScore,NsHiScoreReimuAHard[i],0);
				Hiscore2[i] = GetCommonDataDefaultEx(NsScore,NsHiScoreReimuAHard2[i],0);
			}
		}
		if(SelectedCharacter==DefinedPlayer2)
		{
			ascent(let i in 0..10)
			{
				Hiscore[i] = GetCommonDataDefaultEx(NsScore,NsHiScoreReimuBHard[i],0);
				Hiscore2[i] = GetCommonDataDefaultEx(NsScore,NsHiScoreReimuBHard2[i],0);
			}
		}
		if(SelectedCharacter==DefinedPlayer3)
		{
			ascent(let i in 0..10)
			{
				Hiscore[i] = GetCommonDataDefaultEx(NsScore,NsHiScoreReimuCHard[i],0);
				Hiscore2[i] = GetCommonDataDefaultEx(NsScore,NsHiScoreReimuCHard2[i],0);
			}
		}
		if(SelectedCharacter==DefinedPlayer4)
		{
			ascent(let i in 0..10)
			{
				Hiscore[i] = GetCommonDataDefaultEx(NsScore,NsHiScoreReimuDHard[i],0);
				Hiscore2[i] = GetCommonDataDefaultEx(NsScore,NsHiScoreReimuDHard2[i],0);
			}
		}
	}
}
/*
sub StageHiScoreLoad
{
	if(SelectedDifficult=="Moderate")
	{
		if(SelectedCharacter==DefinedPlayer1)
		{
			ascent(let i in 0..5)
			{
				StageHiscore[i] = GetCommonDataDefaultEx(NsScore,NsStageHiScoreReimuAEasy[i],0);
				StageHiscore2[i] = GetCommonDataDefaultEx(NsScore,NsStageHiScoreReimuAEasy2[i],0);
			}
		}
		if(SelectedCharacter==DefinedPlayer2)
		{
			ascent(let i in 0..5)
			{
				StageHiscore[i] = GetCommonDataDefaultEx(NsScore,NsStageHiScoreReimuBEasy[i],0);
				StageHiscore2[i] = GetCommonDataDefaultEx(NsScore,NsStageHiScoreReimuBEasy2[i],0);
			}
		}
		if(SelectedCharacter==DefinedPlayer3)
		{
			ascent(let i in 0..5)
			{
				StageHiscore[i] = GetCommonDataDefaultEx(NsScore,NsStageHiScoreReimuCEasy[i],0);
				StageHiscore2[i] = GetCommonDataDefaultEx(NsScore,NsStageHiScoreReimuCEasy2[i],0);
			}
		}
		if(SelectedCharacter==DefinedPlayer4)
		{
			ascent(let i in 0..5)
			{
				StageHiscore[i] = GetCommonDataDefaultEx(NsScore,NsStageHiScoreReimuDEasy[i],0);
				StageHiscore2[i] = GetCommonDataDefaultEx(NsScore,NsStageHiScoreReimuDEasy2[i],0);
			}
		}
	}

	if(SelectedDifficult=="Extream")
	{
		if(SelectedCharacter==DefinedPlayer1)
		{
			ascent(let i in 0..5)
			{
				StageHiscore[i] = GetCommonDataDefaultEx(NsScore,NsStageHiScoreReimuANormal[i],0);
				StageHiscore2[i] = GetCommonDataDefaultEx(NsScore,NsStageHiScoreReimuANormal2[i],0);
			}
		}
		if(SelectedCharacter==DefinedPlayer2)
		{
			ascent(let i in 0..5)
			{
				StageHiscore[i] = GetCommonDataDefaultEx(NsScore,NsStageHiScoreReimuBNormal[i],0);
				StageHiscore2[i] = GetCommonDataDefaultEx(NsScore,NsStageHiScoreReimuBNormal2[i],0);
			}
		}
		if(SelectedCharacter==DefinedPlayer3)
		{
			ascent(let i in 0..5)
			{
				StageHiscore[i] = GetCommonDataDefaultEx(NsScore,NsStageHiScoreReimuCNormal[i],0);
				StageHiscore2[i] = GetCommonDataDefaultEx(NsScore,NsStageHiScoreReimuCNormal2[i],0);
			}
		}
		if(SelectedCharacter==DefinedPlayer4)
		{
			ascent(let i in 0..5)
			{
				StageHiscore[i] = GetCommonDataDefaultEx(NsScore,NsStageHiScoreReimuDNormal[i],0);
				StageHiscore2[i] = GetCommonDataDefaultEx(NsScore,NsStageHiScoreReimuDNormal2[i],0);
			}
		}
	}


	if(SelectedDifficult=="Apocalypse")
	{
		if(SelectedCharacter==DefinedPlayer1)
		{
			ascent(let i in 0..5)
			{
				StageHiscore[i] = GetCommonDataDefaultEx(NsScore,NsStageHiScoreReimuAHard[i],0);
				StageHiscore2[i] = GetCommonDataDefaultEx(NsScore,NsStageHiScoreReimuAHard2[i],0);
			}
		}
		if(SelectedCharacter==DefinedPlayer2)
		{
			ascent(let i in 0..5)
			{
				StageHiscore[i] = GetCommonDataDefaultEx(NsScore,NsStageHiScoreReimuBHard[i],0);
				StageHiscore2[i] = GetCommonDataDefaultEx(NsScore,NsStageHiScoreReimuBHard2[i],0);
			}
		}
		if(SelectedCharacter==DefinedPlayer3)
		{
			ascent(let i in 0..5)
			{
				StageHiscore[i] = GetCommonDataDefaultEx(NsScore,NsStageHiScoreReimuCHard[i],0);
				StageHiscore2[i] = GetCommonDataDefaultEx(NsScore,NsStageHiScoreReimuCHard2[i],0);
			}
		}
		if(SelectedCharacter==DefinedPlayer4)
		{
			ascent(let i in 0..5)
			{
				StageHiscore[i] = GetCommonDataDefaultEx(NsScore,NsStageHiScoreReimuDHard[i],0);
				StageHiscore2[i] = GetCommonDataDefaultEx(NsScore,NsStageHiScoreReimuDHard2[i],0);
			}
		}
	}
}
*/
//----------------------------------------------------------------------------------------------------------------------
sub HiScoreSave
{
//	let score = GetScore();
	let score1 =ScoreNumber1;
	let score2 = ScoreNumber2;
	if(SelectedDifficult=="Moderate")
	{
		if(SelectedCharacter==DefinedPlayer1)
		{
			ascent(let j in 0..10)
			{
				if(score2 > Hiscore2[j])
				{
					ascent(let i in j+1..10)
					{
						SetCommonDataEx(NsScore,NsHiScoreReimuAEasy[i],Hiscore[i-1]);
						SetCommonDataEx(NsScore,NsHiScoreReimuAEasy2[i],Hiscore2[i-1]);
					}
					SetCommonDataEx(NsScore,NsHiScoreReimuAEasy[j],score1);
					SetCommonDataEx(NsScore,NsHiScoreReimuAEasy2[j],score2);
					break;
				}

				if(score2 == Hiscore2[j] && score1 >= Hiscore[j])
				{
					ascent(let i in j+1..10)
					{
						SetCommonDataEx(NsScore,NsHiScoreReimuAEasy[i],Hiscore[i-1]);
						SetCommonDataEx(NsScore,NsHiScoreReimuAEasy2[i],Hiscore2[i-1]);
					}
					SetCommonDataEx(NsScore,NsHiScoreReimuAEasy[j],score1);
					SetCommonDataEx(NsScore,NsHiScoreReimuAEasy2[j],score2);
					break;
				}
			}
		}

		if(SelectedCharacter==DefinedPlayer2)
		{
			ascent(let j in 0..10)
			{
				if(score2 > Hiscore2[j])
				{
					ascent(let i in j+1..10)
					{
						SetCommonDataEx(NsScore,NsHiScoreReimuBEasy[i],Hiscore[i-1]);
						SetCommonDataEx(NsScore,NsHiScoreReimuBEasy2[i],Hiscore2[i-1]);
					}
					SetCommonDataEx(NsScore,NsHiScoreReimuBEasy[j],score1);
					SetCommonDataEx(NsScore,NsHiScoreReimuBEasy2[j],score2);
					break;
				}
				if(score2 == Hiscore2[j] && score1 >= Hiscore[j])
				{
					ascent(let i in j+1..10)
					{
						SetCommonDataEx(NsScore,NsHiScoreReimuBEasy[i],Hiscore[i-1]);
						SetCommonDataEx(NsScore,NsHiScoreReimuBEasy2[i],Hiscore2[i-1]);
					}
					SetCommonDataEx(NsScore,NsHiScoreReimuBEasy[j],score1);
					SetCommonDataEx(NsScore,NsHiScoreReimuBEasy2[j],score2);
					break;
				}
			}
		}
		if(SelectedCharacter==DefinedPlayer3)
		{
			ascent(let j in 0..10)
			{
				if(score2 > Hiscore2[j])
				{
					ascent(let i in j+1..10)
					{
						SetCommonDataEx(NsScore,NsHiScoreReimuCEasy[i],Hiscore[i-1]);
						SetCommonDataEx(NsScore,NsHiScoreReimuCEasy2[i],Hiscore2[i-1]);
					}
					SetCommonDataEx(NsScore,NsHiScoreReimuCEasy[j],score1);
					SetCommonDataEx(NsScore,NsHiScoreReimuCEasy2[j],score2);
					break;
				}
				if(score2 == Hiscore2[j] && score1 >= Hiscore[j])
				{
					ascent(let i in j+1..10)
					{
						SetCommonDataEx(NsScore,NsHiScoreReimuCEasy[i],Hiscore[i-1]);
						SetCommonDataEx(NsScore,NsHiScoreReimuCEasy2[i],Hiscore2[i-1]);
					}
					SetCommonDataEx(NsScore,NsHiScoreReimuCEasy[j],score1);
					SetCommonDataEx(NsScore,NsHiScoreReimuCEasy2[j],score2);
					break;
				}
			}
		}
		if(SelectedCharacter==DefinedPlayer4)
		{
			ascent(let j in 0..10)
			{
				if(score2 > Hiscore2[j])
				{
					ascent(let i in j+1..10)
					{
						SetCommonDataEx(NsScore,NsHiScoreReimuDEasy[i],Hiscore[i-1]);
						SetCommonDataEx(NsScore,NsHiScoreReimuDEasy2[i],Hiscore2[i-1]);
					}
					SetCommonDataEx(NsScore,NsHiScoreReimuDEasy[j],score1);
					SetCommonDataEx(NsScore,NsHiScoreReimuDEasy2[j],score2);
					break;
				}
				if(score2 == Hiscore2[j] && score1 >= Hiscore[j])
				{
					ascent(let i in j+1..10)
					{
						SetCommonDataEx(NsScore,NsHiScoreReimuDEasy[i],Hiscore[i-1]);
						SetCommonDataEx(NsScore,NsHiScoreReimuDEasy2[i],Hiscore2[i-1]);
					}
					SetCommonDataEx(NsScore,NsHiScoreReimuDEasy[j],score1);
					SetCommonDataEx(NsScore,NsHiScoreReimuDEasy2[j],score2);
					break;
				}
			}
		}
	}

	if(SelectedDifficult=="Extream")
	{
		if(SelectedCharacter==DefinedPlayer1)
		{
			ascent(let j in 0..10)
			{
				if(score2 > Hiscore2[j])
				{
					ascent(let i in j+1..10)
					{
						SetCommonDataEx(NsScore,NsHiScoreReimuANormal[i],Hiscore[i-1]);
						SetCommonDataEx(NsScore,NsHiScoreReimuANormal2[i],Hiscore2[i-1]);
					}
					SetCommonDataEx(NsScore,NsHiScoreReimuANormal[j],score1);
					SetCommonDataEx(NsScore,NsHiScoreReimuANormal2[j],score2);
					break;
				}
				if(score2 == Hiscore2[j] && score1 >= Hiscore[j])
				{
					ascent(let i in j+1..10)
					{
						SetCommonDataEx(NsScore,NsHiScoreReimuANormal[i],Hiscore[i-1]);
						SetCommonDataEx(NsScore,NsHiScoreReimuANormal2[i],Hiscore2[i-1]);
					}
					SetCommonDataEx(NsScore,NsHiScoreReimuANormal[j],score1);
					SetCommonDataEx(NsScore,NsHiScoreReimuANormal2[j],score2);
					break;
				}
			}
		}

		if(SelectedCharacter==DefinedPlayer2)
		{
			ascent(let j in 0..10)
			{
				if(score2 > Hiscore2[j])
				{
					ascent(let i in j+1..10)
					{
						SetCommonDataEx(NsScore,NsHiScoreReimuBNormal[i],Hiscore[i-1]);
						SetCommonDataEx(NsScore,NsHiScoreReimuBNormal2[i],Hiscore2[i-1]);
					}
					SetCommonDataEx(NsScore,NsHiScoreReimuBNormal[j],score1);
					SetCommonDataEx(NsScore,NsHiScoreReimuBNormal2[j],score2);
					break;
				}
				if(score2 == Hiscore2[j] && score1 >= Hiscore[j])
				{
					ascent(let i in j+1..10)
					{
						SetCommonDataEx(NsScore,NsHiScoreReimuBNormal[i],Hiscore[i-1]);
						SetCommonDataEx(NsScore,NsHiScoreReimuBNormal2[i],Hiscore2[i-1]);
					}
					SetCommonDataEx(NsScore,NsHiScoreReimuBNormal[j],score1);
					SetCommonDataEx(NsScore,NsHiScoreReimuBNormal2[j],score2);
					break;
				}
			}
		}
		if(SelectedCharacter==DefinedPlayer3)
		{
			ascent(let j in 0..10)
			{
				if(score2 > Hiscore2[j])
				{
					ascent(let i in j+1..10)
					{
						SetCommonDataEx(NsScore,NsHiScoreReimuCNormal[i],Hiscore[i-1]);
						SetCommonDataEx(NsScore,NsHiScoreReimuCNormal2[i],Hiscore2[i-1]);
					}
					SetCommonDataEx(NsScore,NsHiScoreReimuCNormal[j],score1);
					SetCommonDataEx(NsScore,NsHiScoreReimuCNormal2[j],score2);
					break;
				}
				if(score2 == Hiscore2[j] && score1 >= Hiscore[j])
				{
					ascent(let i in j+1..10)
					{
						SetCommonDataEx(NsScore,NsHiScoreReimuCNormal[i],Hiscore[i-1]);
						SetCommonDataEx(NsScore,NsHiScoreReimuCNormal2[i],Hiscore2[i-1]);
					}
					SetCommonDataEx(NsScore,NsHiScoreReimuCNormal[j],score1);
					SetCommonDataEx(NsScore,NsHiScoreReimuCNormal2[j],score2);
					break;
				}
			}
		}
		if(SelectedCharacter==DefinedPlayer4)
		{
			ascent(let j in 0..10)
			{
				if(score2 > Hiscore2[j])
				{
					ascent(let i in j+1..10)
					{
						SetCommonDataEx(NsScore,NsHiScoreReimuDNormal[i],Hiscore[i-1]);
						SetCommonDataEx(NsScore,NsHiScoreReimuDNormal2[i],Hiscore2[i-1]);
					}
					SetCommonDataEx(NsScore,NsHiScoreReimuDNormal[j],score1);
					SetCommonDataEx(NsScore,NsHiScoreReimuDNormal2[j],score2);
					break;
				}
				if(score2 == Hiscore2[j] && score1 >= Hiscore[j])
				{
					ascent(let i in j+1..10)
					{
						SetCommonDataEx(NsScore,NsHiScoreReimuDNormal[i],Hiscore[i-1]);
						SetCommonDataEx(NsScore,NsHiScoreReimuDNormal2[i],Hiscore2[i-1]);
					}
					SetCommonDataEx(NsScore,NsHiScoreReimuDNormal[j],score1);
					SetCommonDataEx(NsScore,NsHiScoreReimuDNormal2[j],score2);
					break;
				}
			}
		}
	}

	if(SelectedDifficult=="Apocalypse")
	{
		if(SelectedCharacter==DefinedPlayer1)
		{
			ascent(let j in 0..10)
			{
				if(score2 > Hiscore2[j])
				{
					ascent(let i in j+1..10)
					{
						SetCommonDataEx(NsScore,NsHiScoreReimuAHard[i],Hiscore[i-1]);
						SetCommonDataEx(NsScore,NsHiScoreReimuAHard2[i],Hiscore2[i-1]);
					}
					SetCommonDataEx(NsScore,NsHiScoreReimuAHard[j],score1);
					SetCommonDataEx(NsScore,NsHiScoreReimuAHard2[j],score2);
					break;
				}
				if(score2 == Hiscore2[j] && score1 >= Hiscore[j])
				{
					ascent(let i in j+1..10)
					{
						SetCommonDataEx(NsScore,NsHiScoreReimuAHard[i],Hiscore[i-1]);
						SetCommonDataEx(NsScore,NsHiScoreReimuAHard2[i],Hiscore2[i-1]);
					}
					SetCommonDataEx(NsScore,NsHiScoreReimuAHard[j],score1);
					SetCommonDataEx(NsScore,NsHiScoreReimuAHard2[j],score2);
					break;
				}
			}
		}

		if(SelectedCharacter==DefinedPlayer2)
		{
			ascent(let j in 0..10)
			{
				if(score2 > Hiscore2[j])
				{
					ascent(let i in j+1..10)
					{
						SetCommonDataEx(NsScore,NsHiScoreReimuBHard[i],Hiscore[i-1]);
						SetCommonDataEx(NsScore,NsHiScoreReimuBHard2[i],Hiscore2[i-1]);
					}
					SetCommonDataEx(NsScore,NsHiScoreReimuBHard[j],score1);
					SetCommonDataEx(NsScore,NsHiScoreReimuBHard2[j],score2);
					break;
				}
				if(score2 == Hiscore2[j] && score1 >= Hiscore[j])
				{
					ascent(let i in j+1..10)
					{
						SetCommonDataEx(NsScore,NsHiScoreReimuBHard[i],Hiscore[i-1]);
						SetCommonDataEx(NsScore,NsHiScoreReimuBHard2[i],Hiscore2[i-1]);
					}
					SetCommonDataEx(NsScore,NsHiScoreReimuBHard[j],score1);
					SetCommonDataEx(NsScore,NsHiScoreReimuBHard2[j],score2);
					break;
				}
			}
		}
		if(SelectedCharacter==DefinedPlayer3)
		{
			ascent(let j in 0..10)
			{
				if(score2 > Hiscore2[j])
				{
					ascent(let i in j+1..10)
					{
						SetCommonDataEx(NsScore,NsHiScoreReimuCHard[i],Hiscore[i-1]);
						SetCommonDataEx(NsScore,NsHiScoreReimuCHard2[i],Hiscore2[i-1]);
					}
					SetCommonDataEx(NsScore,NsHiScoreReimuCHard[j],score1);
					SetCommonDataEx(NsScore,NsHiScoreReimuCHard2[j],score2);
					break;
				}
				if(score2 == Hiscore2[j] && score1 >= Hiscore[j])
				{
					ascent(let i in j+1..10)
					{
						SetCommonDataEx(NsScore,NsHiScoreReimuCHard[i],Hiscore[i-1]);
						SetCommonDataEx(NsScore,NsHiScoreReimuCHard2[i],Hiscore2[i-1]);
					}
					SetCommonDataEx(NsScore,NsHiScoreReimuCHard[j],score1);
					SetCommonDataEx(NsScore,NsHiScoreReimuCHard2[j],score2);
					break;
				}
			}
		}
		if(SelectedCharacter==DefinedPlayer4)
		{
			ascent(let j in 0..10)
			{
				if(score2 > Hiscore2[j])
				{
					ascent(let i in j+1..10)
					{
						SetCommonDataEx(NsScore,NsHiScoreReimuDHard[i],Hiscore[i-1]);
						SetCommonDataEx(NsScore,NsHiScoreReimuDHard2[i],Hiscore2[i-1]);
					}
					SetCommonDataEx(NsScore,NsHiScoreReimuDHard[j],score1);
					SetCommonDataEx(NsScore,NsHiScoreReimuDHard2[j],score2);
					break;
				}
				if(score2 == Hiscore2[j] && score1 >= Hiscore[j])
				{
					ascent(let i in j+1..10)
					{
						SetCommonDataEx(NsScore,NsHiScoreReimuDHard[i],Hiscore[i-1]);
						SetCommonDataEx(NsScore,NsHiScoreReimuDHard2[i],Hiscore2[i-1]);
					}
					SetCommonDataEx(NsScore,NsHiScoreReimuDHard[j],score1);
					SetCommonDataEx(NsScore,NsHiScoreReimuDHard2[j],score2);
					break;
				}
			}
		}
	}

}