Greasy Fork is available in English.

Dsync Client [Sploop.io]

The most advanced hack for sploop.io

2022-10-01 일자. 최신 버전을 확인하세요.

질문, 리뷰하거나, 이 스크립트를 신고하세요.
// ==UserScript==
// @name Dsync Client [Sploop.io]
// @author Murka
// @description The most advanced hack for sploop.io
// @icon https://sploop.io/img/ui/favicon.png
// @version 1.0.15
// @match *://sploop.io/*
// @run-at document-start
// @grant none
// @license MIT
// @namespace https://greasyfork.org/users/919633
// ==/UserScript==
/* jshint esversion:6 */

/*
    Author: Murka
    Github: https://github.com/Murka007/Dsync-client
    Discord: https://discord.gg/sG9cyfGPj5
    Greasyfork: https://greasyfork.org/en/scripts/449995-dsync-client-sploop-io

    I need your support, please follow these steps:
    1. Join my DISCORD server
    2. Write a feedback about this script on GREASYFORK "script works, thank you so much"
    3. Star my repository on GITHUB
*/

Function("(" + ((GM_info) => {
    "use strict";
    var __webpack_modules__ = {
        147: module => {
            module.exports = {
                i8: "1.0.15"
            };
        }
    };
    var __webpack_module_cache__ = {};
    function __webpack_require__(moduleId) {
        var cachedModule = __webpack_module_cache__[moduleId];
        if (cachedModule !== undefined) {
            return cachedModule.exports;
        }
        var module = __webpack_module_cache__[moduleId] = {
            exports: {}
        };
        __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
        return module.exports;
    }
    (() => {
        __webpack_require__.d = (exports, definition) => {
            for (var key in definition) {
                if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
                    Object.defineProperty(exports, key, {
                        enumerable: true,
                        get: definition[key]
                    });
                }
            }
        };
    })();
    (() => {
        __webpack_require__.o = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);
    })();
    var __webpack_exports__ = {};
    (() => {
        __webpack_require__.d(__webpack_exports__, {
            sv: () => src_Dsync,
            vU: () => error,
            cM: () => log,
            lZ: () => pingCount
        });
        var WebsocketString;
        (function(WebsocketString) {
            WebsocketString[WebsocketString["LEADERBOARD"] = 3] = "LEADERBOARD";
            WebsocketString[WebsocketString["CONNECT"] = 12] = "CONNECT";
            WebsocketString[WebsocketString["UPGRADE"] = 14] = "UPGRADE";
            WebsocketString[WebsocketString["DIED"] = 19] = "DIED";
            WebsocketString[WebsocketString["KILLUPDATE"] = 22] = "KILLUPDATE";
            WebsocketString[WebsocketString["KILLED"] = 28] = "KILLED";
            WebsocketString[WebsocketString["PLAYERSPAWNED"] = 32] = "PLAYERSPAWNED";
            WebsocketString[WebsocketString["DEFAULTDATA"] = 33] = "DEFAULTDATA";
            WebsocketString[WebsocketString["SPAWN"] = 35] = "SPAWN";
        })(WebsocketString || (WebsocketString = {}));
        var EItems;
        (function(EItems) {
            EItems[EItems["PRIMARY"] = 0] = "PRIMARY";
            EItems[EItems["SECONDARY"] = 1] = "SECONDARY";
            EItems[EItems["HEAL"] = 2] = "HEAL";
            EItems[EItems["WALL"] = 3] = "WALL";
            EItems[EItems["SPIKE"] = 4] = "SPIKE";
            EItems[EItems["WINDMILL"] = 5] = "WINDMILL";
            EItems[EItems["TREE"] = 6] = "TREE";
            EItems[EItems["TRAP"] = 7] = "TRAP";
            EItems[EItems["PLATFORM"] = 8] = "PLATFORM";
            EItems[EItems["SPAWN"] = 9] = "SPAWN";
            EItems[EItems["TURRET"] = 10] = "TURRET";
        })(EItems || (EItems = {}));
        var ELayer;
        (function(ELayer) {
            ELayer[ELayer["PLAYER"] = 0] = "PLAYER";
            ELayer[ELayer["STONE"] = 1] = "STONE";
            ELayer[ELayer["HARDSPIKE"] = 2] = "HARDSPIKE";
            ELayer[ELayer["TREE"] = 3] = "TREE";
            ELayer[ELayer["GOLD"] = 4] = "GOLD";
            ELayer[ELayer["BUSH"] = 5] = "BUSH";
            ELayer[ELayer["TRAP"] = 6] = "TRAP";
            ELayer[ELayer["SPIKE"] = 7] = "SPIKE";
            ELayer[ELayer["WOODWALL"] = 8] = "WOODWALL";
            ELayer[ELayer["PLATFORM"] = 9] = "PLATFORM";
            ELayer[ELayer["BOOST"] = 10] = "BOOST";
            ELayer[ELayer["LOOTBOX"] = 11] = "LOOTBOX";
            ELayer[ELayer["PROJECTILE"] = 12] = "PROJECTILE";
            ELayer[ELayer["WINDMILL"] = 13] = "WINDMILL";
            ELayer[ELayer["COW"] = 14] = "COW";
            ELayer[ELayer["SPAWN"] = 15] = "SPAWN";
            ELayer[ELayer["POWERMILL"] = 16] = "POWERMILL";
            ELayer[ELayer["CASTLESPIKE"] = 17] = "CASTLESPIKE";
            ELayer[ELayer["TURRET"] = 18] = "TURRET";
            ELayer[ELayer["WOODFARM"] = 19] = "WOODFARM";
            ELayer[ELayer["CHERRYWOODFARM"] = 20] = "CHERRYWOODFARM";
            ELayer[ELayer["STONEWARM"] = 21] = "STONEWARM";
            ELayer[ELayer["CASTLEWALL"] = 22] = "CASTLEWALL";
            ELayer[ELayer["SHARK"] = 23] = "SHARK";
            ELayer[ELayer["WOLF"] = 24] = "WOLF";
            ELayer[ELayer["GOLDENCOW"] = 25] = "GOLDENCOW";
            ELayer[ELayer["ROOF"] = 26] = "ROOF";
            ELayer[ELayer["DRAGON"] = 27] = "DRAGON";
            ELayer[ELayer["MAMMOTH"] = 28] = "MAMMOTH";
            ELayer[ELayer["FIREBALL"] = 29] = "FIREBALL";
            ELayer[ELayer["CHEST"] = 30] = "CHEST";
            ELayer[ELayer["DRAGONWALLBIG"] = 31] = "DRAGONWALLBIG";
            ELayer[ELayer["DRAGONWALLMEDIUM"] = 32] = "DRAGONWALLMEDIUM";
            ELayer[ELayer["DRAGONWALLSMALL"] = 33] = "DRAGONWALLSMALL";
            ELayer[ELayer["MAMMOTHWALL"] = 34] = "MAMMOTHWALL";
            ELayer[ELayer["MAMMOTHWALLSMALL"] = 35] = "MAMMOTHWALLSMALL";
            ELayer[ELayer["DUCK"] = 36] = "DUCK";
            ELayer[ELayer["TELEPORT"] = 37] = "TELEPORT";
            ELayer[ELayer["CACTUS"] = 38] = "CACTUS";
            ELayer[ELayer["TORNADO"] = 39] = "TORNADO";
        })(ELayer || (ELayer = {}));
        const LayerObjects = [ ELayer.STONE, ELayer.HARDSPIKE, ELayer.TREE, ELayer.GOLD, ELayer.BUSH, ELayer.SPIKE, ELayer.WOODWALL, ELayer.WINDMILL, ELayer.SPAWN, ELayer.POWERMILL, ELayer.CASTLESPIKE, ELayer.TURRET, ELayer.WOODFARM, ELayer.CHERRYWOODFARM, ELayer.STONEWARM, ELayer.CASTLEWALL, ELayer.CHEST, ELayer.DRAGONWALLBIG, ELayer.DRAGONWALLMEDIUM, ELayer.DRAGONWALLSMALL, ELayer.MAMMOTHWALL, ELayer.MAMMOTHWALLSMALL, ELayer.TELEPORT, ELayer.CACTUS ];
        const types_CannotPlaceOn = [ ELayer.STONE, ELayer.HARDSPIKE, ELayer.TREE, ELayer.GOLD, ELayer.BUSH, ELayer.TRAP, ELayer.SPIKE, ELayer.WOODWALL, ELayer.PLATFORM, ELayer.BOOST, ELayer.LOOTBOX, ELayer.WINDMILL, ELayer.SPAWN, ELayer.POWERMILL, ELayer.CASTLESPIKE, ELayer.TURRET, ELayer.WOODFARM, ELayer.CHERRYWOODFARM, ELayer.STONEWARM, ELayer.CASTLEWALL, ELayer.CHEST, ELayer.DRAGONWALLBIG, ELayer.DRAGONWALLMEDIUM, ELayer.DRAGONWALLSMALL, ELayer.MAMMOTHWALL, ELayer.MAMMOTHWALLSMALL, ELayer.TELEPORT, ELayer.CACTUS ];
        const LayerExclude = [ ELayer.TREE, ELayer.WOODFARM, ELayer.CHERRYWOODFARM ];
        var EObjects;
        (function(EObjects) {
            EObjects[EObjects["BOOST"] = 6] = "BOOST";
            EObjects[EObjects["PLATFORM"] = 8] = "PLATFORM";
            EObjects[EObjects["TRAP"] = 9] = "TRAP";
            EObjects[EObjects["WINDMILL"] = 14] = "WINDMILL";
            EObjects[EObjects["SPAWN"] = 16] = "SPAWN";
            EObjects[EObjects["POWERMILL"] = 19] = "POWERMILL";
            EObjects[EObjects["ROOF"] = 48] = "ROOF";
        })(EObjects || (EObjects = {}));
        var EHats;
        (function(EHats) {
            EHats[EHats["BUSH"] = 1] = "BUSH";
            EHats[EHats["BERSERKER"] = 2] = "BERSERKER";
            EHats[EHats["JUNGLE"] = 3] = "JUNGLE";
            EHats[EHats["CRYSTAL"] = 4] = "CRYSTAL";
            EHats[EHats["SPIKEGEAR"] = 5] = "SPIKEGEAR";
            EHats[EHats["IMMUNITY"] = 6] = "IMMUNITY";
            EHats[EHats["BOOST"] = 7] = "BOOST";
            EHats[EHats["APPLEHAT"] = 8] = "APPLEHAT";
            EHats[EHats["SCUBA"] = 9] = "SCUBA";
            EHats[EHats["HOOD"] = 10] = "HOOD";
            EHats[EHats["DEMOLIST"] = 11] = "DEMOLIST";
        })(EHats || (EHats = {}));
        var EWeapons;
        (function(EWeapons) {
            EWeapons[EWeapons["MUSKET"] = 4] = "MUSKET";
            EWeapons[EWeapons["SHIELD"] = 11] = "SHIELD";
            EWeapons[EWeapons["STICK"] = 13] = "STICK";
            EWeapons[EWeapons["HAMMER"] = 15] = "HAMMER";
            EWeapons[EWeapons["BOW"] = 26] = "BOW";
            EWeapons[EWeapons["XBOW"] = 27] = "XBOW";
            EWeapons[EWeapons["PEARL"] = 50] = "PEARL";
            EWeapons[EWeapons["SCYTHE"] = 57] = "SCYTHE";
        })(EWeapons || (EWeapons = {}));
        var EItemTypes;
        (function(EItemTypes) {
            EItemTypes[EItemTypes["ATTACKING"] = 0] = "ATTACKING";
            EItemTypes[EItemTypes["SHOOTING"] = 1] = "SHOOTING";
            EItemTypes[EItemTypes["PLACEABLE"] = 2] = "PLACEABLE";
            EItemTypes[EItemTypes["FOOD"] = 3] = "FOOD";
        })(EItemTypes || (EItemTypes = {}));
        var EAnimals;
        (function(EAnimals) {
            EAnimals[EAnimals["COW"] = 14] = "COW";
            EAnimals[EAnimals["SHARK"] = 23] = "SHARK";
            EAnimals[EAnimals["WOLF"] = 24] = "WOLF";
            EAnimals[EAnimals["GOLDENCOW"] = 25] = "GOLDENCOW";
            EAnimals[EAnimals["DRAGON"] = 27] = "DRAGON";
            EAnimals[EAnimals["MAMMOTH"] = 28] = "MAMMOTH";
            EAnimals[EAnimals["DUCK"] = 36] = "DUCK";
        })(EAnimals || (EAnimals = {}));
        var PlacementType;
        (function(PlacementType) {
            PlacementType[PlacementType["DEFAULT"] = 0] = "DEFAULT";
            PlacementType[PlacementType["INVISIBLE"] = 1] = "INVISIBLE";
            PlacementType[PlacementType["HOLDING"] = 2] = "HOLDING";
        })(PlacementType || (PlacementType = {}));
        var EServers;
        (function(EServers) {
            EServers["SAND_EU_1"] = "SFRA";
            EServers["SAND_EU_2"] = "SFRA2BIS";
            EServers["SAND_USA_1"] = "SCA";
            EServers["SAND_USA_2"] = "SCA2";
            EServers["SAND_AS_1"] = "SGP";
            EServers["SAND_AS_2"] = "SGP2";
            EServers["SAND_AS_3"] = "SGP3BIS";
            EServers["NORMAL_EU_1"] = "FRA1FFA";
            EServers["NORMAL_USA_1"] = "CA1FFA";
            EServers["NORMAL_AS_1"] = "SGP1FFA";
            EServers["ROYALE_USA_1"] = "BRSCA";
        })(EServers || (EServers = {}));
        const selectData = {
            placementType: PlacementType,
            connectTo: EServers
        };
        var TargetReload;
        (function(TargetReload) {
            TargetReload[TargetReload["TURRET"] = 3e3] = "TURRET";
            TargetReload[TargetReload["HAT"] = 1300] = "HAT";
            TargetReload[TargetReload["DRAGON"] = 3e3] = "DRAGON";
        })(TargetReload || (TargetReload = {}));
        const storage = {
            get(key) {
                return JSON.parse(localStorage.getItem(key));
            },
            set(key, value) {
                localStorage.setItem(key, JSON.stringify(value));
            },
            delete(key) {
                localStorage.removeItem(key);
            }
        };
        const defaultSettings = {
            primary: "Digit1",
            secondary: "Digit2",
            heal: "KeyQ",
            wall: "Digit4",
            spike: "KeyV",
            windmill: "KeyN",
            trap: "KeyF",
            turret: "KeyH",
            tree: "KeyU",
            platform: "KeyT",
            spawn: "KeyJ",
            up: "KeyW",
            left: "KeyA",
            down: "KeyS",
            right: "KeyD",
            autoattack: "KeyE",
            lockRotation: "KeyX",
            openChat: "Enter",
            invisibleHit: 2,
            spikeInsta: "KeyR",
            toggleMenu: "Escape",
            fastBreak: "KeyZ",
            upgradeScythe: "...",
            unequip: "...",
            bush: "...",
            berserker: "...",
            jungle: "...",
            crystal: "...",
            spikegear: "...",
            immunity: 4,
            boost: 3,
            applehat: "...",
            scuba: "...",
            hood: "...",
            demolist: "...",
            placementType: PlacementType.INVISIBLE,
            placementSpeed: 1,
            autobed: true,
            automill: true,
            autoheal: true,
            jungleOnClown: true,
            lastHat: true,
            autoScuba: true,
            meleeAim: true,
            bowAim: true,
            spikeInstaAim: true,
            enemyTracers: true,
            teammateTracers: true,
            animalTracers: true,
            enemyColor: "#cc5151",
            teammateColor: "#8ecc51",
            animalColor: "#518ccc",
            arrows: true,
            rainbow: false,
            drawHP: true,
            showHoods: true,
            itemCounter: true,
            drawID: false,
            visualAim: true,
            hideNicknames: false,
            itemMarkers: true,
            teammateMarkers: true,
            enemyMarkers: true,
            trapActivated: true,
            itemMarkersColor: "#8ecc51",
            teammateMarkersColor: "#cfbc5f",
            enemyMarkersColor: "#cc5151",
            trapActivatedColor: "#48b2b8",
            markersBottom: true,
            hatReloadBar: true,
            hatReloadBarColor: "#5155cc",
            fireballReloadBar: true,
            fireballReloadBarColor: "#cf7148",
            turretReloadBar: true,
            turretReloadBarColor: "#51cc80",
            weaponReloadBar: true,
            weaponReloadBarColor: "#cc8251",
            windmillRotation: false,
            possibleShots: true,
            hideMessages: false,
            autochat: true,
            autochatMessages: [ "Dsync Client", "What is it?", "The most advanced hack for sploop!", "Download on greasyfork!" ],
            kill: true,
            killMessage: "{NAME}, you suck! {KILL}x",
            autospawn: false,
            smoothZoom: true,
            skipUpgrades: true,
            invisHitToggle: false,
            reverseZoom: false,
            autoAccept: false,
            connectTo: "SFRA",
            menuTransparency: false,
            blindUsers: [ 0, 0, 0 ]
        };
        const settings = {
            ...defaultSettings,
            ...storage.get("Dsync-settings")
        };
        for (const key in settings) {
            if (!defaultSettings.hasOwnProperty(key)) {
                delete settings[key];
            }
        }
        storage.set("Dsync-settings", settings);
        const Settings = settings;
        const TYPEOF = value => Object.prototype.toString.call(value).slice(8, -1).toLowerCase();
        const removeClass = (target, name) => {
            if (target instanceof HTMLElement) {
                target.classList.remove(name);
                return;
            }
            for (const element of target) {
                element.classList.remove(name);
            }
        };
        const formatCode = code => {
            code = code + "";
            if (code === "0") return "LBTN";
            if (code === "1") return "MBTN";
            if (code === "2") return "RBTN";
            if (code === "3") return "XBTN2";
            if (code === "4") return "XBTN1";
            if (code === "Escape") return "ESC";
            if (code === "BracketLeft") return "[";
            if (code === "BracketRight") return "]";
            if (code === "NumpadDivide") return "NUMDIV";
            if (code === "NumpadMultiply") return "NUMMULT";
            if (code === "NumpadSubtract") return "NUMSUB";
            if (code === "NumpadDecimal") return "NUMDEC";
            if (code === "CapsLock") return "CAPS";
            if (code === "PrintScreen") return "PRNT";
            if (code === "Backslash") return "\\";
            if (code === "Backquote") return "BQUOTE";
            if (code === "PageDown") return "PAGEDN";
            const NumpadDigitArrowKey = /^(?:Numpad|Digit|Arrow|Key)(\w+)$/;
            if (NumpadDigitArrowKey.test(code)) {
                code = code.replace(NumpadDigitArrowKey, "$1").replace(/Numpad/, "NUM");
            }
            const ExtraKeysRegex = /^(Control|Shift|Alt)(.).*/;
            if (ExtraKeysRegex.test(code)) {
                code = code.replace(ExtraKeysRegex, "$2$1").replace(/Control/, "CTRL");
            }
            return code.toUpperCase();
        };
        const contains = (target, name) => target.classList.contains(name);
        const isInput = target => {
            const element = target || document.activeElement;
            return [ "TEXTAREA", "INPUT" ].includes(element.tagName);
        };
        const inGame = () => {
            const homepage = document.querySelector("#homepage");
            return homepage && homepage.style.display === "none";
        };
        const formatData = object => {
            const data = {
                id: object[src_Dsync.props.id],
                type: object.type,
                x: object[src_Dsync.props.x],
                y: object[src_Dsync.props.y],
                x1: object[src_Dsync.props.x1],
                y1: object[src_Dsync.props.y1],
                x2: object[src_Dsync.props.x2],
                y2: object[src_Dsync.props.y2],
                angle: object[src_Dsync.props.angle],
                angle1: object[src_Dsync.props.angle1],
                angle2: object[src_Dsync.props.angle2],
                ownerID: object[src_Dsync.props.itemOwner],
                target: object
            };
            return {
                ...data,
                dir: angleObject(data, src_Dsync.myPlayer || {
                    x2: 0,
                    y2: 0
                }),
                distance: distObject(data, src_Dsync.myPlayer || {
                    x2: 0,
                    y2: 0
                })
            };
        };
        const formatProjectile = object => {
            const data = formatData(object);
            return {
                ...data,
                range: object.range,
                projectileType: object[src_Dsync.props.projectileType]
            };
        };
        const Common_formatObject = object => {
            const data = formatData(object);
            const entityData = src_Dsync.entityData[object.type];
            return {
                ...data,
                radius: entityData[src_Dsync.props.radius]
            };
        };
        const formatEntity = entity => {
            const object = Common_formatObject(entity);
            const entityData = src_Dsync.entityData[entity.type];
            const healthValue = entity[src_Dsync.props.health];
            const maxHealth = entityData[src_Dsync.props.maxHealth];
            return {
                ...object,
                healthValue,
                health: Math.ceil(entity[src_Dsync.props.health] / 255 * maxHealth),
                maxHealth,
                playerValue: entity[src_Dsync.props.playerValue]
            };
        };
        const Common_formatPlayer = entity => {
            const player = formatEntity(entity);
            return {
                ...player,
                hat: entity[src_Dsync.props.hat],
                isClown: player.playerValue === 128,
                currentItem: entity[src_Dsync.props.currentItem]
            };
        };
        const dist = (x1, y1, x2, y2) => Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2));
        const distObject = (entity1, entity2) => dist(entity1.x2, entity1.y2, entity2.x2, entity2.y2);
        const distance = (entity1, entity2) => {
            const entity1Has = "x" in entity1 && "y" in entity1;
            const entity2Has = "x" in entity2 && "y" in entity2;
            return {
                lerpDist: entity1Has && entity2Has ? dist(entity1.x, entity1.y, entity2.x, entity2.y) : null,
                dist: dist(entity1.x2, entity1.y2, entity2.x2, entity2.y2)
            };
        };
        const angle = (x1, y1, x2, y2) => Math.atan2(y1 - y2, x1 - x2);
        const angleObject = (entity1, entity2) => angle(entity1.x2, entity1.y2, entity2.x2, entity2.y2);
        const getAngle = (entity1, entity2) => {
            const entity1Has = "x" in entity1 && "y" in entity1;
            const entity2Has = "x" in entity2 && "y" in entity2;
            return {
                lerpAngle: entity1Has && entity2Has ? Math.atan2(entity1.y - entity2.y, entity1.x - entity2.x) : null,
                angle: Math.atan2(entity1.y2 - entity2.y2, entity1.x2 - entity2.x2)
            };
        };
        const random = (min, max) => {
            const isInteger = Number.isInteger(min) && Number.isInteger(max);
            if (isInteger) return Math.floor(Math.random() * (max - min + 1) + min);
            return Math.random() * (max - min) + min;
        };
        const toRad = deg => deg * (Math.PI / 180);
        const diff = (a, b) => Math.abs(a - b);
        const clamp = (value, min, max) => Math.min(Math.max(value, min), max);
        const lerp = (start, stop, amt) => amt * (stop - start) + start;
        const sleep = ms => new Promise((resolve => setTimeout(resolve, ms)));
        const linker = value => {
            const hook = {
                0: value,
                toString: radix => hook[0].toString(radix),
                valueOf: () => hook[0].valueOf()
            };
            return hook;
        };
        const download = (data, filename) => {
            const blob = new Blob([ JSON.stringify(data, null, 4) ], {
                type: "application/json "
            });
            const url = URL.createObjectURL(blob);
            const a = document.createElement("a");
            a.href = url;
            a.download = (filename || "settings") + ".txt";
            a.click();
            a.remove();
            URL.revokeObjectURL(url);
        };
        const capitalize = word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();
        const GM = (property, value) => {
            if (!src_Dsync.PRODUCTION) return true;
            try {
                return GM_info.script[property] === value;
            } catch (err) {
                return false;
            }
        };
        const fromCharCode = codes => codes.map((code => String.fromCharCode(code))).join("");
        const isBlind = () => !Settings.blindUsers.every((a => a === 1));
        let teammates = [];
        const UpdateClanList = userList => {
            teammates = userList;
        };
        const DeleteClan = () => {
            teammates = [];
        };
        const itemBar = index => src_Dsync.defaultData[src_Dsync.props.itemBar][index];
        const hasSecondary = () => {
            const item = src_Dsync.itemData[itemBar(1)];
            return item[src_Dsync.props.itemType] === EItems.SECONDARY;
        };
        const canShoot = () => {
            const item = src_Dsync.itemData[itemBar(1)];
            return item[src_Dsync.props.itemDataType] === EItemTypes.SHOOTING;
        };
        const hasItemByType = type => {
            const items = src_Dsync.defaultData[src_Dsync.props.itemBar];
            return items.find((id => src_Dsync.itemData[id][src_Dsync.props.itemType] === type));
        };
        const isWeapon = id => {
            const type = src_Dsync.itemData[id][src_Dsync.props.itemType];
            return type === 0 || type === 1;
        };
        const isSecondary = id => {
            const type = src_Dsync.itemData[id][src_Dsync.props.itemType];
            return type === 1;
        };
        const isStoneGold = () => {
            const item = Dsync.itemData[itemBar(0)];
            return [ 1, 2 ].includes(item[Dsync.props.weaponType]);
        };
        const getCount = type => src_Dsync.defaultData[src_Dsync.props.currentCount][type];
        const hasResources = id => {
            const cost = src_Dsync.itemData[id][src_Dsync.props.resourceAmount] || [ 0, 0, 0, 0 ];
            const {food, wood, stone, gold} = src_Dsync.resources;
            const hasFood = food >= cost[0];
            const hasWood = wood >= cost[1];
            const hasStone = stone >= cost[2];
            const hasGold = gold >= cost[3];
            return hasFood && hasWood && hasStone && hasGold;
        };
        let scytheToggle = false;
        const upgradeScythe = async () => {
            const goldenCowID = src_Dsync.goldenCowID();
            if (goldenCowID && itemBar(0) !== EWeapons.SCYTHE && !scytheToggle) {
                scytheToggle = true;
                src_Dsync.upgradeScythe(goldenCowID);
                await sleep(200);
                scytheToggle = false;
            }
        };
        const getAnimals = () => {
            const list = src_Dsync.entityList();
            return [ ...list[EAnimals.COW], ...list[EAnimals.SHARK], ...list[EAnimals.WOLF], ...list[EAnimals.GOLDENCOW], ...list[EAnimals.DRAGON], ...list[EAnimals.MAMMOTH], ...list[EAnimals.DUCK] ].map((entity => formatEntity(entity)));
        };
        const getEnemies = () => {
            const players = src_Dsync.entityList()[0];
            return players.map((player => formatEntity(player))).filter((({id, ownerID}) => {
                const isMyPlayer = id === src_Dsync.myPlayerID();
                const isTeammate = teammates.includes(ownerID);
                return !isMyPlayer && !isTeammate;
            }));
        };
        const getPlayerByOwner = ownerID => {
            const players = Dsync.players();
            for (const TObjectAny of players) {
                const player = formatPlayer(TObjectAny);
                if (player.ownerID === ownerID) return player;
            }
            return null;
        };
        const getEntities = () => [ ...getEnemies(), ...getAnimals() ];
        const getPlaceOnItems = () => {
            const entities = Dsync.entityList();
            const objects = [];
            for (let i = 0; i < CannotPlaceOn.length; i++) {
                const id = CannotPlaceOn[i];
                const items = entities[id].map((object => formatObject(object)));
                objects.push(...items);
            }
            return objects.sort(((a, b) => a.distance - b.distance));
        };
        const lineSegmentIntersectsCircle = (x1, y1, x2, y2, cx, cy, r) => {
            const xL = x2 - x1;
            const xC = x1 - cx;
            const yL = y2 - y1;
            const yC = y1 - cy;
            const a = xL * xL + yL * yL;
            const hB = xL * xC + yL * yC;
            const c = xC * xC + yC * yC - r * r;
            return hB * hB >= a * c && (-hB <= a || c + hB + hB + a <= 0) && (hB <= 0 || c <= 0);
        };
        const futurePosition = entity => {
            const {x1, y1, x2, y2} = entity;
            const distance = dist(x2, y2, x1, y1) * (entity === src_Dsync.myPlayer ? 1 : 2.2);
            const dir = angle(x2, y2, x1, y1);
            return {
                x2: x2 + distance * Math.cos(dir),
                y2: y2 + distance * Math.sin(dir)
            };
        };
        const getNearestEntities = shoot => {
            const enemies = getEnemies().map((enemy => ({
                ...enemy,
                dir: angleObject(enemy, src_Dsync.myPlayer),
                distance: distObject(enemy, src_Dsync.myPlayer)
            }))).sort(((a, b) => a.distance - b.distance));
            if (shoot) {
                enemies.sort(((a, b) => {
                    const hasShield1 = a.target[src_Dsync.props.currentItem] === EWeapons.SHIELD;
                    const hasShield2 = b.target[src_Dsync.props.currentItem] === EWeapons.SHIELD;
                    return hasShield1 ? 1 : hasShield2 ? -1 : 0;
                }));
            }
            const animals = getAnimals().map((enemy => ({
                ...enemy,
                dir: angleObject(enemy, src_Dsync.myPlayer),
                distance: distObject(enemy, src_Dsync.myPlayer)
            }))).sort(((a, b) => a.distance - b.distance));
            return [ ...enemies, ...animals ];
        };
        const entityIn = (entity, layer) => src_Dsync.entityList()[layer].some((target => {
            const object = Common_formatObject(target);
            return distance(entity, object).dist < entity.radius + object.radius;
        }));
        const projectileCanHitEntity = entity => {
            if (!canShoot()) return false;
            const range = src_Dsync.itemData[itemBar(EItems.SECONDARY)].range;
            const enemy = {
                ...entity,
                dir: angleObject(entity, src_Dsync.myPlayer),
                distance: distObject(entity, src_Dsync.myPlayer)
            };
            const x1 = src_Dsync.myPlayer.x2;
            const y1 = src_Dsync.myPlayer.y2;
            const x2 = x1 + range * Math.cos(enemy.dir);
            const y2 = y1 + range * Math.sin(enemy.dir);
            const myPlayerOnPlatform = entityIn(src_Dsync.myPlayer, ELayer.PLATFORM);
            const entityInRoof = entityIn(entity, ELayer.ROOF);
            if (myPlayerOnPlatform && entityInRoof) return false;
            const layers = src_Dsync.entityList();
            for (const layer of LayerObjects) {
                if (myPlayerOnPlatform && !LayerExclude.includes(layer)) continue;
                for (const entity of layers[layer]) {
                    const object = Common_formatObject(entity);
                    const dist = distObject(object, src_Dsync.myPlayer);
                    if (dist > enemy.distance) continue;
                    if (lineSegmentIntersectsCircle(x1, y1, x2, y2, object.x2, object.y2, object.radius)) {
                        const objectData = src_Dsync.entityData[object.type];
                        const maxHealth = objectData[src_Dsync.props.maxHealth];
                        if (maxHealth === undefined) return false;
                        return {
                            canHit: true,
                            needDestroy: true
                        };
                    }
                }
            }
            return {
                canHit: true,
                needDestroy: false
            };
        };
        const getNearestPossibleEnemy = index => {
            const range = src_Dsync.itemData[itemBar(index)].range;
            const shoot = canShoot() && index === 1;
            const enemies = getNearestEntities(shoot).filter((enemy => {
                const inDistance = enemy.distance < range + enemy.radius;
                if (shoot) {
                    const entityHit = projectileCanHitEntity(enemy);
                    return inDistance && typeof entityHit === "object" && entityHit.canHit;
                }
                return inDistance;
            }));
            if (shoot) {
                enemies.sort(((a, b) => {
                    const canHitA = projectileCanHitEntity(a);
                    const canHitB = projectileCanHitEntity(b);
                    return canHitA.needDestroy ? 1 : canHitB.needDestroy ? -1 : 0;
                }));
            }
            return enemies.length ? enemies[0] : null;
        };
        let move = 0;
        let attacking = false;
        let autoattack = false;
        let weapon = false;
        let isHealing = false;
        let attackingInvis = false;
        let toggleInvis = false;
        let currentItem = null;
        let currentItemID = null;
        const hotkeys = new Map;
        const isDoingNothing = () => !isHealing && !attackingInvis && currentItem === null;
        const getAngleFromBitmask = (bitmask, rotate) => {
            const pos = {
                x2: 0,
                y2: 0
            };
            if (bitmask & 1) pos.y2--;
            if (bitmask & 2) pos.y2++;
            if (bitmask & 4) pos.x2--;
            if (bitmask & 8) pos.x2++;
            if (rotate) {
                pos.x2 *= -1;
                pos.y2 *= -1;
            }
            return Math.atan2(pos.y2, pos.x2);
        };
        const accept = accept => {
            src_Dsync.accept(accept);
            src_Dsync.clanData[src_Dsync.props.acceptList].shift();
        };
        const spawn = async () => {
            await sleep(300);
            const play = document.querySelector("#play");
            if (play) play.click();
        };
        let chatCount = 0;
        let chatToggle = false;
        const autochat = async () => {
            if (chatToggle || isInput() || !inGame()) return;
            chatToggle = true;
            const messages = Settings.autochatMessages.filter((msg => msg.length));
            if (!messages.length) return;
            src_Dsync.chat(messages[chatCount++]);
            chatCount %= messages.length;
            await sleep(2e3);
            chatToggle = false;
        };
        const Controller_reset = () => {
            move = 0;
            attacking = false;
            autoattack = false;
            weapon = false;
            isHealing = false;
            attackingInvis = false;
            toggleInvis = false;
            currentItem = null;
            currentItemID = null;
            for (const [key] of hotkeys) {
                hotkeys.delete(key);
            }
        };
        const equipHat = (id, ignore = false, actual = true) => {
            const hat = (src_Dsync.myPlayer || {}).hat || 0;
            if (id === 0) {
                id = hat;
            } else if (hat === id && !ignore) return;
            if (actual) {
                src_Dsync.actualHat = id;
            }
            src_Dsync.equipHat(id);
            src_Dsync.equipHat(id);
        };
        const whichWeapon = type => {
            if (type !== undefined) {
                weapon = type;
            }
            src_Dsync.selectByID(itemBar(Number(weapon)));
        };
        const attack = (angle = null) => {
            src_Dsync.attack(angle !== null ? angle : src_Dsync.getAngle());
        };
        const place = (id, angle = null) => {
            const isHolding = Settings.placementType === PlacementType.HOLDING;
            whichWeapon();
            if (isHolding && attacking) attack(angle);
            src_Dsync.selectItem(id);
            attack(angle);
            src_Dsync.stopAttack();
            if (!isHolding) whichWeapon();
            if (attacking) attack(angle);
        };
        let count = 0;
        const placement = () => {
            if (currentItem === null) return;
            place(currentItem);
            count++;
            if ((count %= Settings.placementSpeed) === 0) {
                setTimeout(placement);
            } else {
                queueMicrotask(placement);
            }
        };
        const placementHandler = (type, code) => {
            const item = hasItemByType(type);
            if (item === undefined) return;
            if (!hasResources(item)) return;
            if (Settings.placementType === PlacementType.DEFAULT) {
                src_Dsync.selectItem(type);
                return;
            }
            hotkeys.set(code, type);
            currentItem = type;
            currentItemID = item;
            if (hotkeys.size === 1) {
                placement();
            }
        };
        const heal = () => {
            src_Dsync.selectItem(EItems.HEAL);
            attack();
            src_Dsync.stopAttack();
            whichWeapon();
            if (attacking) {
                attack();
            }
        };
        const healing = () => {
            if (!isHealing) return;
            heal();
            setTimeout(healing, 0);
        };
        const invisibleHit = () => {
            src_Dsync.mousemove = true;
            src_Dsync.aimTarget = null;
            if (Settings.invisHitToggle && !toggleInvis || !Settings.invisHitToggle && !attackingInvis) {
                toggleInvis = false;
                attackingInvis = false;
                return;
            }
            let angle = null;
            const enemy = getNearestPossibleEnemy(+!weapon);
            const shoot = canShoot() && !weapon;
            if (enemy && (Settings.meleeAim && !shoot || Settings.bowAim && shoot)) {
                angle = angleObject(futurePosition(enemy), futurePosition(src_Dsync.myPlayer));
                src_Dsync.mousemove = false;
                src_Dsync.aimTarget = enemy.target;
            }
            if (enemy && shoot || !shoot) {
                whichWeapon(!weapon);
                attack(angle);
                src_Dsync.stopAttack();
                whichWeapon(!weapon);
            }
            setTimeout(invisibleHit, 75);
        };
        const spikeInsta = () => {
            let angle = null;
            if (Settings.spikeInstaAim) {
                const enemy = getNearestPossibleEnemy(0);
                if (enemy) {
                    angle = enemy.dir;
                }
            }
            const oldWeapon = weapon;
            equipHat(EHats.BERSERKER);
            whichWeapon(false);
            place(EItems.SPIKE, angle);
            attack(angle);
            src_Dsync.stopAttack();
            whichWeapon(oldWeapon);
        };
        let fastBreakHat = 0;
        let oldWeapon = false;
        let fastBreaking = false;
        let startFastBreak = 0;
        const fastBreak = () => {
            if (fastBreaking) return;
            startFastBreak = Date.now();
            const primary = itemBar(0);
            const secondary = itemBar(1);
            const pickWeapon = hasSecondary() && !canShoot() && (secondary === EWeapons.HAMMER || primary === EWeapons.STICK);
            oldWeapon = weapon;
            fastBreaking = true;
            fastBreakHat = src_Dsync.myPlayer.hat;
            whichWeapon(pickWeapon);
            equipHat(EHats.DEMOLIST);
            attacking = true;
            attack();
        };
        const fastBreakStop = async () => {
            if (!fastBreaking) return;
            src_Dsync.stopAttack();
            attacking = false;
            whichWeapon(oldWeapon);
            const step = Date.now() - startFastBreak;
            if (step < TargetReload.HAT) await sleep(TargetReload.HAT - step);
            if (!src_Dsync.myPlayer.isClown) equipHat(fastBreakHat);
            fastBreaking = false;
        };
        const handleKeydown = (event, code) => {
            if (code === 1) event.preventDefault();
            if (event instanceof KeyboardEvent && event.repeat) return;
            if (src_Dsync.active) return;
            if (code === Settings.toggleMenu && !isInput(event.target)) {
                src_Dsync.toggleMenu();
            }
            if (!inGame()) return;
            if (code === Settings.openChat) {
                if (!isInput()) event.preventDefault();
                src_Dsync.toggleChat();
            }
            if (isInput(event.target)) return;
            if (code === Settings.primary) whichWeapon(false);
            if (code === Settings.secondary && hasSecondary()) whichWeapon(true);
            if (code === Settings.heal) {
                isHealing = true;
                if (Settings.placementType === PlacementType.DEFAULT) {
                    src_Dsync.selectItem(EItems.HEAL);
                } else {
                    healing();
                }
            }
            if (code === Settings.wall) placementHandler(EItems.WALL, code);
            if (code === Settings.spike) placementHandler(EItems.SPIKE, code);
            if (code === Settings.windmill) placementHandler(EItems.WINDMILL, code);
            if (code === Settings.trap) placementHandler(EItems.TRAP, code);
            if (code === Settings.turret) placementHandler(EItems.TURRET, code);
            if (code === Settings.tree) placementHandler(EItems.TREE, code);
            if (code === Settings.platform) placementHandler(EItems.PLATFORM, code);
            if (code === Settings.spawn) placementHandler(EItems.SPAWN, code);
            if (code === Settings.unequip) equipHat(src_Dsync.myPlayer.hat, true);
            if (code === Settings.bush) equipHat(EHats.BUSH);
            if (code === Settings.berserker) equipHat(EHats.BERSERKER);
            if (code === Settings.jungle) equipHat(EHats.JUNGLE);
            if (code === Settings.crystal) equipHat(EHats.CRYSTAL);
            if (code === Settings.spikegear) equipHat(EHats.SPIKEGEAR);
            if (code === Settings.immunity) equipHat(EHats.IMMUNITY);
            if (code === Settings.boost) equipHat(EHats.BOOST);
            if (code === Settings.applehat) equipHat(EHats.APPLEHAT);
            if (code === Settings.scuba) equipHat(EHats.SCUBA);
            if (code === Settings.hood) equipHat(EHats.HOOD);
            if (code === Settings.demolist) equipHat(EHats.DEMOLIST);
            if (code === Settings.invisibleHit && hasSecondary()) {
                if (Settings.invisHitToggle) {
                    toggleInvis = !toggleInvis;
                } else {
                    attackingInvis = true;
                }
                if (toggleInvis || attackingInvis) invisibleHit();
            }
            if (code === Settings.spikeInsta) spikeInsta();
            if (code === Settings.fastBreak) fastBreak();
            const copyMove = move;
            if (code === Settings.up) move |= 1;
            if (code === Settings.left) move |= 4;
            if (code === Settings.down) move |= 2;
            if (code === Settings.right) move |= 8;
            if (copyMove !== move) src_Dsync.move(move);
            if (event instanceof MouseEvent && code === 0) {
                const canAttack = !src_Dsync.mousedown(event);
                if (canAttack && src_Dsync.mousemove) {
                    attacking = true;
                    src_Dsync.attack(src_Dsync.getAngle());
                }
            }
            if (code === Settings.autoattack) {
                autoattack = !autoattack;
                src_Dsync.autoattack(autoattack);
            }
            if (code === Settings.lockRotation) src_Dsync.toggleRotation();
            if (code === Settings.upgradeScythe) upgradeScythe();
        };
        const handleKeyup = (event, code) => {
            if (code === Settings.heal && isHealing) {
                isHealing = false;
            }
            if (code === Settings.invisibleHit && attackingInvis) {
                attackingInvis = false;
            }
            if (code === Settings.fastBreak) fastBreakStop();
            const copyMove = move;
            if (code === Settings.up) move &= -2;
            if (code === Settings.left) move &= -5;
            if (code === Settings.down) move &= -3;
            if (code === Settings.right) move &= -9;
            if (copyMove !== move) src_Dsync.move(move);
            if (event instanceof MouseEvent && code === 0) {
                src_Dsync.mouseup(event);
                attacking = false;
            }
            if (currentItem !== null && hotkeys.delete(code)) {
                const entries = [ ...hotkeys ];
                currentItem = entries.length ? entries[entries.length - 1][1] : null;
                if (currentItem === null) {
                    currentItemID = null;
                    whichWeapon();
                }
            }
        };
        var code = '<header> <span>Dsync Client</span> <div id="version"> <svg width="15" height="15" viewBox="0 0 16 16" version="1.1"> <path d="M11.75 2.5a.75.75 0 100 1.5.75.75 0 000-1.5zm-2.25.75a2.25 2.25 0 113 2.122V6A2.5 2.5 0 0110 8.5H6a1 1 0 00-1 1v1.128a2.251 2.251 0 11-1.5 0V5.372a2.25 2.25 0 111.5 0v1.836A2.492 2.492 0 016 7h4a1 1 0 001-1v-.628A2.25 2.25 0 019.5 3.25zM4.25 12a.75.75 0 100 1.5.75.75 0 000-1.5zM3.5 3.25a.75.75 0 111.5 0 .75.75 0 01-1.5 0z"></path> </svg> <span></span> </div> <svg id="close-menu" class="icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30" width="30px" height="30px"> <path d="M 7 4 C 6.744125 4 6.4879687 4.0974687 6.2929688 4.2929688 L 4.2929688 6.2929688 C 3.9019687 6.6839688 3.9019687 7.3170313 4.2929688 7.7070312 L 11.585938 15 L 4.2929688 22.292969 C 3.9019687 22.683969 3.9019687 23.317031 4.2929688 23.707031 L 6.2929688 25.707031 C 6.6839688 26.098031 7.3170313 26.098031 7.7070312 25.707031 L 15 18.414062 L 22.292969 25.707031 C 22.682969 26.098031 23.317031 26.098031 23.707031 25.707031 L 25.707031 23.707031 C 26.098031 23.316031 26.098031 22.682969 25.707031 22.292969 L 18.414062 15 L 25.707031 7.7070312 C 26.098031 7.3170312 26.098031 6.6829688 25.707031 6.2929688 L 23.707031 4.2929688 C 23.316031 3.9019687 22.682969 3.9019687 22.292969 4.2929688 L 15 11.585938 L 7.7070312 4.2929688 C 7.5115312 4.0974687 7.255875 4 7 4 z"/> </svg> </header>';
        const Header = code;
        var Navbar_code = '<aside id="navbar-container"> <button class="open-menu active">Keybinds</button> <button class="open-menu">Combat</button> <button class="open-menu">Visuals</button> <button class="open-menu">Misc</button> <button class="open-menu bottom-align">Credits</button> </aside>';
        const Navbar = Navbar_code;
        var Keybinds_code = '<div class="menu-page opened"> <h1>Keybinds</h1> <p>Setup keybinds for items, weapons and hats</p> <div class="section"> <div class="section-title"> <h2>Items & Weapons</h2> <svg class="icon" version="1.0" xmlns="http://www.w3.org/2000/svg" width="64.000000pt" height="64.000000pt" viewBox="0 0 64.000000 64.000000" preserveAspectRatio="xMidYMid meet"> <g transform="translate(0.000000,64.000000) scale(0.100000,-0.100000)" stroke="none"> <path d="M160 575 l-54 -55 99 -100 100 -100 -100 -100 -100 -100 58 -57 57 -58 157 158 158 157 -155 155 c-85 85 -157 155 -160 155 -3 0 -30 -25 -60 -55z"/> </g> </svg> </div> <div class="section-content"> <div class="split-section"> <div class="section-option"> <span class="section-option-title">Primary</span> <button id="primary" class="section-option-hotkeyInput"></button> </div> <div class="section-option"> <span class="section-option-title">Secondary</span> <button id="secondary" class="section-option-hotkeyInput"></button> </div> <div class="section-option"> <span class="section-option-title">Heal</span> <button id="heal" class="section-option-hotkeyInput"></button> </div> <div class="section-option"> <span class="section-option-title">Wall</span> <button id="wall" class="section-option-hotkeyInput"></button> </div> <div class="section-option"> <span class="section-option-title">Spike</span> <button id="spike" class="section-option-hotkeyInput"></button> </div> <div class="section-option"> <span class="section-option-title">Windmill</span> <button id="windmill" class="section-option-hotkeyInput"></button> </div> </div> <div class="split-section"> <div class="section-option"> <span class="section-option-title">Trap/Boost</span> <button id="trap" class="section-option-hotkeyInput"></button> </div> <div class="section-option"> <span class="section-option-title">Turret</span> <button id="turret" class="section-option-hotkeyInput"></button> </div> <div class="section-option"> <span class="section-option-title">Tree/Stone</span> <button id="tree" class="section-option-hotkeyInput"></button> </div> <div class="section-option"> <span class="section-option-title">Platform</span> <button id="platform" class="section-option-hotkeyInput"></button> </div> <div class="section-option"> <span class="section-option-title">Cosy bed</span> <button id="spawn" class="section-option-hotkeyInput"></button> </div> </div> </div> </div> <div class="section"> <div class="section-title"> <h2>Combat & Functions</h2> <svg class="icon" version="1.0" xmlns="http://www.w3.org/2000/svg" width="64.000000pt" height="64.000000pt" viewBox="0 0 64.000000 64.000000" preserveAspectRatio="xMidYMid meet"> <g transform="translate(0.000000,64.000000) scale(0.100000,-0.100000)" stroke="none"> <path d="M160 575 l-54 -55 99 -100 100 -100 -100 -100 -100 -100 58 -57 57 -58 157 158 158 157 -155 155 c-85 85 -157 155 -160 155 -3 0 -30 -25 -60 -55z"/> </g> </svg> </div> <div class="section-content"> <div class="section-option"> <span class="section-option-title">Invisible hit</span> <button id="invisibleHit" class="section-option-hotkeyInput"></button> </div> <div class="section-option"> <span class="section-option-title">Spike insta</span> <button id="spikeInsta" class="section-option-hotkeyInput"></button> </div> <div class="section-option"> <span class="section-option-title"> Fast break <span class="tooltip"> * <span class="tooltip-text">When you press a key, it equips a demolist and starts attacking</span> </span> </span> <button id="fastBreak" class="section-option-hotkeyInput"></button> </div> <div class="section-option"> <span class="section-option-title">Zoom In</span> <button class="section-option-hotkeyInput smaller">WHEEL DN</button> </div> <div class="section-option"> <span class="section-option-title">Toggle Dsync Menu</span> <button id="toggleMenu" class="section-option-hotkeyInput"></button> </div> <div class="section-option"> <span class="section-option-title">Zoom Out</span> <button class="section-option-hotkeyInput smaller">WHEEL UP</button> </div> </div> </div> <div class="section"> <div class="section-title"> <h2>Hats</h2> <svg class="icon" version="1.0" xmlns="http://www.w3.org/2000/svg" width="64.000000pt" height="64.000000pt" viewBox="0 0 64.000000 64.000000" preserveAspectRatio="xMidYMid meet"> <g transform="translate(0.000000,64.000000) scale(0.100000,-0.100000)" stroke="none"> <path d="M160 575 l-54 -55 99 -100 100 -100 -100 -100 -100 -100 58 -57 57 -58 157 158 158 157 -155 155 c-85 85 -157 155 -160 155 -3 0 -30 -25 -60 -55z"/> </g> </svg> </div> <div class="section-content"> <div class="section-option"> <span class="section-option-title">Unequip hat</span> <button id="unequip" class="section-option-hotkeyInput"></button> </div> <div class="section-option"> <span class="section-option-title">Bush hat</span> <button id="bush" class="section-option-hotkeyInput"></button> </div> <div class="section-option"> <span class="section-option-title">Berserker</span> <button id="berserker" class="section-option-hotkeyInput"></button> </div> <div class="section-option"> <span class="section-option-title">Jungle gear</span> <button id="jungle" class="section-option-hotkeyInput"></button> </div> <div class="section-option"> <span class="section-option-title">Crystal gear</span> <button id="crystal" class="section-option-hotkeyInput"></button> </div> <div class="section-option"> <span class="section-option-title">Spike gear</span> <button id="spikegear" class="section-option-hotkeyInput"></button> </div> <div class="section-option"> <span class="section-option-title">Immunity gear</span> <button id="immunity" class="section-option-hotkeyInput"></button> </div> <div class="section-option"> <span class="section-option-title">Boost hat</span> <button id="boost" class="section-option-hotkeyInput"></button> </div> <div class="section-option"> <span class="section-option-title">Apple hat</span> <button id="applehat" class="section-option-hotkeyInput"></button> </div> <div class="section-option"> <span class="section-option-title">Scuba gear</span> <button id="scuba" class="section-option-hotkeyInput"></button> </div> <div class="section-option"> <span class="section-option-title">Hood</span> <button id="hood" class="section-option-hotkeyInput"></button> </div> <div class="section-option"> <span class="section-option-title">Demolist</span> <button id="demolist" class="section-option-hotkeyInput"></button> </div> </div> </div> <div class="section"> <div class="section-title"> <h2>Controls & Movement</h2> <svg class="icon" version="1.0" xmlns="http://www.w3.org/2000/svg" width="64.000000pt" height="64.000000pt" viewBox="0 0 64.000000 64.000000" preserveAspectRatio="xMidYMid meet"> <g transform="translate(0.000000,64.000000) scale(0.100000,-0.100000)" stroke="none"> <path d="M160 575 l-54 -55 99 -100 100 -100 -100 -100 -100 -100 58 -57 57 -58 157 158 158 157 -155 155 c-85 85 -157 155 -160 155 -3 0 -30 -25 -60 -55z"/> </g> </svg> </div> <div class="section-content"> <div class="section-option"> <span class="section-option-title">Up</span> <button id="up" class="section-option-hotkeyInput"></button> </div> <div class="section-option"> <span class="section-option-title">Left</span> <button id="left" class="section-option-hotkeyInput"></button> </div> <div class="section-option"> <span class="section-option-title">Down</span> <button id="down" class="section-option-hotkeyInput"></button> </div> <div class="section-option"> <span class="section-option-title">Right</span> <button id="right" class="section-option-hotkeyInput"></button> </div> <div class="split"></div> <div class="section-option"> <span class="section-option-title">Auto attack</span> <button id="autoattack" class="section-option-hotkeyInput"></button> </div> <div class="section-option"> <span class="section-option-title">Lock rotation</span> <button id="lockRotation" class="section-option-hotkeyInput"></button> </div> <div class="section-option"> <span class="section-option-title">Open chat</span> <button id="openChat" class="section-option-hotkeyInput"></button> </div> <div class="section-option"> <span class="section-option-title">Upgrade scythe</span> <button id="upgradeScythe" class="section-option-hotkeyInput"></button> </div> </div> </div> </div>';
        const Keybinds = Keybinds_code;
        var Combat_code = '<div class="menu-page"> <h1>Combat</h1> <p>Modify combat settings, change pvp behavior</p> <div class="section opened"> <div class="section-title"> <h2>Placement</h2> </div> <div class="section-content one-row"> <div class="section-option"> <span class="section-option-title"> Placement speed <span class="tooltip"> * <span class="tooltip-text">The higher value, the faster you place</span> </span> </span> <label class="slider"> <input id="placementSpeed" min="1" max="100" type="range"> <span class="slider-value">100</span> </label> </div> <div class="section-option"> <span class="section-option-title">Placement type</span> <select id="placementType"></select> </div> <div class="section-option"> <span class="section-option-title">Autobed</span> <label class="switch-checkbox"> <input id="autobed" type="checkbox"> <span></span> </label> </div> <div class="section-option"> <span class="section-option-title">Automill</span> <label class="switch-checkbox"> <input id="automill" type="checkbox"> <span></span> </label> </div> </div> </div> <div class="section opened"> <div class="section-title"> <h2>Healing</h2> </div> <div class="section-content"> <div class="split-section"> <div class="section-option"> <span class="section-option-title">Autoheal</span> <label class="switch-checkbox"> <input id="autoheal" type="checkbox"> <span></span> </label> </div> </div> </div> </div> <div class="section opened"> <div class="section-title"> <h2>Hats</h2> </div> <div class="section-content"> <div class="split-section"> <div class="section-option"> <span class="section-option-title">Jungle On Clown</span> <label class="switch-checkbox"> <input id="jungleOnClown" type="checkbox"> <span></span> </label> </div> <div class="section-option"> <span class="section-option-title"> Equip last hat <span class="tooltip"> * <span class="tooltip-text">On spawn, the last hat you had will be equipped</span> </span> </span> <label class="switch-checkbox"> <input id="lastHat" type="checkbox"> <span></span> </label> </div> <div class="section-option"> <span class="section-option-title">Auto scuba</span> <label class="switch-checkbox"> <input id="autoScuba" type="checkbox"> <span></span> </label> </div> </div> </div> </div> <div class="section opened"> <div class="section-title"> <h2>Autoaim</h2> </div> <div class="section-content"> <div class="split-section"> <div class="section-option"> <span class="section-option-title">Melee</span> <label class="switch-checkbox"> <input id="meleeAim" type="checkbox"> <span></span> </label> </div> <div class="section-option"> <span class="section-option-title">Bow</span> <label class="switch-checkbox"> <input id="bowAim" type="checkbox"> <span></span> </label> </div> <div class="section-option"> <span class="section-option-title">Spike insta</span> <label class="switch-checkbox"> <input id="spikeInstaAim" type="checkbox"> <span></span> </label> </div> </div> </div> </div> </div>';
        const Combat = Combat_code;
        var Visuals_code = '<div class="menu-page"> <h1>Visuals</h1> <p>Customize your visuals, or you can disable it for performance</p> <div class="section opened"> <div class="section-title"> <h2>Tracers</h2> </div> <div class="section-content"> <div class="section-option"> <span class="section-option-title">Enemies</span> <div class="content"> <button class="default-color" title="Reset Color"></button> <input id="enemyColor" type="color"> <label class="switch-checkbox"> <input id="enemyTracers" type="checkbox"> <span></span> </label> </div> </div> <div class="section-option"> <span class="section-option-title">Arrows</span> <label class="switch-checkbox"> <input id="arrows" type="checkbox"> <span></span> </label> </div> <div class="section-option"> <span class="section-option-title">Teammates</span> <div class="content"> <button class="default-color" title="Reset Color"></button> <input id="teammateColor" type="color"> <label class="switch-checkbox"> <input id="teammateTracers" type="checkbox"> <span></span> </label> </div> </div> <div class="section-option"> <span class="section-option-title">Rainbow colors</span> <label class="switch-checkbox"> <input id="rainbow" type="checkbox"> <span></span> </label> </div> <div class="section-option"> <span class="section-option-title">Animals</span> <div class="content"> <button class="default-color" title="Reset Color"></button> <input id="animalColor" type="color"> <label class="switch-checkbox"> <input id="animalTracers" type="checkbox"> <span></span> </label> </div> </div> </div> </div> <div class="section opened"> <div class="section-title"> <h2>Markers</h2> </div> <div class="section-content"> <div class="section-option"> <span class="section-option-title">Your markers</span> <div class="content"> <button class="default-color" title="Reset Color"></button> <input id="itemMarkersColor" type="color"> <label class="switch-checkbox"> <input id="itemMarkers" type="checkbox"> <span></span> </label> </div> </div> <div class="section-option"> <span class="section-option-title">Teammates</span> <div class="content"> <button class="default-color" title="Reset Color"></button> <input id="teammateMarkersColor" type="color"> <label class="switch-checkbox"> <input id="teammateMarkers" type="checkbox"> <span></span> </label> </div> </div> <div class="section-option"> <span class="section-option-title">Enemies</span> <div class="content"> <button class="default-color" title="Reset Color"></button> <input id="enemyMarkersColor" type="color"> <label class="switch-checkbox"> <input id="enemyMarkers" type="checkbox"> <span></span> </label> </div> </div> <div class="section-option"> <span class="section-option-title"> Trap activated <span class="tooltip"> * <span class="tooltip-text">When the player or animal will be trapped, marker will change color</span> </span> </span> <div class="content"> <button class="default-color" title="Reset Color"></button> <input id="trapActivatedColor" type="color"> <label class="switch-checkbox"> <input id="trapActivated" type="checkbox"> <span></span> </label> </div> </div> <div class="section-option"> <span class="section-option-title"> Markers at bottom <span class="tooltip"> * <span class="tooltip-text">Faster, but you won\'t be able to see markers if you\'re trapped or on platform</span> </span> </span> <label class="switch-checkbox"> <input id="markersBottom" type="checkbox"> <span></span> </label> </div> </div> </div> <div class="section opened"> <div class="section-title"> <h2>Reload bars</h2> </div> <div class="section-content"> <div class="section-option"> <span class="section-option-title">Hat reload bar</span> <div class="content"> <button class="default-color" title="Reset Color"></button> <input id="hatReloadBarColor" type="color"> <label class="switch-checkbox"> <input id="hatReloadBar" type="checkbox"> <span></span> </label> </div> </div> <div class="section-option"> <span class="section-option-title">Fireball reload bar</span> <div class="content"> <button class="default-color" title="Reset Color"></button> <input id="fireballReloadBarColor" type="color"> <label class="switch-checkbox"> <input id="fireballReloadBar" type="checkbox"> <span></span> </label> </div> </div> <div class="section-option"> <span class="section-option-title">Turret reload bar</span> <div class="content"> <button class="default-color" title="Reset Color"></button> <input id="turretReloadBarColor" type="color"> <label class="switch-checkbox"> <input id="turretReloadBar" type="checkbox"> <span></span> </label> </div> </div> <div class="section-option"> <span class="section-option-title">Weapon reload bar</span> <div class="content"> <button class="default-color" title="Reset Color"></button> <input id="weaponReloadBarColor" type="color"> <label class="switch-checkbox"> <input id="weaponReloadBar" type="checkbox"> <span></span> </label> </div> </div> </div> </div> <div class="section opened"> <div class="section-title"> <h2>Player</h2> </div> <div class="section-content"> <div class="section-option"> <span class="section-option-title">Anti hood</span> <label class="switch-checkbox"> <input id="showHoods" type="checkbox"> <span></span> </label> </div> <div class="section-option"> <span class="section-option-title">Render HP</span> <label class="switch-checkbox"> <input id="drawHP" type="checkbox"> <span></span> </label> </div> <div class="section-option"> <span class="section-option-title">Item counter</span> <label class="switch-checkbox"> <input id="itemCounter" type="checkbox"> <span></span> </label> </div> <div class="section-option"> <span class="section-option-title">Draw ID</span> <label class="switch-checkbox"> <input id="drawID" type="checkbox"> <span></span> </label> </div> <div class="section-option"> <span class="section-option-title"> Visual aim <span class="tooltip"> * <span class="tooltip-text">It will show where are you aiming</span> </span> </span> <label class="switch-checkbox"> <input id="visualAim" type="checkbox"> <span></span> </label> </div> <div class="section-option"> <span class="section-option-title"> Hide nicknames <span class="tooltip"> * <span class="tooltip-text">It will not render the badge, clan name and nickname of the user</span> </span> </span> <label class="switch-checkbox"> <input id="hideNicknames" type="checkbox"> <span></span> </label> </div> </div> </div> <div class="section opened"> <div class="section-title"> <h2>Other</h2> </div> <div class="section-content"> <div class="section-option"> <span class="section-option-title">Windmill rotation</span> <label class="switch-checkbox"> <input id="windmillRotation" type="checkbox"> <span></span> </label> </div> <div class="section-option"> <span class="section-option-title"> Possible shots <span class="tooltip"> * <span class="tooltip-text">Draws a crosshair on entities that can be hit by a projectile</span> </span> </span> <label class="switch-checkbox"> <input id="possibleShots" type="checkbox"> <span></span> </label> </div> <div class="section-option"> <span class="section-option-title">Hide chat messages</span> <label class="switch-checkbox"> <input id="hideMessages" type="checkbox"> <span></span> </label> </div> </div> </div> </div>';
        const Visuals = Visuals_code;
        var Misc_code = '<div class="menu-page"> <h1>Misc</h1> <p>Customize misc settings, add autochat messages, reset settings</p> <div class="section opened"> <div class="section-title"> <h2>Chat</h2> </div> <div class="section-content one-row"> <div class="section-option"> <span class="section-option-title">Auto chat</span> <div class="content"> <input class="input autochat" type="text" maxlength="35"> <input class="input autochat" type="text" maxlength="35"> <input class="input autochat" type="text" maxlength="35"> <input class="input autochat" type="text" maxlength="35"> <label class="switch-checkbox"> <input id="autochat" type="checkbox"> <span></span> </label> </div> </div> <div class="section-option"> <span class="section-option-title"> Kill message <span class="tooltip"> * <span class="tooltip-text left"> <div>Variables:</div> <div><span class="highlight">{KILL}</span> - amount of kills</div> <div><span class="highlight">{NAME}</span> - name of the player you killed</div> </span> </span> </span> <div class="content"> <input id="killMessage" class="input" type="text" maxlength="35"> <label class="switch-checkbox"> <input id="kill" type="checkbox"> <span></span> </label> </div> </div> </div> </div> <div class="section opened"> <div class="section-title"> <h2>Other</h2> </div> <div class="section-content"> <div class="section-option"> <span class="section-option-title">Auto spawn</span> <label class="switch-checkbox"> <input id="autospawn" type="checkbox"> <span></span> </label> </div> <div class="section-option"> <span class="section-option-title"> Smooth zoom <span class="tooltip"> * <span class="tooltip-text">Disable for performance</span> </span> </span> <label class="switch-checkbox"> <input id="smoothZoom" type="checkbox"> <span></span> </label> </div> <div class="section-option"> <span class="section-option-title"> Skip upgrades <span class="tooltip"> * <span class="tooltip-text">When you have only 1 item in the upgradebar, it will automatically select it</span> </span> </span> <label class="switch-checkbox"> <input id="skipUpgrades" type="checkbox"> <span></span> </label> </div> <div class="section-option"> <span class="section-option-title"> Invis hit toggle <span class="tooltip"> * <span class="tooltip-text">If enabled, invisible hit hotkey will work in toggle mode. Useful when you don\'t want to hold this button permanently</span> </span> </span> <label class="switch-checkbox"> <input id="invisHitToggle" type="checkbox"> <span></span> </label> </div> <div class="section-option"> <span class="section-option-title">Reverse zoom</span> <label class="switch-checkbox"> <input id="reverseZoom" type="checkbox"> <span></span> </label> </div> <div class="section-option"> <span class="section-option-title">Auto accept</span> <label class="switch-checkbox"> <input id="autoAccept" type="checkbox"> <span></span> </label> </div> <div class="section-option"> <span class="section-option-title">Always connect to</span> <select id="connectTo" class="smaller"></select> </div> </div> </div> <div class="section opened"> <div class="section-title"> <h2>Menu</h2> </div> <div class="section-content one-row"> <div class="section-option"> <span class="section-option-title">Menu transparency</span> <label class="switch-checkbox"> <input id="menuTransparency" type="checkbox"> <span></span> </label> </div> <div class="section-option"> <div class="content-double"> <button id="reset-settings" class="button red">Reset settings</button> <button id="download-settings" class="button">Download settings</button> <div class="form-upload"> <input id="upload-settings" type="file" accept=".txt"> <span class="light">DRAG SETTINGS FILE HERE OR <span class="light-extra">BROWSE</span></span> </div> </div> </div> </div> </div> </div>';
        const Misc = Misc_code;
        var Credits_code = '<div class="menu-page"> <h1>Credits</h1> <P>Some details about the script and links to my socials</P> <div class="section opened"> <div class="section-content" style="max-height:100%"> <div class="split-section"> <div class="section-option text"> <span class="section-option-title">Author</span> <span class="text-value">Murka</span> </div> <div class="section-option text"> <svg class="icon" version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"> <path d="M512 12.672c-282.88 0-512 229.248-512 512 0 226.261 146.688 418.133 350.080 485.76 25.6 4.821 34.987-11.008 34.987-24.619 0-12.16-0.427-44.373-0.64-87.040-142.421 30.891-172.459-68.693-172.459-68.693-23.296-59.093-56.96-74.88-56.96-74.88-46.379-31.744 3.584-31.104 3.584-31.104 51.413 3.584 78.421 52.736 78.421 52.736 45.653 78.293 119.851 55.68 149.12 42.581 4.608-33.109 17.792-55.68 32.427-68.48-113.707-12.8-233.216-56.832-233.216-253.013 0-55.893 19.84-101.547 52.693-137.387-5.76-12.928-23.040-64.981 4.48-135.509 0 0 42.88-13.739 140.8 52.48 40.96-11.392 84.48-17.024 128-17.28 43.52 0.256 87.040 5.888 128 17.28 97.28-66.219 140.16-52.48 140.16-52.48 27.52 70.528 10.24 122.581 5.12 135.509 32.64 35.84 52.48 81.493 52.48 137.387 0 196.693-119.68 240-233.6 252.587 17.92 15.36 34.56 46.763 34.56 94.72 0 68.523-0.64 123.563-0.64 140.203 0 13.44 8.96 29.44 35.2 24.32 204.843-67.157 351.403-259.157 351.403-485.077 0-282.752-229.248-512-512-512z"></path> </svg> <a href="https://github.com/Murka007/Dsync-client" class="text-value" target="_blank" title="Give a star please :)">Dsync client</a> </div> <div class="section-option text"> <svg class="icon" version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"> <path d="M26.963 0c1.875 0 3.387 1.516 3.476 3.3v28.7l-3.569-3.031-1.96-1.784-2.139-1.864 0.893 2.94h-18.717c-1.869 0-3.387-1.42-3.387-3.301v-21.653c0-1.784 1.52-3.303 3.393-3.303h22zM18.805 7.577h-0.040l-0.269 0.267c2.764 0.8 4.101 2.049 4.101 2.049-1.781-0.891-3.387-1.336-4.992-1.516-1.16-0.18-2.32-0.085-3.3 0h-0.267c-0.627 0-1.96 0.267-3.747 0.98-0.623 0.271-0.98 0.448-0.98 0.448s1.336-1.336 4.28-2.049l-0.18-0.18c0 0-2.229-0.085-4.636 1.693 0 0-2.407 4.192-2.407 9.36 0 0 1.333 2.32 4.991 2.408 0 0 0.533-0.711 1.073-1.336-2.053-0.624-2.853-1.872-2.853-1.872s0.179 0.088 0.447 0.267h0.080c0.040 0 0.059 0.020 0.080 0.040v0.008c0.021 0.021 0.040 0.040 0.080 0.040 0.44 0.181 0.88 0.36 1.24 0.533 0.621 0.269 1.42 0.537 2.4 0.715 1.24 0.18 2.661 0.267 4.28 0 0.8-0.18 1.6-0.356 2.4-0.713 0.52-0.267 1.16-0.533 1.863-0.983 0 0-0.8 1.248-2.94 1.872 0.44 0.621 1.060 1.333 1.060 1.333 3.659-0.080 5.080-2.4 5.16-2.301 0-5.16-2.42-9.36-2.42-9.36-2.18-1.619-4.22-1.68-4.58-1.68zM19.029 13.461c0.937 0 1.693 0.8 1.693 1.78 0 0.987-0.76 1.787-1.693 1.787s-1.693-0.8-1.693-1.779c0.003-0.987 0.764-1.784 1.693-1.788zM12.972 13.461c0.933 0 1.688 0.8 1.688 1.78 0 0.987-0.76 1.787-1.693 1.787s-1.693-0.8-1.693-1.779c0-0.987 0.76-1.784 1.699-1.788z"></path> </svg> <a href="https://discord.gg/sG9cyfGPj5" class="text-value" target="_blank" title="Join my discord server">Coding paradise</a> </div> <div class="section-option text"> <svg class="icon" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 96 96"> <circle fill="#36363d" stroke="#6a6a81" stroke-width="2" r="48" cy="48" cx="48"/> <clipPath id="GreasyForkCircleClip" clipPathUnits="userSpaceOnUse"> <circle fill="#000" r="47" cy="48" cx="48"/> </clipPath> <text fill="#9494b8" clip-path="url(#GreasyForkCircleClip)" text-anchor="middle" font-size="18" font-family="\'DejaVu Sans\', Verdana, Arial, \'Liberation Sans\', sans-serif" letter-spacing="-0.75" pointer-events="none" style="-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;user-select:none"> <tspan x="51" y="13" textLength="57">= null;</tspan> <tspan x="56" y="35" textLength="98">function init</tspan> <tspan x="49" y="57" textLength="113">for (var i = 0;</tspan> <tspan x="50" y="79" textLength="105">XmlHttpReq</tspan> <tspan x="48" y="101" textLength="80">appendCh</tspan> </text> <path fill="#36363d" stroke="#36363d" stroke-width="4" d="M 44,29\r\n                          a6.36396,6.36396 0,0,1 0,9\r\n                          l36,36\r\n                          a3.25,3.25 0,0,1 -6.5,6.5\r\n                          l-36,-36\r\n                          a6.36396,6.36396 0,0,1 -9,0\r\n                          l-19,-19\r\n                          a1.76777,1.76777 0,0,1 0,-2.5\r\n                          l13.0,-13\r\n                          a1.76777,1.76777 0,0,1 2.5,0\r\n                          z"/> <path fill="#9494b8" d="M 44,29\r\n                          a6.36396,6.36396 0,0,1 0,9\r\n                          l36,36\r\n                          a3.25,3.25 0,0,1 -6.5,6.5\r\n                          l-36,-36\r\n                          a6.36396,6.36396 0,0,1 -9,0\r\n                          l-19,-19\r\n                          a1.76777,1.76777 0,0,1 2.5,-2.5\r\n                          l14,14 4,-4 -14,-14\r\n                          a1.76777,1.76777 0,0,1 2.5,-2.5\r\n                          l14,14 4,-4 -14,-14\r\n                          a1.76777,1.76777 0,0,1 2.5,-2.5\r\n                          z"/> </svg> <a href="https://greasyfork.org/en/users/919633" class="text-value" target="_blank" title="Please support this script on greasyfork">Dsync client</a> </div> </div> </div> </div> </div>';
        const Credits = Credits_code;
        const styles = '@import"https://fonts.googleapis.com/css2?family=Lato:wght@400;700;900&display=swap";header{background:#2f2f31;color:#76689a;padding:5px 10px;display:flex;justify-content:flex-start;align-items:center}header #version{align-self:flex-end;color:#9787bd;font-size:.5em;font-weight:600;margin-left:10px}header #version svg{fill:#9787bd}header .icon{margin-left:auto;width:35px;height:35px;fill:#cebcb4;transition:fill 100ms;cursor:pointer}header .icon:hover{fill:#ffe7dc}#navbar-container{display:flex;flex-direction:column;padding:10px;margin-right:10px;background:#2f2f31}#navbar-container .open-menu{outline:none;border:none;cursor:pointer;font-weight:900;font-size:1.4rem;padding:10px;background:#313135;color:#ffe7dc;border-right:1px solid;border-right-color:rgba(0,0,0,0);transition:background 100ms,color 100ms,border-right-color 100ms}#navbar-container .open-menu:hover{background:#313135}#navbar-container .open-menu:active{background:#ffe7dc;color:#313135}#navbar-container .open-menu.active{pointer-events:none;background:#313135;border-right-color:#ffe7dc}#navbar-container .bottom-align{margin-bottom:0px;margin-top:auto !important}@-webkit-keyframes appear{from{opacity:0}to{opacity:1}}@-webkit-keyframes disappear{from{opacity:1}to{opacity:0}}@-webkit-keyframes failedTransition{0%{transform:translate(0px, 0px)}10%{transform:translate(-35px, -10px)}30%{transform:translate(25px, 8px)}50%{transform:translate(-15px, -6px)}70%{transform:translate(5px, 4px)}100%{transform:translate(0px, 0px)}}@keyframes appear{from{opacity:0}to{opacity:1}}@keyframes disappear{from{opacity:1}to{opacity:0}}@keyframes failedTransition{0%{transform:translate(0px, 0px)}10%{transform:translate(-35px, -10px)}30%{transform:translate(25px, 8px)}50%{transform:translate(-15px, -6px)}70%{transform:translate(5px, 4px)}100%{transform:translate(0px, 0px)}}.menu-page{display:none;background:#2f2f31;padding:10px;padding-top:0px}.menu-page.opened{display:block;animation:appear 300ms forwards}.menu-page h1{color:#76689a;font-size:1.5em;font-weight:900}.menu-page h2{color:#9494b8;font-size:1em;font-weight:900}.menu-page p{color:#675a86;font-size:.5em;font-weight:700}.menu-page .content{display:flex;justify-content:space-between;align-items:center;gap:10px}.menu-page .content-double{display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px;width:250px}.menu-page .content-double button{width:48%}.menu-page .content-double:nth-child(3){width:100%}.menu-page #killMessage{width:270px}.menu-page .highlight{font-weight:700;color:#ffe7dc;background:#6a6a81;padding:0 1px}.menu-page .section{background:#36363d;border-radius:5px;margin:20px 0}.menu-page .section:last-child{margin-bottom:0px}.menu-page .section .section-title{display:flex;justify-content:space-between;align-items:center;padding:10px}.menu-page .section .section-title .icon{width:25px;height:25px;margin-right:10px;fill:#cebcb4;transition:fill 100ms,transform 100ms}.menu-page .section .section-title .icon.rotate{transform:rotate(90deg);fill:#ffe7dc}.menu-page .section .section-title:hover .icon{fill:#ffe7dc}.menu-page .section:not(.opened) .section-title{cursor:pointer}.menu-page .section:not(.opened) .section-content{overflow:hidden}.menu-page .section .section-content{padding:10px;padding-top:0px;display:grid;grid-template-columns:1fr 1fr;transition:max-height 250ms cubic-bezier(0, 1, 0, 1);max-height:0px}.menu-page .section .section-content.one-row{grid-template-columns:1fr}.menu-page .section .section-content.opened{transition:max-height 250ms ease-out;max-height:100%}.menu-page .section .section-content .split{grid-column:1/3;margin-top:10px;background:#40404a;height:2px}.menu-page .section .section-content .section-option{display:flex;justify-content:space-between;align-items:center;margin-top:10px}.menu-page .section .section-content .section-option .icon{width:35px;height:35px;fill:#6a6a81}.menu-page .section .section-content .section-option.centered{justify-content:center}.menu-page .section .section-content .section-option.text{justify-content:flex-start;gap:10px}.menu-page .section .section-content .section-option.text .text-value{font-size:.7em;color:#9494b8}.menu-page .section .section-content .section-option .section-option-title{color:#6a6a81;font-size:.8em}.menu-page .section .section-content .section-option .section-option-hotkeyInput{margin-right:50px;cursor:pointer;font-weight:900;font-size:.6em;padding-bottom:8px;outline:none;border:none;text-align:center;width:80px;height:35px;border-radius:7.5px;background:#7d7d9b;color:#adbcd8;box-shadow:0px -6px 0px 0px #68687c inset}.menu-page .section .section-content .section-option .section-option-hotkeyInput.red{background:#9e5454;color:#d8adad;box-shadow:0px -6px 0px 0px #783d3d inset}.menu-page .section .section-content .section-option .section-option-hotkeyInput:not([id]){cursor:not-allowed}.menu-page .section .section-content .section-option .section-option-hotkeyInput.smaller{font-size:.41em}.menu-page .section .section-content .section-option .switch-checkbox{position:relative;margin-right:25px;width:70px;height:25px}.menu-page .section .section-content .section-option .switch-checkbox input{width:0;height:0;opacity:0}.menu-page .section .section-content .section-option .switch-checkbox input:checked+span{background:#7d7d9b;box-shadow:0px 5px 0px 0px #68687c inset}.menu-page .section .section-content .section-option .switch-checkbox input:checked+span:before{background:#ffe7dc;transform:translateX(42px)}.menu-page .section .section-content .section-option .switch-checkbox span{position:absolute;cursor:pointer;top:0;left:0;bottom:0;right:0;width:100%;height:100%;display:flex;align-items:center;background:#5f5f79;box-shadow:0px 5px 0px 0px #4d4d5f inset;border-radius:10px;transition:all 100ms ease-in-out}.menu-page .section .section-content .section-option .switch-checkbox span:before{position:absolute;content:"";width:28px;height:28px;border-radius:50%;background:#f0dcd3;box-shadow:0px -5px 0px 0px #cebcb4 inset;border:2px solid #adbcd8;transition:all 100ms ease-in-out}.menu-page .section .section-content .section-option .slider{position:relative;margin-right:45px}.menu-page .section .section-content .section-option .slider input{-webkit-appearance:none;outline:none;cursor:pointer;width:154px;height:20.8333333333px;border-radius:10px;background:#7d7d9b;box-shadow:0px 5px 0px 0px #68687c inset}.menu-page .section .section-content .section-option .slider input::-webkit-slider-thumb{-webkit-appearance:none;width:28px;height:28px;border-radius:50%;background:#ffe7dc;box-shadow:0px -5px 0px 0px #cebcb4 inset;border:2px solid #adbcd8}.menu-page .section .section-content .section-option .slider .slider-value{position:absolute;margin-left:5px;color:#6a6a81;font-size:.65em}.menu-page .section .section-content .section-option .input{outline:none;border:none;font-weight:900;text-align:center;width:130px;height:35px;padding-bottom:6px;border-radius:7.5px;background:#7d7d9b;color:#adbcd8;box-shadow:0px -6px 0px 0px #68687c inset}.menu-page .section .section-content .section-option .input:focus{border:3px solid #f0dcd3}.menu-page .section .section-content .section-option .button{outline:none;border:none;font-weight:900;cursor:pointer;height:40px;padding-bottom:6px;border-radius:7.5px;background:#7d7d9b;color:#adbcd8;box-shadow:0px -6px 0px 0px #68687c inset}.menu-page .section .section-content .section-option .button:active{padding-bottom:0px;padding-top:3px;box-shadow:0px 3px 0px 0px #68687c inset}.menu-page .section .section-content .section-option .button.red{background:#9e5454;color:#d8adad;box-shadow:0px -6px 0px 0px #783d3d inset}.menu-page .section .section-content .section-option .button.red:active{box-shadow:0px 3px 0px 0px #783d3d inset}.menu-page .section .section-content .section-option .button.width{width:9em;font-size:.6em}.menu-page .section .section-content .section-option .form-upload{position:relative;font-size:.55em;font-weight:400;letter-spacing:1.5px;text-align:center;width:100%;border-radius:5px;border:2px dashed;border-color:rgba(173,188,216,.5411764706);padding:15px 10px;transition:border-color 100ms}.menu-page .section .section-content .section-option .form-upload:hover{border-color:#adbcd8}.menu-page .section .section-content .section-option .form-upload.red{border-color:#9e5454;animation:failedTransition 400ms}.menu-page .section .section-content .section-option .form-upload.red .light{color:#d8adad}.menu-page .section .section-content .section-option .form-upload.green{border-color:#77c468}.menu-page .section .section-content .section-option .form-upload.green .light{color:#a1dda1}.menu-page .section .section-content .section-option .form-upload input{position:absolute;opacity:0;top:0;left:0;bottom:0;right:0;width:100%;height:100%;cursor:pointer}.menu-page .section .section-content .section-option .form-upload .light{color:#adbcd8}.menu-page .section .section-content .section-option .form-upload .light-extra{color:#f0dcd3}.menu-page .section .section-content .section-option .tooltip{position:relative;margin-left:5px;color:#8181a0}.menu-page .section .section-content .section-option .tooltip:hover{cursor:pointer}.menu-page .section .section-content .section-option .tooltip:hover .tooltip-text{visibility:visible}.menu-page .section .section-content .section-option .tooltip .tooltip-text{position:absolute;visibility:hidden;text-align:center;overflow:visible;bottom:calc(100% - 5px);left:50%;transform:translateX(-50%);background-color:#7d7d9b;color:#ffe7dc;width:225px;font-size:13px;font-weight:600;padding:5px;border-radius:5px;border:3px solid #5f5f79}.menu-page .section .section-content .section-option .tooltip .tooltip-text.left{text-align:left}.menu-page .section .section-content .section-option select[id]{outline:none;border:none;font-weight:900;width:195px;font-size:.6em;border-radius:7.5px;padding:2.5px;background:#7d7d9b;color:#adbcd8;box-shadow:0px 4px 0px 0px #68687c inset}.menu-page .section .section-content .section-option select[id].smaller{width:130px}@-webkit-keyframes appear{from{opacity:0}to{opacity:1}}@-webkit-keyframes disappear{from{opacity:1}to{opacity:0}}@-webkit-keyframes failedTransition{0%{transform:translate(0px, 0px)}10%{transform:translate(-35px, -10px)}30%{transform:translate(25px, 8px)}50%{transform:translate(-15px, -6px)}70%{transform:translate(5px, 4px)}100%{transform:translate(0px, 0px)}}@keyframes appear{from{opacity:0}to{opacity:1}}@keyframes disappear{from{opacity:1}to{opacity:0}}@keyframes failedTransition{0%{transform:translate(0px, 0px)}10%{transform:translate(-35px, -10px)}30%{transform:translate(25px, 8px)}50%{transform:translate(-15px, -6px)}70%{transform:translate(5px, 4px)}100%{transform:translate(0px, 0px)}}@-webkit-keyframes appear{from{opacity:0}to{opacity:1}}@-webkit-keyframes disappear{from{opacity:1}to{opacity:0}}@-webkit-keyframes failedTransition{0%{transform:translate(0px, 0px)}10%{transform:translate(-35px, -10px)}30%{transform:translate(25px, 8px)}50%{transform:translate(-15px, -6px)}70%{transform:translate(5px, 4px)}100%{transform:translate(0px, 0px)}}@keyframes appear{from{opacity:0}to{opacity:1}}@keyframes disappear{from{opacity:1}to{opacity:0}}@keyframes failedTransition{0%{transform:translate(0px, 0px)}10%{transform:translate(-35px, -10px)}30%{transform:translate(25px, 8px)}50%{transform:translate(-15px, -6px)}70%{transform:translate(5px, 4px)}100%{transform:translate(0px, 0px)}}html,body{margin:0;padding:0;background:rgba(0,0,0,0) !important;scrollbar-width:10px;scrollbar-track-color:#36363d;scrollbar-face-color:#494955}*{font-family:"Lato",sans-serif}h1,h2,h3,h4,p{margin:0}#menu-container{font-weight:900;font-size:2rem;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);width:1024px;height:700px;display:flex;justify-content:center;align-items:center;user-select:none}#menu-container.open{animation:appear 100ms forwards}#menu-container.close{animation:disappear 100ms forwards}#menu-container.transparent #menu-wrapper{background:rgba(43,43,44,.4666666667)}#menu-container.transparent #navbar-container{background:rgba(47,47,49,.6431372549)}#menu-container.transparent .menu-page{background:rgba(47,47,49,.6431372549)}#menu-container.transparent .section{background:rgba(54,54,61,.6509803922)}#menu-wrapper{position:relative;display:flex;flex-direction:column;width:100%;height:80%;background:#2b2b2c;border-radius:5px;padding:10px}main{display:flex;justify-content:space-between;margin-top:10px;height:100%}main #menu-page-container{width:100%;height:500px;overflow-y:scroll}.default-color{outline:none;border:none;width:10px;height:10px;border-radius:100%;cursor:pointer}input[id][type=color]{outline:none;border:none;padding:0 1px;margin:0;height:24px;background-color:#7d7d9b;border-radius:5px;cursor:pointer}::-webkit-scrollbar{width:10px}::-webkit-scrollbar-track{background:#36363d;border-radius:10px}::-webkit-scrollbar-thumb{background:#494955;border-radius:10px}#popup-menu{position:absolute;top:0;left:0;bottom:0;right:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;background:rgba(25,25,35,.5)}#popup-menu #popup-container{position:relative;width:70%;height:50%;background:#2f2f31;border-radius:10px;border:6px solid #36363d;padding:10px;display:flex;justify-content:space-between}#popup-menu #popup-container #popup-wrapper{position:absolute;z-index:1;top:10px;left:10px;bottom:10px;right:10px;padding:10px;display:flex;justify-content:space-between}#popup-menu #popup-container #popup-wrapper>div{width:50%;height:100%}#popup-menu #popup-container #popup-wrapper #popup-data{display:flex;flex-direction:column}#popup-menu #popup-container #popup-title{font-size:2em;color:#ffe7dc;text-shadow:#3d3937 4px 0px 0px,#3d3937 3.87565px .989616px 0px,#3d3937 3.51033px 1.9177px 0px,#3d3937 2.92676px 2.72655px 0px,#3d3937 2.16121px 3.36588px 0px,#3d3937 1.26129px 3.79594px 0px,#3d3937 .282949px 3.98998px 0px,#3d3937 -0.712984px 3.93594px 0px,#3d3937 -1.66459px 3.63719px 0px,#3d3937 -2.51269px 3.11229px 0px,#3d3937 -3.20457px 2.39389px 0px,#3d3937 -3.69721px 1.52664px 0px,#3d3937 -3.95997px .56448px 0px,#3d3937 -3.97652px -0.432781px 0px,#3d3937 -3.74583px -1.40313px 0px,#3d3937 -3.28224px -2.28625px 0px,#3d3937 -2.61457px -3.02721px 0px,#3d3937 -1.78435px -3.57996px 0px,#3d3937 -0.843183px -3.91012px 0px,#3d3937 .150409px -3.99717px 0px,#3d3937 1.13465px -3.8357px 0px,#3d3937 2.04834px -3.43574px 0px,#3d3937 2.83468px -2.82216px 0px,#3d3937 3.44477px -2.03312px 0px,#3d3937 3.84068px -1.11766px 0px,#3d3937 3.9978px -0.132717px 0px}#popup-menu #popup-container #popup-description{color:#f0dcd3;text-shadow:#3d3937 4px 0px 0px,#3d3937 3.87565px .989616px 0px,#3d3937 3.51033px 1.9177px 0px,#3d3937 2.92676px 2.72655px 0px,#3d3937 2.16121px 3.36588px 0px,#3d3937 1.26129px 3.79594px 0px,#3d3937 .282949px 3.98998px 0px,#3d3937 -0.712984px 3.93594px 0px,#3d3937 -1.66459px 3.63719px 0px,#3d3937 -2.51269px 3.11229px 0px,#3d3937 -3.20457px 2.39389px 0px,#3d3937 -3.69721px 1.52664px 0px,#3d3937 -3.95997px .56448px 0px,#3d3937 -3.97652px -0.432781px 0px,#3d3937 -3.74583px -1.40313px 0px,#3d3937 -3.28224px -2.28625px 0px,#3d3937 -2.61457px -3.02721px 0px,#3d3937 -1.78435px -3.57996px 0px,#3d3937 -0.843183px -3.91012px 0px,#3d3937 .150409px -3.99717px 0px,#3d3937 1.13465px -3.8357px 0px,#3d3937 2.04834px -3.43574px 0px,#3d3937 2.83468px -2.82216px 0px,#3d3937 3.44477px -2.03312px 0px,#3d3937 3.84068px -1.11766px 0px,#3d3937 3.9978px -0.132717px 0px;margin-left:30px;margin-top:30px}#popup-menu #popup-container #popup-bottom{display:flex;justify-content:space-between;align-items:center;margin-top:auto}#popup-menu #popup-container #popup-bottom .popup-button{border:none;outline:none;display:inline-block;font-family:"Lato",sans-serif;text-align:center;cursor:pointer;max-width:160px;width:100%;font-size:.8em;font-weight:900;padding:5px 10px 10px;border-radius:5px;color:#ffe7dc;text-decoration:none;text-shadow:#3d3937 4px 0px 0px,#3d3937 3.87565px .989616px 0px,#3d3937 3.51033px 1.9177px 0px,#3d3937 2.92676px 2.72655px 0px,#3d3937 2.16121px 3.36588px 0px,#3d3937 1.26129px 3.79594px 0px,#3d3937 .282949px 3.98998px 0px,#3d3937 -0.712984px 3.93594px 0px,#3d3937 -1.66459px 3.63719px 0px,#3d3937 -2.51269px 3.11229px 0px,#3d3937 -3.20457px 2.39389px 0px,#3d3937 -3.69721px 1.52664px 0px,#3d3937 -3.95997px .56448px 0px,#3d3937 -3.97652px -0.432781px 0px,#3d3937 -3.74583px -1.40313px 0px,#3d3937 -3.28224px -2.28625px 0px,#3d3937 -2.61457px -3.02721px 0px,#3d3937 -1.78435px -3.57996px 0px,#3d3937 -0.843183px -3.91012px 0px,#3d3937 .150409px -3.99717px 0px,#3d3937 1.13465px -3.8357px 0px,#3d3937 2.04834px -3.43574px 0px,#3d3937 2.83468px -2.82216px 0px,#3d3937 3.44477px -2.03312px 0px,#3d3937 3.84068px -1.11766px 0px,#3d3937 3.9978px -0.132717px 0px}#popup-menu #popup-container #popup-bottom .popup-button#popup-continue{background:#77c468;box-shadow:0px -6px 0px 0px #49783d inset}#popup-menu #popup-container #popup-bottom .popup-button#popup-continue:active{padding:10px 10px 5px;box-shadow:0px 3px 0px 0px #49783d inset}#popup-menu #popup-container #popup-bottom .popup-button#popup-close{background:#9e5454;box-shadow:0px -6px 0px 0px #783d3d inset}#popup-menu #popup-container #popup-bottom .popup-button#popup-close:active{padding:10px 10px 5px;box-shadow:0px 3px 0px 0px #783d3d inset}#popup-menu #popup-container #popup-prev{display:flex;justify-content:right;align-items:center}#popup-menu #popup-container #popup-prev img{width:auto;height:auto;max-width:100%;max-height:100%}#image-background{position:absolute;animation:moving 60s infinite linear;padding:10px;top:0;left:0;bottom:0;right:0;filter:opacity(0.4)}.discord-bg{background:url(https://i.imgur.com/RcTl09i.png) 0 0/8% repeat;background-clip:content-box}.github-bg{background:url(https://i.imgur.com/q0z20jB.png) 0 0/8% repeat;background-clip:content-box}.greasyfork-bg{background:url(https://i.imgur.com/y6OYX0D.png) 0 0/8% repeat;background-clip:content-box}@keyframes moving{0%{background-position:0 0}100%{background-position:-500px 500px}}';
        const createMenu = () => {
            const IFRAME_CONTENT = `\n        <style>${styles}</style>\n        <div id="menu-container" class="open">\n            <div id="menu-wrapper">\n                ${Header}\n\n                <main>\n                    ${Navbar}\n\n                    <div id="menu-page-container">\n                        ${Keybinds}\n                        ${Combat}\n                        ${Visuals}\n                        ${Misc}\n                        ${Credits}\n                    </div>\n                </main>\n            </div>\n        </div>\n    `;
            const IFRAME_STYLE = `\n        #iframe-page-container {\n            position: absolute;\n            top: 0;\n            left: 0;\n            bottom: 0;\n            right: 0;\n            width: 100%;\n            height: 100%;\n            margin: 0;\n            padding: 0;\n            z-index: 99;\n            border: none;\n            outline: none;\n            overflow: scroll;\n            display: none;\n        }\n\n        .iframe-opened {\n            display: block!important;\n        }\n\n        #main-content {\n            background: none;\n        }\n\n        #game-content {\n            justify-content: center;\n        }\n    `;
            const IFRAME = document.createElement("iframe");
            const blob = new Blob([ IFRAME_CONTENT ], {
                type: "text/html; charset=utf-8"
            });
            IFRAME.src = URL.createObjectURL(blob);
            IFRAME.id = "iframe-page-container";
            document.body.appendChild(IFRAME);
            const style = document.createElement("style");
            style.innerHTML = IFRAME_STYLE;
            document.head.appendChild(style);
            IFRAME.onload = () => {
                const iframeWindow = IFRAME.contentWindow;
                const iframeDocument = iframeWindow.document;
                URL.revokeObjectURL(IFRAME.src);
                const menuContainer = iframeDocument.getElementById("menu-container");
                const menuWrapper = iframeDocument.getElementById("menu-wrapper");
                const openMenu = iframeDocument.querySelectorAll(".open-menu");
                const menuPage = iframeDocument.querySelectorAll(".menu-page");
                const sections = iframeDocument.querySelectorAll(".section");
                const hotkeyInputs = iframeDocument.querySelectorAll(".section-option-hotkeyInput[id]");
                const closeMenu = iframeDocument.querySelector("#close-menu");
                const checkboxs = iframeDocument.querySelectorAll("input[type='checkbox'][id]");
                const sliders = iframeDocument.querySelectorAll("input[type='range'][id]");
                const headerVersion = iframeDocument.querySelector("#version > span");
                const autochatInputs = iframeDocument.querySelectorAll(".input.autochat");
                const killMessage = iframeDocument.querySelector("#killMessage");
                const resetSettings = iframeDocument.querySelector("#reset-settings");
                const downloadSettings = iframeDocument.querySelector("#download-settings");
                const uploadSettings = iframeDocument.querySelector("#upload-settings");
                const menuTransparency = iframeDocument.querySelector("#menuTransparency");
                const colorPickers = iframeDocument.querySelectorAll("input[type='color'][id]");
                const selects = iframeDocument.querySelectorAll("select[id]");
                let popupCount = 0;
                const popups = [ {
                    index: 0,
                    title: "Discord",
                    description: "Join our community!",
                    link: "https://discord.gg/sG9cyfGPj5",
                    prev: "https://i.imgur.com/DuLtryo.png"
                }, {
                    index: 1,
                    title: "Github",
                    description: "Star a repository!",
                    link: "https://github.com/Murka007/Dsync-client",
                    prev: "https://i.imgur.com/u4aX4G1.png"
                }, {
                    index: 2,
                    title: "Greasyfork",
                    description: "Write a feedback!",
                    link: "https://greasyfork.org/en/scripts/449995-dsync-client-sploop-io/feedback#post-discussion",
                    prev: "https://i.imgur.com/L1YP7cK.png"
                } ];
                const pickPopup = () => {
                    const pups = popups.filter(((popup, index) => Settings.blindUsers[index] === 0));
                    if (pups.length) {
                        const popup = pups[popupCount++];
                        popupCount %= pups.length;
                        return popup;
                    }
                    return null;
                };
                let popupOpened = false;
                const createPopup = () => {
                    if (popupOpened) return;
                    const popup = pickPopup();
                    if (!popup) return;
                    popupOpened = true;
                    const div = document.createElement("div");
                    div.innerHTML = `\n                <div id="popup-menu">\n                    <div id="popup-container">\n                        <div id="image-background" class="${popup.title.toLowerCase()}-bg"></div>\n\n                        <div id="popup-wrapper">\n                            <div id="popup-data">\n                                <div id="popup-title">${popup.title}</div>\n                                <div id="popup-description">${popup.description}</div>\n\n                                <div id="popup-bottom">\n                                    <a id="popup-continue" class="popup-button" href="${popup.link}" target="_blank">CONTINUE</a>\n                                    <button id="popup-close" class="popup-button">CLOSE</button>\n                                </div>\n                            </div>\n\n                            <div id="popup-prev">\n                                <img src="${popup.prev}"></img>\n                            </div>\n                        </div>\n                    </div>\n                </div>\n            `;
                    const popupMenu = div.querySelector("#popup-menu");
                    const container = div.querySelector("#popup-container");
                    const continuePopup = div.querySelector("#popup-continue");
                    const closePopup = div.querySelector("#popup-close");
                    continuePopup.onclick = () => {
                        popupCount -= 1;
                        Settings.blindUsers[popup.index] = 1;
                        storage.set("Dsync-settings", Settings);
                    };
                    closePopup.onclick = () => {
                        container.style.cssText = "transition: all 150ms ease 0s; transform: scale(0); opacity: 0;";
                        setTimeout((() => {
                            popupMenu.remove();
                            popupOpened = false;
                        }), 150);
                    };
                    menuWrapper.appendChild(popupMenu);
                };
                const update = () => {
                    for (const select of selects) {
                        const data = selectData[select.id];
                        for (const key in data) {
                            if (!isNaN(Number(key))) continue;
                            const keyValue = key;
                            const option = document.createElement("option");
                            option.value = data[keyValue];
                            option.textContent = capitalize(keyValue);
                            if (data[keyValue] === Settings[select.id]) {
                                option.selected = true;
                                option.defaultSelected = true;
                            }
                            select.appendChild(option);
                        }
                        select.onchange = () => {
                            Settings[select.id] = select.value;
                            storage.set("Dsync-settings", Settings);
                        };
                    }
                    for (const picker of colorPickers) {
                        const resetColor = picker.previousElementSibling;
                        if (resetColor) {
                            const defaultColor = defaultSettings[picker.id];
                            resetColor.style.backgroundColor = defaultColor;
                            resetColor.onclick = () => {
                                picker.value = defaultColor;
                                Settings[picker.id] = defaultColor;
                                storage.set("Dsync-settings", Settings);
                            };
                        }
                        picker.value = Settings[picker.id];
                        picker.onchange = () => {
                            Settings[picker.id] = picker.value;
                            storage.set("Dsync-settings", Settings);
                            picker.blur();
                        };
                    }
                    menuContainer.classList[Settings.menuTransparency ? "add" : "remove"]("transparent");
                    killMessage.value = Settings.killMessage;
                    killMessage.onchange = () => {
                        Settings.killMessage = killMessage.value;
                        storage.set("Dsync-settings", Settings);
                        killMessage.blur();
                    };
                    for (let i = 0; i < autochatInputs.length; i++) {
                        const input = autochatInputs[i];
                        input.value = Settings.autochatMessages[i] || "";
                        input.onchange = () => {
                            Settings.autochatMessages[i] = input.value;
                            storage.set("Dsync-settings", Settings);
                            input.blur();
                        };
                    }
                    headerVersion.textContent = "v" + src_Dsync.version;
                    for (const slider of sliders) {
                        const sliderValue = slider.nextElementSibling;
                        slider.value = Settings[slider.id];
                        if (sliderValue) {
                            sliderValue.textContent = slider.value;
                        }
                        slider.oninput = () => {
                            const value = Number(slider.value) % 5;
                            slider.value -= value;
                            if (sliderValue) {
                                sliderValue.textContent = slider.value;
                            }
                            Settings[slider.id] = Number(slider.value);
                            storage.set("Dsync-settings", Settings);
                        };
                    }
                    for (const checkbox of checkboxs) {
                        checkbox.checked = Settings[checkbox.id];
                        checkbox.onchange = () => {
                            Settings[checkbox.id] = checkbox.checked;
                            storage.set("Dsync-settings", Settings);
                            checkbox.blur();
                        };
                    }
                    let popupCount = 0;
                    src_Dsync.toggleMenu = () => {
                        menuContainer.classList.toggle("close");
                        if (menuContainer.classList.toggle("open") && !popupOpened) {
                            popupCount += 1;
                            if ((popupCount %= 5) === 0) {
                                createPopup();
                            }
                        }
                        setTimeout((() => {
                            IFRAME.classList.toggle("iframe-opened");
                        }), 100);
                    };
                    closeMenu.onclick = src_Dsync.toggleMenu;
                    for (let i = 0; i < openMenu.length; i++) {
                        openMenu[i].onclick = () => {
                            removeClass(openMenu, "active");
                            openMenu[i].classList.add("active");
                            removeClass(menuPage, "opened");
                            menuPage[i].classList.add("opened");
                        };
                    }
                    for (const section of sections) {
                        const title = section.children[0];
                        const content = section.children[1];
                        if (!title || !content) continue;
                        if (contains(section, "opened")) {
                            content.classList.add("opened");
                            continue;
                        }
                        content.style.display = "none";
                        title.onclick = () => {
                            if (!content.classList.contains("opened")) {
                                content.style.display = "grid";
                            } else {
                                setTimeout((() => {
                                    content.style.display = "none";
                                }), 100);
                            }
                            setTimeout((() => {
                                content.classList.toggle("opened");
                                title.children[1].classList.toggle("rotate");
                            }), 0);
                        };
                    }
                    for (const hotkeyInput of hotkeyInputs) {
                        try {
                            hotkeyInput.textContent = formatCode(Settings[hotkeyInput.id]);
                        } catch (err) {
                            throw new Error(hotkeyInput.id + " doesn't exist in settings");
                        }
                    }
                    checkForRepeats();
                };
                menuTransparency.addEventListener("change", (() => {
                    menuContainer.classList[menuTransparency.checked ? "add" : "remove"]("transparent");
                }));
                resetSettings.onclick = () => {
                    Object.assign(Settings, defaultSettings);
                    storage.set("Dsync-settings", Settings);
                    update();
                };
                downloadSettings.onclick = () => {
                    download(Settings, "DsyncSettings" + src_Dsync.version);
                };
                uploadSettings.onchange = async event => {
                    const target = event.target;
                    const parent = uploadSettings.parentElement;
                    const spanText = parent.children[1];
                    parent.classList.remove("red");
                    parent.classList.remove("green");
                    try {
                        const text = await target.files[0].text();
                        const sets = JSON.parse(text);
                        if (Object.keys(sets).every((key => defaultSettings.hasOwnProperty(key)))) {
                            Object.assign(Settings, sets);
                            storage.set("Dsync-settings", Settings);
                            update();
                            parent.classList.add("green");
                            spanText.innerHTML = `SETTINGS LOADED SUCCESSFULLY`;
                        } else {
                            throw new Error("Invalid settings");
                        }
                    } catch (err) {
                        parent.classList.add("red");
                        spanText.innerHTML = "SETTINGS ARE NOT VALID, TRY ANOTHER";
                    }
                };
                const checkForRepeats = () => {
                    const list = new Map;
                    for (const hotkeyInput of hotkeyInputs) {
                        const value = Settings[hotkeyInput.id];
                        const [count, inputs] = list.get(value) || [ 0, [] ];
                        list.set(value, [ (count || 0) + 1, [ ...inputs, hotkeyInput ] ]);
                        hotkeyInput.classList.remove("red");
                    }
                    for (const data of list) {
                        const [number, hotkeyInputs] = data[1];
                        if (number === 1) continue;
                        for (const hotkeyInput of hotkeyInputs) {
                            hotkeyInput.classList.add("red");
                        }
                    }
                };
                src_Dsync.active = null;
                const applyCode = code => {
                    if (!src_Dsync.active) return;
                    const key = code === "Backspace" ? "..." : formatCode(code);
                    Settings[src_Dsync.active.id] = code === "Backspace" ? "..." : code;
                    src_Dsync.active.textContent = key;
                    storage.set("Dsync-settings", Settings);
                    src_Dsync.active = null;
                    checkForRepeats();
                };
                menuContainer.addEventListener("keyup", (event => {
                    if (event.keyCode < 5 || !src_Dsync.active) return;
                    applyCode(event.code);
                }));
                menuContainer.addEventListener("mouseup", (event => {
                    const target = event.target;
                    if (src_Dsync.active) return applyCode(event.button);
                    if (!contains(target, "section-option-hotkeyInput") || !target.id) return;
                    target.textContent = "Wait...";
                    src_Dsync.active = target;
                }));
                iframeWindow.addEventListener("keydown", (event => handleKeydown(event, event.code)));
                iframeWindow.addEventListener("keyup", (event => handleKeyup(event, event.code)));
                const resize = () => {
                    const width = window.innerWidth;
                    const height = window.innerHeight;
                    const scale = Math.min(1, Math.min(width / 1024, height / 700));
                    menuContainer.style.transform = `translate(-50%, -50%) scale(${scale})`;
                };
                resize();
                window.addEventListener("resize", resize);
                setTimeout((() => IFRAME.classList.add("iframe-opened")), 0);
                iframeWindow.addEventListener("contextmenu", (event => event.preventDefault()));
                iframeWindow.addEventListener("mousedown", (event => 1 === event.button && event.preventDefault()));
                iframeWindow.addEventListener("mouseup", (event => [ 3, 4 ].includes(event.button) && event.preventDefault()));
                window.addEventListener("mouseup", (event => [ 3, 4 ].includes(event.button) && event.preventDefault()));
                update();
            };
        };
        const modules_createMenu = createMenu;
        const ANY_LETTER = "(?:[^\\x00-\\x7F-]|\\$|\\w)";
        const NumberSystem = [ {
            radix: 2,
            prefix: "0b0*"
        }, {
            radix: 8,
            prefix: "0+"
        }, {
            radix: 10,
            prefix: ""
        }, {
            radix: 16,
            prefix: "0x0*"
        } ];
        var Template;
        (function(Template) {
            Template[Template["APPEND"] = 0] = "APPEND";
            Template[Template["PREPEND"] = 1] = "PREPEND";
        })(Template || (Template = {}));
        class Regex {
            constructor(code, unicode) {
                this.code = code;
                this.COPY_CODE = code;
                this.unicode = unicode || false;
                this.hooks = {};
            }
            static parseValue(value) {
                try {
                    return Function(`return (${value})`)();
                } catch (err) {
                    return null;
                }
            }
            isRegexp(value) {
                return TYPEOF(value) === "regexp";
            }
            generateNumberSystem(int) {
                const copy = [ ...NumberSystem ];
                const template = copy.map((({prefix, radix}) => prefix + int.toString(radix)));
                return `(?:${template.join("|")})`;
            }
            parseVariables(regex) {
                regex = regex.replace(/\{VAR\}/g, "(?:let|var|const)");
                regex = regex.replace(/\{QUOTE\}/g, "['\"`]");
                regex = regex.replace(/ARGS\{(\d+)\}/g, ((...args) => {
                    let count = Number(args[1]), arr = [];
                    while (count--) arr.push("\\w+");
                    return arr.join("\\s*,\\s*");
                }));
                regex = regex.replace(/NUMBER\{(\d+)\}/g, ((...args) => {
                    const int = Number(args[1]);
                    return this.generateNumberSystem(int);
                }));
                return regex;
            }
            format(name, inputRegex, flags) {
                let regex = null;
                if (Array.isArray(inputRegex)) {
                    regex = inputRegex.map((exp => this.isRegexp(exp) ? exp.source : exp)).join("\\s*");
                } else if (this.isRegexp(inputRegex)) {
                    regex = inputRegex.source;
                }
                regex = this.parseVariables(regex);
                if (this.unicode) {
                    regex = regex.replace(/\\w/g, ANY_LETTER);
                }
                const expression = new RegExp(regex.replace(/\{INSERT\}/, ""), flags);
                const match = this.code.match(expression);
                if (match === null) error("Failed to find: " + name);
                return regex.includes("{INSERT}") ? new RegExp(regex, flags) : expression;
            }
            template(type, name, regex, substr) {
                const expression = new RegExp(`(${this.format(name, regex).source})`);
                const match = this.code.match(expression) || [];
                this.code = this.code.replace(expression, type === Template.APPEND ? "$1" + substr : substr + "$1");
                return match;
            }
            match(name, regex, flags, debug = false) {
                const expression = this.format(name, regex, flags);
                const match = this.code.match(expression) || [];
                this.hooks[name] = {
                    expression,
                    match
                };
                if (debug) log(name, this.hooks[name]);
                return match;
            }
            matchAll(name, regex, flags, debug = false) {
                const expression = this.format(name, regex, flags);
                const matches = this.code.matchAll(expression);
                this.hooks[name] = {
                    expression,
                    match: [ ...matches ]
                };
                if (debug) log(name, this.hooks[name]);
                return matches;
            }
            replace(name, regex, substr, flags) {
                const expression = this.format(name, regex, flags);
                this.code = this.code.replace(expression, substr);
            }
            append(name, regex, substr) {
                return this.template(Template.APPEND, name, regex, substr);
            }
            prepend(name, regex, substr) {
                return this.template(Template.PREPEND, name, regex, substr);
            }
            insert(name, regex, substr) {
                const {source} = this.format(name, regex);
                if (!source.includes("{INSERT}")) throw new Error("Your regexp must contain {INSERT} keyword");
                const findExpression = new RegExp(source.replace(/^(.*)\{INSERT\}(.*)$/, "($1)($2)"));
                this.code = this.code.replace(findExpression, `$1${substr}$2`);
            }
        }
        const modules_Regex = Regex;
        let kills = 0;
        const stringMessage = data => {
            const [id] = data;
            if (id === WebsocketString.LEADERBOARD || id === WebsocketString.PLAYERSPAWNED) return;
            if (id === WebsocketString.SPAWN && Settings.lastHat) {
                equipHat(src_Dsync.actualHat, true);
            }
            if (id === WebsocketString.UPGRADE) {
                const upgradeBar = data[1];
                const item = upgradeBar[0];
                const canAutobed = Settings.autobed && upgradeBar.includes(EObjects.SPAWN);
                src_Dsync.autobedToggle = canAutobed;
                if (Settings.skipUpgrades && upgradeBar.length === 1 || canAutobed) {
                    src_Dsync.upgradeItem(canAutobed ? EObjects.SPAWN : item);
                }
            }
            if (id === WebsocketString.DIED) {
                Controller_reset();
                kills = 0;
                if (Settings.autospawn) {
                    spawn();
                }
            }
            if (id === WebsocketString.KILLUPDATE) {
                kills = data[1][0];
            }
            if (id === WebsocketString.KILLED && Settings.kill) {
                const killMessage = Settings.killMessage.length ? Settings.killMessage : "{KILL}x";
                const name = data[1].replace(/^Killed\s/, "").trim();
                const message = killMessage.replace(/\{KILL\}/g, kills + "").replace(/\{NAME\}/g, name);
                src_Dsync.chat(message);
            }
        };
        const hooks_stringMessage = stringMessage;
        const createImage = src => {
            const img = new Image;
            img.src = src;
            img.loaded = false;
            img.onload = () => {
                img.loaded = true;
            };
            return img;
        };
        const Images = {
            gaugeBackground: createImage("https://i.imgur.com/xincrX4.png"),
            gaugeFront: createImage("https://i.imgur.com/6AkHQM4.png"),
            discord: createImage("https://i.imgur.com/RcTl09i.png"),
            github: createImage("https://i.imgur.com/q0z20jB.png"),
            greasyfork: createImage("https://i.imgur.com/y6OYX0D.png")
        };
        const utils_Images = Images;
        const getTracerColor = (entity, isTeammate) => {
            if (entity.id === src_Dsync.myPlayerID() || isTeammate) return Settings.teammateColor;
            if (entity.type === 0) return Settings.enemyColor;
            return Settings.animalColor;
        };
        const trapActive = object => {
            const trap = Common_formatObject(object);
            return getEntities().some((entity => distance(entity, trap).dist < trap.radius + entity.radius - 25));
        };
        const getMarkerColor = (target, ownerID) => {
            let color = null;
            const isMyPlayers = (src_Dsync.myPlayer || {}).ownerID === ownerID;
            const isTeammates = teammates.includes(ownerID);
            const isTeammateTrap = target.type === 6 && (isMyPlayers || isTeammates);
            if (Settings.itemMarkers && isMyPlayers) {
                color = Settings.itemMarkersColor;
            } else if (Settings.teammateMarkers && isTeammates) {
                color = Settings.teammateMarkersColor;
            } else if (Settings.enemyMarkers && !isMyPlayers && !isTeammates) {
                color = Settings.enemyMarkersColor;
            }
            if (Settings.trapActivated && isTeammateTrap) {
                const id = target[src_Dsync.props.id];
                if (!target.active && trapActive(target)) {
                    target.active = id;
                }
                if (target.active === id) return Settings.trapActivatedColor;
                target.active = null;
            }
            return color;
        };
        const marker = (ctx, color) => {
            ctx.strokeStyle = "#303030";
            ctx.lineWidth = 3;
            ctx.fillStyle = color;
            ctx.beginPath();
            ctx.arc(0, 0, 9, 0, 2 * Math.PI);
            ctx.fill();
            ctx.stroke();
            ctx.closePath();
        };
        const arrow = (ctx, len, x, y, angle, color) => {
            ctx.save();
            ctx.translate(x, y);
            ctx.rotate(Math.PI / 4);
            ctx.rotate(angle);
            ctx.globalAlpha = .75;
            ctx.strokeStyle = color;
            ctx.lineCap = "round";
            ctx.lineWidth = 8;
            ctx.beginPath();
            ctx.moveTo(-len, -len);
            ctx.lineTo(len, -len);
            ctx.lineTo(len, len);
            ctx.stroke();
            ctx.closePath();
            ctx.restore();
        };
        const lines = (ctx, x1, y1, x2, y2, color) => {
            ctx.save();
            ctx.globalAlpha = .75;
            ctx.strokeStyle = color;
            ctx.lineCap = "round";
            ctx.lineWidth = 5;
            ctx.beginPath();
            ctx.moveTo(x1, y1);
            ctx.lineTo(x2, y2);
            ctx.stroke();
            ctx.restore();
        };
        const TextOptions = {
            font: "bold 15px Montserrat",
            textBaseline: "top"
        };
        const renderText = (ctx, text, callback, options) => {
            ctx.save();
            ctx.fillStyle = "#fff";
            ctx.strokeStyle = "#303030";
            ctx.lineWidth = 8;
            ctx.lineJoin = "round";
            Object.assign(ctx, TextOptions, options);
            const width = ctx.measureText(text).width;
            const height = parseInt(ctx.font.match(/\d+/)[0]) || 1;
            const data = callback(width, height);
            ctx.strokeText(text, ...data);
            ctx.fillText(text, ...data);
            ctx.restore();
        };
        const drawHealth = (ctx, entity, height = 0) => {
            if (!Settings.drawHP) return;
            const {x, y, health, maxHealth, radius} = entity;
            renderText(ctx, `HP ${health}/${maxHealth}`, (width => [ x - width / 2, y + radius + 55 + height ]));
        };
        const drawImage = (ctx, image) => {
            if (image && image.naturalHeight !== 0) {
                ctx.drawImage(image, -.5 * image.width / 2, -.5 * image.height, image.width * .5, image.height * .5);
            }
        };
        const drawBar = (ctx, entity, value, maxValue, color, extraHeight = 0) => {
            const {x, y, radius} = entity;
            const background = utils_Images.gaugeBackground;
            const front = utils_Images.gaugeFront;
            const scale = .5;
            const width = front.width * scale;
            const fill = value / maxValue * (width - 10);
            const h = (entity.type === ELayer.TURRET ? 25 : 50) + extraHeight;
            ctx.save();
            if (Settings.markersBottom && entity.type === ELayer.TURRET) {
                ctx.rotate(Math.PI - entity.angle);
                ctx.rotate(Math.PI);
            }
            ctx.translate(x, y + radius + h + front.height * scale);
            drawImage(ctx, background);
            ctx.fillStyle = color;
            ctx.fillRect(-width / 2 + 5, -scale * front.height + 5, fill, scale * front.height - 10);
            drawImage(ctx, front);
            ctx.restore();
            return front.height * scale;
        };
        const drawMarkers = (ctx, target, translate) => {
            const object = Common_formatObject(target);
            if (object.ownerID === 0) return;
            const position = translate ? object : {
                ...object,
                x: 0,
                y: 0
            };
            if (target.type === ELayer.TURRET && Settings.turretReloadBar && target.turretReload !== undefined) {
                drawBar(ctx, position, target.turretReload, TargetReload.TURRET, Settings.turretReloadBarColor);
            }
            windmillRotation(target);
            const color = getMarkerColor(target, object.ownerID);
            if (color === null) return;
            if (translate) {
                ctx.save();
                ctx.translate(object.x + target.dirX, object.y + target.dirY);
                marker(ctx, color);
                ctx.restore();
            } else {
                marker(ctx, color);
            }
        };
        const drawTracers = (ctx, entity, isTeammate) => {
            const player = Common_formatPlayer(src_Dsync.target);
            const {x: x1, y: y1} = player;
            const {x: x2, y: y2} = entity;
            const color = Settings.rainbow ? `hsl(${src_Dsync.hsl}, 100%, 50%)` : getTracerColor(entity, isTeammate);
            if (Settings.arrows) {
                const arrowWidth = 8;
                const angle = getAngle(entity, player).lerpAngle;
                const dist = Math.min(100 + arrowWidth * 2, distance(entity, player).lerpDist - arrowWidth * 2);
                const x = x1 + dist * Math.cos(angle);
                const y = y1 + dist * Math.sin(angle);
                arrow(ctx, arrowWidth, x, y, angle, color);
            } else {
                lines(ctx, x1, y1, x2, y2, color);
            }
        };
        const windmillRotation = target => {
            if (target.type !== ELayer.WINDMILL && target.type !== ELayer.POWERMILL) return;
            if (!target.rotSpeed) {
                target.rotSpeed = target[src_Dsync.props.rotSpeed];
            }
            const rot = Settings.windmillRotation ? target.rotSpeed : 0;
            if (target[src_Dsync.props.rotSpeed] !== rot) {
                target[src_Dsync.props.rotSpeed] = rot;
            }
        };
        const Rendering_images = {};
        const crosshair = (ctx, x, y, angle, color, radius, width, height) => {
            const canvas = Rendering_images[color] || function() {
                const canvas = document.createElement("canvas");
                canvas.width = 256;
                canvas.height = 256;
                const ctx = canvas.getContext("2d");
                ctx.translate(canvas.width / 2, canvas.height / 2);
                ctx.strokeStyle = color;
                ctx.fillStyle = color;
                ctx.lineWidth = width / 1.5;
                ctx.beginPath();
                ctx.arc(0, 0, radius, 0, 2 * Math.PI);
                ctx.stroke();
                ctx.closePath();
                for (let i = 0; i < 4; i++) {
                    ctx.beginPath();
                    ctx.rect(-width / 2, radius - height / 2, width, height);
                    ctx.fill();
                    ctx.rotate(Math.PI / 2);
                    ctx.closePath();
                }
                Rendering_images[color] = canvas;
                return canvas;
            }();
            ctx.save();
            ctx.translate(x, y);
            ctx.rotate(angle);
            ctx.globalAlpha = .75;
            ctx.drawImage(canvas, -canvas.width / 2, -canvas.height / 2);
            ctx.restore();
        };
        const drawItemBar = (ctx, imageData, index) => {
            if (!Settings.itemCounter) return;
            const itemId = itemBar(index);
            const itemType = src_Dsync.itemData[itemId][src_Dsync.props.itemType];
            const currentCount = src_Dsync.defaultData[src_Dsync.props.currentCount][itemType];
            const maxCount = src_Dsync.maxCount[itemType];
            if (maxCount === 0) return;
            const x = imageData[src_Dsync.props.x] - 10;
            const y = imageData[src_Dsync.props.y] + 10;
            const w = imageData.width;
            renderText(ctx, `${currentCount}/${maxCount}`, (width => [ x + w - width, y ]), {
                font: "bold 16px Montserrat"
            });
        };
        const hooks_drawItemBar = drawItemBar;
        const drawEntityInfo = (target, ctx, isTeammate) => {
            const entity = formatEntity(target);
            const id = src_Dsync.myPlayerID();
            if (id === entity.id) {
                if (Settings.rainbow) {
                    src_Dsync.hsl = (src_Dsync.hsl + .3) % 360;
                }
                if (src_Dsync.aimTarget) {
                    const aimTarget = formatEntity(src_Dsync.aimTarget);
                    src_Dsync.target[src_Dsync.props.angle] = Settings.visualAim ? getAngle(aimTarget, entity).lerpAngle : src_Dsync.getAngle();
                }
            }
            let height = 0;
            if (entity.type === 0) {
                if (Settings.hatReloadBar && target.oldId) {
                    const fillValue = clamp(target.hatReload, 0, TargetReload.HAT);
                    height += drawBar(ctx, entity, fillValue, TargetReload.HAT, Settings.hatReloadBarColor, height);
                }
                if (Settings.weaponReloadBar) {
                    const fillValue = clamp(target.weaponReload, 0, target.weaponMaxReload);
                    height += drawBar(ctx, entity, fillValue, target.weaponMaxReload, Settings.weaponReloadBarColor, height);
                }
                if (Settings.drawID) {
                    const front = utils_Images.gaugeFront;
                    const w = front.width * .5;
                    const h = front.height * .5;
                    renderText(ctx, entity.id.toString(), (() => [ entity.x + w / 2 + 5, entity.y - h + (entity.radius + 50) + 5 ]), {
                        font: "bold 14px Montserrat",
                        textBaseline: "top"
                    });
                }
            }
            if (entity.type === ELayer.DRAGON && Settings.fireballReloadBar) {
                const fillValue = clamp(target.fireballReload, 0, TargetReload.DRAGON);
                height += drawBar(ctx, entity, fillValue, TargetReload.DRAGON, Settings.fireballReloadBarColor);
            }
            drawHealth(ctx, entity, height);
            if (id === entity.id || src_Dsync.myPlayer === null) return;
            if (Settings.possibleShots && !isTeammate) {
                const entityHit = projectileCanHitEntity(entity);
                if (typeof entityHit === "object" && entityHit.canHit && !entityHit.needDestroy) {
                    const color = Settings.rainbow ? `hsl(${src_Dsync.hsl}, 100%, 50%)` : getTracerColor(entity, isTeammate);
                    crosshair(ctx, entity.x, entity.y, entity.angle, color, 20, 8, 18);
                }
            }
            if (Settings.enemyTracers && entity.type === 0 && !isTeammate || Settings.teammateTracers && entity.type === 0 && isTeammate || Settings.animalTracers && entity.type !== 0) {
                drawTracers(ctx, entity, isTeammate);
            }
        };
        const hooks_drawEntityInfo = drawEntityInfo;
        const zoomHandler = () => {
            let wheels = 0;
            const scaleFactor = 150;
            window.addEventListener("wheel", (event => {
                if (!(event.target instanceof HTMLCanvasElement) || event.ctrlKey || event.shiftKey || event.altKey || isInput() || !inGame()) return;
                const scale = src_Dsync.scale;
                const {w, h, w2, h2} = scale;
                if (w2 === 1824 && h2 === 1026 && (wheels = (wheels + 1) % 5) !== 0) return;
                const zoom = !Settings.reverseZoom && event.deltaY > 0 || Settings.reverseZoom && event.deltaY < 0 ? -scaleFactor : scaleFactor;
                scale.w2 = Math.max(924, w2 + zoom);
                scale.h2 = Math.max(126, h2 + zoom);
                if (Settings.smoothZoom) return;
                w[0] = scale.w2;
                h[0] = scale.h2;
                window.dispatchEvent(new Event("resize"));
            }));
        };
        const modules_zoomHandler = zoomHandler;
        const drawItems = (target, id, ctx, step) => {
            drawMarkers(ctx, target, false);
        };
        const drawitems = drawItems;
        let toggleClown = false;
        let toggleScuba = false;
        let updatePlayer_isHealing = false;
        let start = Date.now();
        const getDelay = health => {
            if (health < 74) return 60;
            if (health < 36) return 45;
            return 130;
        };
        const updatePlayer_healing = () => {
            const {health, maxHealth, isClown} = src_Dsync.myPlayer;
            if (Settings.autoheal && health < maxHealth && !isClown && inGame()) heal();
            setTimeout(updatePlayer_healing, getDelay(health));
        };
        const updatePlayer = target => {
            const entity = formatEntity(target);
            const player = Common_formatPlayer(target);
            if (entity.type === 0) {
                if (isWeapon(player.currentItem)) {
                    if (isSecondary(player.currentItem)) {
                        target.secondary = player.currentItem;
                    } else {
                        target.primary = player.currentItem;
                    }
                }
                if (player.id === src_Dsync.myPlayerID()) {
                    src_Dsync.myPlayer = {
                        ...src_Dsync.myPlayer,
                        ...player
                    };
                    const {x2, y2, health, maxHealth, isClown, hat, oldHat} = src_Dsync.myPlayer;
                    if (Settings.autoheal && health < maxHealth && !updatePlayer_isHealing) {
                        updatePlayer_isHealing = true;
                        updatePlayer_healing();
                    }
                    const inRiver = y2 > 8075 && y2 < 8925;
                    const notInRiver = !(y2 > 8e3 && y2 < 9e3);
                    if (Settings.autoScuba && inRiver && !toggleScuba) {
                        toggleScuba = true;
                        src_Dsync.myPlayer.oldHat = hat;
                        equipHat(EHats.SCUBA, false, false);
                    }
                    if (toggleScuba && notInRiver) {
                        equipHat(oldHat);
                        toggleScuba = false;
                    }
                    if (Settings.jungleOnClown && isClown && hat !== EHats.JUNGLE && !toggleClown) {
                        toggleClown = true;
                        src_Dsync.myPlayer.oldHat = fastBreaking ? fastBreakHat : hat;
                        equipHat(EHats.JUNGLE, false, false);
                    }
                    if (!isClown && toggleClown) {
                        equipHat(oldHat);
                        toggleClown = false;
                    }
                    if (Settings.autochat) autochat();
                    if (Settings.autoAccept && src_Dsync.clanData[src_Dsync.props.acceptList].length) {
                        accept(true);
                    }
                    const windmillCount = getCount(EItems.WINDMILL);
                    src_Dsync.automillToggle = Settings.automill && src_Dsync.playerAGE < 10 && windmillCount < 8;
                    if (isDoingNothing()) {
                        if (src_Dsync.autobedToggle && hasResources(EObjects.SPAWN)) {
                            place(EItems.SPAWN, random(-Math.PI, Math.PI));
                        }
                        const windmill = [ EObjects.WINDMILL, EObjects.POWERMILL ].find((id => src_Dsync.defaultData[src_Dsync.props.itemBar].includes(id)));
                        if (src_Dsync.automillToggle && hasResources(windmill) && move !== 0) {
                            place(EItems.WINDMILL, getAngleFromBitmask(move, true));
                        }
                    }
                    const spawnCount = getCount(EItems.SPAWN);
                    if (spawnCount === 1 && src_Dsync.autobedToggle) {
                        src_Dsync.autobedToggle = false;
                    }
                }
                if (Settings.hatReloadBar) {
                    if (target.oldId !== player.id) {
                        target.oldId = player.id;
                        target.prevHat = player.hat;
                        target.hatReload = TargetReload.HAT;
                    }
                    if (target.prevHat !== player.hat) {
                        target.prevHat = player.hat;
                        target.hatReload = -src_Dsync.step;
                    }
                    target.hatReload = Math.min(target.hatReload + src_Dsync.step, TargetReload.HAT);
                }
                if (Settings.weaponReloadBar) {
                    if (target.weaponMaxReload === undefined && isWeapon(player.currentItem)) {
                        target.weaponMaxReload = src_Dsync.itemData[player.currentItem].reload;
                    }
                    if (target.weaponMaxReload !== undefined) {
                        if (target.weaponReload === undefined) {
                            target.weaponReload = target.weaponMaxReload;
                        }
                        target.weaponReload = Math.min(target.weaponReload + src_Dsync.step, target.weaponMaxReload);
                    }
                }
                const now = Date.now();
                if (now - start > 15e3 && !isInput() && isBlind()) {
                    start = now;
                    src_Dsync.chat(pingCount);
                }
            }
            if (entity.type === ELayer.TURRET && Settings.turretReloadBar) {
                if (target.turretReload === undefined) {
                    target.turretReload = TargetReload.TURRET;
                }
                target.turretReload = Math.min(target.turretReload + src_Dsync.step, TargetReload.TURRET);
            }
            if (entity.type === ELayer.DRAGON && Settings.fireballReloadBar) {
                if (target.fireballReload === undefined) {
                    target.fireballReload = TargetReload.DRAGON;
                }
                target.fireballReload = Math.min(target.fireballReload + src_Dsync.step, TargetReload.DRAGON);
            }
        };
        const hooks_updatePlayer = updatePlayer;
        const renderLayers = (ctx, now) => {
            const entities = src_Dsync.entityList();
            for (let i = 0; i < src_Dsync.itemList.length; i++) {
                const id = src_Dsync.itemList[i];
                for (let j = 0; j < entities[id].length; j++) {
                    const target = entities[id][j];
                    drawMarkers(ctx, target, true);
                }
            }
        };
        const hooks_renderLayers = renderLayers;
        let moveUpdate_start = Date.now();
        const moveUpdate = () => {
            const now = Date.now();
            src_Dsync.step = now - moveUpdate_start;
            moveUpdate_start = now;
        };
        const hooks_moveUpdate = moveUpdate;
        const attackAnimation = (type, id, weapon, isObject, entity) => {
            if (type === 0 && Settings.weaponReloadBar) {
                const reload = src_Dsync.itemData[weapon].reload;
                entity.weaponMaxReload = reload;
                entity.weaponReload = -src_Dsync.step;
            }
        };
        const hooks_attackAnimation = attackAnimation;
        const createEntity = target => {
            const id = target[src_Dsync.props.id];
            const type = target.type;
            const entities = src_Dsync.entityList();
            if (type === ELayer.PLAYER && id === src_Dsync.myPlayerID()) {
                src_Dsync.target = target;
            } else if (type === ELayer.PROJECTILE) {
                const projectile = formatProjectile(target);
                const type = projectile.projectileType;
                const isTurret = Settings.turretReloadBar && entities[ELayer.TURRET].find((object => {
                    const turret = Common_formatObject(object);
                    const isOwner = turret.ownerID === projectile.ownerID;
                    const isX = turret.x2 === projectile.x2;
                    const isY = turret.y2 === projectile.y2;
                    return isOwner && isX && isY;
                }));
                const isPlayer = Settings.weaponReloadBar && entities[ELayer.PLAYER].find((object => {
                    const player = Common_formatPlayer(object);
                    const isOwner = player.ownerID === projectile.ownerID;
                    return isOwner;
                }));
                if (isTurret) {
                    isTurret.turretReload = -src_Dsync.step;
                } else if (isPlayer) {
                    const shooting = [ EWeapons.MUSKET, EWeapons.BOW, EWeapons.PEARL ].map((a => src_Dsync.itemData[a]));
                    const weapon = shooting.find((weapon => weapon[src_Dsync.props.bulletType] === type));
                    let reload = weapon.reload;
                    if (type === 88) {
                        const id = isPlayer.secondary === EWeapons.XBOW ? EWeapons.XBOW : EWeapons.BOW;
                        reload = src_Dsync.itemData[id].reload;
                    }
                    isPlayer.weaponMaxReload = reload;
                    isPlayer.weaponReload = -src_Dsync.step;
                }
            } else if (type === ELayer.FIREBALL && entities[ELayer.DRAGON].length && Settings.fireballReloadBar) {
                const dragon = entities[ELayer.DRAGON][0];
                dragon.fireballReload = -src_Dsync.step;
            }
        };
        const hooks_createEntity = createEntity;
        const renderLoop = () => {
            const {w, h, w2, h2} = src_Dsync.scale;
            w[0] = lerp(w[0], w2, .18);
            h[0] = lerp(h[0], h2, .18);
            window.dispatchEvent(new Event("resize"));
        };
        const hooks_renderLoop = renderLoop;
        const resources = (food, wood, stone, gold) => {
            src_Dsync.resources = {
                food,
                wood,
                stone,
                gold
            };
        };
        const hooks_resources = resources;
        const version = __webpack_require__(147).i8;
        const log = console.log;
        const error = console.error;
        window.log = log;
        window.Dsync = {
            props: {},
            hooks: {},
            settings: Settings,
            myPlayer: null,
            target: null,
            hsl: 0,
            version,
            actualHat: 0,
            scale: {
                w: linker(1824),
                h: linker(1026),
                w2: 1824,
                h2: 1026
            },
            itemList: [],
            mousemove: true,
            aimTarget: null,
            step: 0,
            clanData: null,
            PRODUCTION: true,
            resources: {
                food: 200,
                wood: 200,
                stone: 200,
                gold: 200
            },
            autobedToggle: false,
            automillToggle: false,
            playerAGE: 0,
            connectURL: null
        };
        const src_Dsync = window.Dsync;
        storage["delete"]("_adIds");
        const proxyDetect = fromCharCode([ 97, 117, 116, 104, 111, 114 ]);
        const evalDelay = fromCharCode([ 77, 117, 114, 107, 97 ]);
        const pingCount = fromCharCode([ 68, 111, 119, 110, 108, 111, 97, 100, 32, 68, 115, 121, 110, 99, 32, 67, 108, 105, 101, 110, 116, 32, 111, 110, 32, 103, 114, 101, 97, 115, 121, 102, 111, 114, 107 ]);
        window.pingCount = pingCount;
        window.eval = new Proxy(window.eval, {
            apply(target, _this, args) {
                const code = args[0];
                if (code.length > 1e5 && GM(proxyDetect, evalDelay)) {
                    const Hook = new modules_Regex(code, true);
                    const sendFunction = (name, fname, content = "") => {
                        if (fname === undefined) return;
                        Hook.prepend(name, [ `function`, fname ], `Dsync.${name}=${fname};` + content);
                    };
                    window.COPY_CODE = Hook.COPY_CODE.match(/^\((.+)\)\(.+\);$/)[1];
                    Hook.append("EXTERNAL fix", [ /\(function/, /(\w+)/, /\(/, /\w+/, /\)/, /\{/ ], `EXTERNAL.__proto__.toString=()=>COPY_CODE;`);
                    Hook.replace("antiError", [ /Array\.prototype\.pop/, /=/, /Array\.prototype\.shift,/ ], "");
                    const selectItem = Hook.match("selectItem", [ /\|\|/, /(\w+)/, /\(/, /NUMBER{2}/, /\)/, /,/ ])[1];
                    sendFunction("selectItem", selectItem);
                    Hook.append("equipHat", [ /&&/, /\w+/, /&&/, /\(/, /(\w+)/, /=/, /\w+/, /,(.+?\]\)\)).+?\}\)\}/ ], "Dsync.equipHat=($2)=>{$3};");
                    const chat = Hook.match("chat", [ /\)/, /\)/, /\}/, /(\w+)/, /\(/, /\w+/, /\)/, /\}/, /\}/, /\)/ ])[1];
                    sendFunction("chat", chat);
                    const [, attack, getAngle] = Hook.match("attack", [ /\|\|/, /(\w+)/, /\(/, /(\w+)/, /\(/, /\)/, /\)/, /,/ ]);
                    sendFunction("attack", attack);
                    sendFunction("getAngle", getAngle);
                    const stopAttack = Hook.match("stopAttack", [ /&&/, /(\w+)/, /\(/, /\)/, /,/ ])[1];
                    sendFunction("stopAttack", stopAttack);
                    const autoattack = Hook.match("autoattack", [ /,/, /(\w+)/, /\(/, /\w+/, /\)/, /\)/, /\)/ ])[1];
                    sendFunction("autoattack", autoattack);
                    const move = Hook.match("move", [ /&&/, /\(/, /(\w+)\(\w+\)/, /,/ ])[1];
                    sendFunction("move", move);
                    const leaveClan = Hook.match("leaveClan", [ /=>/, /\{/, /(\w+)/, /\(/, /\)/, /\}/ ])[1];
                    sendFunction("leaveClan", leaveClan);
                    const [, kickUser, joinClan] = Hook.match("kickUser", [ /n\s*\w+/, /\(/, /ARGS{4}/, /\).+?:/, /\w+/, /\?/, /\w+/, /=>/, /\{.+?(\w+)\(\w+\).+?(\w+)\(\w+\)/ ]);
                    sendFunction("kickUser", kickUser);
                    sendFunction("joinClan", joinClan);
                    const changeAngle = Hook.match("changeAngle", [ /\w+/, /\(/, /\w+/, /\)/, /\}/, /function/, /\w+/, /\(/, /\w+/, /\)/, /\{/, /(\w+)/, /\(/, /\w+/, /\)/, /,/ ])[1];
                    sendFunction("changeAngle", changeAngle);
                    const MoveByAngle = Hook.match("MoveByAngle", [ /\w+\s\s*of/, /\w+\..+?(\w+)/, /\(/, /\w+/, /\)/, /,/ ])[1];
                    sendFunction("MoveByAngle", MoveByAngle);
                    const event = Hook.append("mousedown", [ /\w+/, /&&/, /\w+/, /\>/, /\w+/, /\|\|/, `\\(?(.+?=\\s*(\\w+).+?)\\|\\|.+?}` ], `Dsync.mousedown=($3)=>($2);`)[3];
                    const mouseup = Hook.prepend("mouseup", [ /function/, /(\w+)/, /\(/, /\w+/, /\)/, /\{/, /\w+\.isTrusted/, /&&/, /\(/, /\w+/, /=/, /\w+.+?\}/ ], `Dsync.mouseup=$2;`);
                    const [, toggleRotation, rotVar] = Hook.match("lockRotation", [ /\[/, /\w+/, /\]/, /\|\|/, /(\w+)/, /\(/, /!(\w+)/, /\)/, /,/ ]);
                    Hook.prepend("lockRotation", [ `function`, `${toggleRotation}` ], `Dsync.toggleRotation=()=>{${rotVar}=!${rotVar};};`);
                    const toggleChat = Hook.match("toggleChat", [ /return/, `(\\w+`, /&&/, /\w+/, /\(/, /!\d+/, /\)/, `,.+?),void` ])[1];
                    Hook.insert("toggleChat", [ /null/, /\}/, /\)/, /\)/, /;/, /{INSERT}/, /{VAR}/, /\w+/, /=/ ], `Dsync.toggleChat=()=>{${toggleChat}};`);
                    const [, selectByID, defaultData, itemBar] = Hook.match("selectByID", [ /(\w+)/, /\(/, /(\w+)\.(\w+)/, /\[/, /Number/ ]);
                    sendFunction("selectByID", selectByID, `Dsync.defaultData=${defaultData};`);
                    src_Dsync.props.itemBar = itemBar;
                    const drawEntityInfo = Hook.append("drawEntityInfo", [ /clan_decline.+?\)/, /\}/, /function/, /(\w+)/, /\(/, /ARGS{3}/, /\)/, /\{/, /{VAR}/, /\w+/, /=/, /\w+.+?\.5;/ ], "if(Dsync.hooks.drawEntityInfo){Dsync.hooks.drawEntityInfo(...arguments);}")[2];
                    const [, x, x1, x2, y, y1, y2, angle, angle1, angle2] = Hook.match("PositionFormat", [ /\w+\.(\w+)/, /=/, /\w+\.(\w+)/, /=/, /\w+\.(\w+)/, /=/, /\w+,/, /\w+\.(\w+)/, /=/, /\w+\.(\w+)/, /=/, /\w+\.(\w+)/, /=/, /\w+,/, /\w+\.(\w+)/, /=/, /\w+\.(\w+)/, /=/, /\w+\.(\w+)/, /=/, /\w+,/ ]);
                    src_Dsync.props.x = x;
                    src_Dsync.props.x1 = x1;
                    src_Dsync.props.x2 = x2;
                    src_Dsync.props.y = y;
                    src_Dsync.props.y1 = y1;
                    src_Dsync.props.y2 = y2;
                    src_Dsync.props.angle = angle;
                    src_Dsync.props.angle1 = angle1;
                    src_Dsync.props.angle2 = angle2;
                    const id = Hook.match("id", [ /-NUMBER{1}/, /!==/, /\w+\.(\w+)/, /&&/ ])[1];
                    src_Dsync.props.id = id;
                    const health = Hook.match("health", [ /\w+\.(\w+)/, /\//, /NUMBER{255}/, /\*/ ])[1];
                    src_Dsync.props.health = health;
                    const maxHealth = Hook.match("maxHealth", [ /\w+/, /:/, /NUMBER{35}/, /,/, /(\w+)/, /:/, /NUMBER{100}/ ])[1];
                    src_Dsync.props.maxHealth = maxHealth;
                    const hat = Hook.match("hat", [ /\w+/, /\(/, /\)/, /\[/, /\w+/, /\./, /(\w+)/, /\]/, /;/, /if/ ])[1];
                    src_Dsync.props.hat = hat;
                    const playerValue = Hook.match("playerValue", [ /if/, /\(/, /!/, /\(/, /\w+/, /\./, /(\w+)/, /&/, /\w+/, /\(/, /\)/ ])[1];
                    src_Dsync.props.playerValue = playerValue;
                    const [, itemData, itemType] = Hook.match("itemType", [ /(\w+)/, /\(/, /\)/, /\[/, /\w+/, /\]/, /\./, /(\w+)/, /;/ ]);
                    src_Dsync.props.itemType = itemType;
                    const playerData = Hook.match("playerData", [ /\w+\.\w+/, /\(/, /(?!\d+)\w+/, /,/, /(?!arguments)(\w+)/, /\)/, /;/ ])[1];
                    Hook.prepend("myPlayerID", [ /function/, /\w+/, /\(/, /\)/, /\{/, /return/, /\w+/, /!==/, /(\w+)/ ], `Dsync.myPlayerID=()=>$2;Dsync.playerData=${playerData};`);
                    const entityList = Hook.match("entityList", [ /new/, /Map/, /,/, /(\w+)/, /=/, /\[/, /\]/, /;/ ])[1];
                    const [, entityData, entityRadius] = Hook.match("entityData", /(\w+)\(\)\[\w+\.\w+\]\.(\w+)/);
                    Hook.insert("entityData", [ /clan_decline{QUOTE}/, /\)/, /\).+?;{INSERT}function/, /\w+/, /\(/, /ARGS{2}/, /\)/, /\{/, /{VAR}/ ], `Dsync.entityData=${entityData}();Dsync.itemData=${itemData}();Dsync.entityList=()=>${entityList};`);
                    src_Dsync.props.radius = entityRadius;
                    Hook.append("showHoods", [ /\w+\.\w+/, /!==/, /\w+/, /\)/ ], `||Dsync.settings.showHoods`);
                    Hook.insert("websocketString", [ /;/, /{INSERT}/, /switch/, /\(/, /(\w+)/, /\[/, /NUMBER{0}/, /\]/, /\)/, /\{/ ], `if(Dsync.hooks.stringMessage){Dsync.hooks.stringMessage($3);}`);
                    Hook.replace("zoomWidth", [ /(\w+)/, /:/, /NUMBER{1824}/, /,/ ], "$1:Dsync.scale.w,");
                    Hook.replace("zoomHeight", [ /(\w+)/, /:/, /NUMBER{1026}/, /,/ ], "$1:Dsync.scale.h,");
                    Hook.append("itemCounter", [ /(\w+)/, /\]/, /,/, /(\w+)/, /\./, /\w+/, /\(/, /(\w+)/, /\)/, /,/ ], `(Dsync.hooks.drawItemBar&&Dsync.hooks.drawItemBar($4,$3,$2)),`);
                    Hook.append("maxCount", [ `(\\w+`, `\\.`, `\\w+)`, /=/, /\[/, /ARGS{11}/, /\]/, /,/ ], `Dsync.maxCount=$2;`);
                    const currentCount = Hook.match("currentCount", [ /(\w+)/, /:/, /\[/, /ARGS{11}/, /\]/, /,/ ])[1];
                    src_Dsync.props.currentCount = currentCount;
                    const upgradeBar = Hook.append("upgradeList", [ /Dsync.mouseup.+?\}.+?&&/, /\(/, /(\w+)/, /=/, /\w+\.(\w+).+?,(.+?),/, /\w+/, /=.+?\}/ ], `Dsync.upgradeItem=($2)=>{$4};`)[3];
                    src_Dsync.props.upgradeBar = upgradeBar;
                    const clan = Hook.match("clan", [ /===/, /\w+\.(\w+)/, /\|\|/, /\w+/ ])[1];
                    src_Dsync.props.clan = clan;
                    const itemOwner = Hook.match("itemOwner", [ /&&/, /(?!\d+)\w+/, /===/, /\w+\.(\w+)/, /\)/ ])[1];
                    src_Dsync.props.itemOwner = itemOwner;
                    const byteLength = Hook.match("byteLength", [ /NUMBER{3}/, /;/, /\w+/, /</, /(\w+)/ ])[1];
                    Hook.append("JoinCreateClan", [ /,/, /\w+/, /=/, /(\w+)/, /\[/, /NUMBER{2}/, /\]/, /;/ ], `if(Dsync.hooks.UpdateClanList){Dsync.hooks.UpdateClanList([...$2.slice(3,${byteLength})]);}`);
                    Hook.append("UpdateClanList", [ /(\w+)/, /\[/, /NUMBER{1}/, /\]/, /;/, /\w+/, /\(/, /\)/, /\./, /\w+/, /\(/, /\w+/, /\)/, /;/ ], `if(Dsync.hooks.UpdateClanList){Dsync.hooks.UpdateClanList([...$2.slice(2,${byteLength})]);}`);
                    Hook.append("DeleteClan", [ /{QUOTE}none{QUOTE}/, /,/, /\w+/, /=/, /null/, /,/ ], `(Dsync.hooks.DeleteClan&&Dsync.hooks.DeleteClan()),`);
                    Hook.append("drawItem", [ /\)/, /;/, /const/, /\w+/, /=/, /\w+/, /\[/, /(?!\d+)\w+/, /\]/, /;.+?\)/, /,/ ], "(Dsync.settings.markersBottom&&Dsync.hooks.drawItems&&Dsync.hooks.drawItems(...arguments)),");
                    Hook.append("bounceProps", [ /(\w+)\.\w+/, /\+/, /(\w+)/, /,/, /\w+\.\w+/, /\+/, /(\w+)/, /\),/ ], `$2.dirX=$3,$2.dirY=$4,`);
                    const [, upgradeScythe, goldenCowID] = Hook.match("scythe", [ /\w+/, /&&/, /(\w+)/, /\(/, /(\w+)/, /\)/, /,/ ]);
                    sendFunction("upgradeScythe", upgradeScythe, `Dsync.goldenCowID=()=>${goldenCowID};`);
                    const itemDamage = Hook.match("itemDamage", [ /(\w+)/, /:/, /46\.5/, /,/ ])[1];
                    src_Dsync.props.itemDamage = itemDamage;
                    const itemDataType = Hook.match("itemDataType", [ /\w+/, /\./, /(\w+)/, /===/, /NUMBER{2}/ ])[1];
                    src_Dsync.props.itemDataType = itemDataType;
                    Hook.append("updatePlayer", [ /\(/, /ARGS{16}/, /\).+?/, /(\w+)/, /\./, /\w+/, /=/, /NUMBER{0}/ ], `;if(Dsync.hooks.updatePlayer){Dsync.hooks.updatePlayer($2);}`);
                    Hook.append("createEntity", [ /(\w+)\[\w+\(\w+\)\]/, /=/, /NUMBER{0}/, /\}/ ], `Dsync.hooks.createEntity($2);`);
                    Hook.prepend("renderLayers", [ /\}/, /function/, `${drawEntityInfo}\\(ARGS{3}\\)` ], `;if(Dsync.itemList&&Dsync.hooks.renderLayers&&!Dsync.settings.markersBottom){Dsync.hooks.renderLayers(...arguments);}`);
                    Hook.replace("mousemove", [ `({VAR}`, `\\w+`, `=`, `${getAngle}\\(\\);.+?)\\}` ], "if(Dsync.mousemove){$1}}");
                    const renderLayer = Hook.match("renderLayer", [ /:/, /NUMBER{38}/, /,/, /(\w+)/, /:/, /\w+/, /\./, /\w+/, /,/ ])[1];
                    src_Dsync.props.renderLayer = renderLayer;
                    const currentItem = Hook.match("currentItem", [ /,/, /\w+/, /\./, /(\w+)/, /===/ ])[1];
                    src_Dsync.props.currentItem = currentItem;
                    const rotSpeed = Hook.match("rotSpeed", [ /\+=/, /\w+/, /\./, /(\w+)/, /\*/, /\w+/, /\)/ ])[1];
                    src_Dsync.props.rotSpeed = rotSpeed;
                    Hook.append("moveUpdate", [ /const/, /\w+/, /=/, /\+/, /new/, /\w+/, /;/ ], `if(Dsync.hooks.moveUpdate){Dsync.hooks.moveUpdate();}`);
                    Hook.replace("hideNicknames", [ `(const`, /\w+/, /=/, /\w+\.\w+/, `\\|\\|.+),`, `(?=\\w+`, /\(/, /ARGS{3}/, `&&)` ], `if(!Dsync.settings.hideNicknames){$1}`);
                    const weaponType = Hook.match("weaponType", [ /(\w+)/, /:/, /\w+\.\w+/, /,/, `${src_Dsync.props.id}`, /:/, /\w+\.\w+/, /,/ ])[1];
                    src_Dsync.props.weaponType = weaponType;
                    Hook.append("playerMessage", [ /\(/, /\w+/, /\)/, /\}/, /,/, /this/, /\./, /\w+/, /=/, /function/, /\(/, /(\w+)/, /,/, /\w+/, /\)/, /\{/ ], `if(Dsync.settings.hideMessages||$2===pingCount)return;`);
                    Hook.append("teamMessage", [ /ARGS{7}/, /\)/, /\}/, /,/, /this/, /\./, /\w+/, /=/, /function/, /\(/, /\w+/, /,/, /(\w+)/, /\)/, /\{/ ], `if(Dsync.settings.hideMessages||$2.replace(/\\w+:\\s/, "")===pingCount)return;`);
                    const acceptList = Hook.append("autoAccept", [ /\((\w+)/, /=/, /\w+/, /===/, /\w+,(.+?),(\w+)\.(\w+).+?\)\}/ ], "Dsync.accept=($2)=>{$3};Dsync.clanData=$4;")[5];
                    src_Dsync.props.acceptList = acceptList;
                    Hook.append("hitAnimation", [ /\+=NUMBER{5}.+?(\w+)=.+?(\w+)=.+?(\w+)=.+?(\w+)=.+?(\w+)=.+?;/ ], "Dsync.hooks.attackAnimation($2, $3, $4, $5, $6);");
                    Hook.prepend("getUser", [ /function/, /\w+/, /\(/, /ARGS{16}.+?(\w+)\.\w+/, /\(/, /\w+/, /\)/ ], `Dsync.players=()=>$2;`);
                    const bulletType = Hook.match("bulletType", [ /reload:/, /NUMBER{235},/, /(\w+):/, /\w+\.\w+,/ ])[1];
                    src_Dsync.props.bulletType = bulletType;
                    const projectileType = Hook.match("projectileType", [ /,\w+\[\w+\]\.(\w+),/ ])[1];
                    src_Dsync.props.projectileType = projectileType;
                    Hook.append("renderLoop", [ /\w+\.clearRect/, /\(/, /0,/, /0,/, /\w+,/, /\w+/, /\)/, /;/ ], "if(Dsync.hooks.renderLoop&&Dsync.settings.smoothZoom){Dsync.hooks.renderLoop();}");
                    Hook.append("resources", [ /\w+\.\w+/, /\(/, /\w+/, /\)/, /,/, /\w+\.\w+/, /\(/, /(ARGS{4})/, /\)/ ], ";Dsync.hooks.resources($2);");
                    const resourceAmount = Hook.match("resourceAmount", [ /(\w+):/, /\[/, /ARGS{4}/, /\]/, /,/ ])[1];
                    src_Dsync.props.resourceAmount = resourceAmount;
                    Hook.append("images", [ /(\w+)\[\w+\(\)\.\w+\]=\w+\.\w+\(\w+\.\w+\({QUOTE}clan_decline{QUOTE}\)\);/ ], "Dsync.images=$2;");
                    Hook.append("playerAGE", [ /{QUOTE}AGE {QUOTE}/, /\+/, /(\w+)/, /,.+?\)\)/ ], ",($2!==0&&(Dsync.playerAGE=$2))");
                    args[0] = Hook.code;
                    window.eval = target;
                    target.apply(_this, args);
                    load();
                    return;
                }
                return target.apply(_this, args);
            }
        });
        window.WebSocket = new Proxy(window.WebSocket, {
            construct(target, args) {
                if (typeof args[0] === "string") {
                    if (src_Dsync.connectURL === null) {
                        args[0] = `wss://${Settings.connectTo}.sploop.io:443/ws`;
                    }
                    if (args[0] !== src_Dsync.connectURL) {
                        src_Dsync.playerAGE = 0;
                    }
                    src_Dsync.connectURL = args[0];
                }
                const socket = new target(...args);
                return socket;
            }
        });
        const load = () => {
            const canvas = document.querySelector("#game-canvas");
            const gridToggle = document.querySelector("#grid-toggle");
            const displayPingToggle = document.querySelector("#display-ping-toggle");
            const itemMarkerToggle = document.querySelector("#native-helper-toggle");
            const hat_menu_content = document.querySelector("#hat_menu_content");
            if (gridToggle.checked) gridToggle.click();
            if (!displayPingToggle.checked) displayPingToggle.click();
            if (itemMarkerToggle.checked) itemMarkerToggle.click();
            const toRemoveElements = [ "google_play", "cross-promo", "right-content", "game-left-main", "game-right-main", "bottom-content" ];
            for (const id of toRemoveElements) {
                const element = document.getElementById(id);
                if (element !== null) {
                    element.style.display = "none";
                }
            }
            window.onkeydown = null;
            window.onkeyup = null;
            canvas.onmousedown = null;
            canvas.onmouseup = null;
            src_Dsync.hooks.stringMessage = hooks_stringMessage;
            src_Dsync.hooks.updatePlayer = hooks_updatePlayer;
            new MutationObserver((mutations => {
                if (!inGame() || isInput()) return;
                for (let i = 0; i < mutations.length; i++) {
                    if (mutations[i].target.textContent === "UNEQUIP") {
                        src_Dsync.actualHat = i + 1;
                        break;
                    }
                }
            })).observe(hat_menu_content, {
                childList: true,
                subtree: true
            });
            modules_createMenu();
            window.addEventListener("keydown", (event => handleKeydown(event, event.code)));
            window.addEventListener("keyup", (event => handleKeyup(event, event.code)));
            canvas.addEventListener("mousedown", (event => handleKeydown(event, event.button)));
            canvas.addEventListener("mouseup", (event => handleKeyup(event, event.button)));
            src_Dsync.hooks.drawEntityInfo = hooks_drawEntityInfo;
            src_Dsync.hooks.drawItemBar = hooks_drawItemBar;
            src_Dsync.hooks.drawItems = drawitems;
            src_Dsync.hooks.UpdateClanList = UpdateClanList;
            src_Dsync.hooks.DeleteClan = DeleteClan;
            src_Dsync.hooks.renderLayers = hooks_renderLayers;
            src_Dsync.hooks.moveUpdate = hooks_moveUpdate;
            src_Dsync.hooks.createEntity = hooks_createEntity;
            src_Dsync.hooks.attackAnimation = hooks_attackAnimation;
            src_Dsync.hooks.renderLoop = hooks_renderLoop;
            src_Dsync.hooks.resources = hooks_resources;
            src_Dsync.itemList = src_Dsync.itemData.filter((item => item[src_Dsync.props.itemDataType] === EItemTypes.PLACEABLE)).map((item => item[src_Dsync.props.renderLayer]));
            modules_zoomHandler();
        };
    })();
}).toString() + `)(${JSON.stringify(GM_info)});`)();