Blooket Cheats GUI

https://github.com/Blooket-Council/Blooket-Cheats

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