// ==UserScript==
// @name Sigmally Mod (Macros)
// @version 8.6.5.1
// @description Mod for Sigmally.com | Macros, Custom Skins, Themes, Autorespawn and much more!
// @author Cursed
// @match *://sigmally.com/*
// @icon https://i.ibb.co/Hn9qnjm/Sigmod-Logo.png
// @run-at document-end
// @license MIT
// @namespace https://greasyfork.org/users/981958
// @downloadURL none
// ==/UserScript==
(function() {
let version = 5;
let logo = "https://i.ibb.co/Hn9qnjm/Sigmod-Logo.png";
'use strict';
if(localStorage.getItem("sig_modSettings")) localStorage.removeItem("sig_modSettings");
let modSettings = localStorage.getItem("mod-Settings");
if (!modSettings) {
modSettings = {
keyBindingsRapidFeed: "w",
keyBindingsdoubleSplit: "d",
keyBindingsTripleSplit: "f",
keyBindingsQuadSplit: "g",
keyBindingsFreezePlayer: "s",
freezeType: "press",
keyBindingsToggleMenu: "v",
m1: null,
m2: null,
mapColor: null,
nameColor: null,
borderColor: null,
mapImageURL: "",
virusImage: "/assets/images/viruses/2.png",
skinImage: {
original: null,
replaceImg: null,
},
Theme: "Dark",
addedThemes: [],
savedNames: [],
AutoRespawn: false,
tag: 0,
visits: 0,
};
localStorage.setItem("mod-Settings", JSON.stringify(modSettings));
} else {
modSettings = JSON.parse(modSettings);
}
function updateStorage() {
localStorage.setItem("mod-Settings", JSON.stringify(modSettings));
}
function keypress(key, keycode) {
const keyDownEvent = new KeyboardEvent("keydown", { key: key, code: keycode });
const keyUpEvent = new KeyboardEvent("keyup", { key: key, code: keycode });
window.dispatchEvent(keyDownEvent);
window.dispatchEvent(keyUpEvent);
}
function center(sx, sy) {
const mouseMoveEvent = new MouseEvent("mousemove", { clientX: sx, clientY: sy });
const canvas = document.getElementById("canvas");
canvas.dispatchEvent(mouseMoveEvent);
}
function Client() {
this.Username = "User";
this.getUsername();
}
Client.prototype = {
getUsername() {
const nickname = document.querySelector("#nick");
setTimeout(() => {
const nick = nickname.value || "User";
this.Username = nick;
mods.welcomeUser.textContent = `Welcome ${this.Username}, to SigMod!`;
}, 1000);
}
}
const client = new Client();
function loadVirusImage(img) {
const replacementVirus = new Image();
replacementVirus.src = img;
const originalDrawImage = CanvasRenderingContext2D.prototype.drawImage;
CanvasRenderingContext2D.prototype.drawImage = function(image, ...args) {
if (image instanceof HTMLImageElement && image.src.includes("2.png")) {
originalDrawImage.call(this, replacementVirus, ...args);
} else {
originalDrawImage.apply(this, arguments);
}
};
}
function loadSkinImage(skin, img) {
const replacementSkin = new Image();
replacementSkin.src = img;
const originalDrawImage = CanvasRenderingContext2D.prototype.drawImage;
CanvasRenderingContext2D.prototype.drawImage = function(image, ...args) {
if (image instanceof HTMLImageElement && image.src.includes(`${skin}.png`)) {
originalDrawImage.call(this, replacementSkin, ...args);
} else {
originalDrawImage.apply(this, arguments);
}
};
}
function mod() {
this.welcomeUser = document.createElement("span");
this.splitKey = {
keyCode: 32,
code: "Space",
cancelable: true,
composed: true,
isTrusted: true,
which: 32,
}
this.createMenu();
}
mod.prototype = {
get style() {
return `
:root {
--default-mod-color: #2E2D80;
}
input[type=range] {
-webkit-appearance: none;
height: 22px;
background: transparent;
cursor: pointer;
}
input[type=range]::-webkit-slider-runnable-track {
-webkit-appearance: none;
background: #542499;
height: 4px;
border-radius: 6px;
}
input[type=range]::-webkit-slider-thumb {
appearance: none;
background: #6B32BD;
height: 16px;
width: 16px;
position: relative;
top: -5px;
border-radius: 50%;
}
input:focus, select:focus, button:focus{
outline: none;
}
.flex {
display: flex;
}
.centerX {
display: flex;
justify-content: center;
}
.centerY {
display: flex;
align-items: center;
}
.centerXY {
display: flex;
align-items: center;
justify-content: center
}
.f-column {
display: flex;
flex-direction: column;
}
#sig-mod-settings {
border-radius: 4px;
border: 2px solid rgba(255,255,255,.5);
width: 525px;
height: 380px;
}
.tabs_navigation {
display: flex;
justify-content: space-around;
}
.keybinding {
max-width: 20px;
text-align: center;
margin-right: 5px;
outline: none;
color: #fff;
background-color: #111;
border: 0px solid #fff;
font-weight: 500;
border-bottom: 2px solid var(--default-mod-color);
position: relative;
border-top-right-radius: 4px;
border-top-left-radius: 4px;
transition: all .3s ease;
}
.keybinding:hover {
background-color: #333;
}
.hidden {
display: none;
}
#text-block,#left_ad_block,#ad_bottom,.ad-block,.ad-block-left,.ad-block-right {
display: none;
}
.SettingsTitle{
font-size: 32px;
color: #EEE;
margin-left: 10px;
}
.CloseBtn{
width: 46px;
background-color: transparent;
}
.select-btn {
padding: 15px 20px;
background: #222;
border-radius: 2px;
position: relative;
}
.select-btn:active {
scale: 0.95
}
.select-btn::before {
content: "...";
font-size: 20px;
color: #fff;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.text {
user-select: none;
font-weight: 500;
text-align: left;
}
.titleImg{
width: 50px;
height: 50px;
border-radius: 20px;
object-fit: cover;
}
.modContainer {
display: flex;
justify-content: space-between;
}
.modButton{
background-color: #333;
border-radius: 5px;
color: #fff;
transition: all .3s;
outline: none;
padding: 5px;
font-size: 13px;
border: none;
}
.modButton:hover {
background-color: #222
}
.tabbtn {
background-color: #111;
border-bottom: 2px solid var(--default-mod-color);
border-radius: 0;
position: relative;
border-top-right-radius: 2px;
border-top-left-radius: 2px;
box-shadow: 0 4px 10px -4px var(--default-mod-color);
}
.tabbtn::before {
content: "";
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 0;
background: linear-gradient(to top, var(--default-mod-color), transparent);
transition: height 0.3s ease;
}
.tabbtn:hover::before {
height: 30%;
}
.modInput {
background-color: #111;
border: none;
border-bottom: 2px solid var(--default-mod-color);
border-radius: 0;
position: relative;
border-top-right-radius: 4px;
border-top-left-radius: 4px;
font-family: arial;
font-weight: 500;
padding: 4px;
box-shadow: 0 4px 10px -4px var(--default-mod-color);
color: #fff;
}
.modCheckbox input[type="checkbox"] {
display: none;
visibility: hidden;
}
.modCheckbox label {
display: inline-block;
}
.modCheckbox .cbx {
position: relative;
top: 1px;
width: 17px;
height: 17px;
border: 1px solid #c8ccd4;
border-radius: 3px;
vertical-align: middle;
transition: background 0.1s ease;
cursor: pointer;
}
.modCheckbox .cbx:after {
content: '';
position: absolute;
top: 1px;
left: 5px;
width: 5px;
height: 11px;
opacity: 0;
transform: rotate(45deg) scale(0);
border-right: 2px solid #fff;
border-bottom: 2px solid #fff;
transition: all 0.3s ease;
transition-delay: 0.15s;
}
.modCheckbox .lbl {
margin-left: 5px;
vertical-align: middle;
cursor: pointer;
}
.modCheckbox input[type="checkbox"]:checked ~ .cbx {
border-color: transparent;
background: #6871f1;
box-shadow: 0 0 10px var(--default-mod-color);
}
.modCheckbox input[type="checkbox"]:checked ~ .cbx:after {
opacity: 1;
transform: rotate(45deg) scale(1);
}
.SettingsButton{
border: none;
outline: none;
margin-right: 10px;
transition: all .3s ease;
}
.SettingsButton:hover {
scale: 1.1;
}
.colorInput{
background-color: transparent;
width: 33px;
height: 35px;
border-radius: 50%;
border: none;
}
.colorInput::-webkit-color-swatch {
border-radius: 50%;
border: 1px solid #000;
}
.whiteBorder_colorInput::-webkit-color-swatch {
border-color: #fff;
}
#dclinkdiv {
display: flex;
flex-direction: row;
}
.dclinks {
width: calc(50% - 5px);
height: 36px;
display: flex;
justify-content: center;
align-items: center;
background-color: rgba(88, 101, 242, 1);
border-radius: 6px;
margin: 0 auto;
color: #fff;
}
#settings {
display: flex;
flex-direction: column;
}
#cm_close__settings {
width: 50px;
transition: all .3s ease;
}
#cm_close__settings svg:hover {
scale: 1.1;
}
#cm_close__settings svg {
transition: all .3s ease;
}
.modTitleText {
text-align: center;
font-size: 16px;
}
#settings > .checkbox-grid {
width: 232px;
}
.ModSettings {
display: flex;
justify-content: center;
}
.settingsTitle {
margin-bottom: 6px;
text-decoration: underline;
font-size: 16px font-weight: 600
}
.tab {
display: none;
}
.modItem {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.tab-content {
width: 100%;
margin: 10px;
overflow: auto;
display: flex;
flex-direction: column;
}
#Tab6 .tab-content {
overflow-y: auto;
max-height: 230px;
display: flex;
flex-wrap: nowrap;
flex-direction: column;
gap: 10px;
}
.w-100 {
width: 100%
}
.btnRS {
margin: 0 5px;
width: 50%
}
#savedNames {
background-color: #222;
padding: 5px;
border-top-left-radius: 5px;
overflow-y: scroll;
width: 200px;
height: 170px;
display: flex;
border-bottom: 2px solid var(--default-mod-color);
box-shadow: 0 4px 20px -4px var(--default-mod-color);
}
.scroll::-webkit-scrollbar {
width: 7px;
}
.scroll::-webkit-scrollbar-track {
background: #222;
border-radius: 5px;
}
.scroll::-webkit-scrollbar-thumb {
background-color: #555;
border-radius: 5px;
}
.scroll::-webkit-scrollbar-thumb:hover {
background: #666;
}
.themes {
display: flex;
flex-direction: row;
width: 100%;
height: 220px;
background: #000;
border-radius: 5px;
overflow-y: scroll;
gap: 10px;
padding: 5px;
flex-wrap: wrap;
justify-content: center;
}
.themeContent {
width: 50px;
height: 50px;
border: 2px solid #222;
border-radius: 50%;
background-position: center;
}
.theme {
height: 75px;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
cursor: pointer;
}
.delName {
font-weight: 500;
background: #e17e7e;
height: 20px;
border: none;
border-radius: 5px;
font-size: 10px;
margin-left: 5px;
color: #fff;
display: flex;
justify-content: center;
align-items: center;
width: 20px;
}
.NameDiv {
display: flex;
background: #151515;
border-radius: 5px;
margin: 5px;
padding: 3px 8px;
height: 34px;
align-items: center;
justify-content: space-between;
cursor: pointer;
box-shadow: 0 4px 10px -4px var(--default-mod-color);
}
.NameLabel {
cursor: pointer;
font-weight: 500;
text-align: center;
color: #fff;
}
.resetButton {
width: 25px;
height: 25px;
background-image: url("https://raw.githubusercontent.com/Sigmally/SigMod/main/images/reset.svg");
background-color: transparent;
border: none;
}
.modAlert {
position: absolute;
top: 50px;
left: 50%;
transform: translate(-50%, -50%);
z-index: 99998;
background: #57C876;
padding: 10px;
border-radius: 10px;
text-align: center;
transition: all .3s ease-out;
}
.modAlert > .text {
color: #fff;
}
.donate {
position: fixed;
top: 80px;
left: 50%;
transform: translate(-50%, -50%);
z-index: 99995;
background: #3F3F3F;
border-radius: 10px;
display: flex;
flex-direction: column;
padding: 10px;
color: #fff;
}
.themeEditor {
z-index: 100000;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: rgba(0, 0, 0, .85);
color: #fff;
padding: 10px;
border-radius: 10px;
box-shadow: 0 0 10px #fff;
width: 400px;
}
.theme_editor_header {
display: flex;
justify-content: space-between;
align-items: center;
gap: 10px;
}
.theme-editor-tab {
display: flex;
justify-content: center;
align-items: start;
flex-direction: column;
margin-top: 10px
}
.themes_preview {
width: 50px;
height: 50px;
border: 2px solid #fff;
border-radius: 2px;
display: flex;
justify-content: center;
align-items: center;
}
.modKeybindings {
display: flex;
flex-direction: column;
overflow-y: scroll;
max-height: 170px;
}
.modKeybindings > label {
margin-right: 5px;
}
#signInBtn, #nick, #tag, #gamemode, #option_0, #option_1, #option_2, .form-control, .profile-header, .coins-num, #clan-members, .member-index, .member-level, #clan-requests {
background: rgba(0, 0, 0, 0.4) !important;
color: #fff !important;
}
.profile-name, #progress-next, .member-desc > p:first-child, #clan-leave > div, .clans-item > div > b, #clans-input input, #shop-nav button {
color: #fff !important;
}
.head-desc, #shop-nav button {
border: 1px solid #000;
}
#clan-handler, #request-handler, #clans-list, #clans-input, .clans-item button, #shop-content, #shop-nav button:hover, .card-particles-bar-bg {
background: #111;
color: #fff !important;
}
#clans_and_settings {
height: auto !important;
}
.card-body {
background: linear-gradient(180deg, #000 0%, #1b354c 100%);
}
.free-card:hover .card-body {
background: linear-gradient(180deg, #111 0%, #1b354c 100%);
}
#shop-tab-body, #shop-skins-buttons, #shop-nav {
background: #050505;
}
#clan-leave {
background: #111;
bottom: -1px;
}
.sent {
position: relative;
width: 100px;
}
.sent::before {
content: "Sent request";
width: 100%;
height: 10px;
word-spacing: normal;
white-space: nowrap;
position: absolute;
background: #4f79f9;
display: flex;
justify-content: center;
align-items: center;
}
.btn, .sign-in-out-btn {
transition: all .2s ease;
}
#clan .connecting__content, #clans .connecting__content {
background: #151515;
color: #fff;
box-shadow: 0 0 10px rgba(0, 0, 0, .5);
}
.skin-select__icon-text {
color: #fff;
}
.justify-sb {
display: flex;
align-items: center;
justify-content: space-between;
}
.macro-extanded_input {
width: 75px;
text-align: center;
}
#gamemode option {
background: #111;
}
.stats-line {
width: 100%;
user-select: none;
margin-bottom: 5px;
padding: 5px;
background: #151515;
border: 1px solid var(--default-mod);
border-radius: 5px;
}
.setting-card-wrapper {
margin-right: 10px;
padding: 10px;
background: #222;
border: #252525;
border-radius: 5px;
display: flex;
flex-direction: column;
}
.setting-card {
display: flex;
align-items: center;
justify-content: space-between;
}
.setting-card-action {
display: flex;
align-items: center;
gap: 5px;
cursor: pointer;
}
.setting-card-action {
width: 100%;
}
.setting-card-name {
font-size: 16px;
user-select: none;
width: 100%;
}
.mod-small-modal {
position: absolute;
z-index: 99999;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: #191919;
box-shadow: 0 5px 15px -2px #000;
border: 2px solid var(--default-mod-color);
padding: 10px;
border-radius: 5px;
}
.mod-small-modal-header {
display: flex;
justify-content: space-between;
align-items: center;
}
.mod-small-modal-header h1 {
font-size: 20px;
font-weight: 500;
margin: 0;
}
.mod-small-modal-content {
display: flex;
flex-direction: column;
width: 100%;
align-items: center;
}
.mod-small-modal-content_selectImage {
display: flex;
flex-direction: column;
gap: 10px;
}
.previmg {
width: 50px;
height: 50px;
border: 2px solid #ccc;
}
.stats__item>span, #title, .stats-btn__text {
color: #fff;
}
.progress-row button {
background-color: transparent;
}
`
},
respawnTime: Date.now(),
respawnCooldown: 1000,
move(cx, cy) {
const mouseMoveEvent = new MouseEvent("mousemove", { clientX: cx, clientY: cy });
const canvas = document.querySelector("canvas");
canvas.dispatchEvent(mouseMoveEvent);
},
getColors() {
const mapColor = document.getElementById("mapColor");
const mapImage = document.getElementById("mapImage");
const originalFillRect = CanvasRenderingContext2D.prototype.fillRect;
function ChangeMapColor() {
CanvasRenderingContext2D.prototype.fillRect = function (x, y, width, height) {
if ((width + height) / 2 === (window.innerWidth + window.innerHeight) / 2) {
this.fillStyle = mapColor.value;
}
originalFillRect.apply(this, arguments);
};
modSettings.mapColor = mapColor.value;
updateStorage();
}
mapColor.addEventListener("input", ChangeMapColor);
function ChangeMapImage() {
const canvas = document.getElementById("canvas");
const ctx = canvas.getContext("2d");
const img = new Image();
let pattern;
img.onload = function () {
const tempCanvas = document.createElement("canvas");
const tempCtx = tempCanvas.getContext("2d");
tempCanvas.width = img.width;
tempCanvas.height = img.height;
tempCtx.drawImage(img, 0, 0);
pattern = ctx.createPattern(tempCanvas, "repeat");
fillCanvas();
};
function fillCanvas() {
const fillRect = CanvasRenderingContext2D.prototype.fillRect;
CanvasRenderingContext2D.prototype.fillRect = function (x, y, width, height) {
this.fillStyle = pattern;
fillRect.apply(this, arguments);
};
ctx.fillRect(0, 0, canvas.width, canvas.height);
}
img.src = mapImage.value;
modSettings.mapImageURL = mapImage.value;
updateStorage();
}
document.getElementById("setMapImage").addEventListener("click", () => {
if(mapImage.value == "") return
const canvas = document.getElementById("canvas");
const ctx = canvas.getContext("2d");
const img = new Image();
let pattern;
img.onload = function() {
const tempCanvas = document.createElement("canvas");
const tempCtx = tempCanvas.getContext("2d");
tempCanvas.width = img.width;
tempCanvas.height = img.height;
tempCtx.drawImage(img, 0, 0);
pattern = ctx.createPattern(tempCanvas, "repeat");
fillCanvas();
};
function fillCanvas() {
const fillRect = CanvasRenderingContext2D.prototype.fillRect;
CanvasRenderingContext2D.prototype.fillRect = function(x, y, width, height) {
this.fillStyle = pattern;
fillRect.apply(this, arguments);
};
ctx.fillRect(0, 0, canvas.width, canvas.height);
}
img.src = mapImage.value;
modSettings.mapImageURL = mapImage.value;
updateStorage();
});
const mapColorReset = document.getElementById("mapColorReset");
mapColorReset.addEventListener("click", () => {
modSettings.mapColor = null;
updateStorage();
const mapColor = document.getElementById("mapColor");
mapColor.value = "";
});
const removeButton = document.getElementById("removeMapImage");
removeButton.addEventListener("click", () => {
if (mapImage.value == "" || modSettings.mapImageURL === "") return;
if (confirm("You need to reload the page to remove the background image. Reload?")) {
modSettings.mapImageURL = "";
updateStorage();
location.reload();
}
});
if (modSettings) {
function ChangeMapColor() {
CanvasRenderingContext2D.prototype.fillRect = function (x, y, width, height) {
if ((width + height) / 2 === (window.innerWidth + window.innerHeight) / 2) {
this.fillStyle = modSettings.mapColor;
}
originalFillRect.apply(this, arguments);
};
}
ChangeMapColor();
function ChangeMapImage() {
const canvas = document.getElementById("canvas");
const ctx = canvas.getContext("2d");
const img = new Image();
let pattern;
img.onload = function () {
const tempCanvas = document.createElement("canvas");
const tempCtx = tempCanvas.getContext("2d");
tempCanvas.width = img.width;
tempCanvas.height = img.height;
tempCtx.drawImage(img, 0, 0);
pattern = ctx.createPattern(tempCanvas, "repeat");
fillCanvas();
};
function fillCanvas() {
const fillRect = CanvasRenderingContext2D.prototype.fillRect;
CanvasRenderingContext2D.prototype.fillRect = function (x, y, width, height) {
this.fillStyle = pattern;
fillRect.apply(this, arguments);
};
ctx.fillRect(0, 0, canvas.width, canvas.height);
}
img.src = modSettings.mapImageURL;
}
mapImage.value = modSettings.mapImageURL;
ChangeMapImage();
}
loadVirusImage(modSettings.virusImage)
if(modSettings.skinImage.original !== null) {
loadSkinImage(modSettings.skinImage.original, modSettings.skinImage.replaceImg)
}
},
setColors() {
// - NAME - //
const nameColorValue = document.getElementById("nameColor");
const fillText = CanvasRenderingContext2D.prototype.fillText;
nameColorValue.addEventListener("input", () => {
CanvasRenderingContext2D.prototype.fillText = function(text, x, y) {
if (text === document.getElementById("nick").value && this.playerId == this.playerId) {
const width = this.measureText(text).width;
this.fillStyle = nameColorValue.value;
}
return fillText.apply(this, arguments);
};
modSettings.nameColor = nameColorValue.value
updateStorage();
})
if (modSettings.nameColor) {
const nameColor = document.getElementById("nameColor");
CanvasRenderingContext2D.prototype.fillText = function(text, x, y) {
if (text === document.getElementById("nick").value) {
const width = this.measureText(text).width;
this.fillStyle = modSettings.nameColor;
}
return fillText.apply(this, arguments);
};
nameColor.value = modSettings.nameColor;
}
const nameColorReset = document.getElementById("nameColorReset");
nameColorReset.addEventListener("click", () => {
CanvasRenderingContext2D.prototype.fillText = function(text, x, y) {
if (text === document.getElementById("nick").value) {
const width = this.measureText(text).width;
const fontSize = 8;
this.fillStyle = "#ffffff";
}
return fillText.apply(this, arguments);
};
nameColorValue.value = "#ffffff"
modSettings.nameColor = null;
updateStorage();
});
if(modSettings.nameColor == null) nameColorValue.value = "#ffffff";
// - BORDER - //
const borderColorinput = document.getElementById("borderColor");
const borderColorReset = document.getElementById("borderColorReset");
const moveTo = CanvasRenderingContext2D.prototype.moveTo;
borderColorinput.addEventListener("input", () => {
CanvasRenderingContext2D.prototype.moveTo = function(x, y) {
this.strokeStyle = borderColorinput.value;
return moveTo.apply(this, arguments)
}
modSettings.borderColor = borderColorinput.value;
updateStorage();
})
borderColorReset.addEventListener("click", () => {
CanvasRenderingContext2D.prototype.moveTo = function(x, y) {
this.strokeStyle = ""
return moveTo.apply(this, arguments)
}
modSettings.borderColor = "";
updateStorage();
})
if(modSettings.borderColor !== null) {
CanvasRenderingContext2D.prototype.moveTo = function(x, y) {
this.strokeStyle = modSettings.borderColor;
return moveTo.apply(this, arguments)
}
}
const virusPreview = document.getElementById("virus");
const setVirus = document.getElementById("setVirus");
const virusURL = document.getElementById("virusURL");
const openVirusModal = document.getElementById("virusImageSelect");
const virusModal = document.getElementById("virusModal");
const resetVirus = document.getElementById("resetVirus");
openVirusModal.addEventListener("click", () => {
virusModal.style.display = "block";
});
setVirus.addEventListener("click", () => {
modSettings.virusImage = virusURL.value;
loadVirusImage(modSettings.virusImage)
updateStorage();
virusPreview.src = modSettings.virusImage;
});
resetVirus.addEventListener("click", () => {
modSettings.virusImage = "/assets/images/viruses/2.png";
updateStorage();
if(confirm("Please Refresh the page to make it work. Reload?")) {
location.reload();
}
});
const skinPreview = document.getElementById("skinPreview");
const skinURL = document.getElementById("skinURL");
const setSkin = document.getElementById("setSkin");
const openSkinModal = document.getElementById("SkinReplaceSelect");
const skinModal = document.getElementById("skinModal");
const originalSkin = document.getElementById("originalSkinSelect");
const resetSkin = document.getElementById("resetSkin");
openSkinModal.addEventListener("click", () => {
skinModal.style.display = "block";
});
setSkin.addEventListener("click", () => {
modSettings.skinImage.original = originalSkin.value;
modSettings.skinImage.replaceImg = skinURL.value;
loadSkinImage(modSettings.skinImage.original, modSettings.skinImage.replaceImg)
updateStorage();
skinPreview.src = modSettings.skinImage.replaceImg;
});
resetSkin.addEventListener("click", () => {
modSettings.skinImage.original = null;
modSettings.skinImage.replaceImg = null;
updateStorage();
if(confirm("Please Refresh the page to make it work. Reload?")) {
location.reload();
}
});
},
menu() {
let Tab1;
let Tab2;
let Tab3;
let Tab4;
let Tab5;
let Tab6;
const welcomeuser = this.welcomeUser;
const ModSettings = document.createElement("div");
const KeyBindings = document.createElement("div");
function openTab(tab) {
let tabSelected = document.getElementById(tab);
let allTabs = document.getElementsByClassName("tab");
for (let i = 0; i < allTabs.length; i++) {
allTabs[i].style.display = "none";
}
tabSelected.style.display = "flex";
}
const settings = document.querySelector("#cm_modal__settings > .ctrl-modal__overlay > .ctrl-modal__modal");
const DefaultSettings = document.querySelector("#settings > .checkbox-grid");
const settingsTitle = settings.querySelector(".ctrl-modal__header > .ctrl-modal__title");
settingsTitle.innerHTML = ` SigMod Settings`
settingsTitle.style.textAlign = "left";
settings.setAttribute("id", "sig-mod-settings");
const settingsHeader = settings.querySelector(".ctrl-modal__header");
const menuTabs = document.createElement("div");
menuTabs.classList.add("tabs_navigation");
menuTabs.innerHTML = `
`;
settingsHeader.insertAdjacentElement("afterend", menuTabs);
const gameSettings = document.querySelector("#settings");
const defaultSettingsTitle = document.createElement("span");
defaultSettingsTitle.textContent = "Basic Settings";
defaultSettingsTitle.classList.add("text", "settingsTitle");
gameSettings.insertAdjacentElement("afterbegin", defaultSettingsTitle);
welcomeuser.textContent = `Welcome Guest, to SigMod!`;
welcomeuser.classList.add("text");
welcomeuser.style = "margin: 10px 0; text-align: center; font-size: 16px;";
const bsettings = document.querySelector("#sig-mod-settings > .ctrl-modal__content > .menu__item");
bsettings.classList.add("tab")
bsettings.style = "display: flex; flex-direction: column; margin: 0";
bsettings.insertAdjacentElement("afterbegin", welcomeuser);
Tab1 = bsettings;
Tab1.setAttribute("id", "Tab1")
function virusImgVal() {
if(modSettings.virusImage === "/assets/images/viruses/2.png" || modSettings.virusImage === "") return "";
return modSettings.virusImage;
}
function skinImgVal() {
if(modSettings.skinImage.replaceImg === "" || modSettings.skinImage.replaceImg === null) return "";
return modSettings.skinImage.replaceImg;
}
Tab2 = document.createElement("div");
Tab2.classList.add("centerX");
Tab2.style.height = "180px";
Tab2.innerHTML = `