I have removed that code for the time being and replaced it with a lot of if statements. And I won't have access to my code until tomorow. but basically I have this code
powerUpRandom = Math.round(Math.random() * 5) //Get's powerup
powerUp = powerupArray[powerUpRandom]
if (globals. + powerUp + ThisRound < globals.max + powerUp + ThisRound)
That does not work but it's the only way I can think of doing it.
I'm pretty sure it's totally wrong.