/* All terms found in the following link apply: https://github.com/05Konz/Blooket-Cheats/blob/main/LICENSE */ (()=>{let s=document.querySelector("iframe");s.contentWindow.console.log.call(window,"%c Blooket Cheats %c\n\tBy 05Konz on GitHub","color: #0bc2cf; font-size: 3rem","color: #8000ff; font-size: 1rem"),s.contentWindow.console.log.call(window,"%c\tspamBuyBlooks.js","color: #0bc2cf; font-size: 1rem"),s.contentWindow.console.log.call(window,"%c\tStar the github repo!%c https://github.com/05Konz/Blooket-Cheats","color: #ffd000; font-size: 1rem","");const c=async()=>{var o=document.createElement("iframe");document.body.append(o),window.alert=o.contentWindow.alert.bind(window),window.prompt=o.contentWindow.prompt.bind(window),window.confirm=o.contentWindow.confirm.bind(window),o.remove();let a=webpackJsonp.push([[],{[1234]:(o,e,t)=>{e.webpack=t}},[["1234"]]])["webpack"],e=Object.values(a.c).find(o=>o.exports?.a?.get).exports.a,l=Object.values(a.c).find(o=>o.exports.a?.purchaseBlookBox).exports.a["purchaseBlookBox"];e.get("https://dashboard.blooket.com/api/users").then(async({data:{tokens:o}})=>{var e=Object.values(a.c).find(o=>!isNaN(o?.exports?.a?.Space)).exports.a||{Medieval:20,Breakfast:20,Wonderland:20,Blizzard:25,Space:20,Bot:20,Aquatic:20,Safari:20,Dino:25,"Ice Monster":25,Outback:25};let t=prompt('Which box do you want to open? (ex: "Ice Monster")').split(" ").map(o=>o.charAt(0).toUpperCase()+o.slice(1).toLowerCase()).join(" ");if(!Object.keys(e).map(o=>o.toLowerCase()).includes(t.toLowerCase()))return alert("I couldn't find that box!");let r=Math.min(Math.floor(o/Object.entries(e).find(o=>o[0].toLowerCase()==t.toLowerCase())[1]),parseInt("0"+prompt("How many boxes do you want to open?")));if(0==r)return alert("You do not have enough tokens!");let s=confirm("Would you like to alert blooks upon unlocking?"),c={},i=Date.now(),n=!1;for(let a=0;a{c[t]||=0,c[t]++;var n=Date.now();s&&alert(`${t} (${a+1}/${r}) ${o?"NEW! ":""}${e} tokens left`),i+=Date.now()-n}).catch(o=>n=!0),!n);a++);alert(`(${Date.now()-i}ms) Results:\n`+Object.entries(c).map(([o,e])=>` ${o} `+e).join(`\n`))}).catch(()=>alert("There was an error user data!"))};let i=new Image;i.src="https://raw.githubusercontent.com/05Konz/Blooket-Cheats/main/autoupdate/timestamps/global/spamBuyBlooks.png?"+Date.now(),i.crossOrigin="Anonymous",i.onload=function(){var o=document.createElement("canvas").getContext("2d");o.drawImage(i,0,0,this.width,this.height);let e=o.getImageData(0,0,this.width,this.height)["data"],t="",n;for(let o=0;o(i.src=null,c())})();