ghiwar

auto add frinds by sugestions fb mobile

Dec 1st, 2023 (edited)
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Ambil semua elemen dengan class yang diberikan
  2. var buttons = document.querySelectorAll('._54k8._52jg._56bs._26vk._40x9._8yzt._56bu');
  3.  
  4. // Fungsi untuk menghasilkan angka acak antara min dan max (inklusif)
  5. function getRandomInt(min, max) {
  6.   return Math.floor(Math.random() * (max - min + 1)) + min;
  7. }
  8.  
  9. // Fungsi untuk mengklik tombol secara bergantian dengan jeda acak antara 1-8 detik
  10. function clickButtonsSequentially() {
  11.   var index = 0;
  12.   var clicksCount = 0;
  13.  
  14.   function clickNextButton() {
  15.     if (index < buttons.length) {
  16.       buttons[index].click();
  17.       index++;
  18.       clicksCount++;
  19.  
  20.       if (clicksCount % 10 === 0) {
  21.         // Jika sudah melakukan 10 klik, tambahkan jeda selama 5 menit (300,000 ms)
  22.         setTimeout(function () {
  23.           clickNextButton();
  24.         }, 300000);
  25.       } else {
  26.         // Jika belum mencapai 10 klik, lanjutkan dengan jeda acak antara 1-8 detik
  27.         var randomDelay = getRandomInt(1000, 5000);
  28.         setTimeout(clickNextButton, randomDelay);
  29.       }
  30.     }
  31.   }
  32.  
  33.   // Panggil fungsi untuk memulai pengklikan tombol secara bergantian
  34.   clickNextButton();
  35. }
  36.  
  37. // Panggil fungsi untuk memulai pengklikan tombol secara bergantian
  38. clickButtonsSequentially();
Add Comment
Please, Sign In to add comment