Vanis.io Extended

Vanis.io MOD

当前为 2020-08-30 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Vanis.io Extended
  3. // @namespace Vez's Vanis.io mod
  4. // @version 1.2
  5. // @description Vanis.io MOD
  6. // @author vez#0020
  7. // @match https://vanis.io/
  8. // @grant none
  9. // @connect https://raw.githubusercontent.com
  10. // @resource https://raw.githubusercontent.com/taufik-nurrohman/color-picker/master/color-picker.min.css
  11. // @run-at document-end
  12. // ==/UserScript==
  13.  
  14. const VEX = `
  15. <style>
  16.  
  17. .vex {
  18.  
  19. width : 350px;
  20. height: 800px;
  21.  
  22. position: fixed;
  23. top: calc(50% - 400px);
  24. right: -325px;
  25.  
  26. display: flex;
  27. flex-wrap : wrap;
  28. justify-content: center;
  29.  
  30. background: rgba(30, 30, 30, .75);
  31.  
  32. box-shadow: 0 0 4px 2px #000;
  33.  
  34. font-family : Monospace;
  35.  
  36. z-index: 9999;
  37. }
  38.  
  39. .vex-button {
  40.  
  41. background: rgba(30, 30, 30, .75);
  42.  
  43. margin-left: 5px;
  44.  
  45. box-shadow: 0 0 1px 1px #000;
  46. border: 0px;
  47. outline: none;
  48.  
  49. color: #ffffff;
  50. }
  51.  
  52. .vex-button:hover {
  53.  
  54. color: tomato;
  55. }
  56.  
  57. .vex > .vex-hud {
  58.  
  59. width: 90%;
  60.  
  61. display : flex;
  62. flex-wrap: wrap;
  63. justify-content: center;
  64. }
  65.  
  66. .vex > .vex-hud > p {
  67.  
  68. width: 100%;
  69. text-align: center;
  70.  
  71. color : white;
  72. }
  73. .vex > .vex-hud > input {
  74.  
  75. width: 100%;
  76.  
  77. background : rgba(30, 30, 30, .65);
  78. border: 1px solid rgba(30, 30, 30, 1);
  79.  
  80. text-align: center;
  81. color: #ffffff;
  82.  
  83. outline : 0;
  84. box-shadow: none;
  85. }
  86.  
  87. .vex > .vex-skins {
  88.  
  89. width: 90%;
  90.  
  91. display : flex;
  92. flex-wrap: wrap;
  93. justify-content: center;
  94. }
  95.  
  96. .vex > .vex-skins > .vex-skins-item {
  97.  
  98. width: 100%;
  99. }
  100. .vex > .vex-skins > .vex-skins-item > p {
  101.  
  102. width: 100%;
  103. text-align: center;
  104.  
  105. color : white;
  106. }
  107.  
  108. .vex > .vex-skins > .vex-skins-item > input {
  109.  
  110. width: 100%;
  111.  
  112. background : rgba(30, 30, 30, .65);
  113. border: 1px solid rgba(30, 30, 30, 1);
  114.  
  115. text-align: center;
  116. color: #ffffff;
  117.  
  118. outline : 0;
  119. box-shadow: none;
  120. }
  121.  
  122. .vex > .vex-controls {
  123.  
  124. width: 90%;
  125.  
  126. display : flex;
  127. flex-wrap: wrap;
  128. justify-content: center;
  129. }
  130.  
  131. .vex > .vex-controls > p {
  132.  
  133. width: 100%;
  134. text-align: center;
  135.  
  136. color : white;
  137. }
  138.  
  139. .vex > .vex-controls > button {
  140.  
  141. width: 50%;
  142.  
  143. background : rgba(30, 30, 30, .65);
  144. border: 1px solid rgba(30, 30, 30, 1);
  145.  
  146. text-align: center;
  147. color: #ffffff;
  148.  
  149. outline : 0;
  150. box-shadow: none;
  151. }
  152.  
  153. #vex-r-start {}
  154. #vex-r-start.active {
  155.  
  156. color: lime;
  157. }
  158. #vex-r-start:hover {
  159.  
  160. color: lime;
  161. }
  162.  
  163. #vex-r-stop {}
  164. #vex-r-stop.active {
  165.  
  166. color: tomato;
  167. }
  168. #vex-r-stop:hover {
  169.  
  170. color: tomato;
  171. }
  172.  
  173. .vex > .vex-extras {
  174.  
  175. width: 90%;
  176.  
  177. display : flex;
  178. flex-wrap: wrap;
  179. justify-content: center;
  180.  
  181. text-align: center;
  182. color: white;
  183. }
  184. .vex > .vex-extras > .vex-extras-item {
  185.  
  186. width: 100%;
  187. height: 20px;
  188.  
  189. display: inline-flex;
  190.  
  191. overflow: hidden;
  192. }
  193. .vex > .vex-extras > .vex-extras-item > p {
  194.  
  195. width: 80%;
  196.  
  197. margin: 0px;
  198. text-aligasd
  199. color : white;
  200. }
  201.  
  202. .vex > .vex-extras > .vex-extras-item > input {
  203.  
  204. margin-left: 10px;
  205.  
  206. background : rgba(30, 30, 30, .65);
  207. border: 1px solid rgba(30, 30, 30, 1);
  208.  
  209. text-align: center;
  210. color: #ffffff;
  211.  
  212. outline : 0;
  213. box-shadow: none;
  214. }
  215.  
  216. .vex > .vex-binds {
  217.  
  218. width: 90%;
  219.  
  220. display : flex;
  221. flex-wrap: wrap;
  222. justify-content: center;
  223.  
  224. text-align: center;
  225. color: white;
  226. }
  227. .vex > .vex-binds > .vex-binds-item {
  228.  
  229. width: 100%;
  230. height: 20px;
  231.  
  232. display: inline-flex;
  233.  
  234. overflow: hidden;
  235. }
  236.  
  237. .vex > .vex-binds > .vex-binds-item > p {
  238.  
  239. width: 80%;
  240.  
  241. margin: 0px;
  242. text-align: center;
  243.  
  244. color : white;
  245. }
  246.  
  247. .vex > .vex-binds > .vex-binds-item > input {
  248.  
  249. background : rgba(30, 30, 30, .65);
  250. border: 1px solid rgba(30, 30, 30, 1);
  251.  
  252. text-align: center;
  253. color: #ffffff;
  254.  
  255. outline : 0;
  256. box-shadow: none;
  257. }
  258. </style>
  259.  
  260. <div class="vex">
  261. <div class="vex-hud">
  262. <p>HUD COLOR</p>
  263. <input id="vex-hc" type="text" placeholder="HEX code | Example: #101011">
  264. </div>
  265.  
  266. <div class="vex-skins">
  267.  
  268. <div class="vex-skins-item">
  269. <p>SKIN_1</p>
  270. <input id="vex-s1" type="text" placeholder="SKIN_URL">
  271. </div>
  272.  
  273. <div class="vex-skins-item">
  274. <p>SKIN_2</p>
  275. <input id="vex-s2" type="text" placeholder="SKIN_URL">
  276. </div>
  277. <div class="vex-skins-item">
  278. <p>SKIN_3</p>
  279. <input id="vex-s3" type="text" placeholder="SKIN_URL">
  280. </div>
  281.  
  282. <div class="vex-skins-item">
  283. <p>SKIN_4</p>
  284. <input id="vex-s4" type="text" placeholder="SKIN_URL">
  285. </div>
  286. </div>
  287.  
  288. <div class="vex-controls">
  289.  
  290. <p>SKIN ROTATOR</p>
  291. <button id="vex-r-start">START</button>
  292. <button id="vex-r-stop">STOP</button>
  293. </div>
  294.  
  295. <div class="vex-extras">
  296. <p>EXTRAS</p>
  297. <div class="vex-extras-item">
  298. <p>AUTO_RESPAWN</p>
  299. <input id="vex-e-ar" type="checkbox">
  300. </div>
  301.  
  302. <div class="vex-extras-item">
  303. <p>SKIP_STATS</p>
  304. <input id="vex-e-ss" type="checkbox">
  305. </div>
  306.  
  307. </div>
  308.  
  309. <div class="credits">
  310.  
  311. <p>Credits</p>
  312. <p>Created by Vez#0020</p>
  313. </div>
  314. </div>
  315.  
  316. <div class="discord">
  317.  
  318. <p>Discord:</p>
  319. <p>https://discord.gg/gNnFvV9</p>
  320. </div>
  321. </div>
  322. </div>
  323.  
  324.  
  325. </div>
  326. `;
  327.  
  328. const VEX_BTN = `
  329.  
  330. <button onclick="window.VEX_OVERLAY_TOGGLE()" <i class="fa fa-gear " style="font-size:12px">SETTINGS</i></button>
  331. `;
  332.  
  333. document.querySelectorAll("#vanis-io_300x250")[0].innerHTML += VEX;
  334. document.querySelectorAll(".social-container")[0].innerHTML += VEX_BTN;
  335.  
  336. setTimeout(()=>{
  337.  
  338. window._$ = selector => {
  339.  
  340. const nodes = document.querySelectorAll(selector);
  341.  
  342. return nodes.length == 1 ? nodes[0] : nodes;
  343. }
  344.  
  345. window.VEX_PLAYER_SOCKET = null;
  346. window.VEX_PLAYER_X = 0;
  347. window.VEX_PLAYER_Y = 0;
  348.  
  349. window.VEX_PLAYER_PACKET_SPAWN = [];
  350.  
  351. window.VEX_PLAYER_SPAWN = () => {
  352.  
  353. window.VEX_PLAYER_SOCKET._send(window.VEX_PLAYER_PACKET_SPAWN);
  354. };
  355.  
  356. window.VEX_PLAYER_MOVETO_X = 0;
  357. window.VEX_PLAYER_MOVETO_Y = 0;
  358.  
  359. window.VEX_PLAYER_MOVE_STOP = false;
  360. window.VEX_PLAYER_MOVE_TO = false;
  361.  
  362. window.VEX_PLAYER_MOVETO = (x,y) => {
  363.  
  364. const packet = new DataView(new ArrayBuffer(9));
  365. packet.setUint8(0, 16);
  366. packet.setInt32(1, x, true);
  367. packet.setInt32(5, y, true);
  368.  
  369. window.VEX_PLAYER_SOCKET._send(packet);
  370. }
  371.  
  372. window.VEX_PLAYER_SPLIT = () => {
  373.  
  374. const packet = new DataView(new ArrayBuffer(2));
  375. packet.setUint8(0, 17);
  376. packet.setUint8(1, window.VEX_PLAYER_X);
  377.  
  378. window.VEX_PLAYER_SOCKET._send(packet);
  379. }
  380.  
  381. window.VEX_OVERLAY_TOGGLE = () => {
  382.  
  383. const state = (VEX_DOM_OVERLAY.style.right == "-325px") ? false : true;
  384.  
  385. if(state){
  386.  
  387. VEX_OVERLAY_HIDE();
  388. return;
  389. }
  390.  
  391. VEX_OVERLAY_SHOW();
  392. };
  393.  
  394. let VEX_HUD_COLOR = "";
  395.  
  396. let VEX_SKIN1 = "";
  397. let VEX_SKIN2 = "";
  398. let VEX_SKIN3 = "";
  399. let VEX_SKIN4 = "";
  400.  
  401. let VEX_ROTATOR_STATE = false;
  402. const VEX_ROTATOR_DELAY = 1000;
  403.  
  404. let VEX_EXTRAS_AR = false;
  405. let VEX_EXTRAS_AR_INTERVAL = null;
  406.  
  407. let VEX_EXTRAS_SS = false;
  408. let VEX_EXTRAS_SS_INTERVAL = null;
  409.  
  410. const VEX_DOM_OVERLAY = _$(".vex");
  411.  
  412. const VEX_DOM_HC = _$("#vex-hc");
  413.  
  414. const VEX_DOM_SKIN_INPUT = _$("#skinurl");
  415. const VEX_DOM_SKIN1 = _$("#vex-s1");
  416. const VEX_DOM_SKIN2 = _$("#vex-s2");
  417. const VEX_DOM_SKIN3 = _$("#vex-s3");
  418. const VEX_DOM_SKIN4 = _$("#vex-s4");
  419.  
  420. const VEX_DOM_ROTATOR_START = _$("#vex-r-start");
  421. const VEX_DOM_ROTATOR_STOP = _$("#vex-r-stop");
  422.  
  423. const VEX_DOM_EXTRAS_AR = _$("#vex-e-ar");
  424. const VEX_DOM_EXTRAS_SS = _$("#vex-e-ss");
  425.  
  426. const VEX_HUD_COLOR_FUNC = () => {
  427.  
  428. for(const element of _$(".fade"))
  429. element.style.background = VEX_HUD_COLOR;
  430.  
  431. _$("#overlay").style.background = "radial-gradient("+VEX_HUD_COLOR+" 300px,"+VEX_HUD_COLOR+")";
  432. _$(".vex").style.background = VEX_HUD_COLOR;
  433.  
  434. if(_$(".discord").length !== 0)
  435. _$(".discord").style.background = VEX_HUD_COLOR;
  436.  
  437. //_$(".vex").style.boxShadow = "0 0 4px 2px " + VEX_HUD_COLOR;
  438. _$(".vex-button").style.background = VEX_HUD_COLOR;
  439.  
  440. if(_$(".progress-bar").length !== 0)
  441. _$(".progress-bar").style.background = `repeating-linear-gradient(-45deg,${VEX_HUD_COLOR},${VEX_HUD_COLOR} 40px,#1e1e1e 0,#1e1e1e 80px)`
  442.  
  443. if(_$(".fade-box")[0])
  444. _$(".fade-box")[0].style.background = VEX_HUD_COLOR;
  445.  
  446. if(_$(".fade-box")[1])
  447. _$(".fade-box")[1].style.background = VEX_HUD_COLOR;
  448. };
  449.  
  450. let VEX_ROTATOR_INTERVAL = null;
  451. let VEX_ROTATOR_CURRENT = 1;
  452.  
  453. const VEX_ROTATOR_FUNC_NEXT = () => {
  454.  
  455. if(VEX_ROTATOR_CURRENT < 5)
  456. VEX_ROTATOR_CURRENT += 1;
  457.  
  458. if(VEX_ROTATOR_CURRENT == 5)
  459. VEX_ROTATOR_CURRENT = 1;
  460.  
  461. VEX_DOM_SKIN_INPUT.value = localStorage.getItem("vex-s"+VEX_ROTATOR_CURRENT);
  462. };
  463.  
  464. const VEX_ROTATOR_FUNC_PREV = () => {
  465.  
  466. if(VEX_ROTATOR_CURRENT < 5)
  467. VEX_ROTATOR_CURRENT -= 1;
  468.  
  469. if(VEX_ROTATOR_CURRENT == 0)
  470. VEX_ROTATOR_CURRENT = 1;
  471.  
  472. VEX_DOM_SKIN_INPUT.value = localStorage.getItem("vex-s"+VEX_ROTATOR_CURRENT);
  473. };
  474.  
  475. const VEX_OVERLAY_SHOW = () => {
  476.  
  477. VEX_DOM_OVERLAY.style.right = "0px";
  478. };
  479.  
  480. const VEX_OVERLAY_HIDE = () => {
  481.  
  482. VEX_DOM_OVERLAY.style.right = "-325px";
  483. };
  484.  
  485. // VEX_DOM_OVERLAY.addEventListener('mouseenter', event => {
  486.  
  487. // VEX_OVERLAY_SHOW();
  488. // }, false);
  489.  
  490. // VEX_DOM_OVERLAY.addEventListener('mouseleave', event => {
  491.  
  492. // VEX_OVERLAY_HIDE();
  493. // }, false);
  494.  
  495. VEX_DOM_HC.addEventListener("change", event => {
  496.  
  497. if(event.target.value == localStorage.getItem("vex-hc"))
  498. return;
  499.  
  500. localStorage.setItem("vex-hc", event.target.value);
  501.  
  502. VEX_HUD_COLOR = localStorage.getItem("vex-hc");
  503.  
  504. VEX_HUD_COLOR_FUNC();
  505. }, false)
  506.  
  507. VEX_DOM_SKIN1.addEventListener("change", event => {
  508.  
  509. if(event.target.value == localStorage.getItem("vex-s1"))
  510. return;
  511.  
  512. localStorage.setItem("vex-s1", event.target.value);
  513.  
  514. VEX_SKIN1 = localStorage.getItem("vex-s1");
  515. }, false)
  516.  
  517. VEX_DOM_SKIN2.addEventListener("change", event => {
  518.  
  519. if(event.target.value == localStorage.getItem("vex-s1"))
  520. return;
  521.  
  522. localStorage.setItem("vex-s2", event.target.value);
  523.  
  524. VEX_SKIN2 = localStorage.getItem("vex-s2");
  525. }, false)
  526.  
  527. VEX_DOM_SKIN3.addEventListener("change", event => {
  528.  
  529. if(event.target.value == localStorage.getItem("vex-s1"))
  530. return;
  531.  
  532. localStorage.setItem("vex-s3", event.target.value);
  533.  
  534. VEX_SKIN3 = localStorage.getItem("vex-s3");
  535. }, false)
  536.  
  537. VEX_DOM_SKIN4.addEventListener("change", event => {
  538.  
  539. if(event.target.value == localStorage.getItem("vex-s1"))
  540. return;
  541.  
  542. localStorage.setItem("vex-s4", event.target.value);
  543.  
  544. VEX_SKIN4 = localStorage.getItem("vex-s4");
  545. }, false)
  546.  
  547. VEX_DOM_ROTATOR_START.addEventListener('click', event => {
  548.  
  549. VEX_ROTATOR_STATE = true;
  550.  
  551. VEX_DOM_ROTATOR_STOP.className = "";
  552. event.target.className += " active";
  553.  
  554. VEX_ROTATOR_CURRENT = 1;
  555. VEX_ROTATOR_INTERVAL = setInterval(VEX_ROTATOR_FUNC_NEXT, VEX_ROTATOR_DELAY);
  556. }, false);
  557.  
  558. VEX_DOM_ROTATOR_STOP.addEventListener('click', event => {
  559.  
  560. VEX_ROTATOR_STATE = false;
  561.  
  562. VEX_DOM_ROTATOR_START.className = "";
  563. event.target.className += " active";
  564.  
  565. VEX_ROTATOR_CURRENT = 1;
  566. clearInterval(VEX_ROTATOR_INTERVAL);
  567. }, false);
  568.  
  569.  
  570. VEX_DOM_EXTRAS_AR.addEventListener('change', event => {
  571.  
  572. const state = event.target.checked;
  573.  
  574. if(state == true){
  575.  
  576. if(VEX_DOM_EXTRAS_SS.checked == true)
  577. VEX_DOM_EXTRAS_SS.click();
  578.  
  579. VEX_EXTRAS_AR_INTERVAL = setInterval(()=>{
  580.  
  581. if(_$(".container")[2].style.display != "none"){
  582.  
  583. if(_$("button.continue").length === undefined && _$("button.continue").length !== 0){
  584.  
  585. _$("button.continue").click();
  586. _$("#overlay").style.display = "none";
  587.  
  588. _$("#overlay").dispatchEvent(new KeyboardEvent("keydown",{
  589.  
  590. altKey: false,
  591. bubbles: true,
  592. cancelBubble: false,
  593. cancelable: true,
  594. charCode: 0,
  595. code: "Escape",
  596. composed: true,
  597. ctrlKey: false,
  598. currentTarget: null,
  599. defaultPrevented: false,
  600. detail: 0,
  601. eventPhase: 0,
  602. isComposing: false,
  603. isTrusted: true,
  604. key: "Escape",
  605. keyCode: 27,
  606. location: 0,
  607. metaKey: false,
  608. path: [document.body, document, document, window],
  609. repeat: false,
  610. returnValue: true,
  611. shiftKey: false,
  612. sourceCapabilities: new InputDeviceCapabilities({firesTouchEvents: false}),
  613. srcElement: document.body,
  614. target: document.body,
  615. type: "keydown",
  616. view: window,
  617. which: 27
  618. }));
  619. _$("canvas#canvas").dispatchEvent(new KeyboardEvent("keydown",{
  620.  
  621. altKey: false,
  622. bubbles: true,
  623. cancelBubble: false,
  624. cancelable: true,
  625. charCode: 0,
  626. code: "Escape",
  627. composed: true,
  628. ctrlKey: false,
  629. currentTarget: null,
  630. defaultPrevented: false,
  631. detail: 0,
  632. eventPhase: 0,
  633. isComposing: false,
  634. isTrusted: true,
  635. key: "Escape",
  636. keyCode: 27,
  637. location: 0,
  638. metaKey: false,
  639. path: [document.body, document, document, window],
  640. repeat: false,
  641. returnValue: true,
  642. shiftKey: false,
  643. sourceCapabilities: new InputDeviceCapabilities({firesTouchEvents: false}),
  644. srcElement: document.body,
  645. target: document.body,
  646. type: "keydown",
  647. view: window,
  648. which: 27
  649. }))
  650.  
  651. _$("#overlay").dispatchEvent(new KeyboardEvent("keyup",{
  652.  
  653. altKey: false,
  654. bubbles: true,
  655. cancelBubble: false,
  656. cancelable: true,
  657. charCode: 0,
  658. code: "Escape",
  659. composed: true,
  660. ctrlKey: false,
  661. currentTarget: null,
  662. defaultPrevented: false,
  663. detail: 0,
  664. eventPhase: 0,
  665. isComposing: false,
  666. isTrusted: true,
  667. key: "Escape",
  668. keyCode: 27,
  669. location: 0,
  670. metaKey: false,
  671. path: [document.body, document, document, window],
  672. repeat: false,
  673. returnValue: true,
  674. shiftKey: false,
  675. sourceCapabilities: new InputDeviceCapabilities({firesTouchEvents: false}),
  676. srcElement: document.body,
  677. target: document.body,
  678. type: "keydown",
  679. view: window,
  680. which: 27
  681. }));
  682. _$("canvas#canvas").dispatchEvent(new KeyboardEvent("keyup",{
  683.  
  684. altKey: false,
  685. bubbles: true,
  686. cancelBubble: false,
  687. cancelable: true,
  688. charCode: 0,
  689. code: "Escape",
  690. composed: true,
  691. ctrlKey: false,
  692. currentTarget: null,
  693. defaultPrevented: false,
  694. detail: 0,
  695. eventPhase: 0,
  696. isComposing: false,
  697. isTrusted: true,
  698. key: "Escape",
  699. keyCode: 27,
  700. location: 0,
  701. metaKey: false,
  702. path: [document.body, document, document, window],
  703. repeat: false,
  704. returnValue: true,
  705. shiftKey: false,
  706. sourceCapabilities: new InputDeviceCapabilities({firesTouchEvents: false}),
  707. srcElement: document.body,
  708. target: document.body,
  709. type: "keydown",
  710. view: window,
  711. which: 27
  712. }))
  713.  
  714. window.VEX_PLAYER_SPAWN();
  715. }
  716. }
  717. }, 500);
  718.  
  719. return;
  720. }
  721.  
  722. clearInterval(VEX_EXTRAS_AR_INTERVAL);
  723. VEX_EXTRAS_AR_INTERVAL = null;
  724. }, false);
  725.  
  726. VEX_DOM_EXTRAS_SS.addEventListener('change', event => {
  727.  
  728. const state = event.target.checked;
  729.  
  730. if(state == true){
  731.  
  732. VEX_EXTRAS_SS_INTERVAL = setInterval(()=>{
  733.  
  734. if(_$(".container")[2].style.display != "none"){
  735.  
  736. if(_$("button.continue").length === undefined && _$("button.continue").length !== 0)
  737. _$("button.continue").click();
  738. }
  739. }, 500);
  740.  
  741. return;
  742. }
  743.  
  744. clearInterval(VEX_EXTRAS_SS_INTERVAL);
  745. VEX_EXTRAS_SS_INTERVAL = null;
  746. }, false);
  747.  
  748. const init = () => {
  749.  
  750. VEX_DOM_HC.value = localStorage.getItem("vex-hc") || "";
  751. VEX_HUD_COLOR = VEX_DOM_HC.value;
  752. VEX_HUD_COLOR_FUNC();
  753.  
  754. VEX_DOM_SKIN1.value = localStorage.getItem("vex-s1") || "";
  755. VEX_DOM_SKIN2.value = localStorage.getItem("vex-s2") || "";
  756. VEX_DOM_SKIN3.value = localStorage.getItem("vex-s3") || "";
  757. VEX_DOM_SKIN4.value = localStorage.getItem("vex-s4") || "";
  758.  
  759. VEX_DOM_ROTATOR_STOP.click();
  760.  
  761. VEX_DOM_EXTRAS_AR.checked = localStorage.getItem("vex-e-ar") || false;
  762. VEX_DOM_EXTRAS_SS.checked = localStorage.getItem("vex-e-ss") || false;
  763. };
  764.  
  765.  
  766. WebSocket.prototype._send = WebSocket.prototype.send
  767. WebSocket.prototype.send = function(data) {
  768.  
  769. if(data.byteLength > 9 && data[0] == 1)
  770. VEX_PLAYER_PACKET_SPAWN = data;
  771.  
  772. window.VEX_PLAYER_SOCKET = this;
  773.  
  774. if(data.byteLength == 9){
  775.  
  776. if(data.getUint8() == 16){
  777.  
  778. window.VEX_PLAYER_X = data.getInt32(1, true);
  779. window.VEX_PLAYER_Y = data.getInt32(5, true);
  780.  
  781. if(window.VEX_PLAYER_MOVE_STOP && window.VEX_PLAYER_MOVE_TO){
  782.  
  783. window.VEX_PLAYER_MOVETO(window.VEX_PLAYER_MOVETO_X, window.VEX_PLAYER_MOVETO_Y);
  784. return;
  785. }
  786.  
  787. if(window.VEX_PLAYER_MOVE_STOP)
  788. return;
  789. }
  790. }
  791.  
  792. this._send(data);
  793. };
  794.  
  795.  
  796. document.addEventListener('click', event => {
  797.  
  798. console.log(event)
  799. }, false)
  800.  
  801. setInterval(()=>{
  802.  
  803. VEX_HUD_COLOR_FUNC();
  804. }, 200);
  805. init();
  806.  
  807. }, 25);