Chillfaucet.in auto faucet (not working)

Automatically Login and Click Faucet on Chillfaucet

  1. // ==UserScript==
  2. // @name Chillfaucet.in auto faucet (not working)
  3. // @namespace bekerja pada tampermonkey maupun violentmonkey
  4. // @version 0.3
  5. // @description Automatically Login and Click Faucet on Chillfaucet
  6. // @author Ojo Ngono
  7. // @grant GM_getValue
  8. // @grant GM_setValue
  9. // @grant GM_addStyle
  10. // @grant GM_registerMenuCommand
  11. // @require https://update.greatest.deepsurf.us/scripts/439099/1203718/MonkeyConfig%20Modern%20Reloaded.js
  12. // @match https://chillfaucet.in/*
  13. // @license Copyright OjoNgono
  14. // @antifeature referral-link Directs to a referral link when not logged in
  15. // ==/UserScript==
  16.  
  17. const cfg = new MonkeyConfig({
  18. title: 'Input Email Faucetpay:',
  19. menuCommand: true,
  20. params: {
  21. Email: {
  22. label: "Email Faucetpay",
  23. type: "text",
  24. default: ''
  25. },
  26. }
  27. });
  28.  
  29. (function() {
  30. 'use strict';
  31. window.addEventListener('load', () => {
  32. startProcess();
  33. });
  34.  
  35. function startProcess() {
  36. const email = cfg.get('Email');
  37. if (!email || email.trim() === '') {
  38. enforceLogoutWithWarning();
  39. return;
  40. } else {
  41. enforceReferralUrl();
  42. setTimeout(() => {
  43. if (!isLoggedIn()) {
  44. clickLoginJoinButton();
  45. } else {
  46. fillEmailField(email);
  47. rotateUrls();
  48. enforceReferralUrl();
  49. observeTurnstileAndClaim();
  50. }
  51. }, 1000);
  52. }
  53. }
  54.  
  55. function isLoggedIn() {
  56. const logoutMenuItem = document.querySelector('a[href="https://chillfaucet.in/auth/logout"]');
  57. const claimButton = document.querySelector('#subbutt');
  58. return logoutMenuItem !== null || claimButton !== null;
  59. }
  60.  
  61.  
  62. function enforceLogoutWithWarning() {
  63. if (isLoggedIn()) {
  64. alert('Please enter your email in the settings menu before using MY SCRIPT.');
  65. const logoutButton = document.querySelector('a[href="https://chillfaucet.in/auth/logout"]');
  66. if (logoutButton) {
  67. logoutButton.click();
  68. } else {
  69. window.location.replace("https://chillfaucet.in/auth/logout");
  70. }
  71. }
  72. }
  73.  
  74. function enforceReferralUrl() {
  75. const email = cfg.get('Email');
  76. if (!isLoggedIn() && email) {
  77. const currentUrl = window.location.href;
  78. const referralUrl = "https://chillfaucet.in/?r=13464";
  79. if (currentUrl === "https://chillfaucet.in/" && !currentUrl.includes("?r=13464")) {
  80. window.location.replace(referralUrl);
  81. }
  82. }
  83. }
  84.  
  85. function clickLoginJoinButton() {
  86. const loginButton = document.querySelector('a[data-target="#login"]');
  87. if (loginButton) {
  88. loginButton.click();
  89. }
  90. setTimeout(() => {
  91. const email = cfg.get('Email');
  92. fillEmailField(email);
  93. observeTurnstileAndClaim();
  94. }, 1000);
  95. }
  96.  
  97. function fillEmailField(email) {
  98. const emailInput = document.querySelector('#InputEmail');
  99. if (emailInput) {
  100. emailInput.value = email;
  101. emailInput.dispatchEvent(new Event('input', { bubbles: true }));
  102. }
  103. }
  104.  
  105. function observeTurnstileAndClaim() {
  106. const turnstileObserver = new MutationObserver(() => {
  107. const turnstileResponse = document.querySelector('input[name="cf-turnstile-response"]');
  108. const claimNowButton = document.querySelector('#subbutt');
  109. const modalSubmitButton = document.querySelector('.modal-footer button[type="submit"]');
  110.  
  111. if (turnstileResponse && turnstileResponse.value !== "") {
  112. if (claimNowButton) {
  113. claimNowButton.scrollIntoView({ behavior: 'smooth', block: 'center' });
  114. claimNowButton.click();
  115. }
  116. if (modalSubmitButton) {
  117. modalSubmitButton.scrollIntoView({ behavior: 'smooth', block: 'center' });
  118. modalSubmitButton.click();
  119. }
  120. turnstileObserver.disconnect();
  121. }
  122. });
  123.  
  124. const turnstileInput = document.querySelector('input[name="cf-turnstile-response"]');
  125. if (turnstileInput) {
  126. turnstileObserver.observe(turnstileInput, { attributes: true, attributeFilter: ['value'] });
  127. }
  128.  
  129. setTimeout(() => {
  130. const turnstileResponse = document.querySelector('input[name="cf-turnstile-response"]');
  131. const claimNowButton = document.querySelector('#subbutt');
  132. const modalSubmitButton = document.querySelector('.modal-footer button[type="submit"]');
  133.  
  134. if (turnstileResponse && turnstileResponse.value === "" && claimNowButton && claimNowButton.innerText.includes('Claim Now')) {
  135. claimNowButton.click();
  136. }
  137. if (modalSubmitButton) {
  138. modalSubmitButton.click();
  139. }
  140. }, 30000);
  141. }
  142.  
  143. const urls = [
  144. "https://chillfaucet.in/faucet/currency/ltc",
  145. "https://chillfaucet.in/faucet/currency/doge",
  146. "https://chillfaucet.in/faucet/currency/trx",
  147. "https://chillfaucet.in/faucet/currency/usdt",
  148. "https://chillfaucet.in/faucet/currency/dgb",
  149. "https://chillfaucet.in/faucet/currency/bnb",
  150. "https://chillfaucet.in/faucet/currency/eth",
  151. "https://chillfaucet.in/faucet/currency/sol",
  152. "https://chillfaucet.in/faucet/currency/fey",
  153. "https://chillfaucet.in/faucet/currency/bch",
  154. "https://chillfaucet.in/faucet/currency/ton",
  155. "https://chillfaucet.in/faucet/currency/tara",
  156. "https://chillfaucet.in/faucet/currency/ada",
  157. "https://chillfaucet.in/faucet/currency/matic",
  158. "https://chillfaucet.in/faucet/currency/usdc",
  159. "https://chillfaucet.in/faucet/currency/xlm",
  160. "https://chillfaucet.in/faucet/currency/xmr",
  161. "https://chillfaucet.in/faucet/currency/xrp",
  162. "https://chillfaucet.in/faucet/currency/dash",
  163. "https://chillfaucet.in/faucet/currency/zec"
  164. ];
  165. let currentIndex = parseInt(localStorage.getItem('currentIndex')) || 0;
  166.  
  167. const rotateUrls = () => {
  168. if (window.location.href === "https://chillfaucet.in/") {
  169. window.location.href = urls[currentIndex];
  170. currentIndex = (currentIndex + 1) % urls.length;
  171. localStorage.setItem('currentIndex', currentIndex);
  172. }
  173. };
  174.  
  175. function checkForMessage() {
  176. const swalPopup = document.querySelector('.swal2-popup.swal2-show');
  177. if (swalPopup) {
  178. const successMessageContainer = swalPopup.querySelector('.swal2-html-container');
  179. if (successMessageContainer) {
  180. const successMessage = successMessageContainer.innerText || "";
  181. const successIndicator = "has been sent to your FaucetPay account!";
  182. const claimSuccessIndicator = "Success!";
  183. const insufficientFundsMessage = "The faucet does not have sufficient funds for this transaction.";
  184. if (successMessage.includes(successIndicator) || successMessage.includes(claimSuccessIndicator)) {
  185. window.location.href = "https://chillfaucet.in/";
  186. } else if (successMessage.includes(insufficientFundsMessage)) {
  187. window.location.href = "https://chillfaucet.in/";
  188. }
  189. }
  190. }
  191. }
  192.  
  193. setInterval(checkForMessage, 1000);
  194. })();