try{unsafeWindow.console.warn("DANGER: This userscript is using unsafeWindow. Unsafe websites could potentially use this to gain access to data and other content that the browser normally wouldn't allow!"),Object.defineProperty(window,"clientWindow",{value:unsafeWindow})}catch{Object.defineProperty(window,"clientWindow",{value:window})}(function(){try{returndocument.createEvent("TouchEvent"),!0}catch(A){return!1}})()||alert("WARNING: This script was created for mobile, and may break functionality in non-mobile browsers!"),clientWindow.crouchLock=!1,clientWindow.sprintLock=!1,clientWindow.keyboardFix=!1,clientWindow.inputFix=!1,clientWindow.blockNextInput=!1,clientWindow.hiddenInputFocused=!1;varA=null,I=null,g=null;String.prototype.toKeyCode=function(){return{0:48,1:49,2:50,3:51,4:52,5:53,6:54,7:55,8:56,9:57,backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,pause_break:19,caps_lock:20,escape:27," ":32,page_up:33,page_down:34,end:35,home:36,left_arrow:37,up_arrow:38,right_arrow:39,down_arrow:40,insert:45,delete:46,a:65,b:66,c:67,d:68,e:69,f:70,g:71,h:72,i:73,j:74,k:75,l:76,m:77,n:78,o:79,p:80,q:81,r:82,s:83,t:84,u:85,v:86,w:87,x:88,y:89,z:90,left_window_key:91,right_window_key:92,select_key:93,numpad_0:96,numpad_1:97,numpad_2:98,numpad_3:99,numpad_4:100,numpad_5:101,numpad_6:102,numpad_7:103,numpad_8:104,numpad_9:105,"*":106,"+":107,"-":109,".":110,"/":111,f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123,num_lock:144,scroll_lock:145,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,'"':222}[this]};consti=EventTarget.prototype.addEventListener;Object.defineProperty(EventTarget.prototype,"addEventListener",{value:function(A,I,...g){"keydown"==A?i.call(this,A,(function(...A){if(A[0].isValid||!clientWindow.keyboardFix)returnI.apply(this,A)}),...g):i.call(this,A,I,...g)}});conste=Event.prototype.preventDefault;functionC(A,I){constg=A.toKeyCode();leti=newKeyboardEvent(I,{key:A,keyCode:g,which:g});i.isValid=!0,clientWindow.dispatchEvent(i)}functiont(A,I,g){g.dispatchEvent(newPointerEvent(I,{button:A}))}functionG(A,I){A.dispatchEvent(newWheelEvent("wheel",{wheelDeltaY:I}))}functiond(A){letI=document.getElementById("inGameStyle"),g=document.getElementById("inMenuStyle");I.disabled=A,g.disabled=!A}Event.prototype.preventDefault=function(A){("hiddenInput"!=document.activeElement.id||A)&&(this._preventDefault=e,this._preventDefault())},clientWindow.fakelock=null,Object.defineProperty(Element.prototype,"requestPointerLock",{value:function(){returnclientWindow.fakelock=this,document.dispatchEvent(newEvent("pointerlockchange")),d(!0),!0}}),Object.defineProperty(Document.prototype,"pointerLockElement",{get:function(){returnclientWindow.fakelock}}),Object.defineProperty(Document.prototype,"exitPointerLock",{value:function(){returnclientWindow.fakelock=null,document.dispatchEvent(newEvent("pointerlockchange")),d(!1),!0}}),clientWindow.fakefull=null,Object.defineProperty(Element.prototype,"requestFullscreen",{value:function(){returnclientWindow.fakefull=this,document.dispatchEvent(newEvent("fullscreenchange")),!0}}),Object.defineProperty(document,"fullscreenElement",{get:function(){returnclientWindow.fakefull}}),Object.defineProperty(Document.prototype,"exitFullscreen",{value:function(){returnclientWindow.fakefull=null,document.dispatchEvent(newEvent("fullscreenchange")),!0}});constc=document.createElement;document.createElement=function(A,I){this._createElement=c;varg=this._createElement(A);return"input"!=A||I||(document.querySelectorAll("#fileUpload").forEach((A=>A.parentNode.removeChild(A))),g.id="fileUpload",g.addEventListener("change",(function(A){g.hidden=!0,g.style.display="none"}),{passive:!1,once:!0}),clientWindow.addEventListener("focus",(function(A){setTimeout((()=>{g.hidden=!0,g.style.display="none"}),300)}),{once:!0}),document.body.appendChild(g)),g};letn=document.createElement("style");n.id="inGameStyle",n.textContent="\n.inGame {\ndisplay: none;\n}",document.documentElement.appendChild(n);leto=document.createElement("style");f