Slither.io mod

Mods a few things

  1. // ==UserScript==
  2. // @name Slither.io mod
  3. // @namespace http://kmcgurty.com
  4. // @version 1.1
  5. // @description Mods a few things
  6. // @author Kmc - admin@kmcdeals.com
  7. // @match http://slither.io
  8. // @grant GM_addStyle
  9. // @noframes
  10. // ==/UserScript==
  11.  
  12. var zoomNum = 0.9;
  13. var maxZoom = 2;
  14. var minZoom = 0.2;
  15. var zoomRate = 0.1;
  16.  
  17. setInterval(function(){
  18. if(zoomNum > maxZoom) {
  19. console.log("adding");
  20. zoomNum -= 0.1;
  21. } else if(zoomNum < minZoom){
  22. console.log("subrtacting")
  23. zoomNum += 0.1;
  24. }
  25.  
  26. unsafeWindow.gsc = zoomNum;
  27. }, 50);
  28.  
  29. function changeZoom(e) {
  30. if(zoomNum < maxZoom && zoomNum > minZoom){
  31. var delta = (e.wheelDelta / Math.abs(e.wheelDelta));
  32. zoomNum += zoomRate * delta;
  33. }
  34. }
  35.  
  36. document.body.onmousewheel = changeZoom;
  37.  
  38. appendInput();
  39. function appendInput(){
  40. var div = document.querySelector(".taho").parentElement;
  41. var html = `<div class="taho" id="nick_holder" style="width: 244px; margin-top: 34px; box-shadow: rgb(0, 0, 0) 0px 6px 50px; opacity: 1; background: rgb(76, 68, 124);">
  42. <input class="sumsginp" id="ip_address" style="width: 220px; height: 24px;" placeholder="IP Address" maxlength="24">
  43. </div>`;
  44. var node = document.createElement('div');
  45. node.innerHTML = html;
  46. node = node.children[0];
  47.  
  48. div.appendChild(node);
  49. }
  50.  
  51. document.querySelector(".sadg1").addEventListener("click", function(){
  52. var ipAddressInput = document.querySelector("#ip_address");
  53.  
  54. if(ipAddressInput.value != ""){
  55. if(ipAddressInput.value != unsafeWindow.bso.ip){
  56. unsafeWindow.bso.ip = ipAddressInput.value;
  57. unsafeWindow.connect();
  58. }
  59. } else {
  60. ipAddressInput.value = unsafeWindow.bso.ip;
  61. }
  62. });
  63.  
  64. initStatsHTML();
  65. function initStatsHTML(){
  66. var node = document.createElement('div');
  67. node.id = "stats";
  68.  
  69. document.body.appendChild(node);
  70.  
  71. document.querySelector("iframe[src='/social-box/']").src = "";
  72.  
  73. var css = `
  74. #stats-wrapper{
  75. position: absolute;
  76. z-index: 7;
  77. background-color: rgba(40, 40, 40, .7);
  78. color: white;
  79. }
  80. `;
  81.  
  82. GM_addStyle(css);
  83. }
  84.  
  85. setInterval(function(){
  86. if(unsafeWindow.playing){
  87. var html = `
  88. <div id="stats-wrapper">
  89. IP: ` + unsafeWindow.bso.ip + `<br>
  90. X: ` + Math.round(snake.xx) + `<br>
  91. Y: ` + Math.round(snake.yy) + `<br>
  92. <button onclick="window.connect()">Respawn</button>
  93. </div>
  94. `;
  95.  
  96. var statsDiv = document.querySelector("#stats");
  97. statsDiv.innerHTML = html;
  98. }
  99. }, 500);

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址