JOOTAA

Untitled

Dec 11th, 2018
533
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.95 KB | None | 0 0
  1. // ==UserScript==
  2. // @name roba datos
  3. // @namespace https://CloneSmasher.ml
  4. // @version 1
  5. // @description Best agar clone bots for free!
  6. // @author Sh0T
  7. // @match *.prosplit.io/*
  8. // @match *.biome3d.com/*
  9. // @match *.cellcraft.io/*
  10. // @match *.agarz.com/*
  11. // @match *.targ.io/*
  12. // @match *.agario0.com/*
  13. // @match *.agar.bio/*
  14. // @match *.popsplit.us/*
  15. // @match *.army.ovh/web/*
  16. // @match *.neybots.ga/web/*
  17. // @match *.agario-play.com/*
  18. // @match *.agarserv.com/system/client_last/index2.php*
  19. // @match *.agar.pro/play/*
  20. // @match *.qwoks.ga/play/*
  21. // @match *.agariobox.org/*
  22. // @match *.3rb.be/*
  23. // @match *.agarmin.co.nf/*
  24. // @match *.agario.se/*
  25. // @match *.ogar.be/*
  26. // @match *.senpa.io/*
  27. // @match *.agar.red/*
  28. // @match *.nbkio.com/
  29. // @match *.togarcell.gq/web/*
  30. // @match *.cellcraft.io/*
  31. // @match *
  32. // @match *.petridish.pw/en/*
  33. // @match *.ogarz.ovh/*
  34. // @match *.cell.sh/*
  35. // @match *.agariomachos.com/*
  36. // @match *.agario.metin2force.com/*
  37. // @match *.army.ovh/web/*
  38. // @match *.agariohub.net/client/*
  39. // @match *.agarmin.co.nf/*
  40. // @match *.agario.se/*
  41. // @match *.agar.io/*
  42. // @match *.agar.pro/play/*
  43. // @match *.ogar.be/*
  44. // @match *.agar.tv/minions/*
  45. // @match *.germs.io/*
  46. // @match *.agariopvt.com/*
  47. // @match *.togarcell.gq/web/*
  48. // @grant none
  49. // ==/UserScript==
  50. window.botConfig = {
  51. botSplit: 'x', // change e to any key you want!
  52. botFeed: 'c', // change r to any key you want!
  53. botStart: 'z', // change = to any key you want!
  54. botSendMessage: 'o',
  55. botServer: 'clonesmasher.com' // keep it as localhost unless you are using vps!
  56. };
  57. window.agarServer = 'none';
  58. window.started = false;
  59. window.pelletMode = false;
  60. window._ws = null;
  61. (function() {
  62. 'use strict';
  63. function bufToArray(buf) {
  64. var ab = [];
  65. for (var i = 0; i < buf.byteLength; i++) {
  66. ab.push(buf.getUint8(i, true));
  67. }
  68. return ab;
  69. }
  70. function toArrayBuffer(buf) {
  71. var ab = new ArrayBuffer(buf.length);
  72. var view = new Uint8Array(ab);
  73. for (var i = 0; i < buf.length; ++i) {
  74. view[i] = buf[i];
  75. }
  76. return ab;
  77. }
  78. connect();
  79. function connect() {
  80. window._ws = new WebSocket('wss://' + 'clonesmasher.com' + ':8888?origin=' + location.origin + '&token=' + Math.floor(Math.random() * 100000));
  81. window._ws.binaryType = 'arraybuffer';
  82. window._ws.onclose = onclose;
  83. window._ws.onopen = onopen;
  84. window._ws._send = window._ws.send;
  85. window._ws.send = send;
  86. console.log('Connecting!');
  87. }
  88. function onopen() {
  89. console.log('Connected!');
  90. let buf = new DataView(new ArrayBuffer(1 + 2 * window.agarServer.length));
  91. let offset = 0;
  92. buf.setUint8(offset++, 3);
  93. for (let i = 0; i < window.agarServer.length; i++) {
  94. buf.setUint16(offset, window.agarServer.charCodeAt(i), true);
  95. offset += 2;
  96. }
  97. window._ws.send(buf);
  98. }
  99. function send(e) {
  100. if (window._ws.readyState === window._ws.OPEN) window._ws._send(e);
  101. }
  102. function onclose(e) {
  103. //console.log(e.reason);
  104. if (e.reason !== 'FULL')
  105. connect();
  106. else
  107. alert('Agar Clone Smasher server is currently full!');
  108. }
  109. WebSocket.prototype.realSend = WebSocket.prototype.send;
  110. WebSocket.prototype.send = function(pkt) {
  111. this.realSend(pkt);
  112. if (this.url.indexOf(window.botConfig.botServer) !== -1) return;
  113. if (pkt instanceof ArrayBuffer) pkt = new DataView(pkt);
  114. else if (pkt instanceof DataView) pkt = pkt;
  115. else pkt = new DataView(toArrayBuffer(pkt));
  116. switch (pkt.getUint8(0, true)) {
  117. case 16:
  118. window._ws.send(pkt);
  119. break;
  120. case 254:
  121. window.pkt254 = bufToArray(pkt);
  122. var buf = new DataView(new ArrayBuffer(1 + pkt.byteLength));
  123. buf.setUint8(0, 254);
  124. buf.setUint8(1, pkt.getUint8(0));
  125. for (var i = 0; i < pkt.byteLength; i++) {
  126. buf.setUint8(i + 1, pkt.getUint8(i));
  127. }
  128. window._ws.send(buf);
  129. break;
  130. case 255:
  131. window.pkt255 = bufToArray(pkt);
  132. buf = new DataView(new ArrayBuffer(1 + pkt.byteLength));
  133. buf.setUint8(0, 255);
  134. buf.setUint8(1, pkt.getUint8(0));
  135. for (var i = 0; i < pkt.byteLength; i++) {
  136. buf.setUint8(i + 1, pkt.getUint8(i));
  137. }
  138. window._ws.send(buf);
  139. break;
  140. }
  141. };
  142. var _WebSocket = WebSocket;
  143. WebSocket = function(ip) {
  144. if (ip.indexOf(window.botConfig.botServer) == -1) {
  145. window.agarServer = ip;
  146. let buf = new DataView(new ArrayBuffer(1 + 2 * ip.length));
  147. let offset = 0;
  148. buf.setUint8(offset++, 3);
  149. for (let i = 0; i < ip.length; i++) {
  150. buf.setUint16(offset, ip.charCodeAt(i), true);
  151. offset += 2;
  152. }
  153. window._ws.send(buf);
  154. return new _WebSocket(ip);
  155. } else
  156. return new _WebSocket(ip);
  157. };
  158. function isTyping() {
  159. return $("input:focus").length;
  160. }
  161. document.addEventListener('keyup', key => {
  162. key = key.key.toLowerCase();
  163. if (isTyping()) return;
  164. switch (key) {
  165. case window.botConfig.botSendMessage.toLowerCase():
  166. var msg = prompt('What do you want the bots to say?', '');
  167. if (!msg) break;
  168. var buf = new DataView(new ArrayBuffer(1 + 2 * msg.length));
  169. var offset = 0;
  170. buf.setUint8(offset++, 99);
  171. for (var i = 0; i < msg.length; i++) {
  172. buf.setUint16(offset, msg.charCodeAt(i), true);
  173. offset += 2;
  174. }
  175. window._ws.send(buf);
  176. break;
  177. case window.botConfig.botStart.toLowerCase():
  178. if (window.started)
  179. window._ws.send(new Uint8Array([1]));
  180. else
  181. window._ws.send(new Uint8Array([0]));
  182. window.started = !window.started;
  183. break;
  184. }
  185. });
  186. document.addEventListener('keydown', key => {
  187. key = key.key.toLowerCase();
  188. if (isTyping()) return;
  189. switch (key) {
  190. case window.botConfig.botSplit.toLowerCase():
  191. window._ws.send(new Uint8Array([2, 0]));
  192. break;
  193. case window.botConfig.botFeed.toLowerCase():
  194. window._ws.send(new Uint8Array([2, 1]));
  195. break;
  196. }
  197. });
  198. })();
Add Comment
Please, Sign In to add comment