CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!
Path: blob/main/cheats/global/simulateUnlock.js
Views: 1236
/**1* @license StewartPrivateLicense-2.0.12* Copyright (c) 05Konz 20233*4* You may not reproduce or distribute any code inside this file without the licenser's permission.5* You may not copy, modify, steal, skid, or recreate any of the code inside this file.6* You may not under any circumstance republish any code from this file as your own.7*8* ALL TERMS STATED IN THE LINK BELOW APPLY ASWELL9* https://github.com/05Konz/Blooket-Cheats/blob/main/LICENSE10*/1112/* THE UPDATE CHECKER IS ADDED DURING COMMIT PREP, THERE MAY BE REDUNDANT CODE, DO NOT TOUCH */1314(() => {15const cheat = (async () => {16let i = document.createElement('iframe');17document.body.append(i);18window.alert = i.contentWindow.alert.bind(window);19window.prompt = i.contentWindow.prompt.bind(window);20i.remove();21if (window.location.pathname == "/market") {22let { webpack } = webpackJsonp.push([[], { ['1234']: (_, a, b) => { a.webpack = b }, }, [['1234']]]);23let values = Object.values(webpack.c),24blooks = values.find(x => x.exports?.a?.Chick?.set).exports.a,25packs = values.find(x => x.exports.a?.Breakfast).exports.a,26allBlooks = Object.entries(blooks).reduce((a, [b, c]) => (packs[c.realSet || c.set] && (a[b] = c), a), {});27let { stateNode } = Object.values((function react(r = document.querySelector("body>div")) { return Object.values(r)[1]?.children?.[0]?._owner.stateNode ? r : react(r.querySelector(":scope>div")) })())[1].children[0]._owner;28let phaser = Object.values(webpack.c).find(x => x.exports?.Class).exports;29let L = new function e() { this.scene = null, this.particles = null, this.rarity = null };3031class Particles extends phaser.Scene {32constructor(rarity) {33super();34this.rarity = rarity.toLowerCase();35}36preload() {37switch (this.rarity) {38case "uncommon":39this.load.svg("uncommon-1", "https://media.blooket.com/image/upload/v1658567787/Media/market/particles/square_green.svg", { width: 25, height: 25 });40this.load.svg("uncommon-2", "https://media.blooket.com/image/upload/v1658567787/Media/market/particles/square_light_green.svg", { width: 25, height: 25 });41this.load.svg("uncommon-3", "https://media.blooket.com/image/upload/v1658567785/Media/market/particles/circle_dark_green.svg", { width: 25, height: 25 });42this.load.svg("uncommon-4", "https://media.blooket.com/image/upload/v1658567785/Media/market/particles/serpentine_dark_green.svg", { width: 30, height: 30 });43this.load.svg("uncommon-5", "https://media.blooket.com/image/upload/v1658567785/Media/market/particles/triangle_light_green.svg", { width: 30, height: 30 });44this.load.svg("uncommon-6", "https://media.blooket.com/image/upload/v1658567785/Media/market/particles/serpentine_light_green.svg", { width: 30, height: 30 });45this.load.svg("uncommon-7", "https://media.blooket.com/image/upload/v1658567785/Media/market/particles/triangle_green.svg", { width: 30, height: 30 });46break;47case "rare":48this.load.svg("rare-1", "https://media.blooket.com/image/upload/v1658567765/Media/market/particles/square_light_blue.svg", { width: 25, height: 25 });49this.load.svg("rare-2", "https://media.blooket.com/image/upload/v1658567765/Media/market/particles/square_dark_blue.svg", { width: 25, height: 25 });50this.load.svg("rare-3", "https://media.blooket.com/image/upload/v1658567763/Media/market/particles/triangle_blue.svg", { width: 30, height: 30 });51this.load.svg("rare-4", "https://media.blooket.com/image/upload/v1658567763/Media/market/particles/serpentine_blue.svg", { width: 30, height: 30 });52this.load.svg("rare-5", "https://media.blooket.com/image/upload/v1658567763/Media/market/particles/triangle_light_blue.svg", { width: 30, height: 30 });53this.load.svg("rare-6", "https://media.blooket.com/image/upload/v1658567763/Media/market/particles/serpentine_light_blue.svg", { width: 30, height: 30 });54this.load.svg("rare-7", "https://media.blooket.com/image/upload/v1658567763/Media/market/particles/circle_dark_blue.svg", { width: 25, height: 25 });55break;56case "epic":57this.load.svg("epic-1", "https://media.blooket.com/image/upload/v1658790239/Media/market/particles/red.svg", { width: 25, height: 25 });58this.load.svg("epic-2", "https://media.blooket.com/image/upload/v1658790237/Media/market/particles/light_red.svg", { width: 25, height: 25 });59this.load.svg("epic-3", "https://media.blooket.com/image/upload/v1658790239/Media/market/particles/serpentine_red.svg", { width: 30, height: 30 });60this.load.svg("epic-4", "https://media.blooket.com/image/upload/v1658790239/Media/market/particles/serpentine_dark_red.svg", { width: 30, height: 30 });61this.load.svg("epic-5", "https://media.blooket.com/image/upload/v1658790237/Media/market/particles/triangle_red.svg", { width: 30, height: 30 });62this.load.svg("epic-6", "https://media.blooket.com/image/upload/v1658790237/Media/market/particles/triangle_light_red.svg", { width: 30, height: 30 });63this.load.svg("epic-7", "https://media.blooket.com/image/upload/v1658790237/Media/market/particles/circle_dark_red.svg", { width: 25, height: 25 });64break;65case "legendary":66this.load.svg("legendary-1", "https://media.blooket.com/image/upload/v1658567740/Media/market/particles/square_orange.svg", { width: 25, height: 25 });67this.load.svg("legendary-2", "https://media.blooket.com/image/upload/v1658567740/Media/market/particles/square_light_orange.svg", { width: 25, height: 25 });68this.load.svg("legendary-3", "https://media.blooket.com/image/upload/v1658567738/Media/market/particles/circle_orange.svg", { width: 25, height: 25 });69this.load.svg("legendary-4", "https://media.blooket.com/image/upload/v1658567738/Media/market/particles/serpentine_orange.svg", { width: 30, height: 30 });70this.load.svg("legendary-5", "https://media.blooket.com/image/upload/v1658567738/Media/market/particles/serpentine_light_orange.svg", { width: 30, height: 30 });71this.load.svg("legendary-6", "https://media.blooket.com/image/upload/v1658567738/Media/market/particles/circle_dark_orange.svg", { width: 25, height: 25 });72this.load.svg("legendary-7", "https://media.blooket.com/image/upload/v1658567738/Media/market/particles/triangle_dark_orange.svg", { width: 30, height: 30 });73break;74case "chroma":75this.load.svg("chroma-1", "https://media.blooket.com/image/upload/v1658790246/Media/market/particles/square_turquoise.svg", { width: 25, height: 25 });76this.load.svg("chroma-2", "https://media.blooket.com/image/upload/v1658790246/Media/market/particles/square_light_turquoise.svg", { width: 25, height: 25 });77this.load.svg("chroma-3", "https://media.blooket.com/image/upload/v1658790244/Media/market/particles/serpentine_dark_turquoise.svg", { width: 30, height: 30 });78this.load.svg("chroma-4", "https://media.blooket.com/image/upload/v1658790244/Media/market/particles/serpentine_turquoise.svg", { width: 30, height: 30 });79this.load.svg("chroma-5", "https://media.blooket.com/image/upload/v1658790244/Media/market/particles/triangle_turquoise.svg", { width: 30, height: 30 });80this.load.svg("chroma-6", "https://media.blooket.com/image/upload/v1658790244/Media/market/particles/triangle_light_turquoise.svg", { width: 30, height: 30 });81this.load.svg("chroma-7", "https://media.blooket.com/image/upload/v1658790244/Media/market/particles/circle_dark_turquoise.svg", { width: 25, height: 25 });82}83}84create() {85L.scene = this;86L.rarity = "";87L.particles = this.physics.add.group({88classType: new phaser.Class({89Extends: phaser.GameObjects.Image,90initialize: function () {91phaser.GameObjects.Image.call(this, L.scene, 0, 0, "uncommon-1");92this.setDepth(3);93this.lifespan = 0;94},95spawn: function (x, y, scale, velAngle, velSpeed, gravity, angle, lifespan, texture) {96this.setTexture(texture);97this.setActive(true);98this.setVisible(true);99this.setPosition(x, y);100this.setScale(scale);101this.targets = [];102L.scene.physics.velocityFromAngle(velAngle, velSpeed, this.body.velocity);103this.body.setGravityY(gravity);104this.body.setAngularVelocity(angle);105this.lifespan = lifespan;106},107update: function (t, s) {108this.lifespan -= s;109if (this.lifespan > 0) return;110this.setActive(!1);111this.setVisible(!1);112}113}),114runChildUpdate: !0115});116this.nextParticle = 0;117this.numExplosions = 0;118this.game.events.on("start-particles", (t) => {119L.rarity = t;120this.numExplosions = "Uncommon" === t ? 75 : "Rare" === t ? 100 : -1;121});122}123update(e, t) {124const I = webpack("74sb");125let Z = function (e) {126switch (e) {127case "center": {128var t = Object(I.l)(-115, -65);129return {130x: L.scene.cameras.main.worldView.width / 2,131y: L.scene.cameras.main.worldView.height / 2,132scale: Object(I.l)(.7, 1),133angle: t,134velocity: Object(I.l)(600, 750),135gravity: 700,136angVelocity: (t > -90 ? 1 : -1) * Object(I.l)(125, 175),137lifespan: 2500138}139}140case "right-bottom": return {141x: L.scene.cameras.main.worldView.width,142y: L.scene.cameras.main.worldView.height,143scale: Object(I.l)(.7, 1),144angle: Object(I.l)(-160, -110),145velocity: Object(I.l)(600, 750),146gravity: 500,147angVelocity: Object(I.l)(-175, -125),148lifespan: 2500149};150case "left-bottom": return {151x: 0,152y: L.scene.cameras.main.worldView.height,153scale: Object(I.l)(.7, 1),154angle: Object(I.l)(-70, -20),155velocity: Object(I.l)(600, 750),156gravity: 500,157angVelocity: Object(I.l)(125, 175),158lifespan: 2500159};160case "top": return {161x: Object(I.l)(0, L.scene.cameras.main.worldView.width),162y: -50,163scale: Object(I.l)(.7, 1),164angle: 90,165velocity: Object(I.l)(0, 50),166gravity: 700,167angVelocity: Object(I.l)(-150, 150),168lifespan: 2500169};170case "right-shower": return {171x: L.scene.cameras.main.worldView.width,172y: Object(I.l)(0, L.scene.cameras.main.worldView.height),173scale: Object(I.l)(.7, 1),174angle: Object(I.l)(-180, -130),175velocity: Object(I.l)(600, 750),176gravity: 500,177angVelocity: Object(I.l)(-175, -125),178lifespan: 2500179};180case "left-shower": return {181x: 0,182y: Object(I.l)(0, L.scene.cameras.main.worldView.height),183scale: Object(I.l)(.7, 1),184angle: Object(I.l)(-50, 0),185velocity: Object(I.l)(600, 750),186gravity: 500,187angVelocity: Object(I.l)(125, 175),188lifespan: 2500189};190case "right-diamond": {191var a = Object(I.l)(0, L.scene.cameras.main.worldView.height);192return {193x: L.scene.cameras.main.worldView.width,194y: a,195scale: Object(I.l)(.7, 1),196angle: a > L.scene.cameras.main.worldView.height / 2 ? -150 : -210,197velocity: Object(I.l)(600, 750),198gravity: 0,199angVelocity: Object(I.l)(-175, -125),200lifespan: 2500201}202}203case "left-diamond": {204var n = Object(I.l)(0, L.scene.cameras.main.worldView.height);205return {206x: 0,207y: n,208scale: Object(I.l)(.7, 1),209angle: n > L.scene.cameras.main.worldView.height / 2 ? -30 : 30,210velocity: Object(I.l)(600, 750),211gravity: 0,212angVelocity: Object(I.l)(125, 175),213lifespan: 2500214}215}216default: return {};217}218};219if (L.rarity && 0 !== this.numExplosions && (this.nextParticle -= t, this.nextParticle <= 0)) {220switch (L.rarity) {221case "Uncommon": {222for (let i = 0; i < 2; i++) {223let n = L.particles.get();224n && n.spawn.apply(n, Object.values(Z("center")).concat(`uncommon-${Object(I.m)(1, 8)}`))225}226break;227}228case "Rare": {229for (var o = 0; o < 2; o++) {230var r = L.particles.get();231r && r.spawn.apply(r, Object.values(Z(o % 2 == 0 ? "left-bottom" : "right-bottom")).concat(`rare-${Object(I.m)(1, 8)}`))232}233break;234}235case "Epic": {236for (var s = 0; s < 2; s++) {237var i = L.particles.get();238i && i.spawn.apply(i, Object.values(Z(s % 2 == 0 ? "left-shower" : "right-shower")).concat(`epic-${Object(I.m)(1, 8)}`))239}240break;241}242case "Legendary": {243for (var l = 0; l < 3; l++) {244var c = L.particles.get();245c && c.spawn.apply(c, Object.values(Z("top")).concat(`legendary-${Object(I.m)(1, 8)}`))246}247break;248}249case "Chroma": {250for (var u = 0; u < 3; u++) {251var d = L.particles.get();252d && d.spawn.apply(d, Object.values(Z(u % 2 == 0 ? "left-diamond" : "right-diamond")).concat(`chroma-${Object(I.m)(1, 8)}`))253}254break;255}256}257this.nextParticle = 20;258this.numExplosions > 0 && (this.numExplosions = Math.max(this.numExplosions - 1, 0));259}260}261}262let blook = prompt("What blook do you want to simulate opening? (Case Sensitive)");263if (Object.keys(allBlooks).includes(blook)) stateNode.setState({264loadingPack: false,265openPack: true,266unlockedBlook: blook,267tokens: stateNode.state.tokens,268newUnlock: true,269game: {270type: phaser.WEBGL,271parent: "phaser-market",272width: "100%",273height: "100%",274scale: { mode: phaser.Scale.NONE, autoCenter: phaser.Scale.CENTER_BOTH },275transparent: true,276physics: { default: "arcade" },277scene: new Particles(allBlooks[blook].rarity)278},279canOpen: true280});281else if (blook) alert("Invalid blook! Make sure you spelled and capitalized it properly, the blook also needs a buyable pack in the market.");282} else alert("This can only be ran on the market page!");283});284let img = new Image;285img.src = "https://raw.githubusercontent.com/05Konz/Blooket-Cheats/main/autoupdate/timestamps/global/simulateUnlock.png?" + Date.now();286img.crossOrigin = "Anonymous";287img.onload = function() {288const c = document.createElement("canvas");289const ctx = c.getContext("2d");290ctx.drawImage(img, 0, 0, this.width, this.height);291let { data } = ctx.getImageData(0, 0, this.width, this.height), decode = "", last;292for (let i = 0; i < data.length; i += 4) {293let char = String.fromCharCode(data[i + 1] * 256 + data[i + 2]);294decode += char;295if (char == "/" && last == "*") break;296last = char;297}298let iframe = document.querySelector("iframe");299const [_, time, error] = decode.match(/LastUpdated: (.+?); ErrorMessage: "(.+?)"/);300if (parseInt(time) <= 1693429947427 || iframe.contentWindow.confirm(error)) cheat();301}302img.onerror = img.onabort = () => (img.src = null, cheat());303})();304305