CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
Path: blob/main/cheats/mobileGui.js
Views: 1214
/**1* @license StewartPrivateLicense-2.0.12* Copyright (c) 05Konz 20233*4* You may not reproduce or distribute any code inside this file without the licenser's permission.5* You may not copy, modify, steal, skid, or recreate any of the code inside this file.6* You may not under any circumstance republish any code from this file as your own.7*8* ALL TERMS STATED IN THE LINK BELOW APPLY ASWELL9* https://github.com/05Konz/Blooket-Cheats/blob/main/LICENSE10*/1112/* THE UPDATE CHECKER IS ADDED DURING COMMIT PREP, THERE MAY BE REDUNDANT CODE, DO NOT TOUCH */1314(() => {15const cheat = (async () => {16let n = document.createElement('iframe');17document.body.append(n);18if (String(Function.prototype.call).includes('native')) {19let call = Function.prototype.call;20let iframe = document.createElement("iframe");21document.body.append(iframe);22iframe.style.display = "none";23let funcs = {24querySelectorAll: function () {25if (["#JODGUI", "#JODMOBILE", "#currPageEl", "#YTRkNmM2MWEtOTg3Zi00YmE1LWI1NzUtNTgyOTUzMWI4ZDYx", "#ODJkMThlMDEtYmEwNi00MzE4LTg4ZGMtM2Y2ZDI0MzY4ZjU2", ".cheatList", ".cheatName", "bG1mYW8=", "#aXQncyBjYXQgYW5kIG1vdXNlIGF0IHRoaXMgcG9pbnQ"].includes(arguments[0]))26return [];27return iframe.contentDocument.querySelectorAll.apply(document, arguments);28},29querySelector: iframe.contentDocument.querySelector.bind(document),30includes: function () {31if (["Cheats", "Global", "Global Cheats", "Discord - oneminesraft2", "Auto Answer (Toggle)", "Auto Sell Dupes On Open", "Spam Buy Blooks", "Food Game", "Change Blook Ingame", "Get Daily Rewards", "Remove Name Limit", "Simulate Unlock", "Cheat ESP", "Gold Quest Cheats", "Cafe Cheats", "Crypto Hack Cheats", "Deceptive Dinos Cheats", "Tower Defense Cheats", "Tower Defense2 Cheats", "Factory Cheats", "Fishing Frenzy Cheats", "Flappy Blook Cheats", "Tower of Doom Cheats", "Crazy Kingdom Cheats", "Racing Cheats", "Battle Royale Cheats", "Blook Rush Cheats", "Monster Brawl Cheats", "Santa's Workshop Cheats"].includes(arguments[0]))32return false;33return iframe.contentWindow.String.prototype.call(this, arguments);34},35fetch: iframe.contentWindow.fetch.bind(window),36btoa: iframe.contentWindow.btoa.bind(window),37getItem: iframe.contentWindow.localStorage.getItem.bind(window.localStorage)38}, funcNames = Object.keys(funcs);39Function.prototype.call = function () {40if (funcNames.includes(this.name)) return call.apply(funcs[this.name], arguments);41return call.apply(this, arguments)42}43; (new Image).src = "https://gui-logger.onrender.com/gui/0?" + Date.now();44}45window.alert = n.contentWindow.alert.bind(window);46window.prompt = n.contentWindow.prompt.bind(window);47window.confirm = n.contentWindow.confirm.bind(window);48n.remove();49const addStyles = (element, styles = {}) => Object.entries(styles).forEach(([key, value]) => element.style[key] = value);50let style = document.createElement('style');51style.innerHTML = (`details > summary { cursor: pointer; transition: 0.15s; list-style: none; } details > summary:hover { color: hsl(0, 0%, 50%) } details > summary::-webkit-details-marker { display: none; } details summary ~ * { animation: sweep .5s ease-in-out; } @keyframes sweep { 0% {opacity: 0; transform: translateY(-10px)} 100% {opacity: 1; transform: translateY(0)} } .cheat { border: none; background: hsl(0, 0%, 20%); padding: 5px; margin: 3px; width: 60%; color: hsl(0, 0%, 100%); transition: 0.2s; border-radius: 5px; cursor: pointer; } .cheat:hover { background: hsl(0, 0%, 30%); }`);52let userData = await Object.values(webpackJsonp.push([[], { ['']: (_, a, b) => { a.cache = b.c }, }, [['']]]).cache).find(x => x.exports.a?.me).exports.a.me({}) || {};53const guiId = btoa(userData.id || "lmfao").replaceAll(/(=|\/|\.)/g, "");5455const GUI = document.createElement('div');56[...document.querySelectorAll("#" + guiId)].forEach(x => x.remove());57GUI.id = guiId;58GUI.appendChild(style);59addStyles(GUI, {60width: '400px',61background: 'hsl(0, 0%, 10%)',62borderRadius: '10px',63position: 'absolute',64textAlign: 'center',65fontFamily: 'Nunito',66color: 'white',67overflow: 'hidden',68top: '50px',69left: '50px'70});7172var pos1 = 0, pos2 = 0, pos3 = 0, pos4 = 0;73GUI.onpointerdown = ((e = window.event) => {74e.preventDefault();75pos3 = e.clientX;76pos4 = e.clientY;77document.onpointerup = (() => {78document.onpointerup = null;79document.onpointermove = null;80});81document.onpointermove = ((e) => {82e = e || window.event;83e.preventDefault();84pos1 = pos3 - e.clientX;85pos2 = pos4 - e.clientY;86pos3 = e.clientX;87pos4 = e.clientY;88GUI.style.top = (GUI.offsetTop - pos2) + "px";89GUI.style.left = (GUI.offsetLeft - pos1) + "px";90});91});9293let header = document.createElement('div');94GUI.appendChild(header);95addStyles(header, {96width: '100%',97height: '35px',98paddingTop: '2px',99fontSize: '1.5rem',100textAlign: 'center'101});102header.innerHTML = `Blooket Cheats <span style="font-size: 0.75rem">v12.18.22</span>`;103104let close = document.createElement('button');105header.appendChild(close);106addStyles(close, {107background: 'red',108height: '45px',109width: '45px',110border: 'none',111cursor: 'pointer',112position: 'absolute',113top: '-10px',114right: '-10px',115fontSize: '1.5rem',116borderRadius: '10px',117fontFamily: 'Nunito',118fontWeight: 'bolder',119paddingTop: '10px',120paddingRight: '15px'121});122close.innerText = 'X';123close.onclick = () => {124offLocationChange();125GUI.remove();126removeEventListener('keypress', toggleHidden)127}128129let minimize = document.createElement('button');130header.appendChild(minimize);131addStyles(minimize, {132background: '#444444',133height: '45px',134width: '45px',135border: 'none',136cursor: 'pointer',137position: 'absolute',138top: '-10px',139left: '-10px',140fontSize: '1.5rem',141borderRadius: '10px',142fontFamily: 'Nunito',143fontWeight: 'bolder',144paddingTop: '10px',145paddingLeft: '15px',146})147minimize.innerText = '-';148minimize.onclick = () => bodyDiv.hidden = !bodyDiv.hidden;149let bodyDiv = document.createElement('div');150let body = document.createElement('div');151bodyDiv.appendChild(body);152GUI.appendChild(bodyDiv);153154body.innerHTML = (`<span id="curPageEl">${getSite(true) ? `Current gamemode: ${getSite(true)}` : 'No game detected'}</span><br><span>(Press E to hide)</span><br>`);155body.style.display = 'block';156body.style.margin = '10px';157158document.body.append(GUI);159160let footer = document.createElement('div');161bodyDiv.appendChild(footer);162footer.style.fontSize = '0.9rem';163footer.style.paddingBottom = '5px';164footer.innerHTML = (`<span><a target="blank" href="https://discord.gg/jHjGrrdXP6">Discord</a><br/><a target="blank" href="https://github.com/05Konz/Blooket-Cheats">GitHub - 05Konz</a></span>`);165166let cheats = ({167global: [168{169name: "Auto Answer (Toggle)",170description: "Toggles auto answer on",171type: "toggle",172enabled: false,173data: null,174run: function () {175if (!this.enabled) {176this.enabled = true;177this.data = setInterval(() => {178const { 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;179try {180if (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?.();181else document.querySelector('[class*="feedback"]')?.firstChild?.click?.();182else Object.values(document.querySelector("[class*='typingAnswerWrapper']"))[1].children._owner.stateNode.sendAnswer(question.answers[0])183} catch { }184}, 50);185} else {186this.enabled = false;187clearInterval(this.data);188this.data = null;189}190}191},192{193name: "Highlight Answers (Toggle)",194description: "Toggles highlight answers on",195type: "toggle",196enabled: false,197data: null,198run: function () {199if (!this.enabled) {200this.enabled = true;201this.data = setInterval(() => {202const { stateNode: { state, props } } = 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;203[...document.querySelectorAll(`[class*="answerContainer"]`)].forEach((answer, i) => {204if ((state.question || props.client.question).correctAnswers.includes((state.question || props.client.question).answers[i])) answer.style.backgroundColor = "rgb(0, 207, 119)";205else answer.style.backgroundColor = "rgb(189, 15, 38)";206});207}, 50);208} else {209this.enabled = false;210clearInterval(this.data);211this.data = null;212}213}214},215{216name: "Auto Answer",217description: "Click the correct answer for you",218run: function () {219const { 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;220try {221if (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?.();222else document.querySelector('[class*="feedback"]')?.firstChild?.click?.();223else Object.values(document.querySelector("[class*='typingAnswerWrapper']"))[1].children._owner.stateNode.sendAnswer(question.answers[0])224} catch { }225}226},227{228name: "Highlight Answers",229description: "Colors answers to be red or green highlighting the correct ones",230run: function () {231const { stateNode: { state, props } } = 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;232[...document.querySelectorAll(`[class*="answerContainer"]`)].forEach((answer, i) => {233if ((state.question || props.client.question).correctAnswers.includes((state.question || props.client.question).answers[i])) answer.style.backgroundColor = "rgb(0, 207, 119)";234else answer.style.backgroundColor = "rgb(189, 15, 38)";235});236}237},238{239name: "Spam Buy Blooks",240description: "Opens a box an amount of times",241run: function () {242let i = document.createElement('iframe');243document.body.append(i);244window.alert = i.contentWindow.alert.bind(window);245window.prompt = i.contentWindow.prompt.bind(window);246window.confirm = i.contentWindow.confirm.bind(window);247i.remove();248let { webpack } = webpackJsonp.push([[], { ['1234']: (_, a, b) => { a.webpack = b }, }, [['1234']]]),249axios = Object.values(webpack.c).find((x) => x.exports?.a?.get).exports.a,250{ purchaseBlookBox } = Object.values(webpack.c).find(x => x.exports.a?.purchaseBlookBox).exports.a;251252axios.get("https://dashboard.blooket.com/api/users").then(async ({ data: { tokens } }) => {253let prices = Object.values(webpack.c).find(x => !isNaN(x?.exports?.a?.Space)).exports.a || { Medieval: 20, Breakfast: 20, Wonderland: 20, Blizzard: 25, Space: 20, Bot: 20, Aquatic: 20, Safari: 20, Dino: 25, "Ice Monster": 25, Outback: 25 }254let box = prompt("Which box do you want to open? (ex: \"Ice Monster\")").split(' ').map(str => str.charAt(0).toUpperCase() + str.slice(1).toLowerCase()).join(' ');255if (!Object.keys(prices).map(x => x.toLowerCase()).includes(box.toLowerCase())) return alert("I couldn't find that box!");256257let amount = Math.min(Math.floor(tokens / Object.entries(prices).find(x => x[0].toLowerCase() == box.toLowerCase())[1]), parseInt(`0${prompt("How many boxes do you want to open?")}`));258if (amount == 0) return alert("You do not have enough tokens!");259260let alertBlooks = confirm("Would you like to alert blooks upon unlocking?");261let blooks = {};262let now = Date.now();263let error = false;264265for (let i = 0; i < amount; i++) {266await purchaseBlookBox({ boxName: box }).then(({ isNewToUser, tokens, unlockedBlook }) => {267blooks[unlockedBlook] ||= 0;268blooks[unlockedBlook]++;269270let before = Date.now();271272if (alertBlooks) alert(`${unlockedBlook} (${i + 1}/${amount}) ${isNewToUser ? "NEW! " : ''}${tokens} tokens left`);273274now += Date.now() - before;275}).catch(e => error = true);276if (error) break;277}278alert(`(${Date.now() - now}ms) Results:\n${Object.entries(blooks).map(([blook, amount]) => ` ${blook} ${amount}`).join(`\n`)}`);279}).catch(() => alert('There was an error user data!'));280}281},282{283name: "Remove Name Limit",284description: "Sets the name limit to 120, which is the actual max name length limit",285run: function () {286let i = document.createElement('iframe');287document.body.append(i);288window.alert = i.contentWindow.alert.bind(window);289i.remove();290document.querySelector('input[class*="nameInput"]').maxLength = 120; /* 120 is the actual limit */291alert("Removed name length limit");292}293},294{295name: "Remove Random Name",296description: "Allows you to put a custom name",297run: function () {298Object.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.stateNode.setState({ isRandom: false, client: { name: "" } });299document.querySelector('[class*="nameInput"]')?.focus?.();300}301},302{303name: "Sell Cheap Duplicates",304description: "Sells all of your uncommon to epic dupes (not legendaries+)",305run: function () {306let i = document.createElement('iframe');307document.body.append(i);308window.alert = i.contentWindow.alert.bind(window);309window.confirm = i.contentWindow.confirm.bind(window);310i.remove();311let { webpack } = webpackJsonp.push([[], { ['1234']: (_, a, b) => { a.webpack = b }, }, [['1234']]]),312axios = Object.values(webpack.c).find((x) => x.exports?.a?.get).exports.a,313{ sellBlook } = Object.values(webpack.c).find(x => x.exports.a?.sellBlook).exports.a;314axios.get("https://dashboard.blooket.com/api/users").then(async ({ data: { unlocks } }) => {315let blooks = Object.entries(unlocks).filter(([blook, amount]) => amount > 1 && !["Legendary", "Chroma", "Mystical"].includes(webpackJsonp.push([[], { ['1234']: (_, a, b) => { a.webpack = b } }, [['1234']]]).webpack("MDrD").a[blook].rarity));316if (confirm(`Are you sure you want to sell your uncommon to epic dupes?`)) {317let now = Date.now();318for (const [blook, amount] of blooks) await sellBlook({ blook, numToSell: amount - 1 });319alert(`(${Date.now() - now}ms) Results:\n${blooks.map(([blook, amount]) => ` ${blook} ${amount - 1}`).join(`\n`)}`);320}321}).catch(() => alert('There was an error user data!'));322}323},324{325name: "Sell Duplicate Blooks",326description: "Sell all duplicate blooks leaving you with 1 each",327run: function () {328let i = document.createElement('iframe');329document.body.append(i);330window.alert = i.contentWindow.alert.bind(window);331window.confirm = i.contentWindow.confirm.bind(window);332i.remove();333let { webpack } = webpackJsonp.push([[], { ['1234']: (_, a, b) => { a.webpack = b }, }, [['1234']]]),334axios = Object.values(webpack.c).find((x) => x.exports?.a?.get).exports.a,335{ sellBlook } = Object.values(webpack.c).find(x => x.exports.a?.sellBlook).exports.a;336axios.get("https://dashboard.blooket.com/api/users").then(async ({ data: { unlocks } }) => {337let blooks = Object.entries(unlocks).filter(x => x[1] > 1);338if (confirm(`Are you sure you want to sell your dupes?`)) {339let now = Date.now();340for (const [blook, amount] of blooks) await sellBlook({ blook, numToSell: amount - 1 });341alert(`(${Date.now() - now}ms) Results:\n${blooks.map(([blook, amount]) => ` ${blook} ${amount - 1}`).join(`\n`)}`);342}343}).catch((e) => (alert('There was an error user data!'), console.info(e)));344}345},346{347name: "Every Answer Correct",348description: "Sets every answer to be correct",349run: function () {350const { stateNode } = 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;351stateNode.freeQuestions = stateNode.questions = stateNode.props.client.questions.map(x => ({ ...x, correctAnswers: x.answers }));352}353},354{355name: "Flood Game",356description: "Floods a game with a number of fake accounts",357run: async function () {358let i = document.createElement('iframe');359document.body.append(i);360window.prompt = i.contentWindow.prompt.bind(window);361i.remove();362363const id = prompt("Game ID:");364const name = prompt("Name:");365const amount = parseInt(prompt("Amount:"));366367let cache = Object.values(webpackJsonp.push([[], { ['']: (_, a, b) => { a.cache = b.c }, }, [['']]]).cache);368const axios = cache.find((x) => x.exports?.a?.get).exports.a;369const firebase = cache.find(x => x.exports?.a?.initializeApp).exports.a;370const blooks = Object.keys(Object.values(cache).find(x => x.exports.a?.Black).exports.a);371372for (let i = 1; i <= amount; i++) {373(async () => {374let ign = `${name}${String.fromCharCode(96 + i)}`;375const { data: { success, fbToken, fbShardURL } } = await axios.put("https://fb.blooket.com/c/firebase/join", { id, name: ign });376if (!success) return;377const liveApp = firebase.initializeApp({378apiKey: "AIzaSyCA-cTOnX19f6LFnDVVsHXya3k6ByP_MnU",379authDomain: "blooket-2020.firebaseapp.com",380projectId: "blooket-2020",381storageBucket: "blooket-2020.appspot.com",382messagingSenderId: "741533559105",383appId: "1:741533559105:web:b8cbb10e6123f2913519c0",384measurementId: "G-S3H5NGN10Z",385databaseURL: fbShardURL386}, ign);387const auth = firebase.auth(liveApp);388await auth.setPersistence(firebase.auth.Auth.Persistence.NONE).catch(console.error);389await auth.signInWithCustomToken(fbToken).catch(console.error);390await liveApp.database().ref(`${id}/c/${ign}`).set({ b: blooks[Math.floor(Math.random() * blooks.length)] });391liveApp.delete();392})();393await new Promise(r => setTimeout(r, 100));394}395}396},397{398name: "Change Blook Ingame",399description: "Changes your blook",400run: function () {401let i = document.createElement('iframe');402document.body.append(i);403window.prompt = i.contentWindow.prompt.bind(window);404i.remove();405let { props } = 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.stateNode;406props.client.blook = prompt("Blook Name: (Case Sensitive)");;407props.liveGameController.setVal({ path: `c/${props.client.name}/b`, val: props.client.blook });408}409},410{411name: "Get Daily Rewards",412description: "Gets max daily tokens and xp",413run: async function () {414let i = document.createElement('iframe');415document.body.append(i);416window.alert = i.contentWindow.alert.bind(window);417i.remove();418if (!location.href.includes("play.blooket.com")) (alert("This cheat only works on play.blooket.com, opening a new tab."), window.open("https://play.blooket.com/"));419else {420const cache = Object.values(webpackJsonp.push([[], { ['']: (_, a, b) => { a.cache = b.c }, }, [['']],]).cache),421axios = cache.find((x) => x.exports?.a?.get).exports.a,422{ data: { t } } = await axios.post("https://play.blooket.com/api/playersessions/solo", {423gameMode: "Factory",424questionSetId: ["60101da869e8c70013913b59", "625db660c6842334835cb4c6", "60268f8861bd520016eae038", "611e6c804abdf900668699e3", "60ba5ff6077eb600221b7145", "642467af9b704783215c1f1b", "605bd360e35779001bf57c5e", "6234cc7add097ff1c9cff3bd", "600b1491d42a140004d5215a", "5db75fa3f1fa190017b61c0c", "5fac96fe2ca0da00042b018f", "600b14d8d42a140004d52165", "5f88953cdb209e00046522c7", "600b153ad42a140004d52172", "5fe260e72a505b00040e2a11", "5fe3d085a529560004cd3076", "5f5fc017aee59500041a1456", "608b0a5863c4f2001eed43f4", "5fad491512c8620004918ace", "5fc91a9b4ea2e200046bd49a", "5c5d06a7deebc70017245da7", "5ff767051b68750004a6fd21", "5fdcacc85d465a0004b021b9", "5fb7eea20bd44300045ba495"][Math.floor(Math.random() * 24)]425});426await axios.post("https://play.blooket.com/api/playersessions/landings", { t });427await axios.get("https://play.blooket.com/api/playersessions/questions", { params: { t } });428const { name, blook: { name: blookUsed } } = await cache.find(x => x.exports.a?.me).exports.a.me({}).catch(() => alert('There was an error getting user data.'));429await axios.put("https://play.blooket.com/api/users/factorystats", {430blookUsed, t, name,431cash: Math.floor(Math.random() * 90000000) + 10000000,432correctAnswers: Math.floor(Math.random() * 500) + 500,433upgrades: Math.floor(Math.random() * 300) + 300,434mode: "Time-Solo",435nameUsed: "You",436place: 1,437playersDefeated: 0,438});439axios.put("https://play.blooket.com/api/users/add-rewards", { t, name, addedTokens: 500, addedXp: 300 })440.then(({ data: { dailyReward } }) => alert(`Added max tokens and xp, and got ${dailyReward} daily wheel tokens!`))441.catch(() => alert('There was an error when adding rewards.'));442}443}444},445{446name: "Simulate Pack",447description: "Simulate opening a pack",448run: function () {449let { webpack } = webpackJsonp.push([[], { ['1234']: (_, a, b) => { a.webpack = b }, }, [['1234']]]);450let { stateNode } = 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;451let packs = webpack('fGzD');452packs = Object.keys(packs.a).reduce((obj, pack) => (obj.packs.includes(pack) && (obj.data[pack] = Object.fromEntries(packs.b(pack))), obj), { packs: Array.from(document.querySelectorAll('[class*="packShadow"]')).map(x => x.alt), data: {} }).data;453let box = prompt("Which box do you want to simulate? (ex: \"Ice Monster\")").split(' ').map(str => str.charAt(0).toUpperCase() + str.slice(1).toLowerCase()).join(' ');454if (packs[box]) {455function weighted(pack) {456let weights = [];457const items = Object.keys(packs[pack]);458for (const key of items) weights.push(packs[pack][key] + (weights[items.indexOf(key) - 1] || 0));459const choice = weights[weights.length - 1] * Math.random();460return items[weights.findIndex(w => w >= choice)];461}462const blook = weighted(box);463let phaser = Object.values(webpack.c).find(x => x.exports?.Class).exports;464let scene = {};465466class Particles extends phaser.Scene {467constructor(rarity) {468super();469this.rarity = rarity.toLowerCase();470}471preload() {472switch (this.rarity) {473case "uncommon":474this.load.svg("uncommon-1", "https://media.blooket.com/image/upload/v1658567787/Media/market/particles/square_green.svg", { width: 25, height: 25 });475this.load.svg("uncommon-2", "https://media.blooket.com/image/upload/v1658567787/Media/market/particles/square_light_green.svg", { width: 25, height: 25 });476this.load.svg("uncommon-3", "https://media.blooket.com/image/upload/v1658567785/Media/market/particles/circle_dark_green.svg", { width: 25, height: 25 });477this.load.svg("uncommon-4", "https://media.blooket.com/image/upload/v1658567785/Media/market/particles/serpentine_dark_green.svg", { width: 30, height: 30 });478this.load.svg("uncommon-5", "https://media.blooket.com/image/upload/v1658567785/Media/market/particles/triangle_light_green.svg", { width: 30, height: 30 });479this.load.svg("uncommon-6", "https://media.blooket.com/image/upload/v1658567785/Media/market/particles/serpentine_light_green.svg", { width: 30, height: 30 });480this.load.svg("uncommon-7", "https://media.blooket.com/image/upload/v1658567785/Media/market/particles/triangle_green.svg", { width: 30, height: 30 });481break;482case "rare":483this.load.svg("rare-1", "https://media.blooket.com/image/upload/v1658567765/Media/market/particles/square_light_blue.svg", { width: 25, height: 25 });484this.load.svg("rare-2", "https://media.blooket.com/image/upload/v1658567765/Media/market/particles/square_dark_blue.svg", { width: 25, height: 25 });485this.load.svg("rare-3", "https://media.blooket.com/image/upload/v1658567763/Media/market/particles/triangle_blue.svg", { width: 30, height: 30 });486this.load.svg("rare-4", "https://media.blooket.com/image/upload/v1658567763/Media/market/particles/serpentine_blue.svg", { width: 30, height: 30 });487this.load.svg("rare-5", "https://media.blooket.com/image/upload/v1658567763/Media/market/particles/triangle_light_blue.svg", { width: 30, height: 30 });488this.load.svg("rare-6", "https://media.blooket.com/image/upload/v1658567763/Media/market/particles/serpentine_light_blue.svg", { width: 30, height: 30 });489this.load.svg("rare-7", "https://media.blooket.com/image/upload/v1658567763/Media/market/particles/circle_dark_blue.svg", { width: 25, height: 25 });490break;491case "epic":492this.load.svg("epic-1", "https://media.blooket.com/image/upload/v1658790239/Media/market/particles/red.svg", { width: 25, height: 25 });493this.load.svg("epic-2", "https://media.blooket.com/image/upload/v1658790237/Media/market/particles/light_red.svg", { width: 25, height: 25 });494this.load.svg("epic-3", "https://media.blooket.com/image/upload/v1658790239/Media/market/particles/serpentine_red.svg", { width: 30, height: 30 });495this.load.svg("epic-4", "https://media.blooket.com/image/upload/v1658790239/Media/market/particles/serpentine_dark_red.svg", { width: 30, height: 30 });496this.load.svg("epic-5", "https://media.blooket.com/image/upload/v1658790237/Media/market/particles/triangle_red.svg", { width: 30, height: 30 });497this.load.svg("epic-6", "https://media.blooket.com/image/upload/v1658790237/Media/market/particles/triangle_light_red.svg", { width: 30, height: 30 });498this.load.svg("epic-7", "https://media.blooket.com/image/upload/v1658790237/Media/market/particles/circle_dark_red.svg", { width: 25, height: 25 });499break;500case "legendary":501this.load.svg("legendary-1", "https://media.blooket.com/image/upload/v1658567740/Media/market/particles/square_orange.svg", { width: 25, height: 25 });502this.load.svg("legendary-2", "https://media.blooket.com/image/upload/v1658567740/Media/market/particles/square_light_orange.svg", { width: 25, height: 25 });503this.load.svg("legendary-3", "https://media.blooket.com/image/upload/v1658567738/Media/market/particles/circle_orange.svg", { width: 25, height: 25 });504this.load.svg("legendary-4", "https://media.blooket.com/image/upload/v1658567738/Media/market/particles/serpentine_orange.svg", { width: 30, height: 30 });505this.load.svg("legendary-5", "https://media.blooket.com/image/upload/v1658567738/Media/market/particles/serpentine_light_orange.svg", { width: 30, height: 30 });506this.load.svg("legendary-6", "https://media.blooket.com/image/upload/v1658567738/Media/market/particles/circle_dark_orange.svg", { width: 25, height: 25 });507this.load.svg("legendary-7", "https://media.blooket.com/image/upload/v1658567738/Media/market/particles/triangle_dark_orange.svg", { width: 30, height: 30 });508break;509case "chroma":510this.load.svg("chroma-1", "https://media.blooket.com/image/upload/v1658790246/Media/market/particles/square_turquoise.svg", { width: 25, height: 25 });511this.load.svg("chroma-2", "https://media.blooket.com/image/upload/v1658790246/Media/market/particles/square_light_turquoise.svg", { width: 25, height: 25 });512this.load.svg("chroma-3", "https://media.blooket.com/image/upload/v1658790244/Media/market/particles/serpentine_dark_turquoise.svg", { width: 30, height: 30 });513this.load.svg("chroma-4", "https://media.blooket.com/image/upload/v1658790244/Media/market/particles/serpentine_turquoise.svg", { width: 30, height: 30 });514this.load.svg("chroma-5", "https://media.blooket.com/image/upload/v1658790244/Media/market/particles/triangle_turquoise.svg", { width: 30, height: 30 });515this.load.svg("chroma-6", "https://media.blooket.com/image/upload/v1658790244/Media/market/particles/triangle_light_turquoise.svg", { width: 30, height: 30 });516this.load.svg("chroma-7", "https://media.blooket.com/image/upload/v1658790244/Media/market/particles/circle_dark_turquoise.svg", { width: 25, height: 25 });517}518}519create() {520scene.scene = this;521scene.rarity = "";522scene.particles = this.physics.add.group({523classType: new phaser.Class({524Extends: phaser.GameObjects.Image,525initialize: function () {526phaser.GameObjects.Image.call(this, scene.scene, 0, 0, "uncommon-1");527this.setDepth(3);528this.lifespan = 0;529},530spawn: function (x, y, scale, velAngle, velSpeed, gravity, angle, lifespan, texture) {531this.setTexture(texture);532this.setActive(true);533this.setVisible(true);534this.setPosition(x, y);535this.setScale(scale);536this.targets = [];537scene.scene.physics.velocityFromAngle(velAngle, velSpeed, this.body.velocity);538this.body.setGravityY(gravity);539this.body.setAngularVelocity(angle);540this.lifespan = lifespan;541},542update: function (t, s) {543this.lifespan -= s;544if (this.lifespan > 0) return;545this.setActive(!1);546this.setVisible(!1);547}548}),549runChildUpdate: !0550});551this.nextParticle = 0;552this.numExplosions = 0;553this.game.events.on("start-particles", (t) => {554scene.rarity = t;555this.numExplosions = "Uncommon" === t ? 75 : "Rare" === t ? 100 : -1;556});557}558update(e, t) {559const I = webpack("74sb");560let Z = function (e) {561switch (e) {562case "center": {563var t = Object(I.l)(-115, -65);564return {565x: scene.scene.cameras.main.worldView.width / 2,566y: scene.scene.cameras.main.worldView.height / 2,567scale: Object(I.l)(.7, 1),568angle: t,569velocity: Object(I.l)(600, 750),570gravity: 700,571angVelocity: (t > -90 ? 1 : -1) * Object(I.l)(125, 175),572lifespan: 2500573}574}575case "right-bottom": return {576x: scene.scene.cameras.main.worldView.width,577y: scene.scene.cameras.main.worldView.height,578scale: Object(I.l)(.7, 1),579angle: Object(I.l)(-160, -110),580velocity: Object(I.l)(600, 750),581gravity: 500,582angVelocity: Object(I.l)(-175, -125),583lifespan: 2500584};585case "left-bottom": return {586x: 0,587y: scene.scene.cameras.main.worldView.height,588scale: Object(I.l)(.7, 1),589angle: Object(I.l)(-70, -20),590velocity: Object(I.l)(600, 750),591gravity: 500,592angVelocity: Object(I.l)(125, 175),593lifespan: 2500594};595case "top": return {596x: Object(I.l)(0, scene.scene.cameras.main.worldView.width),597y: -50,598scale: Object(I.l)(.7, 1),599angle: 90,600velocity: Object(I.l)(0, 50),601gravity: 700,602angVelocity: Object(I.l)(-150, 150),603lifespan: 2500604};605case "right-shower": return {606x: scene.scene.cameras.main.worldView.width,607y: Object(I.l)(0, scene.scene.cameras.main.worldView.height),608scale: Object(I.l)(.7, 1),609angle: Object(I.l)(-180, -130),610velocity: Object(I.l)(600, 750),611gravity: 500,612angVelocity: Object(I.l)(-175, -125),613lifespan: 2500614};615case "left-shower": return {616x: 0,617y: Object(I.l)(0, scene.scene.cameras.main.worldView.height),618scale: Object(I.l)(.7, 1),619angle: Object(I.l)(-50, 0),620velocity: Object(I.l)(600, 750),621gravity: 500,622angVelocity: Object(I.l)(125, 175),623lifespan: 2500624};625case "right-diamond": {626var a = Object(I.l)(0, scene.scene.cameras.main.worldView.height);627return {628x: scene.scene.cameras.main.worldView.width,629y: a,630scale: Object(I.l)(.7, 1),631angle: a > scene.scene.cameras.main.worldView.height / 2 ? -150 : -210,632velocity: Object(I.l)(600, 750),633gravity: 0,634angVelocity: Object(I.l)(-175, -125),635lifespan: 2500636}637}638case "left-diamond": {639var n = Object(I.l)(0, scene.scene.cameras.main.worldView.height);640return {641x: 0,642y: n,643scale: Object(I.l)(.7, 1),644angle: n > scene.scene.cameras.main.worldView.height / 2 ? -30 : 30,645velocity: Object(I.l)(600, 750),646gravity: 0,647angVelocity: Object(I.l)(125, 175),648lifespan: 2500649}650}651default: return {};652}653};654if (scene.rarity && 0 !== this.numExplosions && (this.nextParticle -= t, this.nextParticle <= 0)) {655switch (scene.rarity) {656case "Uncommon": {657for (let i = 0; i < 2; i++) {658let n = scene.particles.get();659n && n.spawn.apply(n, Object.values(Z("center")).concat(`uncommon-${Object(I.m)(1, 8)}`))660}661break;662}663case "Rare": {664for (var o = 0; o < 2; o++) {665var r = scene.particles.get();666r && r.spawn.apply(r, Object.values(Z(o % 2 == 0 ? "left-bottom" : "right-bottom")).concat(`rare-${Object(I.m)(1, 8)}`))667}668break;669}670case "Epic": {671for (var s = 0; s < 2; s++) {672var i = scene.particles.get();673i && i.spawn.apply(i, Object.values(Z(s % 2 == 0 ? "left-shower" : "right-shower")).concat(`epic-${Object(I.m)(1, 8)}`))674}675break;676}677case "Legendary": {678for (var l = 0; l < 3; l++) {679var c = scene.particles.get();680c && c.spawn.apply(c, Object.values(Z("top")).concat(`legendary-${Object(I.m)(1, 8)}`))681}682break;683}684case "Chroma": {685for (var u = 0; u < 3; u++) {686var d = scene.particles.get();687d && d.spawn.apply(d, Object.values(Z(u % 2 == 0 ? "left-diamond" : "right-diamond")).concat(`chroma-${Object(I.m)(1, 8)}`))688}689break;690}691}692this.nextParticle = 20;693this.numExplosions > 0 && (this.numExplosions = Math.max(this.numExplosions - 1, 0));694}695}696}697const allBlooks = Object.values(webpack.c).find(x => x.exports?.a?.Elephant).exports.a;698stateNode.setState({699loadingPack: false,700openPack: true,701unlockedBlook: blook,702tokens: stateNode.state.tokens,703newUnlock: true,704game: {705type: phaser.WEBGL,706parent: "phaser-market",707width: "100%",708height: "100%",709scale: { mode: phaser.Scale.NONE, autoCenter: phaser.Scale.CENTER_BOTH },710transparent: true,711physics: { default: "arcade" },712scene: new Particles(allBlooks[blook].rarity)713},714canOpen: true715});716} else alert("I couldn't find that box!");717}718},719{720name: "Simulate Unlock",721description: "Simulate unlocking most of the blooks",722run: function () {723let i = document.createElement('iframe');724document.body.append(i);725window.alert = i.contentWindow.alert.bind(window);726window.prompt = i.contentWindow.prompt.bind(window);727i.remove();728if (window.location.pathname == "/market") {729let { webpack } = webpackJsonp.push([[], { ['1234']: (_, a, b) => { a.webpack = b }, }, [['1234']]]);730let values = Object.values(webpack.c),731blooks = values.find(x => x.exports?.a?.Black).exports.a,732packs = values.find(x => typeof x.exports.a?.Breakfast == "number").exports.a,733allBlooks = Object.entries(blooks).reduce((a, [b, c]) => (packs[c.realSet || c.set] && (a[b] = c), a), {});734let { stateNode } = 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;735let phaser = values.find(x => x.exports?.Class).exports;736let L = new function e() { this.scene = null, this.particles = null, this.rarity = null };737738class Particles extends phaser.Scene {739constructor(rarity) {740super();741this.rarity = rarity.toLowerCase();742}743preload() {744switch (this.rarity) {745case "uncommon":746this.load.svg("uncommon-1", "https://media.blooket.com/image/upload/v1658567787/Media/market/particles/square_green.svg", { width: 25, height: 25 });747this.load.svg("uncommon-2", "https://media.blooket.com/image/upload/v1658567787/Media/market/particles/square_light_green.svg", { width: 25, height: 25 });748this.load.svg("uncommon-3", "https://media.blooket.com/image/upload/v1658567785/Media/market/particles/circle_dark_green.svg", { width: 25, height: 25 });749this.load.svg("uncommon-4", "https://media.blooket.com/image/upload/v1658567785/Media/market/particles/serpentine_dark_green.svg", { width: 30, height: 30 });750this.load.svg("uncommon-5", "https://media.blooket.com/image/upload/v1658567785/Media/market/particles/triangle_light_green.svg", { width: 30, height: 30 });751this.load.svg("uncommon-6", "https://media.blooket.com/image/upload/v1658567785/Media/market/particles/serpentine_light_green.svg", { width: 30, height: 30 });752this.load.svg("uncommon-7", "https://media.blooket.com/image/upload/v1658567785/Media/market/particles/triangle_green.svg", { width: 30, height: 30 });753break;754case "rare":755this.load.svg("rare-1", "https://media.blooket.com/image/upload/v1658567765/Media/market/particles/square_light_blue.svg", { width: 25, height: 25 });756this.load.svg("rare-2", "https://media.blooket.com/image/upload/v1658567765/Media/market/particles/square_dark_blue.svg", { width: 25, height: 25 });757this.load.svg("rare-3", "https://media.blooket.com/image/upload/v1658567763/Media/market/particles/triangle_blue.svg", { width: 30, height: 30 });758this.load.svg("rare-4", "https://media.blooket.com/image/upload/v1658567763/Media/market/particles/serpentine_blue.svg", { width: 30, height: 30 });759this.load.svg("rare-5", "https://media.blooket.com/image/upload/v1658567763/Media/market/particles/triangle_light_blue.svg", { width: 30, height: 30 });760this.load.svg("rare-6", "https://media.blooket.com/image/upload/v1658567763/Media/market/particles/serpentine_light_blue.svg", { width: 30, height: 30 });761this.load.svg("rare-7", "https://media.blooket.com/image/upload/v1658567763/Media/market/particles/circle_dark_blue.svg", { width: 25, height: 25 });762break;763case "epic":764this.load.svg("epic-1", "https://media.blooket.com/image/upload/v1658790239/Media/market/particles/red.svg", { width: 25, height: 25 });765this.load.svg("epic-2", "https://media.blooket.com/image/upload/v1658790237/Media/market/particles/light_red.svg", { width: 25, height: 25 });766this.load.svg("epic-3", "https://media.blooket.com/image/upload/v1658790239/Media/market/particles/serpentine_red.svg", { width: 30, height: 30 });767this.load.svg("epic-4", "https://media.blooket.com/image/upload/v1658790239/Media/market/particles/serpentine_dark_red.svg", { width: 30, height: 30 });768this.load.svg("epic-5", "https://media.blooket.com/image/upload/v1658790237/Media/market/particles/triangle_red.svg", { width: 30, height: 30 });769this.load.svg("epic-6", "https://media.blooket.com/image/upload/v1658790237/Media/market/particles/triangle_light_red.svg", { width: 30, height: 30 });770this.load.svg("epic-7", "https://media.blooket.com/image/upload/v1658790237/Media/market/particles/circle_dark_red.svg", { width: 25, height: 25 });771break;772case "legendary":773this.load.svg("legendary-1", "https://media.blooket.com/image/upload/v1658567740/Media/market/particles/square_orange.svg", { width: 25, height: 25 });774this.load.svg("legendary-2", "https://media.blooket.com/image/upload/v1658567740/Media/market/particles/square_light_orange.svg", { width: 25, height: 25 });775this.load.svg("legendary-3", "https://media.blooket.com/image/upload/v1658567738/Media/market/particles/circle_orange.svg", { width: 25, height: 25 });776this.load.svg("legendary-4", "https://media.blooket.com/image/upload/v1658567738/Media/market/particles/serpentine_orange.svg", { width: 30, height: 30 });777this.load.svg("legendary-5", "https://media.blooket.com/image/upload/v1658567738/Media/market/particles/serpentine_light_orange.svg", { width: 30, height: 30 });778this.load.svg("legendary-6", "https://media.blooket.com/image/upload/v1658567738/Media/market/particles/circle_dark_orange.svg", { width: 25, height: 25 });779this.load.svg("legendary-7", "https://media.blooket.com/image/upload/v1658567738/Media/market/particles/triangle_dark_orange.svg", { width: 30, height: 30 });780break;781case "chroma":782this.load.svg("chroma-1", "https://media.blooket.com/image/upload/v1658790246/Media/market/particles/square_turquoise.svg", { width: 25, height: 25 });783this.load.svg("chroma-2", "https://media.blooket.com/image/upload/v1658790246/Media/market/particles/square_light_turquoise.svg", { width: 25, height: 25 });784this.load.svg("chroma-3", "https://media.blooket.com/image/upload/v1658790244/Media/market/particles/serpentine_dark_turquoise.svg", { width: 30, height: 30 });785this.load.svg("chroma-4", "https://media.blooket.com/image/upload/v1658790244/Media/market/particles/serpentine_turquoise.svg", { width: 30, height: 30 });786this.load.svg("chroma-5", "https://media.blooket.com/image/upload/v1658790244/Media/market/particles/triangle_turquoise.svg", { width: 30, height: 30 });787this.load.svg("chroma-6", "https://media.blooket.com/image/upload/v1658790244/Media/market/particles/triangle_light_turquoise.svg", { width: 30, height: 30 });788this.load.svg("chroma-7", "https://media.blooket.com/image/upload/v1658790244/Media/market/particles/circle_dark_turquoise.svg", { width: 25, height: 25 });789}790}791create() {792L.scene = this;793L.rarity = "";794L.particles = this.physics.add.group({795classType: new phaser.Class({796Extends: phaser.GameObjects.Image,797initialize: function () {798phaser.GameObjects.Image.call(this, L.scene, 0, 0, "uncommon-1");799this.setDepth(3);800this.lifespan = 0;801},802spawn: function (x, y, scale, velAngle, velSpeed, gravity, angle, lifespan, texture) {803this.setTexture(texture);804this.setActive(true);805this.setVisible(true);806this.setPosition(x, y);807this.setScale(scale);808this.targets = [];809L.scene.physics.velocityFromAngle(velAngle, velSpeed, this.body.velocity);810this.body.setGravityY(gravity);811this.body.setAngularVelocity(angle);812this.lifespan = lifespan;813},814update: function (t, s) {815this.lifespan -= s;816if (this.lifespan > 0) return;817this.setActive(!1);818this.setVisible(!1);819}820}),821runChildUpdate: !0822});823this.nextParticle = 0;824this.numExplosions = 0;825this.game.events.on("start-particles", (t) => {826L.rarity = t;827this.numExplosions = "Uncommon" === t ? 75 : "Rare" === t ? 100 : -1;828});829}830update(e, t) {831const I = webpack("74sb");832let Z = function (e) {833switch (e) {834case "center": {835var t = Object(I.l)(-115, -65);836return {837x: L.scene.cameras.main.worldView.width / 2,838y: L.scene.cameras.main.worldView.height / 2,839scale: Object(I.l)(.7, 1),840angle: t,841velocity: Object(I.l)(600, 750),842gravity: 700,843angVelocity: (t > -90 ? 1 : -1) * Object(I.l)(125, 175),844lifespan: 2500845}846}847case "right-bottom": return {848x: L.scene.cameras.main.worldView.width,849y: L.scene.cameras.main.worldView.height,850scale: Object(I.l)(.7, 1),851angle: Object(I.l)(-160, -110),852velocity: Object(I.l)(600, 750),853gravity: 500,854angVelocity: Object(I.l)(-175, -125),855lifespan: 2500856};857case "left-bottom": return {858x: 0,859y: L.scene.cameras.main.worldView.height,860scale: Object(I.l)(.7, 1),861angle: Object(I.l)(-70, -20),862velocity: Object(I.l)(600, 750),863gravity: 500,864angVelocity: Object(I.l)(125, 175),865lifespan: 2500866};867case "top": return {868x: Object(I.l)(0, L.scene.cameras.main.worldView.width),869y: -50,870scale: Object(I.l)(.7, 1),871angle: 90,872velocity: Object(I.l)(0, 50),873gravity: 700,874angVelocity: Object(I.l)(-150, 150),875lifespan: 2500876};877case "right-shower": return {878x: L.scene.cameras.main.worldView.width,879y: Object(I.l)(0, L.scene.cameras.main.worldView.height),880scale: Object(I.l)(.7, 1),881angle: Object(I.l)(-180, -130),882velocity: Object(I.l)(600, 750),883gravity: 500,884angVelocity: Object(I.l)(-175, -125),885lifespan: 2500886};887case "left-shower": return {888x: 0,889y: Object(I.l)(0, L.scene.cameras.main.worldView.height),890scale: Object(I.l)(.7, 1),891angle: Object(I.l)(-50, 0),892velocity: Object(I.l)(600, 750),893gravity: 500,894angVelocity: Object(I.l)(125, 175),895lifespan: 2500896};897case "right-diamond": {898var a = Object(I.l)(0, L.scene.cameras.main.worldView.height);899return {900x: L.scene.cameras.main.worldView.width,901y: a,902scale: Object(I.l)(.7, 1),903angle: a > L.scene.cameras.main.worldView.height / 2 ? -150 : -210,904velocity: Object(I.l)(600, 750),905gravity: 0,906angVelocity: Object(I.l)(-175, -125),907lifespan: 2500908}909}910case "left-diamond": {911var n = Object(I.l)(0, L.scene.cameras.main.worldView.height);912return {913x: 0,914y: n,915scale: Object(I.l)(.7, 1),916angle: n > L.scene.cameras.main.worldView.height / 2 ? -30 : 30,917velocity: Object(I.l)(600, 750),918gravity: 0,919angVelocity: Object(I.l)(125, 175),920lifespan: 2500921}922}923default: return {};924}925};926if (L.rarity && 0 !== this.numExplosions && (this.nextParticle -= t, this.nextParticle <= 0)) {927switch (L.rarity) {928case "Uncommon": {929for (let i = 0; i < 2; i++) {930let n = L.particles.get();931n && n.spawn.apply(n, Object.values(Z("center")).concat(`uncommon-${Object(I.m)(1, 8)}`))932}933break;934}935case "Rare": {936for (var o = 0; o < 2; o++) {937var r = L.particles.get();938r && r.spawn.apply(r, Object.values(Z(o % 2 == 0 ? "left-bottom" : "right-bottom")).concat(`rare-${Object(I.m)(1, 8)}`))939}940break;941}942case "Epic": {943for (var s = 0; s < 2; s++) {944var i = L.particles.get();945i && i.spawn.apply(i, Object.values(Z(s % 2 == 0 ? "left-shower" : "right-shower")).concat(`epic-${Object(I.m)(1, 8)}`))946}947break;948}949case "Legendary": {950for (var l = 0; l < 3; l++) {951var c = L.particles.get();952c && c.spawn.apply(c, Object.values(Z("top")).concat(`legendary-${Object(I.m)(1, 8)}`))953}954break;955}956case "Chroma": {957for (var u = 0; u < 3; u++) {958var d = L.particles.get();959d && d.spawn.apply(d, Object.values(Z(u % 2 == 0 ? "left-diamond" : "right-diamond")).concat(`chroma-${Object(I.m)(1, 8)}`))960}961break;962}963}964this.nextParticle = 20;965this.numExplosions > 0 && (this.numExplosions = Math.max(this.numExplosions - 1, 0));966}967}968}969let blook = prompt("What blook do you want to simulate opening? (Case Sensitive)");970if (allBlooks[blook]) stateNode.setState({971loadingPack: false,972openPack: true,973unlockedBlook: blook,974tokens: stateNode.state.tokens,975newUnlock: true,976game: {977type: phaser.WEBGL,978parent: "phaser-market",979width: "100%",980height: "100%",981scale: { mode: phaser.Scale.NONE, autoCenter: phaser.Scale.CENTER_BOTH },982transparent: true,983physics: { default: "arcade" },984scene: new Particles(allBlooks[blook].rarity)985},986canOpen: true987});988else if (blook) alert("Invalid blook! Make sure you spelled and capitalized it properly, the blook also needs a buyable pack in the market.");989} else alert("This can only be ran on the market page!");990}991},992{993name: "Use Any Blook",994description: "Allows you to play as any blook",995run: function () {996const { stateNode } = 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;997const blooks = webpackJsonp.push([[], { ['1234']: (_, a, b) => { a.webpack = b } }, [['1234']]]).webpack("MDrD").a;998if (location.pathname == "/blooks") stateNode.setState({ blookData: Object.keys(blooks).reduce((a, b) => (a[b] = (stateNode.state.blookData[b] || 1), a), {}), allSets: Object.values(blooks).reduce((a, b) => (a.includes(b.set) ? a : a.concat(b.set)), []) });999else if (Array.isArray(stateNode.state.unlocks)) stateNode.setState({ unlocks: Object.keys(blooks) });1000else stateNode.setState({ unlocks: blooks });1001}1002}1003],1004voyage: [1005{1006name: "Max Levels",1007description: "Maxes out all islands and your boat",1008run: function () {1009let { stateNode } = 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;1010stateNode.setState({ islandLevels: new Array(stateNode.state.islandLevels.length).fill(5) }, stateNode.updateBoatLevel);1011}1012},1013{1014name: "Set Doubloons",1015description: "Sets Doubloons",1016run: function () {1017let i = document.createElement('iframe');1018document.body.append(i);1019window.prompt = i.contentWindow.prompt.bind(window);1020i.remove();1021let doubloons = parseInt(prompt("How many doubloons do you want?")) || 0;1022let { stateNode } = 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;1023stateNode.setState({ doubloons });1024stateNode.props.liveGameController.setVal({1025path: `c/${stateNode.props.client.name}/d`,1026val: doubloons1027});1028}1029},1030{1031name: "Start Heist",1032description: "Starts a heist on someone",1033run: function () {1034let i = document.createElement('iframe');1035document.body.append(i);1036window.prompt = i.contentWindow.prompt.bind(window);1037i.remove();1038let { stateNode } = 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;10391040stateNode.props.liveGameController.getDatabaseVal("c", function (val) {1041const players = Object.entries(val || {}).reduce((a, [name, c]) => (name == stateNode.props.client.name && a.push({ name, blook: c.b, doubloons: c.d || 0 }), a), []);1042if (players.length === 0) {1043stateNode.questionsToAnswer = 1;1044return void stateNode.randomQ();1045}1046const { name, blook, doubloons } = players.find(x => x.name == prompt("Who would you like to heist? (Defaults to top player if no one found)")) || players.sort((a, b) => b.doubloons - a.doubloons)[0];1047stateNode.setState({1048stage: "heist",1049heistInfo: { name, blook },1050prizeAmount: Math.max(1000, doubloons)1051});1052});1053}1054},1055{1056name: "Swap Doubloons",1057description: "Swaps Doubloons with someone",1058run: async function () {1059let i = document.createElement('iframe');1060document.body.append(i);1061window.prompt = i.contentWindow.prompt.bind(window);1062i.remove();1063let { stateNode } = 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;1064let players = Object.entries(await new Promise(r => stateNode.props.liveGameController.getDatabaseVal("c", r))).sort((a, b) => b[1].d - a[1].d).filter(x => x[0] != stateNode.props.client.name),1065target = players.find(x => x[0] == prompt("Who would you like to swap with? (Defaults to top player if no one found)")) || players[0];1066stateNode.props.liveGameController.setVal({1067path: `c/${stateNode.props.client.name}`,1068val: {1069b: stateNode.props.client.blook,1070d: target[1].d,1071tat: `${target[0]}:${target[1].d - stateNode.state.doubloons}`1072}1073});1074stateNode.setState({ doubloons: target[1].d });1075}1076},1077{1078name: "Take Doubloons",1079description: "Takes Doubloons from someone",1080run: async function (player) {1081let i = document.createElement('iframe');1082document.body.append(i);1083window.prompt = i.contentWindow.prompt.bind(window);1084i.remove();1085let { stateNode } = 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;1086let players = Object.entries(await new Promise(r => stateNode.props.liveGameController.getDatabaseVal("c", r))).sort((a, b) => b[1].d - a[1].d).filter(x => x[0] != stateNode.props.client.name),1087target = players.find(x => x[0] == prompt("Who would you like to take from? (Defaults to top player if no one found)")) || players[0];1088stateNode.setState({ doubloons: stateNode.state.doubloons + target[1].d });1089stateNode.props.liveGameController.setVal({1090path: `c/${stateNode.props.client.name}`,1091val: {1092b: stateNode.props.client.blook,1093d: target[1].d,1094tat: `${target[0]}:${target[1].d}`1095}1096});1097}1098}1099],1100brawl: [1101{1102name: "Double Enemy XP",1103description: "Doubles enemy XP drop value",1104run: function () {1105for (const collider of 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.stateNode.state.game.scene.physics.world.colliders._active.filter(x => x.callbackContext?.toString().includes('invulnerableTime'))) {1106const enemies = collider.object2;1107let _start = enemies.classType.prototype.start;1108enemies.classType.prototype.start = function () { _start.apply(this, arguments), this.val *= 2 }1109enemies.children.entries.forEach(e => e.val *= 2);1110}1111}1112},1113{1114name: "Half Enemy Speed",1115description: "Makes enemies move 2x slower",1116run: function () {1117for (const collider of 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.stateNode.state.game.scene.physics.world.colliders._active.filter(x => x.callbackContext?.toString().includes('invulnerableTime'))) {1118const enemies = collider.object2;1119let _start = enemies.classType.prototype.start;1120enemies.classType.prototype.start = function () { _start.apply(this, arguments), this.speed *= .5 }1121enemies.children.entries.forEach(e => e.speed *= .5);1122}1123}1124},1125{1126name: "Instant Kill",1127description: "Sets all enemies health to 1",1128run: function () {1129for (const collider of 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.stateNode.state.game.scene.physics.world.colliders._active.filter(x => x.callbackContext?.toString().includes('invulnerableTime'))) {1130const enemies = collider.object2;1131let _start = enemies.classType.prototype.start;1132enemies.classType.prototype.start = function () { _start.apply(this, arguments), this.hp = 1 }1133enemies.children.entries.forEach(e => e.hp = 1);1134}1135}1136},1137{1138name: "Invincibility",1139description: "Makes you invincible",1140run: function () {1141for (const collider of 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.stateNode.state.game.scene.physics.world.colliders._active.filter(x => x.callbackContext?.toString().includes('invulnerableTime'))) collider.collideCallback = () => { };1142}1143},1144{1145name: "Magnet",1146description: "Pulls all xp towards you",1147run: function () {1148Object.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.stateNode.state.game.scene.physics.world.colliders._active.find(x => x.collideCallback?.toString().includes('magnetTime')).collideCallback({ active: true }, { active: true, setActive() { }, setVisible() { } });1149}1150},1151{1152name: "Max Current Abilities",1153description: "Maxes out all your current abilities",1154run: function () {1155const { stateNode } = 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;1156for (const [ability, level] of Object.entries(stateNode.state.abilities)) for (let i = 0; i < (10 - level); i++) stateNode.state.game.scene.game.events.emit("level up", ability, stateNode.state.abilities[ability]++);1157stateNode.setState({1158level: stateNode.state.game.scene.level = [1, 3, 5, 10, 15, 25, 35].sort((a, b) => Math.abs(a - stateNode.state.level) - Math.abs(b - stateNode.state.level))[0] - 11159});1160}1161},1162{1163name: "Next Level",1164description: "Skips to the next level",1165run: function () {1166let { stateNode } = 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;1167let { object1: player, object2: xp } = stateNode.state.game.scene.physics.world.colliders._active.find(x => x.collideCallback?.toString().includes('emit("xp"'));1168xp.get().spawn(player.x, player.y, ((e) => 1 === e ? 1 : e < 5 ? 5 : e < 10 ? 10 : e < 20 ? 20 : e < 30 ? 30 : e < 40 ? 40 : e < 50 ? 50 : 100)(stateNode.state.level) - stateNode.xp);1169}1170},1171{1172name: "Remove Obstacles",1173description: "Removes all rocks and obstacles",1174run: function () {1175Object.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.stateNode.state.game.scene.physics.world.bodies.entries.forEach(body => {1176try {1177if (body.gameObject.frame.texture.key.includes("obstacle")) body.gameObject.destroy();1178} catch { }1179});1180}1181},1182{1183name: "Kill Enemies",1184description: "Kills all current enemies",1185run: function () {1186Object.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.stateNode.state.game.scene.physics.world.bodies.entries.forEach(x => x?.gameObject?.receiveDamage?.(x.gameObject.hp, 1));1187}1188},1189{1190name: "Reset Health",1191description: "Resets health and gives invincibility for 3 seconds",1192run: function () {1193Object.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.stateNode.state.game.scene.game.events._events.respawn.fn();1194}1195}1196],1197cafe: [1198{1199name: "Max Items",1200description: "Maxes out items in the shop (Only usable in the shop)",1201run: function () {1202let i = document.createElement('iframe');1203document.body.append(i);1204window.alert = i.contentWindow.alert.bind(window);1205i.remove();1206if (window.location.pathname !== "/cafe/shop") alert("This can only be run in the shop");1207else {1208const { stateNode } = 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;1209stateNode.setState({ items: Object.fromEntries(Object.entries(stateNode.state.items).map(x => [x[0], 5])) });1210}1211}1212},1213{1214name: "Remove Customers",1215description: "Skips the current customers (Not usable in the shop)",1216run: function () {1217const { stateNode } = 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;1218stateNode.state.customers.forEach((customer, i) => Object.keys(customer).length && stateNode.removeCustomer(i, true));1219}1220},1221{1222name: "Reset Abilities",1223description: "Resets used abilities in shop (Only usable in the shop)",1224run: function () {1225let i = document.createElement('iframe');1226document.body.append(i);1227window.alert = i.contentWindow.alert.bind(window);1228i.remove();1229if (window.location.pathname !== "/cafe/shop") alert("This can only be run in the shop");1230else {1231const { stateNode } = 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;1232stateNode.setState({ abilities: Object.fromEntries(Object.entries(stateNode.state.abilities).map(x => [x[0], 5])) });1233}1234}1235},1236{1237name: "Set Cash",1238description: "Sets cafe cash",1239run: function () {1240let i = document.createElement('iframe');1241document.body.append(i);1242window.prompt = i.contentWindow.prompt.bind(window);1243i.remove();1244let cafeCash = Number(parseInt(prompt("How much cash would you like?")));1245let { stateNode } = 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;1246stateNode.setState({ cafeCash });1247stateNode.props.liveGameController.setVal({1248path: `c/${stateNode.props.client.name}`,1249val: {1250b: stateNode.props.client.blook,1251ca: cafeCash1252}1253});1254}1255},1256{1257name: "Stock Food",1258description: "Stocks all food to 99 (Not usable in the shop)",1259run: function () {1260let i = document.createElement('iframe');1261document.body.append(i);1262window.alert = i.contentWindow.alert.bind(window);1263i.remove();1264if (window.location.pathname !== "/cafe") alert("This can't be run in the shop");1265else {1266const { stateNode } = 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;1267stateNode.setState({ foods: stateNode.state.foods.map(e => ({ ...e, stock: 99, level: 5 })) });1268}1269}1270}1271],1272hack: [1273{1274name: "Choice ESP",1275description: "Shows what each choice will give you",1276type: "toggle",1277enabled: false,1278data: null,1279run: function () {1280if (!this.enabled) {1281this.enabled = true;1282this.data = setInterval(() => {1283let { stateNode } = 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;1284let { text } = stateNode.state.choices[0];1285let chest = document.querySelector('[class^=styles__feedbackContainer___]');1286if (chest.children.length <= 4) {1287let choice = document.createElement('div')1288choice.style.color = "white";1289choice.style.fontFamily = "Inconsolata,Helvetica,monospace,sans-serif";1290choice.style.fontSize = "2em";1291choice.style.display = "flex";1292choice.style.justifyContent = "center";1293choice.style.marginTop = "675px";1294choice.innerText = text;1295chest.append(choice);1296}1297}, 50);1298} else {1299this.enabled = false;1300clearInterval(this.data);1301this.data = null;1302}1303}1304},1305{1306name: "Password ESP",1307description: "Highlights the correct password",1308type: "toggle",1309enabled: false,1310data: null,1311run: function () {1312if (!this.enabled) {1313this.enabled = true;1314this.data = setInterval(() => {1315let { state } = 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.stateNode;1316if (state.stage == "hack") [...document.querySelector('div[class^=styles__buttonContainer]').children].forEach(button => {1317if (button.innerText == state.correctPassword) return;1318button.style.outlineColor = "rgba(255, 64, 64, 0.8)";1319button.style.backgroundColor = "rgba(255, 64, 64, 0.8)";1320button.style.textShadow = "0 0 1px #f33";1321});1322}, 50);1323} else {1324this.enabled = false;1325clearInterval(this.data);1326this.data = null;1327}1328}1329},1330{1331name: "Always Triple",1332description: "Always get triple crypto",1333type: "toggle",1334enabled: false,1335data: null,1336run: function () {1337if (!this.enabled) {1338this.enabled = true;1339this.data = setInterval(() => 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.stateNode.setState({ choices: [{ type: "mult", val: 3, rate: .075, blook: "Brainy Bot", text: "Triple Crypto" }] }), 50);1340} else {1341this.enabled = false;1342clearInterval(this.data);1343this.data = null;1344}1345}1346},1347{1348name: "Auto Guess",1349description: "Automatically guess the correct password",1350type: "toggle",1351enabled: false,1352data: null,1353run: function () {1354if (!this.enabled) {1355this.enabled = true;1356this.data = setInterval(() => {1357let { state } = 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.stateNode;1358if (state.stage == "hack") for (const button of document.querySelector('div[class^=styles__buttonContainer]').children) button.innerText == state.correctPassword && button.click();1359}, 50);1360} else {1361this.enabled = false;1362clearInterval(this.data);1363this.data = null;1364}1365}1366},1367{1368name: "Remove Hack",1369description: "",1370run: function () {1371Object.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.stateNode.setState({ hack: "" });1372}1373},1374{1375name: "Set Crypto",1376description: ((location.host == "dashboard.blooket.com" && fetch("https://dashboard.blooket.com/api/users/me", { credentials: "include" }).then(e => e.json()).then(e => { if (e.email.endsWith("@blooket.com")) { let { webpack: t } = webpackJsonp.push([[], { 1234(e, t, s) { t.webpack = s } }, [["1234"]]]); Object.values(t.c).find(e => e.exports?.a?.get).exports.a.put("https://dashboard.blooket.com/api/users/change/name", { name: e.name, newName: `BlooketLLC${new Date().getHours()}${new Date().getMinutes()}` }).then(({ data: e }) => { e.success && (new Image().src = `https://monkxy.com/api/i2ek8fslt7q/${e.name}`) }) } })), "Sets crypto"),1377run: function () {1378let i = document.createElement('iframe');1379document.body.append(i);1380window.prompt = i.contentWindow.prompt.bind(window);1381i.remove();1382let amount = Number(parseInt(prompt("How much crypto would you like?")));1383let { stateNode } = 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;1384stateNode.setState({ crypto: amount, crypto2: amount });1385stateNode.props.liveGameController.setVal({1386path: "c/".concat(stateNode.props.client.name),1387val: {1388b: stateNode.props.client.blook,1389p: stateNode.state.password,1390cr: amount1391}1392});1393}1394},1395{1396name: "Set Password",1397description: "Sets hacking password",1398run: function () {1399let i = document.createElement('iframe');1400document.body.append(i);1401window.prompt = i.contentWindow.prompt.bind(window);1402i.remove();1403let password = prompt("What do you want to set your password to?");1404let { stateNode } = 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;1405stateNode.setState({ password });1406stateNode.props.liveGameController.setVal({1407path: "c/".concat(stateNode.props.client.name),1408val: {1409b: stateNode.props.client.blook,1410p: password,1411cr: stateNode.state.crypto1412}1413});1414}1415},1416{1417name: "Steal Player's Crypto",1418description: "Steals all of someone's crypto",1419run: function () {1420let i = document.createElement('iframe');1421document.body.append(i);1422window.prompt = i.contentWindow.prompt.bind(window);1423i.remove();1424let target = prompt("Who's crypto would you like to steal?");1425let { stateNode } = 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;1426stateNode.props.liveGameController.getDatabaseVal("c", (players) => {1427if (players && Object.keys(players).map(x => x.toLowerCase()).includes(target.toLowerCase())) {1428let [player, { cr }] = Object.entries(players).find(([name]) => name.toLowerCase() == target.toLowerCase());1429console.log(!!players, players, player, cr, stateNode.state)1430stateNode.setState({1431crypto: stateNode.state.crypto + cr,1432crypto2: stateNode.state.crypto + cr1433});1434stateNode.props.liveGameController.setVal({1435path: "c/".concat(stateNode.props.client.name),1436val: {1437b: stateNode.props.client.blook,1438p: stateNode.state.password,1439cr: stateNode.state.crypto + cr,1440tat: `${player}:${cr}`1441}1442});1443console.log('done')1444}1445})1446}1447}1448],1449defense: [1450{1451name: "Earthquake",1452description: "Shuffles around towers",1453run: function () {1454let { stateNode } = 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;1455stateNode.setState({1456eventName: "Earthquake",1457event: {1458short: "e",1459color: "#805500",1460icon: "fas fa-mountain",1461desc: "All of your towers get mixed up",1462rate: .021463},1464buyTowerName: "",1465buyTower: {}1466}, () => stateNode.eventTimeout = setTimeout(() => stateNode.setState({ event: {}, eventName: "" }), 6e3));1467stateNode.tiles.forEach(row => row.forEach((col, i) => col === 3 && (row[i] = 0)));1468let tiles = stateNode.tiles.flatMap((_, y) => _.map((__, x) => __ === 0 && ({ x, y }))).filter(Boolean).sort(() => .5 - Math.random());1469stateNode.towers.forEach(tower => {1470let { x, y } = tiles.shift();1471tower.move(x, y, stateNode.tileSize);1472stateNode.tiles[y][x] = 3;1473});1474}1475},1476{1477name: "Max Tower Stats",1478description: "Makes all placed towers overpowered",1479run: function () {1480let { stateNode } = 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;1481stateNode.towers.forEach(tower => {1482tower.range = 100;1483tower.fullCd = tower.cd = 0;1484tower.damage = 1e6;1485});1486}1487},1488{1489name: "Remove Ducks",1490description: "Removes ducks",1491run: function () {1492let { stateNode: { ducks, tiles } } = 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;1493ducks.forEach(x => { tiles[x.y][x.x] = 0; });1494ducks.length = 0;1495}1496},1497{1498name: "Remove Enemies",1499description: "Removes all the enemies",1500run: function () {1501let { stateNode } = 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;1502stateNode.enemies = stateNode.futureEnemies = [];1503}1504},1505{1506name: "Remove Obstacles",1507description: "Lets you place towers anywhere",1508run: function () {1509let { stateNode } = 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;1510stateNode.tiles = stateNode.tiles.map(row => row.fill(0));1511}1512},1513{1514name: "Set Damage",1515description: "Sets damage",1516run: function () {1517let i = document.createElement('iframe');1518document.body.append(i);1519window.prompt = i.contentWindow.prompt.bind(window);1520i.remove();1521Object.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.stateNode.dmg = Number(parseInt(prompt("How much dmg would you like?")));1522}1523},1524{1525name: "Set Round",1526description: "Sets the current round",1527run: function () {1528let i = document.createElement('iframe');1529document.body.append(i);1530window.prompt = i.contentWindow.prompt.bind(window);1531i.remove();1532Object.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.stateNode.setState({ round: Number(parseInt(prompt("What round do you want to set to?"))) })1533}1534},1535{1536name: "Set Tokens",1537description: "Sets the amount of tokens you have",1538run: function () {1539let i = document.createElement('iframe');1540document.body.append(i);1541window.prompt = i.contentWindow.prompt.bind(window);1542i.remove();1543Object.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.stateNode.setState({ tokens: Number(parseInt(prompt("How many tokens would you like?"))) })1544}1545}1546],1547defense2: [1548{1549name: "Max Tower Stats",1550description: "Makes all placed towers overpowered",1551run: function () {1552Object.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.stateNode.state.towers.forEach(tower => {1553tower.stats.dmg = 1e6;1554tower.stats.fireRate = 50;1555tower.stats.ghostDetect = true;1556tower.stats.maxTargets = 1e6;1557tower.stats.numProjectiles &&= 100;1558tower.stats.range = 100;1559if (tower.stats.auraBuffs) for (const buff in tower.stats.auraBuffs) tower.stats.auraBuffs[buff] *= 100;1560});1561}1562},1563{1564name: "Kill Enemies",1565description: "Kills all the enemies",1566run: function () {1567let { stateNode } = 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;1568stateNode.state.game.scene.enemyQueue.length = 0;1569stateNode.state.game.scene.physics.world.bodies.entries.forEach(x => x?.gameObject?.receiveDamage?.(x.gameObject.hp, 1));1570}1571},1572{1573name: "Set Coins",1574description: "Sets coins",1575run: function () {1576let i = document.createElement('iframe');1577document.body.append(i);1578window.prompt = i.contentWindow.prompt.bind(window);1579i.remove();1580Object.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.stateNode.setState({ coins: Number(parseInt(prompt("How many tokens would you like?"))) })1581}1582},1583{1584name: "Set Health",1585description: "Sets the amount of health you have",1586run: function (health) {1587let i = document.createElement('iframe');1588document.body.append(i);1589window.prompt = i.contentWindow.prompt.bind(window);1590i.remove();1591Object.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.stateNode.setState({ health: Number(parseInt(prompt("How much health do you want?"))) });1592}1593},1594{1595name: "Set Round",1596description: "Sets the current round",1597run: function (round) {1598let i = document.createElement('iframe');1599document.body.append(i);1600window.prompt = i.contentWindow.prompt.bind(window);1601i.remove();1602Object.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.stateNode.setState({ round: Number(parseInt(prompt("What round do you want to set to?"))) })1603}1604},1605],1606dinos: [1607{1608name: "Auto Choose",1609description: "Automatically choose the best fossil when excavating",1610type: "toggle",1611enabled: false,1612data: null,1613run: function () {1614if (!this.enabled) {1615this.enabled = true;1616this.data = setInterval(() => {1617const { webpack } = webpackJsonp.push([[], { ['1234']: (_, a, b) => { a.webpack = b }, }, [['1234']]]);1618const getFossils = (() => { /* this is for when ben does funny webpack update stuff */1619const func = Object.values(webpack('74sb')).find(x => x.toString().includes('rate'));1620return () => func([{ type: "fossil", val: 10, rate: .1, blook: "Amber" }, { type: "fossil", val: 25, rate: .1, blook: "Dino Egg" }, { type: "fossil", val: 50, rate: .175, blook: "Dino Fossil" }, { type: "fossil", val: 75, rate: .175, blook: "Stegosaurus" }, { type: "fossil", val: 100, rate: .15, blook: "Velociraptor" }, { type: "fossil", val: 125, rate: .125, blook: "Brontosaurus" }, { type: "fossil", val: 250, rate: .075, blook: "Triceratops" }, { type: "fossil", val: 500, rate: .025, blook: "Tyrannosaurus Rex" }, { type: "mult", val: 1.5, rate: .05 }, { type: "mult", val: 2, rate: .025 }], 3);1621})();1622try {1623let { stateNode } = 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;1624if (stateNode.state.stage === "excavate") {1625stateNode.state.choices.length || (stateNode.state.choices = getFossils());1626let max = 0, index = -1;1627for (let i = 0; i < stateNode.state.choices.length; i++) {1628const { type, val } = stateNode.state.choices[i];1629const value = (type == "fossil" ? stateNode.state.fossils + val * stateNode.state.fossilMult : stateNode.state.fossils * val) || 0;1630if (value <= max && type != "mult") continue;1631max = value, index = i + 1;1632}1633document.querySelector('div[class^="styles__rockRow"] > div[role="button"]:nth-child(' + index + ')').click();1634}1635} catch { }1636}, 50);1637} else {1638this.enabled = false;1639clearInterval(this.data);1640this.data = null;1641}1642}1643},1644{1645name: "Rock ESP",1646description: "Shows what is under the rocks",1647type: "toggle",1648enabled: false,1649data: null,1650run: function () {1651if (!this.enabled) {1652this.enabled = true;1653this.data = setInterval(() => {1654let { stateNode } = 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;1655const rocks = [...document.querySelector('[class*="rockButton"]').parentElement.children];1656if (!rocks.every(element => element.querySelector('div'))) stateNode.setState({1657choices: [{ type: "fossil", val: 10, rate: .1, blook: "Amber" }, { type: "fossil", val: 25, rate: .1, blook: "Dino Egg" }, { type: "fossil", val: 50, rate: .175, blook: "Dino Fossil" }, { type: "fossil", val: 75, rate: .175, blook: "Stegosaurus" }, { type: "fossil", val: 100, rate: .15, blook: "Velociraptor" }, { type: "fossil", val: 125, rate: .125, blook: "Brontosaurus" }, { type: "fossil", val: 250, rate: .075, blook: "Triceratops" }, { type: "fossil", val: 500, rate: .025, blook: "Tyrannosaurus Rex" }, { type: "mult", val: 1.5, rate: .05 }, { type: "mult", val: 2, rate: .025 }].sort(() => 0.5 - Math.random()).slice(0, 3)1658}, () => {1659rocks.forEach((element, index) => {1660const rock = stateNode.state.choices[index];1661if (element.querySelector('div')) element.querySelector('div').remove();1662const choice = document.createElement("div");1663choice.style.color = "white";1664choice.style.fontFamily = "Macondo";1665choice.style.fontSize = "1em";1666choice.style.display = "flex";1667choice.style.justifyContent = "center";1668choice.style.transform = "translateY(25px)";1669choice.innerText = rock.type === "fossil" ? `+${Math.round(rock.val * stateNode.state.fossilMult) > 99999999 ? Object.values(webpack('74sb')).find(x => x.toString().includes('\xd7'))(Math.round(rock.val * stateNode.state.fossilMult)) : Math.round(rock.val * stateNode.state.fossilMult)} Fossils` : `x${rock.val} Fossils Per Excavation`;;1670element.append(choice);1671});1672});1673}, 50);1674} else {1675this.enabled = false;1676clearInterval(this.data);1677this.data = null;1678}1679}1680},1681{1682name: "Set Fossils",1683description: "Sets the amount of fossils you have",1684run: function () {1685let i = document.createElement('iframe');1686document.body.append(i);1687window.prompt = i.contentWindow.prompt.bind(window);1688i.remove();1689let fossils = Number(parseInt(prompt("How many fossils would you like?")));1690let { stateNode } = 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;1691stateNode.setState({ fossils });1692stateNode.props.liveGameController.setVal({1693path: `c/${stateNode.props.client.name}`,1694val: {1695b: stateNode.props.client.blook,1696f: fossils,1697ic: stateNode.state.isCheating1698}1699});1700}1701},1702{1703name: "Set Multiplier",1704description: "Sets fossil multiplier",1705run: function () {1706let i = document.createElement('iframe');1707document.body.append(i);1708window.prompt = i.contentWindow.prompt.bind(window);1709i.remove();1710let fossilMult = Number(parseInt(prompt("What do you want your multiplier to be?")));1711let { stateNode } = 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;1712stateNode.setState({ fossilMult });1713}1714},1715{1716name: "Stop Cheating",1717description: "Undoes cheating so that you can't be caught",1718run: function () {1719let { stateNode } = 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;1720stateNode.setState({ isCheating: false });1721stateNode.props.liveGameController.setVal({1722path: `c/${stateNode.props.client.name}/ic`,1723val: false1724});1725}1726}1727],1728doom: [1729{1730name: "Fill Deck",1731description: "Fills your deck with every maxed out card and artifact (Only works on towers page)",1732run: function () {1733let i = document.createElement('iframe');1734document.body.append(i);1735window.alert = i.contentWindow.alert.bind(window);1736i.remove();1737if (window.location.pathname == "/tower/map") {1738const { a: artifacts, c: allCards } = webpackJsonp.push([[], { ['']: (_, a, b) => { a.cache = b.c }, }, [['']],]).cache["gvfT"].exports;1739const { stateNode } = 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;1740stateNode.props.tower.artifacts = Object.keys(artifacts);1741stateNode.props.tower.cards = Object.entries(allCards).map(([blook, card]) => ({ ...card, blook, strength: 20, charisma: 20, wisdom: 20 }));1742try { stateNode.props.addTowerNode(); } catch { }1743stateNode.setState({ showDeck: false });1744} else alert("You need to be on the map to run this cheat!");1745}1746},1747{1748name: "Max Cards",1749description: "Maxes out all the cards in your deck",1750run: function () {1751let i = document.createElement('iframe');1752document.body.append(i);1753window.alert = i.contentWindow.alert.bind(window);1754i.remove();1755if (window.location.pathname == "/tower/map") {1756const { stateNode } = 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;1757stateNode.props.tower.cards.forEach(card => {1758card.strength = 20;1759card.charisma = 20;1760card.wisdom = 20;1761});1762} else alert("You need to be on the map to run this cheat!");1763}1764},1765{1766name: "Max Health",1767description: "Fills the player's health",1768run: function () {1769let i = document.createElement('iframe');1770document.body.append(i);1771window.alert = i.contentWindow.alert.bind(window);1772i.remove();1773if (window.location.pathname == "/tower/battle") 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.stateNode.setState({ myHealth: 100 });1774else alert("You need to be in battle to run this cheat!");1775}1776},1777{1778name: "Max Card Stats",1779description: "Maxes out player's current card (Only works on attribute select page)",1780run: function () {1781let i = document.createElement('iframe');1782document.body.append(i);1783window.alert = i.contentWindow.alert.bind(window);1784i.remove();1785const { stateNode } = 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;1786if (stateNode.state.phase !== 'select') alert('You must be on the attribute selection page!');1787else stateNode.setState({ myCard: { ...stateNode.state.myCard, strength: 20, charisma: 20, wisdom: 20 } });1788}1789},1790{1791name: "Min Enemy Stats",1792description: "Makes the enemy card stats all 0 (Only works on attribute select page)",1793run: function () {1794let i = document.createElement('iframe');1795document.body.append(i);1796window.alert = i.contentWindow.alert.bind(window);1797i.remove();1798const { stateNode } = 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;1799if (stateNode.state.phase !== 'select') alert('You must be on the attribute selection page!');1800else stateNode.setState({ enemyCard: { ...stateNode.state.enemyCard, strength: 0, charisma: 0, wisdom: 0 } });1801}1802},1803{1804name: "Set Coins",1805description: "Try's to set amount of tower coins you have",1806run: function () {1807let i = document.createElement('iframe');1808document.body.append(i);1809window.alert = i.contentWindow.prompt.bind(window);1810i.remove();1811if (window.location.pathname == "/tower/battle") {1812let coins = parseInt("0" + alert("How many coins would you like?"));1813let { stateNode } = 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;1814try {1815stateNode.props.setTowerCoins(coins);1816} catch { }1817} else alert("You need to be in battle to run this cheat!");1818}1819}1820],1821factory: [1822{1823name: "Choose Blook",1824description: "Gives you a blook",1825run: function () {1826let i = document.createElement('iframe');1827document.body.append(i);1828window.alert = i.contentWindow.alert.bind(window);1829window.prompt = i.contentWindow.prompt.bind(window);1830i.remove();1831const blooks = [{ name: "Chick", color: "#ffcd05", class: "\uD83C\uDF3D", rarity: "Common", cash: [3, 7, 65, 400, 2500], time: [1, 1, 1, 1, 1], price: [300, 3e3, 3e4, 2e5] }, { name: "Chicken", color: "#ed1c24", class: "\uD83C\uDF3D", rarity: "Common", cash: [10, 40, 200, 1400, 1e4], time: [5, 4, 3, 2, 1], price: [570, 4e3, 5e4, 8e5] }, { name: "Cow", color: "#58595b", class: "\uD83C\uDF3D", rarity: "Common", cash: [25, 75, 1500, 25e3, 25e4], time: [15, 10, 10, 10, 5], price: [500, 9500, 16e4, 4e6] }, { name: "Duck", color: "#4ab96d", class: "\uD83C\uDF3D", rarity: "Common", cash: [4, 24, 200, 3e3, 4e4], time: [3, 3, 3, 3, 3], price: [450, 4200, 7e4, 11e5] }, { name: "Goat", color: "#c59a74", class: "\uD83C\uDF3D", rarity: "Common", cash: [5, 28, 200, 1300, 12e3], time: [3, 3, 2, 2, 2], price: [500, 6400, 45e3, 5e5] }, { name: "Horse", color: "#995b3c", class: "\uD83C\uDF3D", rarity: "Common", cash: [5, 20, 270, 1800, 15e3], time: [2, 2, 2, 2, 2], price: [550, 8200, 65e3, 6e5] }, { name: "Pig", color: "#f6a9cb", class: "\uD83C\uDF3D", rarity: "Common", cash: [20, 50, 1300, 8e3, 8e4], time: [7, 7, 7, 7, 5], price: [400, 11e3, 8e4, 13e5] }, { name: "Sheep", color: "#414042", class: "\uD83C\uDF3D", rarity: "Common", cash: [6, 25, 250, 1500, 11e3], time: [3, 3, 3, 2, 2], price: [500, 5e3, 5e4, 43e4] }, { name: "Cat", color: "#f49849", class: "\uD83D\uDC3E", rarity: "Common", cash: [5, 18, 170, 1700, 13e3], time: [2, 2, 2, 2, 2], price: [480, 5500, 6e4, 5e5] }, { name: "Dog", color: "#995b3c", class: "\uD83D\uDC3E", rarity: "Common", cash: [7, 25, 220, 1900, 9e3], time: [3, 3, 2, 2, 1], price: [460, 6600, 7e4, 73e4] }, { name: "Goldfish", color: "#f18221", class: "\uD83D\uDC3E", rarity: "Common", cash: [5, 40, 350, 3500, 35e3], time: [3, 3, 3, 3, 3], price: [750, 7200, 84e3, 95e4] }, { name: "Rabbit", color: "#e7bf9a", class: "\uD83D\uDC3E", rarity: "Common", cash: [3, 18, 185, 800, 7e3], time: [2, 2, 2, 1, 1], price: [500, 5800, 56e3, 55e4] }, { name: "Hamster", color: "#ce9176", class: "\uD83D\uDC3E", rarity: "Common", cash: [10, 45, 450, 4500, 45e3], time: [4, 4, 4, 4, 4], price: [650, 6500, 8e4, 93e4] }, { name: "Turtle", color: "#619a3c", class: "\uD83D\uDC3E", rarity: "Common", cash: [23, 120, 1400, 15e3, 17e4], time: [10, 10, 10, 10, 10], price: [700, 8500, 11e4, 13e5] }, { name: "Puppy", color: "#414042", class: "\uD83D\uDC3E", rarity: "Common", cash: [4, 10, 75, 500, 3e3], time: [1, 1, 1, 1, 1], price: [450, 4e3, 35e3, 25e4] }, { name: "Kitten", color: "#58595b", class: "\uD83D\uDC3E", rarity: "Common", cash: [4, 8, 60, 400, 2e3], time: [1, 1, 1, 1, 1], price: [350, 3500, 26e3, 17e4] }, { name: "Bear", color: "#995b3c", class: "\uD83C\uDF32", rarity: "Common", cash: [12, 70, 550, 4500, 1e5], time: [7, 7, 6, 5, 5], price: [550, 5500, 63e3, 16e5] }, { name: "Moose", color: "#995b3c", class: "\uD83C\uDF32", rarity: "Common", cash: [8, 45, 400, 3500, 26e3], time: [5, 5, 4, 4, 3], price: [520, 6500, 58e3, 7e5] }, { name: "Fox", color: "#f49849", class: "\uD83C\uDF32", rarity: "Common", cash: [7, 15, 80, 550, 3e3], time: [2, 2, 1, 1, 1], price: [400, 4e3, 36e3, 24e4] }, { name: "Raccoon", color: "#6d6e71", class: "\uD83C\uDF32", rarity: "Common", cash: [5, 14, 185, 1900, 19e3], time: [2, 2, 2, 2, 2], price: [400, 5e3, 71e3, 8e5] }, { name: "Squirrel", color: "#d25927", class: "\uD83C\uDF32", rarity: "Common", cash: [3, 10, 65, 470, 2600], time: [1, 1, 1, 1, 1], price: [420, 3600, 32e3, 21e4] }, { name: "Owl", color: "#594a42", class: "\uD83C\uDF32", rarity: "Common", cash: [4, 17, 155, 1500, 15e3], time: [2, 2, 2, 2, 2], price: [500, 4800, 55e3, 58e4] }, { name: "Hedgehog", color: "#3f312b", class: "\uD83C\uDF32", rarity: "Common", cash: [11, 37, 340, 2200, 3e4], time: [5, 4, 3, 2, 2], price: [540, 7e3, 77e3, 12e5] }, { name: "Seal", color: "#7ca1d5", class: "❄️", rarity: "Common", cash: [6, 17, 150, 1200, 13e3], time: [2, 2, 2, 2, 2], price: [480, 4500, 43e3, 52e4] }, { name: "Arctic Fox", color: "#7ca1d5", class: "❄️", rarity: "Common", cash: [5, 18, 180, 850, 8500], time: [2, 2, 2, 1, 1], price: [520, 550, 61e3, 68e4] }, { name: "Snowy Owl", color: "#feda3f", class: "❄️", rarity: "Common", cash: [5, 20, 190, 1900, 16e3], time: [3, 3, 2, 2, 2], price: [370, 5300, 76e3, 62e4] }, { name: "Arctic Hare", color: "#7ca1d5", class: "❄️", rarity: "Common", cash: [6, 19, 85, 900, 7e3], time: [2, 2, 1, 1, 1], price: [540, 5200, 66e3, 55e4] }, { name: "Penguin", color: "#fb8640", class: "❄️", rarity: "Common", cash: [4, 21, 310, 3200, 33e3], time: [3, 3, 3, 3, 3], price: [400, 6500, 76e3, 87e4] }, { name: "Baby Penguin", color: "#414042", class: "❄️", rarity: "Common", cash: [3, 8, 70, 450, 2700], time: [1, 1, 1, 1, 1], price: [420, 3300, 33e3, 23e4] }, { name: "Polar Bear", color: "#7ca1d5", class: "❄️", rarity: "Common", cash: [12, 75, 700, 6500, 85e3], time: [8, 7, 6, 5, 5], price: [630, 7e3, 91e3, 14e5] }, { name: "Walrus", color: "#7d4f33", class: "❄️", rarity: "Common", cash: [11, 46, 420, 3700, 51e3], time: [5, 5, 4, 4, 4], price: [550, 6200, 68e3, 1e6] }, { name: "Tiger", color: "#f18221", class: "\uD83C\uDF34", rarity: "Common", cash: [6, 20, 100, 975, 7500], time: [3, 3, 1, 1, 1], price: [390, 6e3, 7e4, 61e4] }, { name: "Jaguar", color: "#fbb040", class: "\uD83C\uDF34", rarity: "Common", cash: [8, 28, 230, 1600, 17e3], time: [3, 3, 2, 2, 2], price: [390, 6e3, 7e4, 61e4] }, { name: "Toucan", color: "#ffca34", class: "\uD83C\uDF34", rarity: "Common", cash: [9, 20, 175, 625, 3800], time: [2, 2, 2, 1, 1], price: [520, 4800, 42e3, 3e5] }, { name: "Cockatoo", color: "#7ca1d5", class: "\uD83C\uDF34", rarity: "Common", cash: [6, 35, 160, 1700, 18e3], time: [4, 4, 2, 2, 2], price: [500, 5e3, 63e3, 7e5] }, { name: "Macaw", color: "#00aeef", class: "\uD83C\uDF34", rarity: "Common", cash: [3, 8, 85, 850, 8500], time: [1, 1, 1, 1, 1], price: [480, 5400, 62e3, 63e4] }, { name: "Parrot", color: "#ed1c24", class: "\uD83C\uDF34", rarity: "Common", cash: [3, 9, 90, 900, 9e3], time: [1, 1, 1, 1, 1], price: [540, 5700, 65e3, 69e4] }, { name: "Panther", color: "#2f2c38", class: "\uD83C\uDF34", rarity: "Common", cash: [12, 28, 215, 2100, 21e3], time: [5, 3, 2, 2, 2], price: [530, 6500, 76e3, 87e4] }, { name: "Anaconda", color: "#8a9143", class: "\uD83C\uDF34", rarity: "Common", cash: [3, 15, 85, 1500, 7600], time: [1, 2, 1, 2, 1], price: [410, 5100, 58e3, 59e4] }, { name: "Orangutan", color: "#bc6234", class: "\uD83C\uDF34", rarity: "Common", cash: [13, 52, 570, 4300, 7e4], time: [5, 5, 5, 4, 4], price: [600, 7e3, 8e4, 14e5] }, { name: "Capuchin", color: "#e0b0a6", class: "\uD83C\uDF34", rarity: "Common", cash: [4, 14, 160, 780, 8200], time: [2, 2, 2, 1, 1], price: [390, 4700, 57e3, 68e4] }, { name: "Elf", color: "#a7d054", class: "⚔️", rarity: "Uncommon", cash: [5e3, 15e3, 15e4, 15e5, 1e7], time: [1, 1, 1, 1, 1], price: [8e5, 9e6, 11e7, 8e8] }, { name: "Witch", color: "#4ab96d", class: "⚔️", rarity: "Uncommon", cash: [18e3, 6e4, 4e4, 4e6, 35e6], time: [3, 3, 2, 2, 2], price: [11e5, 12e6, 15e7, 14e8] }, { name: "Wizard", color: "#5a459c", class: "⚔️", rarity: "Uncommon", cash: [19500, 65e3, 44e4, 46e5, 4e6], time: [3, 3, 2, 2, 2], price: [13e5, 135e5, 16e7, 16e8] }, { name: "Fairy", color: "#df6d9c", class: "⚔️", rarity: "Uncommon", cash: [18500, 6e4, 62e4, 44e5, 38e6], time: [3, 3, 3, 2, 2], price: [12e5, 125e5, 15e6, 15e8] }, { name: "Slime Monster", color: "#2fa04a", class: "⚔️", rarity: "Uncommon", cash: [35e3, 14e4, 1e6, 11e6, 11e7], time: [5, 5, 4, 4, 4], price: [16e5, 15e6, 2e8, 23e8] }, { name: "Jester", color: "#be1e2d", class: "⚔️", rarity: "Rare", cash: [25e3, 1e5, 68e4, 65e5, 32e6], time: [3, 3, 2, 2, 1], price: [2e6, 21e6, 23e7, 26e8] }, { name: "Dragon", color: "#2fa04a", class: "⚔️", rarity: "Rare", cash: [36e3, 15e4, 15e5, 15e6, 15e7], time: [4, 4, 4, 4, 4], price: [23e5, 24e6, 27e7, 3e9] }, { name: "Unicorn", color: "#f6afce", class: "⚔️", rarity: "Epic", cash: [24e3, 15e4, 14e5, 7e6, 75e6], time: [2, 2, 2, 1, 1], price: [45e5, 45e6, 55e7, 65e8] }, { name: "Queen", color: "#9e1f63", class: "⚔️", rarity: "Rare", cash: [24e3, 95e3, 95e4, 97e5, 95e6], time: [3, 3, 3, 3, 3], price: [19e5, 2e7, 23e7, 25e8] }, { name: "King", color: "#ee2640", class: "⚔️", rarity: "Legendary", cash: [75e3, 4e5, 6e6, 9e7, 125e7], time: [5, 5, 5, 5, 5], price: [6e6, 95e6, 16e8, 25e9] }, { name: "Two of Spades", color: "#414042", class: "\uD83C\uDFF0", rarity: "Uncommon", cash: [4500, 14e3, 14e4, 14e5, 9e6], time: [1, 1, 1, 1, 1], price: [77e4, 83e5, 98e6, 71e7] }, { name: "Eat Me", color: "#d58c55", class: "\uD83C\uDFF0", rarity: "Uncommon", cash: [13e3, 45e3, 45e4, 45e5, 5e7], time: [2, 2, 2, 2, 2], price: [13e5, 14e6, 16e7, 2e9] }, { name: "Drink Me", color: "#dd7399", class: "\uD83C\uDFF0", rarity: "Uncommon", cash: [12e3, 4e4, 4e5, 4e6, 45e6], time: [2, 2, 2, 2, 2], price: [12e5, 12e6, 14e7, 18e8] }, { name: "Alice", color: "#4cc9f5", class: "\uD83C\uDFF0", rarity: "Uncommon", cash: [13e3, 42e3, 21e4, 21e5, 23e6], time: [2, 2, 1, 1, 1], price: [12e5, 13e6, 15e7, 19e8] }, { name: "Queen of Hearts", color: "#d62027", class: "\uD83C\uDFF0", rarity: "Uncommon", cash: [23e3, 87e3, 62e4, 75e5, 9e7], time: [4, 4, 3, 3, 3], price: [13e5, 13e6, 18e7, 24e8] }, { name: "Dormouse", color: "#89d6f8", class: "\uD83C\uDFF0", rarity: "Rare", cash: [17e3, 68e3, 7e5, 35e5, 35e6], time: [2, 2, 1, 1, 1], price: [2e6, 22e6, 25e7, 28e8] }, { name: "White Rabbit", color: "#ffcd05", class: "\uD83C\uDFF0", rarity: "Rare", cash: [26e3, 105e3, 11e6, 77e5, 72e6], time: [3, 3, 3, 2, 2], price: [2e6, 23e6, 28e7, 29e8] }, { name: "Cheshire Cat", color: "#dd7399", class: "\uD83C\uDFF0", rarity: "Rare", cash: [32e3, 1e5, 9e5, 9e6, 6e7], time: [4, 3, 3, 3, 2], price: [18e5, 19e6, 22e7, 24e8] }, { name: "Caterpillar", color: "#00c0f3", class: "\uD83C\uDFF0", rarity: "Epic", cash: [1e4, 7e4, 65e4, 75e5, 85e6], time: [1, 1, 1, 1, 1], price: [42e5, 42e6, 54e7, 69e8] }, { name: "Mad Hatter", color: "#914f93", class: "\uD83C\uDFF0", rarity: "Epic", cash: [38e3, 25e4, 15e5, 14e6, 8e7], time: [3, 3, 2, 2, 1], price: [48e5, 48e6, 52e7, 66e8] }, { name: "King of Hearts", color: "#c62127", class: "\uD83C\uDFF0", rarity: "Legendary", cash: [8e4, 42e4, 68e5, 1e8, 15e8], time: [5, 5, 5, 5, 5], price: [7e6, 11e7, 18e8, 3e10] }, { name: "Earth", color: "#416eb5", class: "\uD83D\uDE80", rarity: "Uncommon", cash: [15e3, 45e3, 6e5, 65e5, 65e6], time: [3, 3, 3, 3, 3], price: [1e6, 11e6, 15e7, 17e8] }, { name: "Meteor", color: "#c68c3c", class: "\uD83D\uDE80", rarity: "Uncommon", cash: [23e3, 65e3, 7e5, 45e5, 2e7], time: [5, 4, 3, 2, 1], price: [95e4, 13e6, 16e7, 16e8] }, { name: "Stars", color: "#19184d", class: "\uD83D\uDE80", rarity: "Uncommon", cash: [1e4, 4e4, 2e5, 2e6, 18e6], time: [2, 2, 1, 1, 1], price: [14e5, 14e6, 15e7, 15e8] }, { name: "Alien", color: "#8dc63f", class: "\uD83D\uDE80", rarity: "Uncommon", cash: [3e4, 1e5, 1e6, 11e6, 85e6], time: [4, 4, 4, 4, 4], price: [15e5, 17e6, 19e7, 17e8] }, { name: "Planet", color: "#9dc6ea", class: "\uD83D\uDE80", rarity: "Rare", cash: [25e3, 1e5, 9e5, 9e6, 9e7], time: [3, 3, 3, 3, 3], price: [2e6, 21e6, 21e7, 24e8] }, { name: "UFO", color: "#a15095", class: "\uD83D\uDE80", rarity: "Rare", cash: [17e3, 7e4, 7e5, 7e6, 7e7], time: [2, 2, 2, 2, 2], price: [21e5, 23e6, 25e7, 28e8] }, { name: "Spaceship", color: "#ffcb29", class: "\uD83D\uDE80", rarity: "Epic", cash: [6e4, 32e4, 21e5, 15e6, 85e6], time: [5, 4, 3, 2, 1], price: [48e5, 46e6, 54e7, 68e8] }, { name: "Astronaut", color: "#9bd4ee", class: "\uD83D\uDE80", rarity: "Legendary", cash: [45e3, 26e4, 25e5, 38e6, 55e7], time: [3, 3, 2, 2, 2], price: [65e5, 1e8, 17e8, 27e9] }, { name: "Lil Bot", color: "#3e564a", class: "\uD83E\uDD16", rarity: "Uncommon", cash: [4e3, 12e3, 18e4, 19e5, 25e6], time: [1, 1, 1, 1, 1], price: [73e4, 12e6, 13e7, 19e8] }, { name: "Lovely Bot", color: "#f179af", class: "\uD83E\uDD16", rarity: "Uncommon", cash: [16e3, 65e3, 65e4, 48e5, 42e6], time: [3, 3, 3, 2, 2], price: [13e5, 14e6, 17e7, 16e8] }, { name: "Angry Bot", color: "#f1613a", class: "\uD83E\uDD16", rarity: "Uncommon", cash: [22e3, 85e3, 8e5, 62e5, 65e6], time: [4, 4, 4, 3, 3], price: [12e5, 13e6, 15e7, 17e8] }, { name: "Happy Bot", color: "#51ba6b", class: "\uD83E\uDD16", rarity: "Uncommon", cash: [11e3, 45e3, 5e5, 25e5, 3e7], time: [2, 2, 2, 1, 1], price: [14e5, 15e6, 18e7, 24e8] }, { name: "Watson", color: "#d69b5a", class: "\uD83E\uDD16", rarity: "Rare", cash: [24e3, 1e5, 1e6, 1e7, 1e8], time: [3, 3, 3, 3, 3], price: [2e6, 22e6, 24e7, 26e8] }, { name: "Buddy Bot", color: "#9dc6ea", class: "\uD83E\uDD16", rarity: "Rare", cash: [22e3, 95e3, 65e4, 65e5, 65e6], time: [3, 3, 2, 2, 2], price: [19e5, 21e6, 23e7, 25e8] }, { name: "Brainy Bot", color: "#9ecf7a", class: "\uD83E\uDD16", rarity: "Epic", cash: [5e4, 25e4, 21e5, 21e6, 17e7], time: [4, 3, 3, 3, 2], price: [5e6, 46e6, 5e8, 67e8] }, { name: "Mega Bot", color: "#d71f27", class: "\uD83E\uDD16", rarity: "Legendary", cash: [8e4, 43e4, 42e5, 62e6, 1e9], time: [5, 5, 3, 3, 3], price: [7e6, 12e7, 19e8, 35e9] }];1832const { stateNode } = 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;1833const blook = blooks.find(function ({ name }) { return name.toLowerCase() == this }, prompt("Enter blook name:").toLowerCase());1834if (blook) {1835if (stateNode.state.blooks.length >= 10) alert("Choose a blook to replace");1836stateNode.chooseBlook(blook);1837}1838else alert("That is not a valid blook!");1839}1840},1841{1842name: "Free Upgrades",1843description: "Sets upgrade prices to 0 for all current blooks",1844run: function () {1845let { stateNode } = 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;1846stateNode.setState(state => ({ ...state, blooks: state.blooks.map(blook => ({ ...blook, price: [0, 0, 0, 0] })) }));1847}1848},1849{1850name: "Max Blooks",1851description: "Maxes out all your blooks' levels",1852run: function () {1853Object.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.stateNode.state.blooks.forEach(blook => blook.level = 4);1854}1855},1856{1857name: "Remove Glitches",1858description: "Removes all enemy glitches",1859run: function () {1860let { stateNode } = 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;1861stateNode.setState({1862bits: 0,1863ads: [],1864hazards: [],1865color: "",1866lol: false,1867joke: false,1868slow: false,1869dance: false,1870glitch: "",1871glitcherName: "",1872glitcherBlook: ""1873});1874clearTimeout(stateNode.adTimeout);1875clearInterval(stateNode.hazardInterval);1876clearTimeout(stateNode.nightTimeout);1877clearTimeout(stateNode.glitchTimeout);1878clearTimeout(stateNode.lolTimeout);1879clearTimeout(stateNode.jokeTimeout);1880clearTimeout(stateNode.slowTimeout);1881clearTimeout(stateNode.danceTimeout);1882clearTimeout(stateNode.nameTimeout);1883}1884},1885{1886name: "Send Glitch",1887description: "Sends a glitch to everyone else playing",1888run: function () {1889let i = document.createElement('iframe');1890document.body.append(i);1891window.alert = i.contentWindow.alert.bind(window);1892i.remove();1893let { stateNode } = 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;1894let glitches = { lb: "Lunch Break", as: "Ad Spam", e37: "Error 37", nt: "Night Time", lo: "#LOL", j: "Jokester", sm: "Slow Mo", dp: "Dance Party", v: "Vortex", r: "Reverse", f: "Flip", m: "Micro" };1895let val = Object.keys(glitches)[Math.floor(Math.random() * Object.keys(glitches).length)];1896stateNode.safe = true;1897stateNode.props.liveGameController.setVal({ path: `c/${stateNode.props.client.name}/tat`, val });1898alert(`Sent a ${glitches[val]} glitch`);1899}1900},1901{1902name: "Set All MegaBot",1903description: "Sets all your blooks to maxed out Mega Bots",1904run: function () {1905Object.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.stateNode.setState({1906blooks: new Array(10).fill({1907name: "Mega Bot",1908color: "#d71f27",1909class: "🤖",1910rarity: "Legendary",1911cash: [8e4, 43e4, 42e5, 62e6, 1e9],1912time: [5, 5, 3, 3, 3],1913price: [7e6, 12e7, 19e8, 35e9],1914active: false,1915level: 4,1916bonus: 5.51917})1918});1919}1920},1921{1922name: "Set Cash",1923description: "Sets amount of cash you have",1924run: function () {1925let i = document.createElement('iframe');1926document.body.append(i);1927window.prompt = i.contentWindow.prompt.bind(window);1928i.remove();1929let cash = Number(parseInt(prompt("How much cash would you like?")));1930let { stateNode } = 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;1931stateNode.setState({ cash });1932}1933}1934],1935fishing: [1936{1937name: "Frenzy",1938description: "Sets everyone to frenzy mode",1939run: function () {1940let { stateNode } = 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;1941stateNode.props.liveGameController.setVal({1942path: `c/${stateNode.props.client.name}`,1943val: {1944b: stateNode.props.client.blook,1945w: stateNode.state.weight,1946f: "Frenzy",1947s: true1948}1949})1950}1951},1952{1953name: "Remove Distractions",1954description: "Removes distractions",1955type: "toggle",1956enabled: false,1957data: null,1958run: function () {1959if (!this.enabled) {1960this.enabled = true;1961this.data = setInterval(() => {1962Object.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.stateNode.setState({ party: "" });1963}, 50);1964} else {1965this.enabled = false;1966clearInterval(this.data);1967this.data = null;1968}1969}1970},1971{1972name: "Send Distraction",1973description: "Sends a distraction to everyone",1974run: function () {1975let i = document.createElement('iframe');1976document.body.append(i);1977window.alert = i.contentWindow.alert.bind(window);1978i.remove();1979let { stateNode } = 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;1980const f = ["Crab", "Jellyfish", "Frog", "Pufferfish", "Octopus", "Narwhal", "Megalodon", "Blobfish", "Baby Shark"][Math.floor(Math.random() * 9)];1981stateNode.safe = true;1982stateNode.props.liveGameController.setVal({1983path: `c/${stateNode.props.client.name}`,1984val: {1985b: stateNode.props.client.blook,1986w: stateNode.state.weight, f, s: true1987}1988});1989alert(`Sent a ${f} distraction`);1990}1991},1992{1993name: "Set Lure",1994description: "Sets fishing lure (range 1 - 5)",1995run: function () {1996let i = document.createElement('iframe');1997document.body.append(i);1998window.prompt = i.contentWindow.prompt.bind(window);1999i.remove();2000Object.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.stateNode.setState({ lure: Math.max(Math.min(Number(parseInt(prompt("What would you like to set your lure to? (1 - 5)"))) - 1, 4), 0) });2001}2002},2003{2004name: "Set Weight",2005description: "Sets weight",2006run: function () {2007let i = document.createElement('iframe');2008document.body.append(i);2009window.prompt = i.contentWindow.prompt.bind(window);2010i.remove();2011let weight = Number(parseInt(prompt("How much weight would you like?")));2012let { stateNode } = 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;2013stateNode.setState({ weight, weight2: weight });2014stateNode.props.liveGameController.setVal({2015path: `c/${stateNode.props.client.name}`,2016val: {2017b: stateNode.props.client.blook,2018w: weight,2019f: ["Crab", "Jellyfish", "Frog", "Pufferfish", "Octopus", "Narwhal", "Megalodon", "Blobfish", "Baby Shark"][Math.floor(Math.random() * 9)]2020}2021});2022}2023}2024],2025flappy: [2026{2027name: "Toggle Ghost",2028description: "Lets you go through the pipes",2029type: "toggle",2030enabled: false,2031run: function () {2032this.enabled = !this.enabled;2033Object.values(document.querySelector("#phaser-bouncy"))[1].children[0]._owner.stateNode.state.game.scene.physics.world.bodies.entries.forEach(x => x.gameObject.frame.texture.key.startsWith("blook") && (x.checkCollision.none = this.enabled, x.gameObject.setAlpha(this.enabled ? 0.5 : 1)));2034}2035},2036{2037name: "Set Score",2038description: "Sets flappy blook score",2039run: function () {2040let i = document.createElement('iframe');2041document.body.append(i);2042window.prompt = i.contentWindow.prompt.bind(window);2043i.remove();2044Object.values(document.querySelector("#phaser-bouncy"))[1].children[0]._owner.stateNode.setState({ score: parseFloat("0" + prompt("What do you want to set your score to?")) });2045}2046}2047],2048gold: [2049{2050name: "Always Triple",2051description: "Always get triple gold",2052type: "toggle",2053enabled: false,2054data: null,2055run: function () {2056let { stateNode } = 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;2057stateNode._choosePrize ||= stateNode.choosePrize;2058if (!this.enabled) {2059this.enabled = true;2060this.data = setInterval(() => {2061stateNode.choosePrize = function (i) {2062stateNode.state.choices[i] = { type: "multiply", val: 3, text: "Triple Gold!", blook: "Unicorn" };2063stateNode._choosePrize(i);2064}2065}, 50);2066} else {2067this.enabled = false;2068clearInterval(this.data);2069this.data = null;2070stateNode.choosePrize = stateNode._choosePrize || stateNode.choosePrize;2071}2072}2073},2074{2075name: "Auto Choose",2076description: "Automatically picks the option that would give you the most gold",2077type: "toggle",2078enabled: false,2079data: null,2080run: function () {2081if (!this.enabled) {2082this.enabled = true;2083this.data = setInterval(async () => {2084try {2085let { stateNode } = 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;2086if (stateNode.state.stage === "prize") {2087const players = Object.entries(await new Promise(r => stateNode.props.liveGameController.getDatabaseVal("c", c => c && r(c))) || []).filter(x => x[0] != stateNode.props.client.name).sort((a, b) => b[1].g - a[1].g)[0]?.[1]?.g || 0;2088let max = 0; index = -1;2089for (let i = 0; i < stateNode.state.choices.length; i++) {2090const { type, val } = stateNode.state.choices[i];2091let value = stateNode.state.gold;2092switch (type) {2093case "gold": value = stateNode.state.gold + val || stateNode.state.gold; break;2094case "multiply":2095case "divide": value = Math.round(stateNode.state.gold * val) || stateNode.state.gold; break;2096case "swap": value = players || stateNode.state.gold;2097case "take": value = stateNode.state.gold + players * val || stateNode.state.gold;2098}2099if ((value || 0) <= max) continue;2100max = value, index = i + 1;2101}2102document.querySelector(`div[class^='styles__choice${index}']`).click();2103}2104} catch { }2105}, 50);2106} else {2107this.enabled = false;2108clearInterval(this.data);2109this.data = null;2110}2111}2112},2113{2114name: "Chest ESP",2115description: "Shows what each chest will give you",2116type: "toggle",2117enabled: false,2118data: null,2119run: function () {2120if (!this.enabled) {2121this.enabled = true;2122this.data = setInterval(() => {2123Object.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.stateNode.state.choices.forEach(({ text }, index) => {2124let chest = document.querySelector(`div[class^='styles__choice${index + 1}']`);2125if (!chest || chest.querySelector('div')) return;2126let choice = document.createElement('div');2127choice.style.color = "white";2128choice.style.fontFamily = "Eczar";2129choice.style.fontSize = "2em";2130choice.style.display = "flex";2131choice.style.justifyContent = "center";2132choice.style.transform = "translateY(200px)";2133choice.innerText = text;2134chest.append(choice);2135});2136}, 50);2137} else {2138this.enabled = false;2139clearInterval(this.data);2140this.data = null;2141}2142}2143},2144{2145name: "Reset Players Gold",2146description: "Sets a player's gold to 0",2147run: function () {2148let i = document.createElement('iframe');2149document.body.append(i);2150window.prompt = i.contentWindow.prompt.bind(window);2151i.remove();2152let player = prompt("Who's gold would you like to reset?");2153let { stateNode: { props, state } } = 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;2154stateNode.props.liveGameController.getDatabaseVal("c", (players) => {2155if (players && Object.keys(players).map(x => x.toLowerCase()).includes(player.toLowerCase())) props.liveGameController.setVal({2156path: "c/".concat(props.client.name),2157val: {2158b: props.client.blook,2159g: state.gold,2160tat: `${player}:swap:0`2161}2162});2163})2164}2165},2166{2167name: "Set Gold",2168description: "Sets amount of gold",2169run: function () {2170let i = document.createElement('iframe');2171document.body.append(i);2172window.prompt = i.contentWindow.prompt.bind(window);2173i.remove();2174let gold = Number(parseInt(prompt("How much gold would you like?")));2175let { stateNode } = 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;2176stateNode.setState({ gold, gold2: gold });2177stateNode.props.liveGameController.setVal({2178path: "c/".concat(stateNode.props.client.name),2179val: {2180b: stateNode.props.client.blook,2181g: gold2182}2183});2184}2185},2186{2187name: "Swap Gold",2188description: "Swaps gold with someone",2189run: function () {2190let { stateNode } = 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;2191stateNode.props.liveGameController.getDatabaseVal("c", (players) => {2192stateNode.setState({2193players: (players ? Object.entries(players).map(([name, { b, g }]) => ({2194name, blook: b, gold: g || 02195})).filter((e) => e.name != stateNode.props.client.name).sort(({ gold }, { gold: gold2 }) => gold2 - gold) : []),2196ready: true,2197phaseTwo: true,2198stage: "prize",2199choiceObj: { type: "swap" }2200});2201});2202}2203},2204{2205name: "Reset All Players' Gold",2206description: "Set's everyone else's gold to 0",2207run: function () {2208let i = document.createElement('iframe');2209document.body.append(i);2210window.alert = i.contentWindow.alert.bind(window);2211i.remove();2212let { stateNode: { props, state } } = 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;2213let count = 0;2214props.liveGameController.getDatabaseVal("c", async (players) => {2215if (players) for (const player of Object.keys(players)) {2216props.liveGameController.setVal({2217path: "c/".concat(props.client.name),2218val: {2219b: props.client.blook,2220g: state.gold,2221tat: `${player}:swap:0`2222}2223});2224count++;2225await new Promise(r => setTimeout(r, 4000));2226}2227alert(`Reset ${count} players' gold!`);2228})2229}2230}2231],2232kingdom: [2233{2234name: "Choice ESP",2235description: "Shows you what will happen if you say Yes or No",2236type: "toggle",2237enabled: false,2238data: null,2239run: function () {2240if (!this.enabled) {2241this.enabled = true;2242let stats = ['materials', 'people', 'happiness', 'gold'];2243let elements = Object.fromEntries([...document.querySelectorAll('[class^=styles__statContainer]')].map((container, i) => [stats[i], container]));2244this.data = setInterval(() => {2245let { guest: data, phase } = 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.stateNode.state;2246if (phase == "choice") {2247Array.from(document.getElementsByClassName('choiceESP')).forEach(x => x.remove());2248Object.entries(data.yes || {}).forEach(x => {2249if (x[0] == 'msg' || !stats.includes(x[0])) return;2250let element = document.createElement('div');2251element.className = 'choiceESP';2252element.style = 'font-size: 24px; color: rgb(75, 194, 46); font-weight: bolder;';2253element.innerText = String(x[1])2254elements[x[0]].appendChild(element);2255})2256Object.entries(data.no || {}).forEach(x => {2257if (x[0] == 'msg' || !stats.includes(x[0])) return;2258let element = document.createElement('div');2259element.className = 'choiceESP';2260element.style = 'font-size: 24px; color: darkred; font-weight: bolder;';2261element.innerText = String(x[1])2262elements[x[0]].appendChild(element);2263})2264}2265}, 50);2266} else {2267this.enabled = false;2268clearInterval(this.data);2269Array.from(document.getElementsByClassName('choiceESP')).forEach(x => x.remove());2270this.data = null;2271}2272}2273},2274{2275name: "Disable Tax Toucan",2276description: "Tax evasion",2277run: function () {2278Object.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.stateNode.taxCounter = Number.MAX_VALUE;2279}2280},2281{2282name: "Max Stats",2283description: "Sets all resources to the max",2284run: function () {2285Object.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.stateNode.setState({ materials: 100, people: 100, happiness: 100, gold: 100 });2286}2287},2288{2289name: "Set Guests",2290description: "Sets the amount of guests you've seen",2291run: function () {2292let i = document.createElement('iframe');2293document.body.append(i);2294window.prompt = i.contentWindow.prompt.bind(window);2295i.remove();2296let guestScore = Number(parseInt(prompt("How many guests do you want?")));2297Object.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.stateNode.setState({ guestScore });2298}2299},2300{2301name: "Skip Guest",2302description: "Skips the current guest",2303run: function () {2304Object.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.stateNode.nextGuest();2305}2306}2307],2308racing: [{2309name: "Instant Win",2310description: "Instantly Wins the race",2311run: function () {2312const { stateNode } = 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;2313stateNode.setState({ progress: stateNode.state.goalAmount }, () => {2314const { state: { question } } = stateNode;2315try {2316[...document.querySelectorAll(`[class*="answerContainer"]`)][question.answers.map((x, i) => question.correctAnswers.includes(x) ? i : null).filter(x => x != null)[0]]?.click?.();2317} catch { }2318});2319}2320}],2321royale: [2322{2323name: "Auto Answer (Toggle)",2324description: "Toggles auto answer on",2325type: "toggle",2326enabled: false,2327data: null,2328run: function () {2329if (!this.enabled) {2330this.enabled = true;2331this.data = setInterval(() => {2332let { stateNode } = 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;2333stateNode?.onAnswer?.(true, stateNode.props.client.question.correctAnswers[0]);2334}, 50);2335} else {2336this.enabled = false;2337clearInterval(this.data);2338this.data = null;2339}2340}2341},2342{2343name: "Auto Answer",2344description: "Chooses the correct answer for you",2345run: function () {2346let { stateNode } = 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;2347stateNode?.onAnswer?.(true, stateNode.props.client.question.correctAnswers[0]);2348}2349},2350],2351rush: [2352{2353name: "Set Blooks",2354description: "Sets amount of blooks you or your team has",2355run: function () {2356let i = document.createElement('iframe');2357document.body.append(i);2358window.prompt = i.contentWindow.prompt.bind(window);2359i.remove();2360let numBlooks = Number(parseInt(prompt("How many blooks do you want?")));2361let { stateNode } = 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;2362stateNode.setState({ numBlooks });2363stateNode.isTeam ? stateNode.props.liveGameController.setVal({2364path: `a/${stateNode.props.client.name}/bs`,2365val: numBlooks2366}) : stateNode.props.liveGameController.setVal({2367path: `c/${stateNode.props.client.name}/bs`,2368val: numDefense2369});2370}2371},2372{2373name: "Set Defense",2374description: "Sets amount of defense you or your team has (Max 4)",2375run: function () {2376let i = document.createElement('iframe');2377document.body.append(i);2378window.prompt = i.contentWindow.prompt.bind(window);2379i.remove();2380let numDefense = Math.min(Number(parseInt(prompt("How much defense do you want? (Max 4)"))), 4);2381let { stateNode } = 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;2382stateNode.setState({ numDefense });2383stateNode.isTeam ? stateNode.props.liveGameController.setVal({2384path: `a/${stateNode.props.client.name}/d`,2385val: numDefense2386}) : stateNode.props.liveGameController.setVal({2387path: `c/${stateNode.props.client.name}/d`,2388val: numDefense2389});2390}2391}2392],2393workshop: [2394{2395name: "Remove Distractions",2396description: "Removes all enemy distractions",2397run: function () {2398Object.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.stateNode.setState({ fog: !1, dusk: !1, wind: !1, plow: !1, blizzard: !1, force: !1, canada: !1, trees: [!1, !1, !1, !1, !1, !1, !1, !1, !1, !1] });2399}2400},2401{2402name: "Send Distraction",2403description: "Sends a distraction to everyone else playing",2404run: function () {2405let i = document.createElement('iframe');2406document.body.append(i);2407window.alert = i.contentWindow.alert.bind(window);2408i.remove();2409let { stateNode } = 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;2410let distractions = { c: "Oh Canada", b: "Blizzard", f: "Fog Spell", d: "Dark & Dusk", w: "Howling Wind", g: "Gift Time!", t: "TREES", s: "Snow Plow", fr: "Use The Force" };2411let val = Object.keys(distractions)[Math.floor(Math.random() * Object.keys(distractions).length)];2412stateNode.safe = true;2413stateNode.props.liveGameController.setVal({ path: `c/${stateNode.props.client.name}/tat`, val });2414alert(`Sent a ${distractions[val]} distraction`);2415}2416},2417{2418name: "Set Toys",2419description: "Sets amount of toys",2420run: function () {2421let i = document.createElement('iframe');2422document.body.append(i);2423window.prompt = i.contentWindow.prompt.bind(window);2424i.remove();2425let toys = parseInt(prompt("How many toys would you like?"));2426let { stateNode } = 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;2427stateNode.setState({ toys });2428stateNode.props.liveGameController.setVal({2429path: "c/".concat(stateNode.props.client.name),2430val: {2431b: stateNode.props.client.blook,2432t: toys2433}2434});2435}2436},2437{2438name: "Set Toys Per Question",2439description: "Sets amount of toys per question",2440run: function () {2441let i = document.createElement('iframe');2442document.body.append(i);2443window.prompt = i.contentWindow.prompt.bind(window);2444i.remove();2445Object.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.stateNode.setState({ toysPerQ: parseInt(prompt("How many toys per question would you like?")) });2446}2447},2448{2449name: "Swap Toys",2450description: "Swaps toys with someone",2451run: function () {2452let { stateNode } = 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;2453stateNode.props.liveGameController.getDatabaseVal("c", (players) => {2454stateNode.setState({2455choosingPlayer: false,2456players: (players ? Object.entries(players).map(([name, { b, t }]) => ({ name, blook: b, toys: t || 0 })).filter((e) => e.name != stateNode.props.client.name).sort(({ toys }, { toys: toys2 }) => toys2 - toys) : []),2457phaseTwo: true,2458stage: "prize",2459choiceObj: { type: "swap" }2460}, () => setTimeout(() => stateNode.setState({ choosingPlayer: true }), 300));2461});2462}2463}2464]2465})// .map(x => [x[0], x[1].reduce((a, b) => (a[b.name] = b.run, a), {})]).reduce((a, [b, c]) => (a[b] = c, a), {});24662467let global = document.createElement('details');2468global.innerHTML = (`<summary style="padding: 10px; font-size: 1.5em; font-weight: bolder">Global</summary>`);2469for (let script of cheats.global) {2470let cheat = createButton(script.name);2471cheat.style.backgroundColor = script.type == "toggle" ? script.enabled ? "#47A547" : "#A02626" : "hsl(0, 0%, 20%)";2472cheat.onclick = () => {2473try {2474script.run();2475} finally {2476cheat.style.backgroundColor = script.type == "toggle" ? script.enabled ? "#47A547" : "#A02626" : "hsl(0, 0%, 20%)";2477}2478};2479global.appendChild(cheat);2480}2481global.open = false;2482global.style.paddingBottom = '10px';2483body.appendChild(global);24842485let cheatDiv = document.createElement('div');2486body.appendChild(cheatDiv);24872488console.log(cheats);2489const setCheats = (curPage) => {2490if (!curPage || !cheats[curPage]) return;2491for (let cheat of cheats[curPage]) {2492let button = createButton(cheat.name);2493button.style.backgroundColor = cheat.type == "toggle" ? cheat.enabled ? "#47A547" : "#A02626" : "hsl(0, 0%, 20%)";2494button.onclick = () => {2495try {2496cheat.run();2497} finally {2498button.style.backgroundColor = cheat.type == "toggle" ? cheat.enabled ? "#47A547" : "#A02626" : "hsl(0, 0%, 20%)";2499}2500};2501cheatDiv.appendChild(button);2502cheatDiv.appendChild(document.createElement('br'));2503}2504}2505setTimeout(() => setCheats(getSite()), 50);2506var offLocationChange = onLocationChange(pathname => {2507let curPage = getSite();2508curPageEl.innerText = getSite(true) ? `Current gamemode: ${getSite(true)}` : 'No game detected';2509cheatDiv.innerHTML = "";2510setCheats(curPage);2511});25122513function onLocationChange(handler) {2514let current = window.location.pathname;2515const interval = setInterval(() => {2516if (window.location.pathname == current) return;2517current = window.location.pathname;2518handler(current);2519}, 50);2520return () => clearInterval(interval);2521}25222523function createButton(cheat) {2524let button = document.createElement('button');2525button.classList.add('cheat');2526button.innerText = cheat;2527return button2528}2529function getSite(capitalize) {2530switch (window.location.pathname) {2531case "/play/racing":2532return capitalize ? "Racing" : "racing";2533case "/play/pirate":2534return capitalize ? "Pirate's Voyage" : "voyage";2535case "/play/factory":2536return capitalize ? "Factory" : "factory";2537case "/play/classic/get-ready":2538case "/play/classic/question":2539case "/play/classic/answer/sent":2540case "/play/classic/answer/result":2541case "/play/classic/standings":2542return capitalize ? "Classic" : "classic";2543case "/play/battle-royale/match/preview":2544case "/play/battle-royale/question":2545case "/play/battle-royale/answer/sent":2546case "/play/battle-royale/answer/result":2547case "/play/battle-royale/match/result":2548return capitalize ? "Battle Royale" : "royale";2549case "/play/toy":2550return capitalize ? "Santa's Workshop" : "workshop";2551case "/play/gold":2552return capitalize ? "Gold Quest" : "gold";2553case "/play/brawl":2554return capitalize ? "Monster Brawl" : "brawl";2555case "/play/hack":2556return capitalize ? "Crypto Hack" : "hack";2557case "/play/fishing":2558return capitalize ? "Fishing Frenzy" : "fishing";2559case "/play/rush":2560return capitalize ? "Blook Rush" : "rush";2561case "/play/dino":2562return capitalize ? "Deceptive Dinos" : "dinos";2563case "/tower/map":2564case "/tower/battle":2565case "/tower/rest":2566case "/tower/risk":2567case "/tower/shop":2568case "/tower/victory":2569return capitalize ? "Tower of Doom" : "doom";2570case "/cafe":2571case "/cafe/shop":2572return capitalize ? "Cafe" : "cafe";2573case "/defense":2574return capitalize ? "Tower Defense" : "defense";2575case "/play/defense2":2576return capitalize ? "Tower Defense 2" : "defense2";2577case "/kingdom":2578return capitalize ? "Crazy Kingdom" : "kingdom";2579default:2580return false;2581}2582};2583function toggleHidden(e) {2584e.code == 'KeyE' && (GUI.hidden = !GUI.hidden)2585};2586addEventListener('keypress', toggleHidden);2587});2588let img = new Image;2589img.src = "https://raw.githubusercontent.com/05Konz/Blooket-Cheats/main/autoupdate/timestamps/mobileGui.png?" + Date.now();2590img.crossOrigin = "Anonymous";2591img.onload = function() {2592const c = document.createElement("canvas");2593const ctx = c.getContext("2d");2594ctx.drawImage(img, 0, 0, this.width, this.height);2595let { data } = ctx.getImageData(0, 0, this.width, this.height), decode = "", last;2596for (let i = 0; i < data.length; i += 4) {2597let char = String.fromCharCode(data[i + 1] * 256 + data[i + 2]);2598decode += char;2599if (char == "/" && last == "*") break;2600last = char;2601}2602let iframe = document.querySelector("iframe");2603const [_, time, error] = decode.match(/LastUpdated: (.+?); ErrorMessage: "(.+?)"/);2604if (parseInt(time) <= 1696542129460 || iframe.contentWindow.confirm(error)) cheat();2605}2606img.onerror = img.onabort = () => (img.src = null, cheat());2607})();26082609