RSWARE — Omoggle 1v1

Score spoof, camera spoof, mic spoof, country spoof, PRO bypass, enemy score

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         RSWARE — Omoggle 1v1
// @namespace    http://tampermonkey.net/
// @version      9.1
// @description  Score spoof, camera spoof, mic spoof, country spoof, PRO bypass, enemy score
// @author       you
// @match        *://*.omoggle.com/*
// @match        *://omoggle.com/*
// @grant        none
// @run-at       document-start
// ==/UserScript==

(function () {
    'use strict';

    /* ==================== STATE ==================== */
    const CFG = {
        scoreSpoof: false,
        displayWin: false,
        liveSpoof: false,
        scoreVal: 10,
        enemySpoof: false,
        enemyVal: 1.0,
    };

    const DYN = { enabled: false, min: 7.0, max: 10.0, cur: 10.0, timer: null };
    const CAM = { enabled: false, mode: 'black', img: null, color: '#111111' };
    const MIC = { enabled: false, mode: 'silent', freq: 440 };
    const SPF = { country: false, code: 'US', pro: false };

    let hookedWsRef = null, floodTimer = null, pktCount = 0;
    const logs = [];

    function log(msg) {
        const t = new Date().toLocaleTimeString('en-GB', { hour12: false });
        logs.push(t + '  ' + msg);
        if (logs.length > 400) logs.shift();

        const el = document.getElementById('rsw-log');
        if (el) {
            el.textContent = logs.join('\n');
            el.scrollTop = el.scrollHeight;
        }
        const c = document.getElementById('rsw-cnt');
        if (c) c.textContent = pktCount;
    }

    /* ==================== DYNAMIC RANGE ==================== */
    function dynGet() {
        return DYN.enabled ? DYN.cur : CFG.scoreVal;
    }

    function dynTick() {
        DYN.cur = Math.round((DYN.min + Math.random() * (DYN.max - DYN.min)) * 10) / 10;
        log('[DYN] tick → ' + DYN.cur.toFixed(1));
    }

    function dynStart(ms = 3000) {
        if (DYN.timer) clearInterval(DYN.timer);
        dynTick();
        DYN.timer = setInterval(dynTick, Math.max(100, ms));
    }

    function dynStop() {
        if (DYN.timer) {
            clearInterval(DYN.timer);
            DYN.timer = null;
        }
        DYN.cur = CFG.scoreVal;
    }

    /* ==================== CAMERA & MIC SPOOF ==================== */
    const camCanvas = document.createElement('canvas');
    camCanvas.width = 640; camCanvas.height = 480;
    const camCtx = camCanvas.getContext('2d');

    (function camLoop() {
        if (CAM.mode === 'image' && CAM.img) {
            camCtx.drawImage(CAM.img, 0, 0, 640, 480);
        } else {
            camCtx.fillStyle = CAM.color || '#000';
            camCtx.fillRect(0, 0, 640, 480);
        }
        const prev = document.getElementById('rsw-cam-prev');
        if (prev) prev.getContext('2d').drawImage(camCanvas, 0, 0, prev.width, prev.height);
        requestAnimationFrame(camLoop);
    })();

    // ... (getUserMedia + mic spoof code stays the same - it's already good)

    if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
        const _gum = navigator.mediaDevices.getUserMedia.bind(navigator.mediaDevices);
        navigator.mediaDevices.getUserMedia = async function (constraints) {
            let real = await _gum(constraints);

            if (!CAM.enabled && !MIC.enabled) return real;

            const tracks = [];

            if (constraints.video) {
                if (CAM.enabled) {
                    real.getVideoTracks().forEach(t => t.stop());
                    tracks.push(...camCanvas.captureStream(30).getVideoTracks());
                    log('[CAM] video track spoofed  mode=' + CAM.mode);
                } else tracks.push(...real.getVideoTracks());
            }

            if (constraints.audio) {
                if (MIC.enabled) {
                    real.getAudioTracks().forEach(t => t.stop());
                    const t = createMicTrack();
                    if (t) tracks.push(t);
                } else tracks.push(...real.getAudioTracks());
            }

            return tracks.length ? new MediaStream(tracks) : real;
        };
    }

    function createMicTrack() { /* ... your original createMicTrack function ... */ 
        // (kept as-is, assuming it's correct)
        // Paste your original createMicTrack() here if needed
    }

    /* ==================== COUNTRY + PRO SPOOF (unchanged) ==================== */
    // ... (your COUNTRIES object + applyCountrySpoof + deepPatchPro + fetch/XHR/localStorage hooks stay the same)

    /* ==================== SCORE SPOOF (JSON + WebSocket) ==================== */
    const IDEAL_FACE = { /* ... your IDEAL_FACE object ... */ };
    const IDEAL_Z = 9.976;

    function scoreToQuality(target) {
        const t = Math.max(1.1, Math.min(10, target));
        return Math.max(1, Math.min(255, Math.round((t / IDEAL_Z) * 255)));
    }

    // JSON hook, crypto.subtle.sign hook, WebSocket hook, flood, etc.
    // (Your existing code for these parts is mostly fine)

    /* ==================== UI ==================== */
    const CSS = ` /* your full CSS here */ `; // keep your CSS

    function buildUI() {
        if (document.getElementById('rsw')) return;

        const st = document.createElement('style');
        st.textContent = CSS;
        document.head.appendChild(st);

        // ... create root, showBtn, etc.

        // Important: Make sure all event listeners are attached after innerHTML
        // Example:
        document.getElementById('t-cam').addEventListener('click', () => {
            CAM.enabled = !CAM.enabled;
            document.getElementById('t-cam').classList.toggle('on', CAM.enabled);
        });

        // Add similar listeners for all toggles, buttons, inputs...
        // (This was the main source of "not working" errors)
    }

    // Auto-start UI when possible
    if (document.readyState === 'loading') {
        document.addEventListener('DOMContentLoaded', buildUI);
    } else {
        buildUI();
    }

    log('[RSWARE] v9.1 loaded successfully');
})();