Auto quizzez AI bot 10ms delay [auto retry untill 100% awnser saver]

this bot saves all right question and rembers the Q&A for later Q&A's are now stored;so it does not have to learn the same quiz again

As of 2020-10-07. See the latest version.

// ==UserScript==
// @name         Auto quizzez AI bot 10ms delay [auto retry untill 100% awnser saver]
// @namespace    http://tampermonkey.net/
// @version      0.6
// @description  this bot saves all right question and rembers the Q&A for later Q&A's are now stored;so it does not have to learn the same quiz again
// @author       You
// @match        *://quizizz.com/*
// @grant        none
// ==/UserScript==
document.onkeypress=function(e){
    if(e.code=='Semicolon'){
        go=!go;
        console.log(go);
    }
}
var go
get=function(e,v=undefined){return v==undefined?localStorage.getItem(e):localStorage.setItem(e,v);};
function setStreak(){streak=document.getElementsByClassName('current-streak')[0].innerText*1;return streak};
var streak,oldst,redeem,power,text,option,question,choose=[],t2,t3,qtext,atext
function testA(){
option.click();}
function chooseA(){
    choose=document.getElementsByClassName('option-inner');
    question=document.getElementsByClassName('resizeable question-text-color');
    if(choose.length){
        option=choose[Math.floor(Math.random()*choose.length)]
}
try{qtext=question[0].innerText
atext=option.innerText}catch(err){};
}
function powerup(){
    power=document.getElementsByClassName('powerup-icon control-center-btn')
    if(power){
        for(let u=0;u<power.length;u++){
            power[u].click();
            console.log('click on power up');
        }
        setTimeout(function(){
            for(let i=0;i<document.getElementsByClassName('apply-powerup-button').length;i++){
                document.getElementsByClassName('apply-powerup-button')[i].click();
                console.log('activating power up');
            }
        },200)
    };
}
function next(){
    if(document.getElementsByClassName('go-right-icon-wrapper').length>0){
        document.getElementsByClassName('go-right-icon-wrapper')[0].click();
    }
}
function checkst(){setStreak();if(streak>oldst){save(),console.log('save')};oldst=streak}
function findsave(){
chooseA();
var found=false;
for(let i=0;i<choose.length;i++){
choose[i].innerText==get(qtext)&&(atext=choose[i].inenrText,choose[i].click(),found=true)
}
return found
}
function save(){get(qtext,atext);console.log('saved',qtext,'with',atext)}
function redeemQ(){
    redeem=document.getElementsByClassName('gradient-container');
    if(redeem.length){redeem[Math.floor(Math.random()*redeem.length)].click()};
}
function again(){
    if(document.getElementsByClassName('container incorrect-container').length>0){
        if(document.getElementsByClassName('container incorrect-container')[0].children.length>1){
            if(document.getElementsByClassName('container incorrect-container')[0].children[1].innerText*1){
                document.getElementsByClassName('primary-action-btn')[0].click();
            }
        }
    }
}
function skip(){
try{document.getElementsByClassName('right-navigator')[0].click()}catch(err){answer();}
}
function answer(){
!findsave()&&(testA(),setTimeout(checkst,5))
}
setInterval(skip,0);
var oldt='';
setInterval(e=>{
    chooseA();
    if(qtext!=oldt&&go){
        again();
        redeemQ();
        powerup();
        answer();
    }
    oldt=qtext
},10)