BETTER BLOOKET HACKS

BEST GUI 2025

  1. // ==UserScript==
  2. // @name BETTER BLOOKET HACKS
  3. // @namespace http://tampermonkey.net/
  4. // @version 2025-03-05
  5. // @description BEST GUI 2025
  6. // @author poopersch4rtz
  7. // @match *://*.blooket.com/*
  8. // @match *://blooket.com/*
  9. // @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. /**
  14. * @license AGPL-3.0
  15. * Blooket Cheats
  16. * Made this to give to friends at School
  17. /* THE UPDATE CHECKER IS ADDED DURING COMMIT PREP, THERE MAY BE REDUNDANT CODE, DO NOT TOUCH */
  18.  
  19. (() => {
  20. let iframe = document.querySelector("iframe");
  21. if (!iframe) {
  22. iframe = document.createElement("iframe");
  23. iframe.style.display = "none";
  24. document.body.append(iframe);
  25. }
  26. /* By pooperschw4rtz - TikTok */
  27. if (window.fetch.call.toString() == 'function call() { [native code] }') {
  28. const call = window.fetch.call;
  29. window.fetch.call = function () {
  30. if (!arguments[1].includes("s.blooket.com/rc")) return call.apply(this, arguments);
  31. }
  32. }
  33. const timeProcessed = 1732772258234;
  34. let latestProcess = -1;
  35. const cheat = (async () => {
  36. const versionName = "v1";
  37. const gui = document.createElement("div");
  38. Object.assign(gui.style, {
  39. top: window.innerHeight / 2 - 250 + "px",
  40. left: innerWidth / 2 - 400 + "px",
  41. });
  42. const variables = {
  43. "--highlight": "#f90000",
  44. "--highlight2": "#4F4789",
  45. "--background": "#000000",
  46. "--background2": "#202020",
  47. "--textColor": "#f90000",
  48. "--textColor2": "#f90000",
  49. "--toggleOff": "#E32424",
  50. "--toggleOn": "#24E324",
  51. };
  52.  
  53. let settings,
  54. settingsKey = "KGUI.BenIsASillyGoose";
  55. const Settings = {
  56. data: null,
  57. setItem(k, v) {
  58. k.split(".").reduce((obj, k, i, a) => (++i == a.length && (obj[k] = v), k in obj ? obj[k] : (obj[k] = {})), this.data);
  59. localStorage.setItem(settingsKey, JSON.stringify(this.data));
  60. return v;
  61. },
  62. deleteItem(k) {
  63. k.split(".").reduce((obj, k, i, a) => (++i == a.length && delete obj[k], obj[k]), this.data);
  64. localStorage.setItem(settingsKey, JSON.stringify(this.data));
  65. return this.data;
  66. },
  67. setData(v) {
  68. this.data = v;
  69. localStorage.setItem(settingsKey, JSON.stringify(this.data));
  70. },
  71. };
  72. const defaultHideKey = { ctrl: true, shift: false, alt: false, key: "e" };
  73. const defaultCloseKey = { ctrl: true, shift: false, alt: false, key: "x" };
  74.  
  75. for (const variable in variables) gui.style.setProperty(variable, variables[variable]);
  76. try {
  77. Settings.data = JSON.parse(localStorage.getItem(settingsKey) || "{}");
  78. } catch {
  79. localStorage.setItem(settingsKey, "{}");
  80. Settings.data = {};
  81. } finally {
  82. for (const variable in Settings.data.theme || {}) gui.style.setProperty("--" + variable, Settings.data.theme[variable]);
  83. Settings.data.hideKey ??= defaultHideKey;
  84. Settings.data.closeKey ??= defaultCloseKey;
  85. }
  86.  
  87. const styles = document.createElement("style");
  88. const classes = {},
  89. datasets = {};
  90. styles.innerHTML =
  91. "@import url('https://fonts.googleapis.com/css?family=Titan+One');\n@import url('https://fonts.googleapis.com/css?family=Nunito');" +
  92. `.bigTextContainer,.version{align-items:center;user-select:none}.cheatsList>div,.settingsPage>div{padding:5px 10px}.gamemode,.gui,.leaderboardList,.sidebar{box-sizing:border-box}.controls>div,.credit,.pathText,.runCheat,.sidebarPath,.version{user-select:none}.noScroll::-webkit-scrollbar{display:none}.noScroll{-ms-overflow-style:none;scrollbar-width:none}.gui{position:fixed;z-index:100;background:var(--background);height:500px;width:800px;color:#fff;box-shadow:2px 2px 2px #000a;padding-left:50px;font-size:16px}.controls,.credit,.gamemodesList,.guiContent,.guiTopBar,.sidebar,.sidebarShadow,.version{position:absolute}.sidebarShadow{inset:0;background:#000;opacity:0%;pointer-events:none;transition:.2s;z-index:9}.controls>div,.guiContent,.sidebar,select[data-type] option{background:var(--background2)}.sidebarShadow:has(~ .sidebar:hover){opacity:40%}.credit{bottom:0;left:0;right:0;height:0;transition:.1s;overflow:hidden;text-align:center}.sidebar{top:0;left:0;height:100%;width:50px;transition:.2s 0.1s;z-index:10;overflow-x:hidden;padding-bottom:30px}.sidebar:hover{width:200px;transition-delay:0s}.sidebar:hover>.credit{height:25px;transition:.4s 0.2s}.guiContent{inset:20px;left:70px;top:40px;z-index:1;padding-top:32px}.guiTopBar{z-index:1;top:0;left:50px;right:0;height:25px}.version{top:0;left:0;margin-inline:10px;color:#888;font-size:.9em;letter-spacing:.5px;height:100%;display:flex}.controls{top:0;right:0;display:grid;grid-template-columns:1fr 1fr 1fr;height:25px;width:122px;gap:1px;border:1px solid var(--background);z-index:2}.controls>div{display:grid;place-items:center;font-weight:100}.closeControl{transition:.1s}.closeControl:hover{background:red}.creditsPage,.gamemodesPage,.searchPage{position:absolute;inset:0;top:32px}.gamemodesList{display:grid;gap:0 30px;padding-inline:30px;margin-top:0;padding-top:15px;margin-bottom:0;grid-template-columns:1fr 1fr;overflow-y:scroll;inset:0}.leaderboardPage,.logsPage{inset:10px;position:absolute}.pathText{position:absolute;top:40px;left:70px;right:20px;z-index:3;padding:7px 10px;height:22px}.clearLogsButton,.refreshControl{z-index:5;place-items:center;cursor:pointer}.leaderboardPage{top:42px}.leaderboardList{list-style:none;margin:0;padding:20px 40px 10px;height:100%;overflow:scroll;font-size:1.5em}.logsPage{top:37px;background:#000d;border-radius:2.5px}.logMessages{list-style:none;margin:10px;padding:0;display:flex;flex-direction:column-reverse;overflow-y:scroll;word-wrap:break-word;position:absolute;inset:0}.clearLogsButton{position:absolute;top:5px;right:5px;width:25px;height:25px;display:grid;scale:-1 1 1;transition:.2s}.searchbarHolder{display:flex;outline:2px solid var(--highlight);margin:10px 20px;height:30px;font-size:2em}.searchbarInput{outline:0;border:none;background:0 0;color:#fff;flex:1;font-size:.5em;font-family:Nunito;padding-inline:5px}.gamemode,.settingsPage>div{border-radius:2.5px;background:var(--background)}.searchbarButton{color:#fff;font-size:.6em;aspect-ratio:1/1;height:30px;display:grid;place-items:center;cursor:pointer}.bigText,.bigTextContainer{height:50px;width:200px;font-family:Titan One}.searchResults{position:absolute;inset:0;top:45px;padding-inline:20px;overflow-y:scroll}.favoritesPage,.settingsPage{inset:0;top:32px;overflow-y:scroll;position:absolute}.noResult{margin:20px 10px;font-size:.85em}.clearLogsButton:hover,.licenseMessage{font-size:1.25em}.favoritesPage{padding-block:10px;padding-inline:20px}.licenseMessage{font-weight:900;padding-inline:20px;margin-top:10px}.copyrightTag{font-size:.7em;font-weight:200;position:absolute;bottom:0;left:0;padding:5px 8px}.codingCredits,.creditLinks,.uploadDates{list-style:none;padding-inline:20px;margin-block:16px}.settingsPage{padding:10px;display:flex;flex-direction:column;gap:10px}.sidebarPaths{display:flex;flex-direction:column;width:200px}.bigTextContainer{display:flex;font-size:2em;margin-block:10px;transition:font-size .2s .1s,margin-block .2s .1s}.bigText{display:flex;align-items:center;justify-content:center}.refreshControl{position:absolute;top:45px;right:25px;width:25px;height:25px;display:grid}.gamemode{width:100%;height:200px;margin-bottom:30px;cursor:pointer;display:flex;justify-content:center;align-items:center;padding-top:10px;position:relative;overflow:hidden;padding-bottom:35px;transition:.4s}.contentPage,.gamemode>div{position:absolute;bottom:0}.gamemode:hover{box-shadow:0 0 10px var(--highlight);transition:.2s}.gamemode>img{width:85%;max-width:100%;max-height:100%}.gamemode>div{left:0;right:0;height:25px;background:var(--highlight);display:flex;justify-content:center;align-items:center;box-shadow:0 -5px 5px #0004;font-weight:800;font-size:1.1em;transition:.25s}.contentPage{inset-inline:0;top:35px}.cheatsList{display:flex;flex-direction:column;height:100%;overflow-y:scroll;padding-inline:10px}.cheatToggle,.cheatToggle>.toggleTrigger,.runCheat{height:35px;border-radius:2.5px}.cheatsList>div{display:grid;margin-bottom:10px;position:relative;background:var(--background);border-radius:2.5px}.cheatInfo,.cheatInputs,.cheatName,.cheatTop,.logMessage>span,.runCheat,.sidebarPath,.sidebarPath>i{display:flex}.cheatInfo{flex-direction:column;flex:1}.cheatName{font-size:1.5em;font-weight:700}.cheatDescription{font-size:.8em;margin-right:25px}.runCheat{--buttonColor:var(--highlight);width:20%;background:var(--buttonColor);margin-block:auto;cursor:pointer;align-items:center;justify-content:center;font-weight:800;transition:.5s;color:#fff!important}.runCheat:hover{box-shadow:0 0 10px 0 var(--buttonColor);transition:.3s}.runCheat:active{box-shadow:0 0 0 0 var(--buttonColor);transition:50ms}.cheatInputs{margin:5px 0 5px 5px;flex-direction:column;gap:5px}.searchResult,.standing{margin-bottom:10px;transition:.2s}.creditsPage>ul>li>strong,.logMessage img,.standingBlook{margin-right:5px}.cheatInputs>div{display:flex;flex-direction:row;font-size:.8rem;color:var(--highlight);font-weight:700;align-items:center}.cheatInputs>div>span{flex:1}.cheatToggle{width:20%;background:var(--highlight2);margin-block:auto;cursor:pointer;position:relative}.cheatToggle>.toggleTrigger{width:45px;position:absolute;top:0;left:0;background:var(--highlight);pointer-events:none;transition:left .2s,box-shadow .5s;z-index:1}.cheatToggle:hover>.toggleTrigger{box-shadow:0 0 10px 0 var(--highlight);transition:left .2s,box-shadow .2s}.toggleTrigger.active{left:calc(100% - 45px)}.toggleColor{position:absolute;inset:10px 20px;background:rgb(from var(--toggleOff) r g b / 25%);border-radius:2.5px;transition:.2s}.toggleTrigger.active+.toggleColor{background:rgb(from var(--toggleOn) r g b / 25%)}input[data-type],select[data-type]{width:20%;height:25px;outline:0;border:2px solid var(--highlight);box-sizing:border-box;background:0 0;color:#fff;font-size:.9em;padding-left:5px;font-family:Nunito;border-radius:2px;font-weight:800}.logo,.sidebarPath>i{width:50px;height:50px}select[data-type]{-webkit-appearance:none;-moz-appearance:none;text-indent:1px;text-overflow:''}input::placeholder{color:rgb(from var(--textColor) r g b / 50%)}input[data-type]::-webkit-inner-spin-button,input[data-type]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[data-type][type=number]{-moz-appearance:textfield}select[data-type] option{border-radius:0}select[data-type]::-ms-expand{display:none}.sidebarPath{align-items:center;cursor:pointer;transition:.2s 0.1s}.searchResult:hover,.sidebarPath:hover{color:var(--highlight);text-shadow:0 0 5px var(--highlight)}.sidebarPath>i{justify-content:center;align-items:center;font-size:1.5em}.sidebarPath>span{padding-left:5px}.sidebar:hover .sidebarPath{padding-left:20px;transition-delay:0s}.logo{left:0;transition:left .2s .1s;display:grid;place-items:center;min-width:50px;position:absolute}.sidebar:hover .logo{left:28px;transition:left .2s}.bigText{margin-top:-150px;transition:margin-top .1s}.sidebar:hover .bigText{margin-top:0;transition:margin-top .4s 0.1s}.sidebar:hover .bigTextContainer{font-size:2.5em;margin-block:20px;transition:font-size .2s,margin-block .2s}.creditsPage>ul>li>span{color:var(--textColor2);font-weight:800}.creditsPage>ul>li i{margin-inline:2px;line-height:1}.creditsPage a{color:var(--highlight);text-decoration:none}.creditsPage a:hover,.pathPage:hover{text-decoration:underline}.warning{color:var(--highlight2);font-size:.85em}.searchResult{cursor:pointer}.searchResultName{font-weight:800}.searchResultDescription{font-size:.8em}.searchResultSeparator{font-size:1.5em;font-weight:800;margin-block:10px;cursor:pointer;transition:.2s;border-bottom:2px solid #fff;padding-inline:5px;filter:drop-shadow(0px 0px 0px var(--highlight))}.searchResultSeparator:hover{color:var(--highlight);border-bottom:2px solid var(--highlight);filter:drop-shadow(0px 0px 2.5px var(--highlight))}.toggleCheat{--buttonColor:var(--toggleOff)}.toggleCheat.active{--buttonColor:var(--toggleOn)}.logMessage img{height:1em;align-self:center}.standing{display:flex;font-weight:800;align-items:center;position:relative;padding:5px 10px 5px 50px;border-radius:2.5px;background:var(--highlight2)}.standing:before{content:attr(data-place) ".";margin-right:10px}.standing::after{content:attr(data-value);flex:1;text-align:right;font-weight:100}.standing:hover{background:var(--standingColor);box-shadow:0 0 7.5px var(--standingColor)}.standingBlook{height:1.25em;align-self:center;position:absolute;left:10px}.favoriteButton,.favoriteButton>i{transition:.2s;display:grid;place-items:center;width:32px;height:32px}.favoriteButton{font-size:.8em;padding-left:5px;cursor:pointer}.favoriteButton:hover{color:#ff0}.favoriteButton>i{position:absolute;scale:0;transform-origin:50% 55%}.favoriteButton>i.filled{scale:1}.pathPage{cursor:pointer;color:var(--highlight)}[data-favorited=false],[data-favorites="0"]{display:none}
  93. [data-mode][data-name][data-description] {}`
  94. .replace(/\.([^0-9][\w-]+)/gm, (x, y) => "." + (classes[y] ??= randString(10)))
  95. .replace(/data-(\w+)/gm, (x, y) => "data-" + (datasets[y] ??= randString(10)));
  96.  
  97. gui.className = classes.gui;
  98.  
  99. gui.append(styles);
  100. const sidebarShadow = document.createElement("div");
  101. sidebarShadow.className = classes.sidebarShadow;
  102.  
  103. gui.appendChild(sidebarShadow);
  104. const credit = document.createElement("div");
  105. credit.className = classes.credit;
  106.  
  107. credit.innerText = "Created by Pooper";
  108. const sidebar = document.createElement("div");
  109. sidebar.className = classes.sidebar;
  110.  
  111. sidebar.append(credit);
  112. const guiContent = document.createElement("div");
  113. guiContent.className = classes.guiContent;
  114.  
  115. const guiTopBar = document.createElement("div");
  116. guiTopBar.className = classes.guiTopBar;
  117.  
  118. const version = document.createElement("span");
  119. version.className = classes.version;
  120. version.innerText = "Pooperschw4rtz Hubv1 - Follow me on TikTok " + versionName;
  121. guiTopBar.append(version);
  122.  
  123. const controls = document.createElement("div");
  124. controls.className = classes.controls;
  125.  
  126. const moveControl = document.createElement("div");
  127. moveControl.style.cursor = "grab";
  128.  
  129. moveControl.innerHTML = '<i class="fas fa-arrows-alt-h" style="line-height: 1"></i>';
  130. const minimizeControl = document.createElement("div");
  131.  
  132. minimizeControl.innerHTML = '<i class="fas fa-compress" style="line-height: 1"></i>';
  133. let hideAnimation = false;
  134. minimizeControl.onclick = () => {
  135. if (hideAnimation == (hideAnimation = true)) return;
  136. const hidden = minimizeControl.minimized;
  137. if (hidden) {
  138. minimizeControl.innerHTML = '<i class="fas fa-compress" style="line-height: 1"></i>';
  139. gui.animate(
  140. [
  141. {
  142. width: "122px",
  143. height: "27px",
  144. left: gui.style.left,
  145. },
  146. {
  147. width: "800px",
  148. height: "500px",
  149. left: `${parseInt(gui.style.left) + (hidden ? -678 : 678)}px`,
  150. },
  151. ],
  152. { duration: 200, easing: "ease" }
  153. );
  154. gui.style.width = "800px";
  155. gui.style.height = "500px";
  156. } else {
  157. minimizeControl.innerHTML = '<i class="fas fa-expand" style="line-height: 1"></i>';
  158. gui.animate(
  159. [
  160. {
  161. width: "800px",
  162. height: "500px",
  163. left: gui.style.left,
  164. },
  165. {
  166. width: "122px",
  167. height: "27px",
  168. left: `${parseInt(gui.style.left) + (hidden ? -678 : 678)}px`,
  169. },
  170. ],
  171. { duration: 200, easing: "ease" }
  172. );
  173. gui.style.width = "122px";
  174. gui.style.height = "27px";
  175. }
  176. setTimeout(
  177. () => {
  178. for (let child of [...gui.children]) {
  179. if (child == controls) continue;
  180. if (hidden) child.style.display = child.style._display;
  181. else {
  182. child.style._display = child.style.display;
  183. child.style.display = "none";
  184. }
  185. }
  186. hideAnimation = false;
  187. },
  188. hidden ? 200 : 0
  189. );
  190. gui.style.left = `${parseInt(gui.style.left) + (hidden ? -678 : 678)}px`;
  191. minimizeControl.minimized = !hidden;
  192. };
  193. const closeControl = document.createElement("div");
  194. closeControl.className = classes.closeControl;
  195. closeControl.innerHTML = '<i class="fas fa-times" style="line-height: 1"></i>';
  196. closeControl.onclick = () => gui.remove();
  197. controls.append(moveControl, minimizeControl, closeControl);
  198. dragElement(moveControl, gui);
  199.  
  200. const gamemodesPage = document.createElement("div");
  201. gamemodesPage.className = classes.gamemodesPage;
  202.  
  203. const gamemodesList = document.createElement("div");
  204. gamemodesList.className = classes.noScroll + " " + classes.gamemodesList;
  205.  
  206. const path = [["Gamemodes", gamemodesPage]];
  207.  
  208. const pathText = document.createElement("div");
  209. pathText.className = classes.pathText;
  210.  
  211. path.createPage = function (name, index, current) {
  212. const page = document.createElement("span");
  213.  
  214. page.innerText = name;
  215. if (!current) page.className = classes.pathPage;
  216. page.onclick = () => this.goto(index);
  217. return page;
  218. };
  219. path.updatePath = function () {
  220. pathText.innerHTML = "";
  221. pathText.append(this.createPage(this[0][0], 0, this.length == 1));
  222. for (let i = 1; i < this.length; i++) {
  223. pathText.append(" > ");
  224. pathText.append(this.createPage(this[i][0], i, this.length - 1 == i));
  225. }
  226. guiContent.innerHTML = "";
  227. guiContent.append(this[this.length - 1][1]);
  228. this[this.length - 1][1]?.onPath?.();
  229. };
  230. path.push = function (key, page) {
  231. Array.prototype.push.call(this, [key, page]);
  232. this.updatePath();
  233. return this.length;
  234. };
  235.  
  236. path.goto = function (index) {
  237. while (this.length - 1 > index) this.pop();
  238. this.updatePath();
  239. };
  240.  
  241. path.sidebar = function (key, page) {
  242. while (this.length > 0) this.pop();
  243. return this.push(key, page);
  244. };
  245.  
  246. const leaderboardPage = document.createElement("div");
  247. leaderboardPage.className = classes.leaderboardPage;
  248.  
  249. const leaderboardList = document.createElement("ul");
  250. leaderboardList.className = classes.noScroll + " " + classes.leaderboardList;
  251.  
  252. leaderboardPage.append(leaderboardList);
  253.  
  254. const logsPage = document.createElement("div");
  255. logsPage.className = classes.logsPage;
  256.  
  257. const logMessages = document.createElement("ul");
  258. logMessages.className = classes.noScroll + " " + classes.logMessages;
  259.  
  260. const clearLogsButton = document.createElement("div");
  261. clearLogsButton.className = classes.clearLogsButton;
  262. clearLogsButton.innerHTML = `<i class="fas fa-ban" style="line-height: 1"></i>`;
  263.  
  264. logsPage.append(logMessages, clearLogsButton);
  265.  
  266. let leaderboardPath;
  267. const Logs = {
  268. connection: null,
  269. standings: [],
  270. data: {},
  271. gamemodeData: {
  272. gold: {
  273. sort: "g",
  274. },
  275. hack: {
  276. sort: "cr",
  277. },
  278. fish: {
  279. sort: "w",
  280. },
  281. pirate: {
  282. sort: "d",
  283. },
  284. defense2: {
  285. sort: "d",
  286. },
  287. brawl: {
  288. sort: "xp",
  289. upgrades: {
  290. egg: "Rapid Eggs",
  291. nut: "Crazy Acorns",
  292. slime: "Bouncing Slime",
  293. jesterBall: "Juggling Spheres",
  294. horseshoe: "Revolving Horseshoes",
  295. shell: "Rebounding Shell",
  296. pizza: "Boomerang Pizza",
  297. banana: "Curving Banana",
  298. arrow: "Speeding Arrows",
  299. peacock: "Peacock Feathers",
  300. bone: "Whirling Bones",
  301. bee: "Buzzing Bees",
  302. bubble: "Booming Bubbles",
  303. card: "Slicing Cards",
  304. laser: "Rapid-fire Lasers",
  305. darkEnergy: "Dark Energy",
  306. syrup: "Sticky Syrup",
  307. birdFeather: "Flying Feathers",
  308. },
  309. },
  310. dino: {
  311. sort: "f",
  312. },
  313. royale: {
  314. sort: "e",
  315. },
  316. defense: {
  317. sort: "d",
  318. },
  319. cafe: {
  320. sort: "ca",
  321. },
  322. factory: {
  323. sort: "ca",
  324. glitches: { lb: "Lunch Break", as: "Ad Spam", e37: "Error 37", nt: "Night Time", lo: "#LOL", j: "Jokester", sm: "Slow Mo", dp: "Dance Party", v: "Vortex", r: "Reverse", f: "Flip", m: "Micro" },
  325. },
  326. racing: {
  327. sort: "pr",
  328. },
  329. rush: {
  330. sort: "bs",
  331. },
  332. classic: {
  333. sort: "p",
  334. },
  335. tower: {},
  336. kingdom: {},
  337. toy: {
  338. sort: "t",
  339. sabotages: { 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" },
  340. },
  341. },
  342. exponents: ["⁰", "¹", "²", "³", "⁴", "⁵", "⁶", "⁷", "⁸", "⁹"],
  343. formatNumber(input) {
  344. const [number, exponent] = (input = parseFloat(input)).toLocaleString(undefined, { notation: "engineering" }).toLowerCase().split("e");
  345. if (exponent < 15) return number + ["", "k", "M", "B", "T"][exponent / 3];
  346. const [num, exp] = input.toLocaleString(undefined, { notation: "scientific" }).toLowerCase().split("e");
  347. return num + " \xd7 10" + exp.split("").reduce((a, b) => a + Logs.exponents[b], "");
  348. },
  349. leaderboardCache: {},
  350. createStandingElement(name) {
  351. const element = document.createElement("li");
  352. element.className = classes.standing;
  353. element.innerText = name;
  354. const blook = document.createElement("img");
  355. blook.className = classes.standingBlook;
  356. element.prepend(blook);
  357. return (Logs.leaderboardCache[name] = element);
  358. },
  359. setLeaderboard(standings) {
  360. if (standings.length > 0) leaderboardPath.style.display = "flex";
  361. leaderboardList.innerHTML = "";
  362. let place = 1;
  363. let blookInfo;
  364. for (let i = 0; i < standings.length; i++) {
  365. const standing = standings[i];
  366. const standingEl = Logs.leaderboardCache[standing.name] || Logs.createStandingElement(standing.name);
  367. standingEl.firstChild.src = (blookInfo = Logs.blookData[Logs.data[standing.name]?.b || "Black"]).url;
  368. standingEl.style.setProperty("--standingColor", blookInfo.color);
  369. standingEl.dataset[datasets.value] = Logs.formatNumber(standing.value);
  370. if (standings[i - 1]?.value != standings[i].value) place = i + 1;
  371. standingEl.dataset[datasets.place] = place;
  372. leaderboardList.append(standingEl);
  373. }
  374. },
  375. blookData: null,
  376. fetchBlooks() {
  377. return (
  378. Logs.blookData ??
  379. new Promise((r) => {
  380. var i = document.createElement("iframe");
  381. i.style.display = "none";
  382. var s = document.createElement("script");
  383. s.type = "module";
  384. s.src = document.querySelector("script[src*='ac.blooket.com']").src + "?" + Date.now();
  385. const a = document.createElement("div");
  386. a.id = "app";
  387. let blooks = {};
  388. document.body.appendChild(i);
  389. let finish;
  390. i.contentWindow.Object.prototype.hasOwnProperty.call = function (a, b) {
  391. if (a[b]?.rarity && a in blooks == false) Object.assign(blooks, a);
  392. finish ??= setTimeout(() => {
  393. document.body.removeChild(i);
  394. r((Logs.blookData = blooks));
  395. });
  396. return Object.prototype.hasOwnProperty.call(a, b);
  397. };
  398. i.contentDocument.body.appendChild(a);
  399. i.contentDocument.body.appendChild(s);
  400. })
  401. );
  402. },
  403. async connect() {
  404. try {
  405. const stateNode = getStateNode();
  406. if (!stateNode?.props?.liveGameController?._liveGameCode) return false;
  407. Logs.connection = await stateNode.props.liveGameController.getDatabaseRef("c");
  408. if (!Logs.connection) return false;
  409. await Logs.fetchBlooks();
  410. const gamemode = Logs.getGamemode();
  411. Logs.connection.on("value", (snapshot) => {
  412. const players = snapshot.val() || {};
  413. let added;
  414. if (!players || !(added = Logs.diffObjects(Logs.data, players))) return;
  415. Logs.data = players;
  416. if (Logs.gamemodeData[gamemode].sort) {
  417. Logs.standings = Object.entries(players)
  418. .map(([name, data]) => ({ name, blook: data.b, value: data[Logs.gamemodeData[gamemode].sort] || 0 }))
  419. .sort((a, b) => b.value - a.value);
  420. Logs.setLeaderboard(Logs.standings);
  421. }
  422. try {
  423. let addedPlayer;
  424. switch (gamemode) {
  425. case "brawl":
  426. for (const player in added) {
  427. if (!(addedPlayer = added[player]).up) continue;
  428. const upgrade = addedPlayer.up.split(":");
  429. if (upgrade.length == 2 && upgrade[0] in Logs.gamemodeData.brawl.upgrades) Logs.addAlert(player, `upgraded ${Logs.gamemodeData.brawl.upgrades[upgrade[0]]} to level ${upgrade[1]}`);
  430. }
  431. break;
  432. case "gold":
  433. for (const player in added) {
  434. if (!(addedPlayer = added[player]).tat) continue;
  435. const [tat, amount] = addedPlayer.tat.split(":");
  436. if (amount == "swap") Logs.addAlert(player, `just swapped ${document.querySelector("[src*='assets/candy']") ? "candy" : "gold"} with ${tat}`);
  437. else Logs.addAlert(player, `just took ${Logs.formatNumber(parseInt(amount))} ${document.querySelector("[src*='assets/candy']") ? "candy" : "gold"} from ${tat}`);
  438. }
  439. break;
  440. case "toy":
  441. for (const player in added) {
  442. if ((addedPlayer = added[player]).s) Logs.addAlert(player, `sabotaged with "${Logs.gamemodeData.toy.sabotages[addedPlayer.s]}"`);
  443. else if (addedPlayer.tat) {
  444. const [tat, amount] = addedPlayer.tat.split(":");
  445. if (amount == "swap") Logs.addAlert(player, `just swapped toys with ${tat}`);
  446. else Logs.addAlert(player, `just took ${Logs.formatNumber(parseInt(amount))} toy${amount == 1 ? "" : "s"} from ${tat}`);
  447. }
  448. }
  449. break;
  450. case "hack":
  451. for (const player in added) {
  452. if (!(addedPlayer = added[player]).tat) continue;
  453. const [tat, amount] = addedPlayer.tat.split(":");
  454. Logs.addAlert(player, `just took ${Logs.formatNumber(parseInt(amount))} crypto from ${tat}`);
  455. }
  456. break;
  457. case "pirate":
  458. for (const player in added) {
  459. if (!(addedPlayer = added[player]).tat) continue;
  460. const [tat, amount] = addedPlayer.tat.split(":");
  461. Logs.addAlert(player, `just took ${Logs.formatNumber(parseInt(amount))} doubloons from ${tat}`);
  462. }
  463. break;
  464. case "defense2":
  465. for (const player in added) {
  466. if (!(addedPlayer = added[player]).r) continue;
  467. Logs.addAlert(player, `just completed Round ${addedPlayer.r}!`);
  468. }
  469. break;
  470. case "fishing":
  471. for (const player in added) {
  472. if ((addedPlayer = added[player]).f == "Frenzy") Logs.addAlert(player, `just started a frenzy`);
  473. else if (addedPlayer.s) Logs.addAlert(player, `just sent a ${addedPlayer.f} distraction`);
  474. }
  475. break;
  476. case "dino":
  477. for (const player in added) {
  478. if (!(addedPlayer = added[player]).tat) continue;
  479. const [tat, caught] = addedPlayer.tat.split(":");
  480. if (caught == "true") Logs.addAlert(player, `just caught ${tat} CHEATING!`);
  481. else Logs.addAlert(player, `investigated ${tat}`);
  482. }
  483. break;
  484. case "cafe":
  485. for (const player in added) {
  486. if (!(addedPlayer = added[player]).up) continue;
  487. const [upgrade, level] = addedPlayer.up.split(":");
  488. if (level) Logs.addAlert(player, `upgraded ${upgrade} to level ${level}`);
  489. }
  490. break;
  491. case "factory":
  492. for (const player in added) {
  493. if ((addedPlayer = added[player]).g) Logs.addAlert(player, `activated the ${Logs.gamemodeData.factory.glitches[addedPlayer.g]} glitch!`);
  494. else if (addedPlayer.s) {
  495. const [amount, synergy] = addedPlayer.s.split("-");
  496. Logs.addAlert(player, `has a ${amount} ${synergy} synergy!`);
  497. } else if (addedPlayer.t) Logs.addAlert(player, `now has 10 Blooks!`);
  498. }
  499. break;
  500. }
  501. } catch (e) {
  502. console.error(e);
  503. Logs.addLog("Error adding an alert", "red");
  504. }
  505. });
  506. return true;
  507. } catch (e) {
  508. console.warn(e);
  509. return false;
  510. }
  511. },
  512. diffObjects(obj1, obj2) {
  513. const changed = {};
  514.  
  515. for (const key in obj1) {
  516. if (!(key in obj2)) continue;
  517. if (typeof obj1[key] === "object" && typeof obj2[key] === "object") {
  518. const recChanged = Logs.diffObjects(obj1[key], obj2[key]);
  519. if (recChanged && Object.keys(recChanged).length !== 0) changed[key] = recChanged;
  520. } else if (JSON.stringify(obj1[key]) !== JSON.stringify(obj2[key])) changed[key] = obj2[key];
  521. }
  522.  
  523. for (const key in obj2) if (!(key in obj1)) changed[key] = obj2[key];
  524.  
  525. if (Object.keys(changed).length == 0) return null;
  526. return changed;
  527. },
  528. getGamemode() {
  529. const gamemode = getStateNode().props?.client?.type;
  530. if (typeof gamemode == "string") return gamemode.toLowerCase();
  531. switch (window.location.pathname) {
  532. case "/play/gold":
  533. case "/play/gold/final":
  534. case "/gold/play/landing":
  535. return "gold";
  536. case "/play/hack":
  537. case "/play/hack/final":
  538. case "/hack/play/landing":
  539. return "hack";
  540. case "/play/fishing":
  541. case "/play/fishing/final":
  542. case "/fish/play/landing":
  543. return "fish";
  544. case "/play/pirate":
  545. case "/play/pirate/final":
  546. case "/pirate/play/landing":
  547. return "pirate";
  548. case "/play/defense2/load":
  549. case "/play/defense2":
  550. case "/play/defense2/final":
  551. case "/defense2/play/landing":
  552. return "defense2";
  553. case "/play/brawl/start":
  554. case "/play/brawl/settings":
  555. case "/play/brawl":
  556. case "/play/brawl/final":
  557. case "/brawl/play/landing":
  558. return "brawl";
  559. case "/play/dino":
  560. case "/play/dino/final":
  561. case "/dino/play/landing":
  562. return "dino";
  563. case "/play/battle-royale/match/preview":
  564. case "/play/battle-royale/question":
  565. case "/play/battle-royale/answer/sent":
  566. case "/play/battle-royale/answer/result":
  567. case "/play/battle-royale/match/result":
  568. case "/play/battle-royale/final":
  569. case "/royale/play/landing":
  570. return "royale";
  571. case "/defense/load":
  572. case "/defense":
  573. case "/defense/final":
  574. case "/defense/play/landing":
  575. return "defense";
  576. case "/cafe/load":
  577. case "/cafe":
  578. case "/cafe/shop":
  579. case "/cafe/final":
  580. case "/cafe/play/landing":
  581. return "cafe";
  582. case "/play/factory":
  583. case "/play/factory/settings":
  584. case "/play/factory/start":
  585. case "/play/factory/final":
  586. case "/factory/play/landing":
  587. return "factory";
  588. case "/play/racing":
  589. case "/play/racing/final":
  590. case "/racing/play/landing":
  591. return "racing";
  592. case "/play/rush":
  593. case "/play/rush/final":
  594. case "/rush/play/landing":
  595. return "rush";
  596. case "/play/classic/get-ready":
  597. case "/play/classic/question":
  598. case "/play/classic/answer/sent":
  599. case "/play/classic/answer/result":
  600. case "/play/classic/standings":
  601. case "/play/classic/final":
  602. case "/classic/play/landing":
  603. return "classic";
  604. case "/tower/load":
  605. case "/tower/start":
  606. case "/tower/map":
  607. case "/tower/battle":
  608. case "/tower/rest":
  609. case "/tower/risk":
  610. case "/tower/shop":
  611. case "/tower/victory":
  612. case "/tower/final":
  613. case "/tower/play/landing":
  614. return "tower";
  615. case "/kingdom/start":
  616. case "/kingdom":
  617. case "/kingdom/final":
  618. case "/kingdom/play/landing":
  619. return "kingdom";
  620. case "/play/toy":
  621. case "/play/toy/final":
  622. case "/toy/play/landing":
  623. return "toy";
  624. }
  625. return "";
  626. },
  627. sanitizer: document.createElement("div"),
  628. sanitizeText(text) {
  629. Logs.sanitizer.textContent = text;
  630. return Logs.sanitizer.innerHTML;
  631. },
  632. addAlert(name, message) {
  633. const element = document.createElement("li");
  634. element.className = classes.logMessage;
  635. const span = document.createElement("span");
  636. Logs.lastLog.setTime(Date.now());
  637. span.innerHTML = `<strong>${Logs.sanitizeText(name)}</strong>&nbsp;${Logs.sanitizeText(message)}<span style="opacity: 50%; flex: 1; text-align: right;">${parseTime(Logs.lastLog)}</span>`;
  638. let blook;
  639. if ((blook = Logs.blookData?.[Logs.data[name].b])) {
  640. const img = document.createElement("img");
  641. img.src = blook.url;
  642. span.prepend(img);
  643. }
  644. element.append(span);
  645. logMessages.prepend(element);
  646. },
  647. lastLog: new Date(),
  648. addLog(message, color) {
  649. const element = document.createElement("li");
  650. element.className = classes.logMessage;
  651. const span = document.createElement("span");
  652. if (color) span.style.color = color;
  653. span.style.display = "flex";
  654. Logs.lastLog.setTime(Date.now());
  655. span.innerHTML = "[LOG] " + Logs.sanitizeText(message) + `<span style="opacity: 50%; flex: 1; text-align: right;">${parseTime(Logs.lastLog)}</span>`;
  656. element.append(span);
  657. logMessages.prepend(element);
  658. },
  659. interval: null,
  660. };
  661.  
  662. if (window.location.host != "dashboard.blooket.com" && window.location.host != "blooket.com") Logs.interval = setInterval(() => Logs.connect().then((connected) => connected && clearInterval(Logs.interval)), 5000);
  663.  
  664. clearLogsButton.onclick = () => {
  665. clearLogsButton.animate([{ rotate: "0deg" }, { rotate: "360deg" }], { duration: 750, easing: "ease" });
  666. logMessages.innerHTML = "";
  667. Logs.addLog("Cleared Logs");
  668. };
  669.  
  670. const cheats = {
  671. global: {
  672. img: "https://ac.blooket.com/dashclassic/assets/Blooket-M6jYh_hk.png",
  673. name: "Global",
  674. cheats: [
  675. {
  676. name: "Auto Answer",
  677. description: "Toggles auto answer on",
  678. type: "toggle",
  679. enabled: false,
  680. data: null,
  681. run: function () {
  682. if (!this.enabled) {
  683. this.enabled = true;
  684. this.data = setInterval(() => {
  685. const stateNode = getStateNode();
  686. const Question = stateNode.state.question || stateNode.props.client.question;
  687. if (stateNode.state.question.qType != "typing") {
  688. if (stateNode.state.stage != "feedback" && !stateNode.state.feedback) {
  689. let ind;
  690. for (ind = 0; ind < Question.answers.length; ind++) {
  691. let found = false;
  692. for (let j = 0; j < Question.correctAnswers.length; j++)
  693. if (Question.answers[ind] == Question.correctAnswers[j]) {
  694. found = true;
  695. break;
  696. }
  697. if (found) break;
  698. }
  699. document.querySelectorAll("[class*='answerContainer']")[ind].click();
  700. } else document.querySelector("[class*='feedback'], [id*='feedback']").firstChild.click();
  701. } else Object.values(document.querySelector("[class*='typingAnswerWrapper']"))[1].children._owner.stateNode.sendAnswer(Question.answers[0]);
  702. }, 50);
  703. } else {
  704. this.enabled = false;
  705. clearInterval(this.data);
  706. this.data = null;
  707. }
  708. },
  709. },
  710. {
  711. name: "Highlight Answers",
  712. description: "Toggles highlight answers on",
  713. type: "toggle",
  714. enabled: false,
  715. data: null,
  716. run: function () {
  717. if (!this.enabled) {
  718. this.enabled = true;
  719. this.data = setInterval(() => {
  720. const stateNode = getStateNode();
  721. const Question = stateNode.state.question || stateNode.props.client.question;
  722. let ind = 0;
  723. while (ind < Question.answers.length) {
  724. let found = false;
  725. for (let j = 0; j < Question.correctAnswers.length; j++)
  726. if (Question.answers[ind] == Question.correctAnswers[j]) {
  727. found = true;
  728. break;
  729. }
  730. ind++;
  731. document.querySelector("[class*='answersHolder'] :nth-child(" + ind + ") > div").style.backgroundColor = found ? "rgb(0, 207, 119)" : "rgb(189, 15, 38)";
  732. }
  733. }, 50);
  734. } else {
  735. this.enabled = false;
  736. clearInterval(this.data);
  737. this.data = null;
  738. }
  739. },
  740. },
  741. {
  742. name: "Subtle Highlight Answers",
  743. description: "Toggles subtle highlight answers on",
  744. type: "toggle",
  745. enabled: false,
  746. data: null,
  747. run: function () {
  748. if (!this.enabled) {
  749. this.enabled = true;
  750. this.data = setInterval(() => {
  751. const stateNode = getStateNode();
  752. const Question = stateNode.state.question || stateNode.props.client.question;
  753. let ind = 0;
  754. while (ind < Question.answers.length) {
  755. let j = 0;
  756. let found = false;
  757. while (j < Question.correctAnswers.length) {
  758. if (Question.answers[ind] == Question.correctAnswers[j]) {
  759. found = true;
  760. break;
  761. }
  762. j++;
  763. }
  764. ind++;
  765. if (found) document.querySelector("[class*='answersHolder'] :nth-child(" + ind + ") > div").style.boxShadow = "unset";
  766. }
  767. }, 50);
  768. } else {
  769. this.enabled = false;
  770. clearInterval(this.data);
  771. this.data = null;
  772. }
  773. },
  774. },
  775. {
  776. name: "Percent Auto Answer",
  777. description: "Answers questions correctly or incorrectly depending on the goal grade given (Disable and re-enable to update goal)",
  778. inputs: [
  779. {
  780. name: "Target Grade",
  781. type: "number",
  782. },
  783. ],
  784. type: "toggle",
  785. enabled: false,
  786. data: null,
  787. run: function (target) {
  788. if (!this.enabled) {
  789. this.enabled = true;
  790. const stateNode = getStateNode();
  791. this.data = setInterval(
  792. (TARGET) => {
  793. try {
  794. const question = stateNode.state.question || stateNode.props.client.question;
  795. if (stateNode.state.stage == "feedback" || stateNode.state.feedback) return document.querySelector('[class*="feedback"], [id*="feedback"]')?.firstChild?.click?.();
  796. else if (document.querySelector("[class*='answerContainer']") || document.querySelector("[class*='typingAnswerWrapper']")) {
  797. let correct = 0,
  798. total = 0;
  799. for (let corrects in stateNode.corrects) correct += stateNode.corrects[corrects];
  800. for (let incorrect in stateNode.incorrects) total += stateNode.incorrects[incorrect];
  801. total += correct;
  802. const yes = total == 0 || Math.abs(correct / (total + 1) - TARGET) >= Math.abs((correct + 1) / (total + 1) - TARGET);
  803. if (stateNode.state.question.qType != "typing") {
  804. const answerContainers = document.querySelectorAll("[class*='answerContainer']");
  805. for (let i = 0; i < answerContainers.length; i++) {
  806. const contains = question.correctAnswers.includes(question.answers[i]);
  807. if (yes == contains) return answerContainers[i]?.click?.();
  808. }
  809. answerContainers[0].click();
  810. } else Object.values(document.querySelector("[class*='typingAnswerWrapper']"))[1].children._owner.stateNode.sendAnswer(yes ? question.answers[0] : Math.random().toString(36).substring(2));
  811. }
  812. } catch {}
  813. },
  814. 100,
  815. (target ?? 100) / 100
  816. );
  817. } else {
  818. this.enabled = false;
  819. clearInterval(this.data);
  820. this.data = null;
  821. }
  822. },
  823. },
  824. {
  825. name: "Auto Answer",
  826. description: "Click the correct answer for you",
  827. run: function () {
  828. const stateNode = getStateNode();
  829. const Question = stateNode.state.question || stateNode.props.client.question;
  830. if (stateNode.state.question.qType != "typing") {
  831. if (stateNode.state.stage != "feedback" && !stateNode.state.feedback) {
  832. let ind;
  833. for (ind = 0; ind < Question.answers.length; ind++) {
  834. let found = false;
  835. for (let j = 0; j < Question.correctAnswers.length; j++)
  836. if (Question.answers[ind] == Question.correctAnswers[j]) {
  837. found = true;
  838. break;
  839. }
  840. if (found) break;
  841. }
  842. document.querySelectorAll("[class*='answerContainer']")[ind].click();
  843. } else document.querySelector("[class*='feedback'], [id*='feedback']").firstChild.click();
  844. } else Object.values(document.querySelector("[class*='typingAnswerWrapper']"))[1].children._owner.stateNode.sendAnswer(Question.answers[0]);
  845. },
  846. },
  847. {
  848. name: "Highlight Answers",
  849. description: "Colors answers to be red or green highlighting the correct ones",
  850. run: function () {
  851. const stateNode = getStateNode();
  852. const Question = stateNode.state.question || stateNode.props.client.question;
  853. let ind = 0;
  854. while (ind < Question.answers.length) {
  855. let found = false;
  856. for (let j = 0; j < Question.correctAnswers.length; j++)
  857. if (Question.answers[ind] == Question.correctAnswers[j]) {
  858. found = true;
  859. break;
  860. }
  861. ind++;
  862. document.querySelector("[class*='answersHolder'] :nth-child(" + ind + ") > div").style.backgroundColor = found ? "rgb(0, 207, 119)" : "rgb(189, 15, 38)";
  863. }
  864. },
  865. },
  866. {
  867. name: "Spam Buy Blooks",
  868. description: "Opens a box an amount of times",
  869. inputs: [
  870. {
  871. name: "Box",
  872. type: "options",
  873. options: () =>
  874. Array.from(document.querySelectorAll("[class*='packsWrapper'] > div")).reduce((a, b) => {
  875. b.querySelector("[class*='blookContainer'] > img") || a.push(b.querySelector("[class*='packImgContainer'] > img").alt);
  876. return a;
  877. }, []),
  878. },
  879. {
  880. name: "Amount",
  881. type: "number",
  882. },
  883. {
  884. name: "Show Unlocks",
  885. type: "options",
  886. options: [
  887. {
  888. name: "Show Unlocks",
  889. value: true,
  890. },
  891. {
  892. name: "Don't Show Unlocks",
  893. value: false,
  894. },
  895. ],
  896. },
  897. ],
  898. run: async function (box, amountToOpen, alertBlooks) {
  899. if (window.location.pathname.startsWith("/market")) {
  900. const stateNode = getStateNode();
  901. const prices = Array.prototype.reduce.call(
  902. document.querySelectorAll("[class*='packsWrapper'] > div"),
  903. (a, b) => {
  904. b.querySelector("[class*='blookContainer'] > img") || (a[b.querySelector("[class*='packImgContainer'] > img").alt] = parseInt(b.querySelector("[class*='packBottom']").textContent));
  905. return a;
  906. },
  907. {}
  908. );
  909. box = box
  910. .split(" ")
  911. .map((str) => str.charAt(0).toUpperCase() + str.slice(1).toLowerCase())
  912. .join(" ");
  913. const cost = prices[box];
  914. if (!cost) return alert("I couldn't find that box!");
  915.  
  916. const canOpen = Math.floor(stateNode.state.tokens / cost);
  917. if (canOpen <= 0) return alert("You do not have enough tokens!");
  918. const amount = Math.min(canOpen, amountToOpen || 0);
  919.  
  920. const blooks = {},
  921. now = Date.now();
  922.  
  923. for (let i = 0; i < amount; i++) {
  924. await stateNode.buyPack(true, box);
  925.  
  926. blooks[stateNode.state.unlockedBlook] ||= 0;
  927. blooks[stateNode.state.unlockedBlook]++;
  928.  
  929. stateNode.startOpening();
  930. clearTimeout(stateNode.openTimeout);
  931. const rarity = stateNode.state.purchasedBlookRarity;
  932.  
  933. stateNode.setState({ canOpen: true, currentPack: "", opening: alertBlooks, doneOpening: alertBlooks, openPack: alertBlooks });
  934. clearTimeout(stateNode.canOpenTimeout);
  935. if (rarity == "Chroma") break;
  936. }
  937. await new Promise((r) => setTimeout(r));
  938. alert(
  939. `(${Date.now() - now}ms) Results:\n${Object.entries(blooks)
  940. .map(([blook, amount]) => ` ${blook} ${amount}`)
  941. .join(`\n`)}`
  942. );
  943. } else alert("This can only be ran in the Market page.");
  944. },
  945. },
  946. {
  947. name: "Host Any Gamemode",
  948. description: "Change the selected gamemode on the host settings page",
  949. inputs: [
  950. {
  951. name: "Gamemode",
  952. type: "options",
  953. options: ["Racing", "Classic", "Factory", "Cafe", "Defense2", "Defense", "Royale", "Gold", "Candy", "Brawl", "Hack", "Pirate", "Fish", "Dino", "Toy", "Rush"],
  954. },
  955. ],
  956. run: function (type) {
  957. if (location.pathname != "/host/settings") return alert("Run this script on the host settings page");
  958. getStateNode().setState({ settings: { type } });
  959. },
  960. },
  961. {
  962. name: "Change Blook Ingame",
  963. description: "Changes your blook",
  964. inputs: [
  965. {
  966. name: "Blook (case sensitive)",
  967. type: "string",
  968. },
  969. ],
  970. run: function (blook) {
  971. let { props } = getStateNode();
  972. props.liveGameController.setVal({ path: `c/${props.client.name}/b`, val: (props.client.blook = blook) });
  973. },
  974. },
  975. {
  976. name: "Get Daily Rewards",
  977. description: "Gets max daily tokens and xp",
  978. run: async function () {
  979. 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/");
  980. else {
  981. const gameId = [
  982. "60101da869e8c70013913b59",
  983. "625db660c6842334835cb4c6",
  984. "60268f8861bd520016eae038",
  985. "611e6c804abdf900668699e3",
  986. "60ba5ff6077eb600221b7145",
  987. "642467af9b704783215c1f1b",
  988. "605bd360e35779001bf57c5e",
  989. "6234cc7add097ff1c9cff3bd",
  990. "600b1491d42a140004d5215a",
  991. "5db75fa3f1fa190017b61c0c",
  992. "5fac96fe2ca0da00042b018f",
  993. "600b14d8d42a140004d52165",
  994. "5f88953cdb209e00046522c7",
  995. "600b153ad42a140004d52172",
  996. "5fe260e72a505b00040e2a11",
  997. "5fe3d085a529560004cd3076",
  998. "5f5fc017aee59500041a1456",
  999. "608b0a5863c4f2001eed43f4",
  1000. "5fad491512c8620004918ace",
  1001. "5fc91a9b4ea2e200046bd49a",
  1002. "5c5d06a7deebc70017245da7",
  1003. "5ff767051b68750004a6fd21",
  1004. "5fdcacc85d465a0004b021b9",
  1005. "5fb7eea20bd44300045ba495",
  1006. ][Math.floor(Math.random() * 24)];
  1007. const rand = (l, h) => Math.floor(Math.random() * (h - l + 1)) + l;
  1008. const { t } = await fetch("https://play.blooket.com/api/playersessions/solo", {
  1009. body: JSON.stringify({ gameMode: "Factory", questionSetId: gameId }),
  1010. method: "POST",
  1011. credentials: "include",
  1012. })
  1013. .then((x) => x.json())
  1014. .catch(() => alert("There was an error creating a solo game."));
  1015. await fetch("https://play.blooket.com/api/playersessions/landings", {
  1016. body: JSON.stringify({ t }),
  1017. method: "POST",
  1018. credentials: "include",
  1019. }).catch(() => alert("There was an error when landing."));
  1020. await fetch("https://play.blooket.com/api/playersessions/questions?t=" + t, { credentials: "include" });
  1021. await fetch("https://play.blooket.com/api/gamequestionsets?gameId=" + gameId, { credentials: "include" });
  1022. await fetch("https://play.blooket.com/api/users/factorystats", {
  1023. body: JSON.stringify({ t, place: 1, cash: rand(10000000, 100000000), playersDefeated: 0, correctAnswers: rand(500, 2000), upgrades: rand(250, 750), blookUsed: "Chick", nameUsed: "You", mode: "Time-Solo" }),
  1024. method: "PUT",
  1025. credentials: "include",
  1026. }).catch(() => alert("There was an error when spoofing stats."));
  1027. await fetch("https://play.blooket.com/api/users/add-rewards", {
  1028. body: JSON.stringify({ t, addedTokens: 500, addedXp: 300 }),
  1029. method: "PUT",
  1030. credentials: "include",
  1031. })
  1032. .then((x) => x.json())
  1033. .then(({ dailyReward }) => alert(`Added max tokens and xp, and got ${dailyReward} daily wheel tokens!`))
  1034. .catch(() => alert("There was an error when adding rewards."));
  1035. }
  1036. },
  1037. },
  1038. {
  1039. name: "Use Any Blook",
  1040. description: "Allows you to play as any blook",
  1041. data: null,
  1042. getBlooks(isLobby, stateNode) {
  1043. if (this.data?.Black) return;
  1044. isLobby = isLobby ? "keys" : "entries";
  1045. const old = Object[isLobby];
  1046. const scope = this;
  1047. Object[isLobby] = function (obj) {
  1048. if (!obj.Chick) return old.call(this, obj);
  1049. scope.data = obj;
  1050. return (Object[isLobby] = old).call(this, obj);
  1051. };
  1052. stateNode.render();
  1053. },
  1054. run: function () {
  1055. const stateNode = getStateNode();
  1056. const lobby = window.location.pathname.startsWith("/play/lobby"),
  1057. blooks = !lobby && window.location.pathname.startsWith("/blooks");
  1058. if (!blooks && !lobby) return alert("This only works in lobbies or the dashboard blooks page.");
  1059. this.getBlooks(lobby, stateNode);
  1060. if (lobby) return stateNode.setState({ unlocks: Object.keys(this.data) });
  1061. stateNode.setState({
  1062. blookData: Object.keys(this.data).reduce((a, b) => ((a[b] = stateNode.state.blookData[b] || 1), a), {}),
  1063. allSets: Object.values(this.data).reduce((a, b) => (b.set && a.includes(b.set) ? a : a.concat(b.set)), []),
  1064. });
  1065. },
  1066. },
  1067. {
  1068. name: "Every Answer Correct",
  1069. description: "Sets every answer to be correct",
  1070. run: function () {
  1071. const stateNode = getStateNode();
  1072. for (let i = 0; i < stateNode.freeQuestions.length; i++) {
  1073. stateNode.freeQuestions[i].correctAnswers = stateNode.freeQuestions[i].answers;
  1074. stateNode.questions[i].correctAnswers = stateNode.questions[i].answers;
  1075. stateNode.props.client.questions[i].correctAnswers = stateNode.questions[i].answers;
  1076. }
  1077. try {
  1078. stateNode.forceUpdate();
  1079. } catch {}
  1080. },
  1081. },
  1082. {
  1083. name: "Subtle Highlight Answers",
  1084. description: "Removes the shadow from correct answers",
  1085. run: function () {
  1086. const stateNode = getStateNode();
  1087. const Question = stateNode.state.question || stateNode.props.client.question;
  1088. let ind = 0;
  1089. while (ind < Question.answers.length) {
  1090. let j = 0;
  1091. let found = false;
  1092. while (j < Question.correctAnswers.length) {
  1093. if (Question.answers[ind] == Question.correctAnswers[j]) {
  1094. found = true;
  1095. break;
  1096. }
  1097. j++;
  1098. }
  1099. ind++;
  1100. if (found) document.querySelector("[class*='answersHolder'] :nth-child(" + ind + ") > div").style.boxShadow = "unset";
  1101. }
  1102. },
  1103. },
  1104. {
  1105. name: "Remove Random Name",
  1106. description: "Allows you to put a custom name",
  1107. run: function () {
  1108. getStateNode().setState({ isRandom: false, client: { name: "" } });
  1109. document.querySelector('[class*="nameInput"]')?.focus?.();
  1110. },
  1111. },
  1112. {
  1113. name: "Sell Duplicate Blooks",
  1114. description: "Sell all duplicate blooks leaving you with 1 each",
  1115. run: async function () {
  1116. if (window.location.pathname.startsWith("/blooks")) {
  1117. if (confirm(`Are you sure you want to sell your dupes? (Legendaries and rarer will not be sold)`)) {
  1118. let stateNode = getStateNode();
  1119. let now = Date.now(),
  1120. results = "";
  1121. for (const blook in stateNode.state.blookData)
  1122. if (stateNode.state.blookData[blook] > 1) {
  1123. stateNode.setState({ blook, numToSell: stateNode.state.blookData[blook] - 1 });
  1124. if (!["Uncommon", "Rare", "Epic"].includes(document.querySelector("[class*='highlightedRarity']").innerText.trim())) continue;
  1125. results += ` ${blook} ${stateNode.state.blookData[blook] - 1}\n`;
  1126. await stateNode.sellBlook({ preventDefault: () => {} }, true);
  1127. }
  1128. alert(`(${Date.now() - now}ms) Results:\n${results.trim()}`);
  1129. }
  1130. } else alert("This can only be ran in the Blooks page.");
  1131. },
  1132. },
  1133. ],
  1134. },
  1135. gold: {
  1136. img: new Date().getMonth() == 9 ? "https://media.blooket.com/image/upload/v1663212881/Media/logos/Candy_Quest_Logo.png" : "https://media.blooket.com/image/upload/v1663212881/Media/logos/Gold_Quest_Logo_Resized.png",
  1137. name: "Gold Quest",
  1138. cheats: [
  1139. {
  1140. name: "Always Triple",
  1141. description: "Always get triple gold",
  1142. type: "toggle",
  1143. enabled: false,
  1144. data: { type: "multiply", val: 3, text: "Triple Gold!", blook: "Unicorn" },
  1145. run: function () {
  1146. let stateNode = getStateNode();
  1147. stateNode._choosePrize ||= stateNode.choosePrize;
  1148. if (!this.enabled) {
  1149. this.enabled = true;
  1150. stateNode.choosePrize = (i) => {
  1151. stateNode.state.choices[i] = this.data;
  1152. stateNode._choosePrize(i);
  1153. };
  1154. } else {
  1155. this.enabled = false;
  1156. if (stateNode._choosePrize) stateNode.choosePrize = stateNode._choosePrize;
  1157. }
  1158. },
  1159. },
  1160. {
  1161. name: "Auto Choose",
  1162. description: "Automatically picks the option that would give you the most gold",
  1163. type: "toggle",
  1164. enabled: false,
  1165. data: null,
  1166. run: function () {
  1167. if (!this.enabled) {
  1168. this.enabled = true;
  1169. this.data = setInterval(async () => {
  1170. let stateNode = getStateNode();
  1171. if (stateNode.state.stage == "prize") {
  1172. stateNode.props.liveGameController.getDatabaseVal("c", (players) => {
  1173. try {
  1174. if (players == null) return;
  1175. players = Object.entries(players);
  1176. let most = 0,
  1177. max = 0,
  1178. index = -1;
  1179. for (let i = 0; i < players.length; i++) if (players[i][0] != stateNode.props.client.name && players[i][1] > most) most = players[i][1];
  1180. for (let i = 0; i < stateNode.state.choices.length; i++) {
  1181. const choice = stateNode.state.choices[i];
  1182. let value = stateNode.state.gold;
  1183. if (choice.type == "gold") value = stateNode.state.gold + choice.val || stateNode.state.gold;
  1184. else if (choice.type == "multiply" || choice.type == "divide") value = Math.round(stateNode.state.gold * choice.val) || stateNode.state.gold;
  1185. else if (choice.type == "swap") value = most || stateNode.state.gold;
  1186. else if (choice.type == "take") value = stateNode.state.gold + most * choice.val || stateNode.state.gold;
  1187. if ((value || 0) <= max) continue;
  1188. max = value;
  1189. index = i + 1;
  1190. }
  1191. document.querySelector("div[class*='choice" + index + "']")?.click();
  1192. } catch {}
  1193. });
  1194. }
  1195. }, 50);
  1196. } else {
  1197. this.enabled = false;
  1198. clearInterval(this.data);
  1199. this.data = null;
  1200. }
  1201. },
  1202. },
  1203. {
  1204. name: "Chest ESP",
  1205. description: "Shows what each chest will give you",
  1206. type: "toggle",
  1207. enabled: false,
  1208. data: null,
  1209. run: function () {
  1210. if (!this.enabled) {
  1211. this.enabled = true;
  1212. this.data = setInterval(() => {
  1213. getStateNode().state.choices.forEach(({ text }, index) => {
  1214. let chest = document.querySelector(`div[class*='choice${index + 1}']`);
  1215. if (!chest || chest.querySelector("div")) return;
  1216. let choice = document.createElement("div");
  1217. choice.style.color = "white";
  1218. choice.style.fontFamily = "Eczar";
  1219. choice.style.fontSize = "2em";
  1220. choice.style.display = "flex";
  1221. choice.style.justifyContent = "center";
  1222. choice.style.transform = "translateY(200px)";
  1223. choice.innerText = text;
  1224. chest.append(choice);
  1225. });
  1226. }, 50);
  1227. } else {
  1228. this.enabled = false;
  1229. clearInterval(this.data);
  1230. this.data = null;
  1231. }
  1232. },
  1233. },
  1234. {
  1235. name: "Remove Bad Choices",
  1236. description: "Removes the chance of getting Lose 25%, Lose 50%, and Nothing",
  1237. run: function () {
  1238. let iterator = Array.prototype[Symbol.iterator];
  1239. Array.prototype[Symbol.iterator] = function* values() {
  1240. if (this[0]?.type == "gold") {
  1241. Array.prototype[Symbol.iterator] = iterator;
  1242. console.log(this);
  1243. for (let i = 0; i < this.length; i++) if (this[i].type == "divide" || this[i].type == "nothing") this.splice(i--, 1);
  1244. }
  1245. yield* iterator.apply(this);
  1246. };
  1247.  
  1248. getStateNode().constructor.prototype.answerNext.call({ nextReady: true, here: true, state: { correct: true }, setState() {} });
  1249. },
  1250. },
  1251. {
  1252. name: "Reset Players Gold",
  1253. description: "Sets a player's gold to 0",
  1254. inputs: [
  1255. {
  1256. name: "Player",
  1257. type: "options",
  1258. options: () => {
  1259. let stateNode = getStateNode();
  1260. return stateNode.props.liveGameController._liveApp ? new Promise((res) => stateNode.props.liveGameController.getDatabaseVal("c", (players) => players && res(Object.keys(players)))) : [];
  1261. },
  1262. },
  1263. ],
  1264. run: function (target) {
  1265. let stateNode = getStateNode();
  1266. stateNode.props.liveGameController.setVal({
  1267. path: "c/" + stateNode.props.client.name + "/tat",
  1268. val: target + ":swap:0",
  1269. });
  1270. },
  1271. },
  1272. {
  1273. name: "Set Gold",
  1274. description: "Sets amount of gold",
  1275. inputs: [
  1276. {
  1277. name: "Gold",
  1278. type: "number",
  1279. },
  1280. ],
  1281. run: function (gold) {
  1282. let stateNode = getStateNode();
  1283. stateNode.setState({ gold, gold2: gold });
  1284. stateNode.props.liveGameController.setVal({
  1285. path: "c/" + stateNode.props.client.name + "/g",
  1286. val: gold,
  1287. });
  1288. },
  1289. },
  1290. {
  1291. name: "Set Player's Gold",
  1292. description: "Sets another player's gold",
  1293. inputs: [
  1294. {
  1295. name: "Player",
  1296. type: "options",
  1297. options: () => {
  1298. let stateNode = getStateNode();
  1299. return stateNode.props.liveGameController._liveApp ? new Promise((res) => stateNode.props.liveGameController.getDatabaseVal("c", (players) => players && res(Object.keys(players)))) : [];
  1300. },
  1301. },
  1302. {
  1303. name: "Gold",
  1304. type: "number",
  1305. },
  1306. ],
  1307. run: function (player, gold) {
  1308. let stateNode = getStateNode();
  1309. stateNode.props.liveGameController.setVal({
  1310. path: "c/" + stateNode.props.client.name + "/tat",
  1311. val: player + ":swap:" + gold
  1312. });
  1313. }
  1314. },
  1315. {
  1316. name: "Swap Gold",
  1317. description: "Swaps gold with someone",
  1318. inputs: [
  1319. {
  1320. name: "Player",
  1321. type: "options",
  1322. options: () => {
  1323. let stateNode = getStateNode();
  1324. return stateNode.props.liveGameController._liveApp ? new Promise((res) => stateNode.props.liveGameController.getDatabaseVal("c", (players) => players && res(Object.keys(players)))) : [];
  1325. },
  1326. },
  1327. ],
  1328. run: function (player) {
  1329. let stateNode = getStateNode();
  1330. stateNode.props.liveGameController.getDatabaseVal("c", (players) => {
  1331. if (!players || players[player] == null) return;
  1332. const gold = players[player].g || 0;
  1333. stateNode.props.liveGameController.setVal({
  1334. path: "c/" + stateNode.props.client.name,
  1335. val: {
  1336. b: stateNode.props.client.blook,
  1337. tat: player + ":swap:" + (stateNode.state.gold || 0),
  1338. g: gold,
  1339. },
  1340. });
  1341. stateNode.setState({ gold, gold2: gold });
  1342. });
  1343. },
  1344. },
  1345. ],
  1346. },
  1347. hack: {
  1348. img: "https://media.blooket.com/image/upload/v1663212882/Media/logos/Crypto_Hack_Logo_Resized.png",
  1349. name: "Crypto Hack",
  1350. cheats: [
  1351. {
  1352. name: "Choice ESP",
  1353. description: "Shows what each choice will give you",
  1354. type: "toggle",
  1355. enabled: false,
  1356. data: null,
  1357. run: function () {
  1358. if (!this.enabled) {
  1359. this.enabled = true;
  1360. this.data = setInterval(() => {
  1361. let chest = document.querySelector("[class*=feedbackContainer]");
  1362. if (chest.children.length <= 4) {
  1363. let choice = document.createElement("div");
  1364. choice.style.color = "white";
  1365. choice.style.fontFamily = "Inconsolata,Helvetica,monospace,sans-serif";
  1366. choice.style.fontSize = "2em";
  1367. choice.style.display = "flex";
  1368. choice.style.justifyContent = "center";
  1369. choice.style.marginTop = "675px";
  1370. choice.innerText = getStateNode().state.choices[0].text;
  1371. chest.append(choice);
  1372. }
  1373. }, 50);
  1374. } else {
  1375. this.enabled = false;
  1376. clearInterval(this.data);
  1377. this.data = null;
  1378. }
  1379. },
  1380. },
  1381. {
  1382. name: "Password ESP",
  1383. description: "Highlights the correct password",
  1384. type: "toggle",
  1385. enabled: false,
  1386. data: null,
  1387. run: function () {
  1388. if (!this.enabled) {
  1389. this.enabled = true;
  1390. this.data = setInterval(() => {
  1391. let { state } = getStateNode();
  1392. if (state.stage == "hack")
  1393. for (const button of document.querySelector("div[class*=buttonContainer]").children) {
  1394. if (button.innerText == state.correctPassword) continue;
  1395. button.style.outlineColor = "rgba(255, 64, 64, 0.8)";
  1396. button.style.backgroundColor = "rgba(255, 64, 64, 0.8)";
  1397. button.style.textShadow = "0 0 1px #f33";
  1398. }
  1399. }, 50);
  1400. } else {
  1401. this.enabled = false;
  1402. clearInterval(this.data);
  1403. this.data = null;
  1404. }
  1405. },
  1406. },
  1407. {
  1408. name: "Always Triple",
  1409. description: "Always get triple crypto",
  1410. type: "toggle",
  1411. enabled: false,
  1412. data: null,
  1413. run: function () {
  1414. if (!this.enabled) {
  1415. this.enabled = true;
  1416. this.data = setInterval((state) => getStateNode().setState(state), 25, { choices: [{ type: "mult", val: 3, rate: 0.075, blook: "Brainy Bot", text: "Triple Crypto" }] });
  1417. } else {
  1418. this.enabled = false;
  1419. clearInterval(this.data);
  1420. this.data = null;
  1421. }
  1422. },
  1423. },
  1424. {
  1425. name: "Auto Guess",
  1426. description: "Automatically guess the correct password",
  1427. type: "toggle",
  1428. enabled: false,
  1429. data: null,
  1430. run: function () {
  1431. if (!this.enabled) {
  1432. this.enabled = true;
  1433. this.data = setInterval(() => {
  1434. let { state } = getStateNode();
  1435. if (state.stage == "hack") for (const button of document.querySelector("div[class*=buttonContainer]").children) button.innerText == state.correctPassword && button.click();
  1436. }, 50);
  1437. } else {
  1438. this.enabled = false;
  1439. clearInterval(this.data);
  1440. this.data = null;
  1441. }
  1442. },
  1443. },
  1444. {
  1445. name: "Remove Hack",
  1446. description: "Removes an attacking hack",
  1447. run: function () {
  1448. getStateNode().setState({ hack: "" });
  1449. },
  1450. },
  1451. {
  1452. name: "Set Crypto",
  1453. description: "Sets crypto",
  1454. inputs: [
  1455. {
  1456. name: "Amount",
  1457. type: "number",
  1458. },
  1459. ],
  1460. run: function (amount) {
  1461. let stateNode = getStateNode();
  1462. stateNode.setState({ crypto: amount, crypto2: amount });
  1463. stateNode.props.liveGameController.setVal({
  1464. path: `c/${stateNode.props.client.name}/cr`,
  1465. val: amount,
  1466. });
  1467. },
  1468. },
  1469. {
  1470. name: "Set Password",
  1471. description: "Sets hacking password",
  1472. inputs: [
  1473. {
  1474. name: "Custom Password",
  1475. type: "string",
  1476. },
  1477. ],
  1478. run: function (password) {
  1479. let stateNode = getStateNode();
  1480. stateNode.setState({ password });
  1481. stateNode.props.liveGameController.setVal({
  1482. path: `c/${stateNode.props.client.name}/p`,
  1483. val: password,
  1484. });
  1485. },
  1486. },
  1487. {
  1488. name: "Steal Player's Crypto",
  1489. description: "Steals all of someone's crypto",
  1490. inputs: [
  1491. {
  1492. name: "Player",
  1493. type: "options",
  1494. options: () => {
  1495. let stateNode = getStateNode();
  1496. return stateNode.props.liveGameController._liveApp ? new Promise((res) => stateNode.props.liveGameController.getDatabaseVal("c", (players) => players && res(Object.keys(players)))) : [];
  1497. },
  1498. },
  1499. ],
  1500. run: function (target) {
  1501. let stateNode = getStateNode();
  1502. stateNode.props.liveGameController.getDatabaseVal("c", (players) => {
  1503. let player;
  1504. if (players && (player = Object.entries(players).find((x) => x[0].toLowerCase() == target.toLowerCase()))) {
  1505. const cr = player[1].cr;
  1506. stateNode.setState({
  1507. crypto: stateNode.state.crypto + cr,
  1508. crypto2: stateNode.state.crypto + cr,
  1509. });
  1510. stateNode.props.liveGameController.setVal({
  1511. path: "c/" + stateNode.props.client.name,
  1512. val: {
  1513. b: stateNode.props.client.blook,
  1514. p: stateNode.state.password,
  1515. cr: stateNode.state.crypto + cr,
  1516. tat: player[0] + ":" + cr,
  1517. },
  1518. });
  1519. }
  1520. });
  1521. },
  1522. },
  1523. ],
  1524. },
  1525. fish: {
  1526. img: "https://media.blooket.com/image/upload/v1663212881/Media/logos/Fishing_Frenzy_Logo_Resized.png",
  1527. name: "Fishing Frenzy",
  1528. cheats: [
  1529. {
  1530. name: "Remove Distractions",
  1531. description: "Removes distractions",
  1532. type: "toggle",
  1533. enabled: false,
  1534. data: null,
  1535. run: function () {
  1536. if (!this.enabled) {
  1537. this.enabled = true;
  1538. this.data = setInterval(() => {
  1539. getStateNode().setState({ party: "" });
  1540. }, 50);
  1541. } else {
  1542. this.enabled = false;
  1543. clearInterval(this.data);
  1544. this.data = null;
  1545. }
  1546. },
  1547. },
  1548. {
  1549. name: "Frenzy",
  1550. description: "Sets everyone to frenzy mode",
  1551. run: function () {
  1552. let stateNode = getStateNode();
  1553. stateNode.props.liveGameController.setVal({
  1554. path: `c/${stateNode.props.client.name}`,
  1555. val: {
  1556. b: stateNode.props.client.blook,
  1557. w: stateNode.state.weight,
  1558. f: "Frenzy",
  1559. s: true,
  1560. },
  1561. });
  1562. },
  1563. },
  1564. {
  1565. name: "Send Distraction",
  1566. description: "Sends a distraction to everyone",
  1567. inputs: [
  1568. {
  1569. name: "Distraction",
  1570. type: "options",
  1571. options: ["Crab", "Jellyfish", "Frog", "Pufferfish", "Octopus", "Narwhal", "Megalodon", "Blobfish", "Baby Shark"],
  1572. },
  1573. ],
  1574. run: function (f) {
  1575. let stateNode = getStateNode();
  1576. stateNode.safe = true;
  1577. stateNode.props.liveGameController.setVal({
  1578. path: `c/${stateNode.props.client.name}`,
  1579. val: {
  1580. b: stateNode.props.client.blook,
  1581. w: stateNode.state.weight,
  1582. f,
  1583. s: true,
  1584. },
  1585. });
  1586. },
  1587. },
  1588. {
  1589. name: "Set Lure",
  1590. description: "Sets fishing lure (range 1 - 5)",
  1591. inputs: [
  1592. {
  1593. name: "Lure (1 - 5)",
  1594. type: "number",
  1595. min: 1,
  1596. max: 5,
  1597. },
  1598. ],
  1599. run: function (lure) {
  1600. getStateNode().setState({ lure: Math.max(Math.min(lure - 1, 4), 0) });
  1601. },
  1602. },
  1603. {
  1604. name: "Set Weight",
  1605. description: "Sets weight",
  1606. inputs: [
  1607. {
  1608. name: "Weight",
  1609. type: "number",
  1610. },
  1611. ],
  1612. run: function (weight) {
  1613. let stateNode = getStateNode();
  1614. stateNode.setState({ weight, weight2: weight });
  1615. stateNode.props.liveGameController.setVal({
  1616. path: `c/${stateNode.props.client.name}`,
  1617. val: {
  1618. b: stateNode.props.client.blook,
  1619. w: weight,
  1620. f: ["Crab", "Jellyfish", "Frog", "Pufferfish", "Octopus", "Narwhal", "Megalodon", "Blobfish", "Baby Shark"][Math.floor(Math.random() * 9)],
  1621. },
  1622. });
  1623. },
  1624. },
  1625. ],
  1626. },
  1627. pirate: {
  1628. img: "https://media.blooket.com/image/upload/v1695317816/Media/logos/PiratesVoyageLogoSmall.png",
  1629. name: "Pirate's Voyage",
  1630. cheats: [
  1631. {
  1632. name: "Heist ESP",
  1633. description: "Shows you what's under each chest during a heist",
  1634. type: "toggle",
  1635. enabled: false,
  1636. data: null,
  1637. imgs: null,
  1638. run: function () {
  1639. if (!this.enabled) {
  1640. this.enabled = true;
  1641. this.data = setInterval(() => {
  1642. const stateNode = getStateNode();
  1643. if (stateNode.state.stage != "heist") return;
  1644. 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);
  1645. const esp = Object.values(document.querySelector("[class*=modal]"))[0].return.memoizedState.memoizedState;
  1646. for (const e of document.querySelectorAll("[class*=boxContent] > div")) e.remove();
  1647. const open = Object.values(document.querySelector("[class*=modal]"))[0].return.memoizedState.next.next.memoizedState;
  1648. Array.prototype.forEach.call(document.querySelector("[class*=chestsWrapper]").children, (container, i) => {
  1649. const box = container.firstChild.firstChild;
  1650. if (open.includes(i)) return (box.style.opacity = "");
  1651. box.style.opacity = "0.5";
  1652. let d = document.createElement("div");
  1653. d.innerHTML = "<img src='" + this.imgs[2 - esp[i]] + "' style='max-width: 75%; max-height: 75%'></img>";
  1654. d.className = "chestESP";
  1655. d.style.position = "absolute";
  1656. d.style.inset = "0";
  1657. d.style.display = "grid";
  1658. d.style.placeItems = "center";
  1659. d.style.pointerEvents = "none";
  1660. container.onclick = () => {
  1661. d.remove();
  1662. box.style.opacity = "";
  1663. };
  1664. container.firstChild.prepend(d);
  1665. });
  1666. }, 50);
  1667. } else {
  1668. this.enabled = false;
  1669. clearInterval(this.data);
  1670. this.data = null;
  1671. }
  1672. },
  1673. },
  1674. {
  1675. name: "Max Levels",
  1676. description: "Maxes out all islands and your boat",
  1677. run: function () {
  1678. let stateNode = getStateNode();
  1679. stateNode.setState({ islandLevels: new Array(stateNode.state.islandLevels.length).fill(5) }, stateNode.updateBoatLevel);
  1680. },
  1681. },
  1682. {
  1683. name: "Set Doubloons",
  1684. description: "Sets Doubloons",
  1685. inputs: [
  1686. {
  1687. name: "Amount",
  1688. type: "number",
  1689. },
  1690. ],
  1691. run: function (doubloons) {
  1692. let stateNode = getStateNode();
  1693. stateNode.setState({ doubloons });
  1694. stateNode.props.liveGameController.setVal({
  1695. path: `c/${stateNode.props.client.name}/d`,
  1696. val: doubloons,
  1697. });
  1698. },
  1699. },
  1700. {
  1701. name: "Start Heist",
  1702. description: "Starts a heist on someone",
  1703. inputs: [
  1704. {
  1705. name: "Player",
  1706. type: "options",
  1707. options: () => {
  1708. let stateNode = getStateNode();
  1709. return stateNode.props.liveGameController._liveApp ? new Promise((res) => stateNode.props.liveGameController.getDatabaseVal("c", (players) => players && res(Object.keys(players)))) : [];
  1710. },
  1711. },
  1712. ],
  1713. run: function (target) {
  1714. let stateNode = getStateNode();
  1715. stateNode.props.liveGameController.getDatabaseVal("c", function (val) {
  1716. if (val?.[target])
  1717. stateNode.setState({
  1718. stage: "heist",
  1719. heistInfo: { name: target, blook: val[target].b },
  1720. prizeAmount: Math.max(1000, val[target].d || 0),
  1721. });
  1722. });
  1723. },
  1724. },
  1725. {
  1726. name: "Swap Doubloons",
  1727. description: "Swaps Doubloons with someone",
  1728. inputs: [
  1729. {
  1730. name: "Player",
  1731. type: "options",
  1732. options: () => {
  1733. let stateNode = getStateNode();
  1734. return stateNode.props.liveGameController._liveApp ? new Promise((res) => stateNode.props.liveGameController.getDatabaseVal("c", (players) => players && res(Object.keys(players)))) : [];
  1735. },
  1736. },
  1737. ],
  1738. run: async function (target) {
  1739. let stateNode = getStateNode();
  1740. stateNode.props.liveGameController.getDatabaseVal("c", function (val) {
  1741. if (!val?.[target]) return;
  1742. stateNode.props.liveGameController.setVal({
  1743. path: `c/${stateNode.props.client.name}`,
  1744. val: {
  1745. b: stateNode.props.client.blook,
  1746. d: val[target].d,
  1747. tat: `${target}:${val[target].d - stateNode.state.doubloons}`,
  1748. },
  1749. });
  1750. stateNode.setState({ doubloons: val[target].d });
  1751. });
  1752. },
  1753. },
  1754. {
  1755. name: "Take Doubloons",
  1756. description: "Takes Doubloons from someone",
  1757. inputs: [
  1758. {
  1759. name: "Player",
  1760. type: "options",
  1761. options: () => {
  1762. let stateNode = getStateNode();
  1763. return stateNode.props.liveGameController._liveApp ? new Promise((res) => stateNode.props.liveGameController.getDatabaseVal("c", (players) => players && res(Object.keys(players)))) : [];
  1764. },
  1765. },
  1766. ],
  1767. run: async function (target) {
  1768. let stateNode = getStateNode();
  1769. stateNode.props.liveGameController.getDatabaseVal("c", function (val) {
  1770. if (!val?.[target]) return;
  1771. stateNode.props.liveGameController.setVal({
  1772. path: `c/${stateNode.props.client.name}`,
  1773. val: {
  1774. b: stateNode.props.client.blook,
  1775. d: stateNode.state.doubloons + val[target].d,
  1776. tat: `${target}:${val[target].d}`,
  1777. },
  1778. });
  1779. stateNode.setState({ doubloons: stateNode.state.doubloons + val[target].d });
  1780. });
  1781. },
  1782. },
  1783. ],
  1784. },
  1785. defense2: {
  1786. img: "https://media.blooket.com/image/upload/v1676079918/Media/logos/Tower_Defense_2_Logo_Resize.png",
  1787. name: "Tower Defense 2",
  1788. cheats: [
  1789. {
  1790. name: "Max Tower Stats",
  1791. description: "Makes all placed towers overpowered",
  1792. run: function () {
  1793. getStateNode().state.towers.forEach((tower) => {
  1794. tower.stats.dmg = 1e6;
  1795. tower.stats.fireRate = 50;
  1796. tower.stats.ghostDetect = true;
  1797. tower.stats.maxTargets = 1e6;
  1798. tower.stats.numProjectiles &&= 100;
  1799. tower.stats.range = 100;
  1800. if (tower.stats.auraBuffs) for (const buff in tower.stats.auraBuffs) tower.stats.auraBuffs[buff] *= 100;
  1801. });
  1802. },
  1803. },
  1804. {
  1805. name: "Kill Enemies",
  1806. description: "Kills all the enemies",
  1807. run: function () {
  1808. let stateNode = getStateNode();
  1809. stateNode.game.current.config.sceneConfig.enemyQueue.length = 0;
  1810. stateNode.game.current.config.sceneConfig.physics.world.bodies.entries.forEach((x) => x?.gameObject?.receiveDamage?.(x.gameObject.hp, 1));
  1811. },
  1812. },
  1813. {
  1814. name: "Set Coins",
  1815. description: "Sets coins",
  1816. inputs: [
  1817. {
  1818. name: "Coins",
  1819. type: "number",
  1820. },
  1821. ],
  1822. run: function (coins) {
  1823. getStateNode().setState({ coins });
  1824. },
  1825. },
  1826. {
  1827. name: "Set Health",
  1828. description: "Sets the amount of health you have",
  1829. inputs: [
  1830. {
  1831. name: "Health",
  1832. type: "number",
  1833. },
  1834. ],
  1835. run: function (health) {
  1836. getStateNode().setState({ health });
  1837. },
  1838. },
  1839. {
  1840. name: "Set Round",
  1841. description: "Sets the current round",
  1842. inputs: [
  1843. {
  1844. name: "Round",
  1845. type: "number",
  1846. },
  1847. ],
  1848. run: function (round) {
  1849. getStateNode().setState({ round });
  1850. },
  1851. },
  1852. ],
  1853. },
  1854. brawl: {
  1855. img: "https://media.blooket.com/image/upload/v1663366470/Media/logos/Monster_Brawl_270x156_1.png",
  1856. name: "Monster Brawl",
  1857. cheats: [
  1858. {
  1859. name: "Double Enemy XP",
  1860. description: "Doubles enemy XP drop value",
  1861. run: function () {
  1862. const colliders = getStateNode().game.current.config.sceneConfig.physics.world.colliders._active.filter((x) => x.callbackContext?.toString?.()?.includes?.("dmgCd"));
  1863. for (let i = 0; i < colliders.length; i++) {
  1864. const enemies = colliders[i].object2;
  1865. let _start = enemies.classType.prototype.start;
  1866. enemies.classType.prototype.start = function () {
  1867. _start.apply(this, arguments);
  1868. this.val *= 2;
  1869. };
  1870. enemies.children.entries.forEach((e) => (e.val *= 2));
  1871. }
  1872. },
  1873. },
  1874. {
  1875. name: "Half Enemy Speed",
  1876. description: "Makes enemies move 2x slower",
  1877. run: function () {
  1878. const colliders = getStateNode().game.current.config.sceneConfig.physics.world.colliders._active.filter((x) => x.callbackContext?.toString?.()?.includes?.("dmgCd"));
  1879. for (let i = 0; i < colliders.length; i++) {
  1880. const enemies = colliders[i].object2;
  1881. let _start = enemies.classType.prototype.start;
  1882. enemies.classType.prototype.start = function () {
  1883. _start.apply(this, arguments);
  1884. this.speed *= 0.5;
  1885. };
  1886. enemies.children.entries.forEach((e) => (e.speed *= 0.5));
  1887. }
  1888. },
  1889. },
  1890. {
  1891. name: "Instant Kill",
  1892. description: "Sets all enemies health to 1",
  1893. run: function () {
  1894. const colliders = getStateNode().game.current.config.sceneConfig.physics.world.colliders._active.filter((x) => x.callbackContext?.toString?.()?.includes?.("dmgCd"));
  1895. for (let i = 0; i < colliders.length; i++) {
  1896. const enemies = colliders[i].object2;
  1897. let _start = enemies.classType.prototype.start;
  1898. enemies.classType.prototype.start = function () {
  1899. _start.apply(this, arguments);
  1900. this.hp = 1;
  1901. };
  1902. enemies.children.entries.forEach((e) => (e.hp = 1));
  1903. }
  1904. },
  1905. },
  1906. {
  1907. name: "Invincibility",
  1908. description: "Makes you invincible",
  1909. run: function () {
  1910. for (const collider of getStateNode().game.current.config.sceneConfig.physics.world.colliders._active.filter(
  1911. (x) => x.callbackContext?.toString().includes("invulnerableTime") || x.callbackContext?.toString().includes("dmgCd")
  1912. ))
  1913. collider.collideCallback = () => {};
  1914. },
  1915. },
  1916. {
  1917. name: "Kill Enemies",
  1918. description: "Kills all current enemies",
  1919. run: function () {
  1920. getStateNode().game.current.config.sceneConfig.physics.world.bodies.entries.forEach((x) => x?.gameObject?.receiveDamage?.(x.gameObject.hp, 1));
  1921. },
  1922. },
  1923. {
  1924. name: "Magnet",
  1925. description: "Pulls all xp towards you",
  1926. run: function () {
  1927. getStateNode()
  1928. .game.current.config.sceneConfig.physics.world.colliders._active.find((x) => x.collideCallback?.toString().includes("magnetTime"))
  1929. .collideCallback({ active: true }, { active: true, setActive() {}, setVisible() {} });
  1930. },
  1931. },
  1932. {
  1933. name: "Max Current Abilities",
  1934. description: "Maxes out all your current abilities",
  1935. run: function () {
  1936. const stateNode = getStateNode();
  1937. for (const [ability, level] of Object.entries(stateNode.state.abilities))
  1938. for (let i = 0; i < 10 - level; i++) stateNode.game.current.config.sceneConfig.game.events.emit("level up", ability, stateNode.state.abilities[ability]++);
  1939. stateNode.setState({
  1940. 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),
  1941. });
  1942. },
  1943. },
  1944. {
  1945. name: "Next Level",
  1946. description: "Skips to the next level",
  1947. run: function () {
  1948. let stateNode = getStateNode();
  1949. let { object1: player, object2: xp } = stateNode.game.current.config.sceneConfig.physics.world.colliders._active.find((x) => x.collideCallback?.toString().includes('emit("xp'));
  1950. 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);
  1951. },
  1952. },
  1953. {
  1954. name: "Remove Obstacles",
  1955. description: "Removes all rocks and obstacles",
  1956. run: function () {
  1957. getStateNode().game.current.config.sceneConfig.physics.world.bodies.entries.forEach((body) => {
  1958. try {
  1959. if (body.gameObject.frame.texture.key.includes("obstacle")) body.gameObject.destroy();
  1960. } catch {}
  1961. });
  1962. },
  1963. },
  1964. {
  1965. name: "Reset Health",
  1966. description: "Resets health and gives invincibility for 3 seconds",
  1967. run: function () {
  1968. getStateNode().game.current.events._events.respawn.fn();
  1969. },
  1970. },
  1971. ],
  1972. },
  1973. dino: {
  1974. img: "https://media.blooket.com/image/upload/v1663212881/Media/logos/Deceptive_Dinos_Logo_Resized.png",
  1975. name: "Deceptive Dinos",
  1976. cheats: [
  1977. {
  1978. name: "Auto Choose",
  1979. description: "Automatically choose the best fossil when excavating",
  1980. type: "toggle",
  1981. enabled: false,
  1982. data: null,
  1983. rand(e, t) {
  1984. const s = [];
  1985. while (s.length < t) {
  1986. const i = Math.random();
  1987. let r = 0,
  1988. g = null;
  1989. for (let o = 0; o < e.length; o++) {
  1990. r += e[o].rate;
  1991. if (r >= i) {
  1992. g = e[o];
  1993. break;
  1994. }
  1995. }
  1996. g && !s.includes(g) && s.push(g);
  1997. }
  1998. return s;
  1999. },
  2000. run: function () {
  2001. if (!this.enabled) {
  2002. this.enabled = true;
  2003. this.data = setInterval(() => {
  2004. try {
  2005. let stateNode = getStateNode();
  2006. if (stateNode.state.stage === "excavate") {
  2007. stateNode.state.choices.length ||
  2008. (stateNode.state.choices = this.rand(
  2009. [
  2010. { type: "fossil", val: 10, rate: 0.1, blook: "Amber" },
  2011. { type: "fossil", val: 25, rate: 0.1, blook: "Dino Egg" },
  2012. { type: "fossil", val: 50, rate: 0.175, blook: "Dino Fossil" },
  2013. { type: "fossil", val: 75, rate: 0.175, blook: "Stegosaurus" },
  2014. { type: "fossil", val: 100, rate: 0.15, blook: "Velociraptor" },
  2015. { type: "fossil", val: 125, rate: 0.125, blook: "Brontosaurus" },
  2016. { type: "fossil", val: 250, rate: 0.075, blook: "Triceratops" },
  2017. { type: "fossil", val: 500, rate: 0.025, blook: "Tyrannosaurus Rex" },
  2018. { type: "mult", val: 1.5, rate: 0.05 },
  2019. { type: "mult", val: 2, rate: 0.025 },
  2020. ],
  2021. 3
  2022. ));
  2023. let max = 0,
  2024. index = -1;
  2025. for (let i = 0; i < stateNode.state.choices.length; i++) {
  2026. const { type, val } = stateNode.state.choices[i];
  2027. const value = (type == "fossil" ? stateNode.state.fossils + val * stateNode.state.fossilMult : stateNode.state.fossils * val) || 0;
  2028. if (value <= max && type != "mult") continue;
  2029. (max = value), (index = i + 1);
  2030. }
  2031. document.querySelector('div[class*=rockRow] > div[role="button"]:nth-child(' + index + ")").click();
  2032. }
  2033. } catch {}
  2034. }, 50);
  2035. } else {
  2036. this.enabled = false;
  2037. clearInterval(this.data);
  2038. this.data = null;
  2039. }
  2040. },
  2041. },
  2042. {
  2043. name: "Rock ESP",
  2044. description: "Shows what is under the rocks",
  2045. type: "toggle",
  2046. enabled: false,
  2047. data: null,
  2048. run: (() => {
  2049. function rand(e, t) {
  2050. const s = [];
  2051. while (s.length < t) {
  2052. const i = Math.random();
  2053. let r = 0;
  2054. let g;
  2055. for (let o = 0; o < e.length; o++) {
  2056. r += e[o].rate;
  2057. if (r >= i) {
  2058. g = e[o];
  2059. break;
  2060. }
  2061. }
  2062. if (g && !s.includes(g)) s.push(g);
  2063. }
  2064. return s;
  2065. }
  2066. const exps = ["⁰", "¹", "²", "³", "⁴", "⁵", "⁶", "⁷", "⁸", "⁹"];
  2067. const getExpAscii = (num) => {
  2068. let res = "";
  2069. while (num > 0) {
  2070. res = exps[num % 10] + res;
  2071. num = ~~(num / 10);
  2072. }
  2073. return res;
  2074. };
  2075.  
  2076. function shortNum(value) {
  2077. let newValue = value.toString();
  2078. if (value >= 1000) {
  2079. const suffixes = ["", "K", "M", "B", "T"];
  2080. const suffixNum = Math.floor(Math.floor((Math.log(value) / Math.log(10)).toPrecision(14)) / 3);
  2081. if (suffixNum < suffixes.length) {
  2082. let shortValue = "";
  2083. for (let precision = 3; precision >= 1; precision--) {
  2084. shortValue = parseFloat((suffixNum != 0 ? value / Math.pow(1000, suffixNum) : value).toPrecision(precision)).toString();
  2085. const dotLessShortValue = shortValue.replace(/[^a-zA-Z 0-9]+/g, "");
  2086. if (dotLessShortValue.length <= 3) break;
  2087. }
  2088. if (Number(shortValue) % 1 != 0) shortValue = Number(shortValue).toFixed(1);
  2089. newValue = shortValue + suffixes[suffixNum];
  2090. } else {
  2091. let num = value;
  2092. let exp = 0;
  2093. while (num >= 100) {
  2094. num = Math.floor(num / 10);
  2095. exp += 1;
  2096. }
  2097. newValue = num / 10 + " × 10" + getExpAscii(exp + 1);
  2098. }
  2099. }
  2100. return newValue;
  2101. }
  2102. return function () {
  2103. if (!this.enabled) {
  2104. this.enabled = true;
  2105. this.data = setInterval(() => {
  2106. let stateNode = getStateNode();
  2107. const rocks = document.querySelector('[class*="rockButton"]').parentElement.children;
  2108.  
  2109. if (!Array.prototype.every.call(rocks, (element) => element.querySelector("div")))
  2110. stateNode.setState(
  2111. {
  2112. choices: rand(
  2113. [
  2114. { type: "fossil", val: 10, rate: 0.1, blook: "Amber" },
  2115. { type: "fossil", val: 25, rate: 0.1, blook: "Dino Egg" },
  2116. { type: "fossil", val: 50, rate: 0.175, blook: "Dino Fossil" },
  2117. { type: "fossil", val: 75, rate: 0.175, blook: "Stegosaurus" },
  2118. { type: "fossil", val: 100, rate: 0.15, blook: "Velociraptor" },
  2119. { type: "fossil", val: 125, rate: 0.125, blook: "Brontosaurus" },
  2120. { type: "fossil", val: 250, rate: 0.075, blook: "Triceratops" },
  2121. { type: "fossil", val: 500, rate: 0.025, blook: "Tyrannosaurus Rex" },
  2122. { type: "mult", val: 1.5, rate: 0.05 },
  2123. { type: "mult", val: 2, rate: 0.025 },
  2124. ],
  2125. 3
  2126. ),
  2127. },
  2128. () => {
  2129. Array.prototype.forEach.call(rocks, (element, index) => {
  2130. const rock = stateNode.state.choices[index];
  2131. if (element.querySelector("div")) element.querySelector("div").remove();
  2132. const choice = document.createElement("div");
  2133. choice.style.color = "white";
  2134. choice.style.fontFamily = "Macondo";
  2135. choice.style.fontSize = "1em";
  2136. choice.style.display = "flex";
  2137. choice.style.justifyContent = "center";
  2138. choice.style.transform = "translateY(25px)";
  2139. choice.innerText =
  2140. rock.type === "fossil"
  2141. ? `+${
  2142. Math.round(rock.val * stateNode.state.fossilMult) > 99999999 ? shortNum(Math.round(rock.val * stateNode.state.fossilMult)) : Math.round(rock.val * stateNode.state.fossilMult)
  2143. } Fossils`
  2144. : `x${rock.val} Fossils Per Excavation`;
  2145. element.append(choice);
  2146. });
  2147. }
  2148. );
  2149. }, 50);
  2150. } else {
  2151. this.enabled = false;
  2152. clearInterval(this.data);
  2153. this.data = null;
  2154. }
  2155. };
  2156. })(),
  2157. },
  2158. {
  2159. name: "Set Fossils",
  2160. description: "Sets the amount of fossils you have",
  2161. inputs: [
  2162. {
  2163. name: "Fossils",
  2164. type: "number",
  2165. },
  2166. ],
  2167. run: function (fossils) {
  2168. let stateNode = getStateNode();
  2169. stateNode.setState({ fossils });
  2170. stateNode.props.liveGameController.setVal({
  2171. path: `c/${stateNode.props.client.name}/f`,
  2172. val: fossils,
  2173. });
  2174. },
  2175. },
  2176. {
  2177. name: "Set Multiplier",
  2178. description: "Sets fossil multiplier",
  2179. inputs: [
  2180. {
  2181. name: "Multiplier",
  2182. type: "number",
  2183. },
  2184. ],
  2185. run: function (fossilMult) {
  2186. let stateNode = getStateNode();
  2187. stateNode.setState({ fossilMult });
  2188. },
  2189. },
  2190. {
  2191. name: "Stop Cheating",
  2192. description: "Undoes cheating so that you can't be caught",
  2193. run: function () {
  2194. let stateNode = getStateNode();
  2195. stateNode.setState({ isCheating: false });
  2196. stateNode.props.liveGameController.setVal({
  2197. path: `c/${stateNode.props.client.name}/ic`,
  2198. val: false,
  2199. });
  2200. },
  2201. },
  2202. ],
  2203. },
  2204. royale: {
  2205. img: "https://media.blooket.com/image/upload/v1663212881/Media/logos/Battle_Royale_Logo_Resized.png",
  2206. name: "Battle Royale",
  2207. cheats: [
  2208. {
  2209. name: "Auto Answer (Toggle)",
  2210. description: "Toggles auto answer on",
  2211. type: "toggle",
  2212. enabled: false,
  2213. data: null,
  2214. run: function () {
  2215. if (!this.enabled) {
  2216. this.enabled = true;
  2217. this.data = setInterval(() => {
  2218. let stateNode = getStateNode();
  2219. stateNode?.onAnswer?.(true, stateNode.props.client.question.correctAnswers[0]);
  2220. }, 50);
  2221. } else {
  2222. this.enabled = false;
  2223. clearInterval(this.data);
  2224. this.data = null;
  2225. }
  2226. },
  2227. },
  2228. {
  2229. name: "Auto Answer",
  2230. description: "Chooses the correct answer for you",
  2231. run: function () {
  2232. let stateNode = getStateNode();
  2233. stateNode?.onAnswer?.(true, stateNode.props.client.question.correctAnswers[0]);
  2234. },
  2235. },
  2236. ],
  2237. },
  2238. defense: {
  2239. img: "https://media.blooket.com/image/upload/v1663212881/Media/logos/Tower_Defense_Logo_Resized.png",
  2240. name: "Tower Defense",
  2241. cheats: [
  2242. {
  2243. name: "Earthquake",
  2244. description: "Shuffles around towers",
  2245. run: function () {
  2246. let stateNode = getStateNode();
  2247. stateNode.setState(
  2248. {
  2249. eventName: "Earthquake",
  2250. event: {
  2251. short: "e",
  2252. color: "#805500",
  2253. icon: "fas fa-mountain",
  2254. desc: "All of your towers get mixed up",
  2255. rate: 0.02,
  2256. },
  2257. buyTowerName: "",
  2258. buyTower: {},
  2259. },
  2260. () => (stateNode.eventTimeout = setTimeout(() => stateNode.setState({ event: {}, eventName: "" }), 6e3))
  2261. );
  2262. stateNode.tiles.forEach((row) => row.forEach((col, i) => col == 3 && (row[i] = 0)));
  2263. let tiles = [];
  2264. for (let y = 0; y < stateNode.tiles.length; y++) for (let x = 0; x < stateNode.tiles[y].length; x++) if (stateNode.tiles[y][x] == 0) tiles.push({ x, y });
  2265. tiles.sort(() => Math.random() - Math.random());
  2266. stateNode.towers.forEach((tower) => {
  2267. let { x, y } = tiles.pop();
  2268. tower.move(x, y, stateNode.tileSize);
  2269. stateNode.tiles[y][x] = 3;
  2270. });
  2271. },
  2272. },
  2273. {
  2274. name: "Max Tower Stats",
  2275. description: "Makes all placed towers overpowered",
  2276. run: function () {
  2277. getStateNode().towers.forEach((tower) => {
  2278. tower.range = 100;
  2279. tower.fullCd = tower.cd = 0;
  2280. tower.damage = 1e6;
  2281. });
  2282. },
  2283. },
  2284. {
  2285. name: "Remove Ducks",
  2286. description: "Removes ducks",
  2287. run: function () {
  2288. let { ducks, tiles } = getStateNode();
  2289. ducks.forEach((x) => (tiles[x.y][x.x] = 0));
  2290. ducks.length = 0;
  2291. },
  2292. },
  2293. {
  2294. name: "Remove Enemies",
  2295. description: "Removes all the enemies",
  2296. run: function () {
  2297. let stateNode = getStateNode();
  2298. stateNode.enemies = stateNode.futureEnemies = [];
  2299. },
  2300. },
  2301. {
  2302. name: "Remove Obstacles",
  2303. description: "Lets you place towers anywhere",
  2304. run: function () {
  2305. let stateNode = getStateNode();
  2306. stateNode.tiles = stateNode.tiles.map((row) => row.fill(0));
  2307. },
  2308. },
  2309. {
  2310. name: "Set Damage",
  2311. description: "Sets damage",
  2312. inputs: [
  2313. {
  2314. name: "Damage",
  2315. type: "number",
  2316. },
  2317. ],
  2318. run: function (dmg) {
  2319. getStateNode().dmg = dmg;
  2320. },
  2321. },
  2322. {
  2323. name: "Set Round",
  2324. description: "Sets the current round",
  2325. inputs: [
  2326. {
  2327. name: "Round",
  2328. type: "number",
  2329. },
  2330. ],
  2331. run: function (round) {
  2332. getStateNode().setState({ round });
  2333. },
  2334. },
  2335. {
  2336. name: "Set Tokens",
  2337. description: "Sets the amount of tokens you have",
  2338. inputs: [
  2339. {
  2340. name: "Tokens",
  2341. type: "number",
  2342. },
  2343. ],
  2344. run: function (tokens) {
  2345. getStateNode().setState({ tokens });
  2346. },
  2347. },
  2348. ],
  2349. },
  2350. cafe: {
  2351. img: "https://media.blooket.com/image/upload/v1663212881/Media/logos/Cafe_Logo_Resized.png",
  2352. name: "Café",
  2353. cheats: [
  2354. {
  2355. name: "Max Items",
  2356. description: "Maxes out items in the shop (Only usable in the shop)",
  2357. run: function () {
  2358. if (window.location.pathname !== "/cafe/shop") alert("This can only be run in the shop");
  2359. else {
  2360. const stateNode = getStateNode();
  2361. stateNode.setState({ items: Object.keys(stateNode.state.items).reduce((obj, item) => ((obj[item] = 5), obj), {}) });
  2362. }
  2363. },
  2364. },
  2365. {
  2366. name: "Remove Customers",
  2367. description: "Skips the current customers (Not usable in the shop)",
  2368. run: function () {
  2369. const stateNode = getStateNode();
  2370. stateNode.state.customers.forEach((customer, i) => window.setTimeout(() => customer.blook && stateNode.removeCustomer(i, true), i * 250));
  2371. },
  2372. },
  2373. {
  2374. name: "Reset Abilities",
  2375. description: "Resets used abilities in shop (Only usable in the shop)",
  2376. run: function () {
  2377. if (window.location.pathname !== "/cafe/shop") alert("This can only be run in the shop");
  2378. else {
  2379. const stateNode = getStateNode();
  2380. stateNode.setState({ abilities: Object.keys(stateNode.state.abilities).reduce((obj, item) => ((obj[item] = 5), obj), {}) });
  2381. }
  2382. },
  2383. },
  2384. {
  2385. name: "Set Cash",
  2386. description: "Sets cafe cash",
  2387. inputs: [
  2388. {
  2389. name: "Amount",
  2390. type: "number",
  2391. },
  2392. ],
  2393. run: function (cafeCash) {
  2394. let stateNode = getStateNode();
  2395. stateNode.setState({ cafeCash });
  2396. stateNode.props.liveGameController.setVal({
  2397. path: `c/${stateNode.props.client.name}/ca`,
  2398. val: cafeCash,
  2399. });
  2400. },
  2401. },
  2402. {
  2403. name: "Stock Food",
  2404. description: "Stocks all food to 99 (Not usable in the shop)",
  2405. run: function () {
  2406. if (window.location.pathname !== "/cafe") alert("This can't be run in the shop");
  2407. else {
  2408. const stateNode = getStateNode();
  2409. stateNode.setState({ foods: stateNode.state.foods.map((e) => ({ ...e, stock: 99, level: 5 })) });
  2410. }
  2411. },
  2412. },
  2413. ],
  2414. },
  2415. factory: {
  2416. img: "https://media.blooket.com/image/upload/v1663212881/Media/logos/Factory_Logo_Resized.png",
  2417. name: "Factory",
  2418. cheats: [
  2419. {
  2420. name: "Choose Blook",
  2421. description: "Gives you a blook",
  2422. inputs: [
  2423. {
  2424. name: "Blook",
  2425. type: "options",
  2426. options: [
  2427. { 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] },
  2428. { 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] },
  2429. { 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] },
  2430. { 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] },
  2431. { 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] },
  2432. { 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] },
  2433. { 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] },
  2434. { 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] },
  2435. { 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] },
  2436. { 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] },
  2437. { 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] },
  2438. { 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] },
  2439. { 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] },
  2440. { 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] },
  2441. { 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] },
  2442. { 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] },
  2443. { 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] },
  2444. { 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] },
  2445. { 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] },
  2446. { 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] },
  2447. { 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] },
  2448. { 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] },
  2449. { 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] },
  2450. { name: "Seal", color: "#7ca1d5", class: "❄️", rarity: "Common", cash: [6, 17, 150, 1200, 13e3], time: [2, 2, 2, 2, 2], price: [480, 4500, 43e3, 52e4] },
  2451. { 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] },
  2452. { 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] },
  2453. { 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] },
  2454. { name: "Penguin", color: "#fb8640", class: "❄️", rarity: "Common", cash: [4, 21, 310, 3200, 33e3], time: [3, 3, 3, 3, 3], price: [400, 6500, 76e3, 87e4] },
  2455. { 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] },
  2456. { 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] },
  2457. { name: "Walrus", color: "#7d4f33", class: "❄️", rarity: "Common", cash: [11, 46, 420, 3700, 51e3], time: [5, 5, 4, 4, 4], price: [550, 6200, 68e3, 1e6] },
  2458. { 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] },
  2459. { 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] },
  2460. { 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] },
  2461. { 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] },
  2462. { 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] },
  2463. { 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] },
  2464. { 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] },
  2465. { 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] },
  2466. { 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] },
  2467. { 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] },
  2468. { name: "Elf", color: "#a7d054", class: "⚔️", rarity: "Uncommon", cash: [5e3, 15e3, 15e4, 15e5, 1e7], time: [1, 1, 1, 1, 1], price: [8e5, 9e6, 11e7, 8e8] },
  2469. { name: "Witch", color: "#4ab96d", class: "⚔️", rarity: "Uncommon", cash: [18e3, 6e4, 4e4, 4e6, 35e6], time: [3, 3, 2, 2, 2], price: [11e5, 12e6, 15e7, 14e8] },
  2470. { name: "Wizard", color: "#5a459c", class: "⚔️", rarity: "Uncommon", cash: [19500, 65e3, 44e4, 46e5, 4e6], time: [3, 3, 2, 2, 2], price: [13e5, 135e5, 16e7, 16e8] },
  2471. { name: "Fairy", color: "#df6d9c", class: "⚔️", rarity: "Uncommon", cash: [18500, 6e4, 62e4, 44e5, 38e6], time: [3, 3, 3, 2, 2], price: [12e5, 125e5, 15e6, 15e8] },
  2472. { 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] },
  2473. { name: "Jester", color: "#be1e2d", class: "⚔️", rarity: "Rare", cash: [25e3, 1e5, 68e4, 65e5, 32e6], time: [3, 3, 2, 2, 1], price: [2e6, 21e6, 23e7, 26e8] },
  2474. { name: "Dragon", color: "#2fa04a", class: "⚔️", rarity: "Rare", cash: [36e3, 15e4, 15e5, 15e6, 15e7], time: [4, 4, 4, 4, 4], price: [23e5, 24e6, 27e7, 3e9] },
  2475. { name: "Unicorn", color: "#f6afce", class: "⚔️", rarity: "Epic", cash: [24e3, 15e4, 14e5, 7e6, 75e6], time: [2, 2, 2, 1, 1], price: [45e5, 45e6, 55e7, 65e8] },
  2476. { name: "Queen", color: "#9e1f63", class: "⚔️", rarity: "Rare", cash: [24e3, 95e3, 95e4, 97e5, 95e6], time: [3, 3, 3, 3, 3], price: [19e5, 2e7, 23e7, 25e8] },
  2477. { name: "King", color: "#ee2640", class: "⚔️", rarity: "Legendary", cash: [75e3, 4e5, 6e6, 9e7, 125e7], time: [5, 5, 5, 5, 5], price: [6e6, 95e6, 16e8, 25e9] },
  2478. { 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] },
  2479. { 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] },
  2480. { 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] },
  2481. { 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] },
  2482. { 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] },
  2483. { 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] },
  2484. { 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] },
  2485. { 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] },
  2486. { 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] },
  2487. { 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] },
  2488. { 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] },
  2489. { 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] },
  2490. { 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] },
  2491. { 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] },
  2492. { 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] },
  2493. { 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] },
  2494. { 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] },
  2495. { 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] },
  2496. { 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] },
  2497. { 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] },
  2498. { 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] },
  2499. { 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] },
  2500. { 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] },
  2501. { 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] },
  2502. { 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] },
  2503. { 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] },
  2504. { 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] },
  2505. ].map((x) => ({ name: x.name, value: JSON.stringify(x) })),
  2506. },
  2507. ],
  2508. run: function (blook) {
  2509. const stateNode = getStateNode();
  2510. if (stateNode.state.blooks.length >= 10) alert("Choose a blook to replace");
  2511. stateNode.waiting = false;
  2512. stateNode.chooseBlook(JSON.parse(blook));
  2513. },
  2514. },
  2515. {
  2516. name: "Free Upgrades",
  2517. description: "Sets upgrade prices to 0 for all current blooks",
  2518. run: function () {
  2519. const prices = [0, 0, 0, 0];
  2520. let stateNode = getStateNode();
  2521. stateNode.setState({ blooks: stateNode.state.blooks.map((blook) => ((blook.price = prices), blook)) });
  2522. },
  2523. },
  2524. {
  2525. name: "Max Blooks",
  2526. description: "Maxes out all your blooks' levels",
  2527. run: function () {
  2528. getStateNode().state.blooks.forEach((blook) => (blook.level = 4));
  2529. },
  2530. },
  2531. {
  2532. name: "Remove Glitches",
  2533. description: "Removes all enemy glitches",
  2534. run: function () {
  2535. let stateNode = getStateNode();
  2536. stateNode.setState({
  2537. bits: 0,
  2538. ads: [],
  2539. hazards: [],
  2540. color: "",
  2541. lol: false,
  2542. joke: false,
  2543. slow: false,
  2544. dance: false,
  2545. glitch: "",
  2546. glitcherName: "",
  2547. glitcherBlook: "",
  2548. });
  2549. clearTimeout(stateNode.adTimeout);
  2550. clearInterval(stateNode.hazardInterval);
  2551. clearTimeout(stateNode.nightTimeout);
  2552. clearTimeout(stateNode.glitchTimeout);
  2553. clearTimeout(stateNode.lolTimeout);
  2554. clearTimeout(stateNode.jokeTimeout);
  2555. clearTimeout(stateNode.slowTimeout);
  2556. clearTimeout(stateNode.danceTimeout);
  2557. clearTimeout(stateNode.nameTimeout);
  2558. },
  2559. },
  2560. {
  2561. name: "Send Glitch",
  2562. description: "Sends a glitch to everyone else playing",
  2563. inputs: [
  2564. {
  2565. name: "Glitch",
  2566. type: "options",
  2567. 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(
  2568. ([value, name]) => ({ name, value })
  2569. ),
  2570. },
  2571. ],
  2572. run: function (val) {
  2573. let stateNode = getStateNode();
  2574. stateNode.safe = true;
  2575. stateNode.props.liveGameController.setVal({ path: `c/${stateNode.props.client.name}/tat`, val });
  2576. },
  2577. },
  2578. {
  2579. name: "Set All MegaBot",
  2580. description: "Sets all your blooks to maxed out Mega Bots",
  2581. run: function () {
  2582. getStateNode().setState({
  2583. blooks: Array.from({ length: 10 }, () => ({
  2584. name: "Mega Bot",
  2585. color: "#d71f27",
  2586. class: "🤖",
  2587. rarity: "Legendary",
  2588. cash: [8e4, 43e4, 42e5, 62e6, 1e9],
  2589. time: [5, 5, 3, 3, 3],
  2590. price: [7e6, 12e7, 19e8, 35e9],
  2591. active: false,
  2592. level: 4,
  2593. bonus: 5.5,
  2594. })),
  2595. });
  2596. },
  2597. },
  2598. {
  2599. name: "Set Cash",
  2600. description: "Sets amount of cash you have",
  2601. inputs: [
  2602. {
  2603. name: "Cash",
  2604. type: "number",
  2605. },
  2606. ],
  2607. run: function (cash) {
  2608. getStateNode().setState({ cash });
  2609. },
  2610. },
  2611. ],
  2612. },
  2613. racing: {
  2614. img: "https://media.blooket.com/image/upload/v1663212882/Media/logos/Racing_Logo_Resized.png",
  2615. name: "Racing",
  2616. cheats: [
  2617. {
  2618. name: "Instant Win",
  2619. description: "Instantly Wins the race",
  2620. run: function () {
  2621. const stateNode = getStateNode();
  2622. stateNode.setState({ progress: stateNode.state.goalAmount });
  2623. stateNode.props.liveGameController.setVal({
  2624. path: "c/" + stateNode.props.client.name + "/pr",
  2625. val: stateNode.state.goalAmount,
  2626. });
  2627. },
  2628. },
  2629. {
  2630. name: "Set Questions",
  2631. description: "Sets the number of questions left",
  2632. inputs: [
  2633. {
  2634. name: "Questions",
  2635. type: "number",
  2636. },
  2637. ],
  2638. run: function (progress) {
  2639. let stateNode = getStateNode();
  2640. progress = stateNode.props.client.amount - progress;
  2641. stateNode.setState({ progress });
  2642. stateNode.props.liveGameController.setVal({
  2643. path: "c/" + stateNode.props.client.name + "/pr",
  2644. val: progress,
  2645. });
  2646. },
  2647. },
  2648. ],
  2649. },
  2650. rush: {
  2651. img: "https://media.blooket.com/image/upload/v1663212881/Media/logos/Blook_Rush_Logo_Resized.png",
  2652. name: "Blook Rush",
  2653. cheats: [
  2654. {
  2655. name: "Set Blooks",
  2656. description: "Sets amount of blooks you or your team has",
  2657. inputs: [
  2658. {
  2659. name: "Blooks",
  2660. type: "number",
  2661. },
  2662. ],
  2663. run: function (numBlooks) {
  2664. let stateNode = getStateNode();
  2665. stateNode.setState({ numBlooks });
  2666. stateNode.props.liveGameController.setVal({
  2667. path: (stateNode.isTeam ? "a/" : "c/") + stateNode.props.client.name + "/bs",
  2668. val: numBlooks,
  2669. });
  2670. },
  2671. },
  2672. {
  2673. name: "Set Defense",
  2674. description: "Sets amount of defense you or your team has (Max 4)",
  2675. inputs: [
  2676. {
  2677. name: "Defense (max 4)",
  2678. type: "number",
  2679. max: 4,
  2680. },
  2681. ],
  2682. run: function (defense) {
  2683. let numDefense = Math.min(defense, 4);
  2684. let stateNode = getStateNode();
  2685. stateNode.setState({ numDefense });
  2686. stateNode.props.liveGameController.setVal({
  2687. path: (stateNode.isTeam ? "a/" : "c/") + stateNode.props.client.name + "/d",
  2688. val: numDefense,
  2689. });
  2690. },
  2691. },
  2692. ],
  2693. },
  2694. tower: {
  2695. img: "https://media.blooket.com/image/upload/v1663212881/Media/logos/Tower_Of_Doom_Logo_Resized.png",
  2696. name: "Tower of Doom",
  2697. cheats: [
  2698. {
  2699. name: "Fill Deck",
  2700. description: "Fills your deck with every maxed out card and artifact (Only works on towers page)",
  2701. run: function () {
  2702. if (window.location.pathname == "/tower/map") {
  2703. const stateNode = getStateNode();
  2704. stateNode.props.tower.artifacts =
  2705. "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(
  2706. "|"
  2707. );
  2708. stateNode.props.tower.cards =
  2709. "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,🏰"
  2710. .split("|")
  2711. .map((x) => {
  2712. const [blook, c] = x.split(",");
  2713. return { strength: 20, charisma: 20, wisdom: 20, class: c, blook };
  2714. });
  2715. try {
  2716. stateNode.props.addTowerNode();
  2717. } catch {}
  2718. stateNode.setState({ showDeck: false });
  2719. } else alert("You need to be on the map to run this cheat!");
  2720. },
  2721. },
  2722. {
  2723. name: "Max Cards",
  2724. description: "Maxes out all the cards in your deck",
  2725. run: function () {
  2726. if (window.location.pathname == "/tower/map") {
  2727. const stateNode = getStateNode();
  2728. stateNode.props.tower.cards.forEach((card) => {
  2729. card.strength = 20;
  2730. card.charisma = 20;
  2731. card.wisdom = 20;
  2732. });
  2733. try {
  2734. stateNode.forceUpdate();
  2735. } catch {}
  2736. } else alert("You need to be on the map to run this cheat!");
  2737. },
  2738. },
  2739. {
  2740. name: "Max Health",
  2741. description: "Fills the player's health",
  2742. run: function () {
  2743. if (window.location.pathname == "/tower/battle") getStateNode().setState({ myHealth: 100, myLife: 100 });
  2744. else alert("You need to be in battle to run this cheat!");
  2745. },
  2746. },
  2747. {
  2748. name: "Max Card Stats",
  2749. description: "Maxes out player's current card (Only works on attribute select page)",
  2750. run: function () {
  2751. const stateNode = getStateNode();
  2752. if (stateNode.state.phase !== "select") alert("You must be on the attribute selection page!");
  2753. else stateNode.setState({ myCard: { ...stateNode.state.myCard, strength: 20, charisma: 20, wisdom: 20 } });
  2754. },
  2755. },
  2756. {
  2757. name: "Min Enemy Stats",
  2758. description: "Makes the enemy card stats all 0 (Only works on attribute select page)",
  2759. run: function () {
  2760. const stateNode = getStateNode();
  2761. if (stateNode.state.phase !== "select") alert("You must be on the attribute selection page!");
  2762. else stateNode.setState({ enemyCard: { ...stateNode.state.enemyCard, strength: 0, charisma: 0, wisdom: 0 } });
  2763. },
  2764. },
  2765. {
  2766. name: "Set Coins",
  2767. description: "Try's to set amount of tower coins you have",
  2768. inputs: [
  2769. {
  2770. name: "Coins",
  2771. type: "number",
  2772. },
  2773. ],
  2774. run: function (coins) {
  2775. if (window.location.pathname == "/tower/battle")
  2776. try {
  2777. getStateNode().props.setTowerCoins(coins);
  2778. } catch {}
  2779. else alert("You need to be in battle to run this cheat!");
  2780. },
  2781. },
  2782. ],
  2783. },
  2784. kingdom: {
  2785. img: "https://media.blooket.com/image/upload/v1663212881/Media/logos/Crazy_Kingdom_Logo_Resized.png",
  2786. name: "Crazy Kingdom",
  2787. cheats: [
  2788. {
  2789. name: "Choice ESP",
  2790. description: "Shows you what will happen if you say Yes or No",
  2791. type: "toggle",
  2792. enabled: false,
  2793. data: null,
  2794. run: function () {
  2795. if (!this.enabled) {
  2796. this.enabled = true;
  2797. this.data = setInterval(
  2798. (stats) => {
  2799. let stateNode = getStateNode();
  2800. let elements = Array.prototype.reduce.call(document.querySelectorAll("[class*=statContainer]"), (obj, container, i) => ((obj[stats[i]] = container), obj), {});
  2801. if (stateNode.state.phase == "choice") {
  2802. Array.prototype.forEach.call(document.querySelectorAll(".choiceESP"), (x) => x.remove());
  2803. Object.keys(stateNode.state.guest.yes || {}).forEach((x) => {
  2804. if (elements[x] == null) return;
  2805. let element = document.createElement("div");
  2806. element.className = "choiceESP";
  2807. element.style = "font-size: 24px; color: rgb(75, 194, 46); font-weight: bolder;";
  2808. element.innerText = String(stateNode.state.guest.yes[x]);
  2809. elements[x].appendChild(element);
  2810. });
  2811. Object.keys(stateNode.state.guest.no || {}).forEach((x) => {
  2812. if (elements[x] == null) return;
  2813. let element = document.createElement("div");
  2814. element.className = "choiceESP";
  2815. element.style = "font-size: 24px; color: darkred; font-weight: bolder;";
  2816. element.innerText = String(stateNode.state.guest.no[x]);
  2817. elements[x].appendChild(element);
  2818. });
  2819. Array.prototype.forEach.call(
  2820. document.querySelectorAll("[class*=guestButton][role=button]"),
  2821. (x) => (x.onclick = () => Array.prototype.forEach.call(document.querySelectorAll(".choiceESP"), (x) => x.remove()))
  2822. );
  2823. }
  2824. },
  2825. 50,
  2826. ["materials", "people", "happiness", "gold"]
  2827. );
  2828. } else {
  2829. this.enabled = false;
  2830. clearInterval(this.data);
  2831. Array.prototype.forEach.call(document.querySelectorAll(".choiceESP"), (x) => x.remove());
  2832. this.data = null;
  2833. }
  2834. },
  2835. },
  2836. {
  2837. name: "Disable Tax Toucan",
  2838. description: "Tax evasion",
  2839. run: function () {
  2840. getStateNode().taxCounter = Number.MAX_VALUE;
  2841. },
  2842. },
  2843. {
  2844. name: "Max Stats",
  2845. description: "Sets all resources to the max",
  2846. run: function () {
  2847. getStateNode().setState({ materials: 100, people: 100, happiness: 100, gold: 100 });
  2848. },
  2849. },
  2850. {
  2851. name: "Set Guests",
  2852. description: "Sets the amount of guests you've seen",
  2853. inputs: [
  2854. {
  2855. name: "Guests",
  2856. type: "number",
  2857. },
  2858. ],
  2859. run: function (guestScore) {
  2860. getStateNode().setState({ guestScore });
  2861. },
  2862. },
  2863. {
  2864. name: "Skip Guest",
  2865. description: "Skips the current guest",
  2866. run: function () {
  2867. getStateNode().nextGuest();
  2868. },
  2869. },
  2870. ],
  2871. },
  2872. toy: {
  2873. img: "https://media.blooket.com/image/upload/v1663212881/Media/logos/Santas_Workshop_Logo_Resized.png",
  2874. name: "Santa's Workshop",
  2875. cheats: [
  2876. {
  2877. name: "Remove Distractions",
  2878. description: "Removes all enemy distractions",
  2879. run: function () {
  2880. 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] });
  2881. },
  2882. },
  2883. {
  2884. name: "Send Distraction",
  2885. description: "Sends a distraction to everyone else playing",
  2886. inputs: [
  2887. {
  2888. name: "Distraction",
  2889. type: "options",
  2890. 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]) => ({
  2891. name,
  2892. value,
  2893. })),
  2894. },
  2895. ],
  2896. run: function (val) {
  2897. let stateNode = getStateNode();
  2898. stateNode.safe = true;
  2899. stateNode.props.liveGameController.setVal({ path: `c/${stateNode.props.client.name}/tat`, val });
  2900. },
  2901. },
  2902. {
  2903. name: "Set Toys",
  2904. description: "Sets amount of toys",
  2905. inputs: [
  2906. {
  2907. name: "Toys",
  2908. type: "number",
  2909. },
  2910. ],
  2911. run: function (toys) {
  2912. let stateNode = getStateNode();
  2913. stateNode.setState({ toys });
  2914. stateNode.props.liveGameController.setVal({
  2915. path: "c/" + stateNode.props.client.name + "/t",
  2916. val: toys,
  2917. });
  2918. },
  2919. },
  2920. {
  2921. name: "Set Toys Per Question",
  2922. description: "Sets amount of toys per question",
  2923. inputs: [
  2924. {
  2925. name: "Toys Per Question",
  2926. type: "number",
  2927. },
  2928. ],
  2929. run: function (toysPerQ) {
  2930. getStateNode().setState({ toysPerQ });
  2931. },
  2932. },
  2933. {
  2934. name: "Swap Toys",
  2935. description: "Swaps toys with someone",
  2936. inputs: [
  2937. {
  2938. name: "Player",
  2939. type: "options",
  2940. options: () => {
  2941. let stateNode = getStateNode();
  2942. return stateNode.props.liveGameController._liveApp ? new Promise((res) => stateNode.props.liveGameController.getDatabaseVal("c", (players) => players && res(Object.keys(players)))) : [];
  2943. },
  2944. },
  2945. ],
  2946. run: function (target) {
  2947. let stateNode = getStateNode();
  2948. stateNode.props.liveGameController.getDatabaseVal("c", (players) => {
  2949. if (!players || players[target] == null) return;
  2950. stateNode.props.liveGameController.setVal({
  2951. path: "c/" + stateNode.props.client.name + "/tat",
  2952. val: `${target}:swap:${stateNode.state.toys}`,
  2953. });
  2954. stateNode.setState({ toys: players[target].t });
  2955. });
  2956. },
  2957. },
  2958. ],
  2959. },
  2960. flappy: {
  2961. img: "https://ac.blooket.com/marketassets/blooks/chick.svg",
  2962. name: "Flappy Blook",
  2963. cheats: [
  2964. {
  2965. name: "Toggle Ghost",
  2966. description: "Lets you go through the pipes",
  2967. type: "toggle",
  2968. enabled: false,
  2969. run: function () {
  2970. this.enabled = !this.enabled;
  2971. for (const body of Object.values(document.querySelector("#phaser-bouncy"))[0].return.updateQueue.lastEffect.deps[0].current.config.sceneConfig.physics.world.bodies.entries) {
  2972. if (!body.gameObject.frame.texture.key.startsWith("blook")) continue;
  2973. body.checkCollision.none = this.enabled;
  2974. body.gameObject.setAlpha(this.enabled ? 0.5 : 1);
  2975. break;
  2976. }
  2977. },
  2978. },
  2979. {
  2980. name: "Set Score",
  2981. description: "Sets flappy blook score",
  2982. inputs: [
  2983. {
  2984. name: "Score",
  2985. type: "number",
  2986. },
  2987. ],
  2988. run: function (score) {
  2989. Object.values(document.querySelector("#phaser-bouncy"))[0].return.updateQueue.lastEffect.deps[1](score || 0);
  2990. },
  2991. },
  2992. ],
  2993. },
  2994. };
  2995.  
  2996. const searchPage = document.createElement("div");
  2997. searchPage.className = classes.searchPage;
  2998.  
  2999. const searchbarHolder = document.createElement("form");
  3000. searchbarHolder.className = classes.searchbarHolder;
  3001.  
  3002. const searchbarInput = document.createElement("input");
  3003. searchbarInput.placeholder = "Search Cheats";
  3004. searchbarInput.className = classes.searchbarInput;
  3005.  
  3006. const searchbarButton = document.createElement("div");
  3007. searchbarButton.onclick = () => (searchbarInput.value = "");
  3008. searchbarButton.innerHTML = '<i class="fas fa-times" style="line-height: 1;"></i>';
  3009. searchbarButton.className = classes.searchbarButton;
  3010.  
  3011. searchbarHolder.append(searchbarInput, searchbarButton);
  3012.  
  3013. const searchResults = document.createElement("div");
  3014. searchResults.className = classes.noScroll + " " + classes.searchResults;
  3015.  
  3016. const noResult = document.createElement("div");
  3017. noResult.className = classes.noResult;
  3018.  
  3019. searchPage.append(searchbarHolder, searchResults);
  3020.  
  3021. let searchThrottle,
  3022. gamemodeResults = {};
  3023. searchPage.onPath = searchbarHolder.onsubmit = (e) => {
  3024. clearTimeout(searchThrottle);
  3025. e?.preventDefault?.();
  3026. const query = searchbarInput.value.toLowerCase();
  3027. let hasResults = false;
  3028. for (const child of searchResults.children) {
  3029. if (child != noResult) {
  3030. if (child.dataset[datasets.mode]?.includes?.(query) || child.dataset[datasets.name].includes(query) || child.dataset[datasets.description]?.includes?.(query)) {
  3031. hasResults = true;
  3032. child.style.display = "block";
  3033. if (child.dataset[datasets.mode]) gamemodeResults[child.dataset[datasets.mode]].style.display = "block";
  3034. } else child.style.display = "none";
  3035. }
  3036. }
  3037. if (!hasResults) {
  3038. noResult.innerText = `No results found for "${query}"`;
  3039. noResult.style.display = "block";
  3040. } else noResult.style.display = "none";
  3041. };
  3042.  
  3043. searchbarInput.oninput = (e) => {
  3044. clearTimeout(searchThrottle);
  3045. searchThrottle = setTimeout(searchbarHolder.onsubmit, 1000);
  3046. };
  3047.  
  3048. const favoritesPage = document.createElement("div");
  3049. favoritesPage.className = classes.noScroll + " " + classes.favoritesPage;
  3050.  
  3051. const noFavorites = document.createElement("span");
  3052. noFavorites.innerText = "You have no favorites.";
  3053.  
  3054. favoritesPage.append(noFavorites);
  3055.  
  3056. favoritesPage.onPath = () => {
  3057. noFavorites.style.display = favoritesPage.querySelector("[data-" + datasets.favorited + "='true']") == null ? "block" : "none";
  3058. };
  3059.  
  3060. gamemodesList.innerHTML = "";
  3061. searchResults.innerHTML = "";
  3062. searchResults.append(noResult);
  3063. for (const mode in cheats) {
  3064. const gamemode = document.createElement("div");
  3065. gamemode.className = classes.gamemode;
  3066. const image = document.createElement("img");
  3067. image.src = cheats[mode].img;
  3068. const name = document.createElement("div");
  3069. image.alt = name.innerText = cheats[mode].name;
  3070. gamemode.append(image, name);
  3071.  
  3072. const cheatsPage = document.createElement("div");
  3073. cheatsPage.className = classes.contentPage;
  3074.  
  3075. const cheatsList = document.createElement("div");
  3076. cheatsList.className = classes.cheatsList + " " + classes.noScroll;
  3077.  
  3078. const inputElements = [];
  3079. cheatsPage.onPath = () => inputElements.forEach((x) => x());
  3080.  
  3081. const searchResultSeparator = document.createElement("div");
  3082. searchResultSeparator.onclick = () => path.push(cheats[mode].name, cheatsPage);
  3083. searchResultSeparator.className = classes.searchResultSeparator;
  3084. searchResultSeparator.dataset[datasets.name] = (searchResultSeparator.innerText = cheats[mode].name).toLowerCase();
  3085. gamemodeResults[cheats[mode].name.toLowerCase()] = searchResultSeparator;
  3086. searchResults.append(searchResultSeparator);
  3087.  
  3088. const favoritesSeparator = searchResultSeparator.cloneNode(true);
  3089. favoritesSeparator.dataset[datasets.favorites] = 0;
  3090. favoritesSeparator.onclick = searchResultSeparator.onclick;
  3091. favoritesPage.append(favoritesSeparator);
  3092.  
  3093. for (const cheat of cheats[mode].cheats) {
  3094. const cheatId = `${mode}.${cheat.name.toLowerCase()}.${cheat.type == "toggle" ? "toggle" : "execute"}`;
  3095. const cheatElement = document.createElement("div");
  3096.  
  3097. const searchResult = document.createElement("div");
  3098. searchResult.className = classes.searchResult;
  3099.  
  3100. const searchResultInfo = document.createElement("div");
  3101. searchResultInfo.className = classes.searchResultInfo;
  3102.  
  3103. const searchResultName = document.createElement("div");
  3104. searchResultName.className = classes.searchResultName;
  3105. searchResult.dataset[datasets.name] = (searchResultName.innerText = cheat.name + (cheat.type == "toggle" && !cheat.name.includes("toggle") ? " (Toggle)" : "")).toLowerCase();
  3106. searchResult.dataset[datasets.mode] = cheats[mode].name.toLowerCase();
  3107. const searchResultDescription = document.createElement("div");
  3108. searchResultDescription.className = classes.searchResultDescription;
  3109. searchResult.dataset[datasets.description] = (searchResultDescription.innerText = cheat.description).toLowerCase();
  3110.  
  3111. searchResultInfo.append(searchResultName, searchResultDescription);
  3112.  
  3113. searchResult.onclick = () => {
  3114. path.push(searchResultName.innerText, cheatsPage);
  3115. cheatElement.scrollIntoView();
  3116. cheatElement.animate(
  3117. [
  3118. {
  3119. color: "var(--textColor)",
  3120. textShadow: "0 0 0px var(--highlight)",
  3121. },
  3122. {
  3123. color: "var(--highlight)",
  3124. textShadow: "0 0 5px var(--highlight)",
  3125. offset: 0.25,
  3126. },
  3127. {
  3128. color: "var(--textColor)",
  3129. textShadow: "0 0 0px var(--highlight)",
  3130. },
  3131. ],
  3132. 1500
  3133. );
  3134. };
  3135.  
  3136. searchResult.append(searchResultInfo);
  3137.  
  3138. searchResults.append(searchResult);
  3139.  
  3140. const cheatTop = document.createElement("div");
  3141. cheatTop.className = classes.cheatTop;
  3142. const cheatInfo = document.createElement("div");
  3143. cheatInfo.className = classes.cheatInfo;
  3144. const cheatName = document.createElement("span");
  3145. cheatName.innerText = cheat.name;
  3146. cheatName.className = classes.cheatName;
  3147.  
  3148. const favoriteButton = document.createElement("i");
  3149. favoriteButton.className = "far fa-star " + classes.favoriteButton;
  3150.  
  3151. const favoriteInner = document.createElement("i");
  3152. favoriteInner.className = "fas fa-star";
  3153. favoriteButton.append(favoriteInner);
  3154.  
  3155. let favoritesPageCopy = searchResult.cloneNode(true);
  3156. favoritesPageCopy.dataset[datasets.favorited] = false;
  3157. favoritesPageCopy.onclick = searchResult.onclick;
  3158. favoritesPage.append(favoritesPageCopy);
  3159.  
  3160. favoriteButton.onclick = () => {
  3161. const favorited = cheatId in Settings.data.favorites;
  3162. favoriteInner.classList.toggle(classes.filled, !favorited);
  3163. if (favorited) {
  3164. delete Settings.data.favorites[cheatId];
  3165. favoritesPageCopy.dataset[datasets.favorited] = false;
  3166. favoritesSeparator.dataset[datasets.favorites]--;
  3167. } else {
  3168. Settings.data.favorites[cheatId] = 1;
  3169. favoritesPageCopy.dataset[datasets.favorited] = true;
  3170. favoritesSeparator.dataset[datasets.favorites]++;
  3171. }
  3172. favoritesPage.onPath();
  3173. Settings.setData(Settings.data);
  3174. };
  3175.  
  3176. if (cheatId in (Settings.data.favorites ??= {})) {
  3177. favoriteInner.classList.toggle(classes.filled, true);
  3178. favoritesPageCopy.dataset[datasets.favorited] = true;
  3179. favoritesSeparator.dataset[datasets.favorites]++;
  3180. }
  3181.  
  3182. cheatName.append(favoriteButton);
  3183.  
  3184. const cheatDescription = document.createElement("span");
  3185. cheatDescription.innerText = cheat.description;
  3186. cheatDescription.className = classes.cheatDescription;
  3187. cheatInfo.append(cheatName, cheatDescription);
  3188. cheatElement.append(cheatTop);
  3189. const inputs = [];
  3190. if (Array.isArray(cheat.inputs)) {
  3191. const cheatInputs = document.createElement("div");
  3192. cheatInputs.className = classes.cheatInputs;
  3193. for (const input of cheat.inputs) {
  3194. const inputElement = document.createElement("div");
  3195. const inputName = document.createElement("span");
  3196. inputName.innerText = input.name;
  3197. inputElement.append(inputName);
  3198. cheatInputs.append(inputElement);
  3199.  
  3200. if (input.type == "options") {
  3201. const inputField = document.createElement("select");
  3202. inputField.dataset[datasets.type] = "options";
  3203. inputElement.append(inputField);
  3204. inputs.push(inputField);
  3205. let curField = inputField;
  3206. const updateOptions = () => {
  3207. let choose = input.options;
  3208.  
  3209. const newInputField = document.createElement("select");
  3210. newInputField.dataset[datasets.type] = "options";
  3211. inputs[inputs.indexOf(curField)] = newInputField;
  3212. curField.replaceWith(newInputField);
  3213. curField = newInputField;
  3214.  
  3215. if (typeof choose == "function")
  3216. try {
  3217. choose = choose();
  3218. } catch {
  3219. choose = [];
  3220. }
  3221. if (choose instanceof Promise) {
  3222. const waiting = document.createElement("option");
  3223. waiting.value = '""';
  3224. waiting.innerHTML = "Loading Options...";
  3225. curField.append(waiting);
  3226. choose.then((choices) => {
  3227. if (choices?.length > 0) {
  3228. curField.innerHTML = "";
  3229. for (const choice of choices) {
  3230. const option = document.createElement("option");
  3231. option.value = JSON.stringify(choice?.value ?? choice);
  3232. option.innerHTML = choice?.name || choice;
  3233. curField.append(option);
  3234. }
  3235. } else {
  3236. const newInputField = document.createElement("input");
  3237. inputs[inputs.indexOf(curField)] = newInputField;
  3238. curField.replaceWith(newInputField);
  3239. newInputField.dataset[datasets.type] = "string";
  3240. newInputField.placeholder = input.name;
  3241. curField = newInputField;
  3242. }
  3243. });
  3244. } else {
  3245. if (choose?.length > 0) {
  3246. for (const choice of choose) {
  3247. const option = document.createElement("option");
  3248. option.value = JSON.stringify(choice?.value ?? choice);
  3249. option.innerHTML = choice?.name || choice;
  3250. curField.append(option);
  3251. }
  3252. } else {
  3253. const newInputField = document.createElement("input");
  3254. inputs[inputs.indexOf(curField)] = newInputField;
  3255. curField.replaceWith(newInputField);
  3256. newInputField.dataset[datasets.type] = "string";
  3257. newInputField.placeholder = input.name;
  3258. curField = newInputField;
  3259. }
  3260. }
  3261. };
  3262. updateOptions();
  3263. inputElements.push(updateOptions);
  3264. } else {
  3265. const inputField = document.createElement("input");
  3266. inputField.dataset[datasets.type] = input.type;
  3267. if (input.type == "number") {
  3268. inputField.type = "number";
  3269. inputField.min = input.min;
  3270. inputField.max = input.max;
  3271. inputField.value = input.value || (input.min ?? 0);
  3272. }
  3273. inputField.placeholder = input.name;
  3274. inputElement.append(inputField);
  3275. inputs.push(inputField);
  3276. }
  3277. }
  3278. cheatElement.append(cheatInputs);
  3279. }
  3280. cheatTop.append(cheatInfo);
  3281. const runButton = document.createElement("div");
  3282. runButton.className = classes.runCheat;
  3283. if (cheat.type == "toggle") {
  3284. runButton.innerText = "Toggle On";
  3285. runButton.classList.add(classes.toggleCheat);
  3286. } else runButton.innerText = "Execute";
  3287. runButton.onclick = () => {
  3288. cheat.run.apply(
  3289. cheat,
  3290. inputs.map((x) => (x.dataset[datasets.type] == "number" ? parseFloat("0" + x.value) : x.dataset[datasets.type] == "options" ? JSON.parse(x.value) : x.value))
  3291. );
  3292. if (cheat.type == "toggle") {
  3293. runButton.innerText = "Toggle " + (cheat.enabled ? "Off" : "On");
  3294. runButton.classList.toggle(classes.active, cheat.enabled);
  3295. Logs.addLog(`Toggled "${cheat.name}" ${cheat.enabled ? "on" : "off"}`, cheat.enabled ? "var(--toggleOn)" : "var(--toggleOff)");
  3296. }
  3297. Logs.addLog(`Ran "${cheat.name}"`, "var(--highlight)");
  3298. };
  3299. cheatTop.append(runButton);
  3300. cheatsList.append(cheatElement);
  3301. }
  3302.  
  3303. cheatsPage.append(cheatsList);
  3304.  
  3305. gamemode.onclick = () => path.push(cheats[mode].name, cheatsPage);
  3306. gamemodesList.append(gamemode);
  3307. }
  3308. gamemodesPage.append(gamemodesList);
  3309.  
  3310. const creditsPage = document.createElement("div");
  3311. creditsPage.className = classes.creditsPage;
  3312.  
  3313. const licenseMessage = document.createElement("div");
  3314. licenseMessage.className = classes.licenseMessage;
  3315. licenseMessage.innerHTML = `<i class="" style="line-height: 1;aspect-ratio: 1 / 1;height: 20px;display: inline-grid;place-items: center;"></i> <a style="color: var(--highlight);" target="_blank" href=""></a> <a style="color: var(--highlight);" target="_blank" href=""></a><br>`;
  3316.  
  3317. const copyrightTag = document.createElement("span");
  3318. copyrightTag.className = classes.copyrightTag;
  3319.  
  3320. copyrightTag.innerText = `Copyright © ${new Date().getFullYear()} pooperschw4rtz`;
  3321.  
  3322. const codingCredits = document.createElement("ul");
  3323. codingCredits.className = classes.codingCredits;
  3324.  
  3325. codingCredits.append(createCredit("GUI Design + Creation", "pooperschw4rtz"));
  3326. codingCredits.append(createCredit("", ""));
  3327. codingCredits.append(createCredit("", ' <i class=""></i> <i class=""></i> '));
  3328.  
  3329. const creditLinks = document.createElement("ul");
  3330. creditLinks.className = classes.creditLinks;
  3331.  
  3332. creditLinks.append(createCredit("", '<a target="_blank" href=""></a>'));
  3333. creditLinks.append(createCredit("", '<a target="_blank" href=""></a>'));
  3334. creditLinks.append(createCredit("ADD ME ON DISCORD IF YOU NEED SOMETHING!!!", '<a target="_blank" href="http://discordapp.com/users/1245457915993657405">CLICK HERE!!!!</a>'));
  3335.  
  3336. function parseTime(d) {
  3337. const hour = d.getHours() % 12 == 0 ? 12 : d.getHours() % 12;
  3338. const minutes = d.getMinutes().toString().padStart(2, "0");
  3339. return `${hour}:${minutes} ${d.getHours() >= 12 ? "PM" : "AM"}`;
  3340. }
  3341.  
  3342. function parseDate(d) {
  3343. const month = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"][d.getMonth()];
  3344. return `${month} ${d.getDate()}${getOrdinal(d.getDate())}, ${d.getFullYear()} - ${parseTime(d)}`;
  3345. }
  3346.  
  3347. const uploadDates = document.createElement("ul");
  3348. uploadDates.className = classes.uploadDates;
  3349.  
  3350. try {
  3351. let currentDate = new Date(timeProcessed),
  3352. latestDate = new Date(latestProcess);
  3353. uploadDates.append(createCredit("Current GUI Upload Date", parseDate()));
  3354. if (latestProcess != -1) uploadDates.append(createCredit("Latest GUI Upload Date", parseDate(latestDate)));
  3355. if (currentDate < latestDate) {
  3356. const warning = document.createElement("span");
  3357. warning.className = classes.warning;
  3358. warning.innerText = "You are using an outdated version of GUI.";
  3359. uploadDates.append(warning);
  3360. }
  3361. } catch {
  3362. const warning = document.createElement("span");
  3363. warning.className = classes.warning;
  3364. warning.innerText = "Made this script for the mfs that want ts at my school.";
  3365. uploadDates.append(warning);
  3366. }
  3367.  
  3368. creditsPage.append(licenseMessage, codingCredits, creditLinks, uploadDates, copyrightTag);
  3369.  
  3370. function getOrdinal(n) {
  3371. if (n % 10 == 1 && n % 100 != 11) return "st";
  3372. if (n % 10 == 2 && n % 100 != 12) return "nd";
  3373. if (n % 10 == 3 && n % 100 != 13) return "rd";
  3374. return "th";
  3375. }
  3376.  
  3377. function createCredit(contribution, html) {
  3378. const listItem = document.createElement("li");
  3379. const contributionText = document.createElement("strong");
  3380. contributionText.innerText = contribution + ":";
  3381. const right = document.createElement("span");
  3382. right.innerHTML = html;
  3383. listItem.append(contributionText, right);
  3384. return listItem;
  3385. }
  3386.  
  3387. const settingsPage = document.createElement("div");
  3388. settingsPage.className = classes.noScroll + " " + classes.settingsPage;
  3389.  
  3390. const searchResultSeparator = document.createElement("div");
  3391. searchResultSeparator.onclick = () => path.push("Settings", settingsPage);
  3392. searchResultSeparator.className = classes.searchResultSeparator;
  3393. searchResultSeparator.innerText = "Settings";
  3394. searchResultSeparator.dataset[datasets.name] = "settings";
  3395. gamemodeResults.settings = searchResultSeparator;
  3396. searchResults.append(searchResultSeparator);
  3397.  
  3398. const settingRefresh = [];
  3399. function addSetting(name, description, input, onUpdate) {
  3400. const settingElement = document.createElement("div");
  3401.  
  3402. const searchResult = document.createElement("div");
  3403. searchResult.className = classes.searchResult;
  3404.  
  3405. const searchResultInfo = document.createElement("div");
  3406. searchResultInfo.className = classes.searchResultInfo;
  3407.  
  3408. const searchResultName = document.createElement("div");
  3409. searchResultName.className = classes.searchResultName;
  3410. searchResult.dataset[datasets.name] = (searchResultName.innerText = name).toLowerCase();
  3411. searchResult.dataset[datasets.mode] = "settings";
  3412. const searchResultDescription = document.createElement("div");
  3413. searchResultDescription.className = classes.searchResultDescription;
  3414. searchResult.dataset[datasets.description] = (searchResultDescription.innerText = description).toLowerCase();
  3415.  
  3416. searchResultInfo.append(searchResultName, searchResultDescription);
  3417.  
  3418. searchResult.onclick = () => {
  3419. path.push(name, settingsPage);
  3420. settingElement.scrollIntoView();
  3421. settingElement.animate(
  3422. [
  3423. {
  3424. color: "var(--textColor)",
  3425. textShadow: "0 0 0px var(--highlight)",
  3426. },
  3427. {
  3428. color: "var(--highlight)",
  3429. textShadow: "0 0 5px var(--highlight)",
  3430. offset: 0.25,
  3431. },
  3432. {
  3433. color: "var(--textColor)",
  3434. textShadow: "0 0 0px var(--highlight)",
  3435. },
  3436. ],
  3437. 1500
  3438. );
  3439. };
  3440.  
  3441. searchResult.append(searchResultInfo);
  3442.  
  3443. searchResults.append(searchResult);
  3444.  
  3445. const settingTop = document.createElement("div");
  3446. settingTop.className = classes.cheatTop;
  3447. const settingInfo = document.createElement("div");
  3448. settingInfo.className = classes.cheatInfo;
  3449. const settingName = document.createElement("span");
  3450. settingName.innerText = name;
  3451. settingName.className = classes.cheatName;
  3452. const settingDescription = document.createElement("span");
  3453. settingDescription.innerText = description;
  3454. settingDescription.className = classes.cheatDescription;
  3455. settingInfo.append(settingName, settingDescription);
  3456. settingElement.append(settingTop);
  3457.  
  3458. const settingInputs = document.createElement("div");
  3459. settingInputs.className = classes.cheatInputs;
  3460.  
  3461. const inputElement = document.createElement("div");
  3462. const inputName = document.createElement("span");
  3463. inputName.innerText = input.name;
  3464. inputElement.append(inputName);
  3465. settingInputs.append(inputElement);
  3466.  
  3467. let inputField = document.createElement("input");
  3468. inputField.dataset[datasets.type] = input.type;
  3469. if (input.type == "keybind") {
  3470. inputField.readOnly = true;
  3471. let locked = false;
  3472. inputField.data = input.data;
  3473. inputField.onclick = async () => {
  3474. if (locked) return;
  3475. inputField.value = "Waiting for input...";
  3476. locked = true;
  3477. inputField.data = await input.listen((e) => (inputField.value = e + "..."));
  3478. locked = false;
  3479. inputField.value = inputField.value.slice(0, -3);
  3480. };
  3481. (settingRefresh[settingRefresh.length] = () => (inputField.value = input.value()))();
  3482. } else if (input.type == "options") {
  3483. inputField = document.createElement("select");
  3484. inputField.dataset[datasets.type] = "options";
  3485.  
  3486. const defaultOption = document.createElement("option");
  3487. defaultOption.value = "{}";
  3488. defaultOption.innerHTML = "Select a Theme";
  3489. (settingRefresh[settingRefresh.length] = () => (defaultOption.selected = true))();
  3490. inputField.append(defaultOption);
  3491.  
  3492. for (const choice of input.options) {
  3493. const option = document.createElement("option");
  3494. option.value = JSON.stringify(choice?.value ?? choice);
  3495. option.innerHTML = choice?.name || choice;
  3496. inputField.append(option);
  3497. }
  3498. } else {
  3499. if (input.type == "number") {
  3500. inputField.type = "number";
  3501. inputField.min = input.min;
  3502. inputField.max = input.max;
  3503. }
  3504. (settingRefresh[settingRefresh.length] = () => (inputField.value = input.value()))();
  3505. inputField.placeholder = input.name;
  3506. }
  3507. inputElement.append(inputField);
  3508.  
  3509. settingElement.append(settingInputs);
  3510.  
  3511. settingTop.append(settingInfo);
  3512.  
  3513. const runButton = document.createElement("div");
  3514. runButton.className = classes.runCheat;
  3515. runButton.innerText = "Update";
  3516. runButton.onclick = () =>
  3517. onUpdate(inputField.dataset[datasets.type] == "number" ? parseFloat("0" + inputField.value) : inputField.dataset[datasets.type] == "options" ? JSON.parse(inputField.value) : inputField.data ?? inputField.value);
  3518. settingTop.append(runButton);
  3519.  
  3520. settingsPage.append(settingElement);
  3521. }
  3522.  
  3523. settingsPage.onPath = () => settingRefresh.forEach((x) => x());
  3524.  
  3525. addSetting(
  3526. "Hide Keybind",
  3527. "Shortcut to hide to GUI",
  3528. {
  3529. type: "keybind",
  3530. name: "Shortcut",
  3531. data: defaultHideKey,
  3532. value: () => parseKeybind(Settings.data.hideKey),
  3533. listen: (change) => createKeybindListener((keys) => change(parseKeybind(keys))),
  3534. },
  3535. (x) => {
  3536. Settings.setItem("hideKey", x);
  3537. }
  3538. );
  3539. addSetting(
  3540. "Close Keybind",
  3541. "Shortcut to disable all toggles and close GUI",
  3542. {
  3543. type: "keybind",
  3544. name: "Shortcut",
  3545. data: defaultCloseKey,
  3546. value: () => parseKeybind(Settings.data.closeKey),
  3547. listen: (change) => createKeybindListener((keys) => change(parseKeybind(keys))),
  3548. },
  3549. (x) => {
  3550. Settings.setItem("closeKey", x);
  3551. }
  3552. );
  3553. addSetting(
  3554. "Theme",
  3555. "A preset look for the GUI",
  3556. {
  3557. type: "options",
  3558. name: "Preset",
  3559. options: [
  3560. {
  3561. name: "Default",
  3562. value: {
  3563. highlight: variables["--highlight"],
  3564. highlight2: variables["--highlight2"],
  3565. background: variables["--background"],
  3566. background2: variables["--background2"],
  3567. textColor: variables["--textColor"],
  3568. textColor2: variables["--textColor2"],
  3569. toggleOff: variables["--toggleOff"],
  3570. toggleOn: variables["--toggleOn"],
  3571. },
  3572. },
  3573. {
  3574. name: "Crypto Hack",
  3575. value: {
  3576. highlight: "rgb(88 175 88)",
  3577. toggleOn: "#0b601b",
  3578. background: "radial-gradient(#11581e,#041607)",
  3579. background2: "f90000",
  3580. toggleOff: "#A02626",
  3581. highlight2: "#49d149",
  3582. textColor2: "f90000",
  3583. },
  3584. },
  3585. {
  3586. name: "Deceptive Dinos",
  3587. value: {
  3588. highlight: "#af8942",
  3589. toggleOn: "#2fb62f",
  3590. background: "radial-gradient(rgba(220, 184, 86, 0), rgba(220, 184, 86, 0.4)), url(https://ac.blooket.com/play/111cb7e0ee6607ac3d1a13d534c0e0f1.png), #ead49a",
  3591. background2: "radial-gradient(rgba(1,104,162,.6),rgba(24,55,110,.5)),radial-gradient(#2783b4 1.5px,#18376e 0) center / 24px 24px",
  3592. toggleOff: "#A02626",
  3593. highlight2: "rgb(0 0 0 / 25%)",
  3594. textColor2: "f90000",
  3595. },
  3596. },
  3597. {
  3598. name: "Blook Rush",
  3599. value: {
  3600. highlight: "#888",
  3601. toggleOn: "#47A547",
  3602. background: "repeating-linear-gradient(45deg,white,white 8%,#e6e6e6 0,#e6e6e6 16%)",
  3603. background2: "#36c",
  3604. toggleOff: "#A02626",
  3605. highlight2: "rgb(0 0 0 / 25%)",
  3606. textColor2: "f90000",
  3607. },
  3608. },
  3609. {
  3610. name: "Factory",
  3611. value: {
  3612. highlight: "#1563bf",
  3613. toggleOn: "rgb(75, 194, 46)",
  3614. background: "#3a3a3a",
  3615. background2: "#2d313d",
  3616. toggleOff: "#9a49aa",
  3617. highlight2: "rgb(0 0 0 / 25%)",
  3618. textColor2: "f90000",
  3619. },
  3620. },
  3621. {
  3622. name: "Cafe",
  3623. value: {
  3624. highlight: "#0bc2cf",
  3625. toggleOn: "#47A547",
  3626. background: "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",
  3627. background2: "rgb(64, 64, 64)",
  3628. toggleOff: "#A02626",
  3629. highlight2: "rgb(0 0 0 / 25%)",
  3630. textColor2: "f90000",
  3631. textColor: "f90000",
  3632. },
  3633. },
  3634. {
  3635. name: "Tower of Doom",
  3636. value: {
  3637. highlight: "#9a49aa",
  3638. toggleOn: "#4bc22e",
  3639. background: "rgb(41 41 41)",
  3640. background2: "#404040",
  3641. toggleOff: "rgb(151, 15, 5)",
  3642. highlight2: "rgb(0 0 0 / 25%)",
  3643. textColor2: "f90000",
  3644. textColor: "f90000",
  3645. },
  3646. },
  3647. {
  3648. name: "Monster Brawl",
  3649. value: {
  3650. highlight: "#2966a6",
  3651. toggleOn: "#47A547",
  3652. background: "rgb(45, 51, 67)",
  3653. background2: "#374154",
  3654. toggleOff: "#A02626",
  3655. highlight2: "#264d99",
  3656. textColor2: "f90000",
  3657. textColor: "f90000",
  3658. },
  3659. },
  3660. {
  3661. name: "Tower Defense 2",
  3662. value: {
  3663. highlight: "#40b1d8",
  3664. toggleOn: "#47A547",
  3665. background: "url(https://media.blooket.com/image/upload/v1676164454/Media/defense/backgroundTd1-02.svg) center / cover",
  3666. background2: "#293c82",
  3667. toggleOff: "#A02626",
  3668. highlight2: "rgb(0 0 0 / 25%)",
  3669. textColor2: "f90000",
  3670. textColor: "#f90000",
  3671. },
  3672. },
  3673. ],
  3674. },
  3675. (x) => {
  3676. Settings.setItem("theme", { ...Settings.data.theme, ...x });
  3677. for (const prop in x) gui.style.setProperty(`--${prop}`, x[prop]);
  3678. path.updatePath();
  3679. }
  3680. );
  3681. addSetting("Highlight 1", "Hover color, sub-text color, button color, and input outlines", { type: "string", name: "CSS Value", value: () => gui.style.getPropertyValue("--highlight") }, (x) =>
  3682. gui.style.setProperty("--highlight", Settings.setItem("theme.highlight", x || variables["--highlight"]))
  3683. );
  3684. addSetting("Highlight 2", "Credits page's warning message color", { type: "string", name: "CSS Value", value: () => gui.style.getPropertyValue("--highlight2") }, (x) =>
  3685. gui.style.setProperty("--highlight2", Settings.setItem("theme.highlight2", x || variables["--highlight2"]))
  3686. );
  3687. addSetting("Background", "Main GUI background color", { type: "string", name: "CSS Value", value: () => gui.style.getPropertyValue("--background") }, (x) =>
  3688. gui.style.setProperty("--background", Settings.setItem("theme.background", x || variables["--background"]))
  3689. );
  3690. addSetting("Background 2", "Secondary GUI background color", { type: "string", name: "CSS Value", value: () => gui.style.getPropertyValue("--background2") }, (x) =>
  3691. gui.style.setProperty("--background2", Settings.setItem("theme.background2", x || variables["--background2"]))
  3692. );
  3693. addSetting("Text Color", "Main text color", { type: "string", name: "CSS Value", value: () => gui.style.getPropertyValue("--textColor") }, (x) =>
  3694. gui.style.setProperty("--textColor", Settings.setItem("theme.textColor", x || variables["--textColor"]))
  3695. );
  3696. addSetting("Text Color 2", "Credit page's contributor color", { type: "string", name: "CSS Value", value: () => gui.style.getPropertyValue("--textColor2") }, (x) =>
  3697. gui.style.setProperty("--textColor2", Settings.setItem("theme.textColor2", x || variables["--textColor2"]))
  3698. );
  3699. addSetting("Toggle (On)", "Enabled toggle button color", { type: "string", name: "CSS Value", value: () => gui.style.getPropertyValue("--toggleOn") }, (x) =>
  3700. gui.style.setProperty("--toggleOn", Settings.setItem("theme.toggleOn", x || variables["--toggleOn"]))
  3701. );
  3702. addSetting("Toggle (Off)", "Disabled toggle button color", { type: "string", name: "CSS Value", value: () => gui.style.getPropertyValue("--toggleOff") }, (x) =>
  3703. gui.style.setProperty("--toggleOff", Settings.setItem("theme.toggleOff", x || variables["--toggleOff"]))
  3704. );
  3705.  
  3706. const sidebarPaths = document.createElement("div");
  3707. sidebarPaths.className = classes.sidebarPaths;
  3708.  
  3709. function createSidebarPath(name, icon, page) {
  3710. const sidebarPath = document.createElement("div");
  3711. sidebarPath.className = classes.sidebarPath;
  3712.  
  3713. const iconImg = document.createElement("i");
  3714. iconImg.className = icon;
  3715.  
  3716. const pathName = document.createElement("span");
  3717. pathName.innerText = name;
  3718.  
  3719. sidebarPath.append(iconImg, pathName);
  3720.  
  3721. sidebarPath.onclick = () => path.sidebar(name, page);
  3722.  
  3723. sidebarPaths.append(sidebarPath);
  3724.  
  3725. return sidebarPath;
  3726. }
  3727.  
  3728. createSidebarPath("Search", "fas fa-search", searchPage);
  3729. createSidebarPath("Gamemodes", "fas fa-gamepad", gamemodesPage);
  3730. createSidebarPath("Favorites", "fas fa-star", favoritesPage);
  3731. (leaderboardPath = createSidebarPath("Leaderboard", "fas fa-trophy", leaderboardPage)).style.display = "none";
  3732. createSidebarPath("Logs", "fas fa-terminal", logsPage);
  3733. createSidebarPath("Settings", "fas fa-cog", settingsPage);
  3734. createSidebarPath("Credits", "fas fa-code", creditsPage);
  3735.  
  3736. sidebar.append(sidebarPaths);
  3737.  
  3738. const bigTextContainer = document.createElement("div");
  3739. bigTextContainer.className = classes.bigTextContainer;
  3740.  
  3741.  
  3742. const dummyK = document.createElement("span");
  3743. dummyK.innerText = "";
  3744. dummyK.style.opacity = "0";
  3745.  
  3746. const bigText = document.createElement("span");
  3747. bigText.className = classes.bigText;
  3748. bigText.innerText = "OPTIONS";
  3749.  
  3750. const logo = document.createElement("span");
  3751. logo.className = classes.logo;
  3752. logo.innerHTML = "";
  3753.  
  3754. bigTextContainer.append(logo, dummyK, bigText);
  3755.  
  3756. sidebar.prepend(bigTextContainer);
  3757.  
  3758. const refreshControl = document.createElement("div");
  3759. refreshControl.innerHTML = `<i class="fas fa-sync" style="line-height: 1"></i>`;
  3760. refreshControl.className = classes.refreshControl;
  3761. refreshControl.onclick = () => {
  3762. refreshControl.animate([{ rotate: "0deg" }, { rotate: "360deg" }], { duration: 1000, easing: "ease" });
  3763. path.updatePath();
  3764. };
  3765.  
  3766. gui.append(controls, guiTopBar, sidebar, guiContent, pathText, refreshControl);
  3767. path.updatePath();
  3768. document.body.appendChild(gui);
  3769.  
  3770. Logs.addLog("Opened BHv1");
  3771. /* Anti-Suspend */
  3772. if (window.fetch.call.toString() == "function call() { [native code] }") {
  3773. const call = window.fetch.call;
  3774. window.fetch.call = function () {
  3775. if (!arguments[1].includes("s.blooket.com/rc")) return call.apply(this, arguments);
  3776. Logs.addLog("Blocked Suspension API!", "red");
  3777. };
  3778. Logs.addLog("Enabled Anti-Suspend");
  3779. }
  3780.  
  3781. if (gui.querySelector("i").clientHeight == 0) {
  3782. const link = document.createElement("link");
  3783. link.rel = "stylesheet";
  3784. link.href = "https://ka-f.fontawesome.com/releases/v6.5.1/css/pro.min.css";
  3785. gui.prepend(link);
  3786. }
  3787.  
  3788. function randString(length) {
  3789. return Array.from({ length }, () => String.fromCharCode(Math.floor(Math.random() * 25) + 97)).reduce((a) => a + String.fromCharCode(Math.floor(Math.random() * 25) + 97), "");
  3790. }
  3791.  
  3792. function dragElement(element, parent) {
  3793. var pos1 = 0,
  3794. pos2 = 0,
  3795. pos3 = 0,
  3796. pos4 = 0;
  3797. element.onpointerdown = function (e = window.event) {
  3798. element.style.cursor = "grabbing";
  3799. pos3 = e.clientX;
  3800. pos4 = e.clientY;
  3801. document.onpointerup = function () {
  3802. element.style.cursor = "grab";
  3803. document.onpointerup = null;
  3804. document.onpointermove = null;
  3805. };
  3806. document.onpointermove = function (e = window.event) {
  3807. pos1 = pos3 - e.clientX;
  3808. pos2 = pos4 - e.clientY;
  3809. pos3 = e.clientX;
  3810. pos4 = e.clientY;
  3811. parent.style.top = parent.offsetTop - pos2 + "px";
  3812. parent.style.left = parent.offsetLeft - pos1 + "px";
  3813. };
  3814. };
  3815. }
  3816.  
  3817. const keys = ["shift", "control", "alt", "meta"];
  3818. function createKeybindListener(onpress, element = window) {
  3819. return new Promise((resolve) => {
  3820. const pressed = new Set();
  3821. let shift, ctrl, alt, key;
  3822. const keydown = (e) => {
  3823. e.preventDefault();
  3824. pressed.add(e.code);
  3825. shift ||= e.shiftKey;
  3826. ctrl ||= e.ctrlKey;
  3827. alt ||= e.altKey;
  3828. if (!keys.includes(e.key.toLowerCase())) key = e.key.toLowerCase();
  3829. onpress?.({ shift, ctrl, alt, key });
  3830. };
  3831. const keyup = (e) => {
  3832. pressed.delete(e.code);
  3833. if (pressed.size > 0) return;
  3834. element.removeEventListener("keydown", keydown);
  3835. element.removeEventListener("keyup", keyup);
  3836. resolve({ shift, ctrl, alt, key });
  3837. };
  3838. element.addEventListener("keydown", keydown);
  3839. element.addEventListener("keyup", keyup);
  3840. });
  3841. }
  3842. function parseKeybind({ shift, ctrl, alt, key }) {
  3843. return [ctrl && "Ctrl", shift && "Shift", alt && "Alt", key && key.toUpperCase()].filter(Boolean).join(" + ");
  3844. }
  3845.  
  3846. function compareKeybind(keybind, event) {
  3847. return keybind.ctrl == event.ctrlKey && keybind.shift == event.shiftKey && keybind.alt == event.altKey && event.key.toLowerCase() == keybind.key;
  3848. }
  3849.  
  3850. function keydown(e) {
  3851. if (compareKeybind(Settings.data.hideKey ?? defaultHideKey, e)) {
  3852. e.preventDefault();
  3853. return (gui.style.display = gui.style.display === "block" ? "none" : "block");
  3854. }
  3855. if (compareKeybind(Settings.data.closeKey ?? defaultCloseKey, e)) {
  3856. e.preventDefault();
  3857. close();
  3858. }
  3859. }
  3860.  
  3861. function close() {
  3862. gui.remove();
  3863. clearInterval(Logs.interval);
  3864. for (const category in cheats) for (const cheat of cheats[category].cheats) if (cheat.enabled) cheat.run();
  3865. window.removeEventListener("keydown", keydown);
  3866. }
  3867.  
  3868. function getStateNode() {
  3869. return Object.values(
  3870. (function react(r = document.querySelector("body>div")) {
  3871. return Object.values(r)[1]?.children?.[0]?._owner.stateNode ? r : react(r.querySelector(":scope>div"));
  3872. })()
  3873. )[1].children[0]._owner.stateNode;
  3874. }
  3875.  
  3876. window.addEventListener("keydown", keydown);
  3877.  
  3878. });
  3879. let img = new Image;
  3880. img.src = "https://raw.githubusercontent.com/Blooket-Council/Blooket-Cheats/main/autoupdate/timestamps/KGui.png?" + Date.now();
  3881. img.crossOrigin = "Anonymous";
  3882. img.onload = function() {
  3883. const c = document.createElement("canvas");
  3884. const ctx = c.getContext("2d");
  3885. ctx.drawImage(img, 0, 0, this.width, this.height);
  3886. let { data } = ctx.getImageData(0, 0, this.width, this.height), decode = "", last;
  3887. let i = 0;
  3888. while (i < data.length) {
  3889. let char = String.fromCharCode(data[i % 4 == 3 ? (i++, i++) : i++] + data[i % 4 == 3 ? (i++, i++) : i++] * 256);
  3890. decode += char;
  3891. if (char == "/" && last == "*") break;
  3892. last = char;
  3893. }
  3894. let _, time = timeProcessed, error = "There was an error checking for script updates. Run cheat anyway?";
  3895. try {
  3896. [_, time, error] = decode.match(/LastUpdated: (.+?); ErrorMessage: "((.|\n)+?)"/);
  3897. } catch (e) {}
  3898. if ((latestProcess = parseInt(time)) <= timeProcessed || iframe.contentWindow.confirm(error)) cheat();
  3899. }
  3900. img.onerror = img.onabort = () => {
  3901. img.onerror = img.onabort = null;
  3902. cheat();
  3903. let iframe = document.querySelector("iframe");
  3904. 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)")
  3905. }
  3906. })();