Auto quizzez AI bot [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

// ==UserScript==
// @name         Auto quizzez AI bot [auto retry untill 100% awnser saver]
// @namespace    http://tampermonkey.net/
// @version      0.2
// @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==
var go=true
var t2,t3=false
var choose=[];
document.onkeypress=function(e){
    if(e.code=='Semicolon'){
        go=!go;
        console.log(go);
    }
}
var choos=document.getElementsByClassName('option-inner');
choos.forEach=[].forEach;
choos.forEach(e=>{
    choose.push(e);
});
var ft=true
function save(item,val){localStorage.setItem(item,val)};
function get(item){return localStorage.getItem(item)};
this.save=function save(item,val){localStorage.setItem(item,val)};
this.get=function get(item){return localStorage.getItem(item)};
choose.push(document.getElementsByClassName('submit-button'))
var redeem
var streak=document.getElementsByClassName('current-streak');
var old=0;
var power=document.getElementsByClassName('powerup-icon control-center-btn')
var text;
var option=choose[Math.floor(Math.random()*choose.length)];
var question=document.getElementsByClassName('resizeable question-text-color');
if(streak.length){old=streak[0].innerText*1}

if(question.length>0){
    text=question[0].innerText;
}
var r=setInterval(function(){if(go){
    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)};
    redeem=document.getElementsByClassName('gradient-container');
    if(redeem.length){redeem[Math.floor(Math.random()*redeem.length)].click()};
    if(document.getElementsByClassName('go-right-icon-wrapper').length>0){
        document.getElementsByClassName('go-right-icon-wrapper')[0].click();
    }
    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();
            }
        }
    }
    streak=document.getElementsByClassName('current-streak');
    choose=document.getElementsByClassName('option-inner');
    if(choose.length){
        option=choose[Math.floor(Math.random()*choose.length)]}
    if(question.length>0){
        text=question[0].innerText.split(' ').join('_');
        t2=get(text);
        var to=localStorage.getItem(text)==null?function(){return false}:function(){
            var awnser=localStorage.getItem(text);
            console.log(awnser,text);
            document.getElementsByClassName('option-inner').forEach(e=>{if(awnser){if(e.innerText=awnser){e.click();console.log('found',1)}}});return true}
        if(t2){t3=true}else{t3=false}
        to();
    }
    setTimeout(function(){
        if(streak[0].innerText*1<old){old=0;}
        if(streak[0].innerText*1>old){
            save(text,option.innerText);
            old=streak[0].innerText*1;
            localStorage.setItem(text,option.innerText)
            console.log([[text,option.innerText],'saved at'+Date()]);
            document.title=[streak[0].innerText*1,old];
        }else{old=streak[0].innerText*1}

    },1800);
}},3000);