Guest User

Untitled

a guest
Aug 13th, 2023
545
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.    (async function() {
  2.  
  3.    let times = 2; //how many times to buy this, if you have something else than x1 set on line 27 then multiply your x by how many times you enter here, i.e. x25 * 28 = 700 packs will be bought provided you have enough currency
  4.  
  5.  let db;
  6. const openOrCreateDB = window.indexedDB.open('localforage', 2);
  7. openOrCreateDB.addEventListener('success', async () => {
  8.   console.log('Successfully opened DB');
  9.   db = openOrCreateDB.result;
  10.   const objectStore = db.transaction('keyvaluepairs').objectStore('keyvaluepairs');
  11.   objectStore.openCursor().addEventListener('success', async (e) => {
  12.  
  13.     const pointer = e.target.result;
  14.     if(pointer) {
  15.         console.log(1);
  16.       var script_bearer = JSON.parse(JSON.parse(pointer.value).auth).token;
  17.     }
  18.      
  19.  
  20.   for (let i=0;i<times;i++) {
  21.     const response1 = await fetch('https://api.lootboy.de/v1/loots/PACK_ID/bundle-purchase?lang=en', {
  22.         method: 'POST',
  23.       headers: {
  24. 'Host': 'api.lootboy.de',
  25. 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/113.0',
  26. 'Accept': 'application/json',
  27. 'Accept-Language': 'en',
  28. 'Accept-Encoding': 'gzip, deflate, br',
  29. 'content-type': 'application/json',
  30. 'authorization': 'Bearer '+script_bearer,
  31. 'Origin': 'https://www.lootboy.de',
  32. 'DNT': '1',
  33. 'Connection': 'keep-alive',
  34. 'Sec-Fetch-Dest': 'empty',
  35. 'Sec-Fetch-Mode': 'cors',
  36. 'Sec-Fetch-Site': 'same-site',
  37. 'Content-Length': '0',
  38. 'TE': 'trailers'},
  39. "body": "{\"application\":\"web\",\"vendor\":\"internal\",\"vendorData\":{},\"paymentData\":{},\"useFallback\":false,\"bundle\":\"x25\"}" //you can change x25 to x1 x5 x10
  40.     })
  41.  
  42.     const data = await response1.json();
  43.  
  44.     console.log(data);
  45.   }
  46. });
  47.   });
  48.  
  49. })();
Advertisement
Comments
Add Comment
Please, Sign In to add comment