Could it be because this is running in a parallel event? Here's my actual, unedited code.
var song = "Z";
var songIndex = 0;
do{
if(Input.keyTriggered("M")){
if(Input.keyPressed("B")){ song +="F"; $gameVariables.setValue(15, song); songIndex++;}
else if(Input.keyPressed("V")){ song +="E"; $gameVariables.setValue(15, song); songIndex++;}
else if(Input.keyPressed("C")){ song +="D"; $gameVariables.setValue(15, song); songIndex++;}
else if(Input.keyPressed("X")){ song +="C"; $gameVariables.setValue(15, song); songIndex++;}
else if(Input.keyPressed("Z")){ song +="B"; $gameVariables.setValue(15, song); songIndex++;}
else{song +="A"; $gameVariables.setValue(15, song); songIndex++;}
}
if(Input.keyTriggered("K")){
if(Input.keyPressed("G")){ song +="L"; $gameVariables.setValue(15, song); songIndex++;}
else if(Input.keyPressed("F")){ song +="K"; $gameVariables.setValue(15, song); songIndex++;}
else if(Input.keyPressed("D")){ song +="J"; $gameVariables.setValue(15, song); songIndex++;}
else if(Input.keyPressed("S")){ song +="I"; $gameVariables.setValue(15, song); songIndex++;}
else if(Input.keyPressed("A")){ song +="H"; $gameVariables.setValue(15, song); songIndex++;}
else{song +="G"; $gameVariables.setValue(15, song); songIndex++;}
}
}
while(songIndex < 10);