[Brick-Kill] Create More Games

Creates 3 to 5 games when loaded in, bypassing the 1 game limit. Disable after it's been ran.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// discord.gg/JjszyaD63A

// ==UserScript==
// @name         [Brick-Kill] Create More Games
// @version      1.02
// @description  Creates 3 to 5 games when loaded in, bypassing the 1 game limit. Disable after it's been ran.
// @match        *://www.brick-hill.com/*
// @run-at       document-idle
// @icon         https://www.brick-hill.com/favicon.ico
// @license      MIT
// @namespace    bhcreatemoregames
// ==/UserScript==

(function() {
    'use strict';

    /*-    SETTINGS    -*/

    const Spam_amount = 11 // Number of attempts to make a game, may only make 3-5 games.

    /*-                -*/




    const token = document.querySelector('input[name="_token"]').value;

    const params = new URLSearchParams();
    params.append('name', 'yeah yeah yeah');
    params.append('description', 'yeayeayaeyea');
    params.append('_token', token);

    const headers = {
        "Content-Type": "application/x-www-form-urlencoded"
    };

    function createGames() {
        return fetch("https://www.brick-hill.com/play/create", {
            method: "POST",
            headers: headers,
            body: params.toString()
        })
            .then(response => {
            if (!response.ok) {
                throw new Error('Network response was not ok');
            }
            return response.text();
        })
            .catch(error => console.error('Error joining clan:', error));
    }

    Promise.all(Array.from({ length: Spam_amount }, createGames))
        .then(() => console.log('All requests completed'))
        .catch(error => console.error('One or more requests failed:', error));

})();