Blooket Token Adder

Adds tokens and XP to your Blooket account (up to 1,000,000 tokens daily)

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

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

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name         Blooket Token Adder
// @namespace    https://github.com/yourusername/blooket-token-adder
// @version      1.0
// @description  Adds tokens and XP to your Blooket account (up to 1,000,000 tokens daily)
// @author       Your Name
// @license      MIT
// @match        https://www.blooket.com/*
// @grant        none
// ==/UserScript==

// Get the player's name by verifying their token
async function getName() {
    const response = await fetch('https://api.blooket.com/api/users/verify-token', {
        method: "GET",
        headers: {
            "accept": "application/json, text/plain, */*",
            "accept-language": "en-US,en;q=0.9,ru;q=0.8",
        },
        credentials: "include"
    });

    if (response.ok) {
        const data = await response.json();
        return data.name;
    } else {
        alert("Error: Unable to retrieve user data.");
        return null;
    }
}

// Function to add tokens and XP
async function addCurrencies() {
    // Ask for the number of tokens the user wants to add
    const tokens = Number(prompt('How many tokens do you want to add to your Blooket account? (Max 1,000,000 tokens daily)'));

    // If the user input is not a valid number
    if (isNaN(tokens) || tokens <= 0) {
        alert("Please enter a valid number of tokens.");
        return;
    }

    // If the tokens are more than 1 million, show an error
    if (tokens > 1000000) {
        alert('You can only add up to 1,000,000 tokens daily.');
        return; // Stop further execution if the limit is exceeded
    }

    // Fetch the user's name
    const name = await getName();
    if (!name) return; // Exit if we couldn't retrieve the user's name

    // Make a request to add tokens and XP
    const response = await fetch('https://api.blooket.com/api/users/add-rewards', {
        method: "PUT",
        headers: {
            "referer": "https://www.blooket.com/",
            "content-type": "application/json",
        },
        credentials: "include",
        body: JSON.stringify({
            addedTokens: tokens,
            addedXp: 300,
            name: name
        })
    });

    // Handle the response from the server
    if (response.status === 200) {
        alert(`${tokens} tokens and 300 XP successfully added to your account!`);
    } else {
        alert('An error occurred while adding tokens. Please try again later.');
    }
}

// Run the function to add currencies
addCurrencies();