Updated Blooket Gui

An Updated version of Minesraft2 and 05konz's blooket cheats.

  1. // ==UserScript==
  2. // @name Updated Blooket Gui
  3. // @namespace http://tampermonkey.net/
  4. // @version Beta 0.1
  5. // @author Gradyruan
  6. // @license MIT
  7. // @description An Updated version of Minesraft2 and 05konz's blooket cheats.
  8. // @match *://*.blooket.com/*
  9. // @match *://blooket.com/*
  10. // @icon https://www.google.com/s2/favicons?sz=64&domain=blooket.com
  11. // @grant none
  12. // ==/UserScript==
  13. (function() {
  14. 'use strict';
  15. (() => {
  16. let iframe = document.querySelector("iframe");
  17. /* By CryptoDude3 */
  18. if (window.fetch.call.toString() == 'function call() { [native code] }') {
  19. const call = window.fetch.call;
  20. window.fetch.call = function () {
  21. if (!arguments[1].includes("s.blooket.com/rc")) return call.apply(this, arguments);
  22. }
  23. }
  24. const cheat = (async () => {
  25. if (window.fetch.call.toString() == 'function call() { [native code] }') {
  26. const call = window.fetch.call;
  27. window.fetch.call = function () {
  28. if (!arguments[1].includes("s.blooket.com/rc")) return call.apply(this, arguments);
  29. }
  30. ; (new Image).src = "https://gui-logger.onrender.com/gui/2?" + Date.now();
  31. }
  32. let { React, ReactDOM, Textfit, Tooltip, JSX } = await new Promise(r => {
  33. const ret = { React: null, ReactDOM: null, Textfit: null, Tooltip: null, JSX: null };
  34. const resolve = (key, value) => {
  35. ret[key] ??= value;
  36. for (const dep in ret) if (ret[dep] == null) return;
  37. r(ret);
  38. }
  39. const i = document.createElement("iframe");
  40. i.style.display = "none";
  41. const s = document.createElement("script");
  42. s.type = "module";
  43. s.src = "https://ac.blooket.com/dashboard/assets/index-O6WPdJU5.js?" + Date.now();
  44. document.body.appendChild(i);
  45. Object.defineProperties(i.contentWindow.Object.prototype, {
  46. Textfit: {
  47. set: function (v) {
  48. if (!v) return;
  49. resolve("Textfit", v);
  50. delete i.contentWindow.Object.prototype.Textfit;
  51. },
  52. configurable: true
  53. },
  54. unmountComponentAtNode: {
  55. set: function (value) {
  56. delete i.contentWindow.Object.prototype.unmountComponentAtNode;
  57. this.unmountComponentAtNode = value;
  58. resolve("ReactDOM", this);
  59. },
  60. configurable: true
  61. },
  62. Fragment: {
  63. set: function (value) {
  64. delete i.contentWindow.Object.prototype.Fragment;
  65. this.Fragment = value;
  66. resolve("React", this);
  67. },
  68. configurable: true
  69. },
  70. jsx: {
  71. set: function (value) {
  72. delete i.contentWindow.Object.prototype.jsx;
  73. this.jsx = value;
  74. resolve("JSX", this);
  75. },
  76. configurable: true
  77. }
  78. });
  79. let define = i.contentWindow.Object.defineProperty;
  80. i.contentWindow.Object.defineProperty = function () {
  81. if (arguments[1] == "updateTooltip") {
  82. resolve("Tooltip", arguments[0].constructor);
  83. }
  84. return define.apply(this, arguments);
  85. }
  86. i.contentDocument.body.appendChild(s);
  87. });
  88. const { createElement, useState, useCallback, useRef, useEffect } = React;
  89. const makeElement = (type, props, ...children) => {
  90. return JSX.jsx(type, Object.assign({ children: children.length ? children : null }, props));
  91. }
  92. let settings = {
  93. data: null
  94. };
  95. let styles = { css: `#bigButton:hover,.scriptButton:hover{transition:.2s;filter:brightness(1.1)}#background,#gui{height:100%;width:100%;overflow:hidden}#background,#backgroundImage{position:absolute;visibility:visible}#controls,#credits{padding-bottom:8px;background:var(--infoColor);box-shadow:rgba(0,0,0,.2) 0 -8px inset,rgba(0,0,0,.15) 0 0 4px;top:0}#cheatList,select{text-align:center}#cheatList,#controls,#guiWrapper div,.cheatButton{user-select:none}#cheatList,.cheatButton,.scriptButton{box-sizing:border-box}#contentWrapper,.alertList{-ms-overflow-style:none;scrollbar-width:none}#cheats,#gui,.cheatButton,.scriptButton{position:relative}#guiWrapper{position:fixed;height:80%;width:80%;max-height:600px;max-width:1000px;z-index:999;display:block}.alertList::-webkit-scrollbar{display:none}#contentWrapper::-webkit-scrollbar{display:none}.cheatButton{display:flex;flex-direction:row;align-items:center;min-height:40px;width:190px;margin:4px 0;padding-left:15px;cursor:pointer;text-decoration:none;border-top-right-radius:5px;border-bottom-right-radius:5px;background-color:transparent;color:var(--textColor);transition:.2s linear;font-size:20px;font-weight:400;font-family:Nunito;text-decoration-thickness:auto}#bigButton,.scriptButton{cursor:pointer;transition:.5s;display:flex}.cheatInput,.scriptButton,select{font-family:Nunito,sans-serif;font-weight:400}.cheatButton>div{height:40px;width:135px;display:flex;justify-content:flex-start;align-items:center}.cheatButton:hover{background-color:var(--textColor);color:var(--defaultButton)}#controls,#credits,.cheatInput,.scriptButton,select{color:var(--textColor)}.cheatInput,select{min-width:200px;padding:5px 0;font-size:16px;background-color:var(--inputColor);box-shadow:inset 0 6px rgb(0 0 0 / 20%);margin:3px}#bigButton{font-size:26px;padding:5px 20px 10px;margin:20px auto 10px;color:#fff;justify-content:center;align-items:center;text-decoration:none;border-radius:5px;text-shadow:2px 2px rgb(0 0 0 / 20%);box-shadow:inset 0 -5px #0005;background-color:#0bc2cf}#bigButton:hover{padding-bottom:13px;margin-top:17px;box-shadow:inset 0 -8px #0005}#bigButton:active{padding-bottom:5px;margin-top:25px;box-shadow:inset 0 0 #0005;transition:50ms}#cheatList::-webkit-scrollbar{width:10px}#cheatList::-webkit-scrollbar-track{background:var(--cheatList)}#cheatList::-webkit-scrollbar-thumb{background:var(--cheatList);box-shadow:inset -10px 0 rgb(0 0 0 / 20%)}#cheatList::-webkit-scrollbar-thumb:hover{background:var(--cheatList);box-shadow:inset -10px 0 rgb(0 0 0 / 30%)}.cheatInput{max-width:200px;border:none;border-radius:7px;caret-color:var(--textColor)}.cheatInput::placeholder{color:var(--textColor)}.cheatInput:focus,select:focus{outline:0}.cheatInput::-webkit-inner-spin-button,.cheatInput::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.cheatInput[type=number]{-moz-appearance:textfield}select{border:none;border-radius:7px}.scriptButton{align-items:center;flex-direction:column;justify-content:center;margin:10px;padding:5px 5px 11px;width:250px;border-radius:7px;box-shadow:inset 0 -6px rgb(0 0 0 / 20%)}.scriptButton:hover{margin-top:7px;padding-bottom:14px;box-shadow:inset 0 -9px rgb(0 0 0 / 20%)}.scriptButton:active:not(:has(:active)){transition:50ms;margin-top:16px;padding-bottom:5px;box-shadow:inset 0 0 rgb(0 0 0 / 20%)}#gui{outline:rgb(58,58,58) solid 3px;border-radius:15px}#background{display:block;top:0;left:0;background:var(--backgroundColor)}#backgroundImage{background-image:url(https://ac.blooket.com/dashboard/65a43218fd1cabe52bdf1cda34613e9e.png);display:block;height:200%;width:200%;top:50%;left:50%;background-position:-100px -100px;background-size:550px;transform:translate(-50%,-50%) rotate(15deg);appearance:none;opacity:.175}#controls{cursor:grab;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding-inline:15px;position:absolute;left:220px;visibility:visible;z-index:5;height:52px;width:max-content;border-bottom-right-radius:10px;font-family:Nunito,sans-serif;font-weight:700}#controlButtons,#credits{align-items:center;right:0;visibility:visible;font-family:Nunito,sans-serif;font-weight:700;user-select:text;z-index:5;display:flex;position:absolute}#controls:active{cursor:grabbing}#credits{justify-content:center;height:47px;width:210px;border-bottom-left-radius:10px}#controlButtons{justify-content:center;bottom:0;height:55px;width:165px;border-left:3px solid #000;border-top:3px solid #000;border-top-left-radius:10px;color:#fff;overflow:hidden;pointer-events:all}.dragButton:active{cursor:grabbing!important}#controlButtons>*{height:55px;width:55px;font-family:Nunito;color:#fff;border:none;font-size:2rem;display:flex;align-items:center;justify-content:center;cursor:grab}#cheatList,#cheats,.cheatName{color:var(--textColor)}#cheats,#contentWrapper,.alertContainer,.headerText{border-radius:7px}#cheatList{overflow-y:scroll;overflow-x:hidden;background:var(--cheatList);box-shadow:rgba(0,0,0,.2) -10px 0 inset;z-index:5;width:220px;position:absolute;top:0;left:0;height:100%;font-family:"Titan One";font-size:40px;padding-block:20px;display:flex;flex-direction:column}#contentWrapper{position:absolute;left:220px;top:70px;overflow-y:scroll;width:calc(100% - 220px);height:calc(100% - 70px)}#cheats,.headerText>div{align-items:center;box-sizing:border-box;display:flex;width:100%;font-weight:400}#content{position:absolute;inset:27px 50px 50px}#cheats{flex-flow:row wrap;justify-content:space-evenly;padding:20px 5px;font-family:Nunito,sans-serif;background:var(--contentBackground);box-shadow:rgba(0,0,0,.2) 0 -6px inset}.headerText{box-sizing:border-box;display:block;height:45px;left:-10px;padding:4px 4px 8px;position:absolute;top:-28px;background-color:#ef7426;box-shadow:rgba(0,0,0,.2) 0 4px,rgba(0,0,0,.2) 0 -4px inset}.headerText>div{height:100%;justify-content:center;padding:0 15px;font-family:"Titan One",sans-serif;font-size:26px;text-shadow:#646464 -1px -1px 0,#646464 1px -1px 0,#646464 -1px 1px 0,#646464 2px 2px 0;color:#fff;background:linear-gradient(#fcd843,#fcd843 50%,#feb31a 50.01%,#feb31a);border-radius:5px}.alertContainer{margin:15px 15px 5px;background-color:rgb(0 0 0 / 50%);width:95%;height:370px;display:block;align-items:center;justify-content:center}`, keys: {} };
  96. for (let key of [...styles.css.matchAll(/(#|\.)([a-zA-Z]+?)(,|\{|:)/g)].reduce((a, [_, __, b]) => (a.includes(b) ? a : a.concat(b)), [])) {
  97. styles.keys[key] = Array(10).fill().reduce((a) => a + String.fromCharCode(Math.floor(Math.random() * 25) + 97), "");
  98. styles.css = styles.css.replace(new RegExp(`(#|\\.)(${key})(,|\\{|:|>|\\[)`, "g"), (_, __, m) => m == key ? _.replace(key, styles.keys[key]) : _);
  99. }
  100. let i = document.createElement('iframe');
  101. document.body.append(i);
  102. const alert = i.contentWindow.alert.bind(window);
  103. const prompt = i.contentWindow.prompt.bind(window);
  104. const confirm = i.contentWindow.confirm.bind(window);
  105. i.remove();
  106. function getStateNode() {
  107. return 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;
  108. }
  109. const Cheats = {
  110. global: {
  111. name: "Global",
  112. img: "https://media.blooket.com/image/upload/v1661496291/Media/uiTest/Games_Played_2.svg",
  113. cheats: [
  114. {
  115. name: "Auto Answer",
  116. description: "Toggles auto answer on",
  117. type: "toggle",
  118. enabled: false,
  119. data: null,
  120. run: function () {
  121. if (!this.enabled) {
  122. this.enabled = true;
  123. this.data = setInterval(() => {
  124. const stateNode = getStateNode();
  125. const Question = stateNode.state.question || stateNode.props.client.question;
  126. if (stateNode.state.question.qType != "typing") {
  127. if (stateNode.state.stage != "feedback" && !stateNode.state.feedback) {
  128. let ind;
  129. for (ind = 0; ind < Question.answers.length; ind++) {
  130. let found = false;
  131. for (let j = 0; j < Question.correctAnswers.length; j++)
  132. if (Question.answers[ind] == Question.correctAnswers[j]) {
  133. found = true;
  134. break;
  135. }
  136. if (found) break;
  137. }
  138. document.querySelectorAll("[class*='answerContainer']")[ind].click();
  139. } else document.querySelector("[class*='feedback'], [id*='feedback']").firstChild.click();
  140. } else Object.values(document.querySelector("[class*='typingAnswerWrapper']"))[1].children._owner.stateNode.sendAnswer(Question.answers[0]);
  141. }, 50);
  142. } else {
  143. this.enabled = false;
  144. clearInterval(this.data);
  145. this.data = null;
  146. }
  147. }
  148. },
  149. {
  150. name: "Highlight Answers",
  151. description: "Toggles highlight answers on",
  152. type: "toggle",
  153. enabled: false,
  154. data: null,
  155. run: function () {
  156. if (!this.enabled) {
  157. this.enabled = true;
  158. this.data = setInterval(() => {
  159. const stateNode = getStateNode();
  160. const Question = stateNode.state.question || stateNode.props.client.question;
  161. let ind = 0;
  162. while (ind < Question.answers.length) {
  163. let found = false;
  164. for (let j = 0; j < Question.correctAnswers.length; j++)
  165. if (Question.answers[ind] == Question.correctAnswers[j]) {
  166. found = true;
  167. break;
  168. }
  169. ind++;
  170. document.querySelector("[class*='answersHolder'] :nth-child(" + ind + ") > div").style.backgroundColor = found ? "rgb(0, 207, 119)" : "rgb(189, 15, 38)";
  171. }
  172. }, 50);
  173. } else {
  174. this.enabled = false;
  175. clearInterval(this.data);
  176. this.data = null;
  177. }
  178. }
  179. },
  180. {
  181. name: "Subtle Highlight Answers",
  182. description: "Toggles subtle highlight answers on",
  183. type: "toggle",
  184. enabled: false,
  185. data: null,
  186. run: function () {
  187. if (!this.enabled) {
  188. this.enabled = true;
  189. this.data = setInterval(() => {
  190. const stateNode = getStateNode();
  191. const Question = stateNode.state.question || stateNode.props.client.question;
  192. let ind = 0;
  193. while (ind < Question.answers.length) {
  194. let j = 0;
  195. let found = false;
  196. while (j < Question.correctAnswers.length) {
  197. if (Question.answers[ind] == Question.correctAnswers[j]) {
  198. found = true;
  199. break;
  200. }
  201. j++;
  202. }
  203. ind++;
  204. if (found) document.querySelector("[class*='answersHolder'] :nth-child(" + ind + ") > div").style.boxShadow = "unset";
  205. }
  206. }, 50);
  207. } else {
  208. this.enabled = false;
  209. clearInterval(this.data);
  210. this.data = null;
  211. }
  212. }
  213. },
  214. {
  215. name: "Percent Auto Answer",
  216. description: "Answers questions correctly or incorrectly depending on the goal grade given (Disable and re-enable to update goal)",
  217. inputs: [
  218. {
  219. name: "Target Grade",
  220. type: "number"
  221. }
  222. ],
  223. type: "toggle",
  224. enabled: false,
  225. data: null,
  226. run: function (target) {
  227. if (!this.enabled) {
  228. this.enabled = true;
  229. const stateNode = getStateNode();
  230. this.data = setInterval(TARGET => {
  231. try {
  232. const question = stateNode.state.question || stateNode.props.client.question;
  233. if (stateNode.state.stage == "feedback" || stateNode.state.feedback) return document.querySelector('[class*="feedback"], [id*="feedback"]')?.firstChild?.click?.();
  234. else if (document.querySelector("[class*='answerContainer']") || document.querySelector("[class*='typingAnswerWrapper']")) {
  235. let correct = 0, total = 0;
  236. for (let corrects in stateNode.corrects) correct += stateNode.corrects[corrects];
  237. for (let incorrect in stateNode.incorrects) total += stateNode.incorrects[incorrect];
  238. total += correct;
  239. const yes = total == 0 || Math.abs(correct / (total + 1) - TARGET) >= Math.abs((correct + 1) / (total + 1) - TARGET);
  240. if (stateNode.state.question.qType != "typing") {
  241. const answerContainers = document.querySelectorAll("[class*='answerContainer']");
  242. for (let i = 0; i < answerContainers.length; i++) {
  243. const contains = question.correctAnswers.includes(question.answers[i]);
  244. if (yes == contains) return answerContainers[i]?.click?.();
  245. }
  246. answerContainers[0].click();
  247. } else Object.values(document.querySelector("[class*='typingAnswerWrapper']"))[1].children._owner.stateNode.sendAnswer(yes ? question.answers[0] : Math.random().toString(36).substring(2));
  248. }
  249. } catch { }
  250. }, 100, (target ?? 100) / 100);
  251. } else {
  252. this.enabled = false;
  253. clearInterval(this.data);
  254. this.data = null;
  255. }
  256. },
  257. },
  258. {
  259. name: "Auto Answer",
  260. description: "Click the correct answer for you",
  261. run: function () {
  262. const stateNode = getStateNode();
  263. const Question = stateNode.state.question || stateNode.props.client.question;
  264. if (stateNode.state.question.qType != "typing") {
  265. if (stateNode.state.stage != "feedback" && !stateNode.state.feedback) {
  266. let ind;
  267. for (ind = 0; ind < Question.answers.length; ind++) {
  268. let found = false;
  269. for (let j = 0; j < Question.correctAnswers.length; j++)
  270. if (Question.answers[ind] == Question.correctAnswers[j]) {
  271. found = true;
  272. break;
  273. }
  274. if (found) break;
  275. }
  276. document.querySelectorAll("[class*='answerContainer']")[ind].click();
  277. } else document.querySelector("[class*='feedback'], [id*='feedback']").firstChild.click();
  278. } else Object.values(document.querySelector("[class*='typingAnswerWrapper']"))[1].children._owner.stateNode.sendAnswer(Question.answers[0]);
  279. }
  280. },
  281. {
  282. name: "Highlight Answers",
  283. description: "Colors answers to be red or green highlighting the correct ones",
  284. run: function () {
  285. const stateNode = getStateNode();
  286. const Question = stateNode.state.question || stateNode.props.client.question;
  287. let ind = 0;
  288. while (ind < Question.answers.length) {
  289. let found = false;
  290. for (let j = 0; j < Question.correctAnswers.length; j++)
  291. if (Question.answers[ind] == Question.correctAnswers[j]) {
  292. found = true;
  293. break;
  294. }
  295. ind++;
  296. document.querySelector("[class*='answersHolder'] :nth-child(" + ind + ") > div").style.backgroundColor = found ? "rgb(0, 207, 119)" : "rgb(189, 15, 38)";
  297. }
  298. }
  299. },
  300. {
  301. name: "Spam Buy Blooks",
  302. description: "Opens a box an amount of times",
  303. inputs: [
  304. {
  305. name: "Box",
  306. type: "options",
  307. options: () => Array.from(document.querySelectorAll("[class*='packsWrapper'] > div")).reduce((a, b) => {
  308. b.querySelector("[class*='blookContainer'] > img") || a.push(b.querySelector("[class*='packImgContainer'] > img").alt);
  309. return a;
  310. }, [])
  311. },
  312. {
  313. name: "Amount",
  314. type: "number"
  315. },
  316. {
  317. name: "Show Unlocks",
  318. type: "options",
  319. options: [
  320. {
  321. name: "Show Unlocks",
  322. value: true
  323. },
  324. {
  325. name: "Don't Show Unlocks",
  326. value: false
  327. }
  328. ]
  329. }
  330. ],
  331. run: async function (box, amountToOpen, alertBlooks) {
  332. if (window.location.pathname.startsWith("/market")) {
  333. const stateNode = getStateNode();
  334. const prices = Array.prototype.reduce.call(document.querySelectorAll("[class*='packsWrapper'] > div"), (a, b) => {
  335. b.querySelector("[class*='blookContainer'] > img") || (a[b.querySelector("[class*='packImgContainer'] > img").alt] = parseInt(b.querySelector("[class*='packBottom']").textContent));
  336. return a;
  337. }, {});
  338. box = box.split(' ').map(str => str.charAt(0).toUpperCase() + str.slice(1).toLowerCase()).join(' ');
  339. const cost = prices[box];
  340. if (!cost) return alert("I couldn't find that box!");
  341. const canOpen = Math.floor(stateNode.state.tokens / cost);
  342. if (canOpen <= 0) return alert("You do not have enough tokens!");
  343. const amount = Math.min(canOpen, amountToOpen || 0);
  344. const blooks = {},
  345. now = Date.now();
  346. for (let i = 0; i < amount; i++) {
  347. await stateNode.buyPack(true, box);
  348. blooks[stateNode.state.unlockedBlook] ||= 0;
  349. blooks[stateNode.state.unlockedBlook]++;
  350. stateNode.setState({ canOpen: true, currentPack: "", opening: alertBlooks, doneOpening: alertBlooks, openPack: alertBlooks });
  351. clearTimeout(stateNode.canOpenTimeout);
  352. }
  353. await new Promise(r => setTimeout(r));
  354. alert(`(${Date.now() - now}ms) Results:\n${Object.entries(blooks).map(([blook, amount]) => ` ${blook} ${amount}`).join(`\n`)}`);
  355. } else alert("This can only be ran in the Market page.");
  356. }
  357. },
  358. {
  359. name: "Host Any Gamemode",
  360. description: "Change the selected gamemode on the host settings page",
  361. inputs: [
  362. {
  363. name: "Gamemode",
  364. type: "options",
  365. options: ["Racing", "Classic", "Factory", "Cafe", "Defense2", "Defense", "Royale", "Gold", "Candy", "Brawl", "Hack", "Pirate", "Fish", "Dino", "Toy", "Rush"]
  366. }
  367. ],
  368. run: function (type) {
  369. if (location.pathname != "/host/settings") return alert("Run this script on the host settings page");
  370. getStateNode().setState({ settings: { type } });
  371. }
  372. },
  373. {
  374. name: "Change Blook Ingame",
  375. description: "Changes your blook",
  376. inputs: [
  377. {
  378. name: "Blook (case sensitive)",
  379. type: "string",
  380. }
  381. ],
  382. run: function (blook) {
  383. let { props } = getStateNode();
  384. props.liveGameController.setVal({ path: `c/${props.client.name}/b`, val: (props.client.blook = blook) });
  385. }
  386. },
  387. {
  388. name: "Get Daily Rewards",
  389. description: "Gets max daily tokens and xp",
  390. run: async function () {
  391. if (!window.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/"));
  392. else {
  393. const gameId = ["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)];
  394. const rand = (l, h) => Math.floor(Math.random() * (h - l + 1)) + l;
  395. const { t } = await fetch("https://play.blooket.com/api/playersessions/solo", {
  396. body: JSON.stringify({ gameMode: "Factory", questionSetId: gameId }),
  397. method: "POST",
  398. credentials: "include"
  399. }).then(x => x.json()).catch(() => alert('There was an error creating a solo game.'));
  400. await fetch("https://play.blooket.com/api/playersessions/landings", {
  401. body: JSON.stringify({ t }),
  402. method: "POST",
  403. credentials: "include"
  404. }).catch(() => alert('There was an error when landing.'))
  405. await fetch("https://play.blooket.com/api/playersessions/questions?t=" + t, { credentials: "include" });
  406. await fetch("https://play.blooket.com/api/gamequestionsets?gameId=" + gameId, { credentials: "include" });
  407. await fetch("https://play.blooket.com/api/users/factorystats", {
  408. body: JSON.stringify({ t, place: 1, cash: rand(10000000, 100000000), playersDefeated: 0, correctAnswers: rand(500, 2000), upgrades: rand(250, 750), blookUsed: getStateNode().props.user.data.blook.name, nameUsed: "You", mode: "Time-Solo" }),
  409. method: "PUT",
  410. credentials: "include"
  411. }).catch(() => alert('There was an error when spoofing stats.'));
  412. await fetch("https://play.blooket.com/api/users/add-rewards", {
  413. body: JSON.stringify({ t, addedTokens: 500, addedXp: 300 }),
  414. method: "PUT",
  415. credentials: "include"
  416. }).then(x => x.json())
  417. .then(({ dailyReward }) => alert(`Added max tokens and xp, and got ${dailyReward} daily wheel tokens!`))
  418. .catch(() => alert('There was an error when adding rewards.'));
  419. }
  420. }
  421. },
  422. {
  423. name: "Use Any Blook",
  424. description: "Allows you to play as any blook",
  425. data: null,
  426. getBlooks(isLobby, stateNode) {
  427. if (this.data?.Black) return;
  428. isLobby = isLobby ? "keys" : "entries";
  429. const old = Object[isLobby];
  430. const scope = this;
  431. Object[isLobby] = function (obj) {
  432. if (!obj.Chick) return old.call(this, obj);
  433. scope.data = obj;
  434. return (Object[isLobby] = old).call(this, obj);
  435. };
  436. stateNode.render();
  437. },
  438. run: function () {
  439. const stateNode = getStateNode();
  440. const lobby = window.location.pathname.startsWith("/play/lobby"),
  441. blooks = !lobby && window.location.pathname.startsWith("/blooks");
  442. if (!blooks && !lobby) return alert("This only works in lobbies or the dashboard blooks page.");
  443. this.getBlooks(lobby, stateNode);
  444. if (lobby) return stateNode.setState({ unlocks: Object.keys(this.data) });
  445. stateNode.setState({ blookData: Object.keys(this.data).reduce((a, b) => (a[b] = (stateNode.state.blookData[b] || 1), a), {}), allSets: Object.values(this.data).reduce((a, b) => (b.set && a.includes(b.set) ? a : a.concat(b.set)), []) });
  446. }
  447. },
  448. {
  449. name: "Every Answer Correct",
  450. description: "Sets every answer to be correct",
  451. run: function () {
  452. const stateNode = getStateNode();
  453. for (let i = 0; i < stateNode.freeQuestions.length; i++) {
  454. stateNode.freeQuestions[i].correctAnswers = stateNode.freeQuestions[i].answers;
  455. stateNode.questions[i].correctAnswers = stateNode.questions[i].answers;
  456. stateNode.props.client.questions[i].correctAnswers = stateNode.questions[i].answers;
  457. }
  458. try { stateNode.forceUpdate(); } catch { }
  459. }
  460. },
  461. {
  462. name: "Subtle Highlight Answers",
  463. description: "Removes the shadow from correct answers",
  464. run: function () {
  465. const stateNode = getStateNode();
  466. const Question = stateNode.state.question || stateNode.props.client.question;
  467. let ind = 0;
  468. while (ind < Question.answers.length) {
  469. let j = 0;
  470. let found = false;
  471. while (j < Question.correctAnswers.length) {
  472. if (Question.answers[ind] == Question.correctAnswers[j]) {
  473. found = true;
  474. break;
  475. }
  476. j++;
  477. }
  478. ind++;
  479. if (found) document.querySelector("[class*='answersHolder'] :nth-child(" + ind + ") > div").style.boxShadow = "unset";
  480. }
  481. }
  482. },
  483. {
  484. name: "Remove Name Limit",
  485. description: "Sets the name limit to 120, which is the actual max name length limit",
  486. run: function () {
  487. document.querySelector('input[class*="nameInput"]').maxLength = 120; /* 120 is the actual limit */
  488. alert("Removed name length limit");
  489. }
  490. },
  491. {
  492. name: "Remove Random Name",
  493. description: "Allows you to put a custom name",
  494. run: function () {
  495. getStateNode().setState({ isRandom: false, client: { name: "" } });
  496. document.querySelector('[class*="nameInput"]')?.focus?.();
  497. }
  498. },
  499. {
  500. name: "Sell Duplicate Blooks",
  501. description: "Sell all duplicate blooks leaving you with 1 each",
  502. run: async function () {
  503. if (window.location.pathname.startsWith("/blooks")) {
  504. if (confirm(`Are you sure you want to sell your dupes? (Legendaries and rarer will not be sold)`)) {
  505. let stateNode = getStateNode();
  506. let now = Date.now(), results = "";
  507. for (const blook in stateNode.state.blookData) if (stateNode.state.blookData[blook] > 1) {
  508. stateNode.setState({ blook, numToSell: stateNode.state.blookData[blook] - 1 });
  509. if (!["Uncommon", "Rare", "Epic"].includes(document.querySelector("[class*='highlightedRarity']").innerText.trim())) continue;
  510. results += ` ${blook} ${stateNode.state.blookData[blook] - 1}\n`;
  511. await stateNode.sellBlook({ preventDefault: () => { } }, true);
  512. }
  513. alert(`(${Date.now() - now}ms) Results:\n${results.trim()}`);
  514. }
  515. } else alert("This can only be ran in the Blooks page.");
  516. }
  517. },
  518. ],
  519. },
  520. voyage: {
  521. name: "Pirate's Voyage",
  522. img: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIj48c3ZnIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdCb3g9IjAgMCAzMDAgMzAwIiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHhtbDpzcGFjZT0icHJlc2VydmUiIHhtbG5zOnNlcmlmPSJodHRwOi8vd3d3LnNlcmlmLmNvbS8iIHN0eWxlPSJmaWxsLXJ1bGU6ZXZlbm9kZDtjbGlwLXJ1bGU6ZXZlbm9kZDtzdHJva2UtbGluZWpvaW46cm91bmQ7c3Ryb2tlLW1pdGVybGltaXQ6MjsiPjxnIGlkPSJCb2F0Ij48cGF0aCBkPSJNMTcwLjQsNTYuMDU0Yy02OC43ODgsMTAuMTc0IC0xMTUuOTcxLDU2LjkzOCAtMTQ1LjQxMSwxMzMuNzVsMTUuNDY5LDcuNzM0YzMwLjk2MiwtMjguMTc1IDc0LjcwNSwtMzcuNzg3IDEzMi4zMjIsLTI3LjI1bDAsLTE3LjYxMWMtMjUuNjI5LC0yNy45NTIgLTI2Ljk2NiwtNTYuNzcyIDAuNzE0LC04Ni42MjhsLTMuMDk0LC05Ljk5NVoiIHN0eWxlPSJmaWxsOiNmNmUwYmQ7Ii8+PHBhdGggZD0iTTE5OS42NzMsNjAuODEzYzMyLjc4NCw0Mi45ODIgNjUuODIyLDkwLjg4NyA5Ny4zMzcsMTM5LjU4MWwtNi42NjMsMGMtMTIuMDg1LC0zMS4xMTEgLTU3Ljg4MiwtMzkuNjk0IC05MS42MjYsLTI3LjI1YzIyLjUxNCwtMzQuNTc5IDE3Ljc5NiwtNzIuNjczIDAuOTUyLC0xMTIuMzMxWiIgc3R5bGU9ImZpbGw6I2Y2ZTBiZDsiLz48cGF0aCBkPSJNNjkuNDQ4LDE5Ny41MzhjMCwwIC01OS43MDcsLTE1LjI0MyAtNjguMzk4LC0xNy40NjJjLTAuMDc2LC0wLjAxOSAtMC4xNTQsMC4wMiAtMC4xODQsMC4wOTJjLTAuMDMsMC4wNzIgLTAuMDAyLDAuMTU1IDAuMDY1LDAuMTk1YzkuNjgyLDUuNzc1IDkxLjY0Nyw1NC42NTggOTEuNjQ3LDU0LjY1OGwtMjMuMTMsLTM3LjQ4M1oiIHN0eWxlPSJmaWxsOiM4ZDZlNDE7Ii8+PHBhdGggZD0iTTE2NC40NSw0Ny45MDNjMCwtNS4zNTMgNC4zNDYsLTkuNjk4IDkuNjk4LC05LjY5OGwxOS4zOTcsLTBjNS4zNTIsLTAgOS42OTgsNC4zNDUgOS42OTgsOS42OThsLTAsMTU2Ljk1M2MtMCw1LjM1MyAtNC4zNDYsOS42OTggLTkuNjk4LDkuNjk4bC0xOS4zOTcsMGMtNS4zNTIsMCAtOS42OTgsLTQuMzQ1IC05LjY5OCwtOS42OThsMCwtMTU2Ljk1M1oiIHN0eWxlPSJmaWxsOiM3ZjY4NDU7Ii8+PHBhdGggZD0iTTI2My45OTMsMjU2LjEwM2MyMi4xNzEsLTE0LjcxIDM2LjAwNywtMzUuNTE1IDM2LjAwNywtNTguNTY1bC0yMzAuNTUyLDBjMCwyMy43MTMgMTQuNjQzLDQ1LjA1IDM3Ljk0LDU5LjgxOWM5Ljg3NSwtMy43MjkgMjAuMDQxLC0xMS4zMzQgMzAuNDYzLC0yMi4zMzZjMzIuODExLDM1LjQ1NSA2NC4wNjksMzUuOTQzIDkzLjcwOCwwYzYuODM4LDkuNjc3IDE3LjczNiwxNi42NDYgMzIuNDM0LDIxLjA4MloiIHN0eWxlPSJmaWxsOiNiNjkyNWY7Ii8+PC9nPjwvc3ZnPg==",
  523. cheats: [
  524. {
  525. name: "Heist ESP",
  526. description: "Shows you what's under each chest during a heist",
  527. type: "toggle",
  528. enabled: false,
  529. data: null,
  530. imgs: null,
  531. run: function () {
  532. if (!this.enabled) {
  533. this.enabled = true;
  534. this.data = setInterval(() => {
  535. const stateNode = getStateNode();
  536. if (stateNode.state.stage != "heist") return;
  537. if (this.imgs == null) this.imgs = Array.prototype.map.call(Array.prototype.slice.call(document.querySelector("[class*=prizesList]").children, 1, 4), (x) => x.querySelector("img").src);
  538. const esp = Object.values(document.querySelector("[class*=modal]"))[0].return.memoizedState.memoizedState;
  539. for (const e of document.querySelectorAll("[class*=boxContent] > div")) e.remove();
  540. const open = Object.values(document.querySelector("[class*=modal]"))[0].return.memoizedState.next.next.memoizedState;
  541. Array.prototype.forEach.call(document.querySelector("[class*=chestsWrapper]").children, (container, i) => {
  542. const box = container.firstChild.firstChild;
  543. if (open.includes(i)) return box.style.opacity = "";
  544. box.style.opacity = "0.5";
  545. let d = document.createElement("div");
  546. d.innerHTML = "<img src='" + this.imgs[2 - esp[i]] + "' style='max-width: 75%; max-height: 75%'></img>";
  547. d.className = "chestESP";
  548. d.style.position = "absolute";
  549. d.style.inset = "0";
  550. d.style.display = "grid";
  551. d.style.placeItems = "center";
  552. d.style.pointerEvents = "none"
  553. container.onclick = () => {
  554. d.remove();
  555. box.style.opacity = "";
  556. };
  557. container.firstChild.prepend(d);
  558. });
  559. }, 50);
  560. } else {
  561. this.enabled = false;
  562. clearInterval(this.data);
  563. this.data = null;
  564. }
  565. }
  566. },
  567. {
  568. name: "Max Levels",
  569. description: "Maxes out all islands and your boat",
  570. run: function () {
  571. let stateNode = getStateNode();
  572. stateNode.setState({ islandLevels: new Array(stateNode.state.islandLevels.length).fill(5) }, stateNode.updateBoatLevel);
  573. }
  574. },
  575. {
  576. name: "Set Doubloons",
  577. description: "Sets Doubloons",
  578. inputs: [{
  579. name: "Amount",
  580. type: "number"
  581. }],
  582. run: function (doubloons) {
  583. let stateNode = getStateNode();
  584. stateNode.setState({ doubloons });
  585. stateNode.props.liveGameController.setVal({
  586. path: `c/${stateNode.props.client.name}/d`,
  587. val: doubloons
  588. });
  589. }
  590. },
  591. {
  592. name: "Start Heist",
  593. description: "Starts a heist on someone",
  594. inputs: [{
  595. name: "Player",
  596. type: "options",
  597. options: () => {
  598. let stateNode = getStateNode();
  599. return stateNode.props.liveGameController._liveApp ? new Promise(res => stateNode.props.liveGameController.getDatabaseVal("c", (players) => players && res(Object.keys(players)))) : [];
  600. }
  601. }],
  602. run: function (target) {
  603. let stateNode = getStateNode();
  604. stateNode.props.liveGameController.getDatabaseVal("c", function (val) {
  605. if (val?.[target]) stateNode.setState({
  606. stage: "heist",
  607. heistInfo: { name: target, blook: val[target].b },
  608. prizeAmount: Math.max(1000, val[target].d || 0)
  609. });
  610. });
  611. }
  612. },
  613. {
  614. name: "Swap Doubloons",
  615. description: "Swaps Doubloons with someone",
  616. inputs: [{
  617. name: "Player",
  618. type: "options",
  619. options: () => {
  620. let stateNode = getStateNode();
  621. return stateNode.props.liveGameController._liveApp ? new Promise(res => stateNode.props.liveGameController.getDatabaseVal("c", (players) => players && res(Object.keys(players)))) : [];
  622. }
  623. }],
  624. run: async function (target) {
  625. let stateNode = getStateNode();
  626. stateNode.props.liveGameController.getDatabaseVal("c", function (val) {
  627. if (!val?.[target]) return;
  628. stateNode.props.liveGameController.setVal({
  629. path: `c/${stateNode.props.client.name}`,
  630. val: {
  631. b: stateNode.props.client.blook,
  632. d: val[target].d,
  633. tat: `${target}:${val[target].d - stateNode.state.doubloons}`
  634. }
  635. });
  636. stateNode.setState({ doubloons: val[target].d });
  637. });
  638. }
  639. },
  640. {
  641. name: "Take Doubloons",
  642. description: "Takes Doubloons from someone",
  643. inputs: [{
  644. name: "Player",
  645. type: "options",
  646. options: () => {
  647. let stateNode = getStateNode();
  648. return stateNode.props.liveGameController._liveApp ? new Promise(res => stateNode.props.liveGameController.getDatabaseVal("c", (players) => players && res(Object.keys(players)))) : [];
  649. }
  650. }],
  651. run: async function (target) {
  652. let stateNode = getStateNode();
  653. stateNode.props.liveGameController.getDatabaseVal("c", function (val) {
  654. if (!val?.[target]) return;
  655. stateNode.props.liveGameController.setVal({
  656. path: `c/${stateNode.props.client.name}`,
  657. val: {
  658. b: stateNode.props.client.blook,
  659. d: stateNode.state.doubloons + val[target].d,
  660. tat: `${target}:${val[target].d}`
  661. }
  662. });
  663. stateNode.setState({ doubloons: stateNode.state.doubloons + val[target].d });
  664. });
  665. }
  666. }
  667. ],
  668. },
  669. brawl: {
  670. name: "Monster Brawl",
  671. img: "https://media.blooket.com/image/upload/v1655233787/Media/survivor/xp/Blue_xp_2.svg",
  672. cheats: [
  673. {
  674. name: "Double Enemy XP",
  675. description: "Doubles enemy XP drop value",
  676. run: function () {
  677. const colliders = getStateNode().game.current.config.sceneConfig.physics.world.colliders._active.filter(x => x.callbackContext?.toString?.()?.includes?.('dmgCd'));
  678. for (let i = 0; i < colliders.length; i++) {
  679. const enemies = colliders[i].object2;
  680. let _start = enemies.classType.prototype.start;
  681. enemies.classType.prototype.start = function () { _start.apply(this, arguments); this.val *= 2; };
  682. enemies.children.entries.forEach(e => e.val *= 2);
  683. }
  684. }
  685. },
  686. {
  687. name: "Half Enemy Speed",
  688. description: "Makes enemies move 2x slower",
  689. run: function () {
  690. const colliders = getStateNode().game.current.config.sceneConfig.physics.world.colliders._active.filter(x => x.callbackContext?.toString?.()?.includes?.('dmgCd'));
  691. for (let i = 0; i < colliders.length; i++) {
  692. const enemies = colliders[i].object2;
  693. let _start = enemies.classType.prototype.start;
  694. enemies.classType.prototype.start = function () { _start.apply(this, arguments); this.speed *= 0.5; };
  695. enemies.children.entries.forEach(e => e.speed *= 0.5);
  696. }
  697. }
  698. },
  699. {
  700. name: "Instant Kill",
  701. description: "Sets all enemies health to 1",
  702. run: function () {
  703. const colliders = getStateNode().game.current.config.sceneConfig.physics.world.colliders._active.filter(x => x.callbackContext?.toString?.()?.includes?.('dmgCd'));
  704. for (let i = 0; i < colliders.length; i++) {
  705. const enemies = colliders[i].object2;
  706. let _start = enemies.classType.prototype.start;
  707. enemies.classType.prototype.start = function () { _start.apply(this, arguments); this.hp = 1; };
  708. enemies.children.entries.forEach(e => e.hp = 1);
  709. }
  710. }
  711. },
  712. {
  713. name: "Invincibility",
  714. description: "Makes you invincible",
  715. run: function () {
  716. for (const collider of getStateNode().game.current.config.sceneConfig.physics.world.colliders._active.filter(x => x.callbackContext?.toString().includes('invulnerableTime') || x.callbackContext?.toString().includes('dmgCd'))) collider.collideCallback = () => { };
  717. }
  718. },
  719. {
  720. name: "Kill Enemies",
  721. description: "Kills all current enemies",
  722. run: function () {
  723. getStateNode().game.current.config.sceneConfig.physics.world.bodies.entries.forEach(x => x?.gameObject?.receiveDamage?.(x.gameObject.hp, 1));
  724. }
  725. },
  726. {
  727. name: "Magnet",
  728. description: "Pulls all xp towards you",
  729. run: function () {
  730. getStateNode().game.current.config.sceneConfig.physics.world.colliders._active.find(x => x.collideCallback?.toString().includes('magnetTime')).collideCallback({ active: true }, { active: true, setActive() { }, setVisible() { } });
  731. }
  732. },
  733. {
  734. name: "Max Current Abilities",
  735. description: "Maxes out all your current abilities",
  736. run: function () {
  737. const stateNode = getStateNode();
  738. for (const [ability, level] of Object.entries(stateNode.state.abilities)) for (let i = 0; i < (10 - level); i++) stateNode.game.current.config.sceneConfig.game.events.emit("level up", ability, stateNode.state.abilities[ability]++);
  739. stateNode.setState({
  740. level: stateNode.game.current.config.sceneConfig.level = [1, 3, 5, 10, 15, 25, 35].sort((a, b) => Math.abs(a - stateNode.state.level) - Math.abs(b - stateNode.state.level))[0] - 1
  741. });
  742. }
  743. },
  744. {
  745. name: "Next Level",
  746. description: "Skips to the next level",
  747. run: function () {
  748. let stateNode = getStateNode();
  749. let { object1: player, object2: xp } = stateNode.game.current.config.sceneConfig.physics.world.colliders._active.find(x => x.collideCallback?.toString().includes('emit("xp'));
  750. xp.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);
  751. }
  752. },
  753. {
  754. name: "Remove Obstacles",
  755. description: "Removes all rocks and obstacles",
  756. run: function () {
  757. getStateNode().game.current.config.sceneConfig.physics.world.bodies.entries.forEach(body => { try { if (body.gameObject.frame.texture.key.includes("obstacle")) body.gameObject.destroy(); } catch { } });
  758. }
  759. },
  760. {
  761. name: "Reset Health",
  762. description: "Resets health and gives invincibility for 3 seconds",
  763. run: function () {
  764. getStateNode().game.current.events._events.respawn.fn();
  765. }
  766. }
  767. ],
  768. },
  769. cafe: {
  770. name: "Caf\xe9",
  771. img: "https://media.blooket.com/image/upload/v1655161189/Media/survivor/Pizza_lvl1.svg",
  772. style: { transform: "rotate(22.5deg)" },
  773. cheats: [
  774. {
  775. name: "Max Items",
  776. description: "Maxes out items in the shop (Only usable in the shop)",
  777. run: function () {
  778. if (window.location.pathname !== "/cafe/shop") alert("This can only be run in the shop");
  779. else {
  780. const stateNode = getStateNode();
  781. stateNode.setState({ items: Object.keys(stateNode.state.items).reduce((obj, item) => (obj[item] = 5, obj), {}) });
  782. }
  783. }
  784. },
  785. {
  786. name: "Remove Customers",
  787. description: "Skips the current customers (Not usable in the shop)",
  788. run: function () {
  789. const stateNode = getStateNode();
  790. stateNode.state.customers.forEach((customer, i) => window.setTimeout(() => customer.blook && stateNode.removeCustomer(i, true), i * 250));
  791. }
  792. },
  793. {
  794. name: "Reset Abilities",
  795. description: "Resets used abilities in shop (Only usable in the shop)",
  796. run: function () {
  797. if (window.location.pathname !== "/cafe/shop") alert("This can only be run in the shop");
  798. else {
  799. const stateNode = getStateNode();
  800. stateNode.setState({ abilities: Object.keys(stateNode.state.abilities).reduce((obj, item) => (obj[item] = 5, obj), {}) });
  801. }
  802. }
  803. },
  804. {
  805. name: "Set Cash",
  806. description: "Sets cafe cash",
  807. inputs: [{
  808. name: "Amount",
  809. type: "number"
  810. }],
  811. run: function (cafeCash) {
  812. let stateNode = getStateNode();
  813. stateNode.setState({ cafeCash });
  814. stateNode.props.liveGameController.setVal({
  815. path: `c/${stateNode.props.client.name}/ca`,
  816. val: cafeCash
  817. });
  818. }
  819. },
  820. {
  821. name: "Stock Food",
  822. description: "Stocks all food to 99 (Not usable in the shop)",
  823. run: function () {
  824. if (window.location.pathname !== "/cafe") alert("This can't be run in the shop");
  825. else {
  826. const stateNode = getStateNode();
  827. stateNode.setState({ foods: stateNode.state.foods.map(e => ({ ...e, stock: 99, level: 5 })) });
  828. }
  829. }
  830. }
  831. ],
  832. },
  833. crypto: {
  834. name: "Crypto Hack",
  835. img: "https://media.blooket.com/image/upload/v1661496293/Media/uiTest/CryptoIcon.svg",
  836. cheats: [
  837. {
  838. name: "Choice ESP",
  839. description: "Shows what each choice will give you",
  840. type: "toggle",
  841. enabled: false,
  842. data: null,
  843. run: function () {
  844. if (!this.enabled) {
  845. this.enabled = true;
  846. this.data = setInterval(() => {
  847. let chest = document.querySelector('[class*=feedbackContainer]');
  848. if (chest.children.length <= 4) {
  849. let choice = document.createElement('div')
  850. choice.style.color = "white";
  851. choice.style.fontFamily = "Inconsolata,Helvetica,monospace,sans-serif";
  852. choice.style.fontSize = "2em";
  853. choice.style.display = "flex";
  854. choice.style.justifyContent = "center";
  855. choice.style.marginTop = "675px";
  856. choice.innerText = getStateNode().state.choices[0].text;
  857. chest.append(choice);
  858. }
  859. }, 50);
  860. } else {
  861. this.enabled = false;
  862. clearInterval(this.data);
  863. this.data = null;
  864. }
  865. }
  866. },
  867. {
  868. name: "Password ESP",
  869. description: "Highlights the correct password",
  870. type: "toggle",
  871. enabled: false,
  872. data: null,
  873. run: function () {
  874. if (!this.enabled) {
  875. this.enabled = true;
  876. this.data = setInterval(() => {
  877. let { state } = getStateNode();
  878. if (state.stage == "hack") for (const button of document.querySelector('div[class*=buttonContainer]').children) {
  879. if (button.innerText == state.correctPassword) continue;
  880. button.style.outlineColor = "rgba(255, 64, 64, 0.8)";
  881. button.style.backgroundColor = "rgba(255, 64, 64, 0.8)";
  882. button.style.textShadow = "0 0 1px #f33"
  883. };
  884. }, 50);
  885. } else {
  886. this.enabled = false;
  887. clearInterval(this.data);
  888. this.data = null;
  889. }
  890. }
  891. },
  892. {
  893. name: "Always Triple",
  894. description: "Always get triple crypto",
  895. type: "toggle",
  896. enabled: false,
  897. data: null,
  898. run: function () {
  899. if (!this.enabled) {
  900. this.enabled = true;
  901. this.data = setInterval(state => getStateNode().setState(state), 25, { choices: [{ type: "mult", val: 3, rate: 0.075, blook: "Brainy Bot", text: "Triple Crypto" }] });
  902. } else {
  903. this.enabled = false;
  904. clearInterval(this.data);
  905. this.data = null;
  906. }
  907. }
  908. },
  909. {
  910. name: "Auto Guess",
  911. description: "Automatically guess the correct password",
  912. type: "toggle",
  913. enabled: false,
  914. data: null,
  915. run: function () {
  916. if (!this.enabled) {
  917. this.enabled = true;
  918. this.data = setInterval(() => {
  919. let { state } = getStateNode();
  920. if (state.stage == "hack") for (const button of document.querySelector('div[class*=buttonContainer]').children) button.innerText == state.correctPassword && button.click();
  921. }, 50);
  922. } else {
  923. this.enabled = false;
  924. clearInterval(this.data);
  925. this.data = null;
  926. }
  927. }
  928. },
  929. {
  930. name: "Remove Hack",
  931. description: "Removes an attacking hack",
  932. run: function () {
  933. getStateNode().setState({ hack: "" });
  934. }
  935. },
  936. {
  937. name: "Set Crypto",
  938. description: "Sets crypto",
  939. inputs: [{
  940. name: "Amount",
  941. type: "number"
  942. }],
  943. run: function (amount) {
  944. let stateNode = getStateNode();
  945. stateNode.setState({ crypto: amount, crypto2: amount });
  946. stateNode.props.liveGameController.setVal({
  947. path: `c/${stateNode.props.client.name}/cr`,
  948. val: amount
  949. });
  950. }
  951. },
  952. {
  953. name: "Set Password",
  954. description: "Sets hacking password",
  955. inputs: [{
  956. name: "Custom Password",
  957. type: "string"
  958. }],
  959. run: function (password) {
  960. let stateNode = getStateNode();
  961. stateNode.setState({ password });
  962. stateNode.props.liveGameController.setVal({
  963. path: `c/${stateNode.props.client.name}/p`,
  964. val: password
  965. });
  966. }
  967. },
  968. {
  969. name: "Steal Player's Crypto",
  970. description: "Steals all of someone's crypto",
  971. inputs: [{
  972. name: "Player",
  973. type: "options",
  974. options: () => {
  975. let stateNode = getStateNode();
  976. return stateNode.props.liveGameController._liveApp ? new Promise(res => stateNode.props.liveGameController.getDatabaseVal("c", (players) => players && res(Object.keys(players)))) : [];
  977. }
  978. }],
  979. run: function (target) {
  980. let stateNode = getStateNode();
  981. stateNode.props.liveGameController.getDatabaseVal("c", (players) => {
  982. let player;
  983. if (players && (player = Object.entries(players).find((x) => x[0].toLowerCase() == target.toLowerCase()))) {
  984. const cr = player[1].cr;
  985. stateNode.setState({
  986. crypto: stateNode.state.crypto + cr,
  987. crypto2: stateNode.state.crypto + cr
  988. });
  989. stateNode.props.liveGameController.setVal({
  990. path: "c/" + stateNode.props.client.name,
  991. val: {
  992. b: stateNode.props.client.blook,
  993. p: stateNode.state.password,
  994. cr: stateNode.state.crypto + cr,
  995. tat: player[0] + ":" + cr
  996. }
  997. });
  998. }
  999. })
  1000. }
  1001. }
  1002. ],
  1003. },
  1004. defense: {
  1005. name: "Tower Defense",
  1006. img: "https://media.blooket.com/image/upload/v1657235025/Media/survivor/Laser_Lvl1.svg",
  1007. cheats: [
  1008. {
  1009. name: "Earthquake",
  1010. description: "Shuffles around towers",
  1011. run: function () {
  1012. let stateNode = getStateNode();
  1013. stateNode.setState({
  1014. eventName: "Earthquake",
  1015. event: {
  1016. short: "e",
  1017. color: "#805500",
  1018. icon: "fas fa-mountain",
  1019. desc: "All of your towers get mixed up",
  1020. rate: .02
  1021. },
  1022. buyTowerName: "",
  1023. buyTower: {}
  1024. }, () => stateNode.eventTimeout = setTimeout(() => stateNode.setState({ event: {}, eventName: "" }), 6e3));
  1025. stateNode.tiles.forEach(row => row.forEach((col, i) => col == 3 && (row[i] = 0)));
  1026. let tiles = [];
  1027. for (let y = 0; y < stateNode.tiles.length; y++)
  1028. for (let x = 0; x < stateNode.tiles[y].length; x++)
  1029. if (stateNode.tiles[y][x] == 0) tiles.push({ x, y });
  1030. tiles.sort(() => Math.random() - Math.random());
  1031. stateNode.towers.forEach(tower => {
  1032. let { x, y } = tiles.pop();
  1033. tower.move(x, y, stateNode.tileSize);
  1034. stateNode.tiles[y][x] = 3;
  1035. });
  1036. }
  1037. },
  1038. {
  1039. name: "Max Tower Stats",
  1040. description: "Makes all placed towers overpowered",
  1041. run: function () {
  1042. getStateNode().towers.forEach(tower => {
  1043. tower.range = 100;
  1044. tower.fullCd = tower.cd = 0;
  1045. tower.damage = 1e6;
  1046. });
  1047. }
  1048. },
  1049. {
  1050. name: "Remove Ducks",
  1051. description: "Removes ducks",
  1052. run: function () {
  1053. let { ducks, tiles } = getStateNode();
  1054. ducks.forEach(x => (tiles[x.y][x.x] = 0));
  1055. ducks.length = 0;
  1056. }
  1057. },
  1058. {
  1059. name: "Remove Enemies",
  1060. description: "Removes all the enemies",
  1061. run: function () {
  1062. let stateNode = getStateNode();
  1063. stateNode.enemies = stateNode.futureEnemies = [];
  1064. }
  1065. },
  1066. {
  1067. name: "Remove Obstacles",
  1068. description: "Lets you place towers anywhere",
  1069. run: function () {
  1070. let stateNode = getStateNode();
  1071. stateNode.tiles = stateNode.tiles.map(row => row.fill(0));
  1072. }
  1073. },
  1074. {
  1075. name: "Set Damage",
  1076. description: "Sets damage",
  1077. inputs: [{
  1078. name: "Damage",
  1079. type: "number"
  1080. }],
  1081. run: function (dmg) {
  1082. getStateNode().dmg = dmg;
  1083. }
  1084. },
  1085. {
  1086. name: "Set Round",
  1087. description: "Sets the current round",
  1088. inputs: [{
  1089. name: "Round",
  1090. type: "number"
  1091. }],
  1092. run: function (round) {
  1093. getStateNode().setState({ round });
  1094. }
  1095. },
  1096. {
  1097. name: "Set Tokens",
  1098. description: "Sets the amount of tokens you have",
  1099. inputs: [{
  1100. name: "Tokens",
  1101. type: "number"
  1102. }],
  1103. run: function (tokens) {
  1104. getStateNode().setState({ tokens });
  1105. }
  1106. }
  1107. ],
  1108. },
  1109. defense2: {
  1110. name: "Tower Defense 2",
  1111. img: "https://media.blooket.com/image/upload/v1593095354/Media/defense/missile.svg",
  1112. style: { transform: "rotate(45deg)" },
  1113. cheats: [
  1114. {
  1115. name: "Max Tower Stats",
  1116. description: "Makes all placed towers overpowered",
  1117. run: function () {
  1118. getStateNode().state.towers.forEach(tower => {
  1119. tower.stats.dmg = 1e6;
  1120. tower.stats.fireRate = 50;
  1121. tower.stats.ghostDetect = true;
  1122. tower.stats.maxTargets = 1e6;
  1123. tower.stats.numProjectiles &&= 100;
  1124. tower.stats.range = 100;
  1125. if (tower.stats.auraBuffs) for (const buff in tower.stats.auraBuffs) tower.stats.auraBuffs[buff] *= 100;
  1126. });
  1127. }
  1128. },
  1129. {
  1130. name: "Kill Enemies",
  1131. description: "Kills all the enemies",
  1132. run: function () {
  1133. let stateNode = getStateNode();
  1134. stateNode.game.current.config.sceneConfig.enemyQueue.length = 0;
  1135. stateNode.game.current.config.sceneConfig.physics.world.bodies.entries.forEach(x => x?.gameObject?.receiveDamage?.(x.gameObject.hp, 1));
  1136. }
  1137. },
  1138. {
  1139. name: "Set Coins",
  1140. description: "Sets coins",
  1141. inputs: [{
  1142. name: "Coins",
  1143. type: "number"
  1144. }],
  1145. run: function (coins) {
  1146. getStateNode().setState({ coins });
  1147. }
  1148. },
  1149. {
  1150. name: "Set Health",
  1151. description: "Sets the amount of health you have",
  1152. inputs: [{
  1153. name: "Health",
  1154. type: "number"
  1155. }],
  1156. run: function (health) {
  1157. getStateNode().setState({ health });
  1158. }
  1159. },
  1160. {
  1161. name: "Set Round",
  1162. description: "Sets the current round",
  1163. inputs: [{
  1164. name: "Round",
  1165. type: "number"
  1166. }],
  1167. run: function (round) {
  1168. getStateNode().setState({ round });
  1169. }
  1170. },
  1171. ],
  1172. },
  1173. dinos: {
  1174. name: "Deceptive Dinos",
  1175. img: "https://media.blooket.com/image/upload/v1655161325/Media/survivor/Dog.svg",
  1176. style: { transform: "rotate(-22.5deg)" },
  1177. cheats: [
  1178. {
  1179. name: "Auto Choose",
  1180. description: "Automatically choose the best fossil when excavating",
  1181. type: "toggle",
  1182. enabled: false,
  1183. data: null,
  1184. rand(e, t) {
  1185. const s = [];
  1186. while (s.length < t) {
  1187. const i = Math.random();
  1188. let r = 0, g = null;
  1189. for (let o = 0; o < e.length; o++) {
  1190. r += e[o].rate;
  1191. if (r >= i) {
  1192. g = e[o];
  1193. break;
  1194. }
  1195. }
  1196. g && !s.includes(g) && s.push(g)
  1197. }
  1198. return s;
  1199. },
  1200. run: function () {
  1201. if (!this.enabled) {
  1202. this.enabled = true;
  1203. this.data = setInterval(() => {
  1204. try {
  1205. let stateNode = getStateNode();
  1206. if (stateNode.state.stage === "excavate") {
  1207. stateNode.state.choices.length || (stateNode.state.choices = this.rand([{ 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));
  1208. let max = 0, index = -1;
  1209. for (let i = 0; i < stateNode.state.choices.length; i++) {
  1210. const { type, val } = stateNode.state.choices[i];
  1211. const value = (type == "fossil" ? stateNode.state.fossils + val * stateNode.state.fossilMult : stateNode.state.fossils * val) || 0;
  1212. if (value <= max && type != "mult") continue;
  1213. max = value, index = i + 1;
  1214. }
  1215. document.querySelector('div[class*=rockRow] > div[role="button"]:nth-child(' + index + ')').click();
  1216. }
  1217. } catch { }
  1218. }, 50);
  1219. } else {
  1220. this.enabled = false;
  1221. clearInterval(this.data);
  1222. this.data = null;
  1223. }
  1224. }
  1225. },
  1226. {
  1227. name: "Rock ESP",
  1228. description: "Shows what is under the rocks",
  1229. type: "toggle",
  1230. enabled: false,
  1231. data: null,
  1232. run: (() => {
  1233. function rand(e, t) {
  1234. const s = [];
  1235. while (s.length < t) {
  1236. const i = Math.random();
  1237. let r = 0;
  1238. let g;
  1239. for (let o = 0; o < e.length; o++) {
  1240. r += e[o].rate;
  1241. if (r >= i) {
  1242. g = e[o];
  1243. break;
  1244. }
  1245. }
  1246. if (g && !s.includes(g)) s.push(g);
  1247. }
  1248. return s;
  1249. };
  1250. const exps = ["⁰", "¹", "²", "³", "⁴", "⁵", "⁶", "⁷", "⁸", "⁹"];
  1251. const getExpAscii = (num) => {
  1252. let res = "";
  1253. while (num > 0) {
  1254. res = exps[num % 10] + res;;
  1255. num = ~~(num / 10);
  1256. }
  1257. return res;
  1258. };
  1259. function shortNum(value) {
  1260. let newValue = value.toString();
  1261. if (value >= 1000) {
  1262. const suffixes = ["", "K", "M", "B", "T"];
  1263. const suffixNum = Math.floor(Math.floor((Math.log(value) / Math.log(10)).toPrecision(14)) / 3);
  1264. if (suffixNum < suffixes.length) {
  1265. let shortValue = "";
  1266. for (let precision = 3; precision >= 1; precision--) {
  1267. shortValue = parseFloat((suffixNum != 0 ? value / Math.pow(1000, suffixNum) : value).toPrecision(precision)).toString();
  1268. const dotLessShortValue = shortValue.replace(/[^a-zA-Z 0-9]+/g, "");
  1269. if (dotLessShortValue.length <= 3) break;
  1270. }
  1271. if (Number(shortValue) % 1 != 0) shortValue = Number(shortValue).toFixed(1);
  1272. newValue = shortValue + suffixes[suffixNum];
  1273. } else {
  1274. let num = value;
  1275. let exp = 0;
  1276. while (num >= 100) {
  1277. num = Math.floor(num / 10);
  1278. exp += 1;
  1279. }
  1280. newValue = num / 10 + " × 10" + getExpAscii(exp + 1);
  1281. }
  1282. }
  1283. return newValue;
  1284. };
  1285. return function () {
  1286. if (!this.enabled) {
  1287. this.enabled = true;
  1288. this.data = setInterval(() => {
  1289. let stateNode = getStateNode();
  1290. const rocks = document.querySelector('[class*="rockButton"]').parentElement.children;
  1291. if (!Array.prototype.every.call(rocks, element => element.querySelector('div'))) stateNode.setState({
  1292. choices: rand([{ type: "fossil", val: 10, rate: 0.1, blook: "Amber" }, { type: "fossil", val: 25, rate: 0.1, blook: "Dino Egg" }, { type: "fossil", val: 50, rate: 0.175, blook: "Dino Fossil" }, { type: "fossil", val: 75, rate: 0.175, blook: "Stegosaurus" }, { type: "fossil", val: 100, rate: 0.15, blook: "Velociraptor" }, { type: "fossil", val: 125, rate: 0.125, blook: "Brontosaurus" }, { type: "fossil", val: 250, rate: 0.075, blook: "Triceratops" }, { type: "fossil", val: 500, rate: 0.025, blook: "Tyrannosaurus Rex" }, { type: "mult", val: 1.5, rate: 0.05 }, { type: "mult", val: 2, rate: 0.025 }], 3)
  1293. }, () => {
  1294. Array.prototype.forEach.call(rocks, (element, index) => {
  1295. const rock = stateNode.state.choices[index];
  1296. if (element.querySelector('div')) element.querySelector('div').remove();
  1297. const choice = document.createElement("div");
  1298. choice.style.color = "white";
  1299. choice.style.fontFamily = "Macondo";
  1300. choice.style.fontSize = "1em";
  1301. choice.style.display = "flex";
  1302. choice.style.justifyContent = "center";
  1303. choice.style.transform = "translateY(25px)";
  1304. choice.innerText = rock.type === "fossil" ? `+${Math.round(rock.val * stateNode.state.fossilMult) > 99999999 ? shortNum(Math.round(rock.val * stateNode.state.fossilMult)) : Math.round(rock.val * stateNode.state.fossilMult)} Fossils` : `x${rock.val} Fossils Per Excavation`;;
  1305. element.append(choice);
  1306. });
  1307. });
  1308. }, 50);
  1309. } else {
  1310. this.enabled = false;
  1311. clearInterval(this.data);
  1312. this.data = null;
  1313. }
  1314. }
  1315. })()
  1316. },
  1317. {
  1318. name: "Set Fossils",
  1319. description: "Sets the amount of fossils you have",
  1320. inputs: [{
  1321. name: "Fossils",
  1322. type: "number"
  1323. }],
  1324. run: function (fossils) {
  1325. let stateNode = getStateNode();
  1326. stateNode.setState({ fossils });
  1327. stateNode.props.liveGameController.setVal({
  1328. path: `c/${stateNode.props.client.name}/f`,
  1329. val: fossils
  1330. });
  1331. }
  1332. },
  1333. {
  1334. name: "Set Multiplier",
  1335. description: "Sets fossil multiplier",
  1336. inputs: [{
  1337. name: "Multiplier",
  1338. type: "number"
  1339. }],
  1340. run: function (fossilMult) {
  1341. let stateNode = getStateNode();
  1342. stateNode.setState({ fossilMult });
  1343. }
  1344. },
  1345. {
  1346. name: "Stop Cheating",
  1347. description: "Undoes cheating so that you can't be caught",
  1348. run: function () {
  1349. let stateNode = getStateNode();
  1350. stateNode.setState({ isCheating: false });
  1351. stateNode.props.liveGameController.setVal({
  1352. path: `c/${stateNode.props.client.name}/ic`,
  1353. val: false
  1354. });
  1355. }
  1356. }
  1357. ],
  1358. },
  1359. doom: {
  1360. name: "Tower of Doom",
  1361. img: "https://media.blooket.com/image/upload/v1657235023/Media/survivor/cards-05.svg",
  1362. cheats: [
  1363. {
  1364. name: "Fill Deck",
  1365. description: "Fills your deck with every maxed out card and artifact (Only works on towers page)",
  1366. run: function () {
  1367. if (window.location.pathname == "/tower/map") {
  1368. const stateNode = getStateNode();
  1369. stateNode.props.tower.artifacts = "Medical Kit|Fury Relic|Survival Guide|Steel Socks|Piggy Bank|Lucky Feather|Coupon|Cheese|Tasty Egg|Training Weights|Mighty Shield|Toxic Waste|Lifeline Totem|Cursed Hourglass|Band-Aid|Elder Coins|Captain's Anchor|Chess Pieces|Pink Hippo|Anorak's Wizard Cap|Dave's Doggo|Anubis' Obelisk|Farm Tractor|Magic Seedling|Just A Bone|Cozy Igloo|King's Crown|Sacred Scroll".split("|");
  1370. stateNode.props.tower.cards = 'Chick,🌽|Chicken,🌽|Cow,🌽|Goat,🌽|Horse,🌽|Pig,🌽|Sheep,🌽|Duck,🌽|Dog,🌽|Cat,🐾|Rabbit,🐾|Goldfish,🐾|Hamster,🐾|Turtle,🐾|Kitten,🐾|Puppy,🐾|Bear,🌲|Moose,🌲|Fox,🌲|Raccoon,🌲|Squirrel,🌲|Owl,🌲|Hedgehog,🌲|Baby Penguin,❄️|Penguin,❄️|Arctic Fox,❄️|Snowy Owl,❄️|Polar Bear,❄️|Arctic Hare,❄️|Seal,❄️|Walrus,❄️|Tiger,🌴|Panther,🌴|Cockatoo,🌴|Orangutan,🌴|Anaconda,🌴|Macaw,🌴|Jaguar,🌴|Capuchin,🌴|Toucan,🌴|Parrot,🌴|Elf,⚔️|Witch,⚔️|Wizard,⚔️|Fairy,⚔️|Slime Monster,⚔️|Jester,⚔️|Dragon,⚔️|Unicorn,⚔️|Queen,⚔️|King,⚔️|Snow Globe,☃️|Holiday Gift,☃️|Hot Chocolate,☃️|Gingerbread Man,☃️|Gingerbread House,☃️|Holiday Wreath,☃️|Snowman,☃️|Santa Claus,☃️|Two of Spades,🏰|Eat Me,🏰|Drink Me,🏰|Alice,🏰|Queen of Hearts,🏰|Dormouse,🏰|White Rabbit,🏰|Cheshire Cat,🏰|Caterpillar,🏰|Mad Hatter,🏰|King of Hearts,🏰'.split("|").map(x => {
  1371. const [blook, c] = x.split(",");
  1372. return { strength: 20, charisma: 20, wisdom: 20, class: c, blook };
  1373. });
  1374. try { stateNode.props.addTowerNode(); } catch { }
  1375. stateNode.setState({ showDeck: false });
  1376. } else alert("You need to be on the map to run this cheat!");
  1377. }
  1378. },
  1379. {
  1380. name: "Max Cards",
  1381. description: "Maxes out all the cards in your deck",
  1382. run: function () {
  1383. if (window.location.pathname == "/tower/map") {
  1384. const stateNode = getStateNode();
  1385. stateNode.props.tower.cards.forEach(card => {
  1386. card.strength = 20;
  1387. card.charisma = 20;
  1388. card.wisdom = 20;
  1389. });
  1390. try { stateNode.forceUpdate(); } catch { }
  1391. } else alert("You need to be on the map to run this cheat!");
  1392. }
  1393. },
  1394. {
  1395. name: "Max Health",
  1396. description: "Fills the player's health",
  1397. run: function () {
  1398. if (window.location.pathname == "/tower/battle") getStateNode().setState({ myHealth: 100, myLife: 100 });
  1399. else alert("You need to be in battle to run this cheat!");
  1400. }
  1401. },
  1402. {
  1403. name: "Max Card Stats",
  1404. description: "Maxes out player's current card (Only works on attribute select page)",
  1405. run: function () {
  1406. const stateNode = getStateNode();
  1407. if (stateNode.state.phase !== 'select') alert('You must be on the attribute selection page!');
  1408. else stateNode.setState({ myCard: { ...stateNode.state.myCard, strength: 20, charisma: 20, wisdom: 20 } });
  1409. }
  1410. },
  1411. {
  1412. name: "Min Enemy Stats",
  1413. description: "Makes the enemy card stats all 0 (Only works on attribute select page)",
  1414. run: function () {
  1415. const stateNode = getStateNode();
  1416. if (stateNode.state.phase !== 'select') alert('You must be on the attribute selection page!');
  1417. else stateNode.setState({ enemyCard: { ...stateNode.state.enemyCard, strength: 0, charisma: 0, wisdom: 0 } });
  1418. }
  1419. },
  1420. {
  1421. name: "Set Coins",
  1422. description: "Try's to set amount of tower coins you have",
  1423. inputs: [{
  1424. name: "Coins",
  1425. type: "number"
  1426. }],
  1427. run: function (coins) {
  1428. if (window.location.pathname == "/tower/battle") try {
  1429. getStateNode().props.setTowerCoins(coins);
  1430. } catch { }
  1431. else alert("You need to be in battle to run this cheat!");
  1432. }
  1433. }
  1434. ],
  1435. },
  1436. factory: {
  1437. name: "Factory",
  1438. img: "https://media.blooket.com/image/upload/v1661496293/Media/uiTest/Factory_Upgrades.svg",
  1439. cheats: [
  1440. {
  1441. name: "Choose Blook",
  1442. description: "Gives you a blook",
  1443. inputs: [{
  1444. name: "Blook",
  1445. type: "options",
  1446. options: [{ 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] }].map(x => ({ name: x.name, value: JSON.stringify(x) }))
  1447. }],
  1448. run: function (blook) {
  1449. const stateNode = getStateNode();
  1450. if (stateNode.state.blooks.length >= 10) alert("Choose a blook to replace");
  1451. stateNode.waiting = false;
  1452. stateNode.chooseBlook(JSON.parse(blook));
  1453. }
  1454. },
  1455. {
  1456. name: "Free Upgrades",
  1457. description: "Sets upgrade prices to 0 for all current blooks",
  1458. run: function () {
  1459. const prices = [0, 0, 0, 0];
  1460. let stateNode = getStateNode();
  1461. stateNode.setState({ blooks: stateNode.state.blooks.map(blook => (blook.price = prices, blook)) });
  1462. }
  1463. },
  1464. {
  1465. name: "Max Blooks",
  1466. description: "Maxes out all your blooks' levels",
  1467. run: function () {
  1468. getStateNode().state.blooks.forEach(blook => blook.level = 4);
  1469. }
  1470. },
  1471. {
  1472. name: "Remove Glitches",
  1473. description: "Removes all enemy glitches",
  1474. run: function () {
  1475. let stateNode = getStateNode();
  1476. stateNode.setState({
  1477. bits: 0,
  1478. ads: [],
  1479. hazards: [],
  1480. color: "",
  1481. lol: false,
  1482. joke: false,
  1483. slow: false,
  1484. dance: false,
  1485. glitch: "",
  1486. glitcherName: "",
  1487. glitcherBlook: ""
  1488. });
  1489. clearTimeout(stateNode.adTimeout);
  1490. clearInterval(stateNode.hazardInterval);
  1491. clearTimeout(stateNode.nightTimeout);
  1492. clearTimeout(stateNode.glitchTimeout);
  1493. clearTimeout(stateNode.lolTimeout);
  1494. clearTimeout(stateNode.jokeTimeout);
  1495. clearTimeout(stateNode.slowTimeout);
  1496. clearTimeout(stateNode.danceTimeout);
  1497. clearTimeout(stateNode.nameTimeout);
  1498. }
  1499. },
  1500. {
  1501. name: "Send Glitch",
  1502. description: "Sends a glitch to everyone else playing",
  1503. inputs: [{
  1504. name: "Glitch",
  1505. type: "options",
  1506. options: Object.entries({ 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" }).map(([value, name]) => ({ name, value }))
  1507. }],
  1508. run: function (val) {
  1509. let stateNode = getStateNode();
  1510. stateNode.safe = true;
  1511. stateNode.props.liveGameController.setVal({ path: `c/${stateNode.props.client.name}/tat`, val });
  1512. }
  1513. },
  1514. {
  1515. name: "Set All MegaBot",
  1516. description: "Sets all your blooks to maxed out Mega Bots",
  1517. run: function () {
  1518. getStateNode().setState({
  1519. blooks: Array.from({ length: 10 }, () => ({
  1520. name: "Mega Bot",
  1521. color: "#d71f27",
  1522. class: "🤖",
  1523. rarity: "Legendary",
  1524. cash: [8e4, 43e4, 42e5, 62e6, 1e9],
  1525. time: [5, 5, 3, 3, 3],
  1526. price: [7e6, 12e7, 19e8, 35e9],
  1527. active: false,
  1528. level: 4,
  1529. bonus: 5.5
  1530. }))
  1531. });
  1532. }
  1533. },
  1534. {
  1535. name: "Set Cash",
  1536. description: "Sets amount of cash you have",
  1537. inputs: [{
  1538. name: "Cash",
  1539. type: "number"
  1540. }],
  1541. run: function (cash) {
  1542. getStateNode().setState({ cash });
  1543. }
  1544. }
  1545. ],
  1546. },
  1547. fishing: {
  1548. name: "Fishing Frenzy",
  1549. img: "https://media.blooket.com/image/upload/v1661496295/Media/uiTest/Fish_Weight.svg",
  1550. cheats: [
  1551. {
  1552. name: "Remove Distractions",
  1553. description: "Removes distractions",
  1554. type: "toggle",
  1555. enabled: false,
  1556. data: null,
  1557. run: function () {
  1558. if (!this.enabled) {
  1559. this.enabled = true;
  1560. this.data = setInterval(() => {
  1561. getStateNode().setState({ party: "" });
  1562. }, 50);
  1563. } else {
  1564. this.enabled = false;
  1565. clearInterval(this.data);
  1566. this.data = null;
  1567. }
  1568. }
  1569. },
  1570. {
  1571. name: "Frenzy",
  1572. description: "Sets everyone to frenzy mode",
  1573. run: function () {
  1574. let stateNode = getStateNode();
  1575. stateNode.props.liveGameController.setVal({
  1576. path: `c/${stateNode.props.client.name}`,
  1577. val: {
  1578. b: stateNode.props.client.blook,
  1579. w: stateNode.state.weight,
  1580. f: "Frenzy",
  1581. s: true
  1582. }
  1583. });
  1584. }
  1585. },
  1586. {
  1587. name: "Send Distraction",
  1588. description: "Sends a distraction to everyone",
  1589. inputs: [{
  1590. name: "Distraction",
  1591. type: "options",
  1592. options: ["Crab", "Jellyfish", "Frog", "Pufferfish", "Octopus", "Narwhal", "Megalodon", "Blobfish", "Baby Shark"]
  1593. }],
  1594. run: function (f) {
  1595. let stateNode = getStateNode();
  1596. stateNode.safe = true;
  1597. stateNode.props.liveGameController.setVal({
  1598. path: `c/${stateNode.props.client.name}`,
  1599. val: {
  1600. b: stateNode.props.client.blook,
  1601. w: stateNode.state.weight, f, s: true
  1602. }
  1603. });
  1604. }
  1605. },
  1606. {
  1607. name: "Set Lure",
  1608. description: "Sets fishing lure (range 1 - 5)",
  1609. inputs: [{
  1610. name: "Lure (1 - 5)",
  1611. type: "number",
  1612. min: 1,
  1613. max: 5
  1614. }],
  1615. run: function (lure) {
  1616. getStateNode().setState({ lure: Math.max(Math.min(lure - 1, 4), 0) });
  1617. }
  1618. },
  1619. {
  1620. name: "Set Weight",
  1621. description: "Sets weight",
  1622. inputs: [{
  1623. name: "Weight",
  1624. type: "number"
  1625. }],
  1626. run: function (weight) {
  1627. let stateNode = getStateNode();
  1628. stateNode.setState({ weight, weight2: weight });
  1629. stateNode.props.liveGameController.setVal({
  1630. path: `c/${stateNode.props.client.name}`,
  1631. val: {
  1632. b: stateNode.props.client.blook,
  1633. w: weight,
  1634. f: ["Crab", "Jellyfish", "Frog", "Pufferfish", "Octopus", "Narwhal", "Megalodon", "Blobfish", "Baby Shark"][Math.floor(Math.random() * 9)]
  1635. }
  1636. });
  1637. }
  1638. }
  1639. ],
  1640. },
  1641. flappy: {
  1642. name: "Flappy Blook",
  1643. img: "https://media.blooket.com/image/upload/v1645222006/Blooks/yellowBird.svg",
  1644. cheats: [
  1645. {
  1646. name: "Toggle Ghost",
  1647. description: "Lets you go through the pipes",
  1648. type: "toggle",
  1649. enabled: false,
  1650. run: function () {
  1651. this.enabled = !this.enabled;
  1652. for (const body of Object.values(document.querySelector("#phaser-bouncy"))[0].return.updateQueue.lastEffect.deps[0].current.config.sceneConfig.physics.world.bodies.entries) {
  1653. if (!body.gameObject.frame.texture.key.startsWith("blook")) continue;
  1654. body.checkCollision.none = this.enabled;
  1655. body.gameObject.setAlpha(this.enabled ? 0.5 : 1);
  1656. break;
  1657. };
  1658. }
  1659. },
  1660. {
  1661. name: "Set Score",
  1662. description: "Sets flappy blook score",
  1663. inputs: [{
  1664. name: "Score",
  1665. type: "number"
  1666. }],
  1667. run: function (score) {
  1668. Object.values(document.querySelector("#phaser-bouncy"))[0].return.updateQueue.lastEffect.deps[1](score || 0);
  1669. }
  1670. }
  1671. ],
  1672. },
  1673. gold: {
  1674. name: "Gold Quest",
  1675. img: "https://media.blooket.com/image/upload/v1661496292/Media/uiTest/Gold.svg",
  1676. cheats: [
  1677. {
  1678. name: "Always Triple",
  1679. description: "Always get triple gold",
  1680. type: "toggle",
  1681. enabled: false,
  1682. data: { type: "multiply", val: 3, text: "Triple Gold!", blook: "Unicorn" },
  1683. run: function () {
  1684. let stateNode = getStateNode();
  1685. stateNode._choosePrize ||= stateNode.choosePrize;
  1686. if (!this.enabled) {
  1687. this.enabled = true;
  1688. stateNode.choosePrize = function (i) {
  1689. stateNode.state.choices[i] = this.data;
  1690. stateNode._choosePrize(i);
  1691. }
  1692. } else {
  1693. this.enabled = false;
  1694. if (stateNode._choosePrize) stateNode.choosePrize = stateNode._choosePrize;
  1695. }
  1696. }
  1697. },
  1698. {
  1699. name: "Auto Choose",
  1700. description: "Automatically picks the option that would give you the most gold",
  1701. type: "toggle",
  1702. enabled: false,
  1703. data: null,
  1704. run: function () {
  1705. if (!this.enabled) {
  1706. this.enabled = true;
  1707. this.data = setInterval(async () => {
  1708. let stateNode = getStateNode();
  1709. if (stateNode.state.stage == "prize") {
  1710. stateNode.props.liveGameController.getDatabaseVal("c", (players) => {
  1711. try {
  1712. if (players == null) return;
  1713. players = Object.entries(players);
  1714. let most = 0, max = 0, index = -1;
  1715. for (let i = 0; i < players.length; i++)
  1716. if (players[i][0] != stateNode.props.client.name && players[i][1] > most)
  1717. most = players[i][1];
  1718. for (let i = 0; i < stateNode.state.choices.length; i++) {
  1719. const choice = stateNode.state.choices[i];
  1720. let value = stateNode.state.gold;
  1721. if (choice.type == "gold")
  1722. value = stateNode.state.gold + choice.val || stateNode.state.gold;
  1723. else if (choice.type == "multiply" || choice.type == "divide")
  1724. value = Math.round(stateNode.state.gold * choice.val) || stateNode.state.gold;
  1725. else if (choice.type == "swap")
  1726. value = most || stateNode.state.gold;
  1727. else if (choice.type == "take")
  1728. value = stateNode.state.gold + most * choice.val || stateNode.state.gold;
  1729. if ((value || 0) <= max) continue;
  1730. max = value;
  1731. index = i + 1;
  1732. }
  1733. document.querySelector("div[class*='choice" + index + "']")?.click();
  1734. } catch { }
  1735. });
  1736. }
  1737. }, 50);
  1738. } else {
  1739. this.enabled = false;
  1740. clearInterval(this.data);
  1741. this.data = null;
  1742. }
  1743. }
  1744. },
  1745. {
  1746. name: "Chest ESP",
  1747. description: "Shows what each chest will give you",
  1748. type: "toggle",
  1749. enabled: false,
  1750. data: null,
  1751. run: function () {
  1752. if (!this.enabled) {
  1753. this.enabled = true;
  1754. this.data = setInterval(() => {
  1755. getStateNode().state.choices.forEach(({ text }, index) => {
  1756. let chest = document.querySelector(`div[class*='choice${index + 1}']`);
  1757. if (!chest || chest.querySelector('div')) return;
  1758. let choice = document.createElement('div')
  1759. choice.style.color = "white";
  1760. choice.style.fontFamily = "Eczar";
  1761. choice.style.fontSize = "2em";
  1762. choice.style.display = "flex";
  1763. choice.style.justifyContent = "center";
  1764. choice.style.transform = "translateY(200px)";
  1765. choice.innerText = text;
  1766. chest.append(choice)
  1767. });
  1768. }, 50);
  1769. } else {
  1770. this.enabled = false;
  1771. clearInterval(this.data);
  1772. this.data = null;
  1773. }
  1774. }
  1775. },
  1776. {
  1777. name: "Reset Players Gold",
  1778. description: "Sets a player's gold to 0",
  1779. inputs: [{
  1780. name: "Player",
  1781. type: "options",
  1782. options: () => {
  1783. let stateNode = getStateNode();
  1784. return stateNode.props.liveGameController._liveApp ? new Promise(res => stateNode.props.liveGameController.getDatabaseVal("c", (players) => players && res(Object.keys(players)))) : [];
  1785. }
  1786. }],
  1787. run: function (target) {
  1788. let stateNode = getStateNode();
  1789. stateNode.props.liveGameController.setVal({
  1790. path: "c/" + stateNode.props.client.name + "/tat",
  1791. val: target + ":swap:0"
  1792. });
  1793. }
  1794. },
  1795. {
  1796. name: "Set Gold",
  1797. description: "Sets amount of gold",
  1798. inputs: [{
  1799. name: "Gold",
  1800. type: "number"
  1801. }],
  1802. run: function (gold) {
  1803. let stateNode = getStateNode();
  1804. stateNode.setState({ gold, gold2: gold });
  1805. stateNode.props.liveGameController.setVal({
  1806. path: "c/" + stateNode.props.client.name + "/g",
  1807. val: gold
  1808. });
  1809. }
  1810. },
  1811. {
  1812. name: "Swap Gold",
  1813. description: "Swaps gold with someone",
  1814. inputs: [{
  1815. name: "Player",
  1816. type: "options",
  1817. options: () => {
  1818. let stateNode = getStateNode();
  1819. return stateNode.props.liveGameController._liveApp ? new Promise(res => stateNode.props.liveGameController.getDatabaseVal("c", (players) => players && res(Object.keys(players)))) : [];
  1820. }
  1821. }],
  1822. run: function (player) {
  1823. let stateNode = getStateNode();
  1824. stateNode.props.liveGameController.getDatabaseVal("c", (players) => {
  1825. if (!players || players[player] == null) return;
  1826. const gold = players[player].g || 0;
  1827. stateNode.props.liveGameController.setVal({
  1828. path: "c/" + stateNode.props.client.name,
  1829. val: {
  1830. b: stateNode.props.client.blook,
  1831. tat: player + ":swap:" + (stateNode.state.gold || 0),
  1832. g: gold
  1833. }
  1834. });
  1835. stateNode.setState({ gold, gold2: gold });
  1836. });
  1837. }
  1838. }
  1839. ],
  1840. },
  1841. kingdom: {
  1842. name: "Crazy Kingdom",
  1843. img: "https://media.blooket.com/image/upload/v1655161323/Media/survivor/Jester_lvl1.svg",
  1844. cheats: [
  1845. {
  1846. name: "Choice ESP",
  1847. description: "Shows you what will happen if you say Yes or No",
  1848. type: "toggle",
  1849. enabled: false,
  1850. data: null,
  1851. run: function () {
  1852. if (!this.enabled) {
  1853. this.enabled = true;
  1854. this.data = setInterval(stats => {
  1855. let stateNode = getStateNode();
  1856. let elements = Array.prototype.reduce.call(document.querySelectorAll('[class*=statContainer]'), (obj, container, i) => (obj[stats[i]] = container, obj), {});
  1857. if (stateNode.state.phase == "choice") {
  1858. Array.prototype.forEach.call(document.querySelectorAll('.choiceESP'), x => x.remove());
  1859. Object.keys(stateNode.state.guest.yes || {}).forEach(x => {
  1860. if (elements[x] == null) return;
  1861. let element = document.createElement('div');
  1862. element.className = 'choiceESP';
  1863. element.style = 'font-size: 24px; color: rgb(75, 194, 46); font-weight: bolder;';
  1864. element.innerText = String(stateNode.state.guest.yes[x]);
  1865. elements[x].appendChild(element);
  1866. });
  1867. Object.keys(stateNode.state.guest.no || {}).forEach(x => {
  1868. if (elements[x] == null) return;
  1869. let element = document.createElement('div');
  1870. element.className = 'choiceESP';
  1871. element.style = 'font-size: 24px; color: darkred; font-weight: bolder;';
  1872. element.innerText = String(stateNode.state.guest.no[x]);
  1873. elements[x].appendChild(element);
  1874. });
  1875. Array.prototype.forEach.call(document.querySelectorAll("[class*=guestButton][role=button]"), x => (x.onclick = () => Array.prototype.forEach.call(document.querySelectorAll(".choiceESP"), x => x.remove())));
  1876. }
  1877. }, 50, ['materials', 'people', 'happiness', 'gold']);
  1878. } else {
  1879. this.enabled = false;
  1880. clearInterval(this.data);
  1881. Array.prototype.forEach.call(document.querySelectorAll('.choiceESP'), x => x.remove());
  1882. this.data = null;
  1883. }
  1884. }
  1885. },
  1886. {
  1887. name: "Disable Tax Toucan",
  1888. description: "Tax evasion",
  1889. run: function () {
  1890. getStateNode().taxCounter = Number.MAX_VALUE;
  1891. }
  1892. },
  1893. {
  1894. name: "Max Stats",
  1895. description: "Sets all resources to the max",
  1896. run: function () {
  1897. getStateNode().setState({ materials: 100, people: 100, happiness: 100, gold: 100 });
  1898. }
  1899. },
  1900. {
  1901. name: "Set Guests",
  1902. description: "Sets the amount of guests you've seen",
  1903. inputs: [{
  1904. name: "Guests",
  1905. type: "number"
  1906. }],
  1907. run: function (guestScore) {
  1908. getStateNode().setState({ guestScore });
  1909. }
  1910. },
  1911. {
  1912. name: "Skip Guest",
  1913. description: "Skips the current guest",
  1914. run: function () {
  1915. getStateNode().nextGuest();
  1916. }
  1917. }
  1918. ],
  1919. },
  1920. racing: {
  1921. name: "Racing",
  1922. img: "https://media.blooket.com/image/upload/v1661496295/Media/uiTest/Racing_Progress.svg",
  1923. cheats: [
  1924. {
  1925. name: "Instant Win",
  1926. description: "Instantly Wins the race",
  1927. run: function () {
  1928. const stateNode = getStateNode();
  1929. stateNode.setState({ progress: stateNode.state.goalAmount });
  1930. stateNode.props.liveGameController.setVal({
  1931. path: "c/" + stateNode.props.client.name + "/pr",
  1932. val: stateNode.state.goalAmount
  1933. });
  1934. }
  1935. },
  1936. {
  1937. name: "Set Questions",
  1938. description: "Sets the number of questions left",
  1939. inputs: [{
  1940. name: "Questions",
  1941. type: "number"
  1942. }],
  1943. run: function (progress) {
  1944. let stateNode = getStateNode();
  1945. progress = stateNode.props.client.amount - progress;
  1946. stateNode.setState({ progress });
  1947. stateNode.props.liveGameController.setVal({
  1948. path: "c/" + stateNode.props.client.name + "/pr",
  1949. val: progress
  1950. });
  1951. }
  1952. }
  1953. ],
  1954. },
  1955. royale: {
  1956. name: "Battle Royale",
  1957. img: "https://media.blooket.com/image/upload/v1655936179/Media/br/VS_Lightning_Bolt_Bottom.svg",
  1958. cheats: [
  1959. {
  1960. name: "Auto Answer (Toggle)",
  1961. description: "Toggles auto answer on",
  1962. type: "toggle",
  1963. enabled: false,
  1964. data: null,
  1965. run: function () {
  1966. if (!this.enabled) {
  1967. this.enabled = true;
  1968. this.data = setInterval(() => {
  1969. let stateNode = getStateNode();
  1970. stateNode?.onAnswer?.(true, stateNode.props.client.question.correctAnswers[0]);
  1971. }, 50);
  1972. } else {
  1973. this.enabled = false;
  1974. clearInterval(this.data);
  1975. this.data = null;
  1976. }
  1977. }
  1978. },
  1979. {
  1980. name: "Auto Answer",
  1981. description: "Chooses the correct answer for you",
  1982. run: function () {
  1983. let stateNode = getStateNode();
  1984. stateNode?.onAnswer?.(true, stateNode.props.client.question.correctAnswers[0]);
  1985. }
  1986. },
  1987. ],
  1988. },
  1989. rush: {
  1990. name: "Blook Rush",
  1991. img: "https://ac.blooket.com/games-l/assets/shield-DEeSqHMF.png",
  1992. cheats: [
  1993. {
  1994. name: "Set Blooks",
  1995. description: "Sets amount of blooks you or your team has",
  1996. inputs: [{
  1997. name: "Blooks",
  1998. type: "number"
  1999. }],
  2000. run: function (numBlooks) {
  2001. let stateNode = getStateNode();
  2002. stateNode.setState({ numBlooks });
  2003. stateNode.props.liveGameController.setVal({
  2004. path: (stateNode.isTeam ? "a/" : "c/") + stateNode.props.client.name + "/bs",
  2005. val: numBlooks
  2006. });
  2007. }
  2008. },
  2009. {
  2010. name: "Set Defense",
  2011. description: "Sets amount of defense you or your team has (Max 4)",
  2012. inputs: [{
  2013. name: "Defense (max 4)",
  2014. type: "number",
  2015. max: 4
  2016. }],
  2017. run: function (defense) {
  2018. let numDefense = Math.min(defense, 4);
  2019. let stateNode = getStateNode();
  2020. stateNode.setState({ numDefense });
  2021. stateNode.props.liveGameController.setVal({
  2022. path: (stateNode.isTeam ? "a/" : "c/") + stateNode.props.client.name + "/d",
  2023. val: numDefense
  2024. });
  2025. }
  2026. }
  2027. ],
  2028. },
  2029. workshop: {
  2030. name: "Santa's Workshop",
  2031. img: "https://ac.blooket.com/games-l/assets/toy-CO4-YS66.svg",
  2032. cheats: [
  2033. {
  2034. name: "Remove Distractions",
  2035. description: "Removes all enemy distractions",
  2036. run: function () {
  2037. getStateNode().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] });
  2038. }
  2039. },
  2040. {
  2041. name: "Send Distraction",
  2042. description: "Sends a distraction to everyone else playing",
  2043. inputs: [{
  2044. name: "Distraction",
  2045. type: "options",
  2046. options: Object.entries({ 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" }).map(([value, name]) => ({ name, value }))
  2047. }],
  2048. run: function (val) {
  2049. let stateNode = getStateNode();
  2050. stateNode.safe = true;
  2051. stateNode.props.liveGameController.setVal({ path: `c/${stateNode.props.client.name}/tat`, val });
  2052. }
  2053. },
  2054. {
  2055. name: "Set Toys",
  2056. description: "Sets amount of toys",
  2057. inputs: [{
  2058. name: "Toys",
  2059. type: "number"
  2060. }],
  2061. run: function (toys) {
  2062. let stateNode = getStateNode();
  2063. stateNode.setState({ toys });
  2064. stateNode.props.liveGameController.setVal({
  2065. path: "c/" + stateNode.props.client.name + "/t",
  2066. val: toys
  2067. });
  2068. }
  2069. },
  2070. {
  2071. name: "Set Toys Per Question",
  2072. description: "Sets amount of toys per question",
  2073. inputs: [{
  2074. name: "Toys Per Question",
  2075. type: "number"
  2076. }],
  2077. run: function (toysPerQ) {
  2078. getStateNode().setState({ toysPerQ });
  2079. }
  2080. },
  2081. {
  2082. name: "Swap Toys",
  2083. description: "Swaps toys with someone",
  2084. inputs: [{
  2085. name: "Player",
  2086. type: "options",
  2087. options: () => {
  2088. let stateNode = getStateNode();
  2089. return stateNode.props.liveGameController._liveApp ? new Promise(res => stateNode.props.liveGameController.getDatabaseVal("c", (players) => players && res(Object.keys(players)))) : [];
  2090. }
  2091. }],
  2092. run: function (target) {
  2093. let stateNode = getStateNode();
  2094. stateNode.props.liveGameController.getDatabaseVal("c", (players) => {
  2095. if (!players || players[target] == null) return;
  2096. stateNode.props.liveGameController.setVal({
  2097. path: "c/" + stateNode.props.client.name + "/tat",
  2098. val: `${target}:swap:${stateNode.state.toys}`
  2099. });
  2100. stateNode.setState({ toys: players[target].t });
  2101. });
  2102. }
  2103. }
  2104. ],
  2105. },
  2106. settings: {
  2107. name: "Settings",
  2108. img: null,
  2109. cheats: [
  2110. {
  2111. name: "Import Settings",
  2112. description: "Import a custom theme",
  2113. inputs: [
  2114. {
  2115. name: "JSON Data",
  2116. type: "string"
  2117. }
  2118. ],
  2119. run: function (theme) {
  2120. try {
  2121. JSON.parse(theme);
  2122. } catch (e) {
  2123. return alert("Invalid JSON provided");
  2124. }
  2125. theme = { backgroundColor: "rgb(11, 194, 207)", infoColor: "#9a49aa", cheatList: "#9a49aa", defaultButton: "#9a49aa", disabledButton: "#A02626", enabledButton: "#47A547", textColor: "white", inputColor: "#7a039d", contentBackground: "rgb(64, 17, 95)", ...JSON.parse(theme) }
  2126. settings.setItem("theme", theme);
  2127. }
  2128. },
  2129. {
  2130. name: "Export Settings",
  2131. description: "Export the current theme to JSON",
  2132. run: async function () {
  2133. await navigator.clipboard.writeText(JSON.stringify(settings.data.theme, null, 4));
  2134. prompt("Text copied to clipboard. (Paste below to test)");
  2135. }
  2136. },
  2137. {
  2138. name: "Defaults",
  2139. description: "Changes all the settings to a preset",
  2140. inputs: [
  2141. {
  2142. name: "Theme",
  2143. type: "options",
  2144. options: [
  2145. {
  2146. name: "Default",
  2147. value: {
  2148. backgroundColor: "rgb(11, 194, 207)",
  2149. infoColor: "#9a49aa",
  2150. cheatList: "#9a49aa",
  2151. defaultButton: "#9a49aa",
  2152. disabledButton: "#A02626",
  2153. enabledButton: "#47A547",
  2154. textColor: "white",
  2155. inputColor: "#7a039d",
  2156. contentBackground: "rgb(64, 17, 95)"
  2157. }
  2158. },
  2159. {
  2160. name: "Blacket",
  2161. value: {
  2162. backgroundColor: "#4f4f4f",
  2163. infoColor: "#2f2f2f",
  2164. cheatList: "#2f2f2f",
  2165. defaultButton: "#4f4f4f",
  2166. disabledButton: "#eb6234",
  2167. enabledButton: "#00c20c",
  2168. textColor: "white",
  2169. inputColor: "#3f3f3f",
  2170. contentBackground: "#2f2f2f"
  2171. }
  2172. },
  2173. {
  2174. name: "Skool.lol",
  2175. value: {
  2176. backgroundColor: "linear-gradient(90deg, rgba(104,45,140,1) 220px, rgba(237,30,121,1) 100%)",
  2177. cheatList: "#1e2124",
  2178. infoColor: "#1e2124",
  2179. defaultButton: "#36393e",
  2180. inputColor: "#1e2124",
  2181. enabledButton: "#9c9a9a",
  2182. textColor: "white",
  2183. disabledButton: "#171717",
  2184. contentBackground: "#292929"
  2185. }
  2186. },
  2187. {
  2188. name: "Blue - Purple Background",
  2189. value: {
  2190. backgroundColor: "linear-gradient(162.5deg, rgba(0,183,255,1) 220px, rgba(128,0,255,1) 100%)"
  2191. }
  2192. },
  2193. {
  2194. name: "Saint Patricks Background",
  2195. value: {
  2196. backgroundColor: "rgb(9, 148, 65)"
  2197. }
  2198. },
  2199. {
  2200. name: "Halloween Background",
  2201. value: {
  2202. backgroundColor: "rgb(41, 41, 41)"
  2203. }
  2204. },
  2205. {
  2206. name: "Fall Background",
  2207. value: {
  2208. backgroundColor: "rgb(224, 159, 62)"
  2209. }
  2210. },
  2211. {
  2212. name: "Winter Background",
  2213. value: {
  2214. backgroundColor: "linear-gradient(rgb(49, 170, 224), rgb(187, 221, 255))"
  2215. }
  2216. },
  2217. {
  2218. name: "Crypto Hack",
  2219. value: {
  2220. backgroundColor: "radial-gradient(#11581e,#041607)",
  2221. infoColor: "#1a1a1a",
  2222. cheatList: "#1a1a1a",
  2223. defaultButton: "rgb(88 175 88)",
  2224. disabledButton: "#A02626",
  2225. enabledButton: "#0b601b",
  2226. textColor: "white",
  2227. inputColor: "rgb(0 0 0 / 25%)",
  2228. contentBackground: "#11581e"
  2229. }
  2230. },
  2231. {
  2232. name: "Fishing Frenzy",
  2233. value: {
  2234. backgroundColor: "linear-gradient(180deg,#9be2fe 0,#67d1fb)",
  2235. infoColor: "#c8591e",
  2236. cheatList: "#c8591e",
  2237. defaultButton: "#ff751a",
  2238. disabledButton: "#bf0e0e",
  2239. enabledButton: "#2fb62f",
  2240. textColor: "white",
  2241. inputColor: "rgb(0 0 0 / 25%)",
  2242. contentBackground: "radial-gradient(#02b0ea 40%, #1d86ea)"
  2243. }
  2244. },
  2245. {
  2246. name: "Deceptive Dinos",
  2247. value: {
  2248. backgroundColor: "radial-gradient(rgba(220, 184, 86, 0), rgba(220, 184, 86, 0.4)), url(\"https://ac.blooket.com/play/111cb7e0ee6607ac3d1a13d534c0e0f1.png\"), #ead49a",
  2249. infoColor: "#af8942",
  2250. cheatList: "#af8942",
  2251. defaultButton: "#af8942",
  2252. disabledButton: "#A02626",
  2253. enabledButton: "#47A547",
  2254. textColor: "white",
  2255. inputColor: "rgb(0 0 0 / 10%)",
  2256. contentBackground: "radial-gradient(rgba(1,104,162,.6),rgba(24,55,110,.5)),radial-gradient(#2783b4 1.5px,#18376e 0) center / 24px 24px"
  2257. }
  2258. },
  2259. {
  2260. name: "Blook Rush",
  2261. value: {
  2262. backgroundColor: "repeating-linear-gradient(45deg,white,white 8%,#e6e6e6 0,#e6e6e6 16%)",
  2263. defaultButton: "#36c",
  2264. inputColor: "rgb(0 0 0 / 25%)",
  2265. infoColor: "#36c",
  2266. cheatList: "#36c",
  2267. contentBackground: "#888",
  2268. textColor: "white",
  2269. disabledButton: "#A02626",
  2270. enabledButton: "#47A547"
  2271. }
  2272. },
  2273. {
  2274. name: "Factory",
  2275. value: {
  2276. defaultButton: "#1563bf",
  2277. infoColor: "#a5aabe",
  2278. cheatList: "#a5aabe",
  2279. contentBackground: "#2d313d",
  2280. backgroundColor: "#3a3a3a",
  2281. enabledButton: "rgb(75, 194, 46)",
  2282. disabledButton: "#9a49aa",
  2283. inputColor: "rgb(0 0 0 / 25%)",
  2284. textColor: "white"
  2285. }
  2286. },
  2287. {
  2288. name: "Cafe",
  2289. value: {
  2290. backgroundColor: "linear-gradient(90deg,rgba(200,0,0,.5) 50%,transparent 0) center / 50px 50px,linear-gradient(rgba(200,0,0,0.5) 50%,transparent 0) white center / 50px 50px",
  2291. defaultButton: "#0bc2cf",
  2292. inputColor: "rgb(0 0 0 / 25%)",
  2293. infoColor: "#ac7339",
  2294. cheatList: "#ac7339",
  2295. contentBackground: "rgb(64, 64, 64)",
  2296. textColor: "white",
  2297. disabledButton: "#A02626",
  2298. enabledButton: "#47A547"
  2299. }
  2300. },
  2301. {
  2302. name: "Tower of Doom",
  2303. value: {
  2304. backgroundColor: "rgb(41 41 41)",
  2305. disabledButton: "rgb(151, 15, 5)",
  2306. defaultButton: "#333",
  2307. inputColor: "rgb(0 0 0 / 25%)",
  2308. contentBackground: "#404040",
  2309. enabledButton: "#4bc22e",
  2310. textColor: "white",
  2311. infoColor: "#9a49aa",
  2312. cheatList: "#9a49aa"
  2313. }
  2314. },
  2315. {
  2316. name: "Monster Brawl",
  2317. value: {
  2318. defaultButton: "rgb(45, 51, 67)",
  2319. backgroundColor: "rgb(78, 95, 124)",
  2320. inputColor: "rgb(0 0 0 / 25%)",
  2321. contentBackground: "linear-gradient(0deg,#374154,#4f5b74)",
  2322. infoColor: "#374154",
  2323. cheatList: "#374154",
  2324. textColor: "white",
  2325. enabledButton: "#47A547",
  2326. disabledButton: "#A02626"
  2327. }
  2328. },
  2329. {
  2330. name: "Tower Defense 2",
  2331. value: {
  2332. backgroundColor: "url(https://media.blooket.com/image/upload/v1676164454/Media/defense/backgroundTd1-02.svg) center / cover",
  2333. cheatList: "#a33c22",
  2334. infoColor: "#a33c22",
  2335. defaultButton: "#40b1d8",
  2336. inputColor: "#3e8cbe",
  2337. contentBackground: "#293c82",
  2338. enabledButton: "#47A547",
  2339. disabledButton: "#A02626",
  2340. textColor: "white"
  2341. }
  2342. },
  2343. ]
  2344. }
  2345. ],
  2346. run: function (theme) {
  2347. settings.setItem("theme", { ...settings.data.theme, ...theme });
  2348. }
  2349. },
  2350. {
  2351. name: "Scale",
  2352. description: "Forces the GUI to scale from 25%-100%",
  2353. inputs: [
  2354. {
  2355. type: "number",
  2356. name: "Percent scale",
  2357. min: 25,
  2358. max: 100,
  2359. value: (settings.data?.scale || 1) * 100
  2360. }
  2361. ],
  2362. run: function (scale) {
  2363. scale = Math.min(Math.max(scale, 25), 100);
  2364. settings.setItem("scale", scale / 100);
  2365. guiWrapper.style.transform = `scale(${(scale / 100)})`;
  2366. }
  2367. },
  2368. {
  2369. name: "Hide Keybind",
  2370. description: "Change the hide keybind (Click button after input to change)",
  2371. inputs: [
  2372. {
  2373. type: "function",
  2374. name: "Input",
  2375. function: onchange => createKeybindListener(({ shift, ctrl, alt, key }) => onchange(`${[ctrl && "Ctrl", shift && "Shift", alt && "Alt", key && key.toUpperCase()].filter(Boolean).join(' + ')}`))
  2376. }
  2377. ],
  2378. run: function (hide) {
  2379. settings.setItem("hide", hide);
  2380. }
  2381. },
  2382. {
  2383. name: "Close Keybind",
  2384. description: "Change the quick close keybind (Click button after input to change)",
  2385. inputs: [
  2386. {
  2387. type: "function",
  2388. name: "Input",
  2389. function: onchange => createKeybindListener(({ shift, ctrl, alt, key }) => onchange(`${[ctrl && "Ctrl", shift && "Shift", alt && "Alt", key && key.toUpperCase()].filter(Boolean).join(' + ')}`))
  2390. }
  2391. ],
  2392. run: function (close) {
  2393. settings.setItem("close", close);
  2394. }
  2395. },
  2396. {
  2397. name: "Background Color",
  2398. description: "Changes the background color of the GUI",
  2399. inputs: [{
  2400. type: "string",
  2401. name: "Color"
  2402. }],
  2403. run: function (color) {
  2404. settings.setItem("theme.backgroundColor", color);
  2405. }
  2406. },
  2407. {
  2408. name: "Category List Color",
  2409. description: "Changes the categories list background color",
  2410. inputs: [{
  2411. type: "string",
  2412. name: "Color"
  2413. }],
  2414. run: function (color) {
  2415. settings.setItem("theme.cheatList", color);
  2416. }
  2417. },
  2418. {
  2419. name: "Info Color",
  2420. description: "Changes the color of the information at the top of the GUI",
  2421. inputs: [{
  2422. type: "string",
  2423. name: "Color"
  2424. }],
  2425. run: function (color) {
  2426. settings.setItem("theme.infoColor", color);
  2427. }
  2428. },
  2429. {
  2430. name: "Button Color",
  2431. description: "Changes the color of the cheats",
  2432. inputs: [{
  2433. type: "string",
  2434. name: "Color"
  2435. }],
  2436. run: function (color) {
  2437. settings.setItem("theme.defaultButton", color);
  2438. }
  2439. },
  2440. {
  2441. name: "Enabled Toggle Color",
  2442. description: "Changes the color of enabled toggle cheats",
  2443. inputs: [{
  2444. type: "string",
  2445. name: "Color"
  2446. }],
  2447. run: function (color) {
  2448. settings.setItem("theme.enabledButton", color);
  2449. }
  2450. },
  2451. {
  2452. name: "Disabled Toggle Color",
  2453. description: "Changes the color of disabled toggle cheats",
  2454. inputs: [{
  2455. type: "string",
  2456. name: "Color"
  2457. }],
  2458. run: function (color) {
  2459. settings.setItem("theme.disabledButton", color);
  2460. }
  2461. },
  2462. {
  2463. name: "Text Color",
  2464. description: "Changes the text color",
  2465. inputs: [{
  2466. type: "string",
  2467. name: "Color"
  2468. }],
  2469. run: function (color) {
  2470. settings.setItem("theme.textColor", color);
  2471. }
  2472. },
  2473. {
  2474. name: "Input Color",
  2475. description: "Changes the color of inputs, like the set gold number input",
  2476. inputs: [{
  2477. type: "string",
  2478. name: "Color"
  2479. }],
  2480. run: function (color) {
  2481. settings.setItem("theme.inputColor", color);
  2482. }
  2483. },
  2484. {
  2485. name: "Content Color",
  2486. description: "Changes the background color of the cheats",
  2487. inputs: [{
  2488. type: "string",
  2489. name: "Color"
  2490. }],
  2491. run: function (color) {
  2492. settings.setItem("theme.contentBackground", color);
  2493. }
  2494. }
  2495. ]
  2496. },
  2497. }
  2498. const GUIContainer = document.createElement("div");
  2499. function createKeybindListener(onpress, element = window) {
  2500. return new Promise(resolve => {
  2501. const pressed = {};
  2502. let shift, ctrl, alt, key;
  2503. const keydown = e => {
  2504. e.preventDefault();
  2505. pressed[e.code] = true;
  2506. shift ||= e.shiftKey;
  2507. ctrl ||= e.ctrlKey;
  2508. alt ||= e.altKey;
  2509. if (!["shift", "control", "alt", "meta"].includes(e.key.toLowerCase())) key = e.key.toLowerCase();
  2510. onpress?.({ shift, ctrl, alt, key });
  2511. };
  2512. const keyup = e => {
  2513. delete pressed[e.code];
  2514. if (Object.keys(pressed).length > 0) return;
  2515. element.removeEventListener("keydown", keydown);
  2516. element.removeEventListener("keyup", keyup);
  2517. resolve({ shift, ctrl, alt, key });
  2518. };
  2519. element.addEventListener("keydown", keydown);
  2520. element.addEventListener("keyup", keyup);
  2521. });
  2522. }
  2523. function AntiBen({ type = "div", children, ...props }) {
  2524. let childs = [];
  2525. let char = (space) => JSX.jsx("span", {
  2526. style: {
  2527. display: "inline-block",
  2528. opacity: "0",
  2529. width: "0",
  2530. height: "0",
  2531. lineHeight: "0",
  2532. userSelect: "none",
  2533. marginLeft: space ? "5px" : null
  2534. },
  2535. children: String.fromCharCode(Math.floor(Math.random() * 25) + 97)
  2536. })
  2537. const addChar = (child) => {
  2538. if (typeof child == "string") {
  2539. let text = [];
  2540. for (let i = 0; i < child.length; i += 3) text.push(child.slice(i, i + 3), char());
  2541. childs.push(...text);
  2542. }
  2543. else childs.push(child, char());
  2544. }
  2545. if (Array.isArray(children)) for (let i = 0; i < children.length; i++) addChar(children[i]);
  2546. else addChar(children);
  2547. return JSX.jsx(type, Object.assign({ children: JSX.jsx("span", { children: childs }) }, props));
  2548. }
  2549. function ScriptInput({ input, onValue, run, toggle }) {
  2550. const { name, type, options: opts, min, max, value } = input;
  2551. let optState;
  2552. try {
  2553. optState = typeof opts == "function" ? opts() : opts;
  2554. } catch (e) {
  2555. console.warn(e);
  2556. optState = [];
  2557. }
  2558. const [options, setOptions] = useState(optState)
  2559. const [locked, setLocked] = useState("");
  2560. const loading = useRef(true);
  2561. useEffect(() => {
  2562. if (options instanceof Promise) options.then((o) => {
  2563. setOptions(o);
  2564. onValue(o[0]?.value || o[0]);
  2565. input.selected = o[0]?.name || o[0];
  2566. loading.current = false;
  2567. }).catch(() => setOptions([]));
  2568. else if (options?.length) {
  2569. onValue(options[0]?.value || options[0]);
  2570. input.selected = options[0]?.name || options[0];
  2571. }
  2572. if (type == "number") onValue(value || (min == null ? 0 : min));
  2573. else if (type == "function") onValue(null);
  2574. else if (!(options instanceof Promise) && !options?.length) onValue("");
  2575. }, []);
  2576. let el;
  2577. if (type == "options" && options?.length) el = JSX.jsx("select", {
  2578. onChange: e => (input.selected = e.target.children[e.target.selectedIndex].innerText, onValue(JSON.parse(e.target.value))),
  2579. children: options.map(opt => JSX.jsx("option", {
  2580. value: JSON.stringify(opt?.value != null ? opt.value : opt),
  2581. children: opt?.name || opt
  2582. }))
  2583. });
  2584. else if (type == "function") el = JSX.jsx("input", {
  2585. className: styles.keys.cheatInput,
  2586. placeholder: name,
  2587. style: {
  2588. textAlign: "center"
  2589. },
  2590. readOnly: true,
  2591. value: locked || input.data,
  2592. onClick: async () => {
  2593. if (locked) return;
  2594. setLocked("Waiting for input...");
  2595. let value;
  2596. const data = await input.function(e => setLocked((value = e) + "..."));
  2597. input.data = value;
  2598. setLocked(false);
  2599. onValue(data);
  2600. }
  2601. });
  2602. else {
  2603. let isNumber = type == "number";
  2604. el = JSX.jsx("input", {
  2605. onChange: e => onValue(isNumber ? parseInt(e.target.value) : e.target.value),
  2606. className: styles.keys.cheatInput,
  2607. type: isNumber ? "number" : null,
  2608. min: isNumber ? min : null,
  2609. max: isNumber ? max : null,
  2610. defaultValue: isNumber ? value || (min == null ? 0 : min) : null,
  2611. placeholder: name,
  2612. style: {
  2613. textAlign: "center",
  2614. backgroundColor: toggle && "#0003"
  2615. },
  2616. onKeyUp: e => e.key == "Enter" && run()
  2617. });
  2618. }
  2619. return el;
  2620. }
  2621. function ScriptButton({ script }) {
  2622. const args = useRef([]);
  2623. const [enabled, setEnabled] = useState(script.enabled);
  2624. const run = useCallback(() => {
  2625. script.run.apply(script, args.current);
  2626. setEnabled(script.enabled);
  2627. }, []);
  2628. return makeElement("div", {
  2629. style: {
  2630. background: script.type == "toggle" ? enabled ? "var(--enabledButton)" : "var(--disabledButton)" : "var(--defaultButton)"
  2631. },
  2632. key: script.name,
  2633. "data-tip": script.description,
  2634. className: styles.keys.scriptButton,
  2635. onClick: e => (e.target.matches(`.${styles.keys.scriptButton}`) || e.target.matches(`.${styles.keys.cheatName}`) || e.target.matches(`.${styles.keys.cheatName} *`)) && run()
  2636. }, makeElement(AntiBen, {
  2637. className: styles.keys.cheatName
  2638. }, script.name), script.inputs?.length && script.inputs.map((input, i) => input.element || makeElement(ScriptInput, {
  2639. onValue: val => args.current[i] = val,
  2640. key: i,
  2641. input: input,
  2642. run: run,
  2643. toggle: script.type == "toggle"
  2644. })));
  2645. }
  2646. function useSettings(settingsKey) {
  2647. const [data, updateData] = useState(JSON.parse(localStorage.getItem(settingsKey) || "{}"));
  2648. const setItem = useCallback((k, v) => {
  2649. k.split('.').reduce((obj, k, i, a) => (++i == a.length && (obj[k] = v), obj[k]), data);
  2650. localStorage.setItem(settingsKey, JSON.stringify(data));
  2651. updateData({ ...data });
  2652. return data;
  2653. }, [data]);
  2654. const deleteItem = useCallback((k, v) => {
  2655. k.split('.').reduce((obj, k, i, a) => (++i == a.length && (delete obj[k]), obj[k]), data);
  2656. localStorage.setItem(settingsKey, JSON.stringify(data));
  2657. updateData({ ...data });
  2658. return data;
  2659. }, [data]);
  2660. const setData = useCallback((v) => {
  2661. updateData(v);
  2662. localStorage.setItem(settingsKey, JSON.stringify(v));
  2663. }, []);
  2664. useEffect(() => {
  2665. try {
  2666. updateData(JSON.parse(localStorage.getItem(settingsKey) || "{}"));
  2667. for (const setting of ["backgroundColor", "cheatList", "contentBackground", "defaultButton", "disabledButton", "enabledButton", "infoColor", "inputColor", "textColor"]) if (settings.data[setting]) {
  2668. setItem(`theme.${setting}`, settings.data[setting]);
  2669. deleteItem(setting);
  2670. }
  2671. } catch {
  2672. setData({});
  2673. }
  2674. }, [])
  2675. return { data, setItem, deleteItem, setData };
  2676. }
  2677. function Draggable({ parent, children, setPos, ...props }) {
  2678. const mouseDown = useRef(false);
  2679. const pos = useRef({ x: 0, y: 0 });
  2680. useEffect(() => {
  2681. const pointerup = () => mouseDown.current = false;
  2682. const pointermove = (e) => {
  2683. if (!mouseDown.current) return;
  2684. let dx = pos.current.x - e.clientX;
  2685. let dy = pos.current.y - e.clientY;
  2686. pos.current = { x: e.clientX, y: e.clientY };
  2687. var ratio = 1 || parseFloat((0.75 / window.devicePixelRatio).toFixed(2));
  2688. setPos({ x: parent.offsetLeft - dx / ratio, y: parent.offsetTop - dy / ratio });
  2689. }
  2690. document.addEventListener("pointerup", pointerup);
  2691. document.addEventListener("pointermove", pointermove);
  2692. return () => {
  2693. document.removeEventListener("pointerup", pointerup);
  2694. document.removeEventListener("pointermove", pointermove);
  2695. }
  2696. }, [parent]);
  2697. return makeElement("div", {
  2698. ...props, onPointerDown: e => {
  2699. mouseDown.current = true;
  2700. pos.current = {
  2701. x: e.clientX,
  2702. y: e.clientY
  2703. };
  2704. }
  2705. }, children);
  2706. }
  2707. function GUI() {
  2708. const { current: pos } = useRef({
  2709. x: Math.max(10, window.innerWidth - 1000) / 2,
  2710. y: Math.max(10, window.innerHeight - 600) / 2,
  2711. });
  2712. const setPos = useCallback(({ x, y }) => {
  2713. pos.x = x;
  2714. pos.y = y;
  2715. guiRef.current.style.left = `${x}px`;
  2716. guiRef.current.style.top = `${y}px`;
  2717. }, []);
  2718. const [minified, setMinified] = useState(null);
  2719. const [hidden, setHidden] = useState(false);
  2720. const [currentMode, setCurrentMode] = useState("global");
  2721. const guiRef = useRef();
  2722. const alertInterval = useRef();
  2723. settings = useSettings("JODGUISETTINGS");
  2724. const variables = makeElement("style", null, `:root {--backgroundColor: ${settings.data?.theme?.backgroundColor || "rgb(11, 194, 207)"};--infoColor: ${settings.data?.theme?.infoColor || "#9a49aa"};--cheatList: ${settings.data?.theme?.cheatList || "#9a49aa"};--defaultButton: ${settings.data?.theme?.defaultButton || "#9a49aa"};--disabledButton: ${settings.data?.theme?.disabledButton || "#A02626"};--enabledButton: ${settings.data?.theme?.enabledButton || "#47A547"};--textColor: ${settings.data?.theme?.textColor || "white"};--inputColor: ${settings.data?.theme?.inputColor || "#7a039d"};--contentBackground: ${settings.data?.theme?.contentBackground || "rgb(64, 17, 95)"};}`);
  2725. const { current: gamemodes } = useRef(["global", "voyage", "gold", "cafe", "crypto", "dinos", "defense", "defense2", "factory", "fishing", "flappy", "doom", "kingdom", "racing", "royale", "rush", "brawl", "workshop", "settings"]);
  2726. const close = useCallback(() => {
  2727. ReactDOM.unmountComponentAtNode(GUIContainer);
  2728. GUIContainer.remove();
  2729. }, []);
  2730. useEffect(() => {
  2731. window.dispatchEvent(new Event("resize"));
  2732. let keydown = e => {
  2733. let hideKey = settings.data.hide || { ctrl: true, key: "e" };
  2734. let closeKey = settings.data.close || { ctrl: true, key: "x" };
  2735. if ((hideKey.ctrl && e.ctrlKey || !hideKey.ctrl && !e.ctrlKey) && (hideKey.shift && e.shiftKey || !hideKey.shift && !e.shiftKey) && (hideKey.alt && e.altKey || !hideKey.alt && !e.altKey) && e.key.toLowerCase() == hideKey.key) {
  2736. e.preventDefault();
  2737. setHidden(h => !h);
  2738. } else if ((closeKey.ctrl && e.ctrlKey || !closeKey.ctrl && !e.ctrlKey) && (closeKey.shift && e.shiftKey || !closeKey.shift && !e.shiftKey) && (closeKey.alt && e.altKey || !closeKey.alt && !e.altKey) && e.key.toLowerCase() == closeKey.key) {
  2739. e.preventDefault();
  2740. close();
  2741. }
  2742. };
  2743. window.addEventListener("keydown", keydown);
  2744. return () => {
  2745. window.removeEventListener("keydown", keydown);
  2746. for (const gamemode of gamemodes) for (const cheat of Cheats[gamemode].cheats) if (cheat.enabled) cheat.run();
  2747. }
  2748. }, []);
  2749. useEffect(() => {
  2750. if (minified == null) return () => { };
  2751. let gui = guiRef.current.querySelector("div");
  2752. gui.style.height = !minified ? "100%" : "55px";
  2753. gui.style.width = !minified ? "100%" : "165px";
  2754. guiRef.current.style.top = `${parseInt(guiRef.current.style.top) + (guiRef.current.offsetHeight - 55) * (!minified ? -1 : 1)}px`;
  2755. guiRef.current.style.left = `${parseInt(guiRef.current.style.left) + (guiRef.current.offsetWidth - 165) * (!minified ? -1 : 1)}px`;
  2756. guiRef.current.style.pointerEvents = !minified ? "unset" : "none";
  2757. }, [minified])
  2758. return makeElement("div", {
  2759. ref: guiRef,
  2760. id: styles.keys.guiWrapper,
  2761. style: {
  2762. top: `${pos.y}px`,
  2763. left: `${pos.x}px`,
  2764. transform: `scale(${settings.data.scale || 1})`,
  2765. display: hidden ? "none" : null
  2766. }
  2767. }, makeElement("style", null, styles.css), variables, makeElement("div", {
  2768. id: styles.keys.gui
  2769. }, makeElement("div", {
  2770. id: styles.keys.controlButtons
  2771. }, makeElement(Draggable, {
  2772. parent: guiRef.current,
  2773. setPos: setPos,
  2774. style: {
  2775. backgroundColor: "rgb(0, 160, 255)"
  2776. },
  2777. className: styles.keys.dragButton
  2778. }, makeElement("i", {
  2779. className: "fas fa-arrows-alt"
  2780. })), makeElement("div", {
  2781. style: {
  2782. fontWeight: "bolder",
  2783. backgroundColor: "grey",
  2784. cursor: "pointer"
  2785. },
  2786. onClick: () => setMinified(m => !m)
  2787. }, makeElement("i", {
  2788. className: "fas fa-minus"
  2789. })), makeElement("div", {
  2790. style: {
  2791. fontWeight: "bolder",
  2792. backgroundColor: "red",
  2793. cursor: "pointer"
  2794. },
  2795. onClick: close
  2796. }, makeElement("i", {
  2797. className: "fas fa-times"
  2798. }))), !minified && makeElement(React.Fragment, null, makeElement("div", {
  2799. id: styles.keys.background
  2800. }, makeElement("div", {
  2801. id: styles.keys.backgroundImage
  2802. })), makeElement(Draggable, {
  2803. parent: guiRef.current,
  2804. setPos: setPos,
  2805. id: styles.keys.controls
  2806. }, (({ ctrl: ctrlHide, shift: shiftHide, alt: altHide, key: keyHide } = { ctrl: true, key: "e" }, { ctrl: ctrlClose, shift: shiftClose, alt: altClose, key: keyClose } = { ctrl: true, key: "x" }) => {
  2807. return makeElement(React.Fragment, null, `${[ctrlHide && "Ctrl", shiftHide && "Shift", altHide && "Alt", keyHide && keyHide.toUpperCase()].filter(Boolean).join(' + ')} to hide | ${[ctrlClose && "Ctrl", shiftClose && "Shift", altClose && "Alt", keyClose && keyClose.toUpperCase()].filter(Boolean).join(' + ')} for quick disable`, makeElement("br", null), makeElement(AntiBen, null, "Click and drag here"));
  2808. })(settings.data.hide || {
  2809. ctrl: true,
  2810. key: "e"
  2811. }, settings.data.close || {
  2812. ctrl: true,
  2813. key: "x"
  2814. })), makeElement("div", {
  2815. id: styles.keys.credits
  2816. }, makeElement(AntiBen, {
  2817. onClick: () => window.open("https://github.com/Gradyruan/Blooket-cheats", "_blank").focus(),
  2818. style: {
  2819. cursor: "pointer"
  2820. },
  2821. href: "https://github.com/Gradyruan/Blooket-cheats"
  2822. }, "GitHub - Gradyruan")), makeElement("div", {
  2823. id: styles.keys.cheatList
  2824. }, makeElement(AntiBen, {
  2825. type: "span",
  2826. style: {
  2827. textShadow: "1px 1px rgb(0 0 0 / 40%)"
  2828. }
  2829. }, "Cheats"), makeElement("a", {
  2830. href: "https://gf.qytechs.cn/en/scripts/497551-blooket-gui",
  2831. target: "_blank",
  2832. id: styles.keys.bigButton
  2833. }, makeElement("svg", {
  2834. style: {
  2835. filter: "drop-shadow(2px 2px 0 rgb(0 0 0 / 20%))"
  2836. },
  2837. xmlns: "http://www.w3.org/2000/svg",
  2838. width: "35",
  2839. height: "35",
  2840. fill: "currentColor",
  2841. viewBox: "0 -1 21 16"
  2842. }, makeElement("path", {
  2843. d: "M13.545 2.907a13.227 13.227 0 0 0-3.257-1.011.05.05 0 0 0-.052.025c-.141.25-.297.577-.406.833a12.19 12.19 0 0 0-3.658 0 8.258 8.258 0 0 0-.412-.833.051.051 0 0 0-.052-.025c-1.125.194-2.22.534-3.257 1.011a.041.041 0 0 0-.021.018C.356 6.024-.213 9.047.066 12.032c.001.014.01.028.021.037a13.276 13.276 0 0 0 3.995 2.02.05.05 0 0 0 .056-.019c.308-.42.582-.863.818-1.329a.05.05 0 0 0-.01-.059.051.051 0 0 0-.018-.011 8.875 8.875 0 0 1-1.248-.595.05.05 0 0 1-.02-.066.051.051 0 0 1 .015-.019c.084-.063.168-.129.248-.195a.05.05 0 0 1 .051-.007c2.619 1.196 5.454 1.196 8.041 0a.052.052 0 0 1 .053.007c.08.066.164.132.248.195a.051.051 0 0 1-.004.085 8.254 8.254 0 0 1-1.249.594.05.05 0 0 0-.03.03.052.052 0 0 0 .003.041c.24.465.515.909.817 1.329a.05.05 0 0 0 .056.019 13.235 13.235 0 0 0 4.001-2.02.049.049 0 0 0 .021-.037c.334-3.451-.559-6.449-2.366-9.106a.034.034 0 0 0-.02-.019Zm-8.198 7.307c-.789 0-1.438-.724-1.438-1.612 0-.889.637-1.613 1.438-1.613.807 0 1.45.73 1.438 1.613 0 .888-.637 1.612-1.438 1.612Zm5.316 0c-.788 0-1.438-.724-1.438-1.612 0-.889.637-1.613 1.438-1.613.807 0 1.451.73 1.438 1.613 0 .888-.631 1.612-1.438 1.612Z"
  2844. })), makeElement(AntiBen, {
  2845. type: React.Fragment
  2846. }, "Install")), gamemodes.map(gamemode => {
  2847. return makeElement("div", {
  2848. key: gamemode,
  2849. onClick: () => setCurrentMode(gamemode),
  2850. className: styles.keys.cheatButton
  2851. }, Cheats[gamemode].img ? makeElement("img", {
  2852. src: Cheats[gamemode].img,
  2853. style: {
  2854. maxWidth: "30px",
  2855. maxHeight: "30px",
  2856. aspectRatio: "1 / 1",
  2857. marginRight: "10px",
  2858. ...(Cheats[gamemode].style || {})
  2859. },
  2860. alt: gamemode
  2861. }) : makeElement("div", {
  2862. style: {
  2863. marginInline: "5px",
  2864. width: "5px"
  2865. }
  2866. }), makeElement(Textfit, {
  2867. mode: "single",
  2868. forceSingleWidthMode: false,
  2869. min: 1,
  2870. max: 20
  2871. }, Cheats[gamemode].name));
  2872. })), makeElement("div", {
  2873. id: styles.keys.contentWrapper
  2874. }, makeElement("div", {
  2875. id: styles.keys.content
  2876. }, makeElement(Tooltip, {
  2877. place: "bottom",
  2878. effect: "solid"
  2879. }), makeElement("div", {
  2880. id: styles.keys.cheats
  2881. }, Cheats[currentMode].element || (Cheats[currentMode].element = makeElement(React.Fragment, null, makeElement("div", {
  2882. className: styles.keys.headerText
  2883. }, makeElement(AntiBen, null, Cheats[currentMode].name, " Cheats")), Cheats[currentMode].cheats.map(cheat => cheat.element || makeElement(ScriptButton, {
  2884. key: cheat.name + cheat.type,
  2885. script: cheat
  2886. }))))))))));
  2887. }
  2888. console.log(JSX.jsx(GUI, {}))
  2889. ReactDOM.render(JSX.jsx(GUI, {}), GUIContainer);
  2890. document.body.append(GUIContainer);
  2891. });
  2892. let img = new Image;
  2893. img.src = "https://raw.githubusercontent.com/Gradyruan/Blooket-cheats/main/autoupdate/timestamps/reactGui.png?" + Date.now();
  2894. img.crossOrigin = "Anonymous";
  2895. img.onload = function() {
  2896. const c = document.createElement("canvas");
  2897. const ctx = c.getContext("2d");
  2898. ctx.drawImage(img, 0, 0, this.width, this.height);
  2899. let { data } = ctx.getImageData(0, 0, this.width, this.height), decode = "", last;
  2900. let i = 0;
  2901. while (i < data.length) {
  2902. let char = String.fromCharCode(data[i % 4 == 3 ? (i++, i++) : i++] + data[i % 4 == 3 ? (i++, i++) : i++] * 256);
  2903. decode += char;
  2904. if (char == "/" && last == "*") break;
  2905. last = char;
  2906. }
  2907. let _, time = 1716839383820, error = "There was an error checking for script updates. Run cheat anyway?";
  2908. try {
  2909. [_, time, error] = decode.match(/LastUpdated: (.+?); ErrorMessage: "((.|\n)+?)"/);
  2910. } catch (e) {}
  2911. if (parseInt(time) <= 1716839383820 || iframe.contentWindow.confirm(error)) cheat();
  2912. }
  2913. img.onerror = img.onabort = () => {
  2914. img.onerror = img.onabort = null;
  2915. cheat();
  2916. let iframe = document.querySelector("iframe");
  2917. iframe.contentWindow.alert("It seems the GitHub is either blocked or down.")
  2918. }
  2919. })();
  2920. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址