Advertisement
Guest User

ProMcHacks slither.io hack

a guest
Apr 17th, 2016
9,913
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.85 KB | None | 0 0
  1. // ==UserScript==
  2. // @name GabyGaming
  3. // @namespace GabyGaming
  4. // @version 0.1.4
  5. // @description slither.io MOD
  6. // @author GabyGaming
  7. // @match http://slither.io/*
  8. // @updateURL http://ogario.ovh/download/SLITio.user.js
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function(w) {
  13. var renderMode = 2, // 2 - normal, 1 - simple (mobile)
  14. gameFPS = null,
  15. positionHUD = null,
  16. fpsHUD = null,
  17. ipHUD = null,
  18. styleHUD = "color: #FFF; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 14px; position: fixed; opacity: 0.35; z-index: 100;",
  19. clearedBg = false,
  20. clearedGlow = false;
  21. function init() {
  22. // Append DIVs
  23. appendDiv("position-hud", "nsi", styleHUD + "right: 30; bottom: 120px;");
  24. appendDiv("fps-hud", "nsi", styleHUD + "right: 30; bottom: 140px;");
  25. appendDiv("ip-hud", "nsi", styleHUD + "right: 30; bottom: 8;");
  26. positionHUD = document.getElementById("position-hud");
  27. fpsHUD = document.getElementById("fps-hud");
  28. ipHUD = document.getElementById("ip-hud");
  29. // Add zoom
  30. if (/firefox/i.test(navigator.userAgent)) {
  31. document.addEventListener("DOMMouseScroll", zoom, false);
  32. } else {
  33. document.body.onmousewheel = zoom;
  34. }
  35. // Hijack console log
  36. if (window.console) {
  37. window.console.logOld = console.log;
  38. window.console.log = getConsoleLog;
  39. }
  40. // Set game
  41. setGame();
  42. // Clear background and glow
  43. clearBg();
  44. // Update game
  45. updateGame();
  46. }
  47. // Append DIV
  48. function appendDiv(id, className, style) {
  49. var div = document.createElement("div");
  50. if (id) {
  51. div.id = id;
  52. }
  53. if (className) {
  54. div.className = className;
  55. }
  56. if (style) {
  57. div.style = style;
  58. }
  59. document.body.appendChild(div);
  60. }
  61. // Zoom
  62. function zoom(e) {
  63. if (!w.gsc) {
  64. return;
  65. }
  66. w.gsc *= Math.pow(0.9, e.wheelDelta / -120 || e.detail || 0);
  67. }
  68. // Get console log
  69. function getConsoleLog(log) {
  70. window.console.logOld(log);
  71. if (log.indexOf("FPS") != -1) {
  72. gameFPS = log;
  73. }
  74. }
  75. // Set game
  76. function setGame() {
  77. if (w.render_mode && w.render_mode != renderMode) {
  78. w.render_mode = renderMode;
  79. }
  80. if (w.high_quality) {
  81. w.high_quality = false;
  82. }
  83. if (w.gla && w.gla != 0) {
  84. w.gla = 0;
  85. }
  86. }
  87. // Clear background and glow
  88. function clearBg() {
  89. if (clearedBg && clearedGlow) {
  90. return;
  91. }
  92. if (w.ii && !clearedBg) {
  93. w.ii.src = "";
  94. w.ii.onload = null;
  95. w.ii = null;
  96. if (w.bgi2) {
  97. w.bgi2 = null;
  98. }
  99. clearedBg = true;
  100. }
  101. if (w.ggbg) {
  102. w.ggbg = false;
  103. }
  104. if (w.gbgi && !clearedGlow) {
  105. w.gbgi.src = "";
  106. w.gbgi.onload = null;
  107. w.gbgi = null;
  108. if (w.gbgmc) {
  109. w.gbgmc = null;
  110. }
  111. clearedGlow = true;
  112. }
  113. setTimeout(clearBg, 50);
  114. }
  115. // Update game
  116. function updateGame() {
  117. if (positionHUD) {
  118. positionHUD.textContent = "X: " + (~~w.view_xx || 0) + " Y: " + (~~w.view_yy || 0);
  119. }
  120. if (fpsHUD && gameFPS) {
  121. fpsHUD.textContent = gameFPS;
  122. }
  123. if (ipHUD && w.bso) {
  124. ipHUD.textContent = "IP: " + w.bso.ip + ":" + w.bso.po;
  125. }
  126. setGame();
  127. setTimeout(updateGame, 500);
  128. }
  129. // Init
  130. init();
  131. })(window);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement