Advertisement
ConcealedReal

tata

Apr 25th, 2024 (edited)
834
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*javascript:fetch('https://momentous-spurious-handsaw.glitch.me/proxy?url=https://pastebin.com/raw/h66nbLTM').then(response=>{return response.json()}).then(data=>{eval(data)})*/
  2. var w;
  3. w = window.open('https://www.blooket.com/');
  4. setTimeout(() => {
  5.     w.document.body.appendChild(w.document.createElement('script'))
  6.         .textContent = `
  7.  
  8. document.body.insertAdjacentHTML('beforeend', \`
  9. <div class='gui2'>
  10.     <div class="hack-checkbox">
  11.         <label for='' style='text-decoration-line:underline'>Utils</label>
  12.     </div>
  13.     <br>
  14.     <div class="hack-checkbox">
  15.         <label for='enemySpeedMultiplier'>Enemy Speed Multiplier: </label>
  16.         <input id='enemySpeedMultiplier' class='input-field'>
  17.     </div>
  18.     <br>
  19.     <div class="hack-checkbox">
  20.         <label for='' style='text-decoration-line:underline'>Global</label>
  21.     </div>
  22.     <br>
  23.     <div class="hack-checkbox">
  24.         <input id='autoAnswer' class='hotkey' type='checkbox'>
  25.         <label for='autoAnswer' class="slider"></label>
  26.         <label for='autoAnswer'>Auto Answer</label>
  27.     </div>
  28.     <br>
  29.     <div class="hack-checkbox">
  30.         <input id='autoGetQuestion' class='hotkey' type='checkbox'>
  31.         <label for='autoGetQuestion' class="slider"></label>
  32.         <label for='autoGetQuestion'>Auto Get Question</label>
  33.     </div>
  34.     <br>
  35.     <div class="hack-checkbox">
  36.         <input id='autoNextQuestion' class='hotkey' type='checkbox'>
  37.         <label for='autoNextQuestion' class="slider"></label>
  38.         <label for='autoNextQuestion'>Auto Next Question</label>
  39.     </div>
  40.     <br>
  41.     <div class='gamemode towerdefense' style='display:none;'>
  42.         <div class="hack-checkbox">
  43.             <label for='' style='text-decoration-line:underline'>Tower Defense</label>
  44.         </div>
  45.         <br>
  46.         <div class="hack-checkbox">
  47.             <label for='Health'>Health: </label>
  48.             <input id='Health' class='input-field'>
  49.         </div>
  50.         <br>
  51.         <div class="hack-checkbox">
  52.             <label for='Tokens'>Tokens: </label>
  53.             <input id='Tokens' class='input-field'>
  54.         </div>
  55.         <br>
  56.         <div class="hack-checkbox">
  57.             <label for='Damage'>Damage: </label>
  58.             <input id='Damage' class='input-field'>
  59.         </div>
  60.         <br>
  61.         <div class="hack-checkbox">
  62.             <label for='Round'>Round: </label>
  63.             <input id='Round' class='input-field'>
  64.         </div>
  65.         <br>
  66.         <div class="hack-checkbox">
  67.             <input id='autoNextRound' class='hotkey' type='checkbox'>
  68.             <label for='autoNextRound' class="slider"></label>
  69.             <label for='autoNextRound'>Auto Next Round</label>
  70.         </div>
  71.         <br>
  72.         <div class="hack-checkbox">
  73.             <input id='autoKillEnemies' class='hotkey' type='checkbox'>
  74.             <label for='autoKillEnemies' class="slider"></label>
  75.             <label for='autoKillEnemies'>Auto Kill Enemies</label>
  76.         </div>
  77.         <br>
  78.         <div class="hack-checkbox">
  79.             <input id='regeneratingHealth' class='hotkey' type='checkbox'>
  80.             <label for='regeneratingHealth' class="slider"></label>
  81.             <label for='regeneratingHealth'>Regenerating Health</label>
  82.         </div>
  83.         <br>
  84.         <div class="hack-checkbox">
  85.             <label id='maxtowers' class='button'>Max Towers</label>
  86.             <label id='killenemies' class='button'>Kill Enemies</label>
  87.         </div>
  88.         <br>
  89.     </div>
  90.     <div class='gamemode goldquest' style='display:block;'>
  91.         <div class="hack-checkbox">
  92.             <label for='' style='text-decoration-line:underline'>Gold Quest</label>
  93.         </div>
  94.         <br>
  95.         <div class="hack-checkbox">
  96.             <input id='alwaysTriple' class='hotkey' type='checkbox'>
  97.             <label for='alwaysTriple' class="slider"></label>
  98.             <label for='alwaysTriple'>Always Triple</label>
  99.         </div>
  100.         <br>
  101.         <div class="hack-checkbox">
  102.             <input id='autoRevealChests' class='hotkey' type='checkbox'>
  103.             <label for='autoRevealChests' class="slider"></label>
  104.             <label for='autoRevealChests'>Auto Reveal Chests</label>
  105.         </div>
  106.         <br>
  107.         <div class="hack-checkbox">
  108.             <label id='alltriple' class='button'>All Triple</label>
  109.             <label id='revealchests' class='button'>Reveal Chests</label>
  110.         </div>
  111.         <br>
  112.     </div>
  113. </div>
  114.  
  115. <style>
  116.     .gui2 {
  117.         width: 250px;
  118.         border-radius: 20px;
  119.         border: 2px solid #fff;
  120.         padding: 20px;
  121.         box-sizing: border-box;
  122.         display: flex;
  123.         flex-direction: column;
  124.         justify-content: space-around;
  125.         background: rgba(0, 0, 0, 0.5);
  126.         backdrop-filter: blur(8px);
  127.         animation: fadeIn 0.5s ease-out;
  128.         z-index: 9999999999;
  129.     }
  130.  
  131.     .hack-checkbox {
  132.         display: flex;
  133.         align-items: center;
  134.     }
  135.  
  136.     .hack-checkbox input[type='checkbox'] {
  137.         display: none;
  138.     }
  139.  
  140.     .hack-checkbox .slider {
  141.         position: relative;
  142.         width: 40px;
  143.         height: 20px;
  144.         background-color: #ccc;
  145.         border-radius: 20px;
  146.         cursor: pointer;
  147.     }
  148.  
  149.     .hack-checkbox .slider:before {
  150.         position: absolute;
  151.         content: "";
  152.         height: 16px;
  153.         width: 16px;
  154.         left: 2px;
  155.         bottom: 2px;
  156.         background-color: #fff;
  157.         border-radius: 50%;
  158.         transition: 0.4s;
  159.     }
  160.  
  161.     input[type='checkbox']:checked + .slider:before {
  162.         transform: translateX(20px);
  163.     }
  164.  
  165.     input {
  166.  
  167.     }
  168.  
  169.     .hack-checkbox label {
  170.         margin-left: 10px;
  171.         color: #fff;
  172.         font-family: Arial, sans-serif;
  173.     }
  174.  
  175.     .slider-controls {
  176.         display: flex;
  177.         flex-direction: column;
  178.         gap: 10px;
  179.     }
  180.  
  181.     .slider-controls label {
  182.         color: #fff;
  183.         font-family: Arial, sans-serif;
  184.     }
  185.  
  186.     .slider-controls input[type='range'] {
  187.         width: 100%;
  188.         -webkit-appearance: none;
  189.         height: 5px;
  190.         border-radius: 10px;
  191.         background: #bbb;
  192.         outline: none;
  193.         opacity: 0.7;
  194.         -webkit-transition: .2s;
  195.         transition: opacity .2s;
  196.     }
  197.  
  198.     .slider-controls input[type='range']::-webkit-slider-thumb {
  199.         -webkit-appearance: none;
  200.         appearance: none;
  201.         width: 20px;
  202.         height: 20px;
  203.         border-radius: 50%;
  204.         background: #fff;
  205.         cursor: pointer;
  206.     }
  207.  
  208.     .slider-controls input[type='range']::-moz-range-thumb {
  209.         width: 20px;
  210.         height: 20px;
  211.         border-radius: 50%;
  212.         background: #fff;
  213.         cursor: pointer;
  214.     }
  215.  
  216.     .slider-controls output {
  217.         color: #fff;
  218.         font-family: Arial, sans-serif;
  219.     }
  220.  
  221.     .button {
  222.         cursor: pointer;
  223.         background: rgba(0, 0, 0, .2);
  224.         border-radius: 15px;
  225.         padding: 5px;
  226.     }
  227.  
  228.     .input-field {
  229.   width: 25px;
  230.   padding: 10px;
  231.   border: 1px solid #ccc;
  232.   border-radius: 5px;
  233.   font-size: 16px;
  234.   outline: none;
  235.         height: .05px;
  236. }
  237.  
  238. .input-field:focus {
  239.   border-color: dodgerblue;
  240.   box-shadow: 0 0 5px rgba(0, 0, 255, 0.5);
  241. }
  242.  
  243. .input-field::placeholder {
  244.   color: #aaa;
  245. }
  246. </style>
  247. \`);
  248. var config = {
  249.     utils: {
  250.         enemySpeedMult: 1
  251.     },
  252.     global: {
  253.         autoAnswer: false,
  254.         autoGetQuestions: false,
  255.         autoNextQuestion: false
  256.     },
  257.     TowerDefense: {
  258.         health: null,
  259.         tokens: null,
  260.         damage: null,
  261.         round: null,
  262.         enemySpeedMultiplier: 1,
  263.         autoNextRound: false,
  264.         autoKillEnemies: false,
  265.         regeneratingHealth: false,
  266.         maxAllTowers: function() {
  267.             getFuncs().towers.forEach(tower => {
  268.                 tower.damage = 10000;
  269.                 tower.level = 10000;
  270.                 tower.range = 10000;
  271.             });
  272.         },
  273.         clearEnemies: function() {
  274.             getFuncs().enemies.forEach(enemy => {
  275.                 enemy.health = 0;
  276.                 enemy.alive = false;
  277.             });
  278.         },
  279.         get health() {
  280.             return getFuncs().state.health;
  281.         },
  282.         get tokens() {
  283.             return getFuncs().state.tokens;
  284.         },
  285.         get damage() {
  286.             return getFuncs().dmg;
  287.         },
  288.         get round() {
  289.             return getFuncs().state.round;
  290.         },
  291.         set health(t) {
  292.             getFuncs().state.health = t;
  293.         },
  294.         set tokens(t) {
  295.             getFuncs().state.tokens = t;
  296.         },
  297.         set damage(t) {
  298.             getFuncs().dmg = t;
  299.         },
  300.         set round(t) {
  301.             getFuncs().state.round = t;
  302.         },
  303.         get enemySpeedMultiplier() {
  304.             return config.utils.enemySpeedMult
  305.         },
  306.         set enemySpeedMultiplier(t) {
  307.             config.utils.enemySpeedMult = t;
  308.             getFuncs().enemies.forEach(enemy => {
  309.                 enemy.speed = enemy.speed * t;
  310.             });
  311.         }
  312.     },
  313.     GoldQuest: {
  314.         autoRevealChests: false,
  315.         alwaysTriple: false,
  316.         revealChests: function() {
  317.             let i = 0;
  318.             document.querySelectorAll('img[class*="chest"]').forEach(e => {
  319.                 e.parentElement.textContent = getFuncs().state.choices[i].text;
  320.                 i++
  321.             });
  322.         },
  323.         makeAllChestsTriple: function() {
  324.             getFuncs().state.choices.forEach(t => {
  325.                 t.type = 'multiply';
  326.                 t.val = 3;
  327.                 t.text = 'Triple Gold!';
  328.                 t.blook = 'Unicorn';
  329.             });
  330.         }
  331.     },
  332.     GameMode: null,
  333.     get GameMode() {
  334.       return window.location.host.split('.')[0];
  335.     }
  336. };
  337. if (!Object.prototype.filter) {
  338.   Object.defineProperty(Object.prototype, 'filter', {
  339.     value: function(callback, thisArg) {
  340.       const filteredObj = {};
  341.       for (const key in this) {
  342.         if (this.hasOwnProperty(key) && callback.call(thisArg, this[key], key, this)) {
  343.           filteredObj[key] = this[key];
  344.         };
  345.       };
  346.       return filteredObj;
  347.     },
  348.     enumerable: false,
  349.     writable: true,
  350.     configurable: true
  351.   });
  352. };
  353. function getFuncs() {
  354.     return Object.values(document.querySelector('#app > div > div'))[1]?.children[1]?._owner?.stateNode;
  355. };
  356. document.querySelectorAll('.gamemode').forEach(e => {
  357.  
  358. });
  359. if (Array.from(document.querySelectorAll('.gamemode')).filter(t => t.style.display == 'block').length == 0) {
  360.     try {
  361.         document.querySelector(\`.\${config.GameMode}\`).style.display = 'block';
  362.     } catch (error) {
  363.         console.log('cheat for this specific gamemode hasn\\'t been created or you are not in a match right now');
  364.    };
  365. };
  366. var f, r = true;
  367. function a() {
  368.    if (r) {
  369.        f = requestAnimationFrame(a);
  370.        if (config.global.autoAnswer && document.querySelector('div[class*="questionText"]')) {
  371.            try {
  372.                Array.from(document.querySelectorAll('div[class*="answerText"]')).filter(t => t.firstChild.textContent == getFuncs().memoizedState.question.correctAnswers[0])[1].click();
  373.            } catch (error) {
  374.                Array.from(document.querySelectorAll('div[class*="answerText"]')).filter(t => t.firstChild.textContent == getFuncs().state.question.correctAnswers[0])[1].click();
  375.            };
  376.        };
  377.        if (config.global.autoGetQuestions && document.querySelector('div[class*="modalButton"]')?.firstChild) document.querySelector('div[class*="modalButton"]')?.firstChild.click();
  378.        if (config.global.autoNextQuestion && document.querySelector('div[class*="nextText"]')) document.querySelector('div[class*="nextText"]').click();
  379.    };
  380.    switch (config.GameMode) {
  381.        case 'towerdefense':
  382.            if (getFuncs()?.state) {
  383.                if (config.TowerDefense.regeneratingHealth && getFuncs().state.health < 100000) getFuncs().state.health = 100000;
  384.                if (config.TowerDefense.autoNextRound && document.querySelector('#nextRound')) nextRound.click();
  385.                if (config.TowerDefense.autoKillEnemies && getFuncs().enemies) config.TowerDefense.clearEnemies();
  386.            };
  387.        case 'goldquest':
  388.            if (getFuncs()?.state) {
  389.                if (config.GoldQuest.alwaysTriple) {
  390.                    if (getFuncs()?.state?.choices.length == 3) {
  391.                        config.GoldQuest.makeAllChestsTriple();
  392.                    };
  393.                };
  394.                if (config.GoldQuest.autoRevealChests) {
  395.                    if (getFuncs()?.state?.choices.length == 3) {
  396.                        config.GoldQuest.revealChests();
  397.                    };
  398.                };
  399.            };
  400.    };
  401. };
  402. try {
  403.    a();
  404. } catch (error) {
  405.    r = false;
  406.    cancelAnimationFrame(f);
  407.    console.log(error);
  408. };
  409.  
  410. document.getElementById('enemySpeedMultiplier').addEventListener('input', function() {
  411.    config.TowerDefense.enemySpeedMultiplier = parseFloat(this.value);
  412. });
  413.  
  414. document.getElementById('autoAnswer').addEventListener('change', function() {
  415.    config.global.autoAnswer = this.checked;
  416. });
  417.  
  418. document.getElementById('autoGetQuestion').addEventListener('change', function() {
  419.    config.global.autoGetQuestions = this.checked;
  420. });
  421.  
  422. document.getElementById('autoNextQuestion').addEventListener('change', function() {
  423.    config.global.autoNextQuestion = this.checked;
  424. });
  425.  
  426. document.getElementById('Health').addEventListener('input', function() {
  427.    config.TowerDefense.health = parseFloat(this.value);
  428. });
  429.  
  430. document.getElementById('Tokens').addEventListener('input', function() {
  431.    config.TowerDefense.tokens = parseFloat(this.value);
  432. });
  433.  
  434. document.getElementById('Damage').addEventListener('input', function() {
  435.    config.TowerDefense.damage = parseFloat(this.value);
  436. });
  437.  
  438. document.getElementById('Round').addEventListener('input', function() {
  439.    config.TowerDefense.round = parseFloat(this.value);
  440. });
  441.  
  442. document.getElementById('autoNextRound').addEventListener('change', function() {
  443.    config.TowerDefense.autoNextRound = this.checked;
  444. });
  445.  
  446. document.getElementById('autoKillEnemies').addEventListener('change', function() {
  447.    config.TowerDefense.autoKillEnemies = this.checked;
  448. });
  449.  
  450. document.getElementById('regeneratingHealth').addEventListener('change', function() {
  451.    config.TowerDefense.regeneratingHealth = this.checked;
  452. });
  453.  
  454. document.getElementById('alwaysTriple').addEventListener('change', function() {
  455.    config.GoldQuest.alwaysTriple = this.checked;
  456. });
  457.  
  458. document.getElementById('autoRevealChests').addEventListener('change', function() {
  459.    config.GoldQuest.autoRevealChests = this.checked;
  460. });
  461.  
  462. document.getElementById('maxtowers').addEventListener('click', function() {
  463.    config.TowerDefense.maxAllTowers();
  464. });
  465.  
  466. document.getElementById('killenemies').addEventListener('click', function() {
  467.    config.TowerDefense.clearEnemies();
  468. });
  469.  
  470. document.getElementById('alltriple').addEventListener('click', function() {
  471.    config.GoldQuest.makeAllChestsTriple();
  472. });
  473.  
  474. document.getElementById('revealchests').addEventListener('click', function() {
  475.    config.GoldQuest.revealChests();
  476. });
  477.  
  478. document.querySelector('.gui2').style.display = 'block';
  479.  
  480. document.addEventListener('keyup', (e) => {
  481.    if (e.key == '\`') {
  482.        document.querySelector('.gui2').style.display = document.querySelector('.gui2').style.display == 'none' ? 'block' : 'none';
  483.    };
  484. });
  485. `;
  486. }, 1000);
  487. console.log(w)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement