iiBuggzZz

Shell Shockers No-Scopes [REMOVES BLACK BORDERS ON SCOPES]

Apr 5th, 2022 (edited)
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.70 KB | None | 0 0
  1. // ==UserScript==
  2. // @name         Disable scope (SHELL SHOCKERS)
  3. // @version      0.1
  4. // @description  Removes the black borders that occur whenever you scope in!
  5. // @match        *://shellshock.io/*
  6. // @author       iiBuggzZz
  7. // @run-at       document-start
  8. // @grant        unsafeWindow
  9. // @namespace    https://greasyfork.org/users/815159
  10. // ==/UserScript==
  11. (function () {
  12.     unsafeWindow.XMLHttpRequest = class extends unsafeWindow.XMLHttpRequest {
  13.         constructor() {
  14.             super(...arguments);
  15.         }
  16.         open() {
  17.             if (arguments[1] && arguments[1].includes("src/shellshock.js")) {
  18.                this.scriptMatch = true;
  19.             }
  20.  
  21.             super.open(...arguments);
  22.         }
  23.         get response() {
  24.  
  25.             if (this.scriptMatch) {
  26.                 let responseText = super.response;
  27.  
  28.                 let matches = [responseText.match(/.push\(([A-z])\),\w.maxZ=100/), responseText.match(/this.crosshairs.position.z=2/)];
  29.                 if (matches[0]) responseText = responseText.replace(matches[0][0], matches[0][0] + `,window.fixCamera(${matches[0][1]})`);
  30.                 if (matches[1]) responseText = responseText.replace(matches[1][0], matches[1][0] + `;return`);
  31.  
  32.                 return responseText;
  33.             }
  34.             return super.response;
  35.         }
  36.     };
  37.  
  38.     unsafeWindow.fixCamera = function (camera) {
  39.         let border = document.getElementById("scopeBorder");
  40.         Object.defineProperties(camera.viewport, {
  41.             width: {
  42.                 set: () => border.style.display = "none",
  43.                 get: () => 1
  44.             },
  45.             x: {
  46.                 get: () => 0
  47.             }
  48.         });
  49.     }
  50. }())
  51.  
Add Comment
Please, Sign In to add comment