0% found this document useful (0 votes)
1K views7 pages

Quizizz Auto Answer Script Guide

The document contains code for a Quizizz bot that can automatically answer quiz questions. It checks the current question number, retrieves question data from the API, determines the question type, extracts the question text/image, and returns the answer(s). For multiple choice questions, it returns all possible answers separated by pipes. The code runs on a timer to continuously check for new questions and provide answers.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views7 pages

Quizizz Auto Answer Script Guide

The document contains code for a Quizizz bot that can automatically answer quiz questions. It checks the current question number, retrieves question data from the API, determines the question type, extracts the question text/image, and returns the answer(s). For multiple choice questions, it returns all possible answers separated by pipes. The code runs on a timer to continuously check for new questions and provide answers.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
  • JavaScript Snippet 1
  • JavaScript Snippet 2
  • JavaScript Snippet 3
  • JavaScript Snippet 4
  • JavaScript Snippet 5
  • JavaScript Snippet 6
  • JavaScript Snippet 7

if ([Link]("quizizz.

com/join/game/") == -1 &&
[Link]("gameType=") == -1) {
if ([Link]("[Link]/join/pre-game/") != -1) {
alert("You cannot execute this while paused. If you are not paused please
DM East_Arctica#9238 on discord!")
throw new Error("You cannot execute this while paused. If you think this is
an error please DM East_Arctica#9238 on discord!");
} else if ([Link]("[Link]/join/quiz/") != -1) {
alert("You need to start the game before running this script. If you think
this is an error please DM East_Arctica#9238 on discord!")
throw new Error("You need to start the game before running this script. If
you think this is an error please DM East_Arctica#9238 on discord!");
} else {
alert("You aren't on a quizizz quiz. If you think this is an error please
DM East_Arctica#9238 on discord!")
throw new Error("You aren't on a quizizz quiz. If you think this is an
error please DM East_Arctica#9238 on discord!");
}
}

if (typeof jQuery == 'undefined') {


let script = [Link]('script');
[Link] = '[Link]
[Link] = 'text/javascript';
[Link]('head')[0].appendChild(script);
}

let WaitTime = prompt("Please enter the number of seconds to wait before each
answer.")
if (Number(WaitTime) === NaN) {
alert("You did not enter a valid number. Reload and try again")
throw new Error("Invalid number");
} else {
WaitTime = Number(WaitTime) * 1000
}

[Link]('beforeend', `<style type="text/css">


correct-answer-x3Ca8B {
color: lime !important;
}
</style>`);

class Encoding {
static encodeRaw(t, e, o = "[Link]") {
let s = 0;
s = e ? [Link](0) : [Link](0) + [Link]([Link] - 1);
let r = [];
for (let o = 0; o < [Link]; o++) {
let n = t[o].charCodeAt(0)
, c = e ? [Link](n, s) : [Link](n, s, o, 2);
[Link]([Link](c))
}
return [Link]("")
}

static decode(t, e = !1) {


if (e) {
let e = [Link](t);
return [Link](e, !0)
}
{
let e = [Link]([Link](t), !0)
, o = [Link](t);
return [Link](o, !1, e)
}
}

static decodeRaw(t, e, o = "[Link]") {


let s = [Link](t);
let r = 0;
r = e ? [Link](0) : [Link](0) + [Link]([Link] - 1),
r = -r;
let n = [];
for (let o = 0; o < [Link]; o++) {
let c = t[o].charCodeAt(0)
, a = e ? [Link](c, r) : [Link](c, r, o, s);
[Link]([Link](a))
}
return [Link]("")
}

static addOffset(t, e, o, s) {
return 2 === s ? [Link](t) ? [Link](t, o % 2 == 0 ? e :
-e) : t : [Link](t, o % 2 == 0 ? e : -e)
}

static extractData(t) {
let e = [Link]([Link] - 2) - 33;
return [Link](e, -2)
}

static extractHeader(t) {
let e = [Link]([Link] - 2) - 33;
return [Link](0, e)
}

static extractVersion(t) {
if ("string" == typeof t && t[[Link] - 1]) {
let e = parseInt(t[[Link] - 1], 10);
if (!isNaN(e))
return e
}
return null
}

static safeAdd(t, e) {
let o = t + e;
return o > 65535 ? o - 65535 + 0 - 1 : o < 0 ? 65535 - (0 - o) + 1 : o
}

static verifyCharCode(t) {
if ("number" == typeof t)
return !(t >= 55296 && t <= 56319 || t >= 56320 && t <= 57343)
}
}

function GetSetData() {
let URL = [Link]
, GameType = [Link]([Link]("gameType=") + 9, [Link])
, prevConx = [Link]("previousContext")
, parsedConx = [Link](prevConx)
, encodedRoomHash = [Link]
, roomHash = [Link]([Link]("-")[1])
, data = {
roomHash: roomHash,
type: GameType
};

let xhttp = new XMLHttpRequest


[Link]("POST", "[Link] false)
[Link]("Content-Type", "application/json;charset=UTF-8");
[Link]([Link](data))
return [Link]([Link])
}

function GetAnswer(Question) {
switch ([Link]) {
case "BLANK":
// Text Response, we have no need for image detection in answers
let ToRespond = []
for (let i = 0; i < [Link]; i++) {
[Link]([Link][i].text)
}
return ToRespond;
case "MSQ":
// Multiple Choice
let Answers = [Link]([Link])
Answers = [Link](Answers)
let TextArray = []
for (let i = 0; i < [Link]; i++) {
if (Answers[i].text == "") {

[Link]([Link][Answers[i]].media[0].url)
} else {
[Link]([Link][Answers[i]].text)
}
}
return TextArray;
case "MCQ":
// Single Choice
let AnswerNum = [Link]([Link])
let Answer = [Link][AnswerNum].text
if (Answer == "") {
Answer = [Link][AnswerNum].media[0].url
}
return Answer;
}
}

function GetQuestion(Set) {
for (let v of [Link]([Link])) {
v = [Link][v]
switch (GetQuestionType()) {
case "Both":
let BothSRC = [Link]("question-media")
[0].children[0].src
BothSRC = [Link](0, [Link]("/?w=") - 1)
if ([Link][0]) {
if ([Link][0].url == BothSRC) {
let BothQuestion =
[Link]("question-text")
[0].children[0].children[0].innerHTML
if (Fix(BothQuestion) == Fix([Link])) {
return (v)
}
}
}
break
case "Media":
let CurrentSRC = [Link]("question-media")
[0].children[0].src
CurrentSRC = [Link](0, [Link]("/?w=") - 1)
if ([Link][0]) {
if ([Link][0].url == CurrentSRC) {
return (v)
}
}
break
case "Text":
let ToSearchA = [Link]("question-text")
[0].children[0].children[0].innerHTML
let ToSearchB = [Link]
ToSearchB = ToSearchB
ToSearchA = ToSearchA
if (Fix(ToSearchA) == Fix(ToSearchB)) {
return (v)
}
break
}
}
return "Error: No question found"
}

function GetQuestionType() {
if ([Link]("question-media")[0]) {
// Media was detected, check if text is too
if ([Link]("question-text")[0]) {
// Detected text aswell, send it to the onchanged
return ("Both")
} else {
// Failed to detect text aswell, Media is all that we need to send
return ("Media")
}
} else {
// Media wasn't detected, no need to check if text was because it has to be
return ("Text")
}
}

let CurrentQuestionNum = ""


let LastRedemption

function Fix(s) {
sEnd = [Link]("&nbsp;")
if (sEnd == [Link] - 6) {
s = [Link](0, sEnd)
}
s = [Link](/&nbsp;/g, " ")
s = [Link](/&#8203;/g, "‍
")
s = jQuery('<div>').html(String(s))[0].innerHTML
s = [Link](/\s+/g, ' ')
return s
}

function QuestionChangedLoop() {
setTimeout(function () {
let NewNum = [Link]("current-question")[0]
let RedemptionQues = [Link]("redemption-marker")
[0]
if (NewNum) {
if ([Link] != CurrentQuestionNum) {
setTimeout(function () {
if ([Link]("typed-option-input")[0]) {
let Question = GetQuestion(GetSetData())
if (Question == "Error: No question found") {
alert("Failed to find question!")
} else {
let Answer = GetAnswer(Question)
if ([Link](Answer)) {
// We are on a question with multiple answers
let ToShow = ""
for (let x = 0; x < [Link]; x++) {
if (ToShow == "") {
ToShow = Answer[x]
} else {
ToShow = ToShow + " | " + Answer[x]
}
}
let ToShowNew = "Press Ctrl+C to copy (Answers are
seperated by ' | ')"
prompt(ToShowNew, ToShow)
} else {
let NewAnswer = "Press Ctrl+C to copy."
prompt(NewAnswer, Answer);
}
}
} else {
let Choices = [Link]("options-
container")[0].children[0].children
let Question = GetQuestion(GetSetData())
if (Question === "Error: No question found") {
setTimeout(function() {
Question = GetQuestion(GetSetData())
}, 500)
}
if (Question === "Error: No question found") {
alert("Failed to find question!")
} else {
for (let i = 0; i < [Link]; i++) {
if (!Choices[i].[Link]("emoji")) {
let Choice =
Choices[i].children[0].children[0].children[0].children[0]
let Answer = GetAnswer(Question)
if ([Link](Answer)) {
// We are on a question with multiple
answers
for (let x = 0; x < [Link]; x++) {
if (Fix([Link]) == Answer[x])
{
setTimeout(function () {
[Link]()
}, WaitTime)
}
}
} else {
if (Fix([Link]) == Answer) {
setTimeout(function () {
[Link]()
}, WaitTime)
} else if
([Link](5, [Link] -
2).slice(0, [Link](5,
[Link] - 2).search("/?w=") - 1) ==
GetAnswer(GetQuestion(GetSetData()))) {
setTimeout(function () {
[Link]()
}, WaitTime)
}
}
}
}
}
}
}, 1000)
CurrentQuestionNum = [Link]
}
} else if (RedemptionQues) {
if (LastRedemption != GetQuestion(GetSetData())) {
let Choices = [Link]("options-container")
[0].children[0].children
for (let i = 0; i < [Link]; i++) {
if (!Choices[i].[Link]("emoji")) {
let Choice =
Choices[i].children[0].children[0].children[0].children[0]
if (Fix([Link]) ==
GetAnswer(GetQuestion(GetSetData()))) {
setTimeout(function () {
[Link]()
}, WaitTime)
}
}
}
LastRedemption = GetQuestion(GetSetData())
}
}
QuestionChangedLoop()
}, 100)
}

function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms))
}

async function wait() {


await sleep(1000);
QuestionChangedLoop();
}

wait()

if (window.location.href.search("quizizz.com/join/game/") == -1 && 
window.location.href.search("gameType=") == -1) {
    if
}
        {
            let e = this.decode(this.extractHeader(t), !0)
                , o = this.extractData(t);
, GameType = URL.slice(URL.search("gameType=") + 9, URL.length)
        , prevConx = localStorage.getItem("previousCo
if (v.structure.query.media[0]) {
                    if (v.structure.query.media[0].url == BothSRC) {
}
    s = s.replace(/&nbsp;/g, " ")
    s = s.replace(/&#8203;/g, "‍")
    s = jQuery('<div>').html(String(s))[0].innerHT
answers
                                        for (let x = 0; x < Answer.length; x++) {
    await sleep(1000);
    QuestionChangedLoop();
}
wait()

You might also like