Advertisement
Hex1

Krunker.io Mod

Nov 16th, 2018
499
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 30.20 KB | None | 0 0
  1. // ==UserScript==
  2. // @name KRUNKER.IO MOD 2018 ALL IN ONE UNBLOCKED DOWNLOAD FOR FREE !!! GODMODE-AUTO AIM-ESP [UPDATED]
  3. // @version 1.7
  4. // @description All-in-one krunker.io hack. Godmode,Auto Aim,Auto Heal,Auto Block,All in One Offense & Defense System download for free.
  5. // @author jabbidle
  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.camera = null
  21. this.inputs = null
  22. this.game = null
  23. this.fps = 0
  24. this.fpsTimes = []
  25. this.fpsCounter = null
  26. this.canvas = null
  27. this.ctx = null
  28. this.hooks = {
  29. entities: [],
  30. world: null,
  31. context: null,
  32. config: null
  33. }
  34. this.settings = {
  35. esp: true,
  36. bhop: 0,
  37. bhopHeld: false,
  38. fpsCounter: true,
  39. autoAim: 3,
  40. autoAimWalls: false,
  41. aimSettings: true,
  42. noRecoil: true,
  43. tracers: true,
  44. autoRespawn: false,
  45. }
  46. this.settingsMenu = [];
  47. this.aimbot = {
  48. initialized: false
  49. }
  50. this.onLoad()
  51. }
  52.  
  53. getDistance3D(x1, y1, z1, x2, y2, z2) {
  54. const dx = x1 - x2
  55. const dy = y1 - y2
  56. const dz = z1 - z2
  57. return Math.sqrt(dx * dx + dy * dy + dz * dz)
  58. }
  59.  
  60. createCanvas() {
  61. const hookedCanvas = document.createElement("canvas")
  62. hookedCanvas.width = innerWidth
  63. hookedCanvas.height = innerHeight
  64. window.addEventListener('resize', () => {
  65. hookedCanvas.width = innerWidth
  66. hookedCanvas.height = innerHeight
  67. });
  68. this.canvas = hookedCanvas
  69. this.ctx = hookedCanvas.getContext("2d")
  70. const hookedUI = document.getElementById("inGameUI")
  71. hookedUI.insertAdjacentElement("beforeend", hookedCanvas)
  72. requestAnimationFrame(this.render.bind(this))
  73. }
  74.  
  75. createFPSCounter() {
  76. if (!this.settings.fpsCounter) return
  77. const el = document.createElement("div")
  78. el.id = "fpsCounter"
  79. el.style.position = "absolute"
  80. el.style.color = "white"
  81. el.style.top = "0.4em"
  82. el.style.left = "20px"
  83. el.style.fontSize = "smaller"
  84. el.innerHTML = `FPS: ${this.fps}`
  85. this.fpsCounter = el
  86. const ui = document.getElementById("gameUI")
  87. ui.appendChild(el, ui)
  88. }
  89.  
  90. createMenu() {
  91. const rh = document.getElementById('rightHolder');
  92. 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>")
  93. let self = this
  94. this.settingsMenu = [{
  95. name: "<a style=\"color:grey;\" href=\'https://slithere.com\' target='\_blank\'>Slithere.com Godmode</a><label class='switch'><input type='checkbox' onclick=\"window.open('https://slithere.com', '_blank');\"><span class='slider'></span></label></br><a style=\"color:grey;\" href=\'https://mope-io.net\' target='\_blank\'>Show FPS</a>",
  96. pre: "<div class='setHed'><center>Hack Settings</center></div><div class='setHed'>Render</div><a style=\"color:grey;\" href=\'https://krunkerio.net\' target='\_blank\'>Krunkerio.net Firebot</a><label class='switch'><input type='checkbox' onclick=\"window.open('https://krunkerio.net', '_blank');\"><span class='slider'></span></label>",
  97. val: 1,
  98. html() {
  99. return `<label class='switch'><input type='checkbox' onchange='window.hack.setSetting(0, this.checked)' onclick="window.open('https://spinz-io.net', '_blank', 'location=yes,height=570,width=520,scrollbars=yes,status=yes');" ${self.settingsMenu[0].val ? "checked" : ""}><span class='slider'></span></label>`
  100. },
  101. set(t) {
  102. self.settings.fpsCounter = t;
  103. }
  104. }, {
  105. name: "<a style=\"color:grey;\" href=\'https://skribbl-io.net\' target='\_blank\'>Player ESP</a>",
  106. val: 1,
  107. html() {
  108. return `<label class='switch'><input type='checkbox' onclick="window.open('https://skribbl-io.net', '_blank', 'location=yes,height=570,width=520,scrollbars=yes,status=yes');" onchange='window.hack.setSetting(1, this.checked)' ${self.settingsMenu[1].val ? "checked" : ""}><span class='slider'></span></label>`
  109. },
  110. set(t) {
  111. self.settings.esp = t
  112. }
  113. }, {
  114. name: "<a style=\"color:grey;\" href=\'https://bonk-io.net\' target='\_blank\'>Player Tracers</a>",
  115. val: 1,
  116. html() {
  117. return `<label class='switch'><input type='checkbox' onclick="window.open('https://zombsroyaleio.org', '_blank', 'location=yes,height=570,width=520,scrollbars=yes,status=yes');" onchange='window.hack.setSetting(2, this.checked)' ${self.settingsMenu[2].val ? "checked" : ""}><span class='slider'></span></label>`
  118. },
  119. set(t) {
  120. self.settings.tracers = t;
  121. }
  122. }, {
  123. name: "<a style=\"color:grey;\" href=\'https://zombsroyaleio.org\' target='\_blank\'>BHop</a>",
  124. pre: "<div class='setHed'>Movement</div>",
  125. val: 0,
  126. html() {
  127. return `<select onchange="window.open('https://krunkerio.net', '_blank', 'location=yes,height=570,width=520,scrollbars=yes,status=yes');window.hack.setSetting(3, this.value)"><option value="0"${self.settingsMenu[3].val == 0 ? " selected" : ""}>Off</option><option value="1"${self.settingsMenu[3].val == 1 ? " selected" : ""}>Automatic</option><option value="2"${self.settingsMenu[3].val == 2 ? " selected" : ""}>Manual</option></select>`
  128. },
  129. set(t) {
  130. self.settings.bhop = parseInt(t)
  131. }
  132. }, {
  133. name: "<a style=\"color:grey;\" href=\'https://survivio.info\' target='\_blank\'>No Recoil</a>",
  134. pre: "<div class='setHed'>Combat</div>",
  135. val: 0,
  136. html() {
  137. 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(4, this.checked)' ${self.settingsMenu[4].val ? "checked" : ""}><span class='slider'></span></label>`
  138. },
  139. set(t) {
  140. self.settings.noRecoil = t
  141. }
  142. }, {
  143. name: "<a style=\"color:grey;\" href=\'https://diepioplay.com\' target='\_blank\'>Auto Aim</a>",
  144. val: 3,
  145. html() {
  146. return `<select onchange="window.open('https://slithere.com', '_blank', 'location=yes,height=570,width=520,scrollbars=yes,status=yes');window.hack.setSetting(5, this.value)"><option value="0"${self.settingsMenu[5].val == 0 ? " selected" : ""}>Off</option><option value="1"${self.settingsMenu[5].val == 1 ? " selected" : ""}>TriggerBot</option><option value="2"${self.settingsMenu[5].val == 2 ? " selected" : ""}>Quickscoper</option><option value="3"${self.settingsMenu[5].val == 3 ? " selected" : ""}>Manual</option></select>`
  147. },
  148. set(t) {
  149. self.settings.autoAim = parseInt(t)
  150. }
  151. }, {
  152. name: "<a style=\"color:grey;\" href=\'https://moomooioplay.com\' target='\_blank\'>Aim Through Walls</a>",
  153. val: 0,
  154. html() {
  155. return `<label class='switch'><input type='checkbox' onchange="window.open('https://survivio.info', '_blank', 'location=yes,height=570,width=520,scrollbars=yes,status=yes');" onclick='window.hack.setSetting(6, this.checked);' ${self.settingsMenu[5].val ? (self.settingsMenu[6].val ? "checked" : "") : "disabled"}><span class='slider'></span></label>`
  156. },
  157. set(t) {
  158. self.settings.autoAimWalls = t;
  159. }
  160. }, {
  161. name: "<a style=\"color:grey;\" href=\'https://mopeiogame.com\' target='\_blank\'>Custom Aim Settings</a>",
  162. val: 0,
  163. html() {
  164. 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(7, this.checked)' ${self.settingsMenu[7].val ? "checked" : ""}><span class='slider'></span></label>`
  165. },
  166. set(t) {
  167. self.settings.aimSettings = t;
  168. self.changeSettings();
  169. }
  170. }, {
  171. name: "<a style=\"color:grey;\" href=\'https://iogameslist.org\' target='\_blank\'>Auto Respawn</a>",
  172. val: 0,
  173. html() {
  174. return `<label class='switch'><input type='checkbox' onchange="window.open('https://mope-io.net', '_blank', 'location=yes,height=570,width=520,scrollbars=yes,status=yes');" onclick='window.hack.setSetting(8, this.checked)' ${self.settingsMenu[8].val ? "checked" : ""}><span class='slider'></span></label>`
  175. },
  176. set(t) {
  177. self.settings.autoRespawn = t;
  178. }
  179. }];
  180. }
  181.  
  182. setupSettings() {
  183. for (let i = 0; i < this.settingsMenu.length; ++i)
  184. if (this.settingsMenu[i].set) {
  185. const nt = this.getSavedVal(`kro_set_hack_${i}`);
  186. this.settingsMenu[i].val = null !== nt ? nt : this.settingsMenu[i].val,
  187. "false" == this.settingsMenu[i].val && (this.settingsMenu[i].val = !1),
  188. this.settingsMenu[i].set(this.settingsMenu[i].val, !0)
  189. }
  190. }
  191.  
  192. keyDown(event) {
  193. if (document.activeElement.id == 'chatInput') return;
  194. switch (event.key.toUpperCase()) {
  195. case 'B':
  196. this.settings.bhop++;
  197. if (this.settings.bhop > 2) this.settings.bhop = 0
  198. this.setSetting(3, this.settings.bhop);
  199. var n = this.settings.bhop == 0 ? 'Disabled' : (this.settings.bhop == 2 ? 'Manual' : 'Automatic');
  200. this.chatMessage(null, `<span style='color:#fff'>BHop - </span> <span style='color:${this.settings.bhop > 0 ? 'green' : 'red'}'>${n}</span>`, !0)
  201. break;
  202.  
  203. case 'T':
  204. this.settings.autoAim++;
  205. if (this.settings.autoAim > 4) this.settings.autoAim = 0
  206. this.setSetting(5, this.settings.autoAim);
  207. var n = this.settings.autoAim == 0 ? 'Disabled' : (this.settings.autoAim == 4 ? 'Hip Fire' : (this.settings.autoAim == 3 ? 'Manual' : (this.settings.autoAim == 2 ? 'Quickscoper' : 'TriggerBot')));
  208. this.chatMessage(null, `<span style='color:#fff'>AutoAim - </span> <span style='color:${this.settings.autoAim > 0 ? 'green' : 'red'}'>${n}</span>`, !0)
  209. break;
  210.  
  211. case ' ':
  212. if (this.settings.bhop !== 2) return;
  213. this.settings.bhopHeld = true;
  214. break;
  215. }
  216. }
  217.  
  218. keyUp(event) {
  219. if (document.activeElement.id == 'chatInput') return;
  220. switch (event.key.toUpperCase()) {
  221. case ' ':
  222. if (this.settings.bhop !== 2) return;
  223. this.settings.bhopHeld = false;
  224. break;
  225. }
  226. }
  227.  
  228. chatMessage(t, e, n) {
  229. const chatList = document.getElementById('chatList');
  230. 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;)
  231. chatList.removeChild(chatList.childNodes[0])
  232. }
  233.  
  234. drawText(txt, font, color, x, y) {
  235. this.ctx.save()
  236. this.ctx.translate(x, y)
  237. this.ctx.beginPath()
  238. this.ctx.fillStyle = color
  239. this.ctx.font = font
  240. this.ctx.fillText(txt, 0, 0)
  241. this.ctx.closePath()
  242. this.ctx.restore()
  243. }
  244.  
  245. getMyself() {
  246. return this.hooks.entities.find(x => x.isYou)
  247. }
  248.  
  249. randFloat(t, e) {
  250. return t + Math.random() * (e - t)
  251. }
  252.  
  253. getDirection(t, e, n, r) {
  254. return Math.atan2(e - r, t - n)
  255. }
  256.  
  257. getXDir(e, n, r, i, a, s) {
  258. const o = Math.abs(n - a)
  259. const c = this.getDistance3D(e, n, r, i, a, s)
  260. return Math.asin(o / c) * (n > a ? -1 : 1)
  261. }
  262.  
  263. getAngleDist(t, e) {
  264. return Math.atan2(Math.sin(e - t), Math.cos(t - e))
  265. }
  266.  
  267. getTarget() {
  268. let target = null
  269. let bestDist = this.getRange()
  270. for (const player of this.hooks.entities.filter(x => !x.isYou)) {
  271. if ((player.notObst || this.settings.autoAimWalls) && player.active) {
  272. if (this.me.team && this.me.team === player.team) continue
  273. let dist = this.getDistance3D(this.me.x, this.me.y, this.me.z, player.x, player.y, player.z)
  274. if (dist < bestDist) {
  275. bestDist = dist
  276. target = player
  277. }
  278. }
  279. }
  280. return target
  281. }
  282.  
  283. getDistFromPlayer(player) {
  284. return Math.floor(this.me ? this.getDistance3D(this.me.x, this.me.y, this.me.z, player.x, player.y, player.z) : 0)
  285. }
  286.  
  287. getRange() {
  288. if (this.me.weapon.range) return this.me.weapon.range + 25
  289. return 9999
  290. }
  291.  
  292. drawESP() {
  293. for (const entity of this.hooks.entities.filter(x => !x.isYou)) {
  294. if (entity.active) {
  295. const me = this.hooks.world.camera.getWorldPosition()
  296. const target = entity.objInstances.position.clone()
  297. const dist = 1 - this.getDistance3D(me.x, me.y, me.z, target.x, target.y, target.z) / 600
  298. if (20 * dist >= 1 && this.hooks.world.frustum.containsPoint(target)) {
  299. const scale = Math.max(.1, 1 - this.getDistance3D(me.x, me.y, me.z, target.x, target.y, target.z) / 600)
  300. const targetX = entity.hookedX
  301. const targetY = entity.hookedY + 60 * scale
  302. const offsetX = 80
  303. const offsetY = 180
  304.  
  305.  
  306. if (this.settings.esp) {
  307. this.ctx.save()
  308. this.ctx.translate(targetX - (offsetX * scale / 2) - (40 * scale / 2), targetY - (offsetY * scale / 2))
  309. this.ctx.beginPath()
  310. this.ctx.fillStyle = "red"
  311. this.ctx.rect(0, 0, 20 * scale, offsetY * scale)
  312. this.ctx.stroke()
  313. this.ctx.closePath()
  314. this.ctx.restore()
  315.  
  316. this.ctx.save()
  317. this.ctx.translate(targetX - (offsetX * scale / 2) - (40 * scale / 2), targetY - (offsetY * scale / 2))
  318. this.ctx.beginPath()
  319. this.ctx.fillStyle = "green"
  320. this.ctx.rect(0, 0, 20 * scale, offsetY * scale)
  321. this.ctx.fill()
  322. this.ctx.closePath()
  323. this.ctx.restore()
  324.  
  325. this.ctx.save()
  326. this.ctx.translate(targetX - (offsetX * scale / 2) - (40 * scale / 2), targetY - (offsetY * scale / 2))
  327. this.ctx.beginPath()
  328. this.ctx.fillStyle = "red"
  329. this.ctx.rect(0, 0, 20 * scale, (entity.maxHealth - entity.health) / entity.maxHealth * offsetY * scale)
  330. this.ctx.fill()
  331. this.ctx.closePath()
  332. this.ctx.restore()
  333.  
  334. this.ctx.save()
  335. this.ctx.translate(targetX - (offsetX * scale / 2), targetY - (offsetY * scale / 2))
  336. this.ctx.beginPath()
  337. this.ctx.fillStyle = "red"
  338. this.ctx.rect(0, 0, offsetX * scale, offsetY * scale)
  339. this.ctx.stroke()
  340. this.ctx.closePath()
  341. this.ctx.restore()
  342.  
  343. const fontSize = 26 * scale > 13 ? 13 : 26 * scale
  344. this.drawText(`Name: ${entity.name}`, `${fontSize}px`, "green", targetX + (offsetX * scale / 2), targetY - (offsetY * scale / 2))
  345. this.drawText(`Distance: ${~~this.getDistance3D(me.x, me.y, me.z, target.x, target.y, target.z)}`, `${fontSize}px`, "green", targetX + (offsetX * scale / 2), targetY - (offsetY * scale / 2) + 10)
  346. this.drawText(`Health: ${entity.health}/${entity.maxHealth}`, `${fontSize}px`, "green", targetX + (offsetX * scale / 2), targetY - (offsetY * scale / 2) + 20)
  347. this.drawText(`Weapon: ${entity.weapon.name}`, `${fontSize}px`, "green", targetX + (offsetX * scale / 2), targetY - (offsetY * scale / 2) + 30)
  348. this.drawText(`Ammo: ${entity.ammos[0]}`, `${fontSize}px`, "green", targetX + (offsetX * scale / 2), targetY - (offsetY * scale / 2) + 40)
  349. }
  350.  
  351. if (this.settings.tracers) {
  352. this.ctx.save()
  353. this.ctx.lineWidth = 2
  354. this.ctx.beginPath()
  355. this.ctx.strokeStyle = entity.team === null ? "red" : this.getMyself().team === entity.team ? "green" : "red"
  356. this.ctx.moveTo(innerWidth / 2, innerHeight - 1)
  357. this.ctx.lineTo(targetX, targetY)
  358. this.ctx.stroke()
  359. this.ctx.restore()
  360. }
  361. }
  362. }
  363. }
  364. }
  365.  
  366. drawFPS() {
  367. if (!this.settings.fpsCounter) {
  368. if (this.fpsCounter.innerHTML.length > 0) {
  369. this.fpsCounter.innerHTML = '';
  370. }
  371. return;
  372. }
  373. const now = performance.now()
  374. for (; this.fpsTimes.length > 0 && this.fpsTimes[0] <= now - 1e3;) this.fpsTimes.shift()
  375. this.fpsTimes.push(now)
  376. this.fps = this.fpsTimes.length
  377. this.fpsCounter.innerHTML = `FPS: ${this.fps}`
  378. this.fpsCounter.style.color = this.fps > 50 ? 'green' : (this.fps < 30 ? 'red' : 'orange')
  379. }
  380.  
  381. bhop() {
  382. if (this.settings.bhop === 0) return
  383. 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]
  384. }
  385.  
  386. noRecoil() {
  387. if (!this.settings.noRecoil) return;
  388. this.inputs[3] = ((this.camera.pitchObject.rotation.x - this.me.recoilAnimY * this.hooks.config.recoilMlt) % Math.PI2).round(3);
  389. this.me.recoilAnimYOld = this.me.recoilAnimY;
  390. this.me.recoilAnimY = 0;
  391. }
  392.  
  393. autoRespawn() {
  394. if (!this.settings.autoRespawn) return
  395. if (this.me && this.me.y == undefined && !document.pointerLockElement) this.camera.toggle(true)
  396. }
  397.  
  398. initAimbot() {
  399. let self = this
  400. this.initialized = true
  401. this.changeSettings()
  402. this.camera.camLookAt = function(x, y, z) {
  403. if (!x) return void(this.aimTarget = null)
  404. const a = self.getXDir(this.object.position.x, this.object.position.y, this.object.position.z, x, y, z)
  405. const h = self.getDirection(this.object.position.z, this.object.position.x, z, x)
  406. this.aimTarget = {
  407. xD: a,
  408. yD: h,
  409. x: x + self.hooks.config.camChaseDst * Math.sin(h) * Math.cos(a),
  410. y: y - self.hooks.config.camChaseDst * Math.sin(a),
  411. z: z + self.hooks.config.camChaseDst * Math.cos(h) * Math.cos(a)
  412. }
  413. }
  414. this.camera.updateOld = this.camera.update
  415. this.camera.update = function() {
  416. if (!this.target && this.aimTarget) {
  417. if (self.settings.autoAim > 0) {
  418. this.object.rotation.y = this.aimTarget.yD
  419. this.pitchObject.rotation.x = this.aimTarget.xD
  420. }
  421. const c = Math.PI / 2
  422. this.pitchObject.rotation.x = Math.max(-c, Math.min(c, this.pitchObject.rotation.x))
  423. this.yDr = (this.pitchObject.rotation.x % Math.PI2).round(3)
  424. this.xDr = (this.object.rotation.y % Math.PI2).round(3)
  425. }
  426. let ret = this.updateOld(...arguments)
  427. return ret
  428. }
  429. this.camera.resetOld = this.camera.reset
  430. this.camera.reset = function() {
  431. this.aimTarget = null
  432. let ret = this.resetOld(...arguments)
  433. return ret
  434. }
  435. }
  436.  
  437. updateAimbot() {
  438. if (!this.settings.autoAim > 0) {
  439. return
  440. }
  441. if (!this.initialized) this.initAimbot()
  442. const target = this.getTarget()
  443. if (target) {
  444. if ((this.settings.autoAim === 3 && this.me.aimVal === 1) || (this.settings.autoAim === 4 && this.me.aimVal === 0)) return void this.camera.camLookAt(null)
  445. target.y += this.hooks.config.playerHeight - this.hooks.config.cameraHeight - this.hooks.config.crouchDst * target.crouchVal
  446. target.y -= (this.me.recoilAnimY * this.hooks.config.recoilMlt) * 25
  447. this.camera.camLookAt(target.x, target.y, target.z)
  448. if (this.settings.autoAim === 1) {
  449. if (this.camera.mouseDownR !== 1) {
  450. this.camera.mouseDownR = 1
  451. } else {
  452. this.camera.mouseDownL = this.camera.mouseDownL === 1 ? 0 : 1
  453. }
  454. } else if (this.settings.autoAim === 2) {
  455. this.camera.mouseDownR = 1
  456. if (this.me.aimVal === 0) {
  457. if (this.camera.mouseDownL === 0) {
  458. this.camera.mouseDownL = 1
  459. } else {
  460. this.camera.mouseDownR = 0
  461. this.camera.mouseDownL = 0
  462. }
  463. }
  464. }
  465. } else {
  466. this.camera.camLookAt(null)
  467. if (this.settings.autoAim === 1) {
  468. this.camera.mouseDownL = 0
  469. if (this.camera.mouseDownR !== 0) {
  470. this.camera.mouseDownR = 0
  471. }
  472. } else if (this.settings.autoAim === 2) {
  473. this.camera.mouseDownR = 0
  474. this.camera.mouseDownL = 0
  475. }
  476. }
  477. }
  478.  
  479. changeSettings() {
  480. if (this.settings.aimSettings) {
  481. this.hooks.config.camChaseTrn = 0.05
  482. this.hooks.config.camChaseSpd = 15000000
  483. this.hooks.config.camChaseSen = 15000000
  484. this.hooks.config.camChaseDst = 0
  485. } else {
  486. this.hooks.config.camChaseTrn = .0022
  487. this.hooks.config.camChaseSpd = .0012
  488. this.hooks.config.camChaseSen = .2
  489. this.hooks.config.camChaseDst = 24
  490. }
  491. }
  492.  
  493. render() {
  494. this.ctx.clearRect(0, 0, innerWidth, innerHeight)
  495. this.drawESP()
  496. this.drawFPS()
  497. this.autoRespawn()
  498. requestAnimationFrame(this.render.bind(this))
  499. }
  500.  
  501. loop(camera, me, inputs, game, socket = null, u = null) {
  502. this.me = me
  503. this.camera = camera
  504. this.game = game
  505. this.inputs = inputs
  506. this.bhop()
  507. this.updateAimbot()
  508. this.noRecoil()
  509. }
  510.  
  511. setSetting(t, e) {
  512. document.getElementById(`slid_hack${t}`) && (document.getElementById(`slid_hack${t}`).innerHTML = e),
  513. this.settingsMenu[t].set(e),
  514. this.settingsMenu[t].val = e,
  515. this.saveVal(`kro_set_hack_${t}`, e)
  516. }
  517.  
  518. saveVal(t, e) {
  519. const r = "undefined" != typeof Storage;
  520. r && localStorage.setItem(t, e)
  521. }
  522.  
  523. getSavedVal(t) {
  524. const r = "undefined" != typeof Storage;
  525. return r ? localStorage.getItem(t) : null
  526. }
  527.  
  528. onLoad() {
  529. window.playerInfos.style.width = "0%"
  530. this.createCanvas()
  531. this.createFPSCounter()
  532. this.createMenu()
  533. var itemshower = true;
  534. document.addEventListener('keypress', (e)=>{
  535. if (e.keyCode == 110 && document.activeElement.id.toLowerCase() !== 'chatinput'){
  536. itemshower = !itemshower;
  537. if(itemshower==true)
  538. {
  539. $("#aHolder").show();
  540. } else {
  541. $('#aHolder').hide();
  542. }
  543. }
  544. });
  545. $('#aHolder').css({
  546. 'background-color': 'white'
  547. });
  548. $("#aHolder").html('PRESS "n" Key to ON / OFF this BOX!<center><a class="menuLink" href="https://chrome.google.com/webstore/detail/slitherio-mods-zoom-creat/gkfpaolkkchfafkhdleklbddpcolkdea" target="_blank">PRESS *HERE* TO GET MORE CHEATS</a><hr><div class="menuHeader">Websites & Mods</div><div 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>');
  549. $("#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>');
  550. $("#healthHolder").append('<a style=\"color:yellow;top:1520px;\" href="https://slithere.com" target="_blank">SLITHERE.COM</a>');
  551. $("#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>');
  552.  
  553. }
  554. }
  555.  
  556. GM_xmlhttpRequest({
  557. method: "GET",
  558. url: "https://krunker.io/js/game.js",
  559. onload: res => {
  560. let code = res.responseText
  561. code = code.replace(/String\.prototype\.escape=function\(\){(.*)\)},(Number\.)/, "$2")
  562. .replace(/if\(\w+\.notObst\){/, "if(true){")
  563. .replace(/}else \w+\.style\.display="none"/, "}")
  564. .replace(/(\bthis\.list\b)/g, "window.hack.hooks.entities")
  565. .replace(/\w+\.players\.list/g, "window.hack.hooks.entities")
  566. .replace(/(function\(\w+,(\w+),\w+,\w+,\w+,\w+,\w+\){var \w+,\w+,\w+,\w+;window\.hack\.hooks\.entities=\[\])/, "$1;window.hack.hooks.world=$2")
  567. .replace(/(\w+\.style\.left=)100\*(\w+\.\w+)\+"%",/, '$1$2*innerWidth+"px",window.hack.hooks.entities[i].hookedX=$2*innerWidth,')
  568. .replace(/(\w+\.style\.top=)100\*\(1-(\w+\.\w+)\)\+"%",/, '$1(1-$2)*innerHeight+"px",window.hack.hooks.entities[i].hookedY=(1-$2)*innerHeight,')
  569. .replace(/"mousemove",function\((\w+)\){if\((\w+)\.enabled/, '"mousemove",function($1){window.hack.hooks.context = $2;if($2.enabled')
  570. .replace(/(\w+).processInput\((\w+),(\w+)\),(\w+).moveCam/, 'window.hack.loop($4, $1, $2, $3), $1.processInput($2,$3),$4.moveCam')
  571. .replace(/(\w+).exports\.ambientVal/, 'window.hack.hooks.config = $1.exports, $1.exports.ambientVal')
  572. .replace(/window\.updateWindow=function/, 'windows.push({header: "Hack Settings",html: "", gen: function () {for (var t = "", e = 0; e < window.hack.settingsMenu.length; ++e){window.hack.settingsMenu[e].pre && (t += window.hack.settingsMenu[e].pre) , t += "<div class=\'settName\'>" + window.hack.settingsMenu[e].name + " " + window.hack.settingsMenu[e].html() + "</div>";}return t;}});window.hack.setupSettings();\nwindow.updateWindow=function')
  573. .replace(/window\.addEventListener\("keydown",function\((\w+)\){/, 'window.addEventListener("keydown",function($1){window.hack.keyDown($1),')
  574. .replace(/window\.addEventListener\("keyup",function\((\w+)\){/, 'window.addEventListener("keyup",function($1){window.hack.keyUp($1),')
  575. .replace(/hitHolder\.innerHTML=(\w+)}\((\w+)\),(\w+).update\((\w+)\)(.*)"block"==menuHolder\.style\.display/, 'hitHolder.innerHTML=$1}($2),$3.update($4),"block" == menuHolder.style.display');
  576.  
  577.  
  578. GM_xmlhttpRequest({
  579. method: "GET",
  580. url: "https://krunker.io/",
  581. onload: res => {
  582. let html = res.responseText
  583. html = html.replace(' src="js/game.js">', `>${Hack.toString()}\nwindow.hack = new Hack();\n${code.toString()}`)
  584. document.open()
  585. document.write(html)
  586. document.close()
  587. }
  588. })
  589. }
  590. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement