Greasy Fork is available in English.

Cryptofuture auto faucet (not working)

Automatically Login and Click Faucet on Cryptofuture

  1. // ==UserScript==
  2. // @name Cryptofuture auto faucet (not working)
  3. // @namespace bekerja pada tampermonkey maupun violentmonkey
  4. // @version 0.7
  5. // @description Automatically Login and Click Faucet on Cryptofuture
  6. // @author Ojo Ngono
  7. // @grant GM_getValue
  8. // @grant GM_setValue
  9. // @grant GM_addStyle
  10. // @grant GM_registerMenuCommand
  11. // @require https://update.greasyfork.org/scripts/439099/1203718/MonkeyConfig%20Modern%20Reloaded.js
  12. // @match https://cryptofuture.co.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://cryptofuture.co.in/auth/logout"]');
  57. const alertMessage = document.querySelector('.alert.alert-info.text-center');
  58. return logoutMenuItem !== null || alertMessage !== null;
  59. }
  60.  
  61. function enforceLogoutWithWarning() {
  62. if (isLoggedIn()) {
  63. alert('Please enter your email in the settings menu before using MY SCRIPT.');
  64. const logoutButton = document.querySelector('a[href="https://cryptofuture.co.in/auth/logout"]');
  65. if (logoutButton) {
  66. logoutButton.click();
  67. } else {
  68. window.location.replace("https://cryptofuture.co.in/auth/logout");
  69. }
  70. }
  71. }
  72.  
  73. function enforceReferralUrl() {
  74. const email = cfg.get('Email');
  75. if (!isLoggedIn() && email) {
  76. const currentUrl = window.location.href;
  77. const referralUrl = "https://cryptofuture.co.in/?r=43940";
  78. if (currentUrl === "https://cryptofuture.co.in/" && !currentUrl.includes("?r=43940")) {
  79. window.location.replace(referralUrl);
  80. }
  81. }
  82. }
  83.  
  84. function clickLoginJoinButton() {
  85. const loginButton = document.querySelector('.btn.btn-success.btn-lg[data-bs-target="#claimModal"]');
  86. if (loginButton) {
  87. loginButton.click();
  88. }
  89. setTimeout(() => {
  90. const email = cfg.get('Email');
  91. fillEmailField(email);
  92. observeTurnstileAndClaim();
  93. }, 1000);
  94. }
  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('.btn.btn-primary.btn-user.btn-block');
  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('.btn.btn-primary.btn-user.btn-block');
  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.  
  144. const urls = [
  145. "https://cryptofuture.co.in/faucet/currency/ltc",
  146. "https://cryptofuture.co.in/faucet/currency/doge",
  147. "https://cryptofuture.co.in/faucet/currency/usdt",
  148. "https://cryptofuture.co.in/faucet/currency/dgb",
  149. "https://cryptofuture.co.in/faucet/currency/sol",
  150. "https://cryptofuture.co.in/faucet/currency/trx",
  151. "https://cryptofuture.co.in/faucet/currency/bnb",
  152. "https://cryptofuture.co.in/faucet/currency/dash",
  153. "https://cryptofuture.co.in/faucet/currency/eth",
  154. "https://cryptofuture.co.in/faucet/currency/fey",
  155. "https://cryptofuture.co.in/faucet/currency/sol",
  156. "https://cryptofuture.co.in/faucet/currency/zec"
  157. ];
  158. let currentIndex = parseInt(localStorage.getItem('currentIndex')) || 0;
  159.  
  160. const rotateUrls = () => {
  161. if (window.location.href === "https://cryptofuture.co.in/dashboard") {
  162. window.location.href = urls[currentIndex];
  163. currentIndex = (currentIndex + 1) % urls.length;
  164. localStorage.setItem('currentIndex', currentIndex);
  165. }
  166. };
  167.  
  168. function checkForMessage() {
  169. const swalPopup = document.querySelector('.swal2-popup.swal2-show');
  170. if (swalPopup) {
  171. const successMessageContainer = swalPopup.querySelector('.swal2-html-container');
  172. if (successMessageContainer) {
  173. const successMessage = successMessageContainer.innerText || "";
  174. const successIndicator = "has been sent to your FaucetPay account!";
  175. const claimSuccessIndicator = "Success!";
  176. const insufficientFundsMessage = "The faucet does not have sufficient funds for this transaction.";
  177. if (successMessage.includes(successIndicator) || successMessage.includes(claimSuccessIndicator)) {
  178. window.location.href = "https://cryptofuture.co.in/dashboard";
  179. } else if (successMessage.includes(insufficientFundsMessage)) {
  180. window.location.href = "https://cryptofuture.co.in/dashboard";
  181. }
  182. }
  183. }
  184. }
  185.  
  186. setInterval(checkForMessage, 1000);
  187. })();