TTRS Hack Panel (Clean)

Fixed syntax + working

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         TTRS Hack Panel (Clean)
// @namespace    https://example.com/ttrs-helper
// @version      6.6
// @description  Fixed syntax + working
// @author       You
// @license      MIT
// @match        https://play.ttrockstars.com/*
// @grant        none
// ==/UserScript==

(function () {
  'use strict';

  let delayMs = 500;
  let tickHandle = null;
  let autoEnabled = false;
  let hidden = false;

  // ===== GUI =====
  const gui = document.createElement('div');
  gui.style.position = 'fixed';
  gui.style.top = '20px';
  gui.style.right = '20px';
  gui.style.background = '#222';
  gui.style.color = '#fff';
  gui.style.padding = '10px';
  gui.style.zIndex = '99999';

  const status = document.createElement('div');
  status.textContent = 'OFF (M)';
  gui.appendChild(status);

  document.body.appendChild(gui);

  // ===== Overlay =====
  const overlay = document.createElement('div');
  overlay.style.position = 'fixed';
  overlay.style.top = '0';
  overlay.style.left = '0';
  overlay.style.width = '100%';
  overlay.style.height = '100%';
  overlay.style.background = 'rgba(0,0,0,0.8)';
  overlay.style.color = '#0f0';
  overlay.style.display = 'none';
  overlay.style.alignItems = 'center';
  overlay.style.justifyContent = 'center';
  overlay.style.fontSize = '40px';
  overlay.style.zIndex = '100000';
  overlay.textContent = 'RUNNING';
  document.body.appendChild(overlay);

  function tick() {
    const x = window.innerWidth / 2;
    const y = window.innerHeight / 2;
    const el = document.elementFromPoint(x, y);
    if (el) el.click();
  }

  function start() {
    autoEnabled = true;
    status.textContent = 'ON';
    overlay.style.display = 'flex';
    tickHandle = setInterval(tick, delayMs);
  }

  function stop() {
    autoEnabled = false;
    status.textContent = 'OFF';
    overlay.style.display = 'none';
    clearInterval(tickHandle);
  }

  // ===== CONTROLS =====
  document.addEventListener('keydown', (e) => {

    if (e.key.toLowerCase() === 'm') {
      autoEnabled ? stop() : start();
    }

    if (e.key === 'Tab') {
      e.preventDefault();
      hidden = true;
      gui.style.display = 'none';
      overlay.style.display = 'none';
    }

    if (e.key === 'Escape') {
      hidden = false;
      gui.style.display = 'block';
      if (autoEnabled) overlay.style.display = 'flex';
    }

  });

})();