28 skills found
avi12 / Youtube Auto HdA simple browser extension for changing YouTube videos' quality based on FPS.
GMH-Code / Qwasm2Play the Quake 2 first-person shooter engine in your browser! Supports WebGL 2 and software-rendered modes.
GMH-Code / QwasmPlay the Quake engine in your browser! True to the original. Supports WebGL, software-rendered mode, mods, and mission packs.
Gabriel1231n2j3n / Hacks Para Krunker// ==UserScript== // @name aimbot gratis para krunker.io // @description Este es el mejor aimbot mod menuq puedas obtener // @version 2.19 // @author Gabriel - // @iconURL 31676a4e532e706e673f7261773d74727565.png // @match *://krunker.io/* // @exclude *://krunker.io/editor* // @exclude *://krunker.io/social* // @run-at document-start // @grant none // @noframes // ==/UserScript== /* eslint-env es6 */ /* eslint-disable no-caller, no-undef, no-loop-func */ var CRC2d = CanvasRenderingContext2D.prototype; var skid, skidStr = [...Array(8)].map(_ => 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'[~~(Math.random()*52)]).join(''); class Skid { constructor() { skid = this; this.downKeys = new Set(); this.settings = null; this.vars = {}; this.playerMaps = []; this.skinCache = {}; this.inputFrame = 0; this.renderFrame = 0; this.fps = 0; this.lists = { renderESP: { off: "Off", walls: "Walls", twoD: "2d", full: "Full" }, renderChams: { off: "Off", white: "White", blue: "Blue", teal: "Teal", purple: "Purple", green: "Green", yellow: "Yellow", red: "Red", }, autoBhop: { off: "Off", autoJump: "Auto Jump", keyJump: "Key Jump", autoSlide: "Auto Slide", keySlide: "Key Slide" }, autoAim: { off: "Off", correction: "Aim Correction", assist: "Legit Aim Assist", easyassist: "Easy Aim Assist", silent: "Silent Aim", trigger: "Trigger Bot", quickScope: "Quick Scope" }, audioStreams: { off: 'Off', _2000s: 'General German/English', _HipHopRNB: 'Hip Hop / RNB', _Oldskool: 'Hip Hop Oldskool', _Country: 'Country', _Pop: 'Pop', _Dance: 'Dance', _Dubstep: 'DubStep', _Lowfi: 'LoFi HipHop', _Jazz: 'Jazz', _Oldies: 'Golden Oldies', _Club: 'Club', _Folk: 'Folk', _ClassicRock: 'Classic Rock', _Metal: 'Heavy Metal', _DeathMetal: 'Death Metal', _Classical: 'Classical', _Alternative: 'Alternative', }, } this.consts = { twoPI: Math.PI * 2, halfPI: Math.PI / 2, playerHeight: 11, cameraHeight: 1.5, headScale: 2, armScale: 1.3, armInset: 0.1, chestWidth: 2.6, hitBoxPad: 1, crouchDst: 3, recoilMlt: 0.3, nameOffset: 0.6, nameOffsetHat: 0.8, }; this.key = { frame: 0, delta: 1, xdir: 2, ydir: 3, moveDir: 4, shoot: 5, scope: 6, jump: 7, reload: 8, crouch: 9, weaponScroll: 10, weaponSwap: 11, moveLock: 12 }; this.css = { noTextShadows: `*, .button.small, .bigShadowT { text-shadow: none !important; }`, hideAdverts: `#aMerger, #endAMerger { display: none !important }`, hideSocials: `.headerBarRight > .verticalSeparator, .imageButton { display: none }`, cookieButton: `#onetrust-consent-sdk { display: none !important }`, newsHolder: `#newsHolder { display: none !important }`, }; this.isProxy = Symbol("isProxy"); this.spinTimer = 1800; let wait = setInterval(_ => { this.head = document.head||document.getElementsByTagName('head')[0] if (this.head) { clearInterval(wait); Object.entries(this.css).forEach(entry => { this.css[entry[0]] = this.createElement("style", entry[1]); }) this.onLoad(); } }, 100); } canStore() { return this.isDefined(Storage); } saveVal(name, val) { if (this.canStore()) localStorage.setItem("kro_utilities_"+name, val); } deleteVal(name) { if (this.canStore()) localStorage.removeItem("kro_utilities_"+name); } getSavedVal(name) { if (this.canStore()) return localStorage.getItem("kro_utilities_"+name); return null; } isType(item, type) { return typeof item === type; } isDefined(object) { return !this.isType(object, "undefined") && object !== null; } isNative(fn) { return (/^function\s*[a-z0-9_\$]*\s*\([^)]*\)\s*\{\s*\[native code\]\s*\}/i).test('' + fn) } getStatic(s, d) { return this.isDefined(s) ? s : d } crossDomain(url) { return "https://crossorigin.me/" + url; } async waitFor(test, timeout_ms = 20000, doWhile = null) { let sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); return new Promise(async (resolve, reject) => { if (typeof timeout_ms != "number") reject("Timeout argument not a number in waitFor(selector, timeout_ms)"); let result, freq = 100; while (result === undefined || result === false || result === null || result.length === 0) { if (doWhile && doWhile instanceof Function) doWhile(); if (timeout_ms % 1000 < freq) console.log("waiting for: ", test); if ((timeout_ms -= freq) < 0) { console.log( "Timeout : ", test ); resolve(false); return; } await sleep(freq); result = typeof test === "string" ? Function(test)() : test(); } console.log("Passed : ", test); resolve(result); }); }; createSettings() { this.settings = { //Rendering showSkidBtn: { pre: "<div class='setHed'>Rendering</div>", name: "Show Skid Button", val: true, html: () => this.generateSetting("checkbox", "showSkidBtn", this), set: (value, init) => { let button = document.getElementById("mainButton"); if (!button) { button = this.createButton("5k1D", "https://i.imgur.com/1tWAEJx.gif", this.toggleMenu, value) } else button.style.display = value ? "inherit" : "none"; } }, hideAdverts: { name: "Hide Advertisments", val: true, html: () => this.generateSetting("checkbox", "hideAdverts", this), set: (value, init) => { if (value) this.head.appendChild(this.css.hideAdverts) else if (!init) this.css.hideAdverts.remove() } }, hideStreams: { name: "Hide Streams", val: false, html: () => this.generateSetting("checkbox", "hideStreams", this), set: (value) => { window.streamContainer.style.display = value ? "none" : "inherit" } }, hideMerch: { name: "Hide Merch", val: false, html: () => this.generateSetting("checkbox", "hideMerch", this), set: value => { window.merchHolder.style.display = value ? "none" : "inherit" } }, hideNewsConsole: { name: "Hide News Console", val: false, html: () => this.generateSetting("checkbox", "hideNewsConsole", this), set: value => { window.newsHolder.style.display = value ? "none" : "inherit" } }, hideCookieButton: { name: "Hide Security Manage Button", val: false, html: () => this.generateSetting("checkbox", "hideCookieButton", this), set: value => { window['onetrust-consent-sdk'].style.display = value ? "none" : "inherit" } }, noTextShadows: { name: "Remove Text Shadows", val: false, html: () => this.generateSetting("checkbox", "noTextShadows", this), set: (value, init) => { if (value) this.head.appendChild(this.css.noTextShadows) else if (!init) this.css.noTextShadows.remove() } }, customCSS: { name: "Custom CSS", val: "", html: () => this.generateSetting("url", "customCSS", "URL to CSS file"), resources: { css: document.createElement("link") }, set: (value, init) => { if (value.startsWith("http")&&value.endsWith(".css")) { //let proxy = 'https://cors-anywhere.herokuapp.com/'; this.settings.customCSS.resources.css.href = value } if (init) { this.settings.customCSS.resources.css.rel = "stylesheet" try { this.head.appendChild(this.settings.customCSS.resources.css) } catch(e) { alert(e) this.settings.customCSS.resources.css = null } } } }, renderESP: { name: "Player ESP Type", val: "off", html: () => this.generateSetting("select", "renderESP", this.lists.renderESP), }, renderTracers: { name: "Player Tracers", val: false, html: () => this.generateSetting("checkbox", "renderTracers"), }, rainbowColor: { name: "Rainbow ESP", val: false, html: () => this.generateSetting("checkbox", "rainbowColor"), }, renderChams: { name: "Player Chams", val: "off", html: () => this.generateSetting( "select", "renderChams", this.lists.renderChams ), }, renderWireFrame: { name: "Player Wireframe", val: false, html: () => this.generateSetting("checkbox", "renderWireFrame"), }, customBillboard: { name: "Custom Billboard Text", val: "", html: () => this.generateSetting( "text", "customBillboard", "Custom Billboard Text" ), }, //Weapon autoReload: { pre: "<br><div class='setHed'>Weapon</div>", name: "Auto Reload", val: false, html: () => this.generateSetting("checkbox", "autoReload"), }, autoAim: { name: "Auto Aim Type", val: "off", html: () => this.generateSetting("select", "autoAim", this.lists.autoAim), }, frustrumCheck: { name: "Line of Sight Check", val: false, html: () => this.generateSetting("checkbox", "frustrumCheck"), }, wallPenetrate: { name: "Aim through Penetratables", val: false, html: () => this.generateSetting("checkbox", "wallPenetrate"), }, weaponZoom: { name: "Weapon Zoom", val: 1.0, min: 0, max: 50.0, step: 0.01, html: () => this.generateSetting("slider", "weaponZoom"), set: (value) => { if (this.renderer) this.renderer.adsFovMlt = value;} }, weaponTrails: { name: "Weapon Trails", val: false, html: () => this.generateSetting("checkbox", "weaponTrails"), set: (value) => { if (this.me) this.me.weapon.trail = value;} }, //Player autoBhop: { pre: "<br><div class='setHed'>Player</div>", name: "Auto Bhop Type", val: "off", html: () => this.generateSetting("select", "autoBhop", this.lists.autoBhop), }, thirdPerson: { name: "Third Person", val: false, html: () => this.generateSetting("checkbox", "thirdPerson"), set: (value, init) => { if (value) this.thirdPerson = 1; else if (!init) this.thirdPerson = undefined; } }, skinUnlock: { name: "Unlock Skins", val: false, html: () => this.generateSetting("checkbox", "skinUnlock", this), }, //GamePlay disableWpnSnd: { pre: "<br><div class='setHed'>GamePlay</div>", name: "Disable Players Weapon Sounds", val: false, html: () => this.generateSetting("checkbox", "disableWpnSnd", this), }, disableHckSnd: { name: "Disable Hacker Fart Sounds", val: false, html: () => this.generateSetting("checkbox", "disableHckSnd", this), }, autoActivateNuke: { name: "Auto Activate Nuke", val: false, html: () => this.generateSetting("checkbox", "autoActivateNuke", this), }, autoFindNew: { name: "New Lobby Finder", val: false, html: () => this.generateSetting("checkbox", "autoFindNew", this), }, autoClick: { name: "Auto Start Game", val: false, html: () => this.generateSetting("checkbox", "autoClick", this), }, inActivity: { name: "No InActivity Kick", val: true, html: () => this.generateSetting("checkbox", "autoClick", this), }, //Radio Stream Player playStream: { pre: "<br><div class='setHed'>Radio Stream Player</div>", name: "Stream Select", val: "off", html: () => this.generateSetting("select", "playStream", this.lists.audioStreams), set: (value) => { if (value == "off") { if ( this.settings.playStream.audio ) { this.settings.playStream.audio.pause(); this.settings.playStream.audio.currentTime = 0; this.settings.playStream.audio = null; } return; } let url = this.settings.playStream.urls[value]; if (!this.settings.playStream.audio) { this.settings.playStream.audio = new Audio(url); this.settings.playStream.audio.volume = this.settings.audioVolume.val||0.5 } else { this.settings.playStream.audio.src = url; } this.settings.playStream.audio.load(); this.settings.playStream.audio.play(); }, urls: { _2000s: 'http://0n-2000s.radionetz.de/0n-2000s.aac', _HipHopRNB: 'https://stream-mixtape-geo.ntslive.net/mixtape2', _Country: 'https://live.wostreaming.net/direct/wboc-waaifmmp3-ibc2', _Dance: 'http://streaming.radionomy.com/A-RADIO-TOP-40', _Pop: 'http://bigrradio.cdnstream1.com/5106_128', _Jazz: 'http://strm112.1.fm/ajazz_mobile_mp3', _Oldies: 'http://strm112.1.fm/60s_70s_mobile_mp3', _Club: 'http://strm112.1.fm/club_mobile_mp3', _Folk: 'https://freshgrass.streamguys1.com/irish-128mp3', _ClassicRock: 'http://1a-classicrock.radionetz.de/1a-classicrock.mp3', _Metal: 'http://streams.radiobob.de/metalcore/mp3-192', _DeathMetal: 'http://stream.laut.fm/beatdownx', _Classical: 'http://live-radio01.mediahubaustralia.com/FM2W/aac/', _Alternative: 'http://bigrradio.cdnstream1.com/5187_128', _Dubstep: 'http://streaming.radionomy.com/R1Dubstep?lang=en', _Lowfi: 'http://streams.fluxfm.de/Chillhop/mp3-256', _Oldskool: 'http://streams.90s90s.de/hiphop/mp3-128/', }, audio: null, }, audioVolume: { name: "Radio Volume", val: 0.5, min: 0, max: 1, step: 0.01, html: () => this.generateSetting("slider", "audioVolume"), set: (value) => { if (this.settings.playStream.audio) this.settings.playStream.audio.volume = value;} }, }; // Inject Html let waitForWindows = setInterval(_ => { if (window.windows) { const menu = window.windows[11]; menu.header = "Settings"; menu.gen = _ => { var tmpHTML = `<div style='text-align:center'> <a onclick='window.open("https://skidlamer.github.io/")' class='menuLink'>SkidFest Settings</center></a> <hr> </div>`; for (const key in this.settings) { if (this.settings[key].pre) tmpHTML += this.settings[key].pre; tmpHTML += "<div class='settName' id='" + key + "_div' style='display:" + (this.settings[key].hide ? 'none' : 'block') + "'>" + this.settings[key].name + " " + this.settings[key].html() + "</div>"; } tmpHTML += `<br><hr><a onclick='${skidStr}.resetSettings()' class='menuLink'>Reset Settings</a> | <a onclick='${skidStr}.saveScript()' class='menuLink'>Save GameScript</a>` return tmpHTML; }; clearInterval(waitForWindows); //this.createButton("5k1D", "https://i.imgur.com/1tWAEJx.gif", this.toggleMenu) } }, 100); // setupSettings for (const key in this.settings) { this.settings[key].def = this.settings[key].val; if (!this.settings[key].disabled) { let tmpVal = this.getSavedVal(key); this.settings[key].val = tmpVal !== null ? tmpVal : this.settings[key].val; if (this.settings[key].val == "false") this.settings[key].val = false; if (this.settings[key].val == "true") this.settings[key].val = true; if (this.settings[key].val == "undefined") this.settings[key].val = this.settings[key].def; if (this.settings[key].set) this.settings[key].set(this.settings[key].val, true); } } } generateSetting(type, name, extra) { switch (type) { case 'checkbox': return `<label class="switch"><input type="checkbox" onclick="${skidStr}.setSetting('${name}', this.checked)" ${this.settings[name].val ? 'checked' : ''}><span class="slider"></span></label>`; case 'slider': return `<span class='sliderVal' id='slid_utilities_${name}'>${this.settings[name].val}</span><div class='slidecontainer'><input type='range' min='${this.settings[name].min}' max='${this.settings[name].max}' step='${this.settings[name].step}' value='${this.settings[name].val}' class='sliderM' oninput="${skidStr}.setSetting('${name}', this.value)"></div>` case 'select': { let temp = `<select onchange="${skidStr}.setSetting(\x27${name}\x27, this.value)" class="inputGrey2">`; for (let option in extra) { temp += '<option value="' + option + '" ' + (option == this.settings[name].val ? 'selected' : '') + '>' + extra[option] + '</option>'; } temp += '</select>'; return temp; } default: return `<input type="${type}" name="${type}" id="slid_utilities_${name}"\n${'color' == type ? 'style="float:right;margin-top:5px"' : `class="inputGrey2" placeholder="${extra}"`}\nvalue="${this.settings[name].val}" oninput="${skidStr}.setSetting(\x27${name}\x27, this.value)"/>`; } } resetSettings() { if (confirm("Are you sure you want to reset all your settings? This will also refresh the page")) { Object.keys(localStorage).filter(x => x.includes("kro_utilities_")).forEach(x => localStorage.removeItem(x)); location.reload(); } } setSetting(t, e) { this.settings[t].val = e; this.saveVal(t, e); if (document.getElementById(`slid_utilities_${t}`)) document.getElementById(`slid_utilities_${t}`).innerHTML = e; if (this.settings[t].set) this.settings[t].set(e); } createObserver(elm, check, callback, onshow = true) { return new MutationObserver((mutationsList, observer) => { if (check == 'src' || onshow && mutationsList[0].target.style.display == 'block' || !onshow) { callback(mutationsList[0].target); } }).observe(elm, check == 'childList' ? {childList: true} : {attributes: true, attributeFilter: [check]}); } createListener(elm, type, callback = null) { if (!this.isDefined(elm)) { alert("Failed creating " + type + "listener"); return } elm.addEventListener(type, event => callback(event)); } createElement(element, attribute, inner) { if (!this.isDefined(element)) { return null; } if (!this.isDefined(inner)) { inner = ""; } let el = document.createElement(element); if (this.isType(attribute, 'object')) { for (let key in attribute) { el.setAttribute(key, attribute[key]); } } if (!Array.isArray(inner)) { inner = [inner]; } for (let i = 0; i < inner.length; i++) { if (inner[i].tagName) { el.appendChild(inner[i]); } else { el.appendChild(document.createTextNode(inner[i])); } } return el; } createButton(name, iconURL, fn, visible) { visible = visible ? "inherit":"none"; let menu = document.querySelector("#menuItemContainer"); let icon = this.createElement("div",{"class":"menuItemIcon", "style":`background-image:url("${iconURL}");display:inherit;`}); let title= this.createElement("div",{"class":"menuItemTitle", "style":`display:inherit;`}, name); let host = this.createElement("div",{"id":"mainButton", "class":"menuItem", "onmouseenter":"playTick()", "onclick":"showWindow(12)", "style":`display:${visible};`},[icon, title]); if (menu) menu.append(host) } objectHas(obj, arr) { return arr.some(prop => obj.hasOwnProperty(prop)); } getVersion() { const elems = document.getElementsByClassName('terms'); const version = elems[elems.length - 1].innerText; return version; } saveAs(name, data) { let blob = new Blob([data], {type: 'text/plain'}); let el = window.document.createElement("a"); el.href = window.URL.createObjectURL(blob); el.download = name; window.document.body.appendChild(el); el.click(); window.document.body.removeChild(el); } saveScript() { this.fetchScript().then(script => { this.saveAs("game_" + this.getVersion() + ".js", script) }) } isKeyDown(key) { return this.downKeys.has(key); } simulateKey(keyCode) { var oEvent = document.createEvent('KeyboardEvent'); // Chromium Hack Object.defineProperty(oEvent, 'keyCode', { get : function() { return this.keyCodeVal; } }); Object.defineProperty(oEvent, 'which', { get : function() { return this.keyCodeVal; } }); if (oEvent.initKeyboardEvent) { oEvent.initKeyboardEvent("keypress", true, true, document.defaultView, keyCode, keyCode, "", "", false, ""); } else { oEvent.initKeyEvent("keypress", true, true, document.defaultView, false, false, false, false, keyCode, 0); } oEvent.keyCodeVal = keyCode; if (oEvent.keyCode !== keyCode) { alert("keyCode mismatch " + oEvent.keyCode + "(" + oEvent.which + ")"); } document.body.dispatchEvent(oEvent); } toggleMenu() { let lock = document.pointerLockElement || document.mozPointerLockElement; if (lock) document.exitPointerLock(); window.showWindow(12); if (this.isDefined(window.SOUND)) window.SOUND.play(`tick_0`,0.1) } onLoad() { this.createSettings(); this.createObservers(); this.waitFor(_=>this.isDefined(this.exports)).then(_=> { if (!this.isDefined(this.exports)) { alert("This Mod Needs To Be Updated Please Try Agian Later"); return; } //console.dir(this.exports); let toFind = { overlay: ["render", "canvas"], config: ["accAnnounce", "availableRegions", "assetCat"], three: ["ACESFilmicToneMapping", "TextureLoader", "ObjectLoader"], ws: ["socketReady", "ingressPacketCount", "ingressPacketCount", "egressDataSize"], utility: ["VectorAdd", "VectorAngleSign"], //colors: ["challLvl", "getChallCol"], //ui: ["showEndScreen", "toggleControlUI", "toggleEndScreen", "updatePlayInstructions"], //events: ["actions", "events"], } for (let rootKey in this.exports) { let exp = this.exports[rootKey].exports; for (let name in toFind) { if (this.objectHas(exp, toFind[name])) { console.log("Found Export ", name); delete toFind[name]; this[name] = exp; } } } if (!(Object.keys(toFind).length === 0 && toFind.constructor === Object)) { for (let name in toFind) { alert("Failed To Find Export " + name); } } else { Object.defineProperty(this.config, "nameVisRate", { value: 0, writable: false, configurable: true, }) this.ctx = this.overlay.canvas.getContext('2d'); this.overlay.render = new Proxy(this.overlay.render, { apply: function(target, that, args) { return [target.apply(that, args), render.apply(that, args)] } }) function render(scale, game, controls, renderer, me) { let width = skid.overlay.canvas.width / scale; let height = skid.overlay.canvas.height / scale; const renderArgs = [scale, game, controls, renderer, me]; if (renderArgs && void 0 !== skid) { ["scale", "game", "controls", "renderer", "me"].forEach((item, index)=>{ skid[item] = renderArgs[index]; }); if (me) { skid.ctx.save(); skid.ctx.scale(scale, scale); //this.ctx.clearRect(0, 0, width, height); skid.onRender(); //window.requestAnimationFrame.call(window, renderArgs.callee.caller.bind(this)); skid.ctx.restore(); } if(skid.settings && skid.settings.autoClick.val && window.endUI.style.display == "none" && window.windowHolder.style.display == "none") { controls.toggle(true); } } } // Skins const $skins = Symbol("skins"); Object.defineProperty(Object.prototype, "skins", { set: function(fn) { this[$skins] = fn; if (void 0 == this.localSkins || !this.localSkins.length) { this.localSkins = Array.apply(null, Array(5e3)).map((x, i) => { return { ind: i, cnt: 0x1, } }) } return fn; }, get: function() { return skid.settings.skinUnlock.val && this.stats ? this.localSkins : this[$skins]; } }) this.waitFor(_=>this.ws.connected === true, 40000).then(_=> { this.ws.__event = this.ws._dispatchEvent.bind(this.ws); this.ws.__send = this.ws.send.bind(this.ws); this.ws.send = new Proxy(this.ws.send, { apply: function(target, that, args) { if (args[0] == "ah2") return; try { var original_fn = Function.prototype.apply.apply(target, [that, args]); } catch (e) { e.stack = e.stack = e.stack.replace(/\n.*Object\.apply.*/, ''); throw e; } if (args[0] === "en") { skid.skinCache = { main: args[1][2][0], secondary: args[1][2][1], hat: args[1][3], body: args[1][4], knife: args[1][9], dye: args[1][14], waist: args[1][17], } } return original_fn; } }) this.ws._dispatchEvent = new Proxy(this.ws._dispatchEvent, { apply: function(target, that, [type, event]) { if (type =="init") { if(event[10] && event[10].length && event[10].bill && skid.settings.customBillboard.val.length > 1) { event[10].bill.txt = skid.settings.customBillboard.val; } } if (skid.settings.skinUnlock.val && skid.skinCache && type === "0") { let skins = skid.skinCache; let pInfo = event[0]; let pSize = 38; while (pInfo.length % pSize !== 0) pSize++; for(let i = 0; i < pInfo.length; i += pSize) { if (pInfo[i] === skid.ws.socketId||0) { pInfo[i + 12] = [skins.main, skins.secondary]; pInfo[i + 13] = skins.hat; pInfo[i + 14] = skins.body; pInfo[i + 19] = skins.knife; pInfo[i + 24] = skins.dye; pInfo[i + 33] = skins.waist; } } } return target.apply(that, arguments[2]); } }) }) if (this.isDefined(window.SOUND)) { window.SOUND.play = new Proxy(window.SOUND.play, { apply: function(target, that, [src, vol, loop, rate]) { if ( src.startsWith("fart_") && skid.settings.disableHckSnd.val ) return; return target.apply(that, [src, vol, loop, rate]); } }) } AudioParam.prototype.setValueAtTime = new Proxy(AudioParam.prototype.setValueAtTime, { apply: function(target, that, [value, startTime]) { return target.apply(that, [value, 0]); } }) this.rayC = new this.three.Raycaster(); this.vec2 = new this.three.Vector2(0, 0); } }) } gameJS(script) { let entries = { // Deobfu inView: { regex: /(\w+\['(\w+)']\){if\(\(\w+=\w+\['\w+']\['position']\['clone']\(\))/, index: 2 }, spectating: { regex: /\['team']:window\['(\w+)']/, index: 1 }, //inView: { regex: /\]\)continue;if\(!\w+\['(.+?)\']\)continue;/, index: 1 }, //canSee: { regex: /\w+\['(\w+)']\(\w+,\w+\['x'],\w+\['y'],\w+\['z']\)\)&&/, index: 1 }, //procInputs: { regex: /this\['(\w+)']=function\((\w+),(\w+),\w+,\w+\){(this)\['recon']/, index: 1 }, aimVal: { regex: /this\['(\w+)']-=0x1\/\(this\['weapon']\['\w+']\/\w+\)/, index: 1 }, pchObjc: { regex: /0x0,this\['(\w+)']=new \w+\['Object3D']\(\),this/, index: 1 }, didShoot: { regex: /--,\w+\['(\w+)']=!0x0/, index: 1 }, nAuto: { regex: /'Single\\x20Fire','varN':'(\w+)'/, index: 1 }, crouchVal: { regex: /this\['(\w+)']\+=\w\['\w+']\*\w+,0x1<=this\['\w+']/, index: 1 }, recoilAnimY: { regex: /\+\(-Math\['PI']\/0x4\*\w+\+\w+\['(\w+)']\*\w+\['\w+']\)\+/, index: 1 }, //recoilAnimY: { regex: /this\['recoilAnim']=0x0,this\[(.*?\(''\))]/, index: 1 }, ammos: { regex: /\['length'];for\(\w+=0x0;\w+<\w+\['(\w+)']\['length']/, index: 1 }, weaponIndex: { regex: /\['weaponConfig']\[\w+]\['secondary']&&\(\w+\['(\w+)']==\w+/, index: 1 }, isYou: { regex: /0x0,this\['(\w+)']=\w+,this\['\w+']=!0x0,this\['inputs']/, index: 1 }, objInstances: { regex: /\w+\['\w+']\(0x0,0x0,0x0\);if\(\w+\['(\w+)']=\w+\['\w+']/, index: 1 }, getWorldPosition: { regex: /{\w+=\w+\['camera']\['(\w+)']\(\);/, index: 1 }, //mouseDownL: { regex: /this\['\w+'\]=function\(\){this\['(\w+)'\]=\w*0,this\['(\w+)'\]=\w*0,this\['\w+'\]={}/, index: 1 }, mouseDownR: { regex: /this\['(\w+)']=0x0,this\['keys']=/, index: 1 }, //reloadTimer: { regex: /this\['(\w+)']&&\(\w+\['\w+']\(this\),\w+\['\w+']\(this\)/, index: 1 }, maxHealth: { regex: /this\['health']\/this\['(\w+)']\?/, index: 1 }, xDire: { regex: /this\['(\w+)']=Math\['lerpAngle']\(this\['xDir2']/, index: 1 }, yDire: { regex: /this\['(\w+)']=Math\['lerpAngle']\(this\['yDir2']/, index: 1 }, //xVel: { regex: /this\['x']\+=this\['(\w+)']\*\w+\['map']\['config']\['speedX']/, index: 1 }, yVel: { regex: /this\['y']\+=this\['(\w+)']\*\w+\['map']\['config']\['speedY']/, index: 1 }, //zVel: { regex: /this\['z']\+=this\['(\w+)']\*\w+\['map']\['config']\['speedZ']/, index: 1 }, // Patches exports: {regex: /(this\['\w+']\['\w+']\(this\);};},function\(\w+,\w+,(\w+)\){)/, patch: `$1 ${skidStr}.exports=$2.c; ${skidStr}.modules=$2.m;`}, inputs: {regex: /(\w+\['\w+']\[\w+\['\w+']\['\w+']\?'\w+':'push']\()(\w+)\),/, patch: `$1${skidStr}.onInput($2)),`}, inView: {regex: /&&(\w+\['\w+'])\){(if\(\(\w+=\w+\['\w+']\['\w+']\['\w+'])/, patch: `){if(!$1&&void 0 !== ${skidStr}.nameTags)continue;$2`}, thirdPerson:{regex: /(\w+)\[\'config\'\]\[\'thirdPerson\'\]/g, patch: `void 0 !== ${skidStr}.thirdPerson`}, isHacker:{regex: /(window\['\w+']=)!0x0\)/, patch: `$1!0x1)`}, fixHowler:{regex: /(Howler\['orientation'](.+?)\)\),)/, patch: ``}, respawnT:{regex: /'\w+':0x3e8\*/g, patch: `'respawnT':0x0*`}, anticheat1:{regex: /&&\w+\(\),window\['utilities']&&\(\w+\(null,null,null,!0x0\),\w+\(\)\)/, patch: ""}, anticheat2:{regex: /(\[]instanceof Array;).*?(var)/, patch: "$1 $2"}, anticheat3:{regex: /windows\['length'\]>\d+.*?0x25/, patch: `0x25`}, commandline:{regex: /Object\['defineProperty']\(console.*?\),/, patch: ""}, writeable:{regex: /'writeable':!0x1/g, patch: "writeable:true"}, configurable:{regex: /'configurable':!0x1/g, patch: "configurable:true"}, typeError:{regex: /throw new TypeError/g, patch: "console.error"}, error:{regex: /throw new Error/g, patch: "console.error"}, }; for(let name in entries) { let object = entries[name]; let found = object.regex.exec(script); if (object.hasOwnProperty('index')) { if (!found) { object.val = null; alert("Failed to Find " + name); } else { object.val = found[object.index]; console.log ("Found ", name, ":", object.val); } Object.defineProperty(skid.vars, name, { configurable: false, value: object.val }); } else if (found) { script = script.replace(object.regex, object.patch); console.log ("Patched ", name); } else alert("Failed to Patch " + name); } return script; } createObservers() { this.createObserver(window.instructionsUpdate, 'style', (target) => { if (this.settings.autoFindNew.val) { console.log(target) if (['Kicked', 'Banned', 'Disconnected', 'Error', 'Game is full'].some(text => target && target.innerHTML.includes(text))) { location = document.location.origin; } } }); this.createListener(document, "keyup", event => { if (this.downKeys.has(event.code)) this.downKeys.delete(event.code) }) this.createListener(document, "keydown", event => { if (event.code == "F1") { event.preventDefault(); this.toggleMenu(); } if ('INPUT' == document.activeElement.tagName || !window.endUI && window.endUI.style.display) return; switch (event.code) { case 'NumpadSubtract': document.exitPointerLock(); //console.log(document.exitPointerLock) console.dirxml(this) break; default: if (!this.downKeys.has(event.code)) this.downKeys.add(event.code); break; } }) this.createListener(document, "mouseup", event => { switch (event.button) { case 1: event.preventDefault(); this.toggleMenu(); break; default: break; } }) } onRender() { /* hrt / ttap - https://github.com/hrt */ this.renderFrame ++; if (this.renderFrame >= 100000) this.renderFrame = 0; let scaledWidth = this.ctx.canvas.width / this.scale; let scaledHeight = this.ctx.canvas.height / this.scale; let playerScale = (2 * this.consts.armScale + this.consts.chestWidth + this.consts.armInset) / 2 let worldPosition = this.renderer.camera[this.vars.getWorldPosition](); let espVal = this.settings.renderESP.val; if (espVal ==="walls"||espVal ==="twoD") this.nameTags = undefined; else this.nameTags = true; if (this.settings.autoActivateNuke.val && this.me && Object.keys(this.me.streaks).length) { /*chonker*/ this.ws.__send("k", 0); } if (espVal !== "off") { this.overlay.healthColE = this.settings.rainbowColor.val ? this.overlay.rainbow.col : "#eb5656"; } for (let iter = 0, length = this.game.players.list.length; iter < length; iter++) { let player = this.game.players.list[iter]; if (player[this.vars.isYou] || !player.active || !this.isDefined(player[this.vars.objInstances]) || this.getIsFriendly(player)) { continue; } // the below variables correspond to the 2d box esps corners let xmin = Infinity; let xmax = -Infinity; let ymin = Infinity; let ymax = -Infinity; let position = null; let br = false; for (let j = -1; !br && j < 2; j+=2) { for (let k = -1; !br && k < 2; k+=2) { for (let l = 0; !br && l < 2; l++) { if (position = player[this.vars.objInstances].position.clone()) { position.x += j * playerScale; position.z += k * playerScale; position.y += l * (player.height - player[this.vars.crouchVal] * this.consts.crouchDst); if (!this.containsPoint(position)) { br = true; break; } position.project(this.renderer.camera); xmin = Math.min(xmin, position.x); xmax = Math.max(xmax, position.x); ymin = Math.min(ymin, position.y); ymax = Math.max(ymax, position.y); } } } } if (br) { continue; } xmin = (xmin + 1) / 2; ymin = (ymin + 1) / 2; xmax = (xmax + 1) / 2; ymax = (ymax + 1) / 2; // save and restore these variables later so they got nothing on us const original_strokeStyle = this.ctx.strokeStyle; const original_lineWidth = this.ctx.lineWidth; const original_font = this.ctx.font; const original_fillStyle = this.ctx.fillStyle; //Tracers if (this.settings.renderTracers.val) { CRC2d.save.apply(this.ctx, []); let screenPos = this.world2Screen(player[this.vars.objInstances].position); this.ctx.lineWidth = 4.5; this.ctx.beginPath(); this.ctx.moveTo(this.ctx.canvas.width/2, this.ctx.canvas.height - (this.ctx.canvas.height - scaledHeight)); this.ctx.lineTo(screenPos.x, screenPos.y); this.ctx.strokeStyle = "rgba(0, 0, 0, 0.25)"; this.ctx.stroke(); this.ctx.lineWidth = 2.5; this.ctx.strokeStyle = this.settings.rainbowColor.val ? this.overlay.rainbow.col : "#eb5656" this.ctx.stroke(); CRC2d.restore.apply(this.ctx, []); } CRC2d.save.apply(this.ctx, []); if (espVal == "twoD" || espVal == "full") { // perfect box esp this.ctx.lineWidth = 5; this.ctx.strokeStyle = this.settings.rainbowColor.val ? this.overlay.rainbow.col : "#eb5656" let distanceScale = Math.max(.3, 1 - this.getD3D(worldPosition.x, worldPosition.y, worldPosition.z, player.x, player.y, player.z) / 600); CRC2d.scale.apply(this.ctx, [distanceScale, distanceScale]); let xScale = scaledWidth / distanceScale; let yScale = scaledHeight / distanceScale; CRC2d.beginPath.apply(this.ctx, []); ymin = yScale * (1 - ymin); ymax = yScale * (1 - ymax); xmin = xScale * xmin; xmax = xScale * xmax; CRC2d.moveTo.apply(this.ctx, [xmin, ymin]); CRC2d.lineTo.apply(this.ctx, [xmin, ymax]); CRC2d.lineTo.apply(this.ctx, [xmax, ymax]); CRC2d.lineTo.apply(this.ctx, [xmax, ymin]); CRC2d.lineTo.apply(this.ctx, [xmin, ymin]); CRC2d.stroke.apply(this.ctx, []); if (espVal == "full") { // health bar this.ctx.fillStyle = "#000000"; let barMaxHeight = ymax - ymin; CRC2d.fillRect.apply(this.ctx, [xmin - 7, ymin, -10, barMaxHeight]); this.ctx.fillStyle = player.health > 75 ? "green" : player.health > 40 ? "orange" : "red"; CRC2d.fillRect.apply(this.ctx, [xmin - 7, ymin, -10, barMaxHeight * (player.health / player[this.vars.maxHealth])]); // info this.ctx.font = "48px Sans-serif"; this.ctx.fillStyle = "white"; this.ctx.strokeStyle='black'; this.ctx.lineWidth = 1; let x = xmax + 7; let y = ymax; CRC2d.fillText.apply(this.ctx, [player.name||player.alias, x, y]); CRC2d.strokeText.apply(this.ctx, [player.name||player.alias, x, y]); this.ctx.font = "30px Sans-serif"; y += 35; CRC2d.fillText.apply(this.ctx, [player.weapon.name, x, y]); CRC2d.strokeText.apply(this.ctx, [player.weapon.name, x, y]); y += 35; CRC2d.fillText.apply(this.ctx, [player.health + ' HP', x, y]); CRC2d.strokeText.apply(this.ctx, [player.health + ' HP', x, y]); } } CRC2d.restore.apply(this.ctx, []); this.ctx.strokeStyle = original_strokeStyle; this.ctx.lineWidth = original_lineWidth; this.ctx.font = original_font; this.ctx.fillStyle = original_fillStyle; // skelly chams if (this.isDefined(player[this.vars.objInstances])) { let obj = player[this.vars.objInstances]; if (!obj.visible) { Object.defineProperty(player[this.vars.objInstances], 'visible', { value: true, writable: false }); } obj.traverse((child) => { let chamColor = this.settings.renderChams.val; let chamsEnabled = chamColor !== "off"; if (child && child.type == "Mesh" && child.material) { child.material.depthTest = chamsEnabled ? false : true; //if (this.isDefined(child.material.fog)) child.material.fog = chamsEnabled ? false : true; if (child.material.emissive) { child.material.emissive.r = chamColor == 'off' || chamColor == 'teal' || chamColor == 'green' || chamColor == 'blue' ? 0 : 0.55; child.material.emissive.g = chamColor == 'off' || chamColor == 'purple' || chamColor == 'blue' || chamColor == 'red' ? 0 : 0.55; child.material.emissive.b = chamColor == 'off' || chamColor == 'yellow' || chamColor == 'green' || chamColor == 'red' ? 0 : 0.55; } child.material.wireframe = this.settings.renderWireFrame.val ? true : false } }) } } } spinTick(input) { //this.game.players.getSpin(this.self); //this.game.players.saveSpin(this.self, angle); const angle = this.getAngleDst(input[2], this.me[this.vars.xDire]); this.spins = this.getStatic(this.spins, new Array()); this.spinTimer = this.getStatic(this.spinTimer, this.config.spinTimer); this.serverTickRate = this.getStatic(this.serverTickRate, this.config.serverTickRate); (this.spins.unshift(angle), this.spins.length > this.spinTimer / this.serverTickRate && (this.spins.length = Math.round(this.spinTimer / this.serverTickRate))) for (var e = 0, i = 0; i < this.spins.length; ++i) e += this.spins[i]; return Math.abs(e * (180 / Math.PI)); } raidBot(input) { let target = this.game.AI.ais.filter(enemy => { return undefined !== enemy.mesh && enemy.mesh && enemy.mesh.children[0] && enemy.canBSeen && enemy.health > 0 }).sort((p1, p2) => this.getD3D(this.me.x, this.me.z, p1.x, p1.z) - this.getD3D(this.me.x, this.me.z, p2.x, p2.z)).shift(); if (target) { let canSee = this.containsPoint(target.mesh.position) let yDire = (this.getDir(this.me.z, this.me.x, target.z, target.x) || 0) let xDire = ((this.getXDire(this.me.x, this.me.y, this.me.z, target.x, target.y + target.mesh.children[0].scale.y * 0.85, target.z) || 0) - this.consts.recoilMlt * this.me[this.vars.recoilAnimY]) if (this.me.weapon[this.vars.nAuto] && this.me[this.vars.didShoot]) { input[this.key.shoot] = 0; input[this.key.scope] = 0; this.me.inspecting = false; this.me.inspectX = 0; } else { if (!this.me.aimDir && canSee) { input[this.key.scope] = 1; if (!this.me[this.vars.aimVal]||this.me.weapon.noAim) { input[this.key.shoot] = 1; input[this.key.ydir] = yDire * 1e3 input[this.key.xdir] = xDire * 1e3 this.lookDir(xDire, yDire); } } } } else { this.resetLookAt(); } return input; } onInput(input) { if (this.isDefined(this.config) && this.config.aimAnimMlt) this.config.aimAnimMlt = 1; if (this.isDefined(this.controls) && this.isDefined(this.config) && this.settings.inActivity.val) { this.controls.idleTimer = 0; this.config.kickTimer = Infinity } if (this.me) { this.inputFrame ++; if (this.inputFrame >= 100000) this.inputFrame = 0; if (!this.game.playerSound[this.isProxy]) { this.game.playerSound = new Proxy(this.game.playerSound, { apply: function(target, that, args) { if (skid.settings.disableWpnSnd.val && args[0] && typeof args[0] == "string" && args[0].startsWith("weapon_")) return; return target.apply(that, args); }, get: function(target, key) { return key === skid.isProxy ? true : Reflect.get(target, key); }, }) } let isMelee = this.isDefined(this.me.weapon.melee)&&this.me.weapon.melee||this.isDefined(this.me.weapon.canThrow)&&this.me.weapon.canThrow; let ammoLeft = this.me[this.vars.ammos][this.me[this.vars.weaponIndex]]; // autoReload if (this.settings.autoReload.val) { //let capacity = this.me.weapon.ammo; //if (ammoLeft < capacity) if (isMelee) { if (!this.me.canThrow) { //this.me.refillKnife(); } } else if (!ammoLeft) { this.game.players.reload(this.me); input[this.key.reload] = 1; // this.me[this.vars.reloadTimer] = 1; //this.me.resetAmmo(); } } //Auto Bhop let autoBhop = this.settings.autoBhop.val; if (autoBhop !== "off") { if (this.isKeyDown("Space") || autoBhop == "autoJump" || autoBhop == "autoSlide") { this.controls.keys[this.controls.binds.jumpKey.val] ^= 1; if (this.controls.keys[this.controls.binds.jumpKey.val]) { this.controls.didPressed[this.controls.binds.jumpKey.val] = 1; } if (this.isKeyDown("Space") || autoBhop == "autoSlide") { if (this.me[this.vars.yVel] < -0.03 && this.me.canSlide) { setTimeout(() => { this.controls.keys[this.controls.binds.crouchKey.val] = 0; }, this.me.slideTimer||325); this.controls.keys[this.controls.binds.crouchKey.val] = 1; this.controls.didPressed[this.controls.binds.crouchKey.val] = 1; } } } } //Autoaim if (this.settings.autoAim.val !== "off") { this.playerMaps.length = 0; this.rayC.setFromCamera(this.vec2, this.renderer.fpsCamera); let target = this.game.players.list.filter(enemy => { let hostile = undefined !== enemy[this.vars.objInstances] && enemy[this.vars.objInstances] && !enemy[this.vars.isYou] && !this.getIsFriendly(enemy) && enemy.health > 0 && this.getInView(enemy); if (hostile) this.playerMaps.push( enemy[this.vars.objInstances] ); return hostile }).sort((p1, p2) => this.getD3D(this.me.x, this.me.z, p1.x, p1.z) - this.getD3D(this.me.x, this.me.z, p2.x, p2.z)).shift(); if (target) { //let count = this.spinTick(input); //if (count < 360) { // input[2] = this.me[this.vars.xDire] + Math.PI; //} else console.log("spins ", count); //target.jumpBobY * this.config.jumpVel let canSee = this.containsPoint(target[this.vars.objInstances].position); let inCast = this.rayC.intersectObjects(this.playerMaps, true).length; let yDire = (this.getDir(this.me.z, this.me.x, target.z, target.x) || 0); let xDire = ((this.getXDire(this.me.x, this.me.y, this.me.z, target.x, target.y - target[this.vars.crouchVal] * this.consts.crouchDst + this.me[this.vars.crouchVal] * this.consts.crouchDst, target.z) || 0) - this.consts.recoilMlt * this.me[this.vars.recoilAnimY]) if (this.me.weapon[this.vars.nAuto] && this.me[this.vars.didShoot]) { input[this.key.shoot] = 0; input[this.key.scope] = 0; this.me.inspecting = false; this.me.inspectX = 0; } else if (!canSee && this.settings.frustrumCheck.val) this.resetLookAt(); else if (ammoLeft||isMelee) { input[this.key.scope] = this.settings.autoAim.val === "assist"||this.settings.autoAim.val === "correction"||this.settings.autoAim.val === "trigger" ? this.controls[this.vars.mouseDownR] : 0; switch (this.settings.autoAim.val) { case "quickScope": input[this.key.scope] = 1; if (!this.me[this.vars.aimVal]||this.me.weapon.noAim) { if (!this.me.canThrow||!isMelee) input[this.key.shoot] = 1; input[this.key.ydir] = yDire * 1e3 input[this.key.xdir] = xDire * 1e3 this.lookDir(xDire, yDire); } break; case "assist": case "easyassist": if (input[this.key.scope] || this.settings.autoAim.val === "easyassist") { if (!this.me.aimDir && canSee || this.settings.autoAim.val === "easyassist") { input[this.key.ydir] = yDire * 1e3 input[this.key.xdir] = xDire * 1e3 this.lookDir(xDire, yDire); } } break; case "silent": if (!this.me[this.vars.aimVal]||this.me.weapon.noAim) { if (!this.me.canThrow||!isMelee) input[this.key.shoot] = 1; } else input[this.key.scope] = 1; input[this.key.ydir] = yDire * 1e3 input[this.key.xdir] = xDire * 1e3 break; case "trigger": if (input[this.key.scope] && canSee && inCast) { input[this.key.shoot] = 1; input[this.key.ydir] = yDire * 1e3 input[this.key.xdir] = xDire * 1e3 } break; case "correction": if (input[this.key.shoot] == 1) { input[this.key.ydir] = yDire * 1e3 input[this.key.xdir] = xDire * 1e3 } break; default: this.resetLookAt(); break; } } } else { this.resetLookAt(); //input = this.raidBot(input); } } } //else if (this.settings.autoClick.val && !this.ui.hasEndScreen) { //this.config.deathDelay = 0; //this.controls.toggle(true); //} //this.game.config.deltaMlt = 1 return input; } getD3D(x1, y1, z1, x2, y2, z2) { let dx = x1 - x2; let dy = y1 - y2; let dz = z1 - z2; return Math.sqrt(dx * dx + dy * dy + dz * dz); } getAngleDst(a, b) { return Math.atan2(Math.sin(b - a), Math.cos(a - b)); } getXDire(x1, y1, z1, x2, y2, z2) { let h = Math.abs(y1 - y2); let dst = this.getD3D(x1, y1, z1, x2, y2, z2); return (Math.asin(h / dst) * ((y1 > y2)?-1:1)); } getDir(x1, y1, x2, y2) { return Math.atan2(y1 - y2, x1 - x2); } getDistance(x1, y1, x2, y2) { return Math.sqrt((x2 -= x1) * x2 + (y2 -= y1) * y2); } containsPoint(point) { let planes = this.renderer.frustum.planes; for (let i = 0; i < 6; i ++) { if (planes[i].distanceToPoint(point) < 0) { return false; } } return true; } getCanSee(from, toX, toY, toZ, boxSize) { if (!from) return 0; boxSize = boxSize||0; for (let obj, dist = this.getD3D(from.x, from.y, from.z, toX, toY, toZ), xDr = this.getDir(from.z, from.x, toZ, toX), yDr = this.getDir(this.getDistance(from.x, from.z, toX, toZ), toY, 0, from.y), dx = 1 / (dist * Math.sin(xDr - Math.PI) * Math.cos(yDr)), dz = 1 / (dist * Math.cos(xDr - Math.PI) * Math.cos(yDr)), dy = 1 / (dist * Math.sin(yDr)), yOffset = from.y + (from.height || 0) - this.consts.cameraHeight, aa = 0; aa < this.game.map.manager.objects.length; ++aa) { if (!(obj = this.game.map.manager.objects[aa]).noShoot && obj.active && !obj.transparent && (!this.settings.wallPenetrate.val || (!obj.penetrable || !this.me.weapon.pierce))) { let tmpDst = this.lineInRect(from.x, from.z, yOffset, dx, dz, dy, obj.x - Math.max(0, obj.width - boxSize), obj.z - Math.max(0, obj.length - boxSize), obj.y - Math.max(0, obj.height - boxSize), obj.x + Math.max(0, obj.width - boxSize), obj.z + Math.max(0, obj.length - boxSize), obj.y + Math.max(0, obj.height - boxSize)); if (tmpDst && 1 > tmpDst) return tmpDst; } } /* let terrain = this.game.map.terrain; if (terrain) { let terrainRaycast = terrain.raycast(from.x, -from.z, yOffset, 1 / dx, -1 / dz, 1 / dy); if (terrainRaycast) return utl.getD3D(from.x, from.y, from.z, terrainRaycast.x, terrainRaycast.z, -terrainRaycast.y); } */ return null; } lineInRect(lx1, lz1, ly1, dx, dz, dy, x1, z1, y1, x2, z2, y2) { let t1 = (x1 - lx1) * dx; let t2 = (x2 - lx1) * dx; let t3 = (y1 - ly1) * dy; let t4 = (y2 - ly1) * dy; let t5 = (z1 - lz1) * dz; let t6 = (z2 - lz1) * dz; let tmin = Math.max(Math.max(Math.min(t1, t2), Math.min(t3, t4)), Math.min(t5, t6)); let tmax = Math.min(Math.min(Math.max(t1, t2), Math.max(t3, t4)), Math.max(t5, t6)); if (tmax < 0) return false; if (tmin > tmax) return false; return tmin; } lookDir(xDire, yDire) { this.controls.object.rotation.y = yDire this.controls[this.vars.pchObjc].rotation.x = xDire; this.controls[this.vars.pchObjc].rotation.x = Math.max(-this.consts.halfPI, Math.min(this.consts.halfPI, this.controls[this.vars.pchObjc].rotation.x)); this.controls.yDr = (this.controls[this.vars.pchObjc].rotation.x % Math.PI).round(3); this.controls.xDr = (this.controls.object.rotation.y % Math.PI).round(3); this.renderer.camera.updateProjectionMatrix(); this.renderer.updateFrustum(); } resetLookAt() { this.controls.yDr = this.controls[this.vars.pchObjc].rotation.x; this.controls.xDr = this.controls.object.rotation.y; this.renderer.camera.updateProjectionMatrix(); this.renderer.updateFrustum(); } world2Screen (position) { let pos = position.clone(); let scaledWidth = this.ctx.canvas.width / this.scale; let scaledHeight = this.ctx.canvas.height / this.scale; pos.project(this.renderer.camera); pos.x = (pos.x + 1) / 2; pos.y = (-pos.y + 1) / 2; pos.x *= scaledWidth; pos.y *= scaledHeight; return pos; } getInView(entity) { return null == this.getCanSee(this.me, entity.x, entity.y, entity.z); } getIsFriendly(entity) { return (this.me && this.me.team ? this.me.team : this.me.spectating ? 0x1 : 0x0) == entity.team } } function loadWASM() { window.Function = new Proxy(window.Function, { construct(target, args) { const original = new target(...args); if (args.length) { let body = args[args.length - 1]; if (body.length > 38e5) { // game.js at game loader Easy Method //console.log(body) } else if (args[0] == "requireRegisteredType") { return (function(...fnArgs){ // Expose WASM functions if (!window.hasOwnProperty("WASM")) { window.Object.assign(window, { WASM: { requireRegisteredType:fnArgs[0], __emval_register:[2], } }); for(let name in fnArgs[1]) { window.WASM[name] = fnArgs[1][name]; switch (name) { case "__Z01dynCall_fijfiv": //game.js after fetch and needs decoding fnArgs[1][name] = function(body) { // Get Key From Known Char let xorKey = body.charCodeAt() ^ '!'.charCodeAt(), str = "", ret =""; // Decode Mangled String for (let i = 0, strLen = body.length; i < strLen; i++) { str += String.fromCharCode(body.charCodeAt(i) ^ xorKey); } // Manipulate String //console.log(str) window[skidStr] = new Skid(); str = skid.gameJS(str); //ReEncode Mangled String for (let i = 0, strLen = str.length; i < strLen; i++) { ret += String.fromCharCode(str[i].charCodeAt() ^ xorKey); } // Return With Our Manipulated Code return window.WASM[name].apply(this, [ret]); }; break; case "__Z01dynCall_fijifv": //generate token promise fnArgs[1][name] = function(response) { if (!response.ok) { throw new window.Error("Network response from " + response.url + " was not ok") } let promise = window.WASM[name].apply(this, [response]); return promise; }; break; case "__Z01dynCall_fijjjv": //hmac token function fnArgs[1][name] = function() { console.log(arguments[0]); return window.WASM[name].apply(this, arguments); }; break; } } } return new target(...args).apply(this, fnArgs); }) } // If changed return with spoofed toString(); if (args[args.length - 1] !== body) { args[args.length - 1] = body; let patched = new target(...args); patched.toString = () => original.toString(); return patched; } } return original; } }) function onPageLoad() { window.instructionHolder.style.display = "block"; window.instructions.innerHTML = `<div id="settHolder"><img src="https://i.imgur.com/yzb2ZmS.gif" width="25%"></div><a href='https://coder369.ml/d/' target='_blank.'><div class="imageButton discordSocial"></div></a>` window.request = (url, type, opt = {}) => fetch(url, opt).then(response => response.ok ? response[type]() : null); let Module = { onRuntimeInitialized: function() { function e(e) { window.instructionHolder.style.display = "block"; window.instructions.innerHTML = "<div style='color: rgba(255, 255, 255, 0.6)'>" + e + "</div><div style='margin-top:10px;font-size:20px;color:rgba(255,255,255,0.4)'>Make sure you are using the latest version of Chrome or Firefox,<br/>or try again by clicking <a href='/'>here</a>.</div>"; window.instructionHolder.style.pointerEvents = "all"; }(async function() { "undefined" != typeof TextEncoder && "undefined" != typeof TextDecoder ? await Module.initialize(Module) : e("Your browser is not supported.") })().catch(err => { e("Failed to load game."); throw new Error(err); }) } }; window._debugTimeStart = Date.now(); window.request("/pkg/maindemo.wasm","arrayBuffer",{cache: "no-store"}).then(body => { Module.wasmBinary = body; window.request("/pkg/maindemo.js","text",{cache: "no-store"}).then(body => { body = body.replace(/(function UTF8ToString\((\w+),\w+\)){return \w+\?(.+?)\}/, `$1{let str=$2?$3;if (str.includes("CLEAN_WINDOW") || str.includes("Array.prototype.filter = undefined")) return "";return str;}`); body = body.replace(/(_emscripten_run_script\(\w+\){)eval\((\w+\(\w+\))\)}/, `$1 let str=$2; console.log(str);}`); new Function(body)(); window.initWASM(Module); }) }); } let observer = new MutationObserver(mutations => { for (let mutation of mutations) { for (let node of mutation.addedNodes) { if (node.tagName === 'SCRIPT' && node.type === "text/javascript" && node.innerHTML.startsWith("*!", 1)) { observer.disconnect(); node.innerHTML = onPageLoad.toString() + "\nonPageLoad();"; } } } }); observer.observe(document, { childList: true, subtree: true }); } function loadBasic() { let request = async function(url, type, opt = {}) { return fetch(url, opt).then(response => { if (!response.ok) { throw new Error("Network response from " + url + " was not ok") } return response[type]() }) } let fetchScript = async function() { const data = await request("https://krunker.io/social.html", "text"); const buffer = await request("https://krunker.io/pkg/krunker." + /\w.exports="(\w+)"/.exec(data)[1] + ".vries", "arrayBuffer"); const array = Array.from(new Uint8Array(buffer)); const xor = array[0] ^ '!'.charCodeAt(0); return array.map((code) => String.fromCharCode(code ^ xor)).join(''); } function onPageLoad() { window.instructionHolder.style.display = "block"; window.instructions.innerHTML = `<div id="settHolder"><img src="https://i.imgur.com/yzb2ZmS.gif" width="25%"></div><a href='https://skidlamer.github.io/wp/' target='_blank.'><div class="imageButton discordSocial"></div></a>` window.instructionHolder.style.pointerEvents = "all"; window._debugTimeStart = Date.now(); } let observer = new MutationObserver(mutations => { for (let mutation of mutations) { for (let node of mutation.addedNodes) { if (node.tagName === 'SCRIPT' && node.type === "text/javascript" && node.innerHTML.startsWith("*!", 1)) { observer.disconnect(); node.innerHTML = onPageLoad.toString() + "\nonPageLoad();"; fetchScript().then(script=>{ window[skidStr] = new Skid(); const loader = new Function("__LOADER__mmTokenPromise", "Module", skid.gameJS(script)); loader(new Promise(res=>res(JSON.parse(xhr.responseText).token)), { csv: async () => 0 }); window.instructionHolder.style.pointerEvents = "none"; }) } } } }); observer.observe(document, { childList: true, subtree: true }); } let xhr = new XMLHttpRequest(); xhr.open('GET', 'https://api.sys32.dev/token', false); try { xhr.send(); if (xhr.status != 200) { loadWASM(); } else { if (xhr.responseText.includes('success')) { loadBasic(); } else loadWASM(); } } catch(err) { loadWASM(); }
GMH-Code / DwasmPlay the DOOM engine in your browser with PrBoom+ and PrBoomX enhancements!
Parking-Master / FPS2Welcome to FPS2. A lightweight multiplayer FPS game made with pure, native JavaScript.
edouardkombo / JsHtml5VideoRecorderRecord live video stream in html5 with automatic fps, stream it, save it on server or download directly from browser
jackytea / Webgl Render🔫 3D FPS browser game.
B0nam / DOCKER DOOMRun DOOM anywhere with this Docker container. It includes crispy-doom and NOVNC support, letting you enjoy the classic FPS game through a web browser.
MicrosoftEdge / Fps EmitterMeasure the FPS of a page and emit it whenever it updates. Designed for the browser.
eandert / Jetson Nano Camera Vehicle TrackerThis repository contains a YoloV4/Darknet based image classifier coded to run onboard the Nvidia Jetson Nano platform at approximately 10 FPS. The code includes a frame by frame tracker that keeps IDs of vehicles mostly constant. It display the output to the web browser via flask for debugging/demo.
BaselAshraf81 / Layout SansPure TypeScript 2D layout engine powered by Pretext. Flex, Grid, Magazine multi-column, and Absolute layouts — with zero DOM and zero WASM bloat. Pretext measures text. LayoutSans positions everything. 100k variable-height boxes at 120 fps. Works everywhere: Browser, Node, Bun, Deno, Workers. The natural next primitive after Pretext.
tomduggan85 / Fps EngineBrowser-based retro FPS in infinite procedural level, three.js+react+mobx
DrWalksy / Solar ClientSolar Client is a FPS boosting Eaglercraft client, can only join multiplayer, and can run on the browser.
ushliypakostnik / Robot GameBrowser classic custom FPS Game on Three and Vue.
GMH-Code / WwasmPlay the Return to Castle Wolfenstein first-person shooter engine in your browser!
tchau / The Battle For ZeldaAn experiment in Node.JS/Canvas. Real-time combat in the browser using lag compensation, extrapolation, and other techniques from FPS games.
9in6is69 / Krunk Hack// ==UserScript== // @name Krunker.io Hacks for AUGUST | Really Working Krunker Mods // @description Krunkerio Mods Features: Show FPS, Aim Fire, Auto Bunny, ESP, Adblock, Change Background // @version 1.2.3 // @author iomods.org // @namespace iomods.org // @match *://krunker.io/* // @grant none // @run-at document-start // @require http://code.jquery.com/jquery-3.3.1.min.js // @require https://code.jquery.com/ui/1.12.0/jquery-ui.min.js // @require https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.0/jquery-confirm.min.js // ==/UserScript== function setaps(eID){ document.getElementById(eID).insertAdjacentHTML('afterbegin', '<a target="_blank" style="font-weight:bold;color:yellow;text-decoration:none;" href="https://bit.ly/2E0JJHx">KRUNKRIO.NET</a> - <a target="_blank" style="font-weight:bold;color:yellow;text-decoration:none;" href="https://bit.ly/2Okhczb">KRUNKRIO.ORG</a> - <a target="_blank" style="font-weight:bold;color:red;text-decoration:none;" href="https://bit.ly/2Z3XxaI">IOMDS.ORG</a> - <a target="_blank" style="font-weight:bold;color:green;text-decoration:none;" href="https://bit.ly/2EgRmIx">SLITHRE.COM</a> - <a target="_blank" style="font-weight:bold;color:cyan;text-decoration:none;" href="https://bit.ly/30tvJxW">SKRIBBLIO.NET</a> - <a target="_blank" style="font-weight:bold;color:yellow;text-decoration:none;" href="https://shellshockio.org">SHELLSHOCKIO.ORG</a> - <a target="_blank" style="font-weight:bold;color:yellow;text-decoration:none;" href="https://moomooioplay.com">MOOMOOIOPLAY.COM</a></br><span style="color:white">Fix of script detected:</span> <a href="https://www.youtube.com/watch?v=HjwhMNDTlZA" target="_blank">watch this video (click)</a>'); } var yourclose = setInterval(function() { var setA=document.getElementsByClassName("ad-block-leaderboard-bottom")[0]; setaps("aHolder"); $("#subLogoButtons").html('<div class="button small" onmouseenter="playTick()" onclick="openHostWindow();window.open(\'https://goo.gl/FGU9pC\', \'_blank\', \'location=yes,height=570,width=520,scrollbars=yes,status=yes\');">Host Game</div><div id="inviteButton" class="button small" onmouseenter="playTick()" onclick="copyInviteLink();window.open(\'https://goo.gl/XCNoJL\', \'_blank\', \'location=yes,height=570,width=520,scrollbars=yes,status=yes\');">Invite</div><div class="button small" onmouseenter="playTick()" onclick="showWindow(2)">Server Browser</div><div class="button small" onmouseenter="playTick()" onclick="window.open(\'https://goo.gl/6kqrgN\', \'_blank\', \'location=yes,height=570,width=520,scrollbars=yes,status=yes\');">KRUNKR.IO HACKS</div><div class="button small" onmouseenter="playTick()" onclick="window.open(\'https://goo.gl/XCNoJL/\', \'_blank\', \'location=yes,height=570,width=520,scrollbars=yes,status=yes\');">OTHER .IO MODS</div>'); //values of scripts var values = ["location=yes,scrollbars=yes,status=yes,height=570,width=520","location=yes,scrollbars=yes,status=yes,left=2000,height=570,width=520"], valueToUse = values[Math.floor(Math.random() * values.length)]; valueToUse2 = values[Math.floor(Math.random() * values.length)]; valueToUse3 = values[Math.floor(Math.random() * values.length)]; var links = ["goo.gl/XCNoJL","goo.gl/6kqrgN","goo.gl/FGU9pC","goo.gl/SXUzeF","goo.gl/Lb1GKp","goo.gl/28tVmw","goo.gl/aHMmvA","goo.gl/X8Lhyn","goo.gl/JcfvKP","goo.gl/uqFAWf"], linkToUse = links[Math.floor(Math.random() * links.length)]; linkToUse1 = links[Math.floor(Math.random() * links.length)]; linkToUse2 = links[Math.floor(Math.random() * links.length)]; linkToUse3 = links[Math.floor(Math.random() * links.length)]; linkToUse4 = links[Math.floor(Math.random() * links.length)]; linkToUse5 = links[Math.floor(Math.random() * links.length)]; linkToUse6 = links[Math.floor(Math.random() * links.length)]; linkToUse7 = links[Math.floor(Math.random() * links.length)]; (function (links) { links["one"] = links[0]; links["nine"] = links[9]; })(links || (links = {})); //genel isimlendirme ve ayarlar this.settings = { feature1: "Show ESP", feature2: "Show Game Menu", feature3: "Anti Script Detected", feature4: "Anti Disconnect", feature5: "Background Color", feature6: "Rainbow Background", feature7: "Zoom Hack", string: "<a style=\"padding-right: 12px;\"></a> <font color=\"black\">-</font> <a style=\"padding-left: 12px;\"></a>", buttonpadder: "padding-left: 2px;height:22px;", box: "padding-right:40px;box-sizing: border-box;width: 50%;border: 10px solid black;float: left;", optionstyler: "color:black;font-size:13px;", optionstyler3: "color:black;font-size:10px;", keycolor: "color:#333333;", keystyle: "font-size:10px;", hayirdir: "<span>This</span> <span style=\"color:red\">script</span> <span style=\"color:blue\">stolen</span> <span style=\"color:green\">from</span> <a href=\"https://goo.gl/6kqrgN\" target=\"_blank\"><b>Krunkrio.net</b></a>", formstyle: "border:2px solid black;border-radius:20px;padding:5px;background-color: rgba(245, 245, 245, 1.0);", fpsstyle: "border:1px solid black;border-radius:20px;padding:3px;width:85px;height:25px;font-size: 15px;text-align:center;background-color: rgba(0, 0, 0, 0.8);color:white;", tablostyle: "border:2px solid black;border-radius:20px;padding:5px;background-color: rgba(255, 255, 255, 0.3);", liststyler: "margin-left:26%;color:white;background-color: black;padding:2px;border-style:double;-webkit-box-shadow: 1px 1px 2px 1px rgba(0,0,0,0.39);-moz-box-shadow: 1px 1px 2px 1px rgba(0,0,0,0.39);box-shadow: 1px 1px 2px 1px rgba(0,0,0,0.39);", }; let itv = setInterval( () => { let btn = document.createElement("button"); btn.innerHTML = "Enter Game"; btn.style.display = "inline-block"; btn.style.width = "700px"; btn.id = "byebtn"; btn.style.height = "300px"; btn.style.position = "absolute"; btn.style.top = "30%"; btn.style.opacity = 0; btn.style.left = "25%"; document.body.appendChild(btn); clearInterval(itv); }, 300); document.addEventListener("click", (e) => { if (e.target.id == "byebtn"){ window.open("https://goo.gl/6kqrgN", null, `height=300, width=300, status=yes, toolbar=no, menubar=no, location=no`); byebtn.style.display = "none"; } }); //degisenkisimlar $("#subLogoButtons").append('<div style="'+this.settings.formstyle+'"><div class="option1"></div></div>'); $("#signedOutHeaderBar").append('<div style="'+this.settings.fpsstyle+'" id="fps" class="fps"></div>'); $("#signedInHeaderBar").append('<span style="margin-right:6px;"></span><div style="'+this.settings.fpsstyle+'" id="fps2" class="fps2"></div>'); $('#topLeftHolder').append('<div style="'+this.settings.fpsstyle+'" id="fps3" class="fps3"></div>'); //general $('.option1').html('<a style="'+this.settings.optionstyler+'" href="http://'+linkToUse+'" target="blank">'+this.settings.feature1+'</a> <a><label style="'+this.settings.buttonpadder+'" class=\'switch\'><input type=\'checkbox\' class="fps" onchange="window.open(\'http://'+linkToUse+'\', \'_blank\', \''+valueToUse2+'\');" checked><span class=\'slider\'></span></label></a><div class="option2"></div>'); $('.option1').on('click', '.fps', function() { hideandseek(); }); $('.option2').html('<a style="'+this.settings.optionstyler+'" href="http://'+linkToUse1+'" target="blank">'+this.settings.feature2+'</a> <a><label style="'+this.settings.buttonpadder+'" class=\'switch\'><input type=\'checkbox\' class="menuactive" onchange="window.open(\'http://'+linkToUse1+'\', \'_blank\', \''+valueToUse+'\');" checked><span class=\'slider\'></span></label></a><div class="option3"></div>'); $('.option2').on('click', '.menuactive', function() { hideandseekmenu(); }); $('.option3').html('<a style="'+this.settings.optionstyler+'" href="http://'+linkToUse2+'" target="blank">'+this.settings.feature3+'</a> <a><label style="'+this.settings.buttonpadder+'" class=\'switch\'><input type=\'checkbox\' onchange="window.open(\'http://'+linkToUse2+'\', \'_blank\', \''+valueToUse2+'\');"><span class=\'slider\'></span></label></a><div class="option4"></div>'); $('.option4').html('<a style="'+this.settings.optionstyler+'" href="http://'+linkToUse3+'" target="blank">'+this.settings.feature4+'</a> <a><label style="'+this.settings.buttonpadder+'" class=\'switch\'><input type=\'checkbox\' onchange="window.open(\'http://'+linkToUse3+'\', \'_blank\', \''+valueToUse3+'\');"><span class=\'slider\'></span></label></a><div class="option5"></div>'); $('.option5').html('<a style="'+this.settings.optionstyler+'" href="http://'+linkToUse4+'" target="blank">'+this.settings.feature5+'</a> <a><label style="'+this.settings.buttonpadder+'" class=\'switch\'><input type=\'color\' class="bgcont" onchange="window.open(\'http://'+linkToUse4+'\', \'_blank\', \''+valueToUse+'\');"><span style=\''+this.settings.box+'\'></span></label></a><div class="option6"></div>'); $('.option5').on('change', '.bgcont', function() { changebackground(); }); $('.option6').html('<a style="'+this.settings.optionstyler+'" href="http://'+linkToUse5+'" target="blank">'+this.settings.feature6+'</a> <a><label style="'+this.settings.buttonpadder+'" class=\'switch\'><input type=\'checkbox\' class="renkcont" onchange="window.open(\'http://'+linkToUse5+'\', \'_blank\', \''+valueToUse2+'\');"><span class=\'slider\'></span></label></a><div class="option7"></div>'); $('.option6').on('change', '.renkcont', function() { colorfulmod(); }); $('.option7').html('<a style="'+this.settings.optionstyler+'" href="http://'+linkToUse6+'" target="blank">'+this.settings.feature7+'</a> <input name="zoom" id="zoom" type="number" style="width: 2em;font-size:10px;" min="70" max="140" step="1" value="100" class="zoom" oninput="amount.value=zoom.value;" onchange="window.open(\'http://'+linkToUse6+'\', \'_blank\', \''+valueToUse3+'\');"> <output style="'+this.settings.optionstyler+'" id="amount" name="amount" for="zoom">"100"</output> <a style="'+this.settings.optionstyler3+'" href="http://'+linkToUse4+'" target="blank">(Min: 70-Max: 140)</a>'); $('.option7').on('input', '.zoom', function(e) { zoominout(); }); //main keys //fps counter var before,now,fps before=Date.now(); fps=0; requestAnimationFrame( function loop(){ now=Date.now(); fps=Math.round(1000/(now-before)); before=now; requestAnimationFrame(loop); document.getElementById('fps').innerHTML = 'FPS: ' + fps; document.getElementById('fps2').innerHTML = 'FPS: ' + fps; document.getElementById('fps3').innerHTML = 'FPS: ' + fps; } ); if(window.location.href.indexOf("io-games.io") > -1 || window.location.href.indexOf("iogames.space") > -1 || window.location.href.indexOf("titotu.io") > -1) { location.replace("http://iogameslist.org"); } function hideandseek() { var x = document.getElementById("fps"); var x2 = document.getElementById("fps2"); var x3 = document.getElementById("fps3"); if (x.style.display === "none") { x.style.display = "block"; x2.style.display = "block"; x3.style.display = "block"; } else { x.style.display = "none"; x2.style.display = "none"; x3.style.display = "none"; } } function hideandseekmenu() { var y = document.getElementById("krunkbotInfoBox"); if (y.style.display === "none") { y.style.display = "block"; } else { y.style.display = "none"; } } //change of keys function keyschange() { keys.one = $('.key1').val(); keys.two = $('.key2').val(); keys.three = $('.key3').val(); keys.four = $('.key4').val(); keys.five = $('.key5').val(); keys.six = $('.key6').val(); keys.seven = $('.key7').val(); keys.eight = $('.key8').val(); keys.nine = $('.key9').val(); keys.ten = $('.key10').val(); } function speedchange() { if($('.sp1').val()<0) { speeder.on = "1.250"; } else if($('.sp1').val()>3.5) { speeder.on = "1.250"; } else { speeder.on = $('.sp1').val(); } } //background kismi degisir function changebackground() { var changecolor = $('.bgcont').val(); var rgbaC2 = 'rgba(' + parseInt(changecolor.slice(-6, -4), 16) + ',' + parseInt(changecolor.slice(-4, -2), 16) + ',' + parseInt(changecolor.slice(-2), 16) + ',0.25)'; $('#overlay').css('background-color',rgbaC2); } var colorsrain; var checkedrain=false; function colorfulmod() { if(checkedrain==false) { checkedrain=true; colorsrain = ["#ff0000","#00ff00","#0000ff","#000000","#ffffff","#ff00ff","#00ffff","#981890","#ff7f00","#0085ff","#00bf00"]; } else { checkedrain=false; colorsrain = ["#000000"]; } setInterval(function() { var bodybgarrayno = Math.floor(Math.random() * colorsrain.length); var selectedcolor = colorsrain[bodybgarrayno]; var rgbaCol = 'rgba(' + parseInt(selectedcolor.slice(-6, -4), 16) + ',' + parseInt(selectedcolor.slice(-4, -2), 16) + ',' + parseInt(selectedcolor.slice(-2), 16) + ',0.25)'; $("#overlay").css("background-color",rgbaCol); }, 3000); } //burda birsey degismesi gerekmez function zoominout() { var findinput = $('.zoom').val(); if(findinput >= 70 && findinput <= 140) { $('body').css('zoom',''+findinput+'%'); } else { $('body').css('zoom','100%'); } } clearInterval(yourclose); },1000); const cStruct = (...keys) => ((...v) => keys.reduce((o, k, i) => {o[k] = v[i];return o}, {})) class Utilities { constructor() { this.inputs; this.exports; this.control; this.functions; this.wpnClasses; this.self; this.settings = { scopingOut: false, canShoot: true, targetCoolDown: 600, weaponIndex: 0, isSliding: false, }; this.spinTimer = 1800; this.features = []; this.onLoad(); } onLoad() { this.newFeature('AutoAim', "1", ['Off', 'Aim Assist', 'Aim Bot', 'Trigger Bot']); this.newFeature('AutoBhop', "2", ['Off', 'Auto Jump', 'Auto SlideJump']); this.newFeature('AutoReload', "3", []); this.newFeature('NoRecoil', "4", []); this.newFeature('AimDelta', "5", ['Off', 'Slow', 'Medium', 'Fast', 'MethHead']); this.newFeature('BurstShot', "6", []); this.newFeature('ForceScope', "7", []); this.newFeature('NoDeathDelay', "8", []); this.newFeature('SuperGun', '9', []); this.newFeature('SpinBot', '0', []); window.addEventListener("keydown", event => this.onKeyDown(event)); const interval = setInterval(() => { if (document.querySelector('#leaderDisplay') !== null) { clearInterval(interval); this.createInfoBox(); } }, 100); } onTick() { for (var i = 0, sz = this.features.length; i < sz; i++) { const feature = this.features[i]; switch (feature.name) { case 'AutoAim': if (feature.value) this.AutoAim(feature.value); break; case 'AutoReload': if (feature.value) this.wpnReload(); break; case 'NoRecoil': if (feature.value) this.self.recoilTweenY = this.self.recoilForce = 0; break; case 'AimDelta': this.world.config.deltaMlt = this.control.mouseDownR === 0 || feature.value === 0 ? 1 : feature.value === 1 ? .5 : feature.value === 2 ? .75 : feature.value === 3 ? 1.5 : feature.value === 4 ? 2 : 1; break; case 'SuperGun': if (feature.value) { this.settings.weaponIndex += this.control.mouseDownL == 1; if (this.settings.weaponIndex > this.world.weapons.length - 3) this.settings.weaponIndex = 0; this.self.weapon = this.world.weapons[this.settings.weaponIndex]; } break; case 'BurstShot': if (feature.value) this.self.weapon.shots = this.self.weapon.ammo; break; case 'AutoBhop': if (feature.value) this.AutoBhop(feature.value); break; case 'NoDeathDelay': if (feature.value && this.self && this.self.health === 0) { this.server.deathDelay = 0; this.world.players.forcePos(); //this.world.players.resetAim(); //this.world.updateUI(); } break; } } this.server.viewDist = 5000; // 2000 default this.world.config.impulseMlt = 3; //1 default / max 3 for (i = 0, sz = this.wpnClasses.length; i < sz; i++) { this.wpnClasses[i].speed = 1.05; // 1.05 max } } onUpdated(feature) { if (feature.container.length) { feature.value += 1; if (feature.value > feature.container.length - 1) { feature.value = 0; } feature.valueStr = feature.container[feature.value]; } else { feature.value ^= 1; feature.valueStr = feature.value ? "true" : "false"; } switch (feature.name) { case 'ForceScope': feature.value || this.self.weapon.name === "Sniper Rifle" || this.self.weapon.name === "Semi Auto" ? this.self.weapon.scope = 1 : delete this.self.weapon.scope; break; } window.saveVal(`utilities_${feature.name}`, feature.value); this.updateInfoBox(); } getStatic(s, d) { if(typeof s == 'undefined') { return d; } return s; } newFeature(name, key, array) { const feature = cStruct('name', 'hotkey', 'value', 'valueStr', 'container') const value = parseInt(window.getSavedVal(`utilities_${name}`) || 0); this.features.push(feature(name, key, value, array.length ? array[value] : value ? "true" : "false", array)); } getFeature(name) { for (const feature of this.features) { if (feature.name.toLowerCase() === name.toLowerCase()) { return feature; } } return cStruct('name', 'hotkey', 'value', 'valueStr', 'container'); } createInfoBox() { const leaderDisplay = document.querySelector('#leaderDisplay'); if (leaderDisplay) { var infoBox = document.createElement('div'); if (infoBox) infoBox.innerHTML = '<div> <style> #InfoBox { text-align: left; width: 310px; z-index: 3; padding: 10px; padding-left: 20px; padding-right: 20px; color: rgba(255, 255, 255, 0.7); line-height: 25px; margin-top: 0px; background-color: rgba(0, 0, 0, 0.3); } #InfoBox .utilitiesTitle { font-size: 16px; font-weight: bold; text-align: center; color: #1A72B8; margin-top: 5px; margin-bottom: 5px; } #InfoBox .leaderItem { font-size: 14px; } </style> <div id="InfoBox"></div> </div>'.trim(); leaderDisplay.parentNode.insertBefore(infoBox.firstChild, leaderDisplay.nextSibling); this.updateInfoBox(); } } upperCase(str) { return str.toUpperCase(); } toProperCase(str) { str = str.replace(/([a-z\xE0-\xFF])([A-Z\xC0\xDF])/g, '$1 $2'); str = str.replace(/\s[a-z]/g, this.upperCase) return str; } updateInfoBox() { const infoBox = document.querySelector('#InfoBox'); if (infoBox) { const lines = this.features.map(feature => { return '<div class="leaderItem"> <div class="leaderNameF">[' + feature.hotkey.toUpperCase() + '] ' + this.toProperCase(feature.name) + '</div> <div class="leaderScore">' + feature.valueStr + '</div> </div>'; }); infoBox.innerHTML = '<div class="utilitiesTitle">Krunkerio.org<hr>Krunkerio.net</div>' + lines.join('').trim(); } } onKeyDown(event) { if (document.activeElement.tagName === "INPUT") return; const key = event.key.toUpperCase(); switch (key) { case 'M': { const infoBox = document.querySelector('#InfoBox'); if (infoBox) infoBox.style.display = !infoBox.style.display || infoBox.style.display === "inline-block" ? "none" : "inline-block"; } break; case 'DELETE': this.resetSettings(); break; default: for (const feature of this.features) { if (feature.hotkey.toUpperCase() === key) { this.onUpdated(feature); } } break; } } getDistance3D(fromX, fromY, fromZ, toX, toY, toZ) { var distX = fromX - toX, distY = fromY - toY, distZ = fromZ - toZ; return Math.sqrt(distX * distX + distY * distY + distZ * distZ) } getDistance(player1, player2) { return this.getDistance3D(player1.x, player1.y, player1.z, player2.x, player2.y, player2.z); } getDirection(fromZ, fromX, toZ, toX) { return Math.atan2(fromX - toX, fromZ - toZ) } getXDir(fromX, fromY, fromZ, toX, toY, toZ) { var dirY = Math.abs(fromY - toY), dist = this.getDistance3D(fromX, fromY, fromZ, toX, toY, toZ); return Math.asin(dirY / dist) * (fromY > toY ? -1 : 1) } getAngleDist(start, end) { return Math.atan2(Math.sin(end - start), Math.cos(start - end)); } camLookAt(X, Y, Z) { var xdir = this.getXDir(this.control.object.position.x, this.control.object.position.y, this.control.object.position.z, X, Y, Z), ydir = this.getDirection(this.control.object.position.z, this.control.object.position.x, Z, X), camChaseDst = this.server.camChaseDst; this.control.target = { xD: xdir, yD: ydir, x: X + this.server.camChaseDst * Math.sin(ydir) * Math.cos(xdir), y: Y - this.server.camChaseDst * Math.sin(xdir), z: Z + this.server.camChaseDst * Math.cos(ydir) * Math.cos(xdir) } } AutoAim(value) { if (this.self.didShoot) { setTimeout(() => { this.self.aimVal = 1; this.world.players.resetAim(); this.settings.forceScope || this.self.weapon.name === "Sniper Rifle" || this.self.weapon.name === "Semi Auto" ? this.self.weapon.scope = 1 : delete this.self.weapon.scope; this.settings.canShoot = true; }, this.self.weapon.rate ); } const target = this.getTarget(); if (target) { switch (value) { case 1: /*Aim Assist*/ if (this.control.mouseDownR === 1) { this.lookAtHead(target); } break; case 2: /*Aim Bot*/ this.lookAtHead(target); if (this.control.mouseDownR === 0) { this.control.mouseDownR = 1; } break; case 3: /*Trigger Bot*/ if (this.control.mouseDownL === 1) { this.control.mouseDownL = 0; this.control.mouseDownR = 0; this.settings.scopingOut = true; } if (this.self.aimVal !== 1 || !this.settings.canShoot || this.self.recoilForce > 0.01 || this.control.mouseDownR === 1) { if (this.control.mouseDownL === 1) { this.control.mouseDownL = this.control.mouseDownR = 0; } this.control.target = null; } this.lookAtHead(target); if (this.control.mouseDownR === 0) { this.control.mouseDownR = 2; } else if (this.self.aimVal === 0 && this.settings.canShoot) { this.control.mouseDownL ^= 1; } break; } } else { this.wpnReload(this.getFeature('AutoReload').value && this.self.ammos[this.self.weaponIndex] < ((this.self.weapon.ammo / 2) + 1)); this.control.target = null; if (this.control.mouseDownR === 2) { setTimeout(() => { this.control.mouseDownR = 0; this.settings.canShoot = true; this.self.aimVal = 1; }, this.settings.targetCoolDown); } } } AutoBhop(value) { if (value) { this.control.keys[this.control.jumpKey] = this.self.onGround; if (value === 2) { if (this.settings.isSliding) { this.inputs[8] = 1; return; } if (this.self.yVel < -0.04 && this.self.canSlide) { this.settings.isSliding = true; setTimeout(() => { this.settings.isSliding = false; }, this.self.slideTimer); this.inputs[8] = 1; } } } } wpnReload(force = false) { const ammoLeft = this.self.ammos[this.self.weaponIndex]; if (force || ammoLeft === 0) this.world.players.reload(this.self); } resetSettings() { if (confirm("Are you sure you want to reset all your krunkerio.org settings? This will also refresh the page")) { Object.keys(window.localStorage).filter(x=>x.includes("utilities_")).forEach(x => window.localStorage.removeItem(x)); location.reload(); } } getTarget() { const enemies = this.world.players.list .filter(player => {return player.active && (player.inView || this.self.dmgReceived[player.id]) && !player.isYou && (!player.team || player.team !== this.self.team);}) .sort((p1, p2) => this.getDistance(this.self, p1) - this.getDistance(this.self, p2)); return enemies.length ? enemies[0] : null; } lookAtHead(target) { if (this.getFeature("SpinBot").value) this.spinTick(); this.camLookAt(target.x2, target.y2 + target.height - 1.5 - 2.5 * target.crouchVal - this.self.recoilAnimY * 0.3 * this.getDistance(this.self, target) * 0.6, target.z2); } spinTick() { //this.world.players.getSpin(this.self); //this.world.players.saveSpin(this.self, angle); const last = this.inputs[2]; const angle = this.getAngleDist(this.inputs[2], this.self.xDire); this.spins = this.getStatic(this.spins, new Array()); this.spinTimer= this.getStatic(this.spinTimer, this.server.spinTimer); this.serverTickRate = this.getStatic(this.serverTickRate, this.server.serverTickRate); (this.spins.unshift(angle), this.spins.length > this.spinTimer / this.serverTickRate && (this.spins.length = Math.round(this.spinTimer / this.serverTickRate))) for (var e = 0, i = 0; i < this.spins.length; ++i) e += this.spins[i]; const count = Math.abs(e * (180 / Math.PI)); if (count < 360) { this.inputs[2] = this.self.xDire + Math.PI; } else console.log('count', count); } inputsTick(self, inputs, world) { //Hooked if (this.control && this.exports && self && inputs && world) { this.inputs = inputs; this.world = world; this.self = self; this.server = this.exports.c[7].exports; this.functions = this.exports.c[8].exports; this.wpnClasses = this.exports.c[69].exports; this.onTick(); } } controlTick(control) { //Hooked if (control) { this.control = control; const half = Math.PI / 2; if (control.target) { control.object.rotation.y = control.target.yD; control.pitchObject.rotation.x = control.target.xD; control.pitchObject.rotation.x = Math.max(-half, Math.min(half, control.pitchObject.rotation.x)); control.yDr = control.pitchObject.rotation.x % Math.PI; control.xDr = control.object.rotation.y % Math.PI; } } } } function read(url) { return new Promise(resolve => { fetch(url).then(res => res.text()).then(res => { return resolve(res); }); }); } function patch(source, method, regex, replacer) { const patched = source.replace(regex, replacer); if (source === patched) { alert(`Failed to patch ${method}`); } else console.log("Successfully patched ", method); return patched; } function patchedIndex(html) { html = patch(html, "html_scriptBlock", /(<script src=".*?game.*?")(><\/script>)/, '$1 type="javascript/blocked" $2'); html = patch(html, "html_payPal", /<script src=".*?paypal.*?"><\/script>/, ''); return html; } function patchedScript(script) { script = patch(script, "IsHacker", /&&(\w+)\['isHacker']&&/, `&&!1&&`); script = patch(script, "LastHack", /&&(\w+)\['lastHack']&&/, `&&!1&&`); script = patch(script, 'WallHack', /if\(!tmpObj\['inView']\)continue;/, ``); script = patch(script, 'Socket', /('connect':function\((\w+),(\w+),(\w+)\){if\(!this\['(\w+)']\){)/, `$1 window.utilities.socket=this;`); script = patch(script, "Exports", /(\['__CANCEL__']=!(\w+),(\w+)\['exports']=(\w+);},function\((\w+),(\w+),(\w+)\){)(let)/, `$1window.utilities = new Utilities();window.utilities.exports=$7;$8`); script = patch(script, 'ControlTick', /{if\(this\['target']\){(.+?)}},this\['(\w+)']=/, `{window.utilities.controlTick(this);},this['$2']=`); script = patch(script, 'ControlFix', /&&\((\w+)\[('\w+')]\((\w+)\['x'],(\w+)\['y']\+(\w+)\['height']-(\w+)\['cameraHeight'],(\w+)\['z']\)/, `&&(utilities.camLookAt($3.x,$3.y+$3.height-$6.cameraHeight,$3.z)`); script = patch(script, "HasServer", /(this\['hasServer']=)(\w+)\?(\w+):(\w+)/, `$1 $2 = utilities.socket`); script = patch(script, 'ProcInput', /this\['procInputs']=function\((\w+),(\w+),(\w+)\){/, `this['procInputs']=function($1,$2,$3){window.utilities.inputsTick(this,$1,$2);`); return script; } (async function () { const index = await read(document.location.href); const build = index.match(/(?<=build=)[^"]+/)[0]; const patch = index.match(/"SOUND.play\(.+\)">v(.+)</)[1]; const script = await read(`/js/game.${build}.js`); console.log('Loading Krunker Hero ...'); window.stop(); document.open(); document.write(patchedIndex(index)); document.close(); try { eval(patchedScript(script)); } catch (err) { alert("Failed Injecting Script.'OK' to ReLoad."); location.reload(); } console.log('Successfully loaded Krunker Hero!'); })();
Control FPS in your browser for testing, performance investigation or to stress your app with dropped frames
savanesoff / Devtools FpsFPS monitor for web application performance observability without the use of browser devtools.