Louris Clinet

Add a rainbow menu with a speed bar and draggable bar using Tampermonkey

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

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

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

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

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

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

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

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

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

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

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

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

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

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

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name Louris Clinet
// @namespace your-namespace
// @version 1.0
// @description Add a rainbow menu with a speed bar and draggable bar using Tampermonkey
// @author Your Name
// @match https://bloxd.io/*
// @grant GM_addStyle
// ==/UserScript==
(function() {
    //HTML keystrokes
var container = document.createElement('div');
container.style.position = 'fixed';
container.st
var spaceKey = document.createElement('div');yle.bottom = '10px';
container.style.left = '10px';
container.style.backgroundColor = 'black';
container.style.color = 'white';
container.style.padding = '5px';
container.style.fontFamily = 'Arial';
container.style.fontSize = '14px';
container.style.zIndex = '9999';

var row1 = document.createElement('div');
row1.style.display = 'flex';
row1.style.justifyContent = 'center';

var upKey = document.createElement('div');
upKey.textContent = 'W';

var row2 = document.createElement('div');
row2.style.display = 'flex';
row2.style.justifyContent = 'center';

var leftKey = document.createElement('div');
leftKey.textContent = 'A';
leftKey.style.marginRight = '10px';

var sprintKey = document.createElement('div');
sprintKey.textContent = 'S';

var rightKey = document.createElement('div');
rightKey.textContent = 'D';
rightKey.style.marginLeft = '10px';

var row3 = document.createElement('div');
row3.style.display = 'flex';
row3.style.justifyContent = 'center';

var shiftKey = document.createElement('div');
shiftKey.textContent = 'Shift';
shiftKey.style.marginRight = '10px';

spaceKey.textContent = '________';
spaceKey.style.marginLeft = '10px';

//  keystrokes 
row1.appendChild(upKey);
row2.appendChild(leftKey);
row2.appendChild(sprintKey);
row2.appendChild(rightKey);
row3.appendChild(shiftKey);
row3.appendChild(spaceKey);
container.appendChild(row1);
container.appendChild(row2);
container.appendChild(row3);

// إ
document.body.appendChild(container);

//
document.addEventListener('keydown', function(event) {
    switch(event.key) {
        case 'w':
            upKey.style.backgroundColor = 'green';
            break;
        case 'a':
            leftKey.style.backgroundColor = 'green';
            break;
        case 's':
            sprintKey.style.backgroundColor = 'green';
            break;
        case 'd':
            rightKey.style.backgroundColor = 'green';
            break;
        case 'Shift':
            shiftKey.style.backgroundColor = 'green';
            break;
        case ' ':
            spaceKey.style.backgroundColor = 'green';
            break;
    }
});

//  keystro إر
document.addEventListener('keyup', function(event) {
    switch(event.key) {
        case 'w':
            upKey.style.backgroundColor = 'black';
            break;
        case 'a':
            leftKey.style.backgroundColor = 'black';
            break;
        case 's':
            sprintKey.style.backgroundColor = 'black';
            break;
        case 'd':
            rightKey.style.backgroundColor = 'black';
            break;
        case 'Shift':
            shiftKey.style.backgroundColor = 'black';
            break;
        case ' ':
            spaceKey.style.backgroundColor = 'black';
            break;
    }
});
})();