-- ESP setas para Models dentro de Workspace.Resources
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local Workspace = game:GetService("Workspace")
local LP = Players.LocalPlayer

local Resources = Workspace:WaitForChild("Resources")

local trackedItems = {
    Gold = {label="<G", color=Color3.fromRGB(255, 215, 0)},
    GoldenFood = {label="<F", color=Color3.fromRGB(0, 255, 0)},
    GoldenRock = {label="<R", color=Color3.fromRGB(180, 180, 180)},
    GoldenWood = {label="<W", color=Color3.fromRGB(139, 69, 19)},
    Treasure = {label="<T", color=Color3.fromRGB(255, 200, 0)},
}

-- Criar ScreenGui
local gui = Instance.new("ScreenGui")
gui.Name = "TopDownESP"
gui.ResetOnSpawn = false
gui.Parent = LP:WaitForChild("PlayerGui")

-- Criar setas
local arrows, targets = {}, {}
local i = 0
for name, data in pairs(trackedItems) do
    local arrow = Instance.new("TextLabel")
    arrow.Name = "Arrow_"..name
    arrow.Size = UDim2.new(0, 60, 0, 35)
    arrow.Position = UDim2.new(0.5, -120 + (i * 65), 0, 40)
    arrow.BackgroundTransparency = 1
    arrow.Text = data.label
    arrow.TextScaled = true
    arrow.TextColor3 = data.color
    arrow.Font = Enum.Font.SourceSansBold
    arrow.Visible = true
    arrow.Parent = gui
    arrows[name] = {ui = arrow, baseColor = data.color}
    targets[name] = nil
    i += 1
end

-- Função para achar Model mais próximo dentro de Resources
local function FindClosestModel(modelName)
    local char = LP.Character
    if not char then return nil end
    local hrp = char:FindFirstChild("HumanoidRootPart")
    if not hrp then return nil end

    local best, bestDist = nil, math.huge
    for _, obj in pairs(Resources:GetChildren()) do
        if obj:IsA("Model") and obj.Name == modelName then
            local pos = obj:GetPivot().Position
            local dist = (hrp.Position - pos).Magnitude
            if dist < bestDist then
                best = obj
                bestDist = dist
            end
        end
    end
    return best
end

-- Atualizar alvos (1 vez por segundo)
task.spawn(function()
    while task.wait(2) do
        for name in pairs(trackedItems) do
            targets[name] = FindClosestModel(name)
        end
    end
end)

-- Atualizar rotação em tempo real
RunService.RenderStepped:Connect(function()
    local char = LP.Character
    if not char then return end
    local hrp = char:FindFirstChild("HumanoidRootPart")
    if not hrp then return end

    for name, info in pairs(arrows) do
        local arrow = info.ui
        local target = targets[name]

        if target and target.Parent == Resources then
            local pos = target:GetPivot().Position
            local dir = (pos - hrp.Position)
            if dir.Magnitude > 1 then
                local angle = -math.deg(math.atan2(dir.X, dir.Z)) + 180
                arrow.Rotation = angle
            end
            arrow.TextColor3 = info.baseColor
        else
            arrow.Rotation = 0
            arrow.TextColor3 = Color3.fromRGB(120, 120, 120)
        end
    end
end)
Tribe Survival Test server ESP🌴⚔
Mobile Friendly
8,084 views
11 months ago

ESP🌴⚔

WORKING
Free

Description

Simples

Free

Esp For Gold resources

Enter in discord

https://discord.gg/A5n89znC

Related Scripts