Auto Click pepecoin

Automatically clicks ptc/shortlink/faucet on earn-pepe.com

  1. // ==UserScript==
  2. // @name Auto Click pepecoin
  3. // @namespace auto click ptc,shorlink,faucet
  4. // @version 0.2.2
  5. // @description Automatically clicks ptc/shortlink/faucet on earn-pepe.com
  6. // @author Ojo Ngono
  7. // @match https://earn-pepe.com/*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=earn-pepe.com
  9. // @license Copyright Ojo Ngono
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13.  
  14.  
  15.  
  16.  
  17. (function() {
  18. 'use strict';
  19.  
  20. function clickButton(selector, delay = 0) {
  21. const button = document.querySelector(selector);
  22. if (button) {
  23. setTimeout(() => button.click(), delay);
  24. }
  25. }
  26.  
  27. function randomDelay(min, max) {
  28. return Math.floor(Math.random() * (max - min + 1) + min);
  29. }
  30.  
  31. function solveCaptcha() {
  32. const captchaIcon = document.querySelector('.captcha-icon');
  33. if (captchaIcon) {
  34. const captchaClass = [...captchaIcon.classList].find(cls => cls.startsWith('fa-'));
  35. if (captchaClass) {
  36. const iconOptions = document.querySelectorAll('#icon-options .icon-option');
  37. for (const option of iconOptions) {
  38. if ([...option.classList].includes(captchaClass)) {
  39. option.click();
  40. return true;
  41. }
  42. }
  43. }
  44. }
  45. return false;
  46. }
  47.  
  48. function clickClaimButtonWithDelay() {
  49. const delay = randomDelay(2000, 4000); // Random delay between 2-4 seconds
  50. clickButton('button[type="submit"].btn-primary', delay);
  51. }
  52.  
  53. function startAdClickProcess() {
  54. clickButton('button.nav-link#pills-profile-tab[data-bs-toggle="pill"]');
  55. const checkExist = setInterval(() => {
  56. const viewAdButton = document.querySelector('#pills-profile a.btn.btn-info.text-white.w-100[onclick^="window.location.href="]');
  57. if (viewAdButton) {
  58. viewAdButton.click();
  59. clearInterval(checkExist);
  60. }
  61. }, 500);
  62. }
  63.  
  64. window.addEventListener('load', () => {
  65. startAdClickProcess();
  66. clickButton('#ctaButton');
  67. const interval = setInterval(() => {
  68. if (solveCaptcha()) {
  69. clearInterval(interval);
  70. clickClaimButtonWithDelay();
  71. }
  72. }, 1000);
  73.  
  74. // Click the button with classes "btn btn-lg btn-primary" with a random delay between 5-9 seconds
  75. const delay = randomDelay(5000, 9000); // Random delay between 5-9 seconds
  76. clickButton('.btn.btn-lg.btn-primary', delay);
  77. });
  78.  
  79. window.addEventListener('load', function() {
  80. const button = document.querySelector('a.btn.btn-info.text-white.w-100');
  81. if (button) button.click();
  82. }, false);
  83. })();