Guest User

Untitled

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