// ==UserScript== // @name FreeFaucet Soundman AutoROLL Bot // @namespace https://greasyfork.org/en/users/689247-soundman // @version 0.8 // @description AutoRoll Script for FreeCardano.com-freebitcoin.io-freenem.com-coinfaucet.io-freesteam.io-freetether.com-freeusdcoin.com-freebinancecoin.com-freeethereum.com-free-tron.com-freedash.io-freechainlink.io-freeneo.io-free-ltc.com-free-doge.com // @author Soundman // @match https://freecardano.com/free // @match https://freebitcoin.io/free // @match https://freenem.com/free // @match https://coinfaucet.io/free // @match https://freesteam.io/free // @match https://freetether.com/free // @match https://freeusdcoin.com/free // @match https://freebinancecoin.com/free // @match https://freeethereum.com/free // @match https://free-tron.com/free // @match https://freedash.io/free // @match https://freechainlink.io/free // @match https://freeneo.io/free // @match https://free-ltc.com/free // @match https://free-doge.com/free // @grant none // @create 2021-01-07 // @note 2021-01-20-Ver. 0.7 Added info on InfoPanel // @note 2021-01-18-Ver. 0.6 Bugfix // @note 2021-01-18-Ver. 0.5 Added info panel and cookies // @run-at document-end // @downloadURL none // ==/UserScript== var LOG_LEVEL=1; var script_version = GM_info.script.version; var currency=""; var total_executions = getCookie("executions"); var winning = getCookie("winning"); var last_win = getCookie("last_win"); if (! (total_executions > 0)) total_executions = 0; if (! (winning > 0)) winning = 0; if (! (last_win > 0)) last_win = 0; // CONFIG // var UPDATE_TITLE = true; //Show time remaining for next roll in the browser tab // END CONFIG // var title; (function() { 'use strict'; var minuti; var secondi; var t; title=document.title; console.log("%c[Debug] GetCurrency", 'color: grey'); currency=getCurrency(); // wait 5 seconds to get the page loaded. Needed by some single board computer setTimeout(function() { t=missingTime(); InfoPanel(); },5000) //Now wait 10 seconds to get the missing time loaded. setTimeout(function() { if (t[0]==0 && t[1]==0){ //time is past calling roll with random time from 1 to 10 seconds var rnd=random(1000,10000); console.log("%c[Debug] Calling Roll with rnd: "+rnd, 'color: grey'); setTimeout(function() {Roll();},rnd) } else{ //time is not past, reload the page at the end of timer var tt=0; tt=t[0]*60*1000; tt=tt+(t[1]*1000)+3000; console.log("%c[Debug] Calling reload with rnd: "+tt, 'color: grey'); setTimeout(function() { reload(); }, tt); if (UPDATE_TITLE){ setInterval(function(){ var tt=missingTime(); document.title=tt[0] + "m:" + tt[1] + "s " + title; }, 1000); } } },10000) })(); function InfoPanel(){ var Panel=''; var CSS=''; CSS = ''; Panel = '
'; Panel += '

FreeFaucet AutoROLL v.'+script_version+'

'; Panel += '
'; Panel += 'Executions: '+total_executions+'
'; Panel += 'Currency: '+currency+'
'; Panel += 'Script Total Win: '+winning+'
'; Panel += 'Script Last Win: '+last_win+'
'; Panel += '
'; Panel += '

'; Panel += '

'; Panel += '

Script Home Page: Home Page

'; Panel += '

This Script also work with free-doge.com - freecardano.com - freebitcoin.io - freenem.com - coinfaucet.io - freesteam.io - freetether.com - freeusdcoin.com - freebinancecoin.com - freeethereum.com - free-tron.com - freedash.io - freechainlink.io - freeneo.io - free-ltc.com

'; Panel += '

Donations are welcome, BTC addr: 3G5p78zeNaMKPndTfgXGW9swu5JcFqLMgQ - ©️ soundman 2021

'; Panel += '
'; var ss=document.createElement('div'); ss.innerHTML=CSS+Panel; //console.log(ss.innerHTML); document.getElementsByClassName("free")[0].prepend(ss); } function getCurrency(){ return document.getElementsByClassName("navbar-coins bg-1")[0].innerText.split(" ")[1]; } function getResult(){ console.log("%c[Debug] getResult!!", 'color: grey'); var a= document.getElementsByClassName("result")[0].innerText.split(" ")[3]; console.log("%c[Debug] result: " + a, 'color: grey'); last_win = parseFloat(a); winning =parseFloat(winning) + parseFloat(last_win); setCookie('winning', winning.toFixed(8), 7); setCookie('last_win', last_win.toFixed(8), 7); } function random(min,max){ return min + (max - min) * Math.random(); } function reload(){ location.reload(); } function Roll(){ console.log("%c[Debug] ROLL!!", 'color: grey'); if (document.getElementsByClassName("main-button-2 roll-button bg-2")[0].parentElement.style.display!="none"){ document.getElementsByClassName("main-button-2 roll-button bg-2")[0].click() total_executions++; setCookie('executions', total_executions, 7); } setTimeout(function(){ getResult(); }, 8000); var rnd=random(10000,20000); setTimeout(function(){ location.reload(); }, rnd); console.log("%c[Debug] Reload in " + rnd , 'color: grey'); } function missingTime () { var minuti=""; minuti=document.getElementsByClassName("timeout-container")[0].getElementsByClassName("minutes")[0].getElementsByClassName("digits")[0].innerText var secondi=""; secondi=document.getElementsByClassName("timeout-container")[0].getElementsByClassName("seconds")[0].getElementsByClassName("digits")[0].innerText if (LOG_LEVEL==0) console.log("%c[Debug] [missingTime]: "+minuti +":"+secondi , 'color: grey'); //console.log("%c[Debug] [missingTime] string secondi: "+secondi, 'color: grey'); if (minuti != "" && secondi!="" ){ return [minuti,secondi]; } else{return [0,0];} } function getCookie(cname) { var name = cname + "="; var decodedCookie = decodeURIComponent(document.cookie); var ca = decodedCookie.split(';'); for(var i = 0; i