Freebit Auto roll

Auto roll

  1. // ==UserScript==
  2. // @name Freebit Auto roll
  3. // @namespace
  4. // @description Auto roll
  5. // @author ALEN
  6. // @include https://freebitco.in/*
  7. // @run-at document-end
  8. // @grant GM_addStyle
  9. // @grant GM_getResourceURL
  10. // @grant GM_xmlhttpRequest
  11. // @grant unsafeWindow
  12. // @version 2.5
  13. // @credit
  14. // @namespace https://greasyfork.org/users/937752
  15. // ==/UserScript==
  16. //Please use my Referal-Link https://freebitco.in/?r=3471838 Thanks
  17. var timer = undefined;
  18. var counter = 0;
  19. var remain = 60*6;
  20. function try_roll()
  21. {
  22. var x = document.querySelector("#free_play_form_button"),
  23. myRP = document.getElementsByClassName("user_reward_points"),
  24. y = document.getElementById("bonus_container_free_lott"),
  25. z = document.getElementById("bonus_container_fp_bonus");
  26. console.log("Detect if we can roll");
  27. document.title="Can we roll?";
  28.  
  29. if(x && x.style["display"] != "none")
  30. {
  31. console.log("Rolling...");
  32. document.title="Rooling...";
  33. x.click();
  34. remain = 606;
  35. counter = 0;
  36. }
  37. }
  38. function count_up()
  39. {
  40. counter = counter + 1;
  41. if(counter >= remain)
  42. {
  43. location.reload();
  44. }
  45. try_roll();
  46. }
  47. function auto_roll()
  48. {
  49. if(document.location.href.indexOf("freebitco.in") == -1)
  50. return;
  51. try_roll();
  52. timer = setInterval(count_up, 101000); /* 1 minutes */
  53. }
  54. setTimeout(function(){
  55. auto_roll();
  56. }, 3000);