Advertisement
Guest User

Untitled

a guest
Dec 16th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.54 KB | None | 0 0
  1. // ==UserScript==
  2. // @name CellcraftBots-Ai
  3. // @namespace CC
  4. // @version 1.0.5
  5. // @description StrikerJs
  6. // @author StrikerJS
  7. // @match http://agar.bio/*
  8. // @match http://galx.io/*
  9. // @match http://cellcraft.io/*
  10. // @match http://play.agario0.com/*
  11. // @match http://blong.io/*
  12. // @match http://nbk.io/*
  13. // @match http://gaver.io/*
  14. // @match http://mgar.io/*
  15. // @match http://alis.io/*
  16. // @match http://agar.io/*
  17. // @match http://gota.io/*
  18. // @require https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.7.3/socket.io.min.js
  19. // @grant none
  20. // ==/UserScript==
  21. window.botMode = "Mouse";
  22. window.chatMsg = null;
  23. window.interv = 1000;
  24. (function() {
  25. 'use strict';
  26. window.trap = {
  27. x: 0,
  28. y: 0,
  29. ip: null,
  30. };
  31. WebSocket.prototype.Asend = WebSocket.prototype.send;
  32. WebSocket.prototype.send = function(a) {
  33. this.Asend.apply(this, arguments)
  34.  
  35. var msg = new DataView(a);
  36. if (msg.byteLength === 21) {
  37. if (msg.getInt8(0, true) === 16) {
  38. trap.x = msg.getFloat64(1, true);
  39. trap.y = msg.getFloat64(9, true);
  40. }
  41. }
  42. if (msg.byteLength === 13) {
  43. console.log('MOUSE DATA!')
  44. if (msg.getUint8(0, true) === 16) {
  45. trap.x = msg.getInt32(1, true);
  46. trap.y = msg.getInt32(5, true);
  47. console.log('MOUSE DATA!')
  48. }
  49. }
  50. if(this.url !== null) {
  51. trap.ip = this.url;
  52. console.log(trap.ip);
  53. }
  54. };
  55. var socket = io.connect('ws://ulb-minestriker0010942351.codeanyapp.com:8080');
  56.  
  57. document.addEventListener('keydown', function(e) {
  58. var key = e.keyCode || e.which;
  59. switch (key) {
  60. case 69:
  61. socket.emit('split');
  62. break;
  63. case 82:
  64. socket.emit('eject');
  65. break;
  66. case 67:
  67. socket.emit('botAi');
  68. window.botMode = "Ai"
  69. break;
  70. case 66:
  71. socket.emit('mouseMove')
  72. window.botMode = "Mouse"
  73. break;
  74. case 190:
  75. window.botAmount = prompt('Put in ur wished amount of bots');
  76. break;
  77. case 9:
  78. window.chatMsg = prompt('Spam => :');
  79. window.spam();
  80. break;
  81. case 16:
  82. socket.emit('stop');
  83. break;
  84. }
  85. });
  86. switch(window.botMode) {
  87. case "Mouse":
  88. setInterval(function() {
  89. socket.emit('pos', {
  90. x: trap.x,
  91. y: trap.y,
  92. });
  93. },200)
  94. break;
  95. case "Ai":
  96. console.log(window.botMode)
  97. break;
  98. }
  99. window.spam = () => {
  100. setInterval(function() {
  101. socket.emit('chat', {
  102. msg: window.chatMsg
  103. })
  104. }, window.interv)
  105. }
  106. window.botCount = null;
  107. window.start = function() {
  108. socket.emit('start', {
  109. ip : trap.ip !== null ? trap.ip : 0,
  110. origin : location.origin,
  111. bots: window.botAmount
  112. });
  113. };
  114. setTimeout(function() {
  115. $("#canvas").after("<div style='box-shadow: 0px 0px 20px black;z-index:9999999; background-color: #000000; -moz-opacity: 0.4; -khtml-opacity: 0.4; opacity: 0.7; zoom: 1; width: 205px; top: 300px; left: 10px; display: block; position: absolute; text-align: center; font-size: 15px; color: #ffffff; font-family: Ubuntu;border: 2px solid #0c31d4;'> <div style='color:#ffffff; display: inline; -moz-opacity:1; -khtml-opacity: 1; opacity:1;font-size: 22px; filter:alpha(opacity=100); padding: 10px;'><a>Striker'S Client</a></div> <div style=' color:#ffffff; display: inline; -moz-opacity:1; -khtml-opacity: 1; opacity:1; filter:alpha(opacity=100); padding: 10px;'><br>Minions: <a id='minionCount'>Offline</a> </div><button id='start-bots' style='display: block;border-radius: 5px;border: 2px solid #6495ED;background-color: #BCD2EE;height: 50px;width: 120px;margin: auto;text-align: center;'>StartBots </button><marquee>StrkerJS</marquee> </div>");
  116. document.getElementById('start-bots').onclick = function() {
  117. start();
  118. };
  119. },2000);
  120. socket.on('count', function(count) {
  121. $('#minionCount').html(count.amount);
  122. });
  123. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement