Advertisement
sted__

good krunker

Nov 19th, 2021
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 68.37 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Krunker hacks by Bōken Party, lazyProgramma
  3. // @description The most advanced krunker cheat
  4. // @version 1
  5. // @author Bōken Party, lazyProgramma
  6. // @icon https://media.giphy.com/media/7FrOU9tPbgAZtxV5mb/giphy.gif
  7. // @include /^https?\:\/\/krunker\..*\/.*$/
  8. // @include /^https?\:\/\/.*.browserfps\..*\/.*$/
  9. // @exclude *://krunker.io/editor*
  10. // @exclude *://krunker.io/social*
  11. // @run-at document-start
  12. // @grant none
  13. // @noframes
  14. // ==/UserScript==
  15.  
  16. //Basically the start of the script, using the variable names
  17. //Krunker hacks, made by lazyProgramma
  18. document.title = "Boken party lazyProgramma hacks";
  19. (function(lazyProgramma, bokenParty) {
  20. //Creates the function called log, also used in the code later on to make the hacks
  21. function Log() {
  22. this.clash = (str, args = []) => this.log('info', str, args);
  23. this.royale = (str, args = []) => this.log('warn', str, args);
  24. this.boken = (str, args = []) => this.log('error', str, args);
  25. this.log = (level, str, args) => {
  26. /*Incase if you don't know what these are, these are krunker hacks and use them at your own risk as you can get banned.
  27. If you have already gotten banned then reset your router.
  28. To reset your router, you must turn it off, wait 5 minutes then turn it back on as krunker ip bans you according to your ip.
  29. When you turn your router back on, your ip would have changed so you can play again just like normal!
  30. Another thing that you could try and do is to manually change your static ip on your computer.
  31. You can do this by going on Control panel>
  32. Network and sharing centre>
  33. Click on the hyperlink that says either ethernet or internet>
  34. Properties>Double click on the thing that says "Internet protocol version 4 (TCP /IPV4)>
  35. Change "obtain the IP address automatically" to "Use the following IP address">
  36. Open command prompt and type in ipconfig and if youre using ethernet, go to where it says ethernet in ethernet and find all the information into the static ip changing.
  37. Remember to tick the box that says "validate settings upon exit" once you finish".
  38. If it says that microsoft is checking for problems after then close it and if you can't connect then change the ip back to "obtain the IP address automatically"
  39. */
  40. documemt.title("Krunker, but it's hacked by lazyProgramma (boken party)")
  41. let colours = [];
  42. switch(level) {
  43. case 'info':colours=["#07a1d5", "#6e07d5"];break;
  44. case 'error':colours=["#d50707", "#d53a07"];break;
  45. case 'warn':colours=["#d56e07", "#d5d507"];break;
  46. }
  47. //Displays text in the console
  48. console.log('%c '.concat('[ ', level.toUpperCase(), ' ] '), [
  49. `background: linear-gradient(${colours[0]}, ${colours[1]})`
  50. , 'border: 1px solid #3E0E02'
  51. , 'color: white'
  52. , 'display: block'
  53. , 'text-shadow: 0 1px 0 rgba(0, 0, 0, 0.3)'
  54. , 'box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset, 0 5px 3px -5px rgba(0, 0, 0, 0.5), 0 -13px 5px -10px rgba(255, 255, 255, 0.4) inset'
  55. , 'line-height: 12px'
  56. , 'text-align: center'
  57. , 'font-weight: bold'
  58. ].join(';'))
  59. if (args.length) console.log(str, args);
  60. else console.log(str);
  61. }
  62. //Assigns the variable log to a new log. The log function is defined above.
  63. } var logs = new Log();
  64.  
  65. //Creates a class called "Boken" with settings defined and bokenParty assigned as this to add some spirit to the script I guess!
  66. class Boken {
  67. constructor() {
  68. bokenParty = this;
  69. console.dir(this + " directory");
  70. this.settings = Object.assign({}, {
  71. aimbot: 1,
  72. superSilent: true,
  73. aimbot2: true,
  74. check1: false,
  75. zoom_of_weapon: 1.0,
  76. wallbangs: true,
  77. alwaysAim: false,
  78. hack_of_pitch: 0,
  79. automatic_reload: false,
  80. auto_bunnyhop: false,
  81. check_of_range: false,
  82. bullet_trail: false,
  83. aimFrameSpin: 10,
  84. animatedBillboards: false,
  85. ESP: 1,
  86. espFontSize: 10,
  87. tracers: false,
  88. gui_button: true,
  89. v_Aim: false,
  90. inv_Aim: false,
  91. force_loud: false,
  92. bhop: 0,
  93. spinny_Shooty: false,
  94. target_Mark: true,
  95. yay_skinnies: false,
  96. offset_of_aim: 0,
  97. /*
  98. The above 2 lines of comment are optional and would do the same things as if they were there or not there
  99. Donations: false,
  100. Donations2: false,
  101. */
  102. noiseofaim: 0,
  103. ingamehotkeys: true,
  104. antikick: true,
  105. fovbox: false,
  106. FOVBOXD: true,
  107. fovBoxSize: 1,
  108. encrypted: false,
  109. HA: false,
  110. HS: false,
  111. HM: false,
  112. HNC: false,
  113. HCB: false,
  114. chams: false,
  115. CC: 1,
  116. wireframe: false,
  117. copiedCSS: true,
  118. customCSS: "",
  119. TC: false,
  120. AN: false,
  121. chamsInterval: 500,
  122. PMT: false,
  123. FNO: false,
  124. AR: 0,
  125. });
  126.  
  127. //Assigns this (user defined variable).state to the following integers, bool values and a new Set
  128. this.state = Object.assign({}, {
  129. BAO: true,
  130.  
  131. QCCS: true,
  132.  
  133. SF: 0,
  134. pK: new Set(),
  135.  
  136. sC: 0,
  137.  
  138. aT: 0,
  139. //Nametags set to false
  140. nT: false,
  141. //Frames set do 0
  142. frame: 0
  143. });
  144. //Assigns this.rainbow to 0 (starting from 0, to change colour)
  145. this.rainbow = 0;
  146. this.colors = {
  147. White: "#FFFFFF",
  148. Black: "#000000",
  149. Purple: "#9400D3",
  150. Pink: "#FF1493",
  151. Blue: "#1E90FF",
  152. dark_blue: "#0000FF",
  153. Aqua: "#00FFFF",
  154. Green: "#008000",
  155. Lime: "#7FFF00",
  156. Orange: "#FF8C00",
  157. Yellow: "#FFFF00",
  158. Red: "#FF0000",
  159. }
  160. this.rajariya = Symbol("rajariya");
  161. //sets this.GUI to an empty list ready for variables and other things to be stored into it
  162. this.GUI = {};
  163. try {
  164. this.load();
  165. } catch (e) {
  166. console.error(e);
  167. console.trace(e.stack);
  168. }
  169. }
  170.  
  171. load() {
  172.  
  173. this.defines();
  174. localStorage.kro_setngss_json ? Object.assign(this.settings, JSON.parse(localStorage.kro_setngss_json)) :
  175. localStorage.kro_setngss_json = JSON.stringify(this.settings);
  176. this.createListeners();
  177. this.hooking();
  178. }
  179.  
  180. isType(item, type) {
  181. return typeof item === type;
  182. }
  183.  
  184. isDefined(item) {
  185. return !this.isType(item, "undefined") && item !== null;
  186. }
  187.  
  188. objectHas(obj, arr) {
  189. return arr.some(prop => obj.hasOwnProperty(prop));
  190. }
  191. createElement(type, html, id) {
  192. let newElement = document.createElement(type)
  193. if (id) newElement.id = id
  194. newElement.innerHTML = html
  195. return newElement
  196. }
  197.  
  198. getVersion() {
  199. return this.version
  200. }
  201.  
  202. Bōken() {
  203. if (typeof window !== 'undefined' && typeof window.process === 'object' && window.process.type === 'renderer') {
  204. return true;
  205. }
  206. if (typeof process !== 'undefined' && typeof process.versions === 'object' && !!process.versions.electron) {
  207. return true;
  208. }
  209.  
  210. if (typeof navigator === 'object' && typeof navigator.userAgent === 'string' && navigator.userAgent.indexOf('Bōken') >= 0) {
  211. return true;
  212. }
  213.  
  214. return false;
  215. }
  216.  
  217. //sets the function saveAs to the following predefined functions and inside the saveAs, el.download is set to the variable known as name
  218. saveAs(name, data) {
  219. let blob = new Blob([data], {
  220. type: 'text/plain'
  221. });
  222. let el = window.document.createElement("a");
  223. el.href = window.URL.createObjectURL(blob);
  224. el.download = name;
  225. window.document.body.appendChild(el);
  226. el.click();
  227. window.document.body.removeChild(el);
  228. }
  229.  
  230. saveScript() {
  231. this.fetchScript().then(script => {
  232. this.saveAs("game_" + this.getVersion() + ".js", script)
  233. })
  234. }
  235.  
  236.  
  237.  
  238. async fetchScript() {
  239. const data = await this.request("https://krunker.io/social.html", "text");
  240. const buffer = await this.request("https://krunker.io/pkg/krunker." + /\w.exports="(\w+)"/.exec(data)[1] + ".vries", "arrayBuffer");
  241. const array = Array.from(new Uint8Array(buffer));
  242. const xor = array[0] ^ '!'.charCodeAt(0);
  243. return array.map((code) => String.fromCharCode(code ^ xor)).join('');
  244. }
  245. async request(url, type, opt = {}) {
  246. return fetch(url, opt).then(response => {
  247. if (!response.ok) {
  248. throw new Error("Network response from " + url + " was not ok, made by Bōken Party")
  249. }
  250. return response[type]()
  251. })
  252. }
  253.  
  254. async waitFor(test, timeout_ms = 2e4, doWhile = null) {
  255. let sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
  256. return new Promise(async (resolve, reject) => {
  257. if (typeof timeout_ms != "number") reject("Timeout argument not a number in waitFor(selector, timeout_ms)");
  258. let result, freq = 100;
  259. while (result === undefined || result === false || result === null || result.length === 0) {
  260. if (doWhile && doWhile instanceof Function) doWhile();;
  261. if (timeout_ms % 10000 < freq) console.log("waiting for: ", test);
  262. if ((timeout_ms -= freq) < 0) {
  263. console.log("Timeout : ", test);
  264. resolve(false);
  265. return;
  266. }
  267. await sleep(freq);
  268. result = typeof test === "string" ? Function(test)() : test();
  269. }
  270. console.log("Passed : ", test);
  271. resolve(result);
  272. });
  273. };
  274.  
  275. async hooking() {
  276. await this.waitFor(_ => this.isDefined(this.socket))
  277. if (!this.isDefined(this.socket)) location.assign(location.origin);
  278. this.socket.send = new Proxy(this.socket.send, {
  279. apply(target, that, args) {
  280. if (args[0] === "en") {
  281. that.skinCache = {
  282. main: args[1][2][0],
  283. secondary: args[1][2][1],
  284. hat: args[1][3],
  285. body: args[1][4],
  286. knife: args[1][9],
  287. dye: args[1][14],
  288. waist: args[1][17],
  289. }
  290. }
  291. return Reflect.apply(...arguments);
  292. }
  293. })
  294. this.socket._dispatchEvent = new Proxy(this.socket._dispatchEvent, {
  295. apply(target, that, args) {
  296. if (bokenParty.settings.yay_skinnies && that.skinCache && args[0] === "0") {
  297. let pInfo = args[1][0];
  298. let pSize = 38;
  299. while (pInfo.length % pSize !== 0) pSize++;
  300. for (let i = 0; i < pInfo.length; i += pSize) {
  301. if (pInfo[i] === that.socketId || 0) {
  302. pInfo[i + 12] = [that.skinCache.main, that.skinCache.secondary];
  303. pInfo[i + 13] = that.skinCache.hat;
  304. pInfo[i + 14] = that.skinCache.body;
  305. pInfo[i + 19] = that.skinCache.knife;
  306. pInfo[i + 24] = that.skinCache.dye;
  307. pInfo[i + 33] = that.skinCache.waist;
  308. }
  309. }
  310. }
  311.  
  312. return target.apply(that, args);
  313. }
  314. })
  315.  
  316. await this.waitFor(_ => this.isDefined(this.overlay))
  317. this.ctx = this.overlay.canvas.getContext('2d');
  318. this.overlay.render = new Proxy(this.overlay.render, {
  319. apply(target, that, args) {
  320. ["scale", "game", "controls", "renderer", "me"].forEach((item, index) => {
  321. bokenParty[item] = args[index]
  322. });
  323. Reflect.apply(...arguments);
  324. if (bokenParty.me && bokenParty.ctx) {
  325. bokenParty.ctx.save();
  326. bokenParty.ctx.scale(bokenParty.scale, bokenParty.scale);
  327. bokenParty.render();
  328. bokenParty.ctx.restore();
  329.  
  330. if (!bokenParty.me.procInputs[bokenParty.rajariya]) {
  331. bokenParty.me.procInputs = new Proxy(bokenParty.me.procInputs, {
  332. apply: function(target, that, [input, game, recon, lock]) {
  333. if (that) bokenParty.inputs(input);
  334. return target.apply(that, [input, game, recon, lock]);
  335. },
  336. get: function(target, key) {
  337. return key === bokenParty.rajariya ? true : Reflect.get(target, key);
  338. },
  339. })
  340. }
  341. //Wallbangs hack
  342. bokenParty.game.map.manager.objects.filter(x => {
  343. return x.penetrable
  344. }).map((obj, index, array) => {
  345. obj.transparent=bokenParty.settings.wallbangs;
  346. });
  347. }
  348. }
  349. })
  350.  
  351. this.cleanGUI();
  352. this.customCSS();
  353. await this.waitFor(_ => this.isDefined(window.windows));
  354. this.initGUI();
  355. }
  356.  
  357. defines() {
  358. const $origSkins = Symbol("origSkins"),
  359. $localSkins = Symbol("localSkins");
  360.  
  361. Object.defineProperties(Object.prototype, {
  362. canvas: {
  363. set(val) {
  364. this._value = val;
  365. },
  366. get() {
  367. let object = this;
  368. if (bokenParty.objectHas(object, ["health", "health2", "dmgColor"])) {
  369. bokenParty.overlay = this;
  370. }
  371. return this._value;
  372. }
  373. },
  374. RENDER: {
  375. set(val) {
  376. this._value = val;
  377. bokenParty.renderer = this._value;
  378. bokenParty.renderer.adsFovMlt.fill(bokenParty.settings.zoom_of_weapon)
  379. bokenParty.fxComposer = this;
  380. },
  381. get() {
  382. return this._value;
  383. }
  384. },
  385. OBJLoader: {
  386. set(val) {
  387. bokenParty.three = this;
  388. this._value = val;
  389. },
  390. get() {
  391. return this._value;
  392. }
  393. },
  394. skins: {
  395. set(fn) {
  396. this[$origSkins] = fn;
  397. if (void 0 == this.localSkins || !this.localSkins.length) {
  398. this[$localSkins] = Array.apply(null, Array(5e3)).map((x, i) => {
  399. return {
  400. ind: i,
  401. cnt: 0x1,
  402. }
  403. })
  404. }
  405. return fn;
  406. },
  407. get() {
  408. return bokenParty.settings.yay_skinnies && this.stats ? this[$localSkins] : this[$origSkins];
  409. }
  410. },
  411. useLooseClient: {
  412. enumerable: false,
  413. get() {
  414. return this._ulc
  415. },
  416. set(v) {
  417. bokenParty.config = this
  418. Object.defineProperty(this, "nameVisRate", {
  419. value: 0,
  420. writable: false,
  421. configurable: true,
  422. })
  423. this._ulc = v
  424. }
  425. },
  426. trail: {
  427. enumerable: false,
  428. get() {
  429. return bokenParty.settings.bullet_trail || this._trail
  430. },
  431. set(v) {
  432. this._trail = v
  433. }
  434. },
  435. showTracers: {
  436. enumerable: false,
  437. get() {
  438. return bokenParty.settings.bullet_trail || this._showTracers
  439. },
  440. set(v) {
  441. this._showTracers = v
  442. }
  443. },
  444. shaderId: {
  445. enumerable: false,
  446. get() {
  447. if (this.src && this.src.startsWith("pubs/")) return bokenParty.settings.animatedBillboards ? 1 : this.rshaderId;
  448. else return this.rshaderId
  449. },
  450. set(v) {
  451. this.rshaderId = v
  452. }
  453. },
  454.  
  455. idleTimer: {
  456. enumerable: false,
  457. get() {
  458. return bokenParty.settings.antikick ? 0 : this._idleTimer
  459. },
  460. set(v) {
  461. this._idleTimer = v
  462. }
  463. },
  464. kickTimer: {
  465. enumerable: false,
  466. get() {
  467. return bokenParty.settings.antikick ? Infinity : this._kickTimer
  468. },
  469. set(v) {
  470. this._kickTimer = v
  471. }
  472. },
  473. cnBSeen: {
  474. set (val) {
  475. this.inView = val;
  476. },
  477. get() {
  478. let isEnemy =!bokenParty.isDefined(bokenParty.me)|| !bokenParty.me.team||bokenParty.me.team !=this.team;
  479. return this.inView||isEnemy&&bokenParty.state.nT;
  480. }
  481. },
  482. events: {
  483. set (val) {
  484. if (this.ahNum ===0) {
  485. bokenParty.wsSend = this.send.bind(this);
  486. bokenParty.wsEvent = this._dispatchEvent.bind(this);
  487. bokenParty.socket = this;
  488. }
  489. this._events = val;
  490. },
  491. get() {
  492. return this._events;
  493. }
  494. },
  495. });
  496.  
  497.  
  498. Object.keys(AudioParam.prototype).forEach(name => {
  499. if (Object.getOwnPropertyDescriptor(AudioParam.prototype, name).get) return
  500. const old = AudioParam.prototype[name]
  501. AudioParam.prototype[name] = function() {
  502. try {
  503. return old.apply(this, arguments)
  504. } catch (e) {
  505. console.log("AudioParam error:\n" + e)
  506. return false
  507. }
  508. }
  509. })
  510. }
  511.  
  512. iframe() {
  513. const iframe = document.createElement('iframe');
  514. iframe.setAttribute('style', 'display:none');
  515. iframe.setAttribute("id", Boken);
  516. iframe.src = location.origin;
  517. document.documentElement.appendChild(iframe);
  518.  
  519. const ifrWin = iframe.contentWindow;
  520. const ifrDoc = iframe.contentDocument?iframe.contentDocument:iframe.contentWindow.document;
  521.  
  522. let lazy = 0;
  523.  
  524. ifrWin.TextDecoder.prototype.decode = new Proxy(window.TextDecoder.prototype.decode, {
  525. apply: function(target, that, args) {
  526. let string = Reflect.apply(...arguments);
  527. if (string.length > 5e4) {
  528. logs.warn("lazy = " + lazy);
  529. if (lazy == 0) {
  530. bokenParty.gameJS = string;
  531. } else {
  532. bokenParty.gameJS += string;
  533. } lazy ++;
  534.  
  535. }
  536. if (string.includes("generate-token")) bokenParty.generated = true;
  537. else if (string.length == 40||bokenParty.generated) {
  538. bokenParty.token = string;
  539. console.log("Token ", string);
  540. document.documentElement.removeChild(iframe);
  541. }
  542. return string;
  543. },
  544. });
  545. }
  546.  
  547. createObservers() {
  548.  
  549. let observer = new MutationObserver(mutations => {
  550. for (let mutation of mutations) {
  551. for (let node of mutation.addedNodes) {
  552. if (node.tagName === 'SCRIPT') {
  553. if (node.type === "text/javascript" && node.innerHTML.startsWith("*!", 1)) {
  554. node.innerHTML = "";
  555. observer.disconnect();
  556. } else if (node.src) {
  557.  
  558. }
  559. }
  560. }
  561. }
  562. });
  563. observer.observe(document, {
  564. childList: true,
  565. subtree: true
  566. });
  567. }
  568.  
  569. createListeners() {
  570.  
  571. window.addEventListener("mouseup", (e) => {
  572. if (e.which === 2 && bokenParty.settings.encrypted) {
  573. e.preventDefault()
  574.  
  575. }
  576. })
  577. window.addEventListener("keyup", event => {
  578. if (this.state.pK.has(event.code)) this.state.pK.delete(event.code)
  579. if (!(document.activeElement.tagName === "INPUT" || !window.endUI && window.endUI.style.display) && bokenParty.settings.ingamehotkeys) {
  580. switch (event.code) {
  581. case "KeyZ":
  582. this.state.BAO = !this.state.BAO
  583. this.wsEvent("ch", [null, ("Aimbot " + (this.state.BAO ? "on" : "off")), 1])
  584. break
  585. case "KeyP":
  586. this.settings.ESP = (this.settings.ESP + 1) % 4
  587. this.wsEvent("ch", [null, "ESP: " + ["disabled, by Bōken Party", "nametags, by Bōken Party", "box, by Bōken Party", "full, by Bōken Party"][this.settings.esp], "Changed"])
  588. break
  589. }
  590. }
  591. })
  592. window.addEventListener("keydown", event => {
  593. if (event.code == "F1") {
  594. event.preventDefault();
  595. }
  596. if ('INPUT' == document.activeElement.tagName || !window.endUI && window.endUI.style.display) return;
  597. switch (event.code) {
  598. case 'NumpadSubtract':
  599. document.exitPointerLock();
  600.  
  601. console.dirxml(this)
  602. break;
  603. default:
  604. if (!this.state.pK.has(event.code)) this.state.pK.add(event.code);
  605. break;
  606. }
  607. })
  608. }
  609.  
  610. inputs(input) {
  611. const key = {
  612. frame: 0,
  613. delta: 1,
  614. xdir: 2,
  615. ydir: 3,
  616. moveDir: 4,
  617. shoot: 5,
  618. scope: 6,
  619. jump: 7,
  620. reload: 8,
  621. crouch: 9,
  622. weaponScroll: 10,
  623. weaponSwap: 11,
  624. moveLock: 12
  625. }
  626.  
  627. const moveDir = {
  628. leftStrafe: 0,
  629. forward: 1,
  630. rightStrafe: 2,
  631. right: 3,
  632. backwardRightStrafe: 4,
  633. backward: 5,
  634. backwardLeftStrafe: 6,
  635. left: 7
  636. }
  637.  
  638. this.state.frame = input[key.frame];
  639. this.state.nT = [1, 2].some(n => n == this.settings.ESP) || this.settings.FNO;
  640.  
  641. if (this.me) {
  642.  
  643.  
  644. if (this.settings.AN && Object.keys(this.me.streaks).length) {
  645. this.wsSend("k", 0)
  646. }
  647.  
  648.  
  649. if (this.settings.bhop) {
  650. if (this.state.pK.has("Space") || this.settings.bhop % 2) {
  651. this.controls.keys[this.controls.binds.jump.val] ^= 1;
  652. if (this.controls.keys[this.controls.binds.jump.val]) {
  653. this.controls.didPressed[this.controls.binds.jump.val] = 1;
  654. }
  655. if (this.state.pK.has("Space") || this.settings.bhop == 3) {
  656. if (this.me.yVel < -0.03 && this.me.canSlide) {
  657. setTimeout(() => {
  658. this.controls.keys[this.controls.binds.crouch.val] = 0;
  659. }, this.me.slideTimer || 325);
  660. this.controls.keys[this.controls.binds.crouch.val] = 1;
  661. this.controls.didPressed[this.controls.binds.crouch.val] = 1;
  662. }
  663. }
  664. }
  665. }
  666.  
  667.  
  668. if (this.settings.FNO) {
  669. try {
  670. Object.defineProperty(this.game.config, "nT", {
  671. get() {
  672. return bokenParty.settings.FNO ? false : this.game._nT
  673. },
  674. set(v) {
  675. this.game._nT = v
  676. }
  677. })
  678. } catch (e) {}
  679. }
  680.  
  681.  
  682. if (this.settings.spinny_Shooty) {
  683. const rate = 1
  684. input[key.moveDir] !== -1 && (input[key.moveDir] = (input[key.moveDir] + this.state.sC - Math.round(7 * (input[key.ydir] / (Math.PI * 2000)))) % 7)
  685. input[key.ydir] = this.state.sC / 7 * (Math.PI * 2000)
  686. input[key.frame] % rate === 0 && (this.state.sC = (this.state.sC + 1) % 7)
  687. }
  688.  
  689.  
  690. if (this.settings.automatic_reload && this.me.ammos[this.me.weaponIndex] === 0) {
  691. input[key.reload] = 1
  692. }
  693.  
  694.  
  695. if (this.settings.hack_of_pitch) {
  696. switch (this.settings.hack_of_pitch) {
  697. case 1:
  698. input[key.xdir] = -Math.PI * 500
  699. break
  700. case 2:
  701. input[key.xdir] = Math.PI * 500
  702. break
  703. case 3:
  704. input[key.xdir] = Math.sin(Date.now() / 50) * Math.PI * 500
  705. break
  706. case 4:
  707. input[key.xdir] = Math.sin(Date.now() / 250) * Math.PI * 500
  708. break
  709. case 5:
  710. input[key.xdir] = input[key.frame] % 2 ? Math.PI * 500 : -Math.PI * 500
  711. break
  712. case 6:
  713. input[key.xdir] = (Math.random() * Math.PI - Math.PI / 2) * 1000
  714. break
  715. }
  716. }
  717.  
  718.  
  719. const getNoise = () => (Math.random() * 2 - 1) * this.settings.noiseofaim
  720. this.game.players.list.forEach(v => {
  721. v.pos = {
  722. x: v.x,
  723. y: v.y,
  724. z: v.z
  725. };
  726. v.npos = {
  727. x: v.x + getNoise(),
  728. y: v.y + getNoise(),
  729. z: v.z + getNoise()
  730. };
  731. v.isTarget = false
  732. })
  733. if (this.game.AI.ais) {
  734. this.game.AI.ais.forEach(v => v.npos = v.pos = {
  735. x: v.x,
  736. y: v.y,
  737. z: v.z
  738. })
  739. }
  740.  
  741.  
  742. if (this.renderer && this.renderer.frustum && this.me.active) {
  743. this.controls.target = null
  744.  
  745.  
  746. let targets = this.game.players.list.filter(enemy => !enemy.isYTMP && enemy.hasOwnProperty('npos') && (!this.settings.check1 || this.containsPoint(enemy.npos)) && ((this.me.team === null || enemy.team !== this.me.team) && enemy.health > 0 && enemy.inView)).sort((e, e2) => this.getDistance(this.me.x, this.me.z, e.npos.x, e.npos.z) - this.getDistance(this.me.x, this.me.z, e2.npos.x, e2.npos.z));
  747. let target = targets[0];
  748.  
  749.  
  750. if (this.settings.fovbox) {
  751. const scale = this.scale || parseFloat(document.getElementById("uiBase").style.transform.match(/\((.+)\)/)[1])
  752. const width = innerWidth / scale,
  753. height = innerHeight / scale
  754.  
  755. let foundTarget = false
  756. for (let i = 0; i < targets.length; i++) {
  757. const t = targets[i]
  758. const sp = this.world2Screen(new this.three.Vector3(t.x, t.y, t.z), width, height, t.height / 2)
  759. let fovBox = [width / 3, height / 4, width * (1 / 3), height / 2]
  760. switch (this.settings.fovBoxSize) {
  761.  
  762. case 2:
  763. fovBox = [width * 0.4, height / 3, width * 0.2, height / 3]
  764. break
  765.  
  766. case 3:
  767. fovBox = [width * 0.45, height * 0.4, width * 0.1, height * 0.2]
  768. break
  769. }
  770. if (sp.x >= fovBox[0] && sp.x <= (fovBox[0] + fovBox[2]) && sp.y >= fovBox[1] && sp.y < (fovBox[1] + fovBox[3])) {
  771. target = targets[i]
  772. foundTarget = true
  773. break
  774. }
  775. }
  776. if (!foundTarget) {
  777. target = void "kpal"
  778. }
  779. }
  780.  
  781. let isAiTarget = false
  782. if (this.game.AI.ais && this.settings.aimbot2) {
  783. let aiTarget = this.game.AI.ais.filter(ent => ent.mesh && ent.mesh.visible && ent.health && ent.pos && ent.canBSeen).sort((p1, p2) => this.getDistance(this.me.x, this.me.z, p1.pos.x, p1.pos.z) - this.getDistance(this.me.x, this.me.z, p2.pos.x, p2.pos.z)).shift()
  784. if (!target || (aiTarget && this.getDistance(this.me.x, this.me.z, aiTarget.pos.x, aiTarget.pos.z) > this.getDistance(this.me.x, this.me.z, target.pos.x, target.pos.z))) {
  785. target = aiTarget
  786. isAiTarget = true
  787. }
  788. }
  789.  
  790. const isShooting = input[key.shoot]
  791. if (target && this.settings.aimbot &&
  792. this.state.BAO &&
  793. (!this.settings.AR || this.getDistance3D(this.me.x, this.me.y, this.me.z, target.x, target.y, target.z) < this.settings.AR) &&
  794. (!this.settings.check_of_range || this.getDistance3D(this.me.x, this.me.y, this.me.z, target.x, target.y, target.z) <= this.me.weapon.range) &&
  795. !this.me.reloadTimer) {
  796.  
  797. if (this.settings.v_Aim) {
  798. input[key.scope] = 1
  799. }
  800. target.isTarget = this.settings.target_Mark
  801.  
  802. const yDire = (this.getDir(this.me.z, this.me.x, target.npos.z, target.npos.x) || 0) * 1000
  803. const xDire = isAiTarget ?
  804. ((this.getXDir(this.me.x, this.me.y, this.me.z, target.npos.x, target.npos.y - target.dat.mSize / 2, target.npos.z) || 0) - (0.3 * this.me.recoilAnimY)) * 1000 :
  805. ((this.getXDir(this.me.x, this.me.y, this.me.z, target.npos.x, target.npos.y - target.crouchVal * 3 + this.me.crouchVal * 3 + this.settings.offset_of_aim, target.npos.z) || 0) - (0.3 * this.me.recoilAnimY)) * 1000
  806.  
  807.  
  808. if (this.settings.force_loud) {
  809. this.controls.target = {
  810. xD: xDire / 1000,
  811. yD: yDire / 1000
  812. }
  813. this.controls.update(400)
  814. }
  815.  
  816.  
  817. switch (this.settings.aimbot) {
  818.  
  819. case 1:
  820. case 2:
  821. case 5:
  822. case 6:
  823. case 9:
  824. case 10: {
  825. let onAim = [5, 6, 9].some(n => n == this.settings.aimbot)
  826. if ((this.settings.aimbot === 5 && input[key.scope]) || this.settings.aimbot === 10) {
  827. this.controls.target = {
  828. xD: xDire / 1000,
  829. yD: yDire / 1000
  830. }
  831. this.controls.update(400)
  832. }
  833. if ([2, 10].some(n => n == this.settings.aimbot) || (this.settings.aimbot === 1 && this.me.weapon.id)) {
  834. !this.me.weapon.melee && (input[key.scope] = 1)
  835. }
  836. if (this.me.didShoot) {
  837. input[key.shoot] = 0
  838. this.state.QCCS = false
  839. setTimeout(() => {
  840. this.state.QCCS = true
  841. }, this.me.weapon.rate * .85)
  842. } else if (this.state.QCCS && (!onAim || input[key.scope])) {
  843. if (!this.me.weapon.melee) {
  844. input[key.scope] = 1
  845. }
  846. if (!this.settings.superSilent && this.settings.aimbot !== 9) {
  847. input[key.ydir] = yDire
  848. input[key.xdir] = xDire
  849. }
  850. if ((this.settings.aimbot !== 9 && (!this.me.aimVal || this.me.weapon.noAim || this.me.weapon.melee)) ||
  851. (this.settings.aimbot === 9 && isShooting)) {
  852. input[key.ydir] = yDire
  853. input[key.xdir] = xDire
  854. input[key.shoot] = 1
  855. }
  856. }
  857. }
  858. break
  859.  
  860. case 4:
  861. case 7:
  862. case 8:
  863. case 11:
  864. if (input[key.scope] || this.settings.aimbot === 11) {
  865. this.controls.target = {
  866. xD: xDire / 1000,
  867. yD: yDire / 1000
  868. }
  869. this.controls.update(({
  870. 4: 400,
  871. 7: 110,
  872. 8: 70,
  873. 11: 400
  874. })[this.settings.aimbot])
  875. if ([4, 11].some(n => n == this.settings.aimbot)) {
  876. input[key.xdir] = xDire
  877. input[key.ydir] = yDire
  878. }
  879. if (this.me.didShoot) {
  880. input[key.shoot] = 0
  881. this.state.QCCS = false
  882. setTimeout(() => {
  883. this.state.QCCS = true
  884. }, this.me.weapon.rate * 0.85)
  885. } else if (this.state.QCCS) {
  886. input[this.me.weapon.melee ? key.shoot : key.scope] = 1
  887. }
  888. } else {
  889. this.controls.target = null
  890. }
  891. break
  892.  
  893. case 12: {
  894. if (!this.three ||
  895. !this.renderer ||
  896. !this.renderer.camera ||
  897. !this.game ||
  898. !this.game.players ||
  899. !this.game.players.list.length ||
  900. !input[key.scope] ||
  901. this.me.aimVal) {
  902. break
  903. }
  904.  
  905. if (!this.state.raycaster) {
  906. this.state.raycaster = new this.three.Raycaster()
  907. this.state.mid = new this.three.Vector2(0, 0)
  908. }
  909. const playerMaps = []
  910. for (let i = 0; i < this.game.players.list.length; i++) {
  911. let p = this.game.players.list[i]
  912. if (!p || !p.objInstances || p.isYTMP || !(this.me.team === null || p.team !== this.me.team) || !p.inView) {
  913. continue
  914. }
  915. playerMaps.push(p.objInstances)
  916. }
  917. const raycaster = this.state.raycaster
  918. raycaster.setFromCamera(this.state.mid, this.renderer.camera)
  919. if (raycaster.intersectObjects(playerMaps, true).length) {
  920. input[key.shoot] = this.me.didShoot ? 0 : 1
  921. }
  922. }
  923. break
  924. }
  925. } else {
  926. if (this.settings.inv_Aim) {
  927. input[key.scope] = 0
  928. }
  929. this.state.SF = 0
  930. }
  931. }
  932.  
  933. if (this.settings.alwaysAim) {
  934. input[key.scope] = 1
  935. }
  936. if (this.settings.PMT && this.me.weapon.melee) {
  937. input[key.scope] = 0
  938. }
  939. }
  940. return input;
  941. }
  942.  
  943. render() {
  944.  
  945. var scale = this.scale || parseFloat(document.getElementById("uiBase").style.transform.match(/\((.+)\)/)[1]);
  946. let width = innerWidth / scale,
  947. height = innerHeight / scale
  948.  
  949. let world2Screen = (pos, yOffset = 0) => {
  950. pos.y += yOffset
  951. pos.project(this.renderer.camera)
  952. pos.x = (pos.x + 1) / 2
  953. pos.y = (-pos.y + 1) / 2
  954. pos.x *= width
  955. pos.y *= height
  956. return pos
  957. }
  958. let line = (x1, y1, x2, y2, lW, sS) => {
  959. this.ctx.save()
  960. this.ctx.lineWidth = lW + 2
  961. this.ctx.beginPath()
  962. this.ctx.moveTo(x1, y1)
  963. this.ctx.lineTo(x2, y2)
  964. this.ctx.strokeStyle = "rgba(0, 0, 0, 0.25)"
  965. this.ctx.stroke()
  966. this.ctx.lineWidth = lW
  967. this.ctx.strokeStyle = sS
  968. this.ctx.stroke()
  969. this.ctx.restore()
  970. }
  971. let rect = (x, y, ox, oy, w, h, color, fill) => {
  972. this.ctx.save()
  973. this.ctx.translate(~~x, ~~y)
  974. this.ctx.beginPath()
  975. fill ? this.ctx.fillStyle = color : this.ctx.strokeStyle = color
  976. this.ctx.rect(ox, oy, w, h)
  977. fill ? this.ctx.fill() : this.ctx.stroke()
  978. this.ctx.closePath()
  979. this.ctx.restore()
  980. }
  981. let getTextMeasurements = (arr) => {
  982. for (let i = 0; i < arr.length; i++) {
  983. arr[i] = ~~this.ctx.measureText(arr[i]).width
  984. }
  985. return arr
  986. }
  987. let gradient = (x, y, w, h, colors) => {
  988. const grad = this.ctx.createLinearGradient(x, y, w, h)
  989. for (let i = 0; i < colors.length; i++) {
  990. grad.addColorStop(i, colors[i])
  991. }
  992. return grad
  993. }
  994. let text = (txt, font, color, x, y) => {
  995. this.ctx.save()
  996. this.ctx.translate(~~x, ~~y)
  997. this.ctx.fillStyle = color
  998. this.ctx.strokeStyle = "rgba(0, 0, 0, 0.5)"
  999. this.ctx.font = font
  1000. this.ctx.lineWidth = 1
  1001. this.ctx.strokeText(txt, 0, 0)
  1002. this.ctx.fillText(txt, 0, 0)
  1003. this.ctx.restore()
  1004. }
  1005.  
  1006. const padding = 2
  1007.  
  1008. for (const player of this.game.players.list.filter(v => (!v.isYTMP && v.active && (v.pos = {
  1009. x: v.x,
  1010. y: v.y,
  1011. z: v.z
  1012. })))) {
  1013. const pos = new this.three.Vector3(player.pos.x, player.pos.y, player.pos.z)
  1014. const screenR = world2Screen(pos.clone())
  1015. const screenH = world2Screen(pos.clone(), player.height)
  1016. const hDiff = ~~(screenR.y - screenH.y)
  1017. const bWidth = ~~(hDiff * 0.6)
  1018. const font = this.settings.espFontSize + "px GameFont"
  1019. const enemy = this.me.team === null || player.team !== this.me.team;
  1020.  
  1021. if (!this.containsPoint(player.pos)) {
  1022. continue
  1023. }
  1024.  
  1025. if (this.settings.tracers) {
  1026. line(width / 2, (bokenParty.settings.tracers === 2 ? height / 2 : height - 1), screenR.x, screenR.y, 2, player.team === null ? "#FF4444" : player.team === this.me.team ? "#44AAFF" : "#FF4444")
  1027. }
  1028.  
  1029.  
  1030. const obj = player.objInstances;
  1031. if (this.isDefined(obj)) {
  1032. if (!obj.visible) {
  1033. Object.defineProperty(player.objInstances, 'visible', {
  1034. value: true,
  1035. writable: false
  1036. });
  1037. } else {
  1038. let chamsEnabled = this.settings.chams;
  1039. if (bokenParty.rainbow >= 360) bokenParty.rainbow = 0; else bokenParty.rainbow++;
  1040. obj.traverse(child => {
  1041. if (child && child.type == "Mesh" && this.isDefined(child.material)) {
  1042. if (!child.hasOwnProperty(lazyProgramma)) {
  1043. child[lazyProgramma] = child.material;
  1044. } else if (child.hasOwnProperty(lazyProgramma)) {
  1045. Object.defineProperty(child, 'material', {
  1046. get(){
  1047. return !chamsEnabled||(!enemy && !bokenParty.settings.TC) ? this[lazyProgramma] : new bokenParty.three.MeshBasicMaterial({
  1048. color: new bokenParty.three.Color(bokenParty.settings.CC == 12 ? `hsl(${bokenParty.rainbow},100%, 50%)` : Object.values(bokenParty.colors)[bokenParty.settings.CC]),
  1049. depthTest: false,
  1050. transparent: true,
  1051. fog: false,
  1052. wireframe: bokenParty.settings.wireframe
  1053. })
  1054. }
  1055. });
  1056. }
  1057. }
  1058. })
  1059. }
  1060. }
  1061.  
  1062. if (this.settings.ESP > 1) {
  1063. if (player.isTarget) {
  1064. this.ctx.save()
  1065. const meas = getTextMeasurements(["TARGET"])
  1066. text("TARGET", font, "#FFFFFF", screenH.x - meas[0] / 2, screenH.y - this.settings.espFontSize * 1.5)
  1067.  
  1068. this.ctx.beginPath()
  1069.  
  1070. this.ctx.translate(screenH.x, screenH.y + Math.abs(hDiff / 2))
  1071. this.ctx.arc(0, 0, Math.abs(hDiff / 2) + 10, 0, Math.PI * 2)
  1072.  
  1073. this.ctx.strokeStyle = "#FFFFFF"
  1074. this.ctx.stroke()
  1075. this.ctx.closePath()
  1076. this.ctx.restore()
  1077. }
  1078.  
  1079. if (this.settings.ESP === 2) {
  1080. this.ctx.save()
  1081. this.ctx.strokeStyle = (this.me.team === null || player.team !== this.me.team) ? "#FF4444" : "#44AAFF"
  1082. this.ctx.strokeRect(screenH.x - bWidth / 2, screenH.y, bWidth, hDiff)
  1083. this.ctx.restore()
  1084. continue
  1085. }
  1086.  
  1087. rect((screenH.x - bWidth / 2) - 7, ~~screenH.y - 1, 0, 0, 4, hDiff + 2, "#000000", false)
  1088. rect((screenH.x - bWidth / 2) - 7, ~~screenH.y - 1, 0, 0, 4, hDiff + 2, "#44FF44", true)
  1089. rect((screenH.x - bWidth / 2) - 7, ~~screenH.y - 1, 0, 0, 4, ~~((player.maxHealth - player.health) / player.maxHealth * (hDiff + 2)), "#000000", true)
  1090. this.ctx.save()
  1091. this.ctx.lineWidth = 4
  1092. this.ctx.translate(~~(screenH.x - bWidth / 2), ~~screenH.y)
  1093. this.ctx.beginPath()
  1094. this.ctx.rect(0, 0, bWidth, hDiff)
  1095. this.ctx.strokeStyle = "rgba(0, 0, 0, 0.25)"
  1096. this.ctx.stroke()
  1097. this.ctx.lineWidth = 2
  1098. this.ctx.strokeStyle = player.team === null ? '#FF4444' : this.me.team === player.team ? '#44AAFF' : '#FF4444'
  1099. this.ctx.stroke()
  1100. this.ctx.closePath()
  1101. this.ctx.restore()
  1102.  
  1103. const playerDist = ~~(this.getDistance3D(this.me.x, this.me.y, this.me.z, player.pos.x, player.pos.y, player.pos.z) / 10)
  1104. this.ctx.save()
  1105. this.ctx.font = font
  1106. const meas = getTextMeasurements(["[", playerDist, "m]", player.level, "©", player.name])
  1107. this.ctx.restore()
  1108. const grad2 = gradient(0, 0, meas[4] * 5, 0, ["rgba(0, 0, 0, 0.25)", "rgba(0, 0, 0, 0)"])
  1109. if (player.level) {
  1110. const grad = gradient(0, 0, (meas[4] * 2) + meas[3] + (padding * 3), 0, ["rgba(0, 0, 0, 0)", "rgba(0, 0, 0, 0.25)"])
  1111. rect(~~(screenH.x - bWidth / 2) - 12 - (meas[4] * 2) - meas[3] - (padding * 3), ~~screenH.y - padding, 0, 0, (meas[4] * 2) + meas[3] + (padding * 3), meas[4] + (padding * 2), grad, true)
  1112. text("" + player.level, font, '#FFFFFF', ~~(screenH.x - bWidth / 2) - 16 - meas[3], ~~screenH.y + meas[4] * 1)
  1113. }
  1114. rect(~~(screenH.x + bWidth / 2) + padding, ~~screenH.y - padding, 0, 0, (meas[4] * 5), (meas[4] * 4) + (padding * 2), grad2, true)
  1115. text(player.name, font, player.team === null ? '#FFCDB4' : this.me.team === player.team ? '#B4E6FF' : '#FFCDB4', (screenH.x + bWidth / 2) + 4, screenH.y + meas[4] * 1)
  1116. if (player.clan) text("[" + player.clan + "]", font, "#AAAAAA", (screenH.x + bWidth / 2) + 8 + meas[5], screenH.y + meas[4] * 1)
  1117. text(player.health + " HP", font, "#33FF33", (screenH.x + bWidth / 2) + 4, screenH.y + meas[4] * 2)
  1118. text(player.weapon.name, font, "#DDDDDD", (screenH.x + bWidth / 2) + 4, screenH.y + meas[4] * 3)
  1119. text("[", font, "#AAAAAA", (screenH.x + bWidth / 2) + 4, screenH.y + meas[4] * 4)
  1120. text("" + playerDist, font, "#DDDDDD", (screenH.x + bWidth / 2) + 4 + meas[0], screenH.y + meas[4] * 4)
  1121. text("m]", font, "#AAAAAA", (screenH.x + bWidth / 2) + 4 + meas[0] + meas[1], screenH.y + meas[4] * 4)
  1122. }
  1123.  
  1124. }
  1125.  
  1126. if (this.settings.fovbox && this.settings.FOVBOXD) {
  1127. let fovBox = [width / 3, height / 4, width * (1 / 3), height / 2]
  1128. switch (this.settings.fovBoxSize) {
  1129.  
  1130. case 2:
  1131. fovBox = [width * 0.4, height / 3, width * 0.2, height / 3]
  1132. break
  1133.  
  1134. case 3:
  1135. fovBox = [width * 0.45, height * 0.4, width * 0.1, height * 0.2]
  1136. break
  1137. }
  1138. this.ctx.save()
  1139. this.ctx.strokeStyle = "red"
  1140. this.ctx.strokeRect(...fovBox)
  1141. this.ctx.restore()
  1142. }
  1143. }
  1144.  
  1145. cleanGUI() {
  1146. let head = document.head || document.getElementsByTagName('head')[0] || 0,
  1147. css = this.createElement("style", "#aMerger, #endAMerger { display: none !important }");
  1148. head.appendChild(css);
  1149. window['onetrust-consent-sdk'].style.display = "none";
  1150. window.streamContainer.style.display = "none";
  1151. window.merchHolder.style.display = "none";
  1152. window.newsHolder.style.display = "none";
  1153. }
  1154.  
  1155. customCSS() {
  1156. if (!this.isDefined(this.CSSres) && this.settings.copiedCSS) {
  1157. let head = document.head || document.getElementsByTagName('head')[0] || 0
  1158. this.CSSres = document.createElement("link");
  1159. this.CSSres.rel = "stylesheet";
  1160. this.CSSres.disabled = false;
  1161. head.appendChild(this.CSSres);
  1162. }
  1163. if (this.settings.customCSS.startsWith("http") && this.settings.customCSS.endsWith(".css")) {
  1164.  
  1165. this.CSSres.href = this.settings.customCSS;
  1166.  
  1167. } else this.CSSres = undefined;
  1168. }
  1169.  
  1170. initGUI() {
  1171. function createButton(name, iconURL, fn) {
  1172. const menu = document.querySelector("#menuItemContainer"),
  1173. menuItem = document.createElement("div"),
  1174. menuItemIcon = document.createElement("div"),
  1175. menuItemTitle = document.createElement("div")
  1176.  
  1177. menuItem.className = "menuItem"
  1178. menuItemIcon.className = "menuItemIcon"
  1179. menuItemTitle.className = "menuItemTitle"
  1180.  
  1181. menuItemTitle.innerHTML = name
  1182. menuItemIcon.style.backgroundImage = `url("https://media.giphy.com/media/7FrOU9tPbgAZtxV5mb/giphy.gif")`
  1183.  
  1184. menuItem.append(menuItemIcon, menuItemTitle)
  1185. menu.append(menuItem)
  1186.  
  1187. menuItem.addEventListener("click", fn)
  1188. }
  1189.  
  1190. bokenParty.GUI.setSetting = function(setting, value) {
  1191. switch (setting) {
  1192. case "customCSS":
  1193. bokenParty.settings.customCSS = value
  1194. bokenParty.customCSS();
  1195. break
  1196.  
  1197. default:
  1198. console.log("SET ", setting, " ", value);
  1199. bokenParty.settings[setting] = value
  1200. }
  1201. localStorage.kro_setngss_json = JSON.stringify(bokenParty.settings);
  1202. }
  1203. bokenParty.GUI.windowIndex = windows.length + 1
  1204. bokenParty.GUI.settings = {
  1205. aimbot: {
  1206. val: this.settings.aimbot
  1207. }
  1208. }
  1209. bokenParty.GUI.windowObj = {
  1210. header: "Bōken Party hacks",
  1211. html: "",
  1212. gen() {
  1213. return bokenParty.getGuiHtml()
  1214. }
  1215. }
  1216.  
  1217. Object.defineProperty(window.windows, windows.length, {
  1218. value: bokenParty.GUI.windowObj
  1219. })
  1220. Object.defineProperty(window.windows, windows.length, {
  1221. value: bokenParty.GUI.windowObj2
  1222. })
  1223. if (this.settings.gui_button) {
  1224. createButton("Bōken Party hacks", null, () => {
  1225. window.showWindow(bokenParty.GUI.windowIndex)
  1226. })
  1227. }
  1228. }
  1229.  
  1230. showGUI() {
  1231. if (document.pointerLockElement || document.mozPointerLockElement) {
  1232. document.exitPointerLock()
  1233. }
  1234. window.showWindow(this.GUI.windowIndex)
  1235. }
  1236.  
  1237. getGuiHtml() {
  1238. const builder = {
  1239. checkbox: (name, settingName, description = "", needsRestart = false) => `<div class="settName" title="${description}">${name} ${needsRestart ? "<span style=\"color: #eb5656\">*</span>" : ""}<label class="switch" style="margin-left:10px"><input type="checkbox" onclick='${lazyProgramma}.GUI.setSetting("${settingName}", this.checked)' ${bokenParty.settings[settingName]?"checked":""}><span class="slider"></span></label></div>`,
  1240. client_setting: (name, settingName, description = "", needsRestart = true) => `<div class="settName" title="${description}">${name} ${needsRestart ? "<span style=\"color: #eb5656\">*</span>" : ""}<label class="switch" style="margin-left:10px"><input type="checkbox", this.checked?"1":"0")' ${bokenParty.settings[settingName]?"checked":""}><span class="slider"></span></label></div>`,
  1241. select: (name, settingName, options, description = "", needsRestart = false) => {
  1242. let built = `<div class="settName" title="${description}">${name} ${needsRestart ? "<span style=\"color: #eb5656\">*</span>" : ""}<select onchange='${lazyProgramma}.GUI.setSetting("${settingName}", parseInt(this.value))' class="inputGrey2">`
  1243. for (const option in options) {
  1244. if (options.hasOwnProperty(option))
  1245. built += `<option value="${options[option]}" ${bokenParty.settings[settingName] == options[option]?"selected":""}>${option}</option>,`
  1246. }
  1247. return built + "</select></div>"
  1248. },
  1249. slider: (name, settingName, min, max, step, description = "") => `<div class="settName" title="${description}">${name} <input type="number" class="sliderVal" id="slid_input_${settingName}" min="${min}" max="${max}" value="${bokenParty.settings[settingName]}" onkeypress="${lazyProgramma}.GUI.setSetting('${settingName}', parseFloat(this.value.replace(',', '.')));document.querySelector('#slid_input_${settingName}').value=this.value" style="margin-right:0;border-width:0"><div class="slidecontainer" style=""><input type="range" id="slid_${settingName}" min="${min}" max="${max}" step="${step}" value="${bokenParty.settings[settingName]}" class="sliderM" oninput="${lazyProgramma}.GUI.setSetting('${settingName}', parseFloat(this.value));document.querySelector('#slid_input_${settingName}').value=this.value"></div></div>`,
  1250. input: (name, settingName, type, description, extra) => `<div class="settName" title="${description}">${name} <input type="${type}" name="${type}" id="slid_utilities_${settingName}"\n${'color' == type ? 'style="float:right;margin-top:5px"' : `class="inputGrey2" placeholder="${extra}"`}\nvalue="${bokenParty.settings[settingName]}" oninput="${lazyProgramma
  1251. }.GUI.setSetting(\x27${settingName}\x27, this.value)"/></div>`,
  1252. label: (name, description) => "<br><span style='color: black; font-size: 20px; margin: 20px 0'>" + name + "</span> <span style='color: dimgrey; font-size: 15px'>" + (description || "") + "</span><br>",
  1253. nobrlabel: (name, description) => "<span style='color: black; font-size: 20px; margin: 20px 0'>" + name + "</span> <span style='color: dimgrey; font-size: 15px'>" + (description || "") + "</span><br>",
  1254. br: () => "<br>",
  1255. style: content => `<style>${content}</style>`,
  1256. };
  1257. let built = `<div id="settHolder">
  1258. <img src="https://uploads-ssl.webflow.com/60150fb2a91c8946f9676aab/608d4b6b1c408061f5de40c0_dylan1.png" width="90%">
  1259. <div class="bokenparty logo" onmouseenter="playTick()" onclick="openURL('boken.party')"><span style='display:inline'></span></div>`
  1260.  
  1261.  
  1262. Object.keys(builder).forEach(name => {
  1263. const o = builder[name]
  1264. builder[name] = function() {
  1265. return built += o.apply(this, arguments)
  1266. }
  1267. })
  1268.  
  1269. // Tabs stuff
  1270. const tabNames = ["Gun", "ESP/Wallhack", "Skin hacks/visual", "Tweaks (unnecessary)", "Movement", "CSS"]
  1271. builder.style(`.cheatTabButton { color: black; background: #ddd; padding: 2px 7px; font-size: 15px; cursor: pointer; text-align: center; } .cheatTabActive { background: #bbb;}`)
  1272. this.GUI.changeTab = function(tabbtn) {
  1273. const tn = tabbtn.innerText
  1274. document.getElementById("cheat-tabbtn-" + tabNames[bokenParty.state.aT]).classList.remove("cheatTabActive")
  1275. document.getElementById("cheat-tab-" + tabNames[bokenParty.state.aT]).style.display = "none"
  1276. tabbtn.classList.add("cheatTabActive")
  1277. document.getElementById("cheat-tab-" + tn).style.display = "block"
  1278. bokenParty.state.aT = tabNames.indexOf(tn)
  1279. }
  1280. built += `<table style="width: 100%; margin-bottom: 30px"><tr>`
  1281. for (let i = 0; i < tabNames.length; i++) {
  1282. const tab = tabNames[i]
  1283. built += `<td id="cheat-tabbtn-${tab}" onclick="${lazyProgramma}.GUI.changeTab(this)" class="cheatTabButton ${tabNames[bokenParty.state.aT] === tab ? 'cheatTabActive' : ''}">`
  1284. built += tab
  1285. built += `</td>`
  1286. }
  1287. built += `</table></tr>`
  1288.  
  1289. function tab(i, cb) {
  1290. built += `<div style="display: ${bokenParty.state.aT === i ? 'block' : 'none'}" class="cheat-tab" id="cheat-tab-${tabNames[i]}">`
  1291. cb()
  1292. built += `</div>`
  1293. }
  1294.  
  1295. //creates the gui aka the options for aimbot
  1296. tab(0, () => {
  1297. builder.select("Aimbot by Bōken party", "aimbot", {
  1298. "No aimbot": 0,
  1299. "Instantaneous": 1,
  1300. "Silent aimbot": 2,
  1301. "Aim assist": 4,
  1302. "Easy aim assist": 11,
  1303. "Trigger bot": 12,
  1304. "Silent when aiming": 6,
  1305. "Smooth": 7,
  1306. "Unsilent": 10,
  1307. "Unsilent on aim": 5,
  1308. "Aim correction": 9,
  1309. })
  1310. builder.select("I know you can see this James lol", "easterEgg", {
  1311. "Sussy": 0,
  1312. "Baka": 1,
  1313. "Sussy baka": 2,
  1314. "Red is insanely sus": 3,
  1315. "I'm telling": 4,
  1316. })
  1317. builder.select("Donations to developer: lazyProgramma", "Donations", {
  1318. "Coming soon!": 0,
  1319. "": 1,
  1320. })
  1321. builder.select("Support these guys too!", "Donations2", {
  1322. "Coming soon!": 0,
  1323. "": 1,
  1324. })
  1325. builder.select("Spin aimbot speed", "aimFrameSpin", {
  1326. "1": 30,
  1327. "2": 20,
  1328. "3": 15,
  1329. "4": 10,
  1330. "5": 5,
  1331. })
  1332. builder.slider("Aim range", "AR", 0, 1000, 10, "Sets the aimbot range")
  1333. builder.slider("Aim offset", "offset_of_aim", -4, 1, 0.1, "How far the aim will be from you")
  1334. builder.slider("Aim noise", "noiseofaim", 0, 2, 0.005, "The noise of the aim")
  1335. builder.checkbox("Supersilent aim", "superSilent", "Only works with quickscope and silent aim")
  1336. builder.checkbox("Aim at AIs", "aimbot2", "lol")
  1337. builder.checkbox("FOV check", "check1", "Makes you only shoot at enemies that are in your field of view. I would recommend this so then you don't get banned by shooting at people that you aren't facing lol")
  1338. builder.checkbox("FOV box", "fovbox", "This is probably self explanatory..")
  1339. builder.select("FOV box size", "fovBoxSize", {
  1340. "Large": 1,
  1341. "Medium": 2,
  1342. "Small": 3,
  1343. })
  1344. builder.checkbox("Wallbangs", "wallbangs", "Makes the aimbot shoot enemies behind shoot-through walls")
  1345. builder.checkbox("Aimbot range check", "check_of_range", "Checks if the enemy is in range of your weapon before shooting it. Recommended so then you can actually shoot them or not depending on their range.")
  1346. builder.checkbox("Auto reload", "automatic_reload", "Automatically reloads your weapon when it's out of ammo")
  1347. })
  1348.  
  1349. tab(1, () => {
  1350. builder.select("ESP (h keyboard), by Bōken Party", "ESP", {
  1351. "No ESP": 0,
  1352. "Nametags": 1,
  1353. "Box ESP": 2,
  1354. "Full ESP": 3,
  1355. })
  1356. builder.select("ESP Text size", "espFontSize", {
  1357. "Sus lol": 100,
  1358. "40px": 40,
  1359. "30px": 30,
  1360. "25px": 25,
  1361. "20px": 20,
  1362. "15px": 15,
  1363. "10px": 10,
  1364. "5px": 5,
  1365. })
  1366. builder.select("Tracers, by GS, also Bōken Party", "tracers", {
  1367. "None": 0,
  1368. "Bottom": 1,
  1369. "Middle": 2,
  1370. }, "Draws lines to players")
  1371. builder.checkbox("Mark aimbot target", "target_Mark", "Shows who the aimbot is targetting at the time, useful for aim assist/aim correction")
  1372. builder.checkbox("Draw FOV box", "FOVBOXD", "Draws the FOV box from aimbot settings")
  1373. builder.checkbox("Chams", "chams")
  1374. builder.select("colour of the chams", "CC", {
  1375. White: 0,
  1376. Black: 1,
  1377. Purple: 2,
  1378. Pink: 3,
  1379. Blue: 4,
  1380. dark_blue: 5,
  1381. Aqua: 6,
  1382. Green: 7,
  1383. Lime: 8,
  1384. Orange: 9,
  1385. Yellow: 10,
  1386. Red: 11,
  1387. Rainbow: 12,
  1388. })
  1389. builder.checkbox("teammate chams", "TC", "Show Chams for teammates")
  1390. builder.checkbox("Wireframe", "wireframe")
  1391. builder.slider("interval of the rainbow chams", "chamsInterval", 50, 1000, 50, "RGB speed")
  1392. })
  1393.  
  1394. tab(2, () => {
  1395. builder.checkbox("All skins!", "yay_skinnies", "Makes you able to use any skin in game, only shows on your side")
  1396. builder.checkbox("Billboard shaders", "animatedBillboards", "Don't use if your fps drops")
  1397. builder.checkbox("Any weapon trail", "bullet_trail")
  1398. builder.slider("Weapon Zoom", "zoom_of_weapon", 0, 20, .1, "Weapon Zoom Multiplier ")
  1399. })
  1400.  
  1401. tab(3, () => {
  1402. builder.checkbox("Always aim", "alwaysAim", "Makes you slower and jump lower, but the aimbot can start shooting at enemies, faster.")
  1403. builder.checkbox("Aim when you can see the target", "v_Aim")
  1404. builder.checkbox("Unaim when no target visible", "inv_Aim")
  1405. builder.checkbox("Force unsilent", "force_loud")
  1406. })
  1407.  
  1408. tab(4, () => {
  1409. builder.select("Auto bhop (superspeed)", "bhop", {
  1410. "Null": 0,
  1411. "Auto Jump": 1,
  1412. "Key Jump": 2,
  1413. "Automatic": 3,
  1414. "Key Slide": 4,
  1415. })
  1416. builder.label("Only use with silent aim")
  1417. builder.select("Pitch hax", "hack_of_pitch", {
  1418. "Disabled": 0,
  1419. "Downward": 1,
  1420. "Upward": 2,
  1421. "sin(time)": 3,
  1422. "sin(time/5)": 4,
  1423. "double": 5,
  1424. "random": 6,
  1425. }, "Only use with aimbot on")
  1426. builder.checkbox("Spin bot", "spinny_Shooty")
  1427. })
  1428. //!!DISCLAIMER!! THIS SCRIPT IS NOT ENTIRELY CRATED BY ME, IT IS BASED OFF DOGEWARE BUT I HAVE CHANGED PRETTY MUCH ALL OF IT. CREDITS TO SK1DLAMER FOR THE TEMPLATE
  1429. tab(5, () => {
  1430. builder.checkbox("Show GUI button", "gui_button", "Disable if you don't want the gif under settings!")
  1431. builder.checkbox("GUI on middle mouse button", "encrypted", "Makes it possible to open this menu by clicking the mouse wheel")
  1432. builder.checkbox("Keybinds/in-game-hotkeys", "ingamehotkeys", "Turn keybinds on/off, Aimbot [press y], ESP [press h]")
  1433. builder.checkbox("No inactivity kick", "antikick", "Disables the 'Kicked for inactivity'")
  1434. builder.checkbox("Auto nuke", "AN", "Automatically nukes when you are able to")
  1435. builder.checkbox("Force nametags on", "fgno", "Use in custom games with disabled nametags")
  1436. builder.checkbox("Use CSS", "copiedCSS", "Use the CSS when no custom CSS is Applied")
  1437. builder.input("Custom CSS", "customCSS", "url", "", "URL to CSS file")
  1438. })
  1439.  
  1440.  
  1441. built += "</div>"
  1442.  
  1443. return built;
  1444. }
  1445.  
  1446. getDistance(x1, y1, x2, y2) {
  1447. return Math.sqrt((x2 -= x1) * x2 + (y2 -= y1) * y2);
  1448. }
  1449.  
  1450. getDistance3D(x1, y1, z1, x2, y2, z2) {
  1451. let dx = x1 - x2;
  1452. let dy = y1 - y2;
  1453. let dz = z1 - z2;
  1454. return Math.sqrt(dx * dx + dy * dy + dz * dz);
  1455. }
  1456.  
  1457. getXDir(x1, y1, z1, x2, y2, z2) {
  1458. let h = Math.abs(y1 - y2);
  1459. let dst = this.getDistance3D(x1, y1, z1, x2, y2, z2);
  1460. return (Math.asin(h / dst) * ((y1 > y2) ? -1 : 1));
  1461. }
  1462.  
  1463. getDir(x1, y1, x2, y2) {
  1464. return Math.atan2(y1 - y2, x1 - x2);
  1465. }
  1466.  
  1467. getAngleDist(a, b) {
  1468. return Math.atan2(Math.sin(b - a), Math.cos(a - b));
  1469. }
  1470.  
  1471. containsPoint(point) {
  1472. let planes = this.renderer.frustum.planes;
  1473. for (let i = 0; i < 6; i++) {
  1474. if (planes[i].distanceToPoint(point) < 0) {
  1475. return false;
  1476. }
  1477. }
  1478. return true;
  1479. }
  1480.  
  1481. world2Screen(pos, width, height, yOffset = 0) {
  1482. pos.y += yOffset
  1483. pos.project(this.renderer.camera)
  1484. pos.x = (pos.x + 1) / 2
  1485. pos.y = (-pos.y + 1) / 2
  1486. pos.x *= width
  1487. pos.y *= height
  1488. return pos
  1489. }
  1490. };
  1491.  
  1492. window[lazyProgramma] = new Boken();
  1493.  
  1494. })([...Array(8)].map(_ => 'AaCcEeGgIiKkMmPpRrTtVvXxZzBbDdFfHhJjLlNnQqSsUuWwYy' [~~(Math.random() * 52)]).join(''));
  1495.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement