Agar.io clone bots! And .io Bots 2021!

The best bots for agario clones! NOW OPEN SOURCED!

当前为 2021-10-06 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Agar.io clone bots! And .io Bots 2021!
  3. // @namespace Bots
  4. // @version v.18
  5. // @description The best bots for agario clones! NOW OPEN SOURCED!
  6. // @author Tatsuya & Raze
  7. // @match *.es.agar.live/*
  8. // @match *.aquar.io/*
  9. // @match *.agarz.com/*
  10. // @match *.oceanar.io/*
  11. // @match *.agarabi.net/*
  12. // @match *.agarblack.com/*
  13. // @match *.tr.agar.live/*
  14. // @match *.agar-io.live/*
  15. // @match *.agars.live/*
  16. // @match *.www.inciagario.net/*
  17. // @match *.agariott.com/*
  18. // @match *.agarr.live/*
  19. // @match *.agar.live/*
  20. // @match *.agario.zafer2.com/*
  21. // @match *.agario.work/*
  22. // @match *.agario.network/*
  23. // @match *.agar.rip/*
  24. // @match *.agar.chat/*
  25. // @match *.agario.nl/*
  26. // @match *.agariomoddedserver.com/*
  27. // @match *.agario.in/*
  28. // @match *.agario.id/*
  29. // @match *.agarplay.club/*
  30. // @match *.agariomodded.com/*
  31. // @match *.bestagario.org/*
  32. // @match *.agarprivateserver.com/*
  33. // @match *.agariohub.cc/*
  34. // @match *.agarr.live/*
  35. // @match *.agarprivateservers.org/*
  36. // @match *.agar.cc/*
  37. // @match *.agario.one/*
  38. // @match *.agar.team/*
  39. // @match *.agar.club/*
  40. // @match *.agarprivateservers.net/*
  41. // @match *.agario.tube/*
  42. // @match *.agarprivateserver.com/*
  43. // @match *.agario.cc/*
  44. // @match *.easyagario.icu/*
  45. // @match *.agario.red/*
  46. // @run-at document-end
  47. // @icon https://static.wikia.nocookie.net/jacksepticeye/images/2/2e/Agar.io_logo.png/revision/latest?cb=20190228055524
  48. // @grant none
  49. // ==/UserScript==
  50.  
  51. class User {
  52. constructor() {
  53. this.BotAmount = 0;
  54. this.botamt = 0;
  55. window.started = false;
  56. this.verify();
  57. }
  58.  
  59. verify() {
  60. // Removed verify code.
  61. this.addEssentials();
  62. }
  63.  
  64. powerlineinject() {
  65. // removed.
  66. }
  67.  
  68. addEssentials() {
  69. var parseOrigin = /(\w+)\:\/\/(\w+.\w+)/gi.exec(window.location.origin)[2];
  70. this.inject();
  71. this.HookInfo();
  72. if(parseOrigin == "oceanar.io") {
  73. this.addOceanarUI();
  74. } else if(parseOrigin == "aquar.io") {
  75. this.addAquarUI();
  76. } else {
  77. this.addUI();
  78. }
  79. }
  80.  
  81. addAquarUI() {
  82. let cssStyles = document.createElement('head');
  83. let ui = document.createElement('div');
  84. ui.id = 'botcanvas';
  85. ui.style.background = 'rgba(0, 0, 0, 0.7)';
  86. ui.style.top = '-8px';
  87. ui.style.left = '-8px';
  88. ui.style.display = 'block';
  89. ui.style.position = 'absolute';
  90. ui.style['text-align'] = 'center';
  91. ui.style['font-size'] = '15px';
  92. ui.style.color = '#FFFFFF';
  93. ui.style.padding = '12px';
  94. ui.style['padding-right'] = '12px';
  95. ui.style['padding-top'] = '9px';
  96. ui.style['padding-bottom'] = '9px';
  97. ui.style.margin = '1%';
  98. ui.style['z-index'] = '1000000';
  99. ui.style['.sides'] = '12px';
  100. ui.style.border = '2px solid #ffffff';
  101. cssStyles.innerHTML +=
  102. '<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script><script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script><link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">';
  103. ui.innerHTML +=
  104. '<div id="tzfst">.io Bots!</div> <div id="u2ub1">Discord.gg/bAstbAfem9</div> <div id="u2ub1eqe">Loading...</div> <input type="submit" value="Start" div id = "Startbots"> <input type="submit" value="Stop" div id = "Stopbots">';
  105. document.body.appendChild(ui);
  106. var styles = `
  107. #fname {
  108. padding: 4px 0px;
  109. margin: 0 0 5px;
  110. width: 120px;
  111. }
  112. #u2ub1eqe {
  113. margin: 0 0 5px;
  114. font-family: Ubuntu;
  115. font-weight: bold;
  116. font-size: 15px;
  117. margin-top: 0px;
  118. color: #00ff00;
  119. }
  120. #u2ub1 {
  121. margin: 1px 0 5px;
  122. font-family: Ubuntu;
  123. font-weight: bold;
  124. font-size: 13px;
  125. COLOR: #afafb6;
  126. cursor: pointer;
  127. }
  128. #tzfst {
  129. font-family: Ubuntu;
  130. font-weight: bold;
  131. font-size: 15px;
  132. COLOR: WHITE;
  133. }
  134. #Startbots {
  135. margin: 1px 0 5px;
  136. border: none;
  137. padding: 1px 16px;
  138. border-radius: 4px;
  139. background-color: #4CAF50;
  140. color: white;
  141. cursor: pointer;
  142. }
  143. #Stopbots {
  144. margin: 1px 0 5px;
  145. border: none;
  146. padding: 1px 16px;
  147. border-radius: 4px;
  148. background-color: #DA2600;
  149. color: white;
  150. cursor: pointer;
  151. }
  152. `
  153. var styleSheet = document.createElement("style")
  154. styleSheet.type = "text/css"
  155. styleSheet.innerText = styles
  156. document.head.appendChild(styleSheet);
  157. document.getElementById('Startbots').onclick = () => {
  158. if(!window.started) {
  159. startBots();
  160. }
  161. };
  162. document.getElementById('Stopbots').onclick = () => {
  163. if(window.started == true) {
  164. stopBots();
  165. }
  166. };
  167. document.getElementById('u2ub1').onclick = () => {
  168. location.href = 'https://discord.gg/bAstbAfem9';
  169. };
  170. setInterval(() => {
  171. document.getElementById('u2ub1eqe').innerText = `${this.botamt}/${this.BotAmount}`;
  172. }, 1000);
  173. }
  174.  
  175. addOceanarUI() {
  176. let cssStyles = document.createElement('head');
  177. let ui = document.createElement('div');
  178. ui.id = 'botcanvas';
  179. ui.style.background = 'rgba(0, 0, 0, 0.7)';
  180. ui.style.top = '-8px';
  181. ui.style.left = '-8px';
  182. ui.style.display = 'block';
  183. ui.style.position = 'absolute';
  184. ui.style['text-align'] = 'center';
  185. ui.style['font-size'] = '15px';
  186. ui.style.color = '#FFFFFF';
  187. ui.style.padding = '12px';
  188. ui.style['padding-right'] = '12px';
  189. ui.style['padding-top'] = '9px';
  190. ui.style['padding-bottom'] = '9px';
  191. ui.style.margin = '1%';
  192. ui.style['z-index'] = '1000000';
  193. ui.style['.sides'] = '12px';
  194. ui.style.border = '2px solid #ffffff';
  195. cssStyles.innerHTML +=
  196. '<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script><script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script><link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">';
  197. ui.innerHTML +=
  198. '<div id="tzfst">.io Bots!</div> <div id="u2ub1">Discord.gg/bAstbAfem9</div> <div id="u2ub1eqe">Loading...</div> <input type="text" div id="fname" name="firstname" placeholder="Bot name..."><br> <input type="submit" value="Start" div id = "Startbots"> <input type="submit" value="Stop" div id = "Stopbots">';
  199. document.body.appendChild(ui);
  200. var styles = `
  201. #fname {
  202. padding: 4px 0px;
  203. margin: 0 0 5px;
  204. width: 120px;
  205. }
  206. #u2ub1eqe {
  207. margin: 0 0 5px;
  208. font-family: Ubuntu;
  209. font-weight: bold;
  210. font-size: 15px;
  211. margin-top: 0px;
  212. color: #00ff00;
  213. }
  214. #u2ub1 {
  215. margin: 1px 0 5px;
  216. font-family: Ubuntu;
  217. font-weight: bold;
  218. font-size: 13px;
  219. COLOR: #afafb6;
  220. cursor: pointer;
  221. }
  222. #tzfst {
  223. font-family: Ubuntu;
  224. font-weight: bold;
  225. font-size: 15px;
  226. COLOR: WHITE;
  227. }
  228. #Startbots {
  229. margin: 1px 0 5px;
  230. border: none;
  231. padding: 1px 16px;
  232. border-radius: 4px;
  233. background-color: #4CAF50;
  234. color: white;
  235. cursor: pointer;
  236. }
  237. #Stopbots {
  238. margin: 1px 0 5px;
  239. border: none;
  240. padding: 1px 16px;
  241. border-radius: 4px;
  242. background-color: #DA2600;
  243. color: white;
  244. cursor: pointer;
  245. }
  246. `
  247. var styleSheet = document.createElement("style")
  248. styleSheet.type = "text/css"
  249. styleSheet.innerText = styles
  250. document.head.appendChild(styleSheet);
  251. document.getElementById('Startbots').onclick = () => {
  252. if(!window.started) {
  253. startBots();
  254. }
  255. };
  256. document.getElementById('Stopbots').onclick = () => {
  257. if(window.started == true) {
  258. stopBots();
  259. }
  260. };
  261. document.getElementById('u2ub1').onclick = () => {
  262. location.href = 'https://discord.gg/bAstbAfem9';
  263. };
  264. setInterval(() => {
  265. document.getElementById('u2ub1eqe').innerText = `${this.botamt}/${this.BotAmount}`;
  266. }, 1000);
  267. }
  268.  
  269. addUI() {
  270. let cssStyles = document.createElement('head');
  271. let ui = document.createElement('div');
  272. ui.id = 'botcanvas';
  273. ui.style.background = 'rgba(0, 0, 0, 0.7)';
  274. ui.style.top = '-8px';
  275. ui.style['border-radius'] = '3px';
  276. ui.style.left = '-8px';
  277. ui.style.display = 'block';
  278. ui.style.position = 'absolute';
  279. ui.style['text-align'] = 'center';
  280. ui.style['font-size'] = '15px';
  281. ui.style.color = '#FFFFFF';
  282. ui.style.padding = '7px';
  283. ui.style['padding-right'] = '7px';
  284. ui.style['padding-top'] = '7px';
  285. ui.style['padding-bottom'] = '7px';
  286. ui.style.margin = '1%';
  287. ui.style['z-index'] = '1000000';
  288. ui.style['.sides'] = '12px';
  289. ui.style.border = '2px solid #ffffff';
  290. cssStyles.innerHTML +=
  291. '<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script><script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script><link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">';
  292. ui.innerHTML +=
  293. '<div id="tzfst">Clone Bots</div> <div id="u2ub1">Discord.gg/bAstbAfem9</div> <div id="u2ub1eqe">Loading...</div> <input type="text" div id="fname" name="firstname" placeholder="Bot name..."><br> <input type="submit" value="Start" div id = "Startbots"> <input type="submit" value="Stop" div id = "Stopbots">';
  294. document.body.appendChild(ui);
  295. var styles = `
  296. #fname {
  297. color: #808080;
  298. border: 2px solid WHITE;
  299. border-radius: 4px;
  300. box-sizing: border-box;
  301. padding: 0px 0px;
  302. margin: 0 0 5px;
  303. width: 120px;
  304. }
  305. #u2ub1eqe {
  306. margin: 0 0 4px;
  307. font-family: Ubuntu;
  308. font-weight: bold;
  309. font-size: 15px;
  310. margin-top: 0px;
  311. color: #00ff00;
  312. }
  313. #u2ub1 {
  314. margin: -8px 0px 0px;
  315. font-family: Ubuntu;
  316. font-weight: bold;
  317. font-size: 13px;
  318. COLOR: rgb(182, 186, 183);
  319. cursor: pointer;
  320. }
  321. #tzfst {
  322. margin: -5px 0px 0px;
  323. font-family: Ubuntu;
  324. font-weight: bold;
  325. font-size: 15px;
  326. COLOR: WHITE;
  327. }
  328. #Startbots {
  329. margin: 1px 0 -7px;
  330. border: none;
  331. padding: 1px 22px;
  332. border-radius: 3px;
  333. background-color: #4CAF50;
  334. color: white;
  335. cursor: pointer;
  336. }
  337. #Stopbots {
  338. margin: 1px 0 -7px;
  339. border: none;
  340. padding: 1px 22px;
  341. border-radius: 3px;
  342. background-color: #DA2600;
  343. color: white;
  344. cursor: pointer;
  345. }
  346. `
  347. var styleSheet = document.createElement("style")
  348. styleSheet.type = "text/css"
  349. styleSheet.innerText = styles
  350. document.head.appendChild(styleSheet);
  351. document.getElementById('Startbots').onclick = () => {
  352. if(!window.started) {
  353. startBots();
  354. }
  355. };
  356. document.getElementById('Stopbots').onclick = () => {
  357. if(window.started == true) {
  358. stopBots();
  359. }
  360. };
  361. document.getElementById('u2ub1').onclick = () => {
  362. location.href = 'https://discord.gg/bAstbAfem9';
  363. };
  364. setInterval(() => {
  365. document.getElementById('u2ub1eqe').innerText = `${this.botamt}/${this.BotAmount}`;
  366. }, 1000);
  367. }
  368. HookInfo() {
  369. window.addEventListener('keypress', (event) => {
  370. switch(event.key) {
  371. case 'e':
  372. window.split();
  373. break;
  374. case 'r':
  375. window.eject();
  376. break;
  377. case 'm':
  378. //window.chat();
  379. break;
  380. }
  381. });
  382. let parseOrigin = /(\w+)\:\/\/(\w+.\w+)/gi.exec(window.location.origin)[2];
  383. if(parseOrigin == 'tr.agar' || parseOrigin == 'agars.live' || parseOrigin == 'agarr.live' || parseOrigin == 'agarplay.club' || parseOrigin ==
  384. 'es.agar' || parseOrigin == 'agar.live' || parseOrigin == 'agar-io') {
  385. this.BotAmount = 65;
  386. } else if(parseOrigin == "www.inciagario" || parseOrigin == "agariott.com") {
  387. this.BotAmount = 10;
  388. } else if(parseOrigin == "oceanar.io" || parseOrigin == "aquar.io") {
  389. this.BotAmount = 100;
  390. } else if(parseOrigin == "agario.zafer2") {
  391. this.BotAmount = 70;
  392. } else {
  393. this.BotAmount = 60;
  394. }
  395. }
  396. inject() {
  397. let parseOrigin = /(\w+)\:\/\/(\w+.\w+)/gi.exec(window.location.origin)[2];
  398. if(parseOrigin == "aquar.io") {
  399. WebSocket.prototype.reaSend = WebSocket.prototype.send;
  400. WebSocket.prototype.send = function(pkt) {
  401. this.reaSend(pkt);
  402. if(typeof pkt == 'string') return;
  403. if(this.url.includes('localhost')) return;
  404. if(pkt instanceof ArrayBuffer) pkt = new DataView(pkt);
  405. else if(pkt instanceof DataView) pkt = pkt;
  406. else pkt = new DataView(pkt.buffer);
  407. let offset = 0;
  408. switch(pkt.getUint8(0, true)) {
  409. case 14:
  410. window.mousepos = pkt.buffer;
  411. break;
  412. }
  413. window.CurrentWs = this.url;
  414. }
  415. } else if(parseOrigin == "www.inciagario" || parseOrigin == "agariott.com") {
  416. WebSocket.prototype.reaSend = WebSocket.prototype.send;
  417. WebSocket.prototype.send = function(pkt) {
  418. this.reaSend(pkt);
  419. if(typeof pkt == 'string') return;
  420. if(this.url.includes('localhost')) return;
  421. if(pkt instanceof ArrayBuffer) pkt = new DataView(pkt);
  422. else if(pkt instanceof DataView) pkt = pkt;
  423. else pkt = new DataView(pkt.buffer);
  424. let offset = 0;
  425. switch(pkt.getUint8(0, true)) {
  426. case 104:
  427. window.xpos = pkt.getFloat64(1, true);
  428. window.ypos = pkt.getFloat64(9, true);
  429. break;
  430. }
  431. window.CurrentWs = this.url;
  432. }
  433. } else if(parseOrigin == "oceanar.io") {
  434. WebSocket.prototype.reaSend = WebSocket.prototype.send;
  435. WebSocket.prototype.send = function(pkt) {
  436. this.reaSend(pkt);
  437. if(typeof pkt == 'string') return;
  438. if(this.url.includes('localhost')) return;
  439. if(pkt instanceof ArrayBuffer) pkt = new DataView(pkt);
  440. else if(pkt instanceof DataView) pkt = pkt;
  441. else pkt = new DataView(pkt.buffer);
  442. let offset = 0;
  443. switch(pkt.getUint8(0, true)) {
  444. case 5:
  445. window.mousepos = pkt.buffer;
  446. break;
  447. }
  448. window.CurrentWs = this.url;
  449. }
  450. } else {
  451. console.log("Using default inject.");
  452. WebSocket.prototype.reaSend = WebSocket.prototype.send;
  453. WebSocket.prototype.send = function(pkt) {
  454. this.reaSend(pkt);
  455. if(typeof pkt == 'string') return;
  456. if(this.url.includes('localhost')) return;
  457. if(pkt instanceof ArrayBuffer) pkt = new DataView(pkt);
  458. else if(pkt instanceof DataView) pkt = pkt;
  459. else pkt = new DataView(pkt.buffer);
  460. let offset = 0;
  461. switch(pkt.getUint8(0, true)) {
  462. case 16:
  463. window.xpos = pkt.getFloat64(1, true);
  464. window.ypos = pkt.getFloat64(9, true);
  465. break;
  466. }
  467. window.CurrentWs = this.url;
  468. }
  469. }
  470. }
  471. }
  472.  
  473. function startBots() {
  474. if(window.started == false) {
  475. window.bots = [];
  476. console.log("Starting Bots...");
  477. let parseOrigin = /(\w+)\:\/\/(\w+.\w+)/gi.exec(window.location.origin)[2];
  478. console.log(parseOrigin);
  479. if(parseOrigin == 'tr.agar' || parseOrigin == 'agars.live' || parseOrigin == 'agarr.live' || parseOrigin == 'agarplay.club' || parseOrigin ==
  480. 'es.agar' || parseOrigin == 'agar.live' || parseOrigin == 'agar-io') {
  481. setInterval(() => {
  482. this.bots.push(new AgarLive());
  483. }, 4000);
  484. window.started = true;
  485. } else if(parseOrigin == 'www.inciagario' || parseOrigin == "agariott.com") {
  486. for(let i = 0; i < usr.BotAmount; i++) {
  487. this.bots.push(new Inci());
  488. }
  489. window.started = true;
  490. } else if(parseOrigin == 'agarz.com') {
  491. for(let i = 0; i < usr.BotAmount; i++) {
  492. this.bots.push(new Agarz());
  493. }
  494. window.started = true;
  495. } else if(parseOrigin == "oceanar.io") {
  496. for(let i = 0; i < usr.BotAmount; i++) {
  497. this.bots.push(new Oceanar());
  498. }
  499. window.started = true;
  500. } else if(parseOrigin == "aquar.io") {
  501. for(let i = 0; i < usr.BotAmount; i++) {
  502. this.bots.push(new Aquar());
  503. }
  504. window.started = true;
  505. } else {
  506. console.log("Using Default Protocol")
  507. for(let i = 0; i < usr.BotAmount; i++) {
  508. this.bots.push(new Proto5());
  509. }
  510. window.started = true;
  511. }
  512. }
  513. }
  514.  
  515. window.eject = function() {
  516. if(window.started == true) {
  517. this.bots.forEach(bot => {
  518. bot.eject();
  519. });
  520. }
  521. }
  522.  
  523. window.chat = function() {
  524. let msg = prompt('What do you want the bots to say?', 'Type here then press ok or enter');
  525. if(window.started = true) {
  526. this.bots.forEach(bot => {
  527. if(msg) bot.sendchat(msg);
  528. });
  529. }
  530. }
  531.  
  532. window.split = function() {
  533. if(window.started == true) {
  534. this.bots.forEach(bot => {
  535. bot.split();
  536. });
  537. }
  538. }
  539.  
  540. function stopBots() {
  541. if(window.started = true) {
  542. console.log("Stopping Bots...");
  543. this.bots.forEach(bot => {
  544. bot.ws.close()
  545. });
  546. window.bots.length = 0;
  547. window.started = false;
  548. }
  549. }
  550.  
  551. const usr = new User();
  552.  
  553. class Oceanar {
  554. constructor() {
  555. usr.botamt++
  556.  
  557. this.ws = null;
  558. this.connect();
  559. }
  560. connect() {
  561. this.ws = new WebSocket(window.CurrentWs);
  562. this.ws.binaryType = "arraybuffer";
  563. this.ws.onopen = this.onopen.bind(this);
  564. this.ws.onmessage = this.onmessage.bind(this);
  565. this.ws.onerror = this.onerror.bind(this);
  566. this.ws.onclose = this.onclose.bind(this);
  567. }
  568.  
  569. Buffer(arr) {
  570. return new DataView(new ArrayBuffer(arr));
  571. }
  572.  
  573. onopen() {
  574. this.spawn();
  575. this.ping();
  576. this.sendmouse();
  577. setInterval(() => {
  578. this.sendmouse();
  579. }, 200);
  580. }
  581.  
  582. sendchat(msg) {}
  583.  
  584. sendmouse() {
  585. this.send(window.mousepos);
  586. }
  587.  
  588. ping() {
  589. let time = 268435455 & Date.now();
  590. var n = new ArrayBuffer(5);
  591. var i = new DataView(n);
  592. i.setUint8(0, 1)
  593. i.setUint32(1, time, true)
  594. this.send(n);
  595. }
  596.  
  597. split() {}
  598.  
  599. eject() {}
  600.  
  601. spawn() {
  602. let name = document.getElementById("fname").value;
  603. let appearance = 255;
  604. var n = new ArrayBuffer(52);
  605. var i = new DataView(n);
  606. i.setUint8(0, 22);
  607. var o = 0;
  608. for(; o < 25; ++o) {
  609. i.setUint16(1 + 2 * o, o < name.length ? name.charCodeAt(o) : 0, true);
  610. }
  611. i.setUint8(51, appearance)
  612. this.send(n);
  613. }
  614.  
  615.  
  616. send(msg) {
  617. if(this.ws && this.ws.readyState === WebSocket.OPEN) this.ws.send(msg);
  618. }
  619. onmessage(msg) {}
  620.  
  621. onclose(e) {
  622. usr.botamt--
  623. console.log("Disconnected");
  624.  
  625. }
  626.  
  627. onerror(e) {}
  628. }
  629.  
  630. class Inci {
  631. constructor() {
  632. this.connect();
  633. usr.botamt++
  634. this.ws = null;
  635. }
  636. async GetWebSocketCaptcha() {
  637. return new Promise(resolve => {
  638. grecaptcha.execute('6LcnrKQUAAAAADohV5Cksikz89WSP-ZPHNA7ViZm', {
  639. action: 'playbutton'
  640. }).then(function(token) {
  641. if(token) {
  642. var CurrentWs = window.CurrentWs.substr(0, 34)
  643. var sCodes = SCodes_Original;
  644. var chal = "&challenge=";
  645. var precd = '?SCode=';
  646. var scodesprefix = CurrentWs + precd + sCodes + chal;
  647. let WebsocketCaptcha = scodesprefix + token;
  648. resolve(WebsocketCaptcha)
  649. }
  650. });
  651. });
  652. }
  653. async connect() {
  654. const result = await this.GetWebSocketCaptcha();
  655. window.CurrentWs = result;
  656. this.ws = new WebSocket(window.CurrentWs);
  657. this.ws.binaryType = "arraybuffer";
  658. this.ws.onopen = this.onopen.bind(this);
  659. this.ws.onmessage = this.onmessage.bind(this);
  660. this.ws.onerror = this.onerror.bind(this);
  661. this.ws.onclose = this.onclose.bind(this);
  662. }
  663.  
  664. Buffer(arr) {
  665. return new DataView(new ArrayBuffer(arr));
  666. }
  667.  
  668. onopen() {
  669. let init = this.Buffer(5);
  670. init.setUint8(0, 87);
  671. init.setUint32(1, 1, true);
  672. this.send(init);
  673. init = this.Buffer(5);
  674. init.setUint8(0, 100);
  675. init.setUint32(1, 1332175218, true);
  676. this.send(init)
  677. this.spawn();
  678. setInterval(() => {
  679. this.sendmouse();
  680. }, 100);
  681. setInterval(() => {
  682. this.spawn();
  683. }, 5000);
  684. }
  685.  
  686. sendchat(msg) {
  687. var spawnbuf = this.Buffer(2 + 2 * msg.length);
  688. var zz = 0;
  689. var gg = 0;
  690. gg = 1;
  691. spawnbuf.setUint8(zz++, 99);
  692. spawnbuf.setUint8(zz++, 0);
  693. for(var i = 0; i < msg.length; ++i) {
  694. spawnbuf.setUint16(zz, msg.charCodeAt(i), 1);
  695. zz += 2;
  696. };
  697. this.send(spawnbuf);
  698. }
  699.  
  700. sendmouse() {
  701. let movebuf = this.Buffer(21);
  702. movebuf.setUint8(0, 104);
  703. movebuf.setFloat64(1, window.xpos, true);
  704. movebuf.setFloat64(9, window.ypos, true);
  705. movebuf.setUint32(17, 0, true);
  706. this.send(movebuf);
  707. }
  708.  
  709. split() {
  710. this.send(new Uint8Array([17]));
  711. }
  712.  
  713. eject() {
  714. this.send(new Uint8Array([21]));
  715. }
  716.  
  717. spawn() {
  718. let name = document.getElementById("fname").value;
  719. var spawnbuf = this.Buffer(1 + 2 * name.length);
  720. spawnbuf.setUint8(0, 101);
  721. for(var i = 0; i < name.length; ++i) {
  722. spawnbuf.setUint16(1 + 2 * i, name.charCodeAt(i), 1);
  723. };
  724. this.send(spawnbuf);
  725. }
  726.  
  727.  
  728. send(msg) {
  729. if(this.ws && this.ws.readyState === WebSocket.OPEN) this.ws.send(msg);
  730. }
  731. onmessage(msg) {}
  732.  
  733. onclose(e) {
  734. usr.botamt--
  735. console.log("Disconnected");
  736.  
  737. }
  738.  
  739. onerror(e) {}
  740. }
  741.  
  742. class Agarz {
  743. constructor() {
  744. usr.botamt++
  745. this.connect();
  746. }
  747. connect() {
  748. this.ws = new WebSocket(window.CurrentWs);
  749. this.ws.binaryType = "arraybuffer";
  750. this.ws.onopen = this.onopen.bind(this);
  751. this.ws.onmessage = this.onmessage.bind(this);
  752. this.ws.onerror = this.onerror.bind(this);
  753. this.ws.onclose = this.onclose.bind(this);
  754. }
  755.  
  756. Buffer(arr) {
  757. return new DataView(new ArrayBuffer(arr));
  758. }
  759.  
  760. onopen() {
  761. let init = this.Buffer(5);
  762. init.setUint8(0, 255);
  763. init.setUint32(1, 1000, true);
  764. this.send(init);
  765. this.spawn();
  766. let mouseinterval = setInterval(() => {
  767. this.sendmouse();
  768. }, 100);
  769. let spawninterval = setInterval(() => {
  770. this.spawn();
  771. }, 10000);
  772. }
  773.  
  774. sendchat(msg) {
  775. var spawnbuf = this.Buffer(2 + 2 * msg.length);
  776. var zz = 0;
  777. var gg = 0;
  778. gg = 1;
  779. spawnbuf.setUint8(zz++, 206);
  780. spawnbuf.setUint8(zz++, gg);
  781. for(var i = 0; i < msg.length; ++i) {
  782. spawnbuf.setUint16(zz, msg.charCodeAt(i), true);
  783. zz += 2;
  784. };
  785. this.send(spawnbuf);
  786. }
  787.  
  788. sendmouse() {
  789. let movebuf = this.Buffer(21);
  790. movebuf.setUint8(0, 16);
  791. movebuf.setFloat64(1, window.xpos, true);
  792. movebuf.setFloat64(9, window.ypos, true);
  793. movebuf.setUint32(17, 0, true);
  794. this.send(movebuf);
  795. }
  796.  
  797. split() {
  798. this.send(new Uint8Array([17]));
  799. }
  800.  
  801. eject() {
  802. this.send(new Uint8Array([21]));
  803. }
  804.  
  805. spawn() {
  806. let name = document.getElementById("fname").value;
  807. var buffer = this.Buffer(1 + 2 * name.length);
  808. buffer.setUint8(0, 9);
  809. for(var e = 0; e < name.length; ++e) {
  810. buffer.setUint16(1 + 2 * e, name.charCodeAt(e), true);
  811. };
  812. this.send(buffer);
  813. }
  814.  
  815.  
  816. send(msg) {
  817. if(this.ws && this.ws.readyState === WebSocket.OPEN) this.ws.send(msg);
  818. }
  819. onmessage(msg) {}
  820.  
  821. onclose(e) {
  822. console.log("Disconnected");
  823. usr.botamt--
  824. }
  825.  
  826. onerror(e) {}
  827. }
  828.  
  829. class Proto5 {
  830. constructor() {
  831. usr.botamt++
  832.  
  833. this.connect();
  834. }
  835. connect() {
  836. this.ws = new WebSocket(window.CurrentWs);
  837. this.ws.binaryType = "arraybuffer";
  838. this.ws.onopen = this.onopen.bind(this);
  839. this.ws.onmessage = this.onmessage.bind(this);
  840. this.ws.onerror = this.onerror.bind(this);
  841. this.ws.onclose = this.onclose.bind(this);
  842. }
  843.  
  844. Buffer(arr) {
  845. return new DataView(new ArrayBuffer(arr));
  846. }
  847.  
  848. onopen() {
  849. let init = this.Buffer(5);
  850. init.setUint8(0, 254);
  851. init.setUint32(1, 5, true);
  852. this.send(init);
  853. init = this.Buffer(5);
  854. init.setUint8(0, 255);
  855. init.setUint32(1, 123456789, true);
  856. this.send(init)
  857. this.spawn();
  858. let mouseinterval = setInterval(() => {
  859. this.sendmouse();
  860. }, 100);
  861. let spawninterval = setInterval(() => {
  862. this.spawn();
  863. }, 10000);
  864. }
  865.  
  866. sendchat(msg) {
  867. var spawnbuf = this.Buffer(2 + 2 * msg.length);
  868. var zz = 0;
  869. var gg = 0;
  870. gg = 1;
  871. spawnbuf.setUint8(zz++, 206);
  872. spawnbuf.setUint8(zz++, gg);
  873. for(var i = 0; i < msg.length; ++i) {
  874. spawnbuf.setUint16(zz, msg.charCodeAt(i), true);
  875. zz += 2;
  876. };
  877. this.send(spawnbuf);
  878. }
  879.  
  880. sendmouse() {
  881. let movebuf = this.Buffer(21);
  882. movebuf.setUint8(0, 16);
  883. movebuf.setFloat64(1, window.xpos, true);
  884. movebuf.setFloat64(9, window.ypos, true);
  885. movebuf.setUint32(17, 0, true);
  886. this.send(movebuf);
  887. }
  888.  
  889. split() {
  890. this.send(new Uint8Array([17]));
  891. }
  892.  
  893. eject() {
  894. this.send(new Uint8Array([21]));
  895. }
  896.  
  897. spawn() {
  898. let name = document.getElementById("fname").value;
  899. var skins = ['26', '30', '32', '40', '60', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19',
  900. '20', '21', '22', '23'
  901. ];
  902. var skin = skins[~~(Math.random() * skins.length)];
  903. name = `{${skin}}` + name;
  904. var spawnbuf = this.Buffer(1 + 2 * name.length);
  905. spawnbuf.setUint8(0, 192);
  906. for(var i = 0; i < name.length; ++i) {
  907. spawnbuf.setUint16(1 + 2 * i, name.charCodeAt(i), true);
  908. };
  909. this.send(spawnbuf);
  910. }
  911.  
  912.  
  913. send(msg) {
  914. if(this.ws && this.ws.readyState === WebSocket.OPEN) this.ws.send(msg);
  915. }
  916. onmessage(msg) {}
  917.  
  918. onclose(e) {
  919. console.log("Disconnected");
  920. usr.botamt--
  921. }
  922.  
  923. onerror(e) {}
  924. }
  925.  
  926. class AgarLive {
  927. constructor() {
  928. this.connect();
  929. usr.botamt++
  930. this.ws = null;
  931. }
  932. async GetWebSocketCaptcha() {
  933. return new Promise(resolve => {
  934. // grecaptcha.execute('6LcnrKQUAAAAADohV5Cksikz89WSP-ZPHNA7ViZm', {
  935. // action: 'playbutton'
  936. //}).then(function(token) {
  937. // if (token) {
  938. var CurrentWs = window.CurrentWs.substr(0, 31) + "?SCode="
  939. var WS = CurrentWs + SCodes_Original;
  940. console.log(WS);
  941. resolve(WS)
  942. //}
  943. //});
  944. });
  945. }
  946. async connect() {
  947. //connect() {
  948. const result = await this.GetWebSocketCaptcha();
  949. window.CurrentWs = result;
  950. this.ws = new WebSocket(window.CurrentWs);
  951. this.ws.binaryType = "arraybuffer";
  952. this.ws.onopen = this.onopen.bind(this);
  953. this.ws.onmessage = this.onmessage.bind(this);
  954. this.ws.onerror = this.onerror.bind(this);
  955. this.ws.onclose = this.onclose.bind(this);
  956. }
  957.  
  958. Buffer(arr) {
  959. return new DataView(new ArrayBuffer(arr));
  960. }
  961.  
  962. onopen() {
  963. let init = this.Buffer(5);
  964. init.setUint8(0, 254);
  965. init.setUint32(1, 5, true);
  966. this.send(init);
  967. init = this.Buffer(5);
  968. init.setUint8(0, 255);
  969. init.setUint32(1, 154669603, true);
  970. this.send(init)
  971. this.spawn();
  972. setInterval(() => {
  973. this.sendmouse();
  974. }, 100);
  975. setInterval(() => {
  976. this.spawn();
  977. }, 10000);
  978. }
  979.  
  980. sendchat(msg) {
  981. var spawnbuf = this.Buffer(2 + 2 * msg.length);
  982. var zz = 0;
  983. var gg = 0;
  984. gg = 1;
  985. spawnbuf.setUint8(zz++, 99);
  986. spawnbuf.setUint8(zz++, 0);
  987. for(var i = 0; i < msg.length; ++i) {
  988. spawnbuf.setUint16(zz, msg.charCodeAt(i), 1);
  989. zz += 2;
  990. };
  991. this.send(spawnbuf);
  992. }
  993.  
  994. sendmouse() {
  995. let movebuf = this.Buffer(21);
  996. movebuf.setUint8(0, 16);
  997. movebuf.setFloat64(1, window.xpos, true);
  998. movebuf.setFloat64(9, window.ypos, true);
  999. movebuf.setUint32(17, 0, true);
  1000. this.send(movebuf);
  1001. }
  1002.  
  1003. split() {
  1004. this.send(new Uint8Array([17]));
  1005. }
  1006.  
  1007. eject() {
  1008. this.send(new Uint8Array([21]));
  1009. }
  1010.  
  1011. spawn() {
  1012. let name = document.getElementById("fname").value;
  1013. var spawnbuf = this.Buffer(1 + 2 * name.length);
  1014. spawnbuf.setUint8(0, 0);
  1015. for(var i = 0; i < name.length; ++i) {
  1016. spawnbuf.setUint16(1 + 2 * i, name.charCodeAt(i), 1);
  1017. };
  1018. this.send(spawnbuf);
  1019. }
  1020.  
  1021.  
  1022. send(msg) {
  1023. if(this.ws && this.ws.readyState === WebSocket.OPEN) this.ws.send(msg);
  1024. }
  1025. onmessage(msg) {}
  1026.  
  1027. onclose(e) {
  1028. usr.botamt--
  1029. console.log("Disconnected");
  1030.  
  1031. }
  1032.  
  1033. onerror(e) {}
  1034. }
  1035.  
  1036. class Aquar {
  1037. constructor() {
  1038. usr.botamt++
  1039.  
  1040. this.ws = null;
  1041. this.connect();
  1042. }
  1043. connect() {
  1044. this.ws = new WebSocket(window.CurrentWs);
  1045. this.ws.binaryType = "arraybuffer";
  1046. this.ws.onopen = this.onopen.bind(this);
  1047. this.ws.onmessage = this.onmessage.bind(this);
  1048. this.ws.onerror = this.onerror.bind(this);
  1049. this.ws.onclose = this.onclose.bind(this);
  1050. }
  1051.  
  1052. Buffer(arr) {
  1053. return new DataView(new ArrayBuffer(arr));
  1054. }
  1055.  
  1056. onopen() {
  1057. this.spawn();
  1058. this.ping();
  1059. this.sendmouse();
  1060. setInterval(() => {
  1061. this.sendmouse();
  1062. }, 200);
  1063. }
  1064.  
  1065. sendchat(msg) {}
  1066.  
  1067. sendmouse() {
  1068. this.send(window.mousepos);
  1069. }
  1070.  
  1071. ping() {
  1072. let time = 268435455 & Date.now();
  1073. var n = new ArrayBuffer(5);
  1074. var i = new DataView(n);
  1075. i.setUint8(0, 1)
  1076. i.setUint32(1, time, true)
  1077. this.send(n);
  1078. }
  1079.  
  1080. split() {}
  1081.  
  1082. eject() {}
  1083.  
  1084. spawn() {
  1085. let name = "test";
  1086. let appearance = 255;
  1087. var n = new ArrayBuffer(52);
  1088. var i = new DataView(n);
  1089. i.setUint8(0, 22);
  1090. var o = 0;
  1091. for(; o < 25; ++o) {
  1092. i.setUint16(1 + 2 * o, o < name.length ? name.charCodeAt(o) : 0, true);
  1093. }
  1094. i.setUint8(51, appearance)
  1095. this.send(n);
  1096. }
  1097.  
  1098.  
  1099. send(msg) {
  1100. if(this.ws && this.ws.readyState === WebSocket.OPEN) this.ws.send(msg);
  1101. }
  1102. onmessage(msg) {}
  1103.  
  1104. onclose(e) {
  1105. usr.botamt--
  1106. console.log("Disconnected");
  1107.  
  1108. }
  1109.  
  1110. onerror(e) {}
  1111. }