Greasy Fork镜像 支持简体中文。

Blooket Cheat Script

A script for Blooket cheats, with various functionalities and checks.

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

QingJ © 2025

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