Highlight Mines
Key Required

Highlight Mines

The MinefieldsXabiscoXabisco 3.2K views 363 executesUpdated Jan 1, 2026
5.0/ 5(2 votes)
20100% Positive
Lua Script•58 lines (1977 chars)
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Workspace = game:GetService("Workspace")

local activeMinesList = {}
local allMinesData = {}

local function highlight()
    local minesFolder = Workspace:FindFirstChild("Mines")
    if not minesFolder then return end

    for _, child in ipairs(minesFolder:GetChildren()) do
        if child:FindFirstChild("DangerHighlight") then child.DangerHighlight:Destroy() end
        if child:FindFirstChild("SafeHighlight") then child.SafeHighlight:Destroy() end
    end

    local isActive = {}
    for _, name in ipairs(activeMinesList) do
        isActive[name] = true
    end

    for name, _ in pairs(allMinesData) do
        local mineInstance = minesFolder:FindFirstChild(name)
        if mineInstance then
            local hl = Instance.new("Highlight")
            hl.FillTransparency = 0.6
            hl.OutlineTransparency = 0.2
            
            if isActive[name] then
                hl.Name = "DangerHighlight"
                hl.FillColor = Color3.new(1, 0, 0) -- RED = DANGER
                hl.OutlineColor = Color3.new(1, 0, 0)
            else
                hl.Name = "SafeHighlight"
                hl.FillColor = Color3.new(0, 1, 0) -- GREEN = SAFE
                hl.OutlineColor = Color3.new(0, 1, 0)
            end
            hl.Parent = mineInstance
        end
    end
    print("[MineFields] Highlights Updated. Dangerous Mines: " .. #activeMinesList)
end

local remote = ReplicatedStorage:WaitForChild("Remotes"):WaitForChild("GetGameInfo")
local result = {remote:InvokeServer()}
allMinesData = result[1] or {}
activeMinesList = result[2] or {}

if #activeMinesList == 0 then
    warn("[MineFields] Warning: Received empty active mines list. Waiting for update...")
end

highlight()

ReplicatedStorage.Remotes.UpdateAllMines.OnClientEvent:Connect(function(newList)
    print("[MineFields] Map Update Received from Server.")
    activeMinesList = newList
    highlight()
end)

Features & Information

Highlight Mines Work in all modes - Some Issues in Hard mode
#minefields

Community Comments (4)

ScriptTrolScriptTrolJan 2, 2026

Best!

Henry_NotThereHenry_NotThereJan 19, 2026

Very good script. (Works on Xeno!)

HELLBENTBOIHELLBENTBOIApr 6, 2026

Doesnt work

umutemir3878umutemir3878Apr 24, 2026

When update ?

More Scripts for The Minefields