mouse is crax

mousehax

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