Project ^_^

Bar Reloads, AutoGG, And Instakill Types

  1. // ==UserScript==
  2.  
  3. // @name Project ^_^
  4.  
  5. // @namespace Hack Studio
  6. // @namespace Develope Company (DC)
  7.  
  8. // @version v.1.4
  9.  
  10. // @description Bar Reloads, AutoGG, And Instakill Types
  11.  
  12. // @author cah blX
  13.  
  14. // @match *://moomoo.io/*
  15. // @match *://*.moomoo.io/*
  16. // @match *://sandbox.moomoo.io/*
  17. // @match *://dev.moomoo.io/*
  18. // @match https://moomoo.io/
  19. // @match https://sandbox.moomoo.io/
  20. // @match https://dev.moomoo.io/
  21. // @match *abc.moomoo.io/*
  22.  
  23. // @run-at document-start
  24.  
  25. // @license MIT
  26. // @license Copyright (c) Hack Studio 2019
  27. // @license Copyright (c) DC
  28.  
  29. // ==/UserScript==
  30.  
  31. /*
  32. Author: cah blX ( 2k09__ )
  33. Discord: 2k09__
  34. GreasyFork: cah blX
  35. Glitch: 2k09__
  36. Copyright (c) 101.NewA. cah_blX
  37. */
  38.  
  39. document.getElementById('gameName').innerHTML = '';
  40. document.getElementById("leaderboard").innerHTML = '^_^';
  41. document.getElementById('loadingText').innerHTML = '';
  42. document.getElementById("nameInput").innerHTML = 'tester';
  43. document.getElementById("chatBox").innerHTML = '>> Message <<';
  44. document.getElementById('enterGame').innerHTML = '--> Lets Play <---';
  45. document.getElementById("ageText").style.color = "#000000"
  46. document.getElementById("ageBar").style.backgroundColor = "rgba(0, 0, 0, 0.25)"
  47. document.getElementById("ageBarBody").style.backgroundColor = "#064a49"
  48. document.getElementById('adCard')?.remove();
  49. document.getElementById('errorNotification')?.remove();
  50. document.getElementById('promoImg')?.remove();
  51. document.getElementById("ot-sdk-btn-floating");
  52. document.getElementById("partyButton")?.remove
  53. document.getElementById("joinPartyButton")?.remove
  54. document.getElementById("youtuberOf")?.remove
  55. document.getElementById("moomooio_728x90_home")?.remove
  56. document.getElementById("darkness")?.remove
  57. document.getElementById("gameUI")?.remove
  58.  
  59. var primary = 0,
  60. secondary = 0,
  61. foodType = 0,
  62. spikeType = 6,
  63. boostType = 15,
  64. instaspeed = 110,
  65. autoaim = false,
  66. instacht = "Type: Normal Insta",
  67. insta1tickcht = "Type: One Ticked",
  68. instarevcht = "Type: Rev Insta",
  69. instasTickedcht = "Type: Spike Tick",
  70. insta1framecht = "Type: One Frame",
  71. mouseX,
  72. mouseY,
  73. ws,
  74. player = [],
  75. width,
  76. height,
  77. nearestEnemyAngle,
  78. msgpack5 = window.msgpack;
  79.  
  80. setInterval(() => {
  81. if(autoaim == true){
  82. doNewSend(["2",[nearestEnemyAngle]]);
  83. }
  84. },20);
  85. function Random(e, t) {
  86. return Math.floor(Math.random() * t) + e
  87. }
  88. function aim(e, t) {
  89. document.getElementById("gameCanvas")
  90. .dispatchEvent(new MouseEvent("mousemove", {
  91. clientX: e,
  92. clientY: t
  93. }))
  94. }
  95. function place(id, angle=Math.atan2(mouseY - height / 2, mouseX - width / 2)) {
  96. doNewSend(["5", [id, null]]);
  97. doNewSend(["c", [1, angle]]);
  98. doNewSend(["c", [3, angle]]);
  99. doNewSend(["5", [player.weapon, true]]);
  100. }
  101. function isElementVisible(e) {
  102. return (e.offsetParent !== null);
  103. }
  104. function doNewSend(sender) {
  105. ws.send(new Uint8Array(Array.from(msgpack5.encode(sender))));
  106. }
  107. function chat(sender) {
  108. doNewSend(["ch", [sender]]);
  109. }
  110. var repeater = function(key, action, interval) {
  111. let _isKeyDown = false;
  112. let _intervalId = undefined;
  113. return {
  114. start(keyCode) {
  115. if (keyCode == key && document.activeElement.id.toLowerCase() !== 'chatbox') {
  116. _isKeyDown = true;
  117. if (_intervalId === undefined) {
  118. _intervalId = setInterval(()=>{
  119. action();
  120. if (!_isKeyDown) {
  121. clearInterval(_intervalId);
  122. _intervalId = undefined;
  123. }
  124. }
  125. , interval);
  126. }
  127. }
  128. },
  129. stop(keyCode) {
  130. if (keyCode == key && document.activeElement.id.toLowerCase() !== 'chatbox') {
  131. _isKeyDown = false;
  132. }
  133. }
  134. };
  135. }
  136. function wep(id){
  137. doNewSend(["5", [id, true]]);
  138. }
  139. function hit() {
  140. doNewSend(["c", [1]]);
  141. }
  142. function stophit() {
  143. doNewSend(["c", [0, null]]);
  144. }
  145. function storeEquip(hat, acc) {
  146. doNewSend(["13c", [1, hat, 0]]);
  147. doNewSend(["13c", [1, acc, 1]]);
  148. doNewSend(["13c", [0, hat, 0]]);
  149. doNewSend(["13c", [0, acc, 1]]);
  150. }
  151. function storeBuy(hat, acc) {
  152. doNewSend(["c", [1, hat, 0]]);
  153. doNewSend(["c", [1, acc, 1]]);
  154. doNewSend(["c", [0, hat, 0]]);
  155. doNewSend(["c", [0, acc, 1]]);
  156. }
  157. function insta(id) {
  158. autoaim = true;
  159. chat(id)
  160. storeBuy(7, 19);
  161. storeEquip(7, 19);
  162. wep(primary)
  163. hit()
  164. setTimeout(() => {
  165. wep(secondary)
  166. hit()
  167. storeBuy(53, 21);
  168. storeEquip(53, 21);
  169. },instaspeed);
  170. setTimeout(() => {
  171. stophit()
  172. stophit()
  173. wep(primary)
  174. storeBuy(20, 19);
  175. storeEquip(20, 19);
  176. },230);
  177. autoaim = false;
  178. }
  179. function onetick(id) {
  180. autoaim = true;
  181. chat(id)
  182. storeBuy(53, 21);
  183. storeEquip(53, 21);
  184. wep(secondary)
  185. hit()
  186. place(boost)
  187. setTimeout(() => {
  188. wep(primary)
  189. hit()
  190. storeBuy(7, 19);
  191. storeEquip(7, 19);
  192. },instaspeed);
  193. setTimeout(() => {
  194. stophit()
  195. stophit()
  196. wep(primary)
  197. storeBuy(20, 19);
  198. storeEquip(20, 19);
  199. },230);
  200. autoaim = false;
  201. }
  202. function revinsta(id) {
  203. autoaim = true;
  204. chat(id)
  205. storeBuy(53, 21);
  206. storeEquip(53, 21);
  207. wep(secondary)
  208. hit()
  209. setTimeout(() => {
  210. wep(primary)
  211. hit()
  212. storeBuy(7, 19);
  213. storeEquip(7, 19);
  214. },instaspeed);
  215. setTimeout(() => {
  216. stophit()
  217. stophit()
  218. wep(primary)
  219. storeBuy(20, 19);
  220. storeEquip(20, 19);
  221. },230);
  222. autoaim = false;
  223. }
  224. function spiketick(id) {
  225. autoaim = true;
  226. chat(id)
  227. storeBuy(7, 19);
  228. storeEquip(7, 19);
  229. wep(primary)
  230. hit()
  231. place(spike)
  232. setTimeout(() => {
  233. wep(secondary)
  234. hit()
  235. place(spike)
  236. storeBuy(53, 21);
  237. storeEquip(53, 21);
  238. },instaspeed);
  239. setTimeout(() => {
  240. stophit()
  241. stophit()
  242. wep(primary)
  243. storeBuy(20, 19);
  244. storeEquip(20, 19);
  245. },230);
  246. autoaim = false;
  247. }
  248. function oneframe(id) {
  249. autoaim = true;
  250. chat(id)
  251. storeBuy(53, 21);
  252. storeEquip(53, 21);
  253. setTimeout(() => {
  254. wep(primary)
  255. hit()
  256. storeBuy(7, 18);
  257. storeEquip(7, 18);
  258. },instaspeed);
  259. setTimeout(() => {
  260. stophit()
  261. wep(primary)
  262. storeBuy(20, 19);
  263. storeEquip(20, 19);
  264. },230);
  265. autoaim = false;
  266. }
  267. const insta1 = repeater(82, () => {insta(instacht)}, 0);
  268. const onetick1 = repeater(110, () => {onetick(insta1tickcht)}, 0);
  269. const revinsta1 = repeater(84, () => {revinsta(instarevcht)}, 0);
  270. const spikeTick1 = repeater(32, () => {spiketick(instasTickedcht)}, 0);
  271. const oneFrame1 = repeater(80, () => {oneframe(insta1framecht)}, 0);
  272. const spike = repeater(86, () => {place(spikeType)}, 0);
  273. const qheal = repeater(81, () => {place(foodType)}, 0);
  274. const boost = repeater(70, () => {place(boostType)}, 0);
  275. document.addEventListener('keydown', (e)=>{
  276. insta1.start(e.keyCode);
  277. onetick1.start(e.keyCode);
  278. revinsta1.start(e.keyCode);
  279. spikeTick1.start(e.keyCode);
  280. oneFrame1.start(e.keyCode);
  281. spike.start(e.keyCode);
  282. qheal.start(e.keyCode);
  283. boost.start(e.keyCode);
  284. })
  285. var bKey = 16;
  286. document.addEventListener('keydown', (e)=>{
  287. if(e.keyCode == bKey && document.activeElement.id.toLowerCase() !== 'chatbox'){
  288. if (player.y < 2400) {
  289. storeBuy(20, 11)
  290. storeEquip(20, 11)
  291. } else if (player.y > 6850 && player.y < 7550) {
  292. storeBuy(31, 11)
  293. storeEquip(31, 11)
  294. } else if (player.y > 2400 && (player.y < 6850 || player.y > 7550)) {
  295. storeBuy(20, 11)
  296. storeEquip(20, 11)
  297. }
  298. }
  299. })
  300. document.addEventListener('keyup', (e)=>{
  301. insta1.stop(e.keyCode);
  302. onetick1.stop(e.keyCode);
  303. revinsta1.stop(e.keyCode);
  304. spikeTick1.stop(e.keyCode);
  305. oneFrame1.stop(e.keyCode);
  306. spike.stop(e.keyCode);
  307. qheal.stop(e.keyCode);
  308. boost.stop(e.keyCode);
  309. })
  310. window.Cow.setCodec(window.msgpack);
  311. CanvasRenderingContext2D.prototype._roundRect = CanvasRenderingContext2D.prototype.roundRect;
  312. window.Cow.addRender("global", () => {
  313. window.Cow.playersManager.eachVisible(player => {
  314. if (player === null || player === undefined || !player.alive) return;
  315. function renderBar({ width, innerWidth, xOffset, yOffset, color }) {
  316. const context = window.Cow.renderer.context;
  317. const healthBarPad = window.config.healthBarPad;
  318. const height = 17;
  319. const radius = 8;
  320. context.save();
  321. context.fillStyle = "#3d3f42";
  322. context.translate(xOffset, yOffset);
  323. context.beginPath();
  324. context._roundRect(-width - healthBarPad, -8.5, 2 * width + 2 * healthBarPad, height, radius);
  325. context.fill();
  326. context.restore();
  327. context.save();
  328. context.fillStyle = color;
  329. context.translate(xOffset, yOffset);
  330. context.beginPath();
  331. context._roundRect(-width, -8.5 + healthBarPad, 2 * innerWidth, height - 2 * healthBarPad, radius - 1);
  332. context.fill();
  333. context.restore();
  334. }
  335. const width = window.config.healthBarWidth / 2 - window.config.healthBarPad / 2;
  336. const primaryReloadCount = Math.min(Math.max(player.reloads.primary.count / player.reloads.primary.max, 0), 1);
  337. const secondaryReloadCount = Math.min(Math.max(player.reloads.secondary.count / player.reloads.secondary.max, 0), 1);
  338. const yOffset = player.renderY + player.scale + window.config.nameY - 5;
  339. renderBar({
  340. width,
  341. innerWidth: width * primaryReloadCount,
  342. xOffset: player.renderX - width * 1.19,
  343. yOffset,
  344. color: player.isAlly ? "#ffff00" : "#cc5151"
  345. });
  346. renderBar({
  347. width,
  348. innerWidth: width * secondaryReloadCount,
  349. xOffset: player.renderX + width * 1.19,
  350. yOffset,
  351. color: player.isAlly ? "#ffff00" : "#cc5151"
  352. });
  353. });
  354. });
  355. var prevCount
  356. const attachWebSocketListener = e => {
  357. e.addEventListener("message", hookWS);
  358. };
  359. const hookWS = e => {/*...*/};
  360. const sendPacket = e => {
  361. if (ws) {
  362. ws.send(msgpack5.encode(e));
  363. }
  364. };
  365. WebSocket.prototype.oldSend = WebSocket.prototype.send;
  366. WebSocket.prototype.send = function (e) {
  367. if (!ws) {
  368. [document.ws, ws] = [this, this];
  369. attachWebSocketListener(this);
  370. }
  371. this.oldSend(e);
  372. };
  373. const handleMutations = mutationsList => {
  374. for (const mutation of mutationsList) {
  375. if (mutation.target.id === "killCounter") {
  376. const count = parseInt(mutation.target.innerText, 10) || 0;
  377. if (count > prevCount) {
  378. chat("AutoGG - Scripter Working!");
  379. } else {
  380. chat(player.kills + " - 0");
  381. prevCount = count;
  382. }
  383. }
  384. }
  385. };
  386. const observer = new MutationObserver(handleMutations);
  387. observer.observe(document, {
  388. subtree: true,
  389. childList: true
  390. });