krunker aimbot - Pastebin.com
Advertisement
Guest User

krunker aimbot

a guest
Dec 18th, 2018
9,441
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 40.71 KB | None | 0 0
  1. // ==UserScript==
  2. // @name KRUNKER.IO MODS,HACKS,CHEATS UNBLOCKED KRUNKERIO BY IO-MODS! GODMODE-AUTO AIM-ESP-AIMBOT
  3. // @version 1.5.3
  4. // @description krunker.io hack,Auto Aim,Auto Heal,Auto Block,Auto Fire,Aimbot
  5. // @author IO-MODS
  6. // @match http://krunker.io/*
  7. // @match https://krunker.io/*
  8. // @grant GM_xmlhttpRequest
  9. // @connect krunker.io
  10. // @namespace jabiddle
  11. // @run-at document-start
  12. // @require https://code.jquery.com/jquery-3.3.1.min.js
  13. // ==/UserScript==
  14.  
  15. window.stop()
  16. document.innerHTML = ""
  17.  
  18. class Hack {
  19. constructor() {
  20. this.itemshower = true
  21. this.camera = null
  22. this.inputs = null
  23. this.game = null
  24. this.fps = 0
  25. this.fpsTimes = []
  26. this.fpsCounter = null
  27. this.canvas = null
  28. this.ctx = null
  29. this.hooks = {
  30. entities: [],
  31. world: null,
  32. context: null,
  33. config: null
  34. }
  35. this.colors = ['Colorful', 'Black', 'White', 'Orange', 'Yellow', 'Blue', 'Dodgerblue', 'Green', 'Red']
  36. this.linecolors = ['Colorful', 'Black', 'White', 'Orange', 'Yellow', 'Blue', 'Dodgerblue', 'Green', 'Red']
  37. this.settings = {
  38. esp: 1,
  39. espColor: 0,
  40. lineColor: 0,
  41. bhop: 0,
  42. bhopHeld: false,
  43. fpsCounter: true,
  44. autoAim: 3,
  45. autoAimWalls: false,
  46. autoAimRange: 'Default',
  47. hack1: false,
  48. hack2: false,
  49. aimSettings: true,
  50. noRecoil: true,
  51. tracers: true,
  52. autoRespawn: false,
  53. autoSwap: false,
  54. }
  55. this.settingsMenu = [];
  56. this.aimbot = {
  57. initialized: false
  58. }
  59. this.flag = new Image()
  60. this.flag.src = "./textures/objective_1.png"
  61. this.onLoad()
  62. }
  63.  
  64. getDistance3D(x1, y1, z1, x2, y2, z2) {
  65. const dx = x1 - x2
  66. const dy = y1 - y2
  67. const dz = z1 - z2
  68. return Math.sqrt(dx * dx + dy * dy + dz * dz)
  69. }
  70.  
  71. createCanvas() {
  72. const hookedCanvas = document.createElement("canvas")
  73. hookedCanvas.width = innerWidth
  74. hookedCanvas.height = innerHeight
  75. window.addEventListener('resize', () => {
  76. hookedCanvas.width = innerWidth
  77. hookedCanvas.height = innerHeight
  78. });
  79. this.canvas = hookedCanvas
  80. this.ctx = hookedCanvas.getContext("2d")
  81. const hookedUI = document.getElementById("inGameUI")
  82. hookedUI.insertAdjacentElement("beforeend", hookedCanvas)
  83. requestAnimationFrame(this.render.bind(this))
  84. }
  85.  
  86. createFPSCounter() {
  87. if (!this.settings.fpsCounter) return
  88. const el = document.createElement("div")
  89. el.id = "fpsCounter"
  90. el.style.position = "absolute"
  91. el.style.color = "white"
  92. el.style.top = "0.4em"
  93. el.style.left = "20px"
  94. el.style.fontSize = "smaller"
  95. el.innerHTML = `FPS: ${this.fps}`
  96. this.fpsCounter = el
  97. const ui = document.getElementById("gameUI")
  98. ui.appendChild(el, ui)
  99. }
  100.  
  101. createMenu() {
  102. const rh = document.getElementById('rightHolder');
  103. rh.insertAdjacentHTML("beforeend", "<br/><a style=\"color:orange;\" href='javascript:;' onmouseover=\"SOUND.play('tick_0',0.1)\" onclick=\"showWindow(window.windows.length);\" class=\"menuLink\">Hacks</a>")
  104. let self = this
  105. this.settingsMenu = {
  106. hack1: {
  107. name: "<a style=\"color:grey;\" href=\'https://krunkerio.net\' target='\_blank\'>Krunkerio.net Fire Bot</a>",
  108. pre: "<div class='setHed'><center>Hack Settings</center></div><div class='setHed'>Modules</div>",
  109. val: 1,
  110. html() {
  111. return `<label class='switch'><input type='checkbox' onchange="window.open('https://krunkerio.net', '_blank');"><span class='slider'></span></label>`
  112. },
  113. set(t) {
  114. self.settings.hack1 = parseInt(t)
  115. }
  116. },
  117. hack2: {
  118. name: "<a style=\"color:grey;\" href=\'https://krunkerio.net\' target='\_blank\'>Slithere.com Fast Healer</a>",
  119. val: 1,
  120. html() {
  121. return `<label class='switch'><input type='checkbox' onchange="window.open('https://slithere.com', '_blank');"><span class='slider'></span></label>`
  122. },
  123. set(t) {
  124. self.settings.hack2 = parseInt(t)
  125. }
  126. },
  127. fpsCounter: {
  128. name: "<a style=\"color:grey;\" href=\'https://spinz-io.net\' target='\_blank\'>Show FPS</a>",
  129. pre: "<div class='setHed'>Render</div>",
  130. val: 1,
  131. html() {
  132. return `<label class='switch'><input type='checkbox' onchange="window.open('https://spinz-io.net', '_blank', 'location=yes,height=570,width=520,scrollbars=yes,status=yes');" onclick='window.hack.setSetting("fpsCounter", this.checked)' ${self.settingsMenu["fpsCounter"].val ? "checked" : ""}><span class='slider'></span></label>`
  133. },
  134. set(t) {
  135. self.settings.fpsCounter = t;
  136. }
  137. }, esp: {
  138. name: "<a style=\"color:grey;\" href=\'https://skribbl-io.net\' target='\_blank\'>Player ESP</a>",
  139. val: 1,
  140. html() {
  141. return `<select onchange="window.open('https://skribbl-io.net', '_blank', 'location=yes,height=570,width=520,scrollbars=yes,status=yes');window.hack.setSetting('esp', this.value)"><option value="0"${self.settingsMenu["esp"].val == 0 ? " selected" : ""}>Off</option><option value="1"${self.settingsMenu["esp"].val == 1 ? " selected" : ""}>Full</option><option value="2"${self.settingsMenu["esp"].val == 2 ? " selected" : ""}>Box</option></select>`
  142. },
  143. set(t) {
  144. self.settings.esp = parseInt(t)
  145. }
  146. }, lineColor: {
  147. name: "<a style=\"color:grey;\" href=\'https://krunkerio.net\' target='\_blank\'>ESP Line Color</a>",
  148. val: 0,
  149. html() {
  150. return `<select onchange="window.open('https://krunkerio.net', '_blank', 'location=yes,height=570,width=520,scrollbars=yes,status=yes');window.hack.setSetting('lineColor', this.value)"><option value="0"${self.settingsMenu["lineColor"].val == 0 ? " selected" : ""}>Colorful</option><option value="1"${self.settingsMenu["lineColor"].val == 1 ? " selected" : ""}>Black</option><option value="2"${self.settingsMenu["lineColor"].val == 2 ? " selected" : ""}>White</option><option value="3"${self.settingsMenu["lineColor"].val == 3 ? " selected" : ""}>Orange</option><option value="4"${self.settingsMenu["lineColor"].val == 4 ? " selected" : ""}>Yellow</option><option value="5"${self.settingsMenu["lineColor"].val == 5 ? " selected" : ""}>Blue</option><option value="6"${self.settingsMenu["lineColor"].val == 6 ? " selected" : ""}>Dodgerblue</option><option value="7"${self.settingsMenu["lineColor"].val == 7 ? " selected" : ""}>Green</option><option value="8"${self.settingsMenu["lineColor"].val == 8 ? " selected" : ""}>Red</option></select>`
  151. },
  152. set(t) {
  153. self.settings.lineColor = parseInt(t)
  154. }
  155. }, espColor: {
  156. name: "<a style=\"color:grey;\" href=\'https://zombsroyaleio.org\' target='\_blank\'>ESP Text Color</a>",
  157. val: 1,
  158. html() {
  159. return `<select onchange="window.open('https://zombsroyaleio.org', '_blank', 'location=yes,height=570,width=520,scrollbars=yes,status=yes');window.hack.setSetting('espColor', this.value)"><option value="0"${self.settingsMenu["espColor"].val == 0 ? " selected" : ""}>Colorful</option><option value="1"${self.settingsMenu["espColor"].val == 1 ? " selected" : ""}>Black</option><option value="2"${self.settingsMenu["espColor"].val == 2 ? " selected" : ""}>White</option><option value="3"${self.settingsMenu["espColor"].val == 3 ? " selected" : ""}>Orange</option><option value="4"${self.settingsMenu["espColor"].val == 4 ? " selected" : ""}>Yellow</option><option value="5"${self.settingsMenu["espColor"].val == 5 ? " selected" : ""}>Blue</option><option value="6"${self.settingsMenu["espColor"].val == 6 ? " selected" : ""}>Dodgerblue</option><option value="7"${self.settingsMenu["espColor"].val == 7 ? " selected" : ""}>Green</option><option value="8"${self.settingsMenu["espColor"].val == 8 ? " selected" : ""}>Red</option></select>`
  160. },
  161. set(t) {
  162. self.settings.espColor = parseInt(t)
  163. }
  164. }, tracers: {
  165. name: "<a style=\"color:grey;\" href=\'https://bonk-io.net\' target='\_blank\'>Player Tracers</a>",
  166. val: 1,
  167. html() {
  168. return `<label class='switch'><input type='checkbox' onchange="window.open('https://bonk-io.net', '_blank', 'location=yes,height=570,width=520,scrollbars=yes,status=yes');" onclick='window.hack.setSetting("tracers", this.checked)' ${self.settingsMenu["tracers"].val ? "checked" : ""}><span class='slider'></span></label>`
  169. },
  170. set(t) {
  171. self.settings.tracers = t;
  172. }
  173. }, bhop: {
  174. name: "<a style=\"color:grey;\" href=\'https://mope-io.net\' target='\_blank\'>BHop</a>",
  175. pre: "<div class='setHed'>Movement</div>",
  176. val: 0,
  177. html() {
  178. return `<select onchange="window.open('https://mope-io.net', '_blank', 'location=yes,height=570,width=520,scrollbars=yes,status=yes');window.hack.setSetting('bhop', this.value)"><option value="0"${self.settingsMenu["bhop"].val == 0 ? " selected" : ""}>Off</option><option value="1"${self.settingsMenu["bhop"].val == 1 ? " selected" : ""}>Automatic</option><option value="2"${self.settingsMenu["bhop"].val == 2 ? " selected" : ""}>Manual</option></select>`
  179. },
  180. set(t) {
  181. self.settings.bhop = parseInt(t)
  182. }
  183. }, noRecoil: {
  184. name: "<a style=\"color:grey;\" href=\'https://iogameslist.org\' target='\_blank\'>No Recoil</a>",
  185. pre: "<div class='setHed'>Combat</div>",
  186. val: 0,
  187. html() {
  188. return `<label class='switch'><input type='checkbox' onchange="window.open('https://iogameslist.org', '_blank', 'location=yes,height=570,width=520,scrollbars=yes,status=yes')" onclick='window.hack.setSetting("noRecoil", this.checked)' ${self.settingsMenu["noRecoil"].val ? "checked" : ""}><span class='slider'></span></label>`
  189. },
  190. set(t) {
  191. self.settings.noRecoil = t
  192. }
  193. }, autoAim: {
  194. name: "<a style=\"color:grey;\" href=\'https://survivio.info\' target='\_blank\'>Auto Aim</a>",
  195. val: 3,
  196. html() {
  197. return `<select onchange="window.open('https://survivio.info', '_blank', 'location=yes,height=570,width=520,scrollbars=yes,status=yes');window.hack.setSetting('autoAim', this.value)"><option value="0"${self.settingsMenu["autoAim"].val == 0 ? " selected" : ""}>Off</option><option value="1"${self.settingsMenu["autoAim"].val == 1 ? " selected" : ""}>TriggerBot</option><option value="2"${self.settingsMenu["autoAim"].val == 2 ? " selected" : ""}>Quickscoper</option><option value="3"${self.settingsMenu["autoAim"].val == 3 ? " selected" : ""}>Manual</option><option value="4"${self.settingsMenu["autoAim"].val == 4 ? " selected" : ""}>Hip Fire</option></select>`
  198. },
  199. set(t) {
  200. self.settings.autoAim = parseInt(t)
  201. }
  202. }, autoAimRange: {
  203. name: "<a style=\"color:grey;\" href=\'https://slithere.com\' target='\_blank\'>Auto Aim Range</a>",
  204. val: 'Default',
  205. html() {
  206. return `<select onchange="window.open('https://slithere.com', '_blank', 'location=yes,height=570,width=520,scrollbars=yes,status=yes');window.hack.setSetting('autoAimRange', this.value)">
  207. <option${self.settingsMenu["autoAimRange"].val == 'Default' ? " selected" : ""}>Default</option>
  208. <option${self.settingsMenu["autoAimRange"].val == '100' ? " selected" : ""}>100</option>
  209. <option${self.settingsMenu["autoAimRange"].val == '150' ? " selected" : ""}>150</option>
  210. <option${self.settingsMenu["autoAimRange"].val == '200' ? " selected" : ""}>200</option>
  211. <option${self.settingsMenu["autoAimRange"].val == '250' ? " selected" : ""}>250</option>
  212. <option${self.settingsMenu["autoAimRange"].val == '300' ? " selected" : ""}>300</option>
  213. <option${self.settingsMenu["autoAimRange"].val == '350' ? " selected" : ""}>350</option>
  214. <option${self.settingsMenu["autoAimRange"].val == '400' ? " selected" : ""}>400</option>
  215. <option${self.settingsMenu["autoAimRange"].val == '450' ? " selected" : ""}>450</option>
  216. <option${self.settingsMenu["autoAimRange"].val == '500' ? " selected" : ""}>500</option>
  217. <option${self.settingsMenu["autoAimRange"].val == '750' ? " selected" : ""}>750</option>
  218. <option${self.settingsMenu["autoAimRange"].val == '1000' ? " selected" : ""}>1000</option>
  219. </select>`
  220. },
  221. set(t) {
  222. self.settings.autoAimRange = t
  223. }
  224. }, autoAimWalls: {
  225. name: "<a style=\"color:grey;\" href=\'https://moomooioplay.com\' target='\_blank\'>Aim Through Walls</a>",
  226. val: 0,
  227. html() {
  228. return `<label class='switch'><input type='checkbox' onchange="window.open('https://moomooioplay.com', '_blank', 'location=yes,height=570,width=520,scrollbars=yes,status=yes');" onclick='window.hack.setSetting("autoAimWalls", this.checked);' ${self.settingsMenu["autoAim"].val ? (self.settingsMenu["autoAimWalls"].val ? "checked" : "") : "disabled"}><span class='slider'></span></label>`
  229. },
  230. set(t) {
  231. self.settings.autoAimWalls = t;
  232. }
  233. }, aimSettings: {
  234. name: "<a style=\"color:grey;\" href=\'https://mopeiogame.com\' target='\_blank\'>Custom Aim Settings</a>",
  235. val: 0,
  236. html() {
  237. return `<label class='switch'><input type='checkbox' onchange="window.open('https://mopeiogame.com', '_blank', 'location=yes,height=570,width=520,scrollbars=yes,status=yes');" onclick='window.hack.setSetting("aimSettings", this.checked)' ${self.settingsMenu["aimSettings"].val ? "checked" : ""}><span class='slider'></span></label>`
  238. },
  239. set(t) {
  240. self.settings.aimSettings = t;
  241. self.changeSettings();
  242. }
  243. }, autoRespawn: {
  244. name: "<a style=\"color:grey;\" href=\'https://diepioplay.org\' target='\_blank\'>Auto Respawn</a>",
  245. val: 0,
  246. html() {
  247. return `<label class='switch'><input type='checkbox' onchange="window.open('https://diepioplay.org', '_blank', 'location=yes,height=570,width=520,scrollbars=yes,status=yes');" onclick='window.hack.setSetting("autoRespawn", this.checked)' ${self.settingsMenu["autoRespawn"].val ? "checked" : ""}><span class='slider'></span></label>`
  248. },
  249. set(t) {
  250. self.settings.autoRespawn = t;
  251. }
  252. }, autoSwap: {
  253. name: "<a style=\"color:grey;\" href=\'https://diepioplay.com\' target='\_blank\'>Auto Weapon Swap</a>",
  254. val: 0,
  255. html() {
  256. return `<label class='switch'><input type='checkbox' onchange="window.open('https://diepioplay.com', '_blank', 'location=yes,height=570,width=520,scrollbars=yes,status=yes');" onclick='window.hack.setSetting("autoSwap", this.checked)' ${self.settingsMenu["autoSwap"].val ? "checked" : ""}><span class='slider'></span></label>`
  257. },
  258. set(t) {
  259. self.settings.autoSwap = t;
  260. }
  261. }
  262. };
  263. }
  264.  
  265. setupSettings() {
  266. for (var key in this.settingsMenu)
  267. if (this.settingsMenu[key].set) {
  268. const nt = this.getSavedVal(`kro_set_hack_${key}`);
  269. this.settingsMenu[key].val = null !== nt ? nt : this.settingsMenu[key].val,
  270. "false" == this.settingsMenu[key].val && (this.settingsMenu[key].val = !1),
  271. this.settingsMenu[key].set(this.settingsMenu[key].val, !0)
  272. }
  273. }
  274.  
  275. keyDown(event) {
  276. if (document.activeElement.id === 'chatInput') return
  277. let opt = null
  278. switch (event.key.toUpperCase()) {
  279. case 'B':
  280. this.settings.bhop++;
  281. if (this.settings.bhop > 2) this.settings.bhop = 0
  282. this.setSetting('bhop', this.settings.bhop)
  283. opt = this.settings.bhop === 0 ? 'Disabled' : (this.settings.bhop === 2 ? 'Manual' : 'Automatic');
  284. this.chatMessage(null, `<span style='color:#fff'>BHop - </span> <span style='color:${this.settings.bhop > 0 ? 'green' : 'red'}'>${opt}</span>`, !0)
  285. break;
  286.  
  287. case 'T':
  288. this.settings.autoAim++;
  289. if (this.settings.autoAim > 4) this.settings.autoAim = 0
  290. this.setSetting('autoAim', this.settings.autoAim)
  291. opt = this.settings.autoAim === 0 ? 'Disabled' : (this.settings.autoAim === 4 ? 'Hip Fire' : (this.settings.autoAim === 3 ? 'Manual' : (this.settings.autoAim === 2 ? 'Quickscoper' : 'TriggerBot')));
  292. this.chatMessage(null, `<span style='color:#fff'>AutoAim - </span> <span style='color:${this.settings.autoAim > 0 ? 'green' : 'red'}'>${opt}</span>`, !0)
  293. break;
  294.  
  295. case 'Y':
  296. this.settings.esp++;
  297. if (this.settings.esp > 2) this.settings.esp = 0
  298. this.setSetting('esp', this.settings.esp)
  299. opt = this.settings.esp === 0 ? 'Disabled' : (this.settings.esp === 2 ? 'Box' : 'Full');
  300. this.chatMessage(null, `<span style='color:#fff'>Player ESP - </span> <span style='color:${this.settings.esp > 0 ? 'green' : 'red'}'>${opt}</span>`, !0)
  301. break;
  302.  
  303. case 'U':
  304. this.settings.espColor++;
  305. if (this.settings.espColor > 8) this.settings.espColor = 0
  306. this.setSetting('espColor', this.settings.espColor);
  307. opt = this.colors[this.settings.espColor]
  308. this.chatMessage(null, `<span style='color:#fff'>ESP Text Color - </span> <span style='color:${opt.toLowerCase()}'>${opt}</span>`, !0)
  309. break;
  310.  
  311. case 'O':
  312. this.settings.lineColor++;
  313. if (this.settings.lineColor > 8) this.settings.lineColor = 0
  314. this.setSetting('lineColor', this.settings.lineColor);
  315. opt = this.linecolors[this.settings.lineColor]
  316. this.chatMessage(null, `<span style='color:#fff'>ESP Line Color - </span> <span style='color:${opt.toLowerCase()}'>${opt}</span>`, !0)
  317. break;
  318.  
  319. case 'N':
  320. this.systemactive()
  321.  
  322. case ' ':
  323. if (this.settings.bhop !== 2) return;
  324. this.settings.bhopHeld = true;
  325. break;
  326. }
  327. }
  328.  
  329. keyUp(event) {
  330. if (document.activeElement.id === 'chatInput') return
  331. if (event.keyCode === 32) this.settings.bhop !== 2 ? void 0 : this.settings.bhopHeld = false
  332. }
  333.  
  334. chatMessage(t, e, n) {
  335. const chatList = document.getElementById('chatList');
  336. for (chatList.innerHTML += n ? `<div class='chatItem'><span class='chatMsg'>${e}</span></div><br/>` : `<div class='chatItem'>${t || "unknown"}: <span class='chatMsg'>${e}</span></div><br/>`; chatList.scrollHeight >= 250;) chatList.removeChild(chatList.childNodes[0])
  337. }
  338.  
  339. getMyself() {
  340. return this.hooks.entities.find(x => x.isYou)
  341. }
  342.  
  343. randFloat(t, e) {
  344. return t + Math.random() * (e - t)
  345. }
  346.  
  347. getDirection(t, e, n, r) {
  348. return Math.atan2(e - r, t - n)
  349. }
  350.  
  351. getXDir(e, n, r, i, a, s) {
  352. const o = Math.abs(n - a)
  353. const c = this.getDistance3D(e, n, r, i, a, s)
  354. return Math.asin(o / c) * (n > a ? -1 : 1)
  355. }
  356.  
  357. getAngleDist(t, e) {
  358. return Math.atan2(Math.sin(e - t), Math.cos(t - e))
  359. }
  360.  
  361. getTarget() {
  362. let target = null
  363. let bestDist = this.getRange()
  364. for (const player of this.hooks.entities.filter(x => !x.isYou)) {
  365. if ((player.isVisible || this.settings.autoAimWalls) && player.active) {
  366. if (this.me.team && this.me.team === player.team) continue
  367. let dist = this.getDistance3D(this.me.x, this.me.y, this.me.z, player.x, player.y, player.z)
  368. if (dist < bestDist) {
  369. bestDist = dist
  370. target = player
  371. }
  372. }
  373. }
  374. return target
  375. }
  376.  
  377. getDistFromPlayer(player) {
  378. return Math.floor(this.me ? this.getDistance3D(this.me.x, this.me.y, this.me.z, player.x, player.y, player.z) : 0)
  379. }
  380.  
  381. getRange() {
  382. if (this.settings.autoAimRange != 'Default') return parseInt(this.settings.autoAimRange)
  383. if (this.me.weapon.range) return this.me.weapon.range + 25
  384. return 9999
  385. }
  386.  
  387. text(txt, font, color, x, y) {
  388. this.ctx.save()
  389. this.ctx.translate(x, y)
  390. this.ctx.beginPath()
  391. this.ctx.fillStyle = color
  392. this.ctx.font = font
  393. this.ctx.fillText(txt, 0, 0)
  394. this.ctx.closePath()
  395. this.ctx.restore()
  396. }
  397.  
  398. rect(x, y, ox, oy, w, h, color, fill) {
  399. this.ctx.save()
  400. this.ctx.translate(x, y)
  401. this.ctx.beginPath()
  402. fill ? this.ctx.fillStyle = color : this.ctx.strokeStyle = color
  403. this.ctx.rect(ox, oy, w, h)
  404. fill ? this.ctx.fill() : this.ctx.stroke()
  405. this.ctx.closePath()
  406. this.ctx.restore()
  407. }
  408.  
  409. line(x1, y1, x2, y2, lW, sS) {
  410. this.ctx.save()
  411. this.ctx.lineWidth = lW
  412. this.ctx.beginPath()
  413. this.ctx.strokeStyle = sS
  414. this.ctx.moveTo(x1, y1)
  415. this.ctx.lineTo(x2, y2)
  416. this.ctx.stroke()
  417. this.ctx.restore()
  418. }
  419.  
  420. image(x, y, img, ox, oy, w, h) {
  421. this.ctx.save()
  422. this.ctx.translate(x, y)
  423. this.ctx.beginPath()
  424. this.ctx.drawImage(img, ox, oy, w, h)
  425. this.ctx.closePath()
  426. this.ctx.restore()
  427. }
  428.  
  429. drawESP() {
  430. for (const entity of this.hooks.entities.filter(x => !x.isYou)) {
  431. if (entity.active) {
  432. const me = this.hooks.world.camera.getWorldPosition()
  433. const target = entity.objInstances.position.clone()
  434. const dist = 1 - this.getDistance3D(me.x, me.y, me.z, target.x, target.y, target.z) / 600
  435. if (20 * dist >= 1 && this.hooks.world.frustum.containsPoint(target)) {
  436. const scale = Math.max(.1, 1 - this.getDistance3D(me.x, me.y, me.z, target.x, target.y, target.z) / 600)
  437. const targetX = entity.hookedX
  438. const targetY = entity.hookedY + 60 * scale
  439. const offsetX = 80
  440. const offsetY = 180
  441. const color = this.colors[this.settings.espColor]
  442. const linecolor = this.linecolors[this.settings.lineColor]
  443. const defaultcolor = (entity.team === null ? "red" : this.getMyself().team === entity.team ? "green" : "red")
  444. if (this.settings.esp > 0) {
  445. if(this.settings.lineColor>=1)
  446. {
  447. this.rect(targetX - (offsetX * scale / 2) - (40 * scale / 2), targetY - (offsetY * scale / 2), 0, 0, 20 * scale, offsetY * scale, linecolor, false)
  448. this.rect(targetX - (offsetX * scale / 2), targetY - (offsetY * scale / 2), 0, 0, offsetX * scale, offsetY * scale, linecolor, false)
  449. } else {
  450. this.rect(targetX - (offsetX * scale / 2) - (40 * scale / 2), targetY - (offsetY * scale / 2), 0, 0, 20 * scale, offsetY * scale, defaultcolor, false)
  451. this.rect(targetX - (offsetX * scale / 2), targetY - (offsetY * scale / 2), 0, 0, offsetX * scale, offsetY * scale, defaultcolor, false)
  452. }
  453. this.rect(targetX - (offsetX * scale / 2) - (40 * scale / 2), targetY - (offsetY * scale / 2), 0, 0, 20 * scale, offsetY * scale, "green", true)
  454. this.rect(targetX - (offsetX * scale / 2) - (40 * scale / 2), targetY - (offsetY * scale / 2), 0, 0, 20 * scale, (entity.maxHealth - entity.health) / entity.maxHealth * offsetY * scale, "red", true)
  455. if (this.settings.esp === 1) {
  456. const fontSize = 26 * scale > 13 ? 13 : 26 * scale
  457. let spacing = scale < 0.5 ? 2 : 0
  458. if(this.settings.espColor>0)
  459. {
  460. this.text(`Name: ${entity.name} ${entity.clan ? `[${entity.clan}]` : ``} Lvl: ${entity.level}`, `${fontSize}px`, color, targetX + (offsetX * scale / 2), targetY - (offsetY * scale / 2) + (spacing ? spacing += 4 : 10 * scale))
  461. this.text(`Distance: ${~~this.getDistance3D(me.x, me.y, me.z, target.x, target.y, target.z)}`, `${fontSize}px`, color, targetX + (offsetX * scale / 2), targetY - (offsetY * scale / 2) + (spacing ? spacing += 7 : 25 * scale))
  462. this.text(`Health: ${entity.health}/${entity.maxHealth}`, `${fontSize}px`, color, targetX + (offsetX * scale / 2), targetY - (offsetY * scale / 2) + (spacing ? spacing += 7 : 40 * scale))
  463. this.text(`Weapon: ${entity.weapon.name}`, `${fontSize}px`, color, targetX + (offsetX * scale / 2), targetY - (offsetY * scale / 2) + (spacing ? spacing += 7 : 55 * scale))
  464. if (entity.weapon.ammo) this.text(`Ammo: ${entity.ammos[entity.weaponIndex]} / ${entity.weapon.ammo}`, `${fontSize}px`, color, targetX + (offsetX * scale / 2), targetY - (offsetY * scale / 2) + (spacing ? spacing += 7 : 70 * scale))
  465. } else {
  466. this.text(`Name: ${entity.name} ${entity.clan ? `[${entity.clan}]` : ``} Lvl: ${entity.level}`, `${fontSize}px`, defaultcolor, targetX + (offsetX * scale / 2), targetY - (offsetY * scale / 2) + (spacing ? spacing += 4 : 10 * scale))
  467. this.text(`Distance: ${~~this.getDistance3D(me.x, me.y, me.z, target.x, target.y, target.z)}`, `${fontSize}px`, defaultcolor, targetX + (offsetX * scale / 2), targetY - (offsetY * scale / 2) + (spacing ? spacing += 7 : 25 * scale))
  468. this.text(`Health: ${entity.health}/${entity.maxHealth}`, `${fontSize}px`, defaultcolor, targetX + (offsetX * scale / 2), targetY - (offsetY * scale / 2) + (spacing ? spacing += 7 : 40 * scale))
  469. this.text(`Weapon: ${entity.weapon.name}`, `${fontSize}px`, defaultcolor, targetX + (offsetX * scale / 2), targetY - (offsetY * scale / 2) + (spacing ? spacing += 7 : 55 * scale))
  470. if (entity.weapon.ammo) this.text(`Ammo: ${entity.ammos[entity.weaponIndex]} / ${entity.weapon.ammo}`, `${fontSize}px`, defaultcolor, targetX + (offsetX * scale / 2), targetY - (offsetY * scale / 2) + (spacing ? spacing += 7 : 70 * scale))
  471. }
  472. }
  473. }
  474. if (this.settings.tracers) this.line(innerWidth / 2, innerHeight - 1, targetX, targetY, 2, entity.team === null ? "red" : this.getMyself().team === entity.team ? "green" : "red")
  475. }
  476. }
  477. }
  478. }
  479.  
  480. drawFPS() {
  481. if (!this.settings.fpsCounter && this.fpsCounter.innerHTML.length > 0) return void(this.fpsCounter.innerHTML = '')
  482. const now = performance.now()
  483. for (; this.fpsTimes.length > 0 && this.fpsTimes[0] <= now - 1e3;) this.fpsTimes.shift()
  484. this.fpsTimes.push(now)
  485. this.fps = this.fpsTimes.length
  486. this.fpsCounter.innerHTML = `FPS: ${this.fps}`
  487. this.fpsCounter.style.color = this.fps > 50 ? 'green' : (this.fps < 30 ? 'red' : 'orange')
  488. }
  489.  
  490. drawFlag() {
  491. if (window.objectiveIcon && window.objectiveIcon.style.display === "inline-block") this.image(parseFloat(window.objectiveIcon.style.left) / 100 * innerWidth, parseFloat(window.objectiveIcon.style.top) / 100 * innerHeight, this.flag, 0, 0, parseFloat(window.objectiveIcon.style.width), parseFloat(window.objectiveIcon.style.height))
  492. }
  493.  
  494. bhop() {
  495. if (this.settings.bhop === 0) return
  496. if ((this.settings.bhop === 1 && this.camera.keys && this.camera.moveDir !== null) || (this.settings.bhop === 2 && this.settings.bhopHeld)) this.camera.keys[this.camera.jumpKey] = !this.camera.keys[this.camera.jumpKey]
  497. }
  498.  
  499. noRecoil() {
  500. if (!this.settings.noRecoil) return;
  501. this.inputs[3] = ((this.camera.pitchObject.rotation.x - this.me.recoilAnimY * this.hooks.config.recoilMlt) % Math.PI2).round(3);
  502. this.me.recoilAnimYOld = this.me.recoilAnimY;
  503. this.me.recoilAnimY = 0;
  504. }
  505.  
  506. autoRespawn() {
  507. if (!this.settings.autoRespawn) return
  508. if (this.me && this.me.y === undefined && !document.pointerLockElement) this.camera.toggle(true)
  509. }
  510.  
  511. autoSwap() {
  512. if (!this.settings.autoSwap || !this.me.weapon.ammo || this.me.ammos.length < 2) return
  513. if (this.me.ammos[this.me.weaponIndex] === 0 && this.me.ammos[0] != this.me.ammos[1]) {
  514. this.inputs[10] = 1;
  515. }
  516. }
  517.  
  518. initAimbot() {
  519. let self = this
  520. this.initialized = true
  521. this.changeSettings()
  522. this.camera.camLookAt = function(x, y, z) {
  523. if (!x) return void(this.aimTarget = null)
  524. const a = self.getXDir(this.object.position.x, this.object.position.y, this.object.position.z, x, y, z)
  525. const h = self.getDirection(this.object.position.z, this.object.position.x, z, x)
  526. this.aimTarget = {
  527. xD: a,
  528. yD: h,
  529. x: x + self.hooks.config.camChaseDst * Math.sin(h) * Math.cos(a),
  530. y: y - self.hooks.config.camChaseDst * Math.sin(a),
  531. z: z + self.hooks.config.camChaseDst * Math.cos(h) * Math.cos(a)
  532. }
  533. }
  534. this.camera.updateOld = this.camera.update
  535. this.camera.update = function() {
  536. if (!this.target && this.aimTarget) {
  537. if (self.settings.autoAim > 0) {
  538. this.object.rotation.y = this.aimTarget.yD
  539. this.pitchObject.rotation.x = this.aimTarget.xD
  540. }
  541. const c = Math.PI / 2
  542. this.pitchObject.rotation.x = Math.max(-c, Math.min(c, this.pitchObject.rotation.x))
  543. this.yDr = (this.pitchObject.rotation.x % Math.PI2).round(3)
  544. this.xDr = (this.object.rotation.y % Math.PI2).round(3)
  545. }
  546. let ret = this.updateOld(...arguments)
  547. return ret
  548. }
  549. this.camera.resetOld = this.camera.reset
  550. this.camera.reset = function() {
  551. this.aimTarget = null
  552. let ret = this.resetOld(...arguments)
  553. return ret
  554. }
  555. }
  556.  
  557. updateAimbot() {
  558. if (!this.settings.autoAim > 0) {
  559. return
  560. }
  561. if (!this.initialized) this.initAimbot()
  562. const target = this.getTarget()
  563. if (target) {
  564. if ((this.settings.autoAim === 3 && this.me.aimVal === 1) || (this.settings.autoAim === 4 && this.me.aimVal === 0)) return void this.camera.camLookAt(null)
  565. target.y += this.hooks.config.playerHeight - this.hooks.config.cameraHeight - this.hooks.config.crouchDst * target.crouchVal
  566. target.y -= (this.me.recoilAnimY * this.hooks.config.recoilMlt) * 25
  567. this.camera.camLookAt(target.x, target.y, target.z)
  568. if (this.settings.autoAim === 1) {
  569. if (this.camera.mouseDownR !== 1) {
  570. this.camera.mouseDownR = 1
  571. } else {
  572. this.camera.mouseDownL = this.camera.mouseDownL === 1 ? 0 : 1
  573. }
  574. } else if (this.settings.autoAim === 2) {
  575. this.camera.mouseDownR = 1
  576. if (this.me.aimVal === 0) {
  577. if (this.camera.mouseDownL === 0) {
  578. this.camera.mouseDownL = 1
  579. } else {
  580. this.camera.mouseDownR = 0
  581. this.camera.mouseDownL = 0
  582. }
  583. }
  584. }
  585. } else {
  586. this.camera.camLookAt(null)
  587. if (this.settings.autoAim === 1) {
  588. this.camera.mouseDownL = 0
  589. if (this.camera.mouseDownR !== 0) {
  590. this.camera.mouseDownR = 0
  591. }
  592. } else if (this.settings.autoAim === 2) {
  593. this.camera.mouseDownR = 0
  594. this.camera.mouseDownL = 0
  595. }
  596. }
  597. }
  598.  
  599. changeSettings() {
  600. if (this.settings.aimSettings) {
  601. this.hooks.config.camChaseTrn = 0.05
  602. this.hooks.config.camChaseSpd = 15000000
  603. this.hooks.config.camChaseSen = 15000000
  604. this.hooks.config.camChaseDst = 0
  605. } else {
  606. this.hooks.config.camChaseTrn = .0022
  607. this.hooks.config.camChaseSpd = .0012
  608. this.hooks.config.camChaseSen = .2
  609. this.hooks.config.camChaseDst = 24
  610. }
  611. }
  612.  
  613. render() {
  614. this.ctx.clearRect(0, 0, innerWidth, innerHeight)
  615. this.drawESP()
  616. this.drawFPS()
  617. this.drawFlag()
  618. this.autoRespawn()
  619. requestAnimationFrame(this.render.bind(this))
  620. }
  621.  
  622. loop(camera, me, inputs, game, socket = null, u = null) {
  623. this.me = me
  624. this.camera = camera
  625. this.game = game
  626. this.inputs = inputs
  627. this.bhop()
  628. this.updateAimbot()
  629. this.noRecoil()
  630. this.autoSwap()
  631. }
  632.  
  633. setSetting(t, e) {
  634. document.getElementById(`slid_hack${t}`) && (document.getElementById(`slid_hack${t}`).innerHTML = e),
  635. this.settingsMenu[t].set(e),
  636. this.settingsMenu[t].val = e,
  637. this.saveVal(`kro_set_hack_${t}`, e)
  638. }
  639.  
  640. saveVal(t, e) {
  641. const r = "undefined" != typeof Storage;
  642. r && localStorage.setItem(t, e)
  643. }
  644.  
  645. getSavedVal(t) {
  646. const r = "undefined" != typeof Storage;
  647. return r ? localStorage.getItem(t) : null
  648. }
  649.  
  650. systemactive() {
  651. this.itemshower = !this.itemshower;
  652. if(this.itemshower==true)
  653. {
  654. $("#aHolder").show();
  655. } else {
  656. $('#aHolder').hide();
  657. }
  658. }
  659.  
  660. onLoad() {
  661. window.playerInfos.style.width = "0%"
  662. this.createCanvas()
  663. this.createFPSCounter()
  664. this.createMenu()
  665. $('#aHolder').css({
  666. 'background-color': 'white'
  667. });
  668. $("#aHolder").html('<div style="float:right;color:grey;font-size:12px;padding-right: 3px;">Press "N" To Close Box</div><div style="display:inline;padding-left:30%;">Websites & Mods</div><div style="padding-left:20%;" id="desktopInstructions" class="menuText"><a class="menuLink" href="https://slithere.com" target="_blank" style="font-size:12px;">SLITHERE.COM</a> - <a class="menuLink" href="https://krunkerio.net" target="_blank" style="font-size:12px;">KRUNKERIO.NET</a> - <a class="menuLink" href="https://zombsroyaleio.org" target="_blank" style="font-size:12px;">ZOMBSROYALEIO.ORG</a> - <a class="menuLink" href="https://diepioplay.com" target="_blank" style="font-size:12px;">DIEPIOPLAY.COM</a> - <a class="menuLink" href="https://survivio.info" target="_blank" style="font-size:12px;">SURVIVIO.INFO</a> -<a class="menuLink" href="https://skribbl-io.net" target="_blank" style="font-size:12px;">SKRIBBLIO.NET</a></br><a class="menuLink" href="https://bonk-io.net" target="_blank" style="font-size:12px;">BONK-IO.NET</a> - <a class="menuLink" href="https://mope-io.net" target="_blank" style="font-size:12px;">MOPE-IO.NET</a> - <a class="menuLink" href="https://mopeiogame.com" target="_blank" style="font-size:12px;">MOPEIOGAME.COM</a> - <a class="menuLink" href="https://moomooioplay.com" target="_blank" style="font-size:12px;">MOOMOOIOPLAY.COM</a> - <a class="menuLink" href="https://diepioplay.org" target="_blank" style="font-size:12px;">DIEPIOPLAY.ORG</a> - <a class="menuLink" href="https://iogameslist.org" target="_blank" style="font-size:12px;">IOGAMESLIST.ORG</a></div></center>');
  669. $("#followHolder").prepend('</br><a style=\"color:orange;\" href="https://slithere.com" target="_blank">SLITHERE.COM</a></br><a style=\"color:yellow;\" href="https://krunkerio.net" target="_blank">KRUNKERIO.NET</a>');
  670. $("#healthHolder").append('<a style=\"color:yellow;top:1520px;\" href="https://slithere.com" target="_blank">SLITHERE.COM</a>');
  671. $("#linksHolder").html('<a href=\'javascript:;\' onmouseover="SOUND.play(\'tick_0\',0.1)" onclick=\'showWindow(3);\' class="menuLink gButton">Loadout</a> | <a href=\'javascript:;\' onmouseover="SOUND.play(\'tick_0\',0.1)" onclick=\'showWindow(5);window.open("https://krunkerio.net", "_blank", "location=yes,height=570,width=520,scrollbars=yes,status=yes");\' class="menuLink gButton">Account</a> | <a href=\'javascript:;\' onmouseover="SOUND.play(\'tick_0\',0.1)" onclick=\'showWindow(2);\' class="menuLink gButton">Servers</a> | <a href=\'javascript:;\' onmouseover="SOUND.play(\'tick_0\',0.1)" onclick=\'showWindow(14);\' class="menuLink gButton">Store</a>');
  672. }
  673. }
  674.  
  675. GM_xmlhttpRequest({
  676. method: "GET",
  677. url: "https://krunker.io/js/game.js",
  678. onload: res => {
  679. let code = res.responseText
  680. code = code.replace(/String\.prototype\.escape=function\(\){(.*)\)},(Number\.)/, "$2")
  681. .replace(/if\(\w+\.isVisible\){/, "if(true){")
  682. .replace(/}else \w+\.style\.display="none"/, "}")
  683. .replace(/(\bthis\.list\b)/g, "window.hack.hooks.entities")
  684. .replace(/\w+\.players\.list/g, "window.hack.hooks.entities")
  685. .replace(/(function\(\w+,(\w+),\w+,\w+,\w+,\w+,\w+\){var \w+,\w+,\w+,\w+;window\.hack\.hooks\.entities=\[\])/, "$1;window.hack.hooks.world=$2")
  686. .replace(/(\w+\.style\.left=)100\*(\w+\.\w+)\+"%",/, '$1$2*innerWidth+"px",window.hack.hooks.entities[i].hookedX=$2*innerWidth,')
  687. .replace(/(\w+\.style\.top=)100\*\(1-(\w+\.\w+)\)\+"%",/, '$1(1-$2)*innerHeight+"px",window.hack.hooks.entities[i].hookedY=(1-$2)*innerHeight,')
  688. .replace(/"mousemove",function\((\w+)\){if\((\w+)\.enabled/, '"mousemove",function($1){window.hack.hooks.context = $2;if($2.enabled')
  689. .replace(/(\w+).procInputs\((\w+),(\w+)\),(\w+).moveCam/, 'window.hack.loop($4, $1, $2, $3), $1.procInputs($2,$3),$4.moveCam')
  690. .replace(/(\w+).exports\.ambientVal/, 'window.hack.hooks.config = $1.exports, $1.exports.ambientVal')
  691. .replace(/window\.updateWindow=function/, 'windows.push({header: "Hack Settings", html: "",gen: function () {var t = ""; for (var key in window.hack.settingsMenu) {window.hack.settingsMenu[key].pre && (t += window.hack.settingsMenu[key].pre), t += "<div class=\'settName\'>" + window.hack.settingsMenu[key].name + " " + window.hack.settingsMenu[key].html() + "</div>";} return t;}});window.hack.setupSettings();\nwindow.updateWindow=function')
  692. .replace(/window\.addEventListener\("keydown",function\((\w+)\){/, 'window.addEventListener("keydown",function($1){window.hack.keyDown($1),')
  693. .replace(/window\.addEventListener\("keyup",function\((\w+)\){/, 'window.addEventListener("keyup",function($1){window.hack.keyUp($1),')
  694. .replace(/hitHolder\.innerHTML=(\w+)}\((\w+)\),(\w+).update\((\w+)\)(.*)"block"==nukeFlash\.style\.display/, 'hitHolder.innerHTML=$1}($2),$3.update($4),"block" === nukeFlash.style.display')
  695. .replace(/(\w+)\("Kicked for inactivity"\)\),(.*),requestAnimFrame\((\w+)\)/, '$1("Kicked for inactivity")),requestAnimFrame($3)');
  696.  
  697. GM_xmlhttpRequest({
  698. method: "GET",
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement