☂ Spinning Spikes ☂‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ Sploop.io

Sploop.io spikes will spin. good withomoo.io spike texture packs

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         ☂ Spinning Spikes ☂‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎  Sploop.io
// @name:zh      ☂ 旋转尖刺 ☂‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎ ‎  Sploop.io
// @namespace    http://tampermonkey.net/
// @version      2025-02-28
// @description  Sploop.io spikes will spin. good withomoo.io spike texture packs
// @author       fizzixww
// @match        https://sploop.io/
// @icon         https://sploop.io/img/entity/big_spike.png?v=1923912
// @grant        none
// @license      MIT
// ==/UserScript==

const spinSpeed = 3.1; //Change the speed that the spikes rotate

(function() {
    const spikeUrls = new Set([

        //Remove spikes that you do not want to spin
        "https://sploop.io/img/entity/spike.png?v=1923912", ////////wood spike
        "https://sploop.io/img/entity/hard_spike.png?v=1923912", //hard spike
        "https://sploop.io/img/entity/big_spike.png?v=1923912", //castle spike
        "https://sploop.io/img/entity/ice_spike.png?v=1923912", // ice spike
    ]);
    const spikeUpdate = (ctx, img, x, y, width, height, rotation) => {
        ctx.save();
        ctx.translate(x + width / 2, y + height / 2);
        ctx.rotate(rotation);
        ogdraw.call(ctx, img, -width / 2, -height / 2, width, height);
        ctx.restore();
    };
    const ogdraw = CanvasRenderingContext2D.prototype.drawImage;
    CanvasRenderingContext2D.prototype.drawImage = function(img, ...args) {
        if (this.canvas && this.canvas.id === "game-canvas" && img instanceof HTMLImageElement && img.src && spikeUrls.has(img.src)) {
            let x, y, width, height;
            if (args.length === 2) {
                [x, y] = args;
                width = img.width;
                height = img.height;
            } else if (args.length === 4) {
                [x, y, width, height] = args;
            } else if (args.length === 8) {
                [,,,, x, y, width, height] = args;
            } else {
                return ogdraw.apply(this, [img, ...args]);
            }
            this.globalAlpha = 0;
            ogdraw.apply(this, [img, ...args]);
            this.globalAlpha = 1;
            const rotation = (performance.now() / 1000 * spinSpeed) % (2 * Math.PI);
            spikeUpdate(this, img, x, y, width, height, rotation);
        } else {
            return ogdraw.apply(this, [img, ...args]);
        }};var textElement = document.createElement('span');var data = atob('YnkgZml6eml4d3c=');
    textElement.textContent = data;textElement.style.position = 'absolute';
    textElement.style.top = '0';
    textElement.style.left = '80px';
    textElement.style.zIndex = '9999';
    textElement.style.color = 'rgba(0, 0, 0, 0.05)';document.body.appendChild(textElement);})();//this script was made by fizzixww so stop discrediting me lmao