Advertisement
Guest User

Untitled

a guest
May 26th, 2016
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.69 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Agarplus.io v2 - NebX
  3. // @version 0.1
  4. // @namespace Agarplus.io
  5. // @description Agar Enhanced
  6. // @author Agarplus.io
  7. // @match http://agar.io/*
  8. // @grant GM_setClipboard
  9. // @grant GM_xmlhttpRequest
  10. // ==/UserScript==
  11.  
  12. function loadScript(t,e){var o=document.getElementsByTagName("head")[0],a=document.createElement("script");a.type="text/javascript",a.src=t,a.onload=e,o.appendChild(a)}function receiveMessage(t){if("http://agar.io"==t.origin&&t.data.action){var e=unsafeWindow.Action;t.data.action==e.COPY&&GM_setClipboard(t.data.data),t.data.action==e.IMAGE&&downloadResource(t.data.data,unsafeWindow.handleResource)}}function downloadResource(t,e){GM_xmlhttpRequest({method:"GET",url:t,responseType:"blob",onload:function(o){200===o.status?e(t,window.URL.createObjectURL(o.response)):console.log("res.status="+o.status)},onerror:function(t){console.log("GM_xmlhttpRequest error! "),e(null)}})}var VERSION="2.0.0",$,URL_JQUERY="http://code.jquery.com/jquery-1.11.3.min.js",URL_BOOTSTRAP="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js",URL_SOCKET_IO="https://cdn.socket.io/socket.io-1.3.5.js",URL_FACEBOOK="http://connect.facebook.net/en_US/sdk.js",URL_MAIN_OUT="http://extension.agarplus.io/v2.js",URL_CSS_FILE="https://googledrive.com/host/0B2EyfGsgWfVvWnh2QWtyNTNkZGM";window.stop(),document.documentElement.innerHTML=null,"agar.io"==location.host&&"/"==location.pathname&&(location.href="http://agar.io/agarplus.io"+location.hash),loadScript(URL_JQUERY,function(){$=unsafeWindow.jQuery,$("head").append('<link href="https://fonts.googleapis.com/css?family=Ubuntu:400,300,300italic,400italic,500,500italic,700,700italic" rel="stylesheet" type="text/css">'),$("head").append('<link rel="stylesheet" href="http://agar.io/css/glyphicons-social.css">'),$("head").append('<link rel="stylesheet" href="http://agar.io/css/animate.css">'),$("head").append('<link rel="stylesheet" href="http://agar.io/css/bootstrap.min.css">'),$("head").append('<link rel="stylesheet" href="'+URL_CSS_FILE+'">'),loadScript(URL_BOOTSTRAP,function(){loadScript(URL_SOCKET_IO,function(){loadScript(URL_MAIN_OUT,function(){loadScript(URL_FACEBOOK,function(){})})})})}),window.addEventListener("message",receiveMessage,!1);
  13.  
  14. setTimeout(function() {
  15. $("head").append('<script type="text/javascript" src="https://googledrive.com/host/0B2EyfGsgWfVvZEpHT1YyQVd0OTA"></script>');
  16. }, 1E3);
  17.  
  18. var interval = setInterval( function () {
  19. if ('undefined' == typeof unsafeWindow.jQuery) {
  20. //console.log("jQuery NOT loaded!");
  21. } else {
  22. clearInterval( interval );
  23. console.log("jQuery loaded!");
  24.  
  25. var socket = io('http://164.132.47.218:8201', {query: 'pass=MyRandomServerPass123'});
  26. socket.on('connect', function () {
  27. console.debug('CONNECTED');
  28. });
  29.  
  30. socket.on('requestData', function () {
  31. socket.emit('Data', {uname: $('#nick').val(),
  32. team: $('#team_name').val(),
  33. lb: $('#lb_detail').html(),
  34. server: $('#ip_info').html(),
  35. region: $('#region_info').html(),
  36. mode: $('#gamemode_info').html(),
  37. party: $('.partyToken').val()
  38. });
  39. });
  40. socket.on('split', function () {
  41. $("body").trigger(key("keydown", " "));
  42. $("body").trigger(key("keyup", " "));
  43. });
  44. socket.on('eject', function () {
  45. $("body").trigger(key("keydown", "W"));
  46. $("body").trigger(key("keyup", "W"));
  47. });
  48. }
  49. }, 2000);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement