Middle crosshair Shell Shockers

9/16/2024, 8:34:24 PM

// ==UserScript==
// @name        Middle crosshair Shell Shockers
// @namespace   Violentmonkey Scripts
// @grant       none
// @version     1.4
// @author      https://greasyfork.org/en/users/1361048-wish
// @description 9/16/2024, 8:34:24 PM
// @require     https://unpkg.com/guify@0.12.0/lib/guify.min.js
// @license      MIT; https://opensource.org/licenses/MIT


// @match         *://eggshooter.best/*
// @match        *://*.shellshock.io/*
// @match        *://*.shell.onlypuppy7.online/*
// @match        *://*.algebra.best/*
// @match        *://*.algebra.vip/*
// @match        *://*.biologyclass.club/*
// @match        *://*.deadlyegg.com/*
// @match        *://*.deathegg.world/*
// @match        *://*.eggboy.club/*
// @match        *://*.eggboy.xyz/*
// @match        *://*.eggcombat.com/*
// @match        *://*.egg.dance/*
// @match        *://*.eggfacts.fun/*
// @match        *://*.egghead.institute/*
// @match        *://*.eggisthenewblack.com/*
// @match        *://*.eggsarecool.com/*
// @match        *://*.geometry.best/*
// @match        *://*.geometry.monster/*
// @match        *://*.geometry.pw/*
// @match        *://*.geometry.report/*
// @match        *://*.hardboiled.life/*
// @match        *://*.hardshell.life/*
// @match        *://*.humanorganising.org/*
// @match        *://*.mathactivity.xyz/*
// @match        *://*.mathactivity.club/*
// @match        *://*.mathdrills.info/*
// @match        *://*.mathdrills.life/*
// @match        *://*.mathfun.rocks/*
// @match        *://*.mathgames.world/*
// @match        *://*.math.international/*
// @match        *://*.mathlete.fun/*
// @match        *://*.mathlete.pro/*
// @match        *://*.overeasy.club/*
// @match        *://*.risenegg.com/*
// @match        *://*.scrambled.tech/*
// @match        *://*.scrambled.today/*
// @match        *://*.scrambled.us/*
// @match        *://*.scrambled.world/*
// @match        *://*.shellshockers.club/*
// @match        *://*.shellshockers.life/*
// @match        *://*.shellshockers.site/*
// @match        *://*.shellshockers.us/*
// @match        *://*.shellshockers.world/*
// @match        *://*.shellshockers.xyz/*
// @match        *://*.shellsocks.com/*
// @match        *://*.softboiled.club/*
// @match        *://*.urbanegger.com/*
// @match        *://*.violentegg.club/*
// @match        *://*.violentegg.fun/*
// @match        *://*.yolk.best/*
// @match        *://*.yolk.life/*
// @match        *://*.yolk.rocks/*
// @match        *://*.yolk.tech/*
// @match        *://*.yolk.quest/*
// @match        *://*.yolk.today/*
// @match        *://*.zygote.cafe/*
// @match        *://*.shellshockers.best/*
// @match        *://*.eggboy.me/*

// ==/UserScript==

(function () {
	"use strict";


  let middleCrosshair = JSON.parse(localStorage.getItem('middleCrosshair')) || {color: 'black',length:20, thickness: 5}



	let style = `
  #lmao {
      color: white;

  }
    `;
	// Create a new style element
	const styleElement = document.createElement("style");

	// Append the styles to the style element
	styleElement.innerHTML = style;
	document.head.appendChild(styleElement);

	const addScript = (color, length, thickness) => {
		const previousStyle = document.getElementById("custom-styles");
		if (previousStyle) {
			previousStyle.remove();
		}
		// Create a new stylesheet
		const style = document.createElement("style");
		style.id = "custom-styles";
		style.innerHTML = `
        /* your styles here */

#reticleDot#reticleDot {
position: absolute;
    transform: translate(-50%,-50%);
    top: 50%;
    left: 50%;
  background-color: ${color};
  border: solid 0.05em ${color};
  width: ${length}px;
    height: ${thickness}px;
    opacity: 1;
}
#reticleDot::before {
    content:'';
    position: absolute;
    transform: translate(-50%,-50%);
    top: 50%;
    left: 50%;
    background-color: ${color};
    height: ${length}px;
    width: ${thickness}px;
    opacity: 1;
}
      `;
		document.head.appendChild(style);
	};
	function waitForElement(selector) {
		return new Promise((resolve) => {
			const intervalId = setInterval(() => {
				const element = document.querySelector(selector);
				if (element) {
					clearInterval(intervalId);
					resolve(element);
				}
			}, 100);
		});
	}


	// CREATE INSTANCE OF GUIFY
	const gui = new guify({
		title: "WISH",
		theme: "dark",
		align: "left",
		width: 300,
		barMode: "none",
		opacity: 0.95,
		root: document.body,
    open: false
		// panelOverflowBehavior: "overflow",
	});

	// CREATE FOLDER FOR CROSSHAIR SETTINGS
	gui.Register({
		type: "folder",
		label: "Change Middle Crosshair Settings",
	});


	// ADD STUFF IN THE FOLDER
	gui.Register({
		type: "color",
		label: "Crosshair Color",
		format: "hex",
		folder: "Change Middle Crosshair Settings",
		object: middleCrosshair,
		property: "color",
		onInitialize: () => {
			middleCrosshair.color = JSON.parse(localStorage.getItem("middleCrosshair")).color || "black";
			addScript(middleCrosshair.color, middleCrosshair.length, middleCrosshair.thickness);
		},
		onChange: (color1) => {
			middleCrosshair.color = color1;
			localStorage.setItem("middleCrosshair", JSON.stringify(middleCrosshair));
			addScript(middleCrosshair.color, middleCrosshair.length, middleCrosshair.thickness);
		},
	});

	gui.Register({
		type: "range",
		label: "Length of Crosshair",
		min: 0,
		max: 40,
		step: 0.1,
		folder: "Change Middle Crosshair Settings",
		object: middleCrosshair,
		property: "length",
    onInitialize: () => {
      middleCrosshair.length = JSON.parse(localStorage.getItem("middleCrosshair")).length || 20;
			addScript(middleCrosshair.color, middleCrosshair.length, middleCrosshair.thickness);
    },
		onChange: (data) => {
			middleCrosshair.length = data;
			localStorage.setItem("middleCrosshair", JSON.stringify(middleCrosshair));
			addScript(middleCrosshair.color, middleCrosshair.length, middleCrosshair.thickness);
		},
	});

	gui.Register({
		type: "range",
		label: "Thickness of Crosshair",
		min: 0,
		max: 10,
		step: 0.1,
		folder: "Change Middle Crosshair Settings",
		object: middleCrosshair,
		property: "thickness",
		onChange: (data) => {
			middleCrosshair.thickness = data;
			localStorage.setItem("middleCrosshair", JSON.stringify(middleCrosshair));
			addScript(middleCrosshair.color, middleCrosshair.length, middleCrosshair.thickness);
		},
	});


})();