function ExecuteScript(strId)
{
  switch (strId)
  {
      case "6IBiQVkY9zI":
        Script1();
        break;
      case "5sAxjwlhU0z":
        Script2();
        break;
      case "6Ovx9vKKTru":
        Script3();
        break;
      case "6EVrWlzr0gw":
        Script4();
        break;
      case "5rzgVMIzVn7":
        Script5();
        break;
      case "5nVIcPQWadA":
        Script6();
        break;
      case "5v5wvZ9tLeb":
        Script7();
        break;
      case "5XhvGRK8kFY":
        Script8();
        break;
      case "6aJ1CfQL0Ep":
        Script9();
        break;
      case "6PZ11QMqcKi":
        Script10();
        break;
      case "64xjkrHaU2l":
        Script11();
        break;
      case "5UmyIV1U12c":
        Script12();
        break;
      case "5p1sNQsx09G":
        Script13();
        break;
      case "6f2BOC6iuuH":
        Script14();
        break;
  }
}

function Script1()
{
  const correctAnswers =[
"Τοῦ ἀγγέλου",
"Τοῖς στρατηγοῖς",
"Τῶν κακῶν",
"Τῆς μουσικῆς",
"Τῷ καιρῷ",
"Τῷ Θεῷ",
"Τῆς μηχανῆς",
]


var player = GetPlayer();
let answers = [];
let correct = true;
let correctAnswerCount = 0;
for(let i = 1; i <= correctAnswers.length; i++)
{
    answers.push(player.GetVar(`TextEntry${i}`).trim());

    console.log(correctAnswers[i-1], answers[i-1]);
    if(correctAnswers[i-1] != answers[i-1])
       correct = false;
    else
       correctAnswerCount++;
}
    console.log(answers);
console.log(correct);
console.log(correctAnswerCount);
player.SetVar("correct", correct);
player.SetVar("percentage", Math.round((correctAnswerCount / correctAnswers.length) * 100));
}

function Script2()
{
  var player = GetPlayer();
player.SetVar("LastTextEntry", "TextEntry1");

}

function Script3()
{
  var player = GetPlayer();
player.SetVar("LastTextEntry", "TextEntry2");

}

function Script4()
{
  var player = GetPlayer();
player.SetVar("LastTextEntry", "TextEntry3");

}

function Script5()
{
  var player = GetPlayer();
player.SetVar("LastTextEntry", "TextEntry4");

}

function Script6()
{
  var player = GetPlayer();
player.SetVar("LastTextEntry", "TextEntry5");

}

function Script7()
{
  var player = GetPlayer();
const lastTextEntry = player.GetVar("LastTextEntry");
let content = player.GetVar(lastTextEntry);
player.SetVar(`${lastTextEntry}`, content + "ῶ");
}

function Script8()
{
  var player = GetPlayer();
const lastTextEntry = player.GetVar("LastTextEntry");
let content = player.GetVar(lastTextEntry);
player.SetVar(`${lastTextEntry}`, content + "ῖ");
}

function Script9()
{
  var player = GetPlayer();
const lastTextEntry = player.GetVar("LastTextEntry");
let content = player.GetVar(lastTextEntry);
player.SetVar(`${lastTextEntry}`, content+"ἀ");
}

function Script10()
{
  var player = GetPlayer();
player.SetVar("LastTextEntry", "TextEntry6");

}

function Script11()
{
  var player = GetPlayer();
player.SetVar("LastTextEntry", "TextEntry7");

}

function Script12()
{
  var player = GetPlayer();
const lastTextEntry = player.GetVar("LastTextEntry");
let content = player.GetVar(lastTextEntry);
player.SetVar(`${lastTextEntry}`, content + "ῆ");
}

function Script13()
{
  var player = GetPlayer();
const lastTextEntry = player.GetVar("LastTextEntry");
let content = player.GetVar(lastTextEntry);
player.SetVar(`${lastTextEntry}`, content + "ῦ");
}

function Script14()
{
  var player = GetPlayer();
const lastTextEntry = player.GetVar("LastTextEntry");
let content = player.GetVar(lastTextEntry);
player.SetVar(`${lastTextEntry}`, content + "ῷ");
}

