AgarB13

Slitherextension

Apr 12th, 2016
301
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.27 KB | None | 0 0
  1. // ==UserScript==
  2. // @name SLITio by szymy
  3. // @namespace slitio.szymy
  4. // @version 0.1.9
  5. // @description slither.io MOD
  6. // @author szymy
  7. // @match http://slither.io/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. // Source: http://ogario.ovh/download/SLITio.user.js
  12.  
  13. !function(e){function t(){s(),n("position-hud","nsi",h+"right: 30; bottom: 120px;"),n("ip-hud","nsi",h+"right: 30; bottom: 150px;"),n("fps-hud","nsi",h+"right: 30; bottom: 170px;"),y=document.getElementById("position-hud"),m=document.getElementById("ip-hud"),b=document.getElementById("fps-hud"),/firefox/i.test(navigator.userAgent)?document.addEventListener("DOMMouseScroll",o,!1):document.body.onmousewheel=o,e.console&&(e.console.logOld=console.log,e.console.log=l),i(),r(),c()}function n(e,t,n){var o=document.createElement("div");e&&(o.id=e),t&&(o.className=t),n&&(o.style=n),document.body.appendChild(o)}function o(t){e.gsc&&(e.gsc*=Math.pow(.9,t.wheelDelta/-120||t.detail/2||0))}function l(t){e.console.logOld(t),-1!=t.indexOf("FPS")&&(p=t)}function i(){var t=document.getElementById("login");if(t){var n=document.createElement("div");n.style.width="260px",n.style.color="#8058D0",n.style.backgroundColor="#1e262e",n.style.borderRadius="29px",n.style.fontFamily="'Lucida Sans Unicode', 'Lucida Grande', sans-serif",n.style.fontSize="14px",n.style.textAlign="center",n.style.margin="0 auto",n.style.padding="10px 14px",n.innerHTML="MOD: <strong>SLITio by szymy</strong> | <strong>"+u+"</strong>",t.appendChild(n);var o=document.createElement("div");o.style.color="#8058D0",o.style.backgroundColor="#4C447C",o.style.borderRadius="29px",o.style.margin="10 auto",o.style.padding="8px",n.appendChild(o);var l=document.createElement("input");l.id="server-ip",l.type="text",l.placeholder="Server IP",l.style.height="24px",l.style.display="inline-block",l.style.background="none",l.style.color="#e0e0ff",l.style.border="none",l.style.outline="none",o.appendChild(l);var d=document.createElement("input");d.id="connect-btn",d.type="button",d.value="Play",d.style.height="24px",d.style.display="inline-block",d.style.borderRadius="12px",d.style.color="#FFF",d.style.backgroundColor="#56ac81",d.style.border="none",d.style.outline="none",d.style.cursor="pointer",d.style.padding="0 10px",o.appendChild(d);var o=document.createElement("div");o.style.backgroundColor="#A5A5A5",o.style.borderRadius="29px",o.style.margin="10 auto",o.style.padding="8px",n.appendChild(o);var r=document.createElement("select");r.id="select-graph",r.style.background="none",r.style.border="none",r.style.outline="none",o.appendChild(r);var s=document.createElement("option");s.value="2",s.text="Graphics: optimized",r.appendChild(s);var s=document.createElement("option");s.value="1",s.text="Graphics: low",r.appendChild(s),n.innerHTML+='<a href="https://www.youtube.com/channel/UCaWiPNJWnhzYDrBQoXokn6w" target="_blank" style="color: #FFF; opacity: 0.35;">YT Channel</a> | ',n.innerHTML+='<a href="http://ogario.ovh" target="_blank" style="color: #FFF; opacity: 0.35;">ogario.ovh</a>',x=document.getElementById("server-ip");var c=document.getElementById("select-graph");c.selectedIndex=1==g?1:0,c.onchange=function(){var t=c.value;e.console.logOld(t),t&&(g=t)};var p=document.getElementById("connect-btn");p.onclick=a}else setTimeout(i,100)}function d(){return e.connecting?void setTimeout(d,1e3):void(e.forcing=!1)}function a(){if(0!=x.value.length&&e.connect){e.forcing=!0,e.bso||(e.bso={});var t=x.value.trim().split(":");e.bso.ip=t[0],e.bso.po=t[1],e.connect(),setTimeout(d,1e3)}}function r(){e.render_mode&&e.render_mode!=g&&(e.render_mode=g),e.high_quality&&(e.high_quality=!1),e.gla&&0!=e.gla&&(e.gla=0)}function s(){v&&f||(e.ii&&!v&&(e.ii.src="",e.ii.onload=null,e.ii=null,e.bgi2&&(e.bgi2=null),v=!0),e.ggbg&&(e.ggbg=!1),e.gbgi&&!f&&(e.gbgi.src="",e.gbgi.onload=null,e.gbgi=null,e.gbgmc&&(e.gbgmc=null),f=!0),setTimeout(s,40))}function c(){r(),e.playing&&(y&&(y.textContent="X: "+(~~e.view_xx||0)+" Y: "+(~~e.view_yy||0)),b&&p&&(b.textContent=p),x&&e.bso&&C!=e.bso.ip+":"+e.bso.po&&(C=e.bso.ip+":"+e.bso.po,x.value=C,m&&(m.textContent="IP: "+C))),setTimeout(c,1e3)}var u="v0.1.9",g=2,p=null,y=null,m=null,b=null,h="color: #FFF; font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; font-size: 14px; position: fixed; opacity: 0.35; z-index: 7;",v=!1,f=!1,x=null,C=null;t()}(window);
Add Comment
Please, Sign In to add comment