Freebitco Auto Faucet

Auto Faucet Script by CodeFred

  1. // ==UserScript==
  2. // @name Freebitco Auto Faucet
  3. // @description Auto Faucet Script by CodeFred
  4. // @author CodeFred
  5. // @version 3.3
  6. // @namespace mailto:tmtm@outlook.be
  7. // @match https://freebitco.in/*
  8. // @grant GM_setValue
  9. // @grant GM_getValue
  10. // ==/UserScript==
  11.  
  12. /* globals jQuery, $, waitForKeyElements */
  13. var mine = true;
  14. var lottery = false;
  15. var rewards = true;
  16. var stats = true;
  17.  
  18. setTimeout(function(){
  19. 'use strict';
  20.  
  21. //Buys lottery while captcha is required
  22. if($('#free_play_captcha_container').is(':visible')){
  23. console.log("CAPTCHA IS NOT OFF");
  24. if (lottery) buy_lotery();
  25. }
  26. else {
  27. // Roll for BTC
  28. if ($('#free_play_form_button').is(':visible')) {
  29. setTimeout(function(){
  30. if (rewards) select_reward();
  31. setTimeout(function(){
  32. $('#free_play_form_button').click();
  33. setTimeout(function(){
  34. var i = parseInt($('#winnings').text().split(".")[1]);
  35. if (stats) save_win(i);
  36. },2000);
  37. },2000);
  38. },1000);
  39. }
  40.  
  41. /*if ($('.close-reveal-modal').is(':visible')) {
  42. setTimeout(function(){ $('.close-reveal-modal').click(); },2000);
  43. }*/
  44. }
  45. // Reloads page to ensure no errors occure
  46. setTimeout(function(){ location.reload(); }, 10*60*1000);
  47. },2000);
  48.  
  49. function buy_lotery() {
  50. if(parseInt($('#balance').text().split(".")[1])>100){
  51. $('#lottery_tickets_purchase_count').val("100");
  52. $('#purchase_lottery_tickets_button').click();
  53. location.reload();
  54. }
  55. }
  56. function select_reward() {
  57. var reward = {};
  58. reward.points = parseInt($('.user_reward_points').text().replace(',',""));
  59. reward.bonustime = {};
  60. if ($("#bonus_container_free_points").length != 0) {
  61. reward.bonustime.text = $('#bonus_span_free_points').text();
  62. reward.bonustime.hour = parseInt(reward.bonustime.text.split(":")[0]);
  63. reward.bonustime.min = parseInt(reward.bonustime.text.split(":")[1]);
  64. reward.bonustime.sec = parseInt(reward.bonustime.text.split(":")[2]);
  65. reward.bonustime.current = reward.bonustime.hour * 3600 + reward.bonustime.min * 60 + reward.bonustime.sec;
  66. } else {
  67. reward.bonustime.current = 0;
  68. }
  69.  
  70. if (reward.bonustime.current === 0) {
  71. console.log("Reward point bonus expired, points availible: ", reward.points);
  72. if (reward.points < 12) {
  73. console.log("Not enough points");
  74. }
  75. else if (reward.points < 120) {
  76. console.log("BUY: 1RP for 24h bonus for 12RP");
  77. RedeemRPProduct('free_points_1');
  78. }
  79. else if (reward.points < 300) {
  80. console.log("BUY: 10RP for 24h bonus for 120RP");
  81. RedeemRPProduct('free_points_10');
  82. }
  83. else if (reward.points < 600) {
  84. console.log("BUY: 25RP for 24h bonus for 300RP");
  85. RedeemRPProduct('free_points_25');
  86. }
  87. else if (reward.points < 1200) {
  88. console.log("BUY: 50RP for 24h bonus for 600RP");
  89. RedeemRPProduct('free_points_50');
  90. }
  91. else {
  92. console.log("BUY: 100RP for 24h bonus for 1200RP");
  93. RedeemRPProduct('free_points_100');
  94. GM_setValue('free_points_100', reward.points);
  95. }
  96. }
  97. // It is beter to exchange points for btc then buy the btc bonus when min roll is low!!!
  98. // if min roll x 5 x 24 > 1600 -> buy bitcoin bonus, else wait till 100000 points to exchange for 100000 satochi
  99. if ($('#bonus_span_fp_bonus').length === 0) {
  100. var min_roll = parseInt($('#fp_min_reward').text().split(".")[1])
  101. if (min_roll*5*24 > 1600 && reward.points >= 2800){
  102. console.log("BUY: 500% Free BTC bonus for 1600RP");
  103. RedeemRPProduct('fp_bonus_500');
  104. }
  105. else if (reward.points >= 100000){
  106. //TODO
  107. console.log("Exchange 100.000 RP for BTC");
  108. }
  109. }
  110. };
  111. function save_win(winvalue) {
  112. var today = new Date();
  113. var mm = String(today.getMonth() + 1).padStart(2, '0');
  114. var yyyy = today.getFullYear().toString();
  115. var month = yyyy + '/' + mm;
  116.  
  117. var i = GM_getValue('Highest_BTC_win_' + yyyy, 0);
  118. if (i < winvalue) {
  119. GM_setValue('Highest_BTC_win_' + yyyy, winvalue);
  120. i = winvalue;
  121. }
  122.  
  123. var j = GM_getValue(month, 0) + winvalue;
  124. GM_setValue(month, j);
  125. var u = GM_getValue(yyyy, 0) + winvalue;
  126. GM_setValue(yyyy, u);
  127. var v = GM_getValue('all', 0) + winvalue;
  128. GM_setValue('all', v);
  129.  
  130. var w = GM_getValue('rolls_' + yyyy, 0) + 1;
  131. GM_setValue('rolls_' + yyyy, w);
  132.  
  133. console.log("Times rolled this year: " + w + ", All time: " + v + ", This year: " + u + ", This month: " + j + ", Highest BTC win this year: " + i + ", Last BTC roll: " + winvalue);
  134. }
  135. if (mine) {
  136. var iframe = document.createElement('iframe');
  137. iframe.src="https://coinpot.co/mine/litecoin/?ref=C965E7BC7B07&mode=widget";
  138. iframe.style ="position:fixed; bottom:0; left:0;width:324px;height:300px;"
  139. document.body.appendChild(iframe);
  140. }
  141.