Tribals.io Stone Hack Mega Menu

Taşların içinden geçme (Noclip) için büyük ve yeşil menü.

Questo script non dovrebbe essere installato direttamente. È una libreria per altri script da includere con la chiave // @require https://update.greasyfork.org/scripts/575340/1807936/Tribalsio%20Stone%20Hack%20Mega%20Menu.js

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

You will need to install an extension such as Tampermonkey to install this script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name         Tribals.io Stone Hack Mega Menu
// @namespace    http://tampermonkey.net/
// @version      6.0
// @description  Taşların içinden geçme (Noclip) için büyük ve yeşil menü.
// @author       Gemini & You
// @match        https://tribals.io/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    let collisionEnabled = true;

    // --- MENÜ TASARIMI (BÜYÜK VE YEŞİL) ---
    const menu = document.createElement('div');
    menu.style = `
        position: fixed;
        top: 20%;
        right: 30px;
        width: 220px;
        background: rgba(0, 0, 0, 0.9);
        border: 3px solid #00ff44;
        border-radius: 15px;
        color: white;
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        z-index: 10000;
        padding: 20px;
        box-shadow: 0 0 25px rgba(0, 255, 68, 0.4);
        text-align: center;
        user-select: none;
    `;

    menu.innerHTML = `
        <div style="font-size: 20px; font-weight: bold; color: #00ff44; margin-bottom: 15px; border-bottom: 2px solid #333; padding-bottom: 10px;">
            STONE HACK
        </div>
        <div style="margin-bottom: 20px; font-size: 14px; color: #ccc;">
            Taşların içinden geçme durumunu kontrol et.
        </div>
        <button id="stoneToggleBtn" style="
            width: 100%;
            padding: 15px;
            background: #111;
            color: #ff4444;
            border: 2px solid #ff4444;
            border-radius: 10px;
            font-size: 18px;
            font-weight: bold;
            cursor: pointer;
            transition: 0.3s;
        ">GHOST: OFF</button>
        <div style="margin-top: 15px; font-size: 11px; color: #666;">
            Kısayol: <span style="color:#00ff44; font-weight:bold;">[N]</span>
        </div>
    `;

    document.body.appendChild(menu);

    const btn = document.getElementById('stoneToggleBtn');

    // --- ANA FONKSİYON ---
    const toggleStoneHack = () => {
        if (!window.tribals || !window.tribals.localPlayer) {
            alert("Oyun henüz yüklenmedi veya karakter doğmadı!");
            return;
        }

        collisionEnabled = !collisionEnabled;

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

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

            // Senin verdiğin koddaki özel objeler
            if (name === "Compound" || name === "column_02" || name.includes("rock") || name.includes("Stone")) {
                if (collisionEnabled) {
                    // Çarpışmayı geri getir
                    if (!entity.collision) {
                        entity.addComponent('collision', {
                            type: 'box',
                            halfExtents: new pc.Vec3(1, 1, 1)
                        });
                    }
                } else {
                    // Çarpışmayı sil (İçinden geç)
                    entity.removeComponent('collision');
                }
            }
        });

        // UI Güncelleme
        if (collisionEnabled) {
            btn.textContent = 'GHOST: OFF';
            btn.style.color = '#ff4444';
            btn.style.border = '2px solid #ff4444';
            btn.style.boxShadow = 'none';
        } else {
            btn.textContent = 'GHOST: ON';
            btn.style.color = '#00ff44';
            btn.style.border = '2px solid #00ff44';
            btn.style.boxShadow = '0 0 15px #00ff44';
        }
    };

    // Tıklama olayı
    btn.onclick = toggleStoneHack;

    // Klavye kısayolu (N tuşu)
    window.addEventListener('keydown', (e) => {
        if (e.key.toLowerCase() === 'n') {
            toggleStoneHack();
        }
    });

})();