您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Show HP%, FPS, CPS, Ping, Big Shop, Transparent Shop & Clan menu. Use 75% page zoom for best results. Press f2 to ON/OFF ghost mode & f4 to ON/OFF hitbox. More Texture pack
当前为
// ==UserScript== // @name Sploop.io Best Legit Script // @namespace http://tampermonkey.net/ // @version 1.0 // @description Show HP%, FPS, CPS, Ping, Big Shop, Transparent Shop & Clan menu. Use 75% page zoom for best results. Press f2 to ON/OFF ghost mode & f4 to ON/OFF hitbox. More Texture pack // @match *://sploop.io/* // @icon https://i.postimg.cc/vBz07fcS/Screenshot-2025-08-28-090152.png // @grant none // @author normalplayer // ==/UserScript== //i got hitnox from fizzixww// (function() { 'use strict'; // ---------------- Better Health Bar ---------------- function lerpColor(a, b, amount) { const ah = parseInt(a.replace(/#/g, ''), 16), ar = ah >> 16, ag = (ah >> 8) & 0xff, ab = ah & 0xff; const bh = parseInt(b.replace(/#/g, ''), 16), br = bh >> 16, bg = (bh >> 8) & 0xff, bb = bh & 0xff; const rr = ar + amount * (br - ar), rg = ag + amount * (bg - ag), rb = ab + amount * (bb - ab); return '#' + (((1 << 24) + (rr << 16) + (rg << 8) + rb) | 0).toString(16).slice(1); } function drawHpText(ctx, text, xPos, yPos, color) { ctx.save(); ctx.font = "20px 'Baloo Paaji'"; ctx.textAlign = "center"; ctx.textBaseline = "top"; ctx.fillStyle = color; ctx.fillText(text, xPos, yPos); ctx.restore(); } const enhanceFillRect = function (fill) { return function (x, y, width, height) { const fullWidth = 95; const hpPercent = Math.max(0, Math.min(1, width / fullWidth)); const percentText = `${~~(width / fullWidth * 100)}%`; const centerX = x + fullWidth / 2; let color; if (this.fillStyle === "#a4cc4f") { color = hpPercent > 0.5 ? lerpColor("#a4cc4f", "#e09f3e", (1 - hpPercent) * 2) : lerpColor("#e09f3e", "#cc5151", (0.5 - hpPercent) * 2); this.fillStyle = color; drawHpText(this, percentText, centerX, y + height + 9, color); } if (this.fillStyle === "#cc5151") { color = hpPercent > 0.5 ? lerpColor("#cc5151", "#e09f3e", (1 - hpPercent) * 2) : lerpColor("#e09f3e", "#a4cc4f", (0.5 - hpPercent) * 2); this.fillStyle = color; drawHpText(this, percentText, centerX, y + height + 9, color); } fill.call(this, x, y, width, height); }; }; const FillRect = CanvasRenderingContext2D.prototype.fillRect; CanvasRenderingContext2D.prototype.fillRect = enhanceFillRect(FillRect); const { fillText } = CanvasRenderingContext2D.prototype; CanvasRenderingContext2D.prototype.fillText = function (...args) { if (typeof args[0] === "string") { this.lineWidth = 8; this.strokeStyle = "#313131"; this.strokeText.apply(this, args); } return fillText.apply(this, args); }; const { strokeRect } = CanvasRenderingContext2D.prototype; CanvasRenderingContext2D.prototype.strokeRect = function(x, y, w, h) { if ((w === 40 && h === 40) || this.strokeStyle === "#bfbfbf" || this.strokeStyle === "#dedede") { return; } return strokeRect.call(this, x, y, w, h); }; const { stroke } = CanvasRenderingContext2D.prototype; CanvasRenderingContext2D.prototype.stroke = function(...args) { if (this.strokeStyle === "#bfbfbf" || this.strokeStyle === "#dedede") { return; } return stroke.apply(this, args); }; // ---------------- Overlay ---------------- const overlay = document.createElement("canvas"); overlay.width = window.innerWidth; overlay.height = window.innerHeight; overlay.style.position = "absolute"; overlay.style.top = "0"; overlay.style.left = "0"; overlay.style.pointerEvents = "none"; overlay.style.zIndex = "9999"; document.body.appendChild(overlay); const octx = overlay.getContext("2d"); let frameCount = 0, fpsStartTime = performance.now(), fps=0, cps=0; let lastFrameTime = performance.now(), ping='...'; // ---------------- Ping, FPS, CPS ---------------- setInterval(()=>{ const now = performance.now(); ping = Math.round(now - lastFrameTime); lastFrameTime = now; }, 50); document.addEventListener("mousedown", ()=>{ cps++; setTimeout(()=>cps--,1000); }); // ---------------- Server Info ---------------- let serverName = "Unknown"; function updateServerName() { const select = document.getElementById("server-select"); if (select && select.options.length > 0) { serverName = select.options[select.selectedIndex].text; } } setInterval(updateServerName, 2000); function loop(){ const now = performance.now(); frameCount++; if(now - fpsStartTime >= 1000){ fps = frameCount; frameCount=0; fpsStartTime=now; } octx.clearRect(0,0,overlay.width,overlay.height); octx.save(); octx.font = "20px 'Baloo Paaji'"; octx.textBaseline = "top"; octx.strokeStyle="#313131"; octx.lineWidth=4; // SERVER octx.strokeText(`SERVER: ${serverName}`,10,5); octx.fillStyle="white"; octx.fillText(`SERVER: ${serverName}`,10,5); // FPS octx.strokeText(`FPS: ${fps}`,10,30); octx.fillText(`FPS: ${fps}`,10,30); // CPS octx.strokeText(`CPS: ${cps}`,10,55); octx.fillText(`CPS: ${cps}`,10,55); // PING octx.strokeText(`PING: ${ping}ms`,10,80); octx.fillText(`PING: ${ping}ms`,10,80); octx.restore(); requestAnimationFrame(loop); } loop(); window.addEventListener("resize", ()=>{ overlay.width = window.innerWidth; overlay.height = window.innerHeight; }); // ---------------- Auto Toggle ---------------- ['#grid-toggle','#native-friendly-indicator'].forEach(id=>{ const el = document.querySelector(id); if(el) el.click(); }); // ---------------- Ad Remove ---------------- const styleAdRemove = document.createElement('style'); styleAdRemove.type = 'text/css'; styleAdRemove.appendChild(document.createTextNode(` #cross-promo,#bottom-wrap,#google_play,#game-left-content-main,#game-bottom-content,#game-right-content-main,#left-content,#right-content{ display:none !important; } `)); document.head.appendChild(styleAdRemove); document.querySelector('#game-content').style.justifyContent='center'; document.querySelector('#main-content').style.width='auto'; // ---------------- Big Shop, Clan ------------------- (function() { var style = document.createElement("style"); style.innerHTML = ` /* --- SHOP --- */ #hat-menu { width: 500px !important; height: 790px !important; background: rgba(0,0,0,0) !important; opacity: 0.95 !important; border: 5px solid black !important; box-shadow: none !important; } #hat_menu_content { max-height: 780px !important; overflow-y: auto !important; background: transparent !important; } /* --- CLAN MENU --- */ #clan-menu { background: rgba(0,0,0,0) !important; /* trong suốt */ opacity: 0.95 !important; border: 5px solid black !important; /* vẫn giữ viền */ box-shadow: none !important; } #clan_menu_content { background: transparent !important; } `; document.head.appendChild(style); })(); // ------------------ Background -------------------- window.addEventListener("load", () => { const homepage = document.getElementById("homepage"); if (homepage) { homepage.style.backgroundImage = "url('https://4kwallpapers.com/images/wallpapers/satoru-gojo-black-3440x1440-14684.png')"; homepage.style.backgroundSize = "cover"; homepage.style.backgroundPosition = "center"; homepage.style.backgroundRepeat = "no-repeat"; } }); // --------------- UI -------------- const customReplacements = [ { selector: "#logo", image: "https://i.postimg.cc/HW8qMWLM/logo.png" }, ]; function applyCustomUI() { customReplacements.forEach(item => { const el = document.querySelector(item.selector); if (el) { if (el.tagName === "IMG") { el.src = item.image; } else { el.style.backgroundImage = `url(${item.image})`; el.style.backgroundSize = "cover"; el.style.backgroundPosition = "center"; el.style.backgroundRepeat = "no-repeat"; } } }); } applyCustomUI(); setInterval(applyCustomUI, 2000); function clearStyles(el) { if (!el) return; el.style.border = 'none'; el.style.outline = 'none'; el.style.boxShadow = 'none'; el.style.background = 'transparent'; el.style.backgroundColor = 'transparent'; el.style.opacity = '0.7'; el.style.setProperty('background-color', 'transparent', 'important'); el.style.setProperty('box-shadow', 'none', 'important'); el.style.setProperty('border', 'none', 'important'); el.style.setProperty('outline', 'none', 'important'); } window.addEventListener('load', () => { ['nav-img-profile', 'nav-img-shop', 'nav-img-game', 'nav-img-skins', 'nav-img-ranking'] .forEach(id => { const el = document.getElementById(id); if (el) el.style.display = 'none'; }); [ 'nav-profile', 'nav-game', 'nav-shop', 'nav-skins', 'nav-ranking', 'menu-nickname', 'server-select', 'play-text', 'ffa-mode', 'sandbox-mode', 'event-mode' ].forEach(id => { const el = document.getElementById(id); if (el) { el.style.opacity = '0.5'; el.style.color = '#5262ab'; } }); const nicknameInput = document.getElementById('nickname'); if (nicknameInput) { clearStyles(nicknameInput); nicknameInput.style.background = 'transparent'; nicknameInput.style.backgroundColor = 'transparent'; nicknameInput.style.color = '#5262ab'; nicknameInput.style.caretColor = '#ffffff'; nicknameInput.style.opacity = '0.5'; nicknameInput.style.border = 'none'; nicknameInput.style.outline = 'none'; } const serverSelect = document.getElementById('server-select'); if (serverSelect) { clearStyles(serverSelect); serverSelect.style.backgroundColor = 'rgba(0, 0, 0, 0.3)'; serverSelect.style.color = '#5262ab'; serverSelect.style.opacity = '1'; serverSelect.style.border = 'none'; serverSelect.style.outline = 'none'; serverSelect.style.boxShadow = 'none'; serverSelect.style.setProperty('background-color', 'rgba(0, 0, 0, 0.3)', 'important'); } const playBtn = document.getElementById('play-text'); clearStyles(playBtn); if (playBtn?.parentElement) clearStyles(playBtn.parentElement); ['ffa-mode', 'sandbox-mode', 'event-mode'].forEach(id => { const el = document.getElementById(id); clearStyles(el); if (el?.parentElement) clearStyles(el.parentElement); }); const container = document.getElementById('game-middle-main'); clearStyles(container); if (container) { container.querySelectorAll('*').forEach(child => clearStyles(child)); } }); // ================== GHOST MODE & HITBOX ================== let ghostModeEnabled = false; let hitboxEnabled = true; document.addEventListener("keydown", e => { if (e.key.toLowerCase() === "f2") { ghostModeEnabled = !ghostModeEnabled; console.log("Ghost Mode:", ghostModeEnabled ? "ON" : "OFF"); } if (e.key.toLowerCase() === "f4") { hitboxEnabled = !hitboxEnabled; console.log("Hitbox:", hitboxEnabled ? "ON" : "OFF"); } }); const excludedKeywords = [ "player", "inv_", "cow", "duck", "wolf", "shark", "mammoth", "gcow", "dragon" ]; const resourceKeywords = [ "tree", "rock", "bush", "cactus", "ruby", "wood", "stone", "gold", "wall", "spike", "windmill", "trap", "boost", "turret", "heal_pad", "platform", "roof", "bed", "teleporter", "lootbox" ]; const imageRadii = { // Nature // "https://sploop.io/img/entity/tree.png?v=1923912": 90, "https://sploop.io/img/entity/cherry_tree.png?v=1923912": 90, "https://sploop.io/img/entity/palm_tree.png?v=1923912": 90, "https://sploop.io/img/entity/wood_farm.png?v=1923912": 80, "https://sploop.io/img/entity/wood_farm_cherry.png?v=1923912": 80, "https://sploop.io/img/entity/rock.png?v=1923912": 75, "https://sploop.io/img/entity/stone_farm.png?v=1923912":75, "https://sploop.io/img/entity/bush.png?v=1923912": 50, "https://sploop.io/img/entity/berry_farm.png?v=1923912": 50, "https://sploop.io/img/entity/cactus.png?v=1923912": 50, "https://sploop.io/img/entity/gold.png?v=1923912": 76, "https://sploop.io/img/entity/ruby.png?v=1923912": 100, "https://sploop.io/img/entity/tornado.png?v=1923912": 220, // Body // "https://sploop.io/img/skins/body0.png?v=1923912": 35, "https://sploop.io/img/skins/body1.png?v=1923912": 35, "https://sploop.io/img/skins/body2.png?v=1923912": 35, "https://sploop.io/img/skins/body3.png?v=1923912": 35, "https://sploop.io/img/skins/body4.png?v=1923912": 35, "https://sploop.io/img/skins/body5.png?v=1923912": 35, "https://sploop.io/img/skins/body6.png?v=1923912": 35, "https://sploop.io/img/skins/body7.png?v=1923912": 35, "https://sploop.io/img/skins/body8.png?v=1923912": 35, "https://sploop.io/img/skins/body9.png?v=1923912": 35, "https://sploop.io/img/skins/body10.png?v=1923912": 35, "https://sploop.io/img/skins/body11.png?v=1923912": 35, "https://sploop.io/img/skins/body12.png?v=1923912": 35, "https://sploop.io/img/skins/body13.png?v=1923912": 35, "https://sploop.io/img/skins/body14.png?v=1923912": 35, "https://sploop.io/img/skins/body15.png?v=1923912": 35, "https://sploop.io/img/skins/body16.png?v=1923912": 35, "https://sploop.io/img/skins/body17.png?v=1923912": 35, "https://sploop.io/img/skins/body18.png?v=1923912": 35, "https://sploop.io/img/skins/body19.png?v=1923912": 35, "https://sploop.io/img/skins/body20.png?v=1923912": 35, "https://sploop.io/img/skins/body21.png?v=1923912": 35, "https://sploop.io/img/skins/body22.png?v=1923912": 35, "https://sploop.io/img/skins/body23.png?v=1923912": 35, "https://sploop.io/img/skins/body24.png?v=1923912": 35, "https://sploop.io/img/skins/body25.png?v=1923912": 35, "https://sploop.io/img/skins/body26.png?v=1923912": 35, "https://sploop.io/img/skins/body27.png?v=1923912": 35, "https://sploop.io/img/skins/body28.png?v=1923912": 35, "https://sploop.io/img/skins/body29.png?v=1923912": 35, "https://sploop.io/img/skins/body30.png?v=1923912": 35, "https://sploop.io/img/skins/body31.png?v=1923912": 35, "https://sploop.io/img/skins/body32.png?v=1923912": 35, "https://sploop.io/img/skins/body33.png?v=1923912": 35, "https://sploop.io/img/skins/body34.png?v=1923912": 35, "https://sploop.io/img/skins/body35.png?v=1923912": 35, "https://sploop.io/img/skins/body36.png?v=1923912": 35, "https://sploop.io/img/skins/body37.png?v=1923912": 35, "https://sploop.io/img/skins/body38.png?v=1923912": 35, "https://sploop.io/img/skins/body39.png?v=1923912": 35, "https://sploop.io/img/skins/body40.png?v=1923912": 35, "https://sploop.io/img/skins/body41.png?v=1923912": 35, "https://sploop.io/img/skins/body42.png?v=1923912": 35, "https://sploop.io/img/skins/body43.png?v=1923912": 35, "https://sploop.io/img/skins/body44.png?v=1923912": 35, "https://sploop.io/img/skins/body45.png?v=1923912": 35, "https://sploop.io/img/skins/body46.png?v=1923912": 35, "https://sploop.io/img/skins/body47.png?v=1923912": 35, "https://sploop.io/img/skins/body48.png?v=1923912": 35, "https://sploop.io/img/skins/body49.png?v=1923912": 35, "https://sploop.io/img/skins/body50.png?v=1923912": 35, "https://sploop.io/img/skins/body51.png?v=1923912": 35, "https://sploop.io/img/skins/body52.png?v=1923912": 35, "https://sploop.io/img/skins/body53.png?v=1923912": 35, "https://sploop.io/img/skins/body54.png?v=1923912": 35, "https://sploop.io/img/skins/body55.png?v=1923912": 35, "https://sploop.io/img/skins/body56.png?v=1923912": 35, "https://sploop.io/img/skins/body57.png?v=1923912": 35, "https://sploop.io/img/skins/body58.png?v=1923912": 35, "https://sploop.io/img/skins/body59.png?v=1923912": 35, "https://sploop.io/img/skins/body60.png?v=1923912": 35, "https://sploop.io/img/skins/body61.png?v=1923912": 35, "https://sploop.io/img/skins/body62.png?v=1923912": 35, "https://sploop.io/img/skins/body63.png?v=1923912": 35, "https://sploop.io/img/skins/body64.png?v=1923912": 35, "https://sploop.io/img/skins/body65.png?v=1923912": 35, "https://sploop.io/img/skins/body66.png?v=1923912": 35, "https://sploop.io/img/skins/body67.png?v=1923912": 35, "https://sploop.io/img/skins/body68.png?v=1923912": 35, "https://sploop.io/img/skins/body69.png?v=1923912": 35, "https://sploop.io/img/skins/body70.png?v=1923912": 35, "https://sploop.io/img/skins/body71.png?v=1923912": 35, "https://sploop.io/img/skins/body72.png?v=1923912": 35, "https://sploop.io/img/skins/body73.png?v=1923912": 35, "https://sploop.io/img/skins/body74.png?v=1923912": 35, "https://sploop.io/img/skins/body75.png?v=1923912": 35, "https://sploop.io/img/skins/body76.png?v=1923912": 35, "https://sploop.io/img/skins/body77.png?v=1923912": 35, "https://sploop.io/img/skins/body78.png?v=1923912": 35, "https://sploop.io/img/skins/body79.png?v=1923912": 35, "https://sploop.io/img/skins/body80.png?v=1923912": 35, "https://sploop.io/img/skins/body81.png?v=1923912": 35, "https://sploop.io/img/skins/body82.png?v=1923912": 35, "https://sploop.io/img/skins/body83.png?v=1923912": 35, "https://sploop.io/img/skins/body84.png?v=1923912": 35, "https://sploop.io/img/skins/body85.png?v=1923912": 35, "https://sploop.io/img/skins/body86.png?v=1923912": 35, "https://sploop.io/img/skins/body87.png?v=1923912": 35, "https://sploop.io/img/skins/body88.png?v=1923912": 35, "https://sploop.io/img/skins/body89.png?v=1923912": 35, "https://sploop.io/img/skins/body90.png?v=1923912": 35, "https://sploop.io/img/skins/body91.png?v=1923912": 35, "https://sploop.io/img/skins/body92.png?v=1923912": 35, "https://sploop.io/img/skins/body93.png?v=1923912": 35, "https://sploop.io/img/skins/body94.png?v=1923912": 35, "https://sploop.io/img/skins/body95.png?v=1923912": 35, "https://sploop.io/img/skins/body96.png?v=1923912": 35, "https://sploop.io/img/skins/body97.png?v=1923912": 35, "https://sploop.io/img/skins/body98.png?v=1923912": 35, "https://sploop.io/img/skins/body99.png?v=1923912": 35, "https://sploop.io/img/skins/body100.png?v=1923912": 35, "https://sploop.io/img/skins/body101.png?v=1923912": 35, "https://sploop.io/img/skins/body102.png?v=1923912": 35, "https://sploop.io/img/skins/body103.png?v=1923912": 35, "https://sploop.io/img/skins/body104.png?v=1923912": 35, "https://sploop.io/img/skins/body105.png?v=1923912": 35, "https://sploop.io/img/skins/body106.png?v=1923912": 35, "https://sploop.io/img/skins/body107.png?v=1923912": 35, "https://sploop.io/img/skins/body108.png?v=1923912": 35, "https://sploop.io/img/skins/body109.png?v=1923912": 35, "https://sploop.io/img/skins/body110.png?v=1923912": 35, "https://sploop.io/img/skins/body111.png?v=1923912": 35, "https://sploop.io/img/skins/body112.png?v=1923912": 35, "https://sploop.io/img/skins/body113.png?v=1923912": 35, "https://sploop.io/img/skins/body114.png?v=1923912": 35, "https://sploop.io/img/skins/body115.png?v=1923912": 35, "https://sploop.io/img/skins/body116.png?v=1923912": 35, "https://sploop.io/img/skins/body117.png?v=1923912": 35, "https://sploop.io/img/skins/body118.png?v=1923912": 35, "https://sploop.io/img/skins/body119.png?v=1923912": 35, "https://sploop.io/img/skins/body120.png?v=1923912": 35, "https://sploop.io/img/skins/body121.png?v=1923912": 35, "https://sploop.io/img/skins/body122.png?v=1923912": 35, "https://sploop.io/img/skins/body123.png?v=1923912": 35, "https://sploop.io/img/skins/body124.png?v=1923912": 35, "https://sploop.io/img/skins/body125.png?v=1923912": 35, "https://sploop.io/img/skins/body126.png?v=1923912": 35, "https://sploop.io/img/skins/body127.png?v=1923912": 35, "https://sploop.io/img/skins/body128.png?v=1923912": 35, "https://sploop.io/img/skins/body129.png?v=1923912": 35, "https://sploop.io/img/skins/body130.png?v=1923912": 35, "https://sploop.io/img/skins/body131.png?v=1923912": 35, "https://sploop.io/img/skins/body132.png?v=1923912": 35, "https://sploop.io/img/skins/body133.png?v=1923912": 35, "https://sploop.io/img/skins/body134.png?v=1923912": 35, "https://sploop.io/img/skins/body135.png?v=1923912": 35, "https://sploop.io/img/skins/body136.png?v=1923912": 35, "https://sploop.io/img/skins/body137.png?v=1923912": 35, "https://sploop.io/img/skins/body138.png?v=1923912": 35, "https://sploop.io/img/skins/body139.png?v=1923912": 35, "https://sploop.io/img/skins/body140.png?v=1923912": 35, "https://sploop.io/img/skins/body141.png?v=1923912": 35, "https://sploop.io/img/skins/body142.png?v=1923912": 35, "https://sploop.io/img/skins/body143.png?v=1923912": 35, "https://sploop.io/img/skins/body144.png?v=1923912": 35, "https://sploop.io/img/skins/body145.png?v=1923912": 35, "https://sploop.io/img/skins/body146.png?v=1923912": 35, "https://sploop.io/img/skins/body147.png?v=1923912": 35, "https://sploop.io/img/skins/body148.png?v=1923912": 35, "https://sploop.io/img/skins/body149.png?v=1923912": 35, "https://sploop.io/img/skins/body150.png?v=1923912": 35, // Player // "https://sploop.io/img/entity/wall.png?v=1923912": 45, "https://sploop.io/img/entity/castle_wall.png?v=1923912": 59, "https://sploop.io/img/entity/spike.png?v=1923912": 45, "https://sploop.io/img/entity/hard_spike.png?v=1923912": 45, "https://sploop.io/img/entity/ice_spike.png?v=1923912": 45, "https://sploop.io/img/entity/castle_spike.png?v=1923912": 45, "https://sploop.io/img/entity/windmill_base.png?v=1923912": 45, "https://sploop.io/img/entity/trap.png?v=1923912": 40, "https://sploop.io/img/entity/boost.png?v=1923912": 40, "https://sploop.io/img/entity/turret_base.png?v=1923912": 45, "https://sploop.io/img/entity/heal_pad.png?v=1923912":50, "https://sploop.io/img/entity/platform.png?v=1923912": 60, "https://sploop.io/img/entity/roof.png?v=1923912": 50, "https://sploop.io/img/entity/bed.png?v=1923912": 50, "https://sploop.io/img/entity/teleporter.png?v=1923912": 35, "https://sploop.io/img/entity/lootbox.png?v=1923912": 40, // Animals // "https://sploop.io/img/entity/wolf.png?v=1923912": 50, "https://sploop.io/img/entity/duck.png?v=1923912": 20, "https://sploop.io/img/entity/cow.png?v=1923912": 90, "https://sploop.io/img/entity/shark.png?v=1923912": 90, // Bosses // "https://sploop.io/img/entity/mammoth_body.png?v=1923912": 90, "https://sploop.io/img/entity/dragon_2_body.png?v=1923912": 100, "https://sploop.io/img/entity/gcow.png?v=1923912": 90, }; CanvasRenderingContext2D.prototype.OdrawImage = CanvasRenderingContext2D.prototype.OdrawImage || CanvasRenderingContext2D.prototype.drawImage; CanvasRenderingContext2D.prototype.drawImage = function(...args) { const img = args[0]; const src = img && img.src; this.save(); if (src && ghostModeEnabled) { const isExcluded = excludedKeywords.some(k => src.includes(k)); const isResource = resourceKeywords.some(k => src.includes(k)); if (!isExcluded && isResource) { this.globalAlpha = 0.4; } } this.OdrawImage(...args); if (hitboxEnabled && src && imageRadii[src]) { const x = args[1], y = args[2], w = args[3], h = args[4]; const centerX = x + w / 2; const centerY = y + h / 2; this.beginPath(); this.arc(centerX, centerY, imageRadii[src], 0, 2 * Math.PI); this.strokeStyle = "rgba(122, 173, 255,0.8)"; this.lineWidth = 2; this.stroke(); } this.restore(); }; // ============= Texture ==============// const textures = { "/img/entity/hat_1.png": "https://i.postimg.cc/pTkr1g9K/hat-1.png", "/img/entity/hat_2.png": "https://i.postimg.cc/8kKsdggS/hat-2.png", "/img/entity/hat_3.png": "https://i.postimg.cc/yYDxvp7S/hat-3.png", "/img/entity/hat_4.png": "https://i.postimg.cc/pr6TPzJT/hat-4.png", "/img/entity/hat_5.png": "https://i.postimg.cc/QxvtPgMY/hat-5.png", "/img/entity/hat_6.png": "https://i.postimg.cc/yNHN6VcF/hat-6.png", "/img/entity/hat_7.png": "https://i.postimg.cc/ydf6Tc5P/hat-12.png", "/img/entity/hat_8.png": "https://i.postimg.cc/dVd1K7ks/hat-8.png", "/img/entity/hat_9.png": "https://i.postimg.cc/26j8v2Hy/hat-9.png", "/img/entity/hat_11.png": "https://i.postimg.cc/R0LZNjL2/hat-11.png", "/img/entity/hat_14.png": "https://i.postimg.cc/JnmCvqS8/hat-14.png", "/img/entity/skid_hat.png": "https://i.postimg.cc/MHv63XJ8/hat-13.png", "/img/entity/stone_toolhammer.png": "https://i.postimg.cc/qvj2q8PG/stone-toolhammer.png", "/img/items/g_toolhammer.png": "https://i.postimg.cc/m2PFkLZY/g-toolhammer.png", "/img/items/d_toolhammer.png": "https://i.postimg.cc/dQ48DN2Y/d-toolhammer.png", "/img/items/r_toolhammer.png": "https://i.postimg.cc/0jT5bqZn/r-toolhammer.png", "/img/entity/stone_sword.png": "https://i.postimg.cc/jSVCjyFT/i-sword.png", "/img/entity/katana.png": "https://i.postimg.cc/GtH94KRL/i-katana.png", "/img/items/g_katana.png": "https://i.postimg.cc/KzmM8t4j/g-katana.png", "/img/items/d_katana.png": "https://i.postimg.cc/26xnQ2gn/d-katana.png", "/img/items/c_katana.png": "https://i.postimg.cc/rpjpg3Fy/r-katana.png", "/img/entity/stone_axe.png": "https://i.postimg.cc/RV2Jnkqj/i-axe.png", "/img/items/g_axe.png": "https://i.postimg.cc/L65jPkDZ/g-axe.png", "/img/items/d_axe.png": "https://i.postimg.cc/nchGkfFr/d-axe.png", "/img/entity/great_axe.png": "https://i.postimg.cc/SsQnhqtz/i-great-axe.png", "/img/items/g_great_axe.png": "https://i.postimg.cc/43kcjDgz/g-great-axe.png", "/img/items/d_great_axe.png": "https://i.postimg.cc/9Q4P6Pqj/d-great-axe.png", "/img/entity/stone_spear.png": "https://i.postimg.cc/Xqmqd5Nw/i-spear.png", "/img/items/g_spear.png": "https://i.postimg.cc/nrz9vZ4t/g-spear.png", "/img/items/d_spear.png": "https://i.postimg.cc/prXzqKt4/d-spear.png", "/img/entity/cut_spear.png": "https://i.postimg.cc/jj4DmCvb/i-cutsspear.png", "/img/items/g_cutspear.png": "https://i.postimg.cc/Hk75ZpfY/g-cutspear.png", "/img/items/d_cutspear.png": "https://i.postimg.cc/157c77XH/d-cutspear.png", "/img/entity/stick.png": "https://i.postimg.cc/c1brVp7r/i-stick.png", "/img/items/g_stick.png": "https://i.postimg.cc/Y0sGRVRL/g-stick.png", "/img/items/d_stick.png": "https://i.postimg.cc/brCbMdyJ/d-stick.png", "/img/items/r_stick.png": "https://i.postimg.cc/90RFmfPz/r-stick.png", "/img/items/bat.png": "https://i.postimg.cc/DwsJQxXm/i-bat.png", "/img/entity/g_bat.png": "https://i.postimg.cc/pdVNRZPJ/g-bat.png", "/img/entity/d_bat.png": "https://i.postimg.cc/13rxkT1z/d-bat.png", "/img/entity/r_bat.png": "https://i.postimg.cc/0NVTQwQR/r-bat.png", "/img/entity/s_dagger.png": "https://i.postimg.cc/jjbWMyHc/i-dagger.png", "/img/items/g_dagger.png": "https://i.postimg.cc/rFHxNdZZ/g-dagger.png", "/img/items/d_dagger.png": "https://i.postimg.cc/5tLB0x37/d-dagger.png", "/img/items/r_dagger.png": "https://i.postimg.cc/fRxySkG9/r-dagger.png", "/img/entity/s_healing_staff.png": "https://i.postimg.cc/9MxrXSvg/i-healing-staff.png", "/img/items/g_healing_staff.png": "https://i.postimg.cc/3wXGht8z/g-healing-staff.png", "/img/items/d_healing_staff.png": "https://i.postimg.cc/Y971LJDp/d-healing-staff.png", "/img/items/r_healing_staff.png": "https://i.postimg.cc/NM0jnD56/r-healing-staff.png", "/img/entity/hammer.png": "https://i.postimg.cc/HWZyTcmW/hammer.png", "/img/entity/g_hammer.png": "https://i.postimg.cc/G2zs89sQ/g-hammer.png", "/img/entity/d_hammer.png": "https://i.postimg.cc/DwtQnWq4/d-hammer.png", "/img/entity/r_hammer.png": "https://i.postimg.cc/nLpz4pxw/r-hammer.png", "/img/entity/shield.png": "https://i.postimg.cc/wTNTn7TG/shield.png", "/img/entity/s_musket.png": "https://i.postimg.cc/jSrdTtDd/w-musket.png", "/img/entity/bow.png": "https://i.postimg.cc/cLM14237/wbow.png", "/img/entity/Xbow.png": "https://i.postimg.cc/R0SS3d1k/Xbow.png", "/img/items/scythe.png": "https://i.postimg.cc/V6HkPtC3/r-scythe.png", "/img/items/meme.png": "https://i.postimg.cc/xTNcY6gg/meme.png", }; CanvasRenderingContext2D.prototype._drawImage = CanvasRenderingContext2D.prototype._drawImage || CanvasRenderingContext2D.prototype.drawImage; const textureCache = {}; CanvasRenderingContext2D.prototype.drawImage = function (...args) { const img = args[0]; if (!img) return; const src = img.src || ""; let replacement = null; for (const key in textures) { if (src.includes(key)) { if (!textureCache[key]) { const newImg = new Image(); newImg.src = textures[key]; textureCache[key] = newImg; } replacement = textureCache[key]; break; } } if (replacement && replacement.complete) { args[0] = replacement; } this._drawImage(...args); }; })();