Golden hub hightlights script universal
Key RequiredUniversal

Golden hub hightlights script universal

Universal ScriptGoldenscriptsGoldenscripts 330 views 83 executesUpdated Feb 17, 2026
Unrated
00
Lua Script•245 lines (7286 chars)
-- Golden Hub - Highlights ESP | by tucompascripts
-- English version - ready for ScriptBlox

local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
local StarterGui = game:GetService("StarterGui")

-- Load WindUI with multiple fallback links for maximum compatibility
local WindUI = nil

local loadAttempts = {
    "https://github.com/Footagesus/WindUI/releases/latest/download/main.lua",
    "https://raw.githubusercontent.com/Footagesus/WindUI/refs/heads/main/main.lua",
    "https://raw.githubusercontent.com/Footagesus/WindUI/refs/heads/main/main_example.lua",
    "https://raw.githubusercontent.com/Footagesus/WindUI/main/main.client.lua"
}

for _, url in ipairs(loadAttempts) do
    local success, lib = pcall(function()
        return loadstring(game:HttpGet(url, true))()
    end)
    
    if success and typeof(lib) == "table" and lib.CreateWindow then
        WindUI = lib
        print("[Golden Hub] WindUI loaded from: " .. url)
        break
    end
end

if not WindUI then
    warn("[Golden Hub] Failed to load WindUI from any link")
    StarterGui:SetCore("SendNotification", {
        Title = "Golden Hub",
        Text = "UI failed to load - Highlights still work without menu",
        Duration = 8
    })
else
    print("[Golden Hub] UI loaded successfully")
end

-- Configuration
local Config = {
    Enabled = false,
    TeamCheck = true,
    EnemyFillColor   = Color3.fromRGB(255, 60, 60),     -- Red for enemies
    TeamFillColor    = Color3.fromRGB(60, 255, 100),    -- Green for teammates
    OutlineColor     = Color3.fromRGB(255, 255, 255),
    FillTransparency    = 0.4,
    OutlineTransparency = 0.1,
    MaxDistance      = 2000
}

-- Table to store active Highlights
local ActiveHighlights = {}

-- Update or create highlight for a player
local function UpdatePlayerHighlight(player)
    if player == LocalPlayer then return end
    
    local character = player.Character
    if not character or not character:FindFirstChild("HumanoidRootPart") then
        if ActiveHighlights[player] then
            ActiveHighlights[player]:Destroy()
            ActiveHighlights[player] = nil
        end
        return
    end
    
    local humanoid = character:FindFirstChildOfClass("Humanoid")
    if not humanoid or humanoid.Health <= 0 then
        if ActiveHighlights[player] then
            ActiveHighlights[player]:Destroy()
            ActiveHighlights[player] = nil
        end
        return
    end
    
    local distance = (character.HumanoidRootPart.Position - LocalPlayer.Character.HumanoidRootPart.Position).Magnitude
    if distance > Config.MaxDistance then
        if ActiveHighlights[player] then
            ActiveHighlights[player]:Destroy()
            ActiveHighlights[player] = nil
        end
        return
    end
    
    -- Team check
    if Config.TeamCheck and player.Team and LocalPlayer.Team and player.Team == LocalPlayer.Team then
        if ActiveHighlights[player] then
            ActiveHighlights[player]:Destroy()
            ActiveHighlights[player] = nil
        end
        return
    end
    
    local highlight = ActiveHighlights[player]
    if not highlight then
        highlight = Instance.new("Highlight")
        highlight.Parent = character
        highlight.Adornee = character
        highlight.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
        ActiveHighlights[player] = highlight
    end
    
    highlight.Enabled = Config.Enabled
    
    -- Choose color based on team
    if Config.TeamCheck and player.Team == LocalPlayer.Team then
        highlight.FillColor = Config.TeamFillColor
    else
        highlight.FillColor = Config.EnemyFillColor
    end
    
    highlight.FillTransparency    = Config.FillTransparency
    highlight.OutlineColor        = Config.OutlineColor
    highlight.OutlineTransparency = Config.OutlineTransparency
end

-- Main loop
task.spawn(function()
    while true do
        task.wait(0.4)
        
        if not Config.Enabled then
            for _, hl in pairs(ActiveHighlights) do
                if hl then hl:Destroy() end
            end
            ActiveHighlights = {}
            continue
        end
        
        for _, player in ipairs(Players:GetPlayers()) do
            pcall(UpdatePlayerHighlight, player)
        end
        
        -- Cleanup disconnected players
        for player, hl in pairs(ActiveHighlights) do
            if not player.Parent then
                if hl then hl:Destroy() end
                ActiveHighlights[player] = nil
            end
        end
    end
end)

-- Handle new players and character respawn
Players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function()
        task.wait(0.3)
        UpdatePlayerHighlight(player)
    end)
end)

Players.PlayerRemoving:Connect(function(player)
    if ActiveHighlights[player] then
        ActiveHighlights[player]:Destroy()
        ActiveHighlights[player] = nil
    end
end)

-- Create UI if WindUI loaded successfully
if WindUI then
    local Window = WindUI:CreateWindow({
        Title = "Golden Hub - Highlights ESP",
        Icon = "eye",
        Author = "by tucompascripts"
    })

    local Tab = Window:Tab({
        Title = "Highlights",
        Icon = "highlight"
    })
    Tab:Select()

    Tab:Toggle({
        Title = "Enable Highlights",
        Desc = "Show player outlines",
        Value = false,
        Callback = function(state)
            Config.Enabled = state
            StarterGui:SetCore("SendNotification", {
                Title = "Highlights ESP",
                Text = state and "Enabled (red enemies, green teammates)" or "Disabled",
                Duration = 4
            })
        end
    })

    Tab:Toggle({
        Title = "Team Check",
        Desc = "Don't highlight teammates",
        Value = true,
        Callback = function(state) Config.TeamCheck = state end
    })

    Tab:ColorPicker({
        Title = "Enemy Color",
        Value = Config.EnemyFillColor,
        Callback = function(color) Config.EnemyFillColor = color end
    })

    Tab:ColorPicker({
        Title = "Teammate Color",
        Value = Config.TeamFillColor,
        Callback = function(color) Config.TeamFillColor = color end
    })

    Tab:Slider({
        Title = "Fill Transparency",
        Step = 0.05,
        Value = { Min = 0, Max = 1, Default = 0.4 },
        Callback = function(value) Config.FillTransparency = value end
    })

    Tab:Slider({
        Title = "Max Distance",
        Step = 100,
        Value = { Min = 500, Max = 5000, Default = 2000 },
        Callback = function(value) Config.MaxDistance = value end
    })

    Tab:Button({
        Title = "Clear All Highlights",
        Callback = function()
            for _, hl in pairs(ActiveHighlights) do
                if hl then hl:Destroy() end
            end
            ActiveHighlights = {}
            StarterGui:SetCore("SendNotification", {
                Title = "Highlights",
                Text = "All highlights cleared",
                Duration = 3
            })
        end
    })
end

-- Final notification
StarterGui:SetCore("SendNotification", {
    Title = "Golden Hub",
    Text = "Highlights ESP loaded - enable in menu",
    Duration = 6
})

print("[Golden Hub] Highlights ESP ready")

Features & Information

Hightlights(green = Ally red = enemy) Team check

Community Comments (0)

No comments yet for this script.

More Scripts for Universal Scripts