Simple minimap
// ==UserScript==
// @name Minimap
// @namespace http://tampermonkey.net/
// @version 2026-05-28
// @description Simple minimap
// @author You
// @match https://bloxd.io/*
// @match https://www.crazygames.com/game/bloxdhop-io
// @grant none
// ==/UserScript==
(function() {
'use strict';
const canvas = document.createElement("canvas");
const ctx = canvas.getContext("2d");
canvas.width = 150;
canvas.height = 150;
canvas.style.position = "fixed";
canvas.style.top = "20px";
canvas.style.right = "20px";
canvas.style.background = "black";
canvas.style.border = "2px solid white";
canvas.style.zIndex = "9999";
document.body.appendChild(canvas);
let x = 75;
let y = 75;
document.addEventListener("keydown", (e) => {
if (e.key === "w") y -= 5;
if (e.key === "s") y += 5;
if (e.key === "a") x -= 5;
if (e.key === "d") x += 5;
});
function draw() {
// Clear minimap
ctx.clearRect(0, 0, canvas.width, canvas.height);
// Draw green dot
ctx.fillStyle = "lime";
ctx.beginPath();
ctx.arc(x, y, 5, 0, Math.PI * 2);
ctx.fill();
x = Math.max(5, Math.min(canvas.width - 5, x));
y = Math.max(5, Math.min(canvas.height - 5, y));
requestAnimationFrame(draw);
}
draw();
})();