RSWARE — Omoggle 1v1 (Safe Core)

Score spoof via WS + display patches only

Αυτός ο κώδικας δεν πρέπει να εγκατασταθεί άμεσα. Είναι μια βιβλιοθήκη για άλλους κώδικες που περιλαμβάνεται μέσω της οδηγίας meta // @require https://update.sleazyfork.org/scripts/581938/1847110/RSWARE%20%E2%80%94%20Omoggle%201v1%20%28Safe%20Core%29.js

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

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

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

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

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name         RSWARE — Omoggle 1v1 (Safe Core)
// @namespace    [tampermonkey.net](http://tampermonkey.net/)
// @version      9.1
// @description  Score spoof via WS + display patches only
// @match        *://*.omoggle.com/*
// @grant        none
// @run-at       document-start
// ==/UserScript==

(function() {
    'use strict';

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

    let hookedWs = null;
    let floodTimer = null;
    let pktCount = 0;

    // === WebSocket hook (stable part) ===
    const OrigWS = window.WebSocket;
    window.WebSocket = function(url, proto) {
        const ws = proto ? new OrigWS(url, proto) : new OrigWS(url);
        if (url && url.includes('omoggle.com')) {
            hookedWs = ws;
        }

        const origSend = ws.send.bind(ws);
        ws.send = function(data) {
            if (CFG.scoreSpoof && typeof data === 'string') {
                try {
                    const p = JSON.parse(data);
                    if (p.type === 'score_update' && p.payload) {
                        p.payload.score = CFG.scoreVal;
                        pktCount++;
                        data = JSON.stringify(p);
                    }
                    if (p.type === 'score_submit' && p.payload) {
                        p.payload.self_score = CFG.scoreVal;
                        pktCount++;
                        data = JSON.stringify(p);
                    }
                } catch (_) {}
            }
            return origSend(data);
        };

        ws.addEventListener('message', function(e) {
            if (typeof e.data !== 'string') return;
            try {
                const p = JSON.parse(e.data);
                let changed = false;

                if (p.type === 'live_score' && p.payload) {
                    if (CFG.liveSpoof) { p.payload.your_score = CFG.scoreVal; changed = true; }
                    if (CFG.enemySpoof) { p.payload.opponent_score = CFG.enemyVal; changed = true; }
                }

                if (p.type === 'match_result' && p.payload) {
                    if (CFG.displayWin) {
                        p.payload.result = 'win';
                        p.payload.your_score = CFG.scoreVal;
                        changed = true;
                    }
                    if (CFG.enemySpoof) {
                        p.payload.opponent_score = CFG.enemyVal;
                        changed = true;
                    }
                }

                if (changed) {
                    const newMsg = new MessageEvent('message', {
                        data: JSON.stringify(p),
                        origin: e.origin
                    });
                    e.stopImmediatePropagation();
                    ws.dispatchEvent(newMsg);
                    return;
                }
            } catch (_) {}
        });

        return ws;
    };
    Object.assign(window.WebSocket, OrigWS);
    window.WebSocket.prototype = OrigWS.prototype;

    // Add your UI and toggles here if needed
})();