Stone hack 5.00

Tribals.io で Compound および column_02 の当たり判定をON/OFF切り替えするスクリプト(画面ボタン)

이 스크립트를 설치하려면 Tampermonkey, Greasemonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램을 설치해야 합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Violentmonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey 또는 Userscripts와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 Tampermonkey와 같은 확장 프로그램이 필요합니다.

이 스크립트를 설치하려면 유저 스크립트 관리자 확장 프로그램이 필요합니다.

(이미 유저 스크립트 관리자가 설치되어 있습니다. 설치를 진행합니다!)

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 Stylus와 같은 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

이 스타일을 설치하려면 유저 스타일 관리자 확장 프로그램이 필요합니다.

(이미 유저 스타일 관리자가 설치되어 있습니다. 설치를 진행합니다!)

// ==UserScript==
// @name         Stone hack 5.00
// @namespace    http://tampermonkey.net/
// @version      0.5
// @description  Tribals.io で Compound および column_02 の当たり判定をON/OFF切り替えするスクリプト(画面ボタン)
// @author       You
// @match        https://tribals.io/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    const button = document.createElement('button');
    button.textContent = ' OFF';
    button.style.position = 'fixed';
    button.style.top = '15%'; // 画面の縦方向中央
    button.style.left = '20px'; // 左から20px
    button.style.transform = 'translateY(-50%)'; // 真ん中揃え
    button.style.zIndex = '1000';
    button.style.padding = '10px 20px';
    button.style.backgroundColor = '#3498db';
    button.style.color = '#fff';
    button.style.border = 'none';
    button.style.borderRadius = '5px';
    button.style.fontSize = '14px';
    button.style.cursor = 'pointer';
    document.body.appendChild(button);

    let collisionEnabled = true;

    button.addEventListener('click', () => {
        collisionEnabled = !collisionEnabled;

        const app = tribals.localPlayer.app;
        const entities = app.root.findComponents('collision');

        entities.forEach(collisionComponent => {
            const entity = collisionComponent.entity;
            const name = entity.name;

            if (name === "Compound" || name === "column_02") {
                if (collisionEnabled) {
                    if (!entity.collision) {
                        entity.addComponent('collision', {
                            type: 'box',
                            halfExtents: new pc.Vec3(1, 1, 1)
                        });
                        console.log("✅ 当たり判定を復元:", name);
                    }
                } else {
                    entity.removeComponent('collision');
                    console.log("🛑 当たり判定を削除:", name);
                }
            }
        });

        button.textContent = collisionEnabled ? ' OFF' : ' ON';
        button.style.backgroundColor = collisionEnabled ? '#3498db' : '#e74c3c';
    });
})();