// ==UserScript== // @name Slither.io mod // @namespace http://kmcgurty.com // @version 1.1 // @description Mods a few things // @author Kmc - admin@kmcdeals.com // @match http://slither.io // @grant GM_addStyle // @noframes // ==/UserScript== var zoomNum = 0.9; var maxZoom = 2; var minZoom = 0.2; var zoomRate = 0.1; setInterval(function(){ if(zoomNum > maxZoom) { console.log("adding"); zoomNum -= 0.1; } else if(zoomNum < minZoom){ console.log("subrtacting") zoomNum += 0.1; } unsafeWindow.gsc = zoomNum; }, 50); function changeZoom(e) { if(zoomNum < maxZoom && zoomNum > minZoom){ var delta = (e.wheelDelta / Math.abs(e.wheelDelta)); zoomNum += zoomRate * delta; } } document.body.onmousewheel = changeZoom; appendInput(); function appendInput(){ var div = document.querySelector(".taho").parentElement; var html = `

`; var node = document.createElement('div'); node.innerHTML = html; node = node.children[0]; div.appendChild(node); } document.querySelector(".sadg1").addEventListener("click", function(){ var ipAddressInput = document.querySelector("#ip_address"); if(ipAddressInput.value != ""){ if(ipAddressInput.value != unsafeWindow.bso.ip){ unsafeWindow.bso.ip = ipAddressInput.value; unsafeWindow.connect(); } } else { ipAddressInput.value = unsafeWindow.bso.ip; } }); initStatsHTML(); function initStatsHTML(){ var node = document.createElement('div'); node.id = "stats"; document.body.appendChild(node); document.querySelector("iframe[src='/social-box/']").src = ""; var css = ` #stats-wrapper{ position: absolute; z-index: 7; background-color: rgba(40, 40, 40, .7); color: white; } `; GM_addStyle(css); } setInterval(function(){ if(unsafeWindow.playing){ var html = `

IP: ` + unsafeWindow.bso.ip + `
X: ` + Math.round(snake.xx) + `
Y: ` + Math.round(snake.yy) + `

`; var statsDiv = document.querySelector("#stats"); statsDiv.innerHTML = html; } }, 500);



Total de visitas: 36
Início