ADVERTISEMENTREMOVE ADS
Best esp for game
47,697 views
Script Preview
Key System
Key SystemDescription
Best Esp for game
ADVERTISEMENTREMOVE ADS
258 Lines • 9.46 KiB
local player = game.Players.LocalPlayer
local userInputService = game:GetService("UserInputService")
local teams = game:GetService("Teams")
local runService = game:GetService("RunService")
-- GUI Creation
local screenGui = Instance.new("ScreenGui")
screenGui.Parent = player:WaitForChild("PlayerGui")
screenGui.Name = "ESP_Toggle"
screenGui.ResetOnSpawn = false
-- Main Frame (Draggable)
local frame = Instance.new("Frame")
frame.Parent = screenGui
frame.Size = UDim2.new(0, 220, 0, 160)
frame.Position = UDim2.new(0.5, -110, 0.5, -60)
frame.BackgroundColor3 = Color3.fromRGB(25, 25, 30)
frame.BorderSizePixel = 0
frame.Active = true
frame.Draggable = true
local frameCorner = Instance.new("UICorner")
frameCorner.CornerRadius = UDim.new(0, 10)
frameCorner.Parent = frame
-- Title Label
local title = Instance.new("TextLabel")
title.Parent = frame
title.Size = UDim2.new(1, 0, 0, 30)
title.BackgroundColor3 = Color3.fromRGB(35, 35, 45)
title.TextColor3 = Color3.fromRGB(255, 255, 255)
title.Font = Enum.Font.GothamBold
title.TextSize = 16
title.Text = "🔍 ESP Menu"
title.TextStrokeTransparency = 0.8
-- ESP Toggle Button
local espButton = Instance.new("TextButton")
espButton.Parent = frame
espButton.Size = UDim2.new(0.8, 0, 0, 40)
espButton.Position = UDim2.new(0.1, 0, 0.4, 0)
espButton.BackgroundColor3 = Color3.fromRGB(45, 45, 55)
espButton.TextColor3 = Color3.fromRGB(255, 255, 255)
espButton.Font = Enum.Font.Gotham
espButton.TextSize = 16
espButton.Text = "Enable ESP"
local buttonCorner = Instance.new("UICorner")
buttonCorner.CornerRadius = UDim.new(0, 6)
buttonCorner.Parent = espButton
-- Footer Label (Rainbow Text)
local footerLabel = Instance.new("TextLabel")
footerLabel.Parent = frame
footerLabel.Size = UDim2.new(1, 0, 0, 20)
footerLabel.Position = UDim2.new(0, 0, 0.9, 0)
footerLabel.BackgroundTransparency = 1
footerLabel.Font = Enum.Font.GothamBold
footerLabel.TextSize = 14
footerLabel.TextStrokeTransparency = 0.5
footerLabel.Text = "Made by GPTexploits"
footerLabel.TextXAlignment = Enum.TextXAlignment.Center
local colors = {
Color3.fromRGB(255, 0, 0), -- Red
Color3.fromRGB(255, 127, 0), -- Orange
Color3.fromRGB(255, 255, 0), -- Yellow
Color3.fromRGB(0, 255, 0), -- Green
Color3.fromRGB(0, 0, 255), -- Blue
Color3.fromRGB(75, 0, 130), -- Indigo
Color3.fromRGB(238, 130, 238) -- Violet
}
local currentIndex = 1
runService.RenderStepped:Connect(function()
footerLabel.TextColor3 = colors[currentIndex]
currentIndex = currentIndex + 1
if currentIndex > #colors then
currentIndex = 1
end
end)
-- ESP Logic
local espEnabled = false
local espObjects = {}
local function applyESP(character)
if character and character:FindFirstChild("HumanoidRootPart") then
local highlight = Instance.new("Highlight")
highlight.Parent = character
highlight.FillTransparency = 1
highlight.OutlineTransparency = 0
highlight.OutlineColor = Color3.fromRGB(255, 255, 255)
-- Создаем основной BillboardGui
local billboard = Instance.new("BillboardGui")
billboard.Parent = character
billboard.Adornee = character:FindFirstChild("Head") or character:FindFirstChild("HumanoidRootPart")
billboard.Size = UDim2.new(0, 200, 0, 80)
billboard.StudsOffset = Vector3.new(0, 3, 0)
billboard.AlwaysOnTop = true
-- Контейнер для текста столбиком
local textContainer = Instance.new("Frame")
textContainer.Parent = billboard
textContainer.Size = UDim2.new(1, 0, 1, 0)
textContainer.BackgroundTransparency = 1
textContainer.ClipsDescendants = true
-- Имя игрока
local nameLabel = Instance.new("TextLabel")
nameLabel.Parent = textContainer
nameLabel.Size = UDim2.new(1, 0, 0, 20)
nameLabel.Position = UDim2.new(0, 0, 0, 0)
nameLabel.BackgroundTransparency = 1
nameLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
nameLabel.Font = Enum.Font.GothamBold
nameLabel.TextSize = 14
nameLabel.TextStrokeTransparency = 0.5
nameLabel.TextXAlignment = Enum.TextXAlignment.Left
-- ДИСТАНЦИЯ - БОЛЕЕ ВИДНАЯ
local distanceLabel = Instance.new("TextLabel")
distanceLabel.Parent = textContainer
distanceLabel.Size = UDim2.new(1, 0, 0, 18)
distanceLabel.Position = UDim2.new(0, 0, 0, 20)
distanceLabel.BackgroundTransparency = 1
distanceLabel.TextColor3 = Color3.fromRGB(255, 215, 0) -- ЯРКО-ЗОЛОТОЙ
distanceLabel.Font = Enum.Font.GothamBold
nameLabel.TextSize = 15
distanceLabel.TextStrokeTransparency = 0.3
distanceLabel.TextStrokeColor3 = Color3.fromRGB(0, 0, 0)
distanceLabel.TextXAlignment = Enum.TextXAlignment.Left
-- HP
local healthLabel = Instance.new("TextLabel")
healthLabel.Parent = textContainer
healthLabel.Size = UDim2.new(1, 0, 0, 16)
healthLabel.Position = UDim2.new(0, 0, 0, 38)
healthLabel.BackgroundTransparency = 1
healthLabel.TextColor3 = Color3.fromRGB(255, 100, 100)
healthLabel.Font = Enum.Font.GothamBold
healthLabel.TextSize = 12
healthLabel.TextStrokeTransparency = 0.5
healthLabel.TextXAlignment = Enum.TextXAlignment.Left
-- Команда
local teamLabel = Instance.new("TextLabel")
teamLabel.Parent = textContainer
teamLabel.Size = UDim2.new(1, 0, 0, 16)
teamLabel.Position = UDim2.new(0, 0, 0, 54)
teamLabel.BackgroundTransparency = 1
teamLabel.TextColor3 = Color3.fromRGB(100, 200, 255)
teamLabel.Font = Enum.Font.Gotham
teamLabel.TextSize = 11
teamLabel.TextStrokeTransparency = 0.5
teamLabel.TextXAlignment = Enum.TextXAlignment.Left
espObjects[character] = {
highlight,
billboard,
textContainer,
nameLabel,
distanceLabel,
healthLabel,
teamLabel
}
end
end
local function updateESP()
for _, plr in pairs(game.Players:GetPlayers()) do
if plr ~= player and plr.Character and plr.Character:FindFirstChild("HumanoidRootPart") then
local char = plr.Character
local rootPart = char:FindFirstChild("HumanoidRootPart")
local humanoid = char:FindFirstChild("Humanoid")
local espData = espObjects[char]
if rootPart and humanoid and espData then
local distance = (rootPart.Position - player.Character.HumanoidRootPart.Position).Magnitude
local teamName = plr.Team and plr.Team.Name or "No Team"
local health = math.floor(humanoid.Health)
local maxHealth = math.floor(humanoid.MaxHealth)
-- Цвет HP в зависимости от количества здоровья
local healthColor = Color3.fromRGB(255, 100, 100) -- Красный
if health > maxHealth * 0.6 then
healthColor = Color3.fromRGB(100, 255, 100) -- Зеленый
elseif health > maxHealth * 0.3 then
healthColor = Color3.fromRGB(255, 200, 100) -- Желтый
end
-- Цвет дистанции в зависимости от расстояния
local distanceColor = Color3.fromRGB(255, 215, 0) -- Золотой по умолчанию
if distance < 20 then
distanceColor = Color3.fromRGB(255, 50, 50) -- Красный для близких
elseif distance > 100 then
distanceColor = Color3.fromRGB(100, 200, 255) -- Голубой для далеких
end
-- Обновляем текст столбиком
espData[4].Text = plr.Name -- Имя
espData[5].Text = string.format("📏 %.1fm", distance) -- Дистанция с иконкой
espData[5].TextColor3 = distanceColor -- Динамический цвет дистанции
espData[6].Text = string.format("❤️ %d/%d", health, maxHealth) -- HP с иконкой
espData[6].TextColor3 = healthColor -- Цвет HP
espData[7].Text = string.format("👥 %s", teamName) -- Команда с иконкой
end
end
end
end
local function refreshESP()
for _, data in pairs(espObjects) do
for _, obj in pairs(data) do
if obj:IsA("Instance") then
obj:Destroy()
end
end
end
espObjects = {}
for _, plr in pairs(game.Players:GetPlayers()) do
if plr ~= player and plr.Character then
applyESP(plr.Character)
end
end
end
local function toggleESP()
espEnabled = not espEnabled
espButton.Text = espEnabled and "Disable ESP" or "Enable ESP"
if espEnabled then
refreshESP()
local updateConnection
updateConnection = runService.RenderStepped:Connect(function()
if not espEnabled then
updateConnection:Disconnect()
return
end
updateESP()
end)
else
for _, data in pairs(espObjects) do
for _, obj in pairs(data) do
if obj:IsA("Instance") then
obj:Destroy()
end
end
end
espObjects = {}
end
end
espButton.MouseButton1Click:Connect(toggleESP)
print("ESP Menu loaded with enhanced distance display!")
ADVERTISEMENTREMOVE ADS
ADVERTISEMENTREMOVE ADS


Comments