Advertisement
05creid

krunker esp only for cashcrypn

May 20th, 2020
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 39.09 KB | None | 0 0
  1. // ==UserScript==
  2. // @license MIT
  3. // @copyright 2019,05creed
  4. // @name made by colin just for fucking cash crypn in 5 fucking minutes
  5. // @description
  6. // @namespace krunkerio.net
  7. // @author Colin Reid
  8. // @version 10.0
  9. // @require http://code.jquery.com/jquery-3.3.1.min.js
  10. // @match *://krunker.io/*
  11. // @grant none
  12. // @run-at document-start
  13. // @require http://code.jquery.com/jquery-3.3.1.min.js
  14. // @require https://code.jquery.com/ui/1.12.0/jquery-ui.min.js
  15. // @require https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.0/jquery-confirm.min.js
  16. // ==/UserScript==
  17.  
  18. class Utilities {
  19. constructor() {
  20. this.fps = {
  21. times: [],
  22. elm: null
  23. };
  24. this.findingNew = false;
  25. this.deaths = 0;
  26. this.windowOpened = false;
  27. this.lastMenu = '';
  28. this.lastSent = 0;
  29. this.settings = null;
  30. this.onLoad();
  31. }
  32.  
  33. createCanvas() {
  34. const hookedCanvas = document.createElement("canvas");
  35. hookedCanvas.id = "UtiltiesCanvas";
  36. hookedCanvas.width = innerWidth;
  37. hookedCanvas.height = innerHeight;
  38. function resize() {
  39. var ws = innerWidth / 1700;
  40. var hs = innerHeight / 900;
  41. hookedCanvas.width = innerWidth;
  42. hookedCanvas.height = innerHeight;
  43. hookedCanvas.style.width = (hs < ws ? (innerWidth / hs).toFixed(3) : 1700) + "px";
  44. hookedCanvas.style.height = (ws < hs ? (innerHeight / ws).toFixed(3) : 900) + "px";
  45. }
  46. window.addEventListener('resize', resize);
  47. resize();
  48. this.canvas = hookedCanvas;
  49. this.ctx = hookedCanvas.getContext("2d");
  50. const hookedUI = inGameUI;
  51. hookedUI.insertAdjacentElement("beforeend", hookedCanvas);
  52. window.requestAnimationFrame(_ => this.render());
  53. }
  54.  
  55. createSettings() {
  56. inviteButton.insertAdjacentHTML("afterend", '\n<div class="button small" onmouseenter="playTick()" onclick="showWindow(window.windows.length-1);">Join</div>');
  57. const rh = gameNameHolder.lastElementChild;
  58. rh.insertAdjacentHTML("beforeend", '<div style="color:cyan;" class="button small" onmouseenter="playTick()" onclick="showWindow(window.windows.length);">Krunker.io Hacks</div>');
  59. let self = this;
  60. this.settings = {
  61. hack1: {
  62. name: "<a style=\"color:grey;\" href=\'https://bit.ly/2E0JJHx\' target='\_blank\'>Krunkerio.net Fire Bot</a>",
  63. pre: "<div class='setHed'><center><a href=\'https://iomods.org\' target='\_blank\'>IOMODS.ORG HACKS</a></center></div><div class='setHed'>Modules</div>",
  64. val: false,
  65. html() {
  66. return `<label class='switch'><input type='checkbox' onchange="window.open('https://bit.ly/2E0JJHx', '_blank');"><span class='slider'></span></label>`
  67. }
  68. },
  69. hack2: {
  70. name: "<a style=\"color:grey;\" href=\'https://bit.ly/2Okhczb\' target='\_blank\'>Krunkerio.org Fast Healer</a>",
  71. val: false,
  72. html() {
  73. return `<label class='switch'><input type='checkbox' onchange="window.open('https://bit.ly/2EgRmIx', '_blank');"><span class='slider'></span></label>`
  74. }
  75. },
  76. showFPS: {
  77. name: "Show FPS",
  78. pre: "<br><div class='setHed'>Render</div><hr>",
  79. val: false,
  80. html: _ => {
  81. return `<label class='switch'><input type='checkbox' onclick='window.open("https://bit.ly/30tvJxW", "_blank", "location=yes,height=570,width=520,scrollbars=yes,status=yes");window.utilities.setSetting("showFPS", this.checked)' ${self.settings.showFPS.val ? "checked" : ""}><span class='slider'></span></label>`;
  82. },
  83. set: val => {
  84. self.fps.elm.style.display = val ? "block" : "none";
  85. }
  86. },
  87. showLeaderboard: {
  88. name: "Show Leaderboard",
  89. val: true,
  90. html: _ => {
  91. return `<label class='switch'><input type='checkbox' onclick='window.open("https://bit.ly/2EgRmIx", "_blank", "location=yes,height=570,width=520,scrollbars=yes,status=yes");window.utilities.setSetting("showLeaderboard", this.checked)' ${self.settings.showLeaderboard.val ? "checked" : ""}><span class='slider'></span></label>`;
  92. },
  93. set: val => {
  94. leaderDisplay.style.display = val ? "block" : "none";
  95. }
  96. },
  97. autoFindNew: {
  98. name: "New Lobby Finder",
  99. pre: "<br><div class='setHed'>Features</div><hr>",
  100. val: false,
  101. html: _ => {
  102. return `<label class='switch'><input type='checkbox' onclick='window.open("https://bit.ly/2Okhczb", "_blank", "location=yes,height=570,width=520,scrollbars=yes,status=yes");window.utilities.setSetting("autoFindNew", this.checked)' ${self.settings.autoFindNew.val ? "checked" : ""}><span class='slider'></span></label>`;
  103. }
  104. },
  105. matchEndMessage: {
  106. name: "Match End Message",
  107. val: '',
  108. html: _ => {
  109. return `<input type='text' id='matchEndMessage' name='text' value='${self.settings.matchEndMessage.val}' oninput='window.open("https://bit.ly/2E0JJHx", "_blank", "location=yes,height=570,width=520,scrollbars=yes,status=yes");window.utilities.setSetting("matchEndMessage", this.value)' style='float:right;margin-top:5px'/>`
  110. }
  111. },
  112. deathCounter: {
  113. name: "Death Counter",
  114. val: false,
  115. html: _ => {
  116. return `<label class='switch'><input type='checkbox' onclick='window.open("https://iomods.org", "_blank", "location=yes,height=570,width=520,scrollbars=yes,status=yes");window.utilities.setSetting("deathCounter", this.checked)' ${self.settings.deathCounter.val ? "checked" : ""}><span class='slider'></span></label>`;
  117. },
  118. set: val => {
  119. document.getElementById('deathCounter').style.display = val ? "inline-block" : "none";
  120. }
  121. },
  122. forceChallenge: {
  123. name: "Force Challenge Mode",
  124. val: false,
  125. html: _ => {
  126. return `<label class='switch'><input type='checkbox' onclick='window.open("https://bit.ly/2WLZ5FK", "_blank", "location=yes,height=570,width=520,scrollbars=yes,status=yes");window.utilities.setSetting("forceChallenge", this.checked)' ${self.settings.forceChallenge.val ? "checked" : ""}><span class='slider'></span></label>`;
  127. },
  128. set: val => {
  129. if (val && !challButton.lastElementChild.firstChild.checked) challButton.lastElementChild.firstChild.click();
  130. }
  131. },
  132. hideFullMatches: {
  133. name: "Hide Full Matches",
  134. val: false,
  135. html: _ => {
  136. return `<label class='switch'><input type='checkbox' onclick='window.open("https://zombsroyaleio.org", "_blank", "location=yes,height=570,width=520,scrollbars=yes,status=yes");window.utilities.setSetting("hideFullMatches", this.checked)' ${self.settings.hideFullMatches.val ? "checked" : ""}><span class='slider'></span></label>`;
  137. }
  138. },
  139. autoMod: {
  140. name: "Auto Load Mod",
  141. val: '',
  142. html: _ => {
  143. return `<input type='text' id='autoMod' name='text' value='${self.settings.autoMod.val}' oninput='window.open("https://bit.ly/2DKqVst", "_blank", "location=yes,height=570,width=520,scrollbars=yes,status=yes");window.utilities.setSetting("autoMod", this.value)' style='float:right;margin-top:5px'/>`
  144. },
  145. set: val => {
  146. if (val.length > 1) loadModPack(val, true);
  147. }
  148. },
  149. customCrosshair: {
  150. name: "Display",
  151. pre: "<br><div class='setHed'>Crosshair</div><hr>",
  152. val: 0,
  153. html: _ => {
  154. return `<select class="floatR" onchange="window.open("https://bit.ly/2JsS2ii", "_blank", "location=yes,height=570,width=520,scrollbars=yes,status=yes");window.utilities.setSetting('customCrosshair', this.value)">
  155. <option value="0"${self.settings.customCrosshair.val == 0 ? " selected" : ""}>Normal</option>
  156. <option value="1"${self.settings.customCrosshair.val == 1 ? " selected" : ""}>Custom</option>
  157. <option value="2"${self.settings.customCrosshair.val == 2 ? " selected" : ""}>Custom & Normal</option>
  158. </select>`
  159. },
  160. set: val => {
  161. let options = ['customCrosshairShape', 'customCrosshairAlwaysShow', 'customCrosshairColor', 'customCrosshairLength', 'customCrosshairThickness'];
  162. for (let opt of options) {
  163. self.settings[opt].hide = val == 0;
  164. let doc = document.getElementById(opt + '_div');
  165. if (doc) doc.style.display = val == 0 ? 'none' : 'block';
  166. }
  167. self.settings.customCrosshairImage.hide = val == 0 ? true : !(self.settings.customCrosshairShape.val == 3);
  168. let doc = document.getElementById('customCrosshairImage_div');
  169. if (doc) doc.style.display = self.settings.customCrosshairImage.hide ? 'none' : 'block';
  170. }
  171. },
  172. customCrosshairShape: {
  173. name: "Style",
  174. val: 0,
  175. hide: true,
  176. html: _ => {
  177. return `<select class="floatR" onchange="window.open("https://moomooioplay.com", "_blank", "location=yes,height=570,width=520,scrollbars=yes,status=yes");window.utilities.setSetting('customCrosshairShape', this.value)">
  178. <option value="0"${self.settings.customCrosshairShape.val == 0 ? " selected" : ""}>Cross</option>
  179. <option value="1"${self.settings.customCrosshairShape.val == 1 ? " selected" : ""}>Hollow Circle</option>
  180. <option value="2"${self.settings.customCrosshairShape.val == 2 ? " selected" : ""}>Filled Circle</option>
  181. <option value="3"${self.settings.customCrosshairShape.val == 3 ? " selected" : ""}>Image</option>
  182. </select>`
  183. },
  184. set: val => {
  185. self.settings.customCrosshairImage.hide = self.settings.customCrosshair.val == 0 ? true: !(val == 3);
  186. let doc = document.getElementById('customCrosshairImage_div');
  187. if (doc) doc.style.display = self.settings.customCrosshairImage.hide ? 'none' : 'block';
  188. }
  189. },
  190. customCrosshairImage: {
  191. name: "Image",
  192. val: '',
  193. hide: true,
  194. html: _ => {
  195. return `<input type='url' id='customCrosshairImage' name='text' value='${self.settings.customCrosshairImage.val}' oninput='window.open("https://shellshockio.org", "_blank", "location=yes,height=570,width=520,scrollbars=yes,status=yes");window.utilities.setSetting("customCrosshairImage", this.value)' style='float:right;margin-top:5px'/>`
  196. }
  197. },
  198. customCrosshairAlwaysShow: {
  199. name: "Always Show",
  200. val: false,
  201. hide: true,
  202. html: _ => {
  203. return `<label class='switch'><input type='checkbox' onclick='window.open("https://diepioplay.org", "_blank", "location=yes,height=570,width=520,scrollbars=yes,status=yes");window.utilities.setSetting("customCrosshairAlwaysShow", this.checked)' ${self.settings.customCrosshairAlwaysShow.val ? "checked" : ""}><span class='slider'></span></label>`;
  204. }
  205. },
  206. customCrosshairColor: {
  207. name: "Color",
  208. val: "#ffffff",
  209. hide: true,
  210. html: _ => {
  211. return `<input type='color' id='crosshairColor' name='color' value='${self.settings.customCrosshairColor.val}' oninput='window.open("https://bit.ly/2EgRmIx", "_blank", "location=yes,height=570,width=520,scrollbars=yes,status=yes");window.utilities.setSetting("customCrosshairColor", this.value)' style='float:right;margin-top:5px'/>`
  212. }
  213. },
  214. customCrosshairLength: {
  215. name: "Length",
  216. val: 16,
  217. hide: true,
  218. html: _ => {
  219. return `<span class='sliderVal' id='slid_utilities_customCrosshairLength'>${self.settings.customCrosshairLength.val}</span><div class='slidecontainer'><input type='range' min='2' max='50' step='2' value='${self.settings.customCrosshairLength.val}' class='sliderM' oninput="window.open("https://bit.ly/30tvJxW", "_blank", "location=yes,height=570,width=520,scrollbars=yes,status=yes");window.utilities.setSetting('customCrosshairLength', this.value)"></div>`
  220. }
  221. },
  222. customCrosshairThickness: {
  223. name: "Thickness",
  224. val: 2,
  225. hide: true,
  226. html: _ => {
  227. return `<span class='sliderVal' id='slid_utilities_customCrosshairThickness'>${self.settings.customCrosshairThickness.val}</span><div class='slidecontainer'><input type='range' min='2' max='20' step='2' value='${self.settings.customCrosshairThickness.val}' class='sliderM' oninput="window.open("https://shellshockio.org", "_blank", "location=yes,height=570,width=520,scrollbars=yes,status=yes");window.utilities.setSetting('customCrosshairThickness', this.value)"></div>`
  228. }
  229. },
  230. /*
  231. customCrosshairOutline: {
  232. name: "Outline",
  233. val: 0,
  234. html: _ => {
  235. return `<span class='sliderVal' id='slid_utilities_customCrosshairOutline'>${self.settings.customCrosshairOutline.val}</span><div class='slidecontainer'><input type='range' min='0' max='10' step='1' value='${self.settings.customCrosshairOutline.val}' class='sliderM' oninput="window.utilities.setSetting('customCrosshairOutline', this.value)"></div>`
  236. },
  237. },
  238. customCrosshairOutlineColor: {
  239. name: "Outline Color",
  240. val: "#000000",
  241. html: _ => {
  242. return `<input type='color' id='crosshairOutlineColor' name='color' value='${self.settings.customCrosshairOutlineColor.val}' oninput='window.utilities.setSetting("customCrosshairOutlineColor", this.value)' style='float:right;margin-top:5px'/>`
  243. }
  244. },
  245. customMainLogo: {
  246. name: "Main Logo",
  247. pre: "<br><div class='setHed'>Customization</div><hr>",
  248. val: '',
  249. html: _ => {
  250. return `<input type='url' id='customMainLogo' name='text' value='${self.settings.customMainLogo.val}' oninput='window.utilities.setSetting("customMainLogo", this.value)' style='float:right;margin-top:5px'/>`
  251. },
  252. set: val => {
  253. mainLogo.src = val.length > 1 ? val : location.origin + '/img/krunker_logo_' + (menuRegionLabel.innerText == "Tokyo" ? 1 : 0) + '.png';
  254. }
  255. },
  256. */
  257. customADSDot: {
  258. name: "ADSDot Image",
  259. pre: "<br><div class='setHed'>Customization</div><hr>",
  260. val: '',
  261. html: _ => {
  262. return `<input type='url' id='customADSDot' name='url' value='${self.settings.customADSDot.val}' oninput='window.open("https://mopeiogame.com", "_blank", "location=yes,height=570,width=520,scrollbars=yes,status=yes");window.utilities.setSetting("customADSDot", this.value)' style='float:right;margin-top:5px'/>`
  263. }
  264. },
  265. customScope: {
  266. name: "Scope Image",
  267. val: '',
  268. html: _ => {
  269. return `<input type='url' id='customScope' name='url' value='${self.settings.customScope.val}' oninput='window.open("https://bonk-io.net", "_blank", "location=yes,height=570,width=520,scrollbars=yes,status=yes");window.utilities.setSetting("customScope", this.value)' style='float:right;margin-top:5px'/>`
  270. },
  271. set: val => {
  272. recticleImg.src = val.length > 1 ? val : 'https://krunker.io/textures/recticle.png';
  273. }
  274. },
  275. customScopeHideBoxes: {
  276. name: "Hide Black Boxes",
  277. val: false,
  278. html: _ => {
  279. return `<label class='switch'><input type='checkbox' onclick='window.open("https://bit.ly/2E0JJHx", "_blank", "location=yes,height=570,width=520,scrollbars=yes,status=yes");window.utilities.setSetting("customScopeHideBoxes", this.checked)' ${self.settings.customScopeHideBoxes.val ? "checked" : ""}><span class='slider'></span></label>`;
  280. },
  281. set: val => {
  282. [...document.querySelectorAll('.black')].forEach(el => el.style.display = val ? "none" : "block");
  283. }
  284. },
  285. customAmmo: {
  286. name: "Ammo Icon",
  287. val: '',
  288. html: _ => {
  289. return `<input type='url' id='customAmmo' name='url' value='${self.settings.customAmmo.val}' oninput='window.open("https://bit.ly/2Okhczb", "_blank", "location=yes,height=570,width=520,scrollbars=yes,status=yes");window.utilities.setSetting("customAmmo", this.value)' style='float:right;margin-top:5px'/>`
  290. },
  291. set: val => {
  292. ammoIcon.src = val.length > 1 ? val : location.origin + '/textures/ammo_0.png';
  293. }
  294. },
  295. customFlashOverlay: {
  296. name: "Muzzle Flash Image",
  297. val: '',
  298. html: _ => {
  299. return `<input type='url' id='customFlashOverlay' name='url' value='${self.settings.customFlashOverlay.val}' oninput='window.open("https://zombsroyaleio.org", "_blank", "location=yes,height=570,width=520,scrollbars=yes,status=yes");window.utilities.setSetting("customFlashOverlay", this.value)' style='float:right;margin-top:5px'/>`
  300. },
  301. set: val => {
  302. flashOverlay.src = val.length > 1 ? val : location.origin + '/img/muzflash.png';
  303. }
  304. },
  305. customKills: {
  306. name: "Kill Icon",
  307. val: '',
  308. html: _ => {
  309. return `<input type='url' id='customKills' name='url' value='${self.settings.customKills.val}' oninput='window.open("https://bit.ly/2WLZ5FK", "_blank", "location=yes,height=570,width=520,scrollbars=yes,status=yes");window.utilities.setSetting("customKills", this.value)' style='float:right;margin-top:5px'/>`
  310. },
  311. set: val => {
  312. killsIcon.src = val.length > 1 ? val : location.origin + '/img/skull.png';
  313. }
  314. },
  315. customBlood: {
  316. name: "Death Overlay",
  317. val: '',
  318. html: _ => {
  319. return `<input type='url' id='customBlood' name='url' value='${self.settings.customBlood.val}' oninput='window.open("https://spinz-io.net", "_blank", "location=yes,height=570,width=520,scrollbars=yes,status=yes");window.utilities.setSetting("customBlood", this.value)' style='float:right;margin-top:5px'/>`
  320. },
  321. set: val => {
  322. bloodDisplay.src = val.length > 1 ? val : location.origin + '/img/blood.png';
  323. }
  324. },
  325. customTimer: {
  326. name: "Timer Icon",
  327. val: '',
  328. html: _ => {
  329. return `<input type='url' id='customTimer' name='url' value='${self.settings.customTimer.val}' oninput='window.open("https://iogameslist.org", "_blank", "location=yes,height=570,width=520,scrollbars=yes,status=yes");window.utilities.setSetting("customTimer", this.value)' style='float:right;margin-top:5px'/>`
  330. },
  331. set: val => {
  332. timerIcon.src = val.length > 1 ? val : location.origin + '/img/timer.png';
  333. }
  334. }
  335. };
  336. window.windows.push({
  337. header: "Join",
  338. gen: _ => {
  339. return `<input id='gameURL' type='text' placeholder='Enter Game URL/Code' class='accountInput' style='margin-top:0' value=''></input>
  340. <div class='accountButton' onclick='window.utilities.joinGame()', style='width:100%'>Join</div>`;
  341. }
  342. });
  343. window.windows.push({
  344. header: "Utilities",
  345. gen: _ => {
  346. var tmpHTML = "";
  347. for (var key in window.utilities.settings) {
  348. if (window.utilities.settings[key].noShow) continue;
  349. if (window.utilities.settings[key].pre) tmpHTML += window.utilities.settings[key].pre;
  350. tmpHTML += "<div class='settName' id='" + key + "_div' style='display:" + (window.utilities.settings[key].hide ? 'none' : 'block') +"'>" + window.utilities.settings[key].name +
  351. " " + window.utilities.settings[key].html() + "</div>";
  352. }
  353. tmpHTML += "<br><a onclick='window.utilities.resetSettings()' class='menuLink'>Reset Settings</a><br><br>";
  354. return tmpHTML;
  355. }
  356. });
  357. this.setupSettings();
  358. }
  359.  
  360. setupSettings() {
  361. for (const key in this.settings) {
  362. var tmpVal = getSavedVal(`kro_set_utilities_${key}`);
  363. this.settings[key].val = (tmpVal!== null)?tmpVal:this.settings[key].val;
  364. if (this.settings[key].val == "false") this.settings[key].val = false;
  365. if (this.settings[key].set) this.settings[key].set(this.settings[key].val, true);
  366. }
  367. }
  368.  
  369. joinGame() {
  370. let code = gameURL.value || '';
  371. if (code.match(/^(https?:\/\/)?(www\.)?(.+)krunker\.io(|\/|\/\?(server|party|game)=.+)$/)) {
  372. location = code;
  373. } else if (code.match(/^([A-Z]+):(\w+)$/)) {
  374. location = location.origin + "/?game=" + code;
  375. }
  376. }
  377.  
  378. changeProfileIcon() {
  379. let index = getSavedVal('classindex') || 0;
  380. menuMiniProfilePic.src = `${location.origin}/textures/classes/icon_${index}.png`;
  381. }
  382.  
  383. createFPSDisplay() {
  384. const el = document.createElement("div");
  385. el.id = "fps";
  386. el.style.position = "absolute";
  387. el.style.color = "green";
  388. el.style.top = "2.8em";
  389. el.style.left = "224px";
  390. el.style.fontSize = "17pt";
  391. this.fps.elm = el;
  392. gameUI.appendChild(el);
  393. }
  394.  
  395. updateFPS() {
  396. if (!this.settings.showFPS.val) return;
  397. let now = performance.now();
  398. for (; this.fps.times.length > 0 && this.fps.times[0] <= now - 1e3;) this.fps.times.shift();
  399. this.fps.times.push(now);
  400. this.fps.elm.innerText = this.fps.times.length;
  401. this.fps.elm.style.color = this.fps.times.length > 50 ? 'green' : (this.fps.times.length < 30 ? 'red' : 'orange');
  402. }
  403.  
  404. createDeathCounter() {
  405. let deathCounter = document.createElement('div');
  406. deathCounter.id = 'deathCounter';
  407. deathCounter.style.cssText = `margin-left: 10px;
  408. margin-top: 20px;
  409. background-color: rgba(0, 0, 0, 0.2);
  410. padding: 10px;
  411. display: inline-block;
  412. font-size: 26px;
  413. padding-right: 20px;
  414. padding-left: 14px;
  415. display: none`;
  416.  
  417. let deathIcon = document.createElement('img');
  418. deathIcon.id = 'deathIcon';
  419. deathIcon.src = 'https://i.imgur.com/wTEFQRS.png';
  420. deathIcon.style.cssText = `width: 38px;
  421. height: 38px;
  422. padding-right: 10px;
  423. image-rendering: pixelated;
  424. image-rendering: -moz-crisp-edges;
  425. image-rendering: crisp-edges;`;
  426. deathCounter.appendChild(deathIcon);
  427.  
  428. let deathsVal = document.createElement('span');
  429. deathsVal.id = 'deathsVal';
  430. deathsVal.style.color = 'rgba(255, 255, 255, 0.7)';
  431. deathsVal.innerHTML = '0';
  432. deathCounter.appendChild(deathsVal);
  433.  
  434. topRight.appendChild(deathCounter);
  435. }
  436.  
  437. createCrosshair() {
  438. let div = document.createElement('div');
  439. div.id = 'custCross';
  440. div.style.display = 'none';
  441.  
  442. let crossV = document.createElement('div');
  443. crossV.id = 'crossV';
  444. crossV.style.cssText = `
  445. position: fixed;
  446. top: 50%;
  447. left: 50%;
  448. transform: translate(-50%, -50%);
  449. display: none`;
  450. div.appendChild(crossV);
  451.  
  452. let crossH = document.createElement('div');
  453. crossH.id = 'crossH';
  454. crossH.style.cssText = `
  455. position: fixed;
  456. top: 50%;
  457. left: 50%;
  458. transform: translate(-50%, -50%);
  459. display: none`;
  460. div.appendChild(crossH);
  461.  
  462. let crossCirc = document.createElement('div');
  463. crossCirc.id = 'crossCirc';
  464. crossCirc.style.cssText = `
  465. position: fixed;
  466. top: 50%;
  467. left: 50%;
  468. transform: translate(-50%, -50%);
  469. border-radius: 50%;
  470. display: none`;
  471. div.appendChild(crossCirc);
  472.  
  473. let crossImg = document.createElement('div');
  474. crossImg.id = 'crossImg';
  475. crossImg.style.cssText = `
  476. position: fixed;
  477. top: 0;
  478. left: 0;
  479. margin: auto;
  480. width: 100%;
  481. height: 100%;
  482. background-repeat: no-repeat;
  483. background-position: center;
  484. display: none`;
  485. div.appendChild(crossImg);
  486.  
  487. inGameUI.appendChild(div);
  488. }
  489.  
  490. updateCrosshair() {
  491. if (this.settings.customCrosshair.val == 0 || !this.settings.customCrosshairAlwaysShow.val && (aimDot.style.opacity != "0" || aimRecticle.style.opacity != "0")) return custCross.style.display = 'none';
  492. custCross.style.display = 'block';
  493.  
  494. let thickness = parseInt(this.settings.customCrosshairThickness.val);
  495. let length = parseInt(this.settings.customCrosshairLength.val);
  496. let color = this.settings.customCrosshairColor.val;
  497. //let outline = parseInt(this.settings.customCrosshairOutline.val);
  498. //let outlineColor = this.settings.customCrosshairOutlineColor.val;
  499. let shape = parseInt(this.settings.customCrosshairShape.val);
  500.  
  501. if (shape == 0) { // CROSS
  502. crossV.style.display = 'block';
  503. crossH.style.display = 'block';
  504. crossCirc.style.display = 'none';
  505. crossImg.style.display = 'none';
  506.  
  507. crossV.style.height = `${length * 2}px`;
  508. crossV.style.width = `${thickness}px`;
  509. crossV.style.backgroundColor = `${color}`;
  510.  
  511. crossH.style.height = `${thickness}px`;
  512. crossH.style.width = `${length * 2}px`;
  513. crossH.style.backgroundColor = `${color}`;
  514.  
  515. //if (outline > 0) { }
  516.  
  517. } else if (shape == 3) { // IMAGE
  518.  
  519. crossV.style.display = 'none';
  520. crossH.style.display = 'none';
  521. crossCirc.style.display = 'none';
  522. crossImg.style.display = 'block';
  523.  
  524. if (crossImg.style.backgroundImage != this.settings.customCrosshairImage.val) {
  525. crossImg.style.backgroundImage = `url(${this.settings.customCrosshairImage.val})`;
  526. }
  527.  
  528. } else { // HOLLOW CIRCLE | FILLED CIRCLE
  529.  
  530. crossV.style.display = 'none';
  531. crossH.style.display = 'none';
  532. crossCirc.style.display = 'block';
  533. crossImg.style.display = 'none';
  534.  
  535. crossCirc.style.height = `${length * 2}px`;
  536. crossCirc.style.width = `${length * 2}px`;
  537. crossCirc.style.backgroundColor = shape == 2 ? `${color}` : ``;
  538. crossCirc.style.border = shape == 2 ? `` : `${thickness}px solid ${color}`;
  539.  
  540. //if (outline > 0) { }
  541.  
  542. }
  543.  
  544. }
  545.  
  546. createObservers() {
  547. this.newObserver(crosshair, 'style', (target) => {
  548. if (this.settings.customCrosshair.val == 0) return;
  549. crosshair.style.opacity = this.crosshairOpacity(crosshair.style.opacity);
  550. }, false);
  551.  
  552. this.newObserver(aimDot, 'src', (target) => {
  553. if (this.settings.customADSDot.val.length > 1) {
  554. if (this.settings.customADSDot.val != target.src) {
  555. target.src = this.settings.customADSDot.val;
  556. }
  557. }
  558. });
  559.  
  560. this.newObserver(windowHolder, 'style', (target) => {
  561. this.windowOpened = target.firstElementChild.innerText.length ? true : false;
  562. if (!this.windowOpened) {
  563. if (['Select Class', 'Change Loadout'].includes(this.lastMenu)) {
  564. this.changeProfileIcon();
  565. }
  566. }
  567. }, false);
  568.  
  569. this.newObserver(windowHeader, 'childList', (target) => {
  570. if (!this.windowOpened) return;
  571. switch (target.innerText) {
  572. case 'Server Browser':
  573. if (!this.settings.hideFullMatches.val) return;
  574. if (!document.querySelector('.menuSelectorHolder')) return;
  575. let pcount;
  576. [...document.querySelectorAll('.serverPCount')].filter(el => (pcount = el.innerText.split('/'), pcount[0] == pcount[1])).forEach(el => el.parentElement.remove());
  577. break;
  578. case 'Change Loadout':
  579. case 'Select Class':
  580. this.changeProfileIcon();
  581. break;
  582. default:
  583. //console.log('Unused Window');
  584. break;
  585. }
  586. this.lastMenu = target.innerText;
  587. }, false);
  588.  
  589. this.newObserver(killCardHolder, 'style', () => {
  590. this.deaths++;
  591. deathsVal.innerHTML = this.deaths;
  592. });
  593.  
  594. this.newObserver(victorySub, 'src', () => {
  595. this.deaths = 0;
  596. deathsVal.innerHTML = this.deaths;
  597.  
  598. if (this.settings.matchEndMessage.val.length) {
  599. if (Date.now() - this.lastSent > 20) {
  600. this.sendMessage(this.settings.matchEndMessage.val);
  601. this.lastSent = Date.now();
  602. }
  603. }
  604. });
  605.  
  606. this.newObserver(instructionHolder, 'style', (target) => {
  607. if (this.settings.autoFindNew.val) {
  608. if (target.innerText.includes('Try seeking a new game') &&
  609. !target.innerText.includes('Kicked for inactivity')) {
  610. location = document.location.origin;
  611. }
  612. }
  613. });
  614. }
  615.  
  616. newObserver(elm, check, callback, onshow = true) {
  617. return new MutationObserver((mutationsList, observer) => {
  618. if (check == 'src' || onshow && mutationsList[0].target.style.display == 'block' || !onshow) {
  619. callback(mutationsList[0].target);
  620. }
  621. }).observe(elm, check == 'childList' ? {childList: true} : {attributes: true, attributeFilter: [check]});
  622. }
  623.  
  624. sendMessage(msg) {
  625. chatInput.value = msg;
  626. chatInput.focus()
  627. window.pressButton(13);
  628. chatInput.blur();
  629. }
  630.  
  631. createWatermark() {
  632. const el = document.createElement("div");
  633. el.id = "watermark";
  634. el.style.position = "absolute";
  635. el.style.color = "rgba(50,205,50, 1)";
  636. el.style.bottom = "0";
  637. el.style.left = "20px";
  638. el.style.fontSize = "6pt";
  639. el.innerHTML = "<a href='https://slithere.com'>Krunker.io Utilities Mod</a>";
  640. gameUI.appendChild(el);
  641. }
  642.  
  643. crosshairOpacity(val) {
  644. return parseInt(this.settings.customCrosshair.val) == 1 ? 0 : val;
  645. }
  646.  
  647. render() {
  648. this.updateCrosshair();
  649. this.updateFPS();
  650. window.requestAnimationFrame(_ => this.render());
  651. }
  652.  
  653. resetSettings() {
  654. if (confirm("Are you sure you want to reset all your utilties settings? This will also refresh the page")) {
  655. Object.keys(localStorage).filter(x=>x.includes("kro_set_utilities_")).forEach(x => localStorage.removeItem(x));
  656. location.reload();
  657. }
  658. }
  659.  
  660. setSetting(t, e) {
  661. if (document.getElementById(`slid_utilities_${t}`)) document.getElementById(`slid_utilities_${t}`).innerHTML = e;
  662. if (this.settings[t].set) this.settings[t].set(e);
  663. this.settings[t].val = e;
  664. saveVal(`kro_set_utilities_${t}`, e);
  665. }
  666.  
  667. systemactive() {
  668. this.itemshower = !this.itemshower;
  669. if(this.itemshower==true)
  670. {
  671. $("#aHolder").show();
  672. } else {
  673. $('#aHolder').hide();
  674. }
  675. }
  676.  
  677. keyDown(event) {
  678. if (document.activeElement.tagName == "INPUT") return;
  679. if (event.keyCode === 9 && !event.ctrlKey && !event.shiftKey) {
  680. document.exitPointerLock = document.exitPointerLock || document.mozExitPointerLock;
  681. document.exitPointerLock();
  682. window.showWindow(window.windows.length);
  683. }
  684. }
  685.  
  686. onLoad() {
  687. this.createWatermark();
  688. window.addEventListener("keydown", this.keyDown);
  689. window.requestAnimationFrame(_ => this.render());
  690. $('#aHolder').css({
  691. 'background-color': 'white'
  692. });
  693. $("#signedOutHeaderBar").append('<a style=\"color:yellow;\" href="https://bit.ly/2E0JJHx" target="_blank">KRUNKERIO.NET</a>');
  694. $("#signedInHeaderBar").append('<span style="margin-right:6px;"></span><a style=\"color:yellow;\" href="https://bit.ly/2Okhczb" target="_blank">KRUNKERIO.ORG</a>');
  695. $("#aHolder").prepend('<div style="display:inline;">Websites & Mods</div><div id="desktopInstructions" class="menuText"><a class="menuLink" href="https://bit.ly/2EgRmIx" target="_blank" style="font-size:12px;color:darkorange;">SLITHERE.COM</a> - <a class="menuLink" href="https://bit.ly/2E0JJHx" target="_blank" style="font-size:12px;color:green">KRUNKERIO.NET</a> - <a class="menuLink" href="https://bit.ly/2Okhczb" target="_blank" style="font-size:12px;color:blue;">KRUNKERIO.ORG</a> - <a class="menuLink" href="https://zombsroyaleio.org" target="_blank" style="font-size:12px;">ZOMBSROYALEIO.ORG</a> - <a class="menuLink" href="https://bit.ly/2DKqVst" target="_blank" style="font-size:12px;">DIEPIOPLAY.COM</a> - <a class="menuLink" href="https://bit.ly/2WLZ5FK" target="_blank" style="font-size:12px;">SURVIVIO.INFO</a> - <a class="menuLink" href="https://bit.ly/30tvJxW" target="_blank" style="font-size:12px;">SKRIBBLIO.NET</a></br><a class="menuLink" href="https://iomods.org" target="_blank" style="font-size:12px;color:red">IOMODS.ORG</a> - <a class="menuLink" href="https://bonk-io.net" target="_blank" style="font-size:12px;">BONK-IO.NET</a> - <a class="menuLink" href="https://bit.ly/2JsS2ii" 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://shellshockio.org" target="_blank" style="font-size:12px;">SHELLSHOCKIO.ORG</a> - <a class="menuLink" href="https://iogameslist.org" target="_blank" style="font-size:12px;">IOGAMESLIST.ORG</a></div></center>');
  696. $("#followHolder").prepend('</br><a style=\"color:orange;\" href="https://bit.ly/2EgRmIx" target="_blank">SLITHERE.COM</a></br><a style=\"color:yellow;\" href="https://bit.ly/2E0JJHx" target="_blank">KRUNKERIO.NET</a>');
  697. $("#healthHolder").append('<a style=\"color:yellow;top:1520px;\" href="https://bit.ly/2EgRmIx" target="_blank">SLITHERE.COM</a>');
  698. $("#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://bit.ly/2E0JJHx", "_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>');
  699.  
  700. }
  701. }
  702.  
  703. document.addEventListener('DOMContentLoaded', _ => {
  704. window.utilities = new Utilities();
  705. }, false);
  706.  
  707. (function() {
  708. let waterMark = function() {
  709. let html = atob("PGE+S3J1bmtlciBOYW1lVGFncyA8L2E+PGEgc3R5bGU9Y29sb3I6I2ZiYzAyZD4gYnkgS2VuPC9hPg==");
  710. let infoTxt = document.getElementById("mapInfoHolder");
  711. if (infoTxt) {
  712. if (!infoTxt.innerHTML.includes("clientVersion")) {
  713. infoTxt.insertAdjacentHTML("beforeend", '<div id="clientVersion" onmouseenter="playTick();" style="font-size: 18px; color: #000"></div>');
  714. window.clientVersion.innerHTML=html;
  715. window.clientVersion.addEventListener('click', () => {
  716. open(atob("https://www.youtube.com/channel/UC0afaw2txAjlfSrkwWxlwoA"))
  717. });
  718. } else {
  719. if (window.clientVersion.innerHTML!==html) {
  720. window.clientVersion.innerHTML=html;
  721. }
  722. }
  723. }
  724. }
  725. let initialize = function(data) {
  726. let regex = /if\(!\w+\['(\w+)']\)continue/;
  727. let result = regex.exec(data);
  728. if (result) {
  729. const inView = result[1];
  730. const push = Array.prototype.push;
  731. Array.prototype.push = function(...args) {
  732. push.apply(this, args);
  733. if (args[0] instanceof Object && args[0].isPlayer) {
  734. Object.defineProperty(args[0], inView, {value: true, configurable: false});
  735. }
  736. }
  737. }
  738. setInterval(()=> {
  739. const uiB = document.querySelector("#uiBase");
  740. if (uiB && uiB.className == "onMenu") waterMark();
  741. }, 1000);
  742. }
  743.  
  744. const decode = window.TextDecoder.prototype.decode;
  745. window.TextDecoder.prototype.decode = function(...args) {
  746. let data = decode.apply(this, args);
  747. if (data.length > 1050000) {
  748. initialize(data);
  749. }
  750. return data;
  751. }
  752. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement