Autokahoot

Automatically move through kahoots - with more power and ease

As of 2021-02-14. See the latest version.

// ==UserScript==
// @name         Autokahoot
// @version      1.2
// @description  Automatically move through kahoots - with more power and ease
// @author       codingMASTER398
// @match        https://play.kahoot.it/v2/*
// @run-at       document-start
// @grant      none
// @namespace https://greasyfork.org/users/682906
// ==/UserScript==
window.antibotAdditionalScripts = window.antibotAdditionalScripts || [];
console.log("Pushing to antibot")
window.antibotAdditionalScripts.push(()=>{
    console.log("[AUTOKAHOOT] running")

    //ALL OF THE WINDOWS
    //jk use linux
    window.toInsert = document.createElement("div");
    window.toInsert.innerHTML = "Autokahoot";
    window.toInsert.style.color = 'white'
    window.toInsert.style.position = "absolute";
    window.toInsert.style.bottom = "0px";
    window.toInsert.style.textAlign = "left";
    window.toInsert.style.width = "100%";
    document.body.appendChild(window.toInsert);

    window.toInsertb = document.createElement("div");
    window.toInsertb.innerHTML = "codingMASTER398";
    window.toInsertb.style.color = 'white'
    window.toInsertb.style.position = "absolute";
    window.toInsertb.style.bottom = "0px";
    window.toInsertb.style.textAlign = "right";
    window.toInsertb.style.width = "100%";
    document.body.appendChild(window.toInsertb);

    icount=true
    setInterval(function() {
        if(document.getElementsByClassName('guhfFk')[0]){
            document.getElementsByClassName('guhfFk')[0].click();
        }
        if(icount==true){
            if(document.getElementsByClassName('flat-button__FlatButton-sc-6uljam-0')[0]){
                if(document.getElementsByClassName('flat-button__FlatButton-sc-6uljam-0')[0].disabled){}else{
                    icount = false
                    counts=16
                    countdown = setInterval(function(){
                        counts--
                        document.getElementsByClassName('flat-button__FlatButton-sc-6uljam-0')[0].innerText = "Start-"+counts
                        if(counts==0 || counts < 0){
                            if(counts < -5){
                                clearTimeout(countdown);
                                icount=true
                                document.getElementsByClassName('flat-button__FlatButton-sc-6uljam-0')[0].innerText = "Start"
                            }else{
                                clearTimeout(countdown);
                                icount=true
                                document.getElementsByClassName('flat-button__FlatButton-sc-6uljam-0')[0].innerText = "Start"
                                document.getElementsByClassName('flat-button__FlatButton-sc-6uljam-0')[0].click();
                            }
                        }
                    }, 1000);
                }
            }
        }
    },1000)
    setInterval(function() {
        if(document.getElementsByClassName('iJqmEC')[0]){
            document.getElementsByClassName('iJqmEC')[0].click();
        }
        if(document.getElementsByClassName('kFPtaw')[0]){
            if(document.getElementsByClassName('kFPtaw')[0].innerHTML=='Next'){
                document.getElementsByClassName('kFPtaw')[0].click();
            }
        }
        if(document.getElementsByClassName('kFPtaw')[0]){
            if(document.getElementsByClassName('kFPtaw')[0].innerText=="Play next" || document.getElementsByClassName('kFPtaw')[0].innerText=="Play again")
            document.getElementsByClassName('kFPtaw')[0].click();
        }
    },5000)

    function waitforendportal() {
        a = setInterval(() => {
            if(document.getElementsByClassName('cRHjov')[0]){
                clearInterval(a)
                setTimeout(() => {
                    console.log("Clicking")
                    document.getElementsByClassName('cRHjov')[0].click();
                    waitforendportal();
                }, 30000);
            }
        }, 3000);
    }
    waitforendportal();
});