Get every answer in Blooket correct!
// ==UserScript==
// @name Blooket Winner
// @namespace http://tampermonkey.net/
// @namespace https://violentmonkey.github.io
// @namespace https://www.greasespot.net
// @version 37.0
// @description Get every answer in Blooket correct!
// @author Thundercatcher
// @license All Rights Reserved
// @match https://*.blooket.com/*
// @match https://play.blooket.com/play*
// @match https://goldquest.blooket.com/*
// @match https://monsterbrawl.blooket.com/*
// @match https://cryptohack.blooket.com/*
// @match https://fishingfrenzy.blooket.com/*
// @match https://deceptivedinos.blooket.com/*
// @match https://blookrush.blooket.com/*
// @match https://battleroyale.blooket.com/*
// @match https://towerdefense.blooket.com/*
// @match https://cafe.blooket.com/*
// @match https://factory.blooket.com/*
// @match https://racing.blooket.com/*
// @match https://crazykingdom.blooket.com/*
// @match https://towerofdoom.blooket.com/*
// @match https://classic.blooket.com/*
// @match https://towerdefense2.blooket.com/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// @license All Rights Reserved
// ==/UserScript==
(function() {
/**
* Ultra-fast / Human / Full Human Auto-Answer with HUD
*/
let hackHidden = false;
let lastTime = performance.now();
let loopMS = 0;
const modes = ["OFF", "FAST", "HUMAN", "FULL HUMAN"];
const humanMS = 250;
const fullHumanMS = 3000;
let currentModeIndex = 1; // start with FAST
(() => {
// ===== Hack Toggle Functions =====
const toggleMode = () => {
currentModeIndex = (currentModeIndex + 1) % modes.length;
updateSwitchButton();
};
const toggleHackVisibility = () => {
hackHidden = !hackHidden;
const elements = document.querySelectorAll('[class*="answerContainer"], [class*="feedback"], [class*="typingAnswerWrapper"]');
elements.forEach(el => el.style.display = hackHidden ? 'none' : 'block');
console.log(`Hack is ${hackHidden ? 'hidden' : 'visible'}`);
};
const hideButtons = () => {
buttonToggleHack.style.display = 'none';
buttonToggleVisibility.style.display = 'none';
};
const updateSwitchButton = () => {
const mode = modes[currentModeIndex];
switchButton.textContent = mode;
switch (mode) {
case "OFF":
switchButton.style.backgroundColor = "#888";
activeIndicator.style.opacity = 0.3;
break;
case "FAST":
switchButton.style.backgroundColor = "#4CAF50";
activeIndicator.style.opacity = 1;
break;
case "HUMAN":
switchButton.style.backgroundColor = "#FFA500";
activeIndicator.style.opacity = 1;
break;
case "FULL HUMAN":
switchButton.style.backgroundColor = "#FF4500";
activeIndicator.style.opacity = 1;
break;
}
};
// ===== Auto Answer Function =====
const autoAnswer = async () => {
const mode = modes[currentModeIndex];
if (mode === "OFF") return;
const { stateNode: { state: { question, stage, feedback }, props: { client: { question: pquestion } } } } = Object.values((function react(r = document.querySelector("body>div")) { return Object.values(r)[1]?.children?.[0]?._owner.stateNode ? r : react(r.querySelector(":scope>div")) })())[1].children[0]._owner;
try {
if (question.qType !== "typing") {
if (stage !== "feedback" && !feedback) {
[...document.querySelectorAll(`[class*="answerContainer"]`)][(question || pquestion).answers.map((x, i) => (question || pquestion).correctAnswers.includes(x) ? i : null).filter(x => x != null)[0]]?.click?.();
} else {
document.querySelector('[class*="feedback"]')?.firstChild?.click?.();
}
} else {
Object.values(document.querySelector("[class*='typingAnswerWrapper']"))[1].children._owner.stateNode.sendAnswer(question.answers[0]);
}
const nextQuestion = document.querySelector('[class*="questionContainer"]');
if (nextQuestion) nextQuestion.click();
} catch { }
};
// ===== Original Buttons =====
const buttonToggleHack = document.createElement('button');
buttonToggleHack.textContent = 'Toggle Hack (`)';
buttonToggleHack.style.position = 'fixed';
buttonToggleHack.style.top = '10px';
buttonToggleHack.style.left = '10px';
buttonToggleHack.style.padding = '10px 20px';
buttonToggleHack.style.fontSize = '16px';
buttonToggleHack.style.backgroundColor = '#4CAF50';
buttonToggleHack.style.color = 'white';
buttonToggleHack.style.border = 'none';
buttonToggleHack.style.borderRadius = '4px';
buttonToggleHack.style.cursor = 'pointer';
buttonToggleHack.addEventListener('click', toggleMode);
buttonToggleHack.style.display = 'none';
document.body.appendChild(buttonToggleHack);
const buttonToggleVisibility = document.createElement('button');
buttonToggleVisibility.textContent = 'Toggle Visibility (press \\)';
buttonToggleVisibility.style.position = 'fixed';
buttonToggleVisibility.style.top = '70px';
buttonToggleVisibility.style.left = '10px';
buttonToggleVisibility.style.padding = '10px 20px';
buttonToggleVisibility.style.fontSize = '16px';
buttonToggleVisibility.style.backgroundColor = '#4CAF50';
buttonToggleVisibility.style.color = 'white';
buttonToggleVisibility.style.border = 'none';
buttonToggleVisibility.style.borderRadius = '4px';
buttonToggleVisibility.style.cursor = 'pointer';
buttonToggleVisibility.style.display = 'none';
buttonToggleVisibility.addEventListener('click', toggleHackVisibility);
document.body.appendChild(buttonToggleVisibility);
// ===== Key Listener =====
document.addEventListener('keydown', event => {
if (event.key === '`') {
toggleMode();
buttonToggleHack.style.display = 'block';
} else if (event.key === '\'') {
toggleHackVisibility();
} else if (event.keyCode === 220) {
hideButtons();
}
});
// ===== HUD =====
const hudContainer = document.createElement('div');
hudContainer.style.position = 'fixed';
hudContainer.style.bottom = '5px';
hudContainer.style.right = '10px';
hudContainer.style.display = 'flex';
hudContainer.style.flexDirection = 'column';
hudContainer.style.alignItems = 'center';
hudContainer.style.fontFamily = 'monospace';
hudContainer.style.zIndex = 9999;
document.body.appendChild(hudContainer);
// Switch Button
const switchButton = document.createElement('button');
switchButton.style.width = '60px';
switchButton.style.height = '20px';
switchButton.style.fontSize = '12px';
switchButton.style.marginBottom = '2px';
switchButton.style.border = 'none';
switchButton.style.borderRadius = '4px';
switchButton.style.cursor = 'pointer';
switchButton.addEventListener('click', toggleMode);
hudContainer.appendChild(switchButton);
// Active badge
const activeIndicator = document.createElement('div');
activeIndicator.textContent = 'Active';
activeIndicator.style.width = '50px';
activeIndicator.style.textAlign = 'center';
activeIndicator.style.fontSize = '12px';
activeIndicator.style.padding = '2px 0';
activeIndicator.style.borderRadius = '4px';
activeIndicator.style.backgroundColor = 'rgba(0,200,0,0.8)';
activeIndicator.style.color = 'white';
activeIndicator.style.marginBottom = '2px';
hudContainer.appendChild(activeIndicator);
// Live ms counter
const msCounter = document.createElement('div');
msCounter.textContent = '0 ms';
msCounter.style.fontSize = '12px';
msCounter.style.color = 'white';
msCounter.style.backgroundColor = 'rgba(0,0,0,0.5)';
msCounter.style.padding = '2px 4px';
msCounter.style.borderRadius = '4px';
hudContainer.appendChild(msCounter);
updateSwitchButton();
// ===== Loop =====
let flashToggle = false;
let humanTimer = null;
const loop = () => {
const now = performance.now();
loopMS = now - lastTime;
lastTime = now;
const mode = modes[currentModeIndex];
if (mode === "OFF") {
// do nothing
} else if (mode === "FAST") {
autoAnswer();
} else if (mode === "HUMAN") {
if (!humanTimer) humanTimer = setTimeout(async () => { await autoAnswer(); humanTimer = null; }, humanMS);
} else if (mode === "FULL HUMAN") {
if (!humanTimer) humanTimer = setTimeout(async () => { await autoAnswer(); humanTimer = null; }, fullHumanMS);
}
// Flash active indicator only if not OFF
flashToggle = !flashToggle;
activeIndicator.style.backgroundColor = (mode === "OFF") ? 'rgba(100,100,100,0.3)' : (flashToggle ? 'rgba(0,200,0,0.8)' : 'rgba(0,255,0,0.5)');
// Update ms counter
if (mode === "OFF") msCounter.textContent = "0 ms";
else if (mode === "FAST") msCounter.textContent = `${loopMS.toFixed(2)} ms`;
else if (mode === "HUMAN") msCounter.textContent = `${humanMS} ms`;
else if (mode === "FULL HUMAN") msCounter.textContent = `${fullHumanMS} ms`;
requestAnimationFrame(loop);
};
loop();
})();
})();