您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
simple visuals
当前为
// ==UserScript== // @name Sploop++ // @version 0.9 // @description simple visuals // @author nyannez // @match *://sploop.io/* // @run-at document-start // @icon https://sploop.io/img/ui/favicon.png // @grant none // @namespace https://gf.qytechs.cn/users/960747 // ==/UserScript== const defaultSettings = { HP: true, chestsHP: true, rainbHP: true, automill: true, LBF: false, rainbBar: false, hideHPwNicks: false, hideHUD: false, autoRespawn: false, hitboxes: false, autobuy: true, wrange: false, rainbNick: false, rainbClan: false, nickGradient: false, VSync: true, slowMotion: false, nickColor: "#89A0FE", nickColor2: "#404040", gradient: "#6d1082", gradient2: "#ad1dab", HPColor: "#a4cc4f", EnemysHPColor: "#802641", clanColor: "#0a80c9", clanColor2: "#2e3336", snowColor: "#A9A9A9", grassColor: "#788F57", beachColor: "#fcefbb", riverColor: "#2a8b9b", desertColor: "#b38354" }; let buyed = false; const checkChanges = (obj1, obj2) => { const keys1 = Object.keys(obj1); const keys2 = Object.keys(obj2); return keys2.some(key => !keys1.includes(key)) || keys1.some(key => !keys2.includes(key)); } if (!localStorage.settings || checkChanges(defaultSettings, JSON.parse(localStorage.settings))) { localStorage.setItem("settings", JSON.stringify(defaultSettings)); } const changeSettings = (key, value) => { let newSettings = JSON.parse(localStorage.settings); newSettings[key] = value; localStorage.setItem("settings", JSON.stringify(newSettings)); }; const getValue = (key) => JSON.parse(localStorage.settings)[key]; const defaultRAF = window.requestAnimationFrame; if (!getValue("VSync")) window.requestAnimationFrame = f => setTimeout(f, 0); window.changeSettings = changeSettings; window.getValue = getValue; window.getSettings = changeSettings; const getEl = (id) => document.getElementById(id); const serverInfo = document.createElement("span"); const pingCount = document.createElement("span"); const bossInfo = document.createElement("span"); const FPS = document.createElement("span"); const servers = { SFRA: "EU#1 Sand", SFRA2: "EU#2", SFRA2BIS: "EU#2 Sand", SCA: "USA#1 Sand", SCA2: "USA#2 Sand", SGP: 'AS#1 Sand', SGP2: 'AS#2 Sand', SGP3BIS: "AS#3 Sand", FRA1FFA: "EU Classic", CA1FFA: "USA Classic", SGP1FFA: "AS Classic", FR1EVENT: "EU Event", CA1EVENT: "USA Event" }; window.addEventListener('DOMContentLoaded', event => { const Comfortaa = document.createElement('style'); Comfortaa.innerHTML = `@import "https://fonts.googleapis.com/css2?family=Comfortaa&display=swap";`; document.head.appendChild(Comfortaa); serverInfo.style = `position: absolute;font-size: 120%;z-index: 888;top: 15px;color: white;left: 1%;font-weight: 100;pointer-events: none;font-family: Comfortaa;text-shadow: 1px 1px 5px black, 3px 3px 5px black;`; FPS.id = "FPS"; FPS.style = "position: absolute;z-index: 10;left: 1%;font-family: Comfortaa;pointer-events:none;top: 50px;font-size: 120%;color: white;font-weight: 100;text-shadow: 1px 1px 5px black, 3px 3px 5px black;" pingCount.id = "pingCount"; pingCount.style = "position: absolute;z-index: 10;left: 1%;font-family: Comfortaa;pointer-events:none;top: 85px;font-size: 120%;color: white;font-weight: 100;text-shadow: 1px 1px 5px black, 3px 3px 5px black;" bossInfo.id = "bossInfo"; bossInfo.style = "position: absolute;z-index: 10;left: 1%;font-family: Comfortaa;pointer-events:none;top: 120px;font-size: 120%;color: white;font-weight: 100;text-shadow: 1px 1px 5px black, 3px 3px 5px black;" pingCount.textContent = "Ping: unknown"; serverInfo.textContent = "Loading..."; bossInfo.textContent = "Boss: unknown"; FPS.textContent = "FPS: unknown"; serverInfo.style.display = "none"; FPS.style.display = "none"; pingCount.style.display = "none"; bossInfo.style.display = "none"; const plist = document.createElement("div"); plist.id = "plist"; plist.style = ` position: absolute; top: 50%; background: #00000042; left: 50%; height: 500px; width: 400px; color: white; transform: translate(-50%, -50%); display: none; flex-direction: column; overflow: auto; `; const menu = document.createElement("div"); menu.id = "menu"; menu.className = "menuu"; menu.style = ` position: absolute; top: 40%; background: rgba(0, 0, 0, 0.26); left: 50%; height: 450px; box-shadow: rgba(0, 0, 0, 0.26) 3px 8px 20px 1px; width: 400px; transform: translate(-50%, -40%); border-radius: 15px; padding: 10px; border: 3px solid rgba(0, 0, 0, 0.16); display: none; overflow: auto; `; menu.innerHTML = ` <div class="otctup"> <span class="checkbox-text">Health point</span> <label class="checkbox"> <input type="checkbox" id="HP"> <span class="checkmark"></span> </label> </div> <div class="otctup"> <span class="checkbox-text">Rainbow nickname</span> <label class="checkbox"> <input type="checkbox" id="rainbNick"> <span class="checkmark"></span> </label> </div> <div class="otctup"> <span class="checkbox-text">Rainbow HP</span> <label class="checkbox"> <input type="checkbox" id="rainbHP"> <span class="checkmark"></span> </label> </div> <div class="otctup"> <span class="checkbox-text">Rainbow age bar</span> <label class="checkbox"> <input type="checkbox" id="rainbBar"> <span class="checkmark"></span> </label> </div> <div class="otctup"> <span class="checkbox-text">Rainbow clan</span> <label class="checkbox"> <input type="checkbox" id="rainbClan"> <span class="checkmark"></span> </label> </div> <div class="otctup"> <span class="checkbox-text">Rainbow speed: </span> <input class="inpu" value="35"> </div> <div class="otctup"> <span class="checkbox-text">Chests HP</span> <label class="checkbox"> <input type="checkbox" id="chestsHP"> <span class="checkmark"></span> </label> </div> <div class="otctup"> <span class="checkbox-text">Leader board full gold</span> <label class="checkbox"> <input type="checkbox" id="LBF"> <span class="checkmark"></span> </label> </div> <div class="otctup"> <span class="checkbox-text">Hide HP with nicknames</span> <label class="checkbox"> <input type="checkbox" id="hideHPwNicks"> <span class="checkmark"></span> </label> </div> <div class="otctup"> <span class="checkbox-text">Hide HUD</span> <label class="checkbox"> <input type="checkbox" id="hideHUD"> <span class="checkmark"></span> </label> </div> <div class="otctup"> <span class="checkbox-text">VSync</span> <label class="checkbox"> <input type="checkbox" id="VSync"> <span class="checkmark"></span> </label> </div> <div class="otctup"> <span class="checkbox-text">Slowmotion</span> <label class="checkbox"> <input type="checkbox" id="slowMotion"> <span class="checkmark"></span> </label> </div> <div class="otctup"> <span class="checkbox-text">Hitboxes</span> <label class="checkbox"> <input type="checkbox" id="hitboxes"> <span class="checkmark"></span> </label> </div> <div class="otctup"> <span class="checkbox-text">Weapon range</span> <label class="checkbox"> <input type="checkbox" id="wrange"> <span class="checkmark"></span> </label> </div> <div class="otctup"> <span class="checkbox-text">Auto respawn</span> <label class="checkbox"> <input type="checkbox" id="autoRespawn"> <span class="checkmark"></span> </label> </div> <div class="otctup"> <span class="checkbox-text">Automills (sandbox)</span> <label class="checkbox"> <input type="checkbox" id="automill"> <span class="checkmark"></span> </label> </div> <div class="otctup"> <span class="checkbox-text">Auto buy hats (sandbox)</span> <label class="checkbox"> <input type="checkbox" id="autobuy"> <span class="checkmark"></span> </label> </div> <div style="display: flex;align-items: center;"> <span class="checkbox-text">Nickname color</span> <input oninput=window.changeColor(this) value=${getValue("nickColor")} type="color" id="nickColor" style="background: none;border: none;left: 5px;position: relative;"> <input oninput=window.changeColor(this) value=${getValue("nickColor2")} type="color" id="nickColor2" style="background: none;border: none;left: 5px;position: relative;"> </div> <div style="display: flex;align-items: center;"> <span style="padding-right: 5px;" class="checkbox-text">Nickname gradient</span> <label class="checkbox"> <input type="checkbox" id="nickGradient"> <span class="checkmark"></span> </label> <input oninput=window.changeColor(this) value=${getValue("gradient")} type="color" id="gradient" style="background: none;border: none;left: 5px;position: relative;"> <input oninput=window.changeColor(this) value=${getValue("gradient2")} type="color" id="gradient2" style="background: none;border: none;left: 5px;position: relative;"> </div> <div style="display: flex;align-items: center;"> <span class="checkbox-text">HP color</span> <input oninput=window.changeColor(this) value=${getValue("HPColor")} type="color" id="HPColor" style="background: none;border: none;left: 5px;position: relative;"> </div> <div style="display: flex;align-items: center;"> <span class="checkbox-text">Enemys HP color</span> <input oninput=window.changeColor(this) value=${getValue("EnemysHPColor")} type="color" id="EnemysHPColor" style="background: none;border: none;left: 5px;position: relative;"> </div> <div style="display: flex;align-items: center;"> <span class="checkbox-text">Clan color</span> <input oninput=window.changeColor(this) value=${getValue("clanColor")} type="color" id="clanColor" style="background: none;border: none;left: 5px;position: relative;"> <input oninput=window.changeColor(this) value=${getValue("clanColor2")} type="color" id="clanColor2" style="background: none;border: none;left: 5px;position: relative;"> </div> <div style="display: flex;align-items: center;"> <span class="checkbox-text">Snow color</span> <input oninput=window.changeColor(this) value=${getValue("snowColor")} type="color" id="snowColor" style="background: none;border: none;left: 5px;position: relative;"> </div> <div style="display: flex;align-items: center;"> <span class="checkbox-text">Grass color</span> <input oninput=window.changeColor(this) value=${getValue("grassColor")} type="color" id="grassColor" style="background: none;border: none;left: 5px;position: relative;"> </div> <div style="display: flex;align-items: center;"> <span class="checkbox-text">Beach color</span> <input oninput=window.changeColor(this) value=${getValue("beachColor")} type="color" id="beachColor" style="background: none;border: none;left: 5px;position: relative;"> </div> <div style="display: flex;align-items: center;"> <span class="checkbox-text">River color</span> <input oninput=window.changeColor(this) value=${getValue("riverColor")} type="color" id="riverColor" style="background: none;border: none;left: 5px;position: relative;"> </div> <div style="display: flex;align-items: center;"> <span class="checkbox-text">Desert color</span> <input oninput=window.changeColor(this) value=${getValue("desertColor")} type="color" id="desertColor" style="background: none;border: none;left: 5px;position: relative;"> </div> `; document.body.append(serverInfo, FPS, pingCount, bossInfo, menu, plist); document.addEventListener("keydown", event => { if (event.code === "Space") { event.preventDefault(); } }); window.changeColor = (element) => { changeSettings(element.id, element.value); }; setInterval(() => { getSploopServers(); if (!currentServerUrl) return; const serverName = currentServerUrl.toUpperCase(); const server = sploopServers.find(i => i.r === serverName); serverInfo.textContent = `${servers[serverName]}: ${server.d[1]}`; }, 2000); try { document.querySelector("#hat-menu > div.pop-top.select").remove(); [...document.getElementsByClassName("green-button")].forEach(event => { event.style.pointerEvents = "all"; }); ["logo", "bottom-wrap", "shop-io-games", "right-content", "game-bottom-content", "game-right-content-main", "game-left-content-main", "cross-promo", "landscape"].forEach(e => getEl(e).remove()); [...document.getElementsByClassName("description")].forEach(e => { e.remove(); }); document.querySelector("#skin-message > a > div").remove(); document.querySelector("#left-content > div:nth-child(3)").remove(); getEl("shop-message").style.opacity = 0; getEl("skin-message").style.opacity = 0; } catch(err) {} const styleItem = ` .otctup { padding-top: 5px; } ::-webkit-scrollbar { width: 18px; margin-left: 10px; } ::-webkit-scrollbar-thumb { border-radius: 20px; border: 2px solid #272727; background: #3939397d; } .inpu { width: auto; max-width: 50px; outline: none; text-align: center; } .checkbox { position: relative; display: inline-block; cursor: pointer; } .checkbox input { position: absolute; opacity: 0; cursor: pointer; } .checkbox .checkmark { position: relative; display: inline-block; vertical-align: middle; width: 20px; height: 20px; border: 2px solid #333; border-radius: 5px; background-color: #222; } .checkbox input:checked + .checkmark { background-color: #222; } .checkbox input:checked + .checkmark:after { content: ""; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e"); background-size: cover; background-position: center; position: absolute; width: 100%; height: 100%; } .checkbox span { pointer-events: none; } .checkbox-text { font-weight: 100; font-family: Comfortaa; color: white; } .subcontent-bg { box-shadow: none; border: none; } #ranking-rank-container { height: 360px; } #ranking2-middle-main { height: auto; } #left-content { height: 40px; position: unset; width: 100px; display: flex; flex-direction: row; justify-content: space-around; } #hat-menu { height: 330px; } .green-button { background-color: #ffffff5c; box-shadow: none; } .green-button:hover { box-shadow: none; background-color: #ffffff87; } .green-button:active { box-shadow: none; background-color: #ffffff5c; } .menu .content .menu-item .menu-pricing .action { border-radius: 0; text-shadow: none; border: 3px solid #ffffff; } .scrollbar::-webkit-scrollbar { border: none; border-radius: 0; } .scrollbar::-webkit-scrollbar-thumb { border-radius: 0; box-shadow: none; } .pop-box { box-shadow: none; border-radius: 0; background: none !important; } .menu .content .menu-item { border-bottom: none; text-shadow: none; } #game-middle-main { left: 50%; transform: translate(-50%); } #main-content { background: none; } #hat_menu_content { pointer-events: none; padding: 0; border: none; background: none; box-shadow: none; margin: 0px; overflow: hidden; } .profile-scores { width: 600px; height: 76px; color: white; } #profile-next-rank-text { height: 100%; color: white; width: auto; max-width: none; } #profile-next-rank-icons { height: 100%; width: 250px; padding: 5px; margin-right: 10px; } `; const styleElement = document.createElement("style"); styleElement.innerHTML = styleItem; document.head.appendChild(styleElement); const kd = document.createElement("div"); let kdCount = (Number(document.querySelector("#total-kill").textContent) / Number(document.querySelector("#total-death").textContent)).toFixed(2); kd.innerHTML = `<div><div class="text-shadowed-3 profile-score">Kills/Deaths</div><div class="text-shadowed-3 profile-score yellow-text">${kdCount}</div></div>`; document.querySelector("#profile-container > div.middle-main.profile-scores").appendChild(kd); document.querySelectorAll('input[type="checkbox"]').forEach(el => { const id = el.id; if (["chestsHP", "LBF", "HP", "rainbHP", "rainbBar", "automill", "hideHPwNicks", "hideHUD", "autoRespawn", "hitboxes", "autobuy", "wrange", "rainbNick", "rainbClan", "nickGradient", "VSync", "slowMotion"].includes(id)) { el.checked = getValue(id); el.addEventListener("click", event => { changeSettings(id, !getValue(id)); if (id === "VSync") { if (getValue(id)) { window.requestAnimationFrame = defaultRAF; } else { window.requestAnimationFrame = f => setTimeout(f, 0); }; } else if (id === "hideHUD") { if (getValue(id)) { serverInfo.style.display = "none"; FPS.style.display = "none"; pingCount.style.display = "none"; bossInfo.style.display = "none"; } else { serverInfo.style.display = "block"; FPS.style.display = "block"; pingCount.style.display = "block"; bossInfo.style.display = "block"; }; }; }); }; }); window.hue = 0; const updateColors = () => { if (getValue("rainbBar")) { window.barColor = `hsl(${window.hue}, 80%, 50%)`; } else { window.barColor = "#ffffff"; } if (getValue("rainbHP")) { window.myHPColor = `hsl(${window.hue}, 80%, 50%)`; } else { window.myHPColor = getValue("HPColor"); } window.hue += 0.3; window.hue >= 360 && (window.hue = 0); }; const setNewInterval = () => { const speed = document.querySelector("#menu > div:nth-child(6) > input").value; const colorInterval = setInterval(() => { if (speed !== document.querySelector("#menu > div:nth-child(6) > input").value) { setNewInterval(); clearInterval(colorInterval); }; updateColors(); }, document.querySelector("#menu > div:nth-child(6) > input").value); }; setNewInterval(); }); let sploopServers, currentServerUrl, ws; const getSploopServers = async () => { await fetch("https://sploop.io/servers").then(e => e.text()).then(e => (sploopServers = JSON.parse(e))); }; const entities = { 0: { health: 100 }, 14: { health: 380 }, 23: { health: 380 }, 24: { health: 380 }, 25: { health: 1000 }, 27: { health: 5000 }, 28: { health: 5000 }, 36: { health: 380 }, }; const packetsID = { item: 0, move: 1, hat: 5, chat: 7, place: 8, joinGame: 11, angle: 13, upgrade: 14, stopMove: 15, clanAcc: 17, stopAttack: 18, hit: 19, joinClan: 21, clan: 22, EAttack: 23, clanLeave: 24 }; let myID, placing = true, copyMove = 0, onHand = 0, placed = false, isAlive = false; const sendPacket = (packetID, ...values) => ws.send(new Uint8Array([packetID, ...values])); const respawn = () => ws.send(JSON.stringify([10, localStorage.nickname, localStorage.skin, "FFFFFEEEEGGBBBAAA", localStorage.accessory, localStorage.accMail, localStorage.accToken, localStorage.back])) window.sendPacket = sendPacket; const getAngle = (angle) => { const vec = { x: 0, y: 0 }; if (angle & 1) vec.y--; if (angle & 2) vec.y++; if (angle & 4) vec.x--; if (angle & 8) vec.x++; vec.x *= -1; vec.y *= -1; return Math.atan2(vec.y, vec.x); }; const checkChat = () => getEl("chat-wrapper").style.display === "" || getEl("chat-wrapper").style.display === "none"; const openPlayersList = () => { let dis = getEl("plist").style.display; getEl("plist").style.display = dis === "flex" ? dis = "none" : dis = "flex"; }; window.addEventListener("keydown", event => { const pressedKey = event.code; if (pressedKey === "Escape") window.openMenu(); if (pressedKey === "Digit1") { onHand = 0; } else if (pressedKey === "Digit2") onHand = 1; if (checkChat() && ["KeyW", "KeyA", "KeyS", "KeyD"].includes(pressedKey)) { if (pressedKey === "KeyW") copyMove |= 1; if (pressedKey === "KeyA") copyMove |= 4; if (pressedKey === "KeyS") copyMove |= 2; if (pressedKey === "KeyD") copyMove |= 8; } //if (pressedKey === "KeyU") { // openPlayersList(); //} }); window.addEventListener("keyup", event => { const pressedKey = event.code; if (checkChat() && ["KeyW", "KeyA", "KeyS", "KeyD"].includes(pressedKey)) { if (pressedKey === "KeyW") copyMove &= -2; if (pressedKey === "KeyA") copyMove &= -5; if (pressedKey === "KeyS") copyMove &= -3; if (pressedKey === "KeyD") copyMove &= -9; } }); window.seconds = undefined; window.updatePList = () => { getEl("plist").innerHTML = ``; if (window.allPlayers) { window.allPlayers.forEach(player => { if (player.lc !== "") { const el = document.createElement("span"); el.textContent = player.lc; el.style = ` left: 10px; position: relative; user-select: text; ` getEl("plist").append(el); } }) } }; window.getKill = (data) => { }; let nextBoss = 0; window.getBoss = (ID, bosses) => { clearInterval(window.seconds); const whichBoss = ID === 0 ? "cow" : ID === 1 ? "dragon" : ID === 2 ? "mammoth" : "unknown"; nextBoss = bosses[ID + 1 < 3 ? ID + 1 : 0].name; bossInfo.textContent = `Boss: ${whichBoss}`; }; window.receiveMsg = (msg) => { const data = msg.data; const decoded = typeof data === "string" ? JSON.parse(data) : new Uint8Array(data); if (!ws) { currentServerUrl = msg.target.url.split('//')[1].split('.')[0]; ws = msg.target; ws.onclose = () => { ws = undefined; buyed = false; } }; switch (decoded[0]) { case 20: { if (getValue("automill") && copyMove !== 0 && isAlive && serverInfo.textContent.includes("Sand") && !placed && window.stats[Sploop.objCount][5] < 8 && placing) { placing = false; sendPacket(packetsID.item, 0); sendPacket(packetsID.item, 5); const angle = getAngle(copyMove); const transformedAngle = 65535 * (angle + Math.PI) / (2 * Math.PI); sendPacket(packetsID.hit, 255 & transformedAngle, transformedAngle >> 8 & 255); sendPacket(packetsID.stopAttack); sendPacket(packetsID.item, onHand); setTimeout(() => { placing = true; }, 100) } else if (window.stats[Sploop.objCount][5] === 8) placed = true; break; } case 15: getEl("pingCount").textContent = `Ping: ${decoded[1]}`; break; case 21: { let count = 59; window.seconds = setInterval(() => { bossInfo.textContent = `Next boss: ${nextBoss} ${count}s`; count--; }, 1000) break; } case 35: if (getValue("autobuy") && !buyed) { for (let i = 0; i < 12; i++) sendPacket(packetsID.hat, i); buyed = true; }; isAlive = true; serverInfo.style.display = "block"; FPS.style.display = "block"; pingCount.style.display = "block"; bossInfo.style.display = "block"; break; case 19: if (getValue("autoRespawn")) respawn(); onHand = 0; isAlive = false; placed = false; serverInfo.style.display = "none"; FPS.style.display = "none"; pingCount.style.display = "none"; bossInfo.style.display = "none"; break; case 33: myID = decoded[1]; window.myID = myID; break; }; }; let gameEntity; let chests = [], queue = []; window.attackAnimation = (type, id, weapon, isObject, entity) => { if (entity.type === 30 && chests.some(chest => chest[Sploop.id2] === id)) { queue.push(id); } else if (entity.type === 0) { const chests = queue.map(id => gameEntity.get(id)); queue = []; if (!chests.length) return; const hatAdditional = entity[Sploop.hat] === 11 ? 1.4 : (entity[Sploop.hat] === 2 ? 1.25 : 1); const damage = (window.weapons[weapon][Sploop.weaponDamage2] || window.weapons[weapon][Sploop.weaponDamage]) * hatAdditional; chests.forEach(entity => { entity.health = ((entity.health -= damage) % 1 === 0) ? entity.health.toFixed(0) : entity.health.toFixed(1); }); }; }; window.drawChestHP = (target, id, ctx, step) => { if (target.type === 30 && target.health === undefined) target.health = 380; if (!chests.some(chest => chest[Sploop.id2] === target[Sploop.id2]) && target.type === 30) chests.push(target); if (getValue("hitboxes")) { ctx.save(); ctx.beginPath(); ctx.lineWidth = 1.5; ctx.arc(0, 0, window.sprites[target.type][Sploop.size], 0, 2 * Math.PI); ctx.stroke(); ctx.closePath(); ctx.restore(); } }; window.removeEntity = (entity) => { //second if (!entity.health) return; if ([12].includes(entity.type)) { const player = [...gameEntity].filter(([key, value]) => Sploop.id in value && value[Sploop.id] === entity[Sploop.id] && value.type === 0)[0][1]; const spike = queue.map(id => gameEntity.get(id)); queue = []; spike.forEach(obj => { obj.health -= player[Sploop.currentWeapon]; // 27 : 30; ih, Kh, Lh }); }; delete entity.health; const index = chests.findIndex(chest => chest[Sploop.id2] === entity[Sploop.id2]); if (index !== -1) { chests.splice(index, 1); }; }; const log = console.log; window.getEntityData = async (entity, ctx, isTeammate, map) => { gameEntity = map; const entityX = entity[Sploop.x], entityY = entity[Sploop.y]; if (entity[Sploop.id] === myID) window.myAngle = entity[Sploop.angle]; if (getValue("hitboxes")) { ctx.save(); ctx.beginPath(); ctx.lineWidth = 1.5; ctx.arc(entity[Sploop.x], entity[Sploop.y], window.sprites[entity.type][Sploop.size], 0, 2 * Math.PI); ctx.stroke(); ctx.closePath(); ctx.restore(); } const maxHealth = entities[entity.type].health; const entityHealth = ((entity[Sploop.health] * maxHealth / 100) / 255 * 100).toFixed(0); if (getValue("wrange") && entity.type === 0) { const entityWeapon = entity[Sploop.currentWeapon], entityAngle = entity[Sploop.angle], weaponRange = window.weapons[entityWeapon].range, weaponName = window.weapons[entityWeapon][Sploop.weaponName]; ctx.save(); ctx.beginPath(); ctx.fillStyle = "#0000001A"; ctx.strokeStyle = "#ffffff80"; ctx.lineWidth = 3; if (weaponName === "XBow" || weaponName === "Bow" || weaponName === "Stone Musket" || weaponName === "Pearl") { const weaponX = weaponRange * Math.cos(entityAngle) + entityX; const weaponY = weaponRange * Math.sin(entityAngle) + entityY; ctx.moveTo(entityX, entityY) ctx.lineTo(weaponX, weaponY); } else { ctx.arc(entityX, entityY, weaponRange, entityAngle - 1.5, entityAngle + 1.5) }; ctx.fill(); ctx.stroke(); ctx.closePath(); ctx.restore(); } if (getValue("HP")) { ctx.font = "100 20px MV Boli"; ctx.shadowOffsetX = 2; ctx.shadowOffsetY = 2; ctx.shadowColor = "#000000"; ctx.shadowBlur = 5; ctx.fillStyle = (entity[Sploop.id] === myID || isTeammate) ? window.myHPColor : getValue("EnemysHPColor"); ctx.fillText(`${entityHealth}/${maxHealth}`, entityX - 50, entityY + window.sprites[entity.type][Sploop.size] + 70); ctx.shadowBlur = 0; ctx.shadowOffsetX = 0; ctx.shadowOffsetY = 0; }; if (getValue("chestsHP") && chests.length) { chests.forEach(target => { ctx.save(); ctx.beginPath(); ctx.textAlign = "center"; ctx.font = "600 20px Comfortaa"; ctx.fillStyle = "#fff"; ctx.strokeStyle = "#000"; ctx.lineWidth = 3; ctx.strokeText(target.health, target[Sploop.x], target[Sploop.y] + 5); ctx.fillText(target.health, target[Sploop.x], target[Sploop.y] + 5); ctx.fillRect ctx.closePath(); ctx.restore(); }); }; }; const TYPEOF = value => Object.prototype.toString.call(value).slice(8, -1).toLowerCase(); const NumberSystem = [ { radix: 2, prefix: "0b0*" }, { radix: 8, prefix: "0+" }, { radix: 10, prefix: "" }, { radix: 16, prefix: "0x0*" } ]; class Regex { constructor(code, unicode) { this.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 => TYPEOF(value) === "regexp"; generateNumberSystem = int => `(?:${NumberSystem.map(({ prefix, radix }) => prefix + int.toString(radix)).join("|")})`; parseVariables = regex => regex.replace(/\{VAR\}/g, "(?:let|var|const)") .replace(/\{QUOTE\}/g, "['\"`]") .replace(/ARGS\{(\d+)\}/g, (_, count) => (Array(Number(count)).fill("\\w+")).join("\\s*,\\s*")) .replace(/NUMBER\{(\d+)\}/g, (_, int) => this.generateNumberSystem(Number(int))); format = (name, inputRegex, flags) => { const regex = Array.isArray(inputRegex) ? inputRegex.map(exp => this.isRegexp(exp) ? exp.source : exp).join("\\s*") : this.isRegexp(inputRegex) ? inputRegex.source : ""; let parsedRegex = this.parseVariables(regex); if (this.unicode) { parsedRegex = parsedRegex.replace(/\\w/g, "(?:[^\\x00-\\x7F-]|\\$|\\w)"); } const expression = new RegExp(parsedRegex.replace(/\{INSERT\}/, ""), flags); return parsedRegex.includes("{INSERT}") ? new RegExp(parsedRegex, 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 === 0 ? "$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 }; return match; }; matchAll = (name, regex, debug = false) => { const expression = this.format(name, regex, "g"); const matches = [...this.code.matchAll(expression)]; this.hooks[name] = { expression, match: matches }; return matches; }; replace = (name, regex, substr, flags) => { const expression = this.format(name, regex, flags); this.code = this.code.replace(expression, substr); return this.code.match(expression) || []; }; replaceAll = (name, regex, substr, flags) => { const expression = this.format(name, regex, "g"); this.code = this.code.replaceAll(expression, substr); return this.code.match(expression) || []; }; append = (name, regex, substr) => this.template(0, name, regex, substr); prepend = (name, regex, substr) => this.template(1, 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`); return this.code.match(findExpression); }; }; window.openMenu = () => { let dis = getEl("menu").style.display; getEl("menu").style.display = dis === "block" ? dis = "none" : dis = "block"; }; window.convertToEmoji = (text) => { const emojiRegex = /:(\w+):/g; const convertedText = text.replace(emojiRegex, (match, p1) => { const emojiMap = { smile: '😊', grin: '😁', joy: '😂', laughing: '😆', sweat_smile: '😅', wink: '😉', blush: '😊', yum: '😋', sunglasses: '😎', heart_eyes: '😍', kissing_heart: '😘', kissing_closed_eyes: '😚', stuck_out_tongue_winking_eye: '😜', stuck_out_tongue_closed_eyes: '😝', flushed: '😳', relieved: '😌', unamused: '😒', sweat: '😓', pensive: '😔', sleep: '😴', mask: '😷', thermometer_face: '🤒', head_bandage: '🤕', sleeping: '😴', zzz: '💤', poop: '💩', clap: '👏', thumbs_up: '👍', thumbs_down: '👎', heart: '❤️', broken_heart: '💔', sparkling_heart: '💖', star: '⭐', fire: '🔥', rainbow: '🌈', rocket: '🚀', hourglass: '⌛', gift: '🎁', tada: '🎉', umbrella: '☔', snowflake: '❄️', sun: '☀️', moon: '🌙', beer: '🍺', coffee: '☕', cake: '🍰', money_bag: '💰', bomb: '💣', airplane: '✈️', anchor: '⚓', guitar: '🎸', alien: '👽', skull: '💀', ghost: '👻', pumpkin: '🎃', christmas_tree: '🎄', santa: '🎅', gift_box: '🎁', bell: '🔔', crossed_swords: '⚔️', wizard: '🧙', clinking_glasses: '🥂', thinking_face: '🤔', detective: '🕵️♂️', scientist: '👨🔬', astronaut: '👨🚀', artist: '👩🎨', pilot: '👨✈️', bride_with_veil: '👰', angel: '👼', baby: '👶', family: '👪', thumbs_up: '👍', thumbs_down: '👎', }; return emojiMap[p1] || match; }); return convertedText; } document.addEventListener("wheel", (event) => { getEl("hat_menu_content").scrollBy(0, event.deltaY < 0 ? -900 : 900); }); window.abbreviateNumber = (number) => { const suffixes = { 't': 1e12, 'b': 1e9, 'm': 1e6, 'k': 1e3, }; for (const [letter, value] of Object.entries(suffixes)) { if (number >= value) { let abbreviated = (number / value).toFixed(2).replace(/\.?0*$/, ''); return `${abbreviated}${letter}`; } } return number.toString(); } window.hslToHex = (h, s, l) => { l /= 100; const a = s * Math.min(l, 1 - l) / 100; const f = n => { const k = (n + h / 30) % 12; const color = l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1); return Math.round(255 * color).toString(16).padStart(2, '0'); }; return `#${f(0)}${f(8)}${f(4)}`; } let frames = 0, lastTime, lastUpdate = 0, frameCount = 0; window.updateFPSCounter = (currentTime) => { const elapsedSeconds = (currentTime - (lastTime || (lastTime = currentTime))) / 1000; frameCount++; if (elapsedSeconds >= 1) { FPS.textContent = `FPS: ${Math.round(frameCount / elapsedSeconds)}`; frameCount = 0; lastTime = currentTime; } }; window.nameGold = false; let Sploop; const applyHooks = code => { const Hook = new Regex(code, true); window.COPY_CODE = (Hook.COPY_CODE.match(/^(\(function \w+\(\w+\)\{.+)\(.+?\);$/) || [])[1]; Hook.append("EXTERNAL fix", /\(function (\w+)\(\w+\)\{/, "let $2 = eval(`(() => ${COPY_CODE})()`);delete window.COPY_CODE;"); const obfString = Hook.match("of", /\);return (\w)=function/)[1]; const ID = Hook.match('ID', /&&\w{2}===\w\.(\w{2})\){/)[1]; const map = Hook.match("objects", /let \w=(\w).get\(\w\)/)[1]; const myData = Hook.match('myPlayer', /=(\w.get\(\w{2}\));\w&&\w\(\)/)[1]; const X = Hook.match('playerX', /\{this\.(\w{2})=\w\|\|0/)[1]; const Y = Hook.match('playerY', /,this\.(\w{2})=\w\|\|0\}/)[1]; const ID2 = Hook.match('ID2', /-1!==\w+\.(\w+)&&/)[1]; const currentWeapon = Hook.match("crntWeapon", /,\w.(\w{2})===/)[1]; const angle = Hook.match("angle", /;\w.(\w{2})=\w\(\)/)[1]; const weaponName = Hook.match("wpnName", /(\w{2}):"XX/)[1]; const health = Hook.match("health", /(\w{2})<<8;/)[1]; const weaponDamage = Hook.match("wpnDamage", /(\w{2}):32,reload:300/)[1]; const weaponDamage2 = Hook.match("wpnDamage", /\w{2}:25,.{6}:300,(\w{2}):30/)[1]; const teamID = Hook.match('test', /,\w=\w.(\w{2})\|.+?\<\<8/)[1]; const radius = Hook.match("radius", /(\w{2}):220/)[1]; const [, currentItem, hat] = Hook.match("hat", /\(\w+\.(\w+)\|\w+\.(\w+)<<NUMBER{8}\)/); const inWhichObject = Hook.match("iwo", /110\).+?,1===\w.(\w{2})&&!\w{2}/)[1]; const weaponID = Hook.match('weaponID', /5,(\w{2}):0,\w{2}:22,/)[1]; const itemsID = Hook.match("IDs", />1\){.{3}(\w{2})/)[1]; const objCount = Hook.match("objCount", /\),this.(\w{2})=\w\):/)[1]; const size = Hook.match("size", /\.(\w{2})\+50/)[1]; const RweaponDMG = Hook.match("size", /\[0,0,10,0\](?:[^:]+:){4}[^,:]+,(\w{2})/)[1]; const Bosses = Hook.match("bosses", /\(3424\),(\w+)/)[1]; const myID = Hook.match("myID", /!==(\w{2})\)/)[1]; Sploop = { x: X, y: Y, id: ID, map: map, id2: ID2, hat: hat, size: size, type: 'type', angle: angle, health: health, radius: radius, teamID: teamID, itemsID: itemsID, objCount: objCount, weaponID: weaponID, RweaponDMG: RweaponDMG, weaponName: weaponName, weaponDamage: weaponDamage, weaponDamage2: weaponDamage2, currentWeapon: currentWeapon, inWhichObject: inWhichObject } console.debug(Sploop); Hook.insert("changeBiomesColors", /\.5\*\w+;{INSERT}.+?\+\+\)\w=(\w+).+?(\w+),\w\./, ` $3()[0].$4 = window.getValue("grassColor"); $3()[1].$4 = window.getValue("snowColor"); $3()[2].$4 = window.getValue("beachColor"); $3()[3].$4 = window.getValue("riverColor"); $3()[4].$4 = window.getValue("desertColor"); `); Hook.replace("let", /\);const (\w)=\+/, `);let $1=+`); Hook.insert("test", /\w\.\w+,{INSERT}\w\),\w+&/, `window.getValue("slowMotion") ? o / 3 : `); Hook.insert("w", /&.{15}\),\w+\(\w+,{INSERT}\w\),\w+/, `window.getValue("slowMotion") ? o / 3 : `); Hook.replace("w", /=\w\(479\),|="#4f403c",/, `="#0000004D",`); Hook.append("updateFPS", /const\s(\w)=\+new Date,.+?3;/, `window.updateFPSCounter($2);`); Hook.insert("addID", /\w+:function\(ARGS{8}{INSERT}\)/, `,id`); Hook.insert("addID", /;return this\.\w+\(ARGS{9}{INSERT}\)/, `,id`); Hook.insert("addID", /\w+:function\(ARGS{9}{INSERT}\){c/, `,id=false`); Hook.replace("coloredNick", /(\w\.\w+);(const \w.{5}\|\|\(\w\.\w+=\w.{12}\(\)\.\w+,)\w\(\)\.\w+.+?;let/, `$1;$2$1 === ${myID} ? window.getValue("rainbNick") ? window.hslToHex(window.hue, 80, 50) : window.getValue("nickColor") : "#fff", $1 === ${myID} ? window.getValue("nickColor2") : "#404040", undefined, undefined, undefined, undefined, $1));let`); Hook.replace("removeChecker", /;(const \w=)\w.\w+\|\|/, `;$1`); Hook.insert("names", /,{INSERT}\w+:480},\w\./, `name: "mammoth",`); Hook.insert("names", /,{INSERT}\w+:480},\w\[/, `name: "dragon",`); Hook.insert("names", /,{INSERT}duration:120/, `name: "cow",`); Hook.replace("chooseItem", /"Choose item",40,"#fff"/, `"«Choose item»",40,"#fff","#303030"`); Hook.replace("addGradient", /\),(\w)\.fillStyle=(\w)(,\w\.)/, `), gradient=$1.createLinearGradient(0, 0, $1.measureText(n).width, 0), gradient.addColorStop(0, window.getValue("gradient")), gradient.addColorStop(1, window.getValue("gradient2")), $1.fillStyle = id === window.myID && window.getValue("nickGradient") ? gradient : $2 $3 `); Hook.insert("hideHPwNicks", /\w+\(\)}function \w+\(\w,\w\){{INSERT}const \w=\w;|\d+\)\]\(\)}function \w+\(\w,\w\){{INSERT}const \w=\w;/, `if (window.getValue("hideHPwNicks")) return;`); Hook.append("hideHUD", /==\w+}function \w+\(\w,\w\){/, `if (window.getValue("hideHUD")) return;`); Hook.insert("test", /{INSERT}.{12}\w+\[2\]\<<8;\w+=/, `return;`); Hook.replace("test", /this.Fl=this.Fl/, "this.Fl=0"); Hook.replace("test", /.ag=.02/, ".ag=.0"); Hook.append("someFunction", /login\.hide\(\),\w{2}\(\)}/, `window.someFunction=lt;`); const serverList = Hook.match("allPlayers", /\w",\w{2}:\w\?(\w{2}\.\w{2})\[/)[1]; Hook.append("allPlayers", /\(\),\w\.restore.+?\w{2}\(\w,\w\){const \w=\w;/, `window.allPlayers = ${serverList};`); Hook.replace("defaultData", /(\W\w+>NUMBER{1}\W.+?(\w+)\.(\w+).+?)function/, `$1setInterval(() => {window.updatePList();},1000);function`); Hook.append("getBoss", /3\)}\w+ \w+\((\w),\w,\w\){/, `window.getBoss($2, ${Bosses}());`) Hook.replace("abrScore", /("ranking-score">.{3})(\w)/, `$1window.abbreviateNumber($2)`); let args = Hook.match("drawEntityInfo", /-NUMBER{50},.+?function \w+\((ARGS{3})\)\{/)[1]; const weaponList = Hook.match("weaponList", /\?Math\.PI\/2.+?(\w\(\))/)[1]; Hook.append("Kills", /=1}}function.+?function.{4}(\w).{2}/, `window.getKill($2);`); Hook.append('removeEntity', /\;let (\w)=\w.\w+\(\w\).{14}/, `window.removeEntity($2);`); Hook.replace("renderItems", /(\(\w+\.\w+\+\w+,\w+\.\w+\+\w+\).+?\w+\(\).+?\w+\.\w+\.\w+\)([,;]))/, `$1window.drawChestHP(...arguments, A)$2`); Hook.replace("defaultData", /(\W\w+>NUMBER{1}\W.+?(\w+)\.(\w+).+?)function/, `$1window.stats=$2;window.sprites = tt();window.weapons=${weaponList};function`); Hook.append("getMsg", /0;fu.{10}(\w).{2}/, `window.receiveMsg($2);`); Hook.replace('customClan', /"\["/, `"«"`); Hook.replace('customClan', /"\]"/, `"»"`); Hook.replace("particles", /(0,\w{2}=!1,\w{2}=)!1,/, `$1true,`); Hook.replace("grid", /1,(\w{2})=!0/, `1, $1=false`); Hook.replace("millMarker", /=false,(\w{2})=!0/, `=false,$1=false`); Hook.replace("enablePing", /42.5\),(\w{2})=!1/, `42.5),$1=true`); Hook.replace("nativeRender", /(true,\w{2}=)!1/, `$1true`); Hook.replace("replaceOrigin", /("#8ecc51".{16}).{5}/, `$1let`); Hook.replace("betterAGEBar", /("AGE 0"|\w\(\d+\)),24,("#fff"|\w\(\d+\))\)\);/, `"«0»",24,"#fff","#303030"));`) Hook.replace("betterAGEBar", /("AGE "|\w\(\d+\))\+(\w),\d{2},\w\(\d+\)/, `"«" + $2 + "»",24,"#fff","#303030"`) Hook.replace("ColorMats", /\)\,24,\"\#\w{6}\"\)|\)\,24,\w\(\d{3}\)\)/, `),24,"#AE4D57", "#303030")`) Hook.replace("ColorMats", /\)\,24,\"\#\w{6}\"\)|\)\,24,\w\(\d{3}\)\)/, `),24,"#935F3B", "#303030")`) Hook.replace("ColorMats", /\)\,24,\"\#\w{6}\"\)|\)\,24,\w\(\d{3}\)\)/, `),24,"#7B7A91", "#303030")`) Hook.replace("ColorMats", /\"\",24\,\D{9}|\"\",24\,\w\(\d{3}\)/, `"",24,"#FFD700", "#303030"`) Hook.replace('customLoader', /Loading Sploop.io/, `Loading cringe...`) Hook.replace("customBar", /20,10,"#5D3A37"/, `20,10,"#00000080"`); Hook.replace("customBar", /=\w\(\d{3}\),this|="#\w+",this/, `=window.getValue("rainbBar") ? window.hslToHex(window.hue, 80, 50) : "#fff",this`) Hook.replace("customHP", /(,\.18.+?\:).+?\)}/, `$1window.myHPColor)}`) Hook.replace("customHP", /(=\.5;\w\.fillStyle=\w).+?,/, `$1?window.myHPColor : window.getValue("EnemysHPColor"),`) Hook.replace("customClan", /"#96C949","#404040"|"#96C949",\w\(\d{3}\)/, `window.getValue("rainbClan") ? window.hslToHex(window.hue, 80, 50) : window.getValue("clanColor"),window.getValue("clanColor2")`); Hook.append("showFullMats", /10},\w{2}\Dfunction\((\w)\){/, `return $2;`); Hook.append("attackAnim", /\+=NUMBER{5}.+?(\w+)=.+?(\w+)=.+?(\w+)=.+?(\w+)=.+?(\w+)=.+?;/, `window.attackAnimation($2, $3, $4, $5, $6);`); Hook.replace("showFullGold", /(\w)\>\d{7}.*?\+""/, `window.getValue("LBF")?$1:window.abbreviateNumber($1)`); const kawakaa = Hook.match("m", /var.{6}(\w{2})\((\w),(\w)\)&&\w{2}\(.{5}/).slice(1); Hook.append("newImg", /(\w).{9}(.{9})."clan_decline"\)\);/, `$2[$2.length] = $3("amoguduss"));$2[$2.length - 1].src = "https://cdn.glitch.global/80f01abb-e90c-4a7c-8f06-4aab31fdf28a/wasdad-02.png?v=1708708420340";`); Hook.append("newImg", /1.{4}(\w{2})\((\w).{9}38.5,42.5\)/, `,sbnoadnb=$2($3[$3.length - 1], 38.5, 42.5)`); Hook.append("newImg", /var.{6}(\w{2})\((\w),(\w)\)&&\w{2}\(.{5}/, `sbnoadnb.$2($3, $4) && window.openMenu(),`); Hook.append("newImg", /return \w{2}.\w{2}\(\w,\w\)&&\((\w)=!0\),/, `sbnoadnb.${kawakaa[0]}(${kawakaa[1]}, ${kawakaa[2]}) && ($2 = !0),`); Hook.append("newImg", /\.(\w+)=5,(\w+).(\w+)=\w+.\w+-\w+.width-11;/ , `sbnoadnb.$2 = 5, sbnoadnb.$4 = $3.$4 - $3.width-11;`); Hook.append("newImg", /0,-50\)}}if\(\w{2}.\w{2}\(\w\),\w{2}.(\w{2})\((\w)\),/, `sbnoadnb.$2($3),`); Hook.append("goldNick", /=\[\w{2}\(\).\w{2}.\w{2},\w/, `+ (window.nameGold ? " " + window.abbreviateNumber(document.getElementById("score-left-value").textContent) : "")`); Hook.append('drawEntityInfo', /EnemysHPColor.+?width,\w\*\w.height\)/, `;try {window.getEntityData(${args}, ${Sploop.map});} catch(err) {};`) return Hook.code; }; window.eval = new Proxy(window.eval, { apply(target, _this, args) { const code = args[0]; if (code.length > 100000) { args[0] = applyHooks(code); window.eval = target; } return target.apply(_this, args); } });
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址