Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Fluent = loadstring(game:HttpGet("https://github.com/dawid-scripts/Fluent/releases/latest/download/main.lua"))()
- local SaveManager = loadstring(game:HttpGet("https://raw.githubusercontent.com/dawid-scripts/Fluent/master/Addons/SaveManager.lua"))()
- local InterfaceManager = loadstring(game:HttpGet("https://raw.githubusercontent.com/dawid-scripts/Fluent/master/Addons/InterfaceManager.lua"))()
- local Window = Fluent:CreateWindow({
- Title = "Esp",
- SubTitle = "by 1qlua v1",
- TabWidth = 160,
- Size = UDim2.fromOffset(580, 540),
- Acrylic = true,
- Theme = "Dark",
- MinimizeKey = Enum.KeyCode.LeftControl
- })
- local Tabs = {
- Main = Window:AddTab({ Title = "Main", Icon = "users" }),
- Settings = Window:AddTab({ Title = "Settings", Icon = "settings" })
- }
- local Options = Fluent.Options
- -- Основные переменные
- local highlightParts = {"Head", "UpperTorso", "LowerTorso", "LeftUpperArm", "RightUpperArm", "LeftUpperLeg", "RightUpperLeg"}
- local highlightInstances = {}
- local nameTags = {}
- local healthBars = {}
- local objectHighlights = {}
- local rainbowMode = false
- local showNames = false
- local showHealth = false
- local highlightObjects = false
- local rainbowThread = nil
- local currentColor = Color3.fromRGB(0, 255, 0)
- local wallHackEnabled = true
- local espRadiusEnabled = false
- local espRadius = 100 -- Значение по умолчанию
- local localPlayer = game:GetService("Players").LocalPlayer
- local espRadiusThread = nil
- -- Безопасное получение значения опции
- local function getOptionValue(option)
- return option and option.Value
- end
- -- Функция для расчета расстояния между двумя точками
- local function getDistance(position1, position2)
- return (position1 - position2).Magnitude
- end
- -- Проверка видимости игрока в зависимости от радиуса
- local function isPlayerInRadius(player)
- if not espRadiusEnabled then return true end
- if not localPlayer or not localPlayer.Character or not player or not player.Character then return false end
- local localRoot = localPlayer.Character:FindFirstChild("HumanoidRootPart")
- local playerRoot = player.Character:FindFirstChild("HumanoidRootPart")
- if not localRoot or not playerRoot then return false end
- return getDistance(localRoot.Position, playerRoot.Position) <= espRadius
- end
- -- Обновление видимости игроков в зависимости от радиуса
- local function updatePlayersVisibility()
- for player, highlights in pairs(highlightInstances) do
- local inRadius = isPlayerInRadius(player)
- for _, highlight in pairs(highlights) do
- if highlight then
- highlight.Enabled = inRadius
- end
- end
- if nameTags[player] then
- nameTags[player].Enabled = showNames and inRadius
- end
- if healthBars[player] then
- healthBars[player].Enabled = showHealth and inRadius
- end
- end
- end
- -- Создание полосы здоровья
- local function createHealthBar(player)
- if not player or not player.Character then return end
- local humanoid = player.Character:FindFirstChild("Humanoid")
- local head = player.Character:FindFirstChild("Head")
- if not humanoid or not head then return end
- -- Удаляем старую полосу здоровья
- if healthBars[player] then
- healthBars[player]:Destroy()
- healthBars[player] = nil
- end
- local billboard = Instance.new("BillboardGui")
- billboard.Name = "PlayerHealthBar"
- billboard.Adornee = head
- billboard.Size = UDim2.new(3, 0, 0.4, 0)
- billboard.StudsOffset = Vector3.new(0, 4.2, 0)
- billboard.AlwaysOnTop = true
- billboard.Enabled = showHealth and isPlayerInRadius(player)
- local container = Instance.new("Frame")
- container.Size = UDim2.new(1, 0, 1, 0)
- container.BackgroundTransparency = 1
- local background = Instance.new("Frame")
- background.Size = UDim2.new(1, 0, 0.5, 0)
- background.Position = UDim2.new(0, 0, 0.5, 0)
- background.BackgroundColor3 = Color3.new(0, 0, 0)
- background.BackgroundTransparency = 0.5
- background.BorderSizePixel = 0
- local healthBar = Instance.new("Frame")
- healthBar.Size = UDim2.new(humanoid.Health / humanoid.MaxHealth, 0, 1, 0)
- healthBar.BackgroundColor3 = Color3.new(1, 0, 0)
- healthBar.BorderSizePixel = 0
- healthBar.Name = "HealthFill"
- local healthText = Instance.new("TextLabel")
- healthText.Size = UDim2.new(1, 0, 1, 0)
- healthText.BackgroundTransparency = 1
- healthText.Text = math.floor(humanoid.Health).."/"..math.floor(humanoid.MaxHealth)
- healthText.TextColor3 = Color3.new(1, 1, 1)
- healthText.TextStrokeTransparency = 0.5
- healthText.TextStrokeColor3 = Color3.new(0, 0, 0)
- healthText.Font = Enum.Font.SourceSansBold
- healthText.TextSize = 14
- healthBar.Parent = background
- background.Parent = container
- healthText.Parent = container
- container.Parent = billboard
- billboard.Parent = head
- healthBars[player] = billboard
- humanoid.HealthChanged:Connect(function(health)
- if healthBars[player] and healthBars[player]:FindFirstChild("Frame") then
- local container = healthBars[player].Frame
- local fill = container.Frame.HealthFill
- local text = container.TextLabel
- fill.Size = UDim2.new(health / humanoid.MaxHealth, 0, 1, 0)
- local healthPercent = health / humanoid.MaxHealth
- if healthPercent > 0.6 then
- fill.BackgroundColor3 = Color3.new(1 - (healthPercent - 0.6) * 2.5, 1, 0)
- elseif healthPercent > 0.3 then
- fill.BackgroundColor3 = Color3.new(1, healthPercent * 2.5, 0)
- else
- fill.BackgroundColor3 = Color3.new(1, 0, 0)
- end
- text.Text = math.floor(health).."/"..math.floor(humanoid.MaxHealth)
- end
- end)
- end
- -- Создание ника игрока
- local function createNameTag(player)
- if not player or not player.Character then return end
- local head = player.Character:FindFirstChild("Head")
- if not head then return end
- if nameTags[player] then
- nameTags[player]:Destroy()
- nameTags[player] = nil
- end
- local billboard = Instance.new("BillboardGui")
- billboard.Name = "PlayerNameTag"
- billboard.Adornee = head
- billboard.Size = UDim2.new(0, 100, 0, 40)
- billboard.StudsOffset = Vector3.new(0, 3, 0)
- billboard.AlwaysOnTop = true
- billboard.Enabled = showNames and isPlayerInRadius(player)
- local textLabel = Instance.new("TextLabel")
- textLabel.Size = UDim2.new(1, 0, 1, 0)
- textLabel.BackgroundTransparency = 1
- textLabel.Text = player.Name
- textLabel.TextColor3 = currentColor
- textLabel.TextStrokeTransparency = 0
- textLabel.TextStrokeColor3 = Color3.new(0, 0, 0)
- textLabel.Font = Enum.Font.SourceSansBold
- textLabel.TextSize = 18
- textLabel.Parent = billboard
- billboard.Parent = head
- nameTags[player] = billboard
- end
- -- Подсветка объектов
- local function highlightPlayerObjects(playerName, color)
- if objectHighlights[playerName] then
- for _, highlight in pairs(objectHighlights[playerName]) do
- if highlight then highlight:Destroy() end
- end
- end
- objectHighlights[playerName] = {}
- local function searchObjects(instance)
- if instance:IsA("BasePart") and instance.Name:lower():find(playerName:lower()) then
- local highlight = Instance.new("BoxHandleAdornment")
- highlight.Name = "ObjectHighlight"
- highlight.Adornee = instance
- highlight.AlwaysOnTop = true
- highlight.ZIndex = 10
- highlight.Size = instance.Size + Vector3.new(0.2, 0.2, 0.2)
- highlight.Transparency = 0.5
- highlight.Color3 = color
- highlight.Parent = instance
- table.insert(objectHighlights[playerName], highlight)
- end
- for _, child in ipairs(instance:GetChildren()) do
- searchObjects(child)
- end
- end
- searchObjects(workspace)
- end
- -- Основная функция подсветки игрока
- local function createHighlight(player, color)
- if not player or not player.Character then return end
- if highlightInstances[player] then
- for _, part in pairs(highlightInstances[player]) do
- if part then part:Destroy() end
- end
- end
- highlightInstances[player] = {}
- local inRadius = isPlayerInRadius(player)
- for _, partName in pairs(highlightParts) do
- local part = player.Character:FindFirstChild(partName)
- if part then
- local highlight = Instance.new("Highlight")
- highlight.Name = "PlayerHighlight"
- highlight.Adornee = part
- highlight.Enabled = inRadius
- highlight.DepthMode = wallHackEnabled and Enum.HighlightDepthMode.AlwaysOnTop or Enum.HighlightDepthMode.Occluded
- highlight.FillColor = color or Color3.fromRGB(0, 255, 0)
- highlight.FillTransparency = 0.5
- highlight.OutlineColor = color or Color3.fromRGB(255, 255, 255)
- highlight.OutlineTransparency = 0
- highlight.Parent = part
- table.insert(highlightInstances[player], highlight)
- end
- end
- if showNames then createNameTag(player) end
- if showHealth then createHealthBar(player) end
- if highlightObjects then highlightPlayerObjects(player.Name, color) end
- end
- -- Радужный эффект
- local function rainbowEffect()
- rainbowMode = true
- if rainbowThread then coroutine.close(rainbowThread) end
- rainbowThread = coroutine.create(function()
- while rainbowMode and task.wait(0.1) do
- local hue = tick() % 5 / 5
- local color = Color3.fromHSV(hue, 1, 1)
- currentColor = color
- for _, player in pairs(highlightInstances) do
- for _, highlight in pairs(player) do
- if highlight then
- highlight.FillColor = color
- highlight.OutlineColor = color
- end
- end
- end
- for player, tag in pairs(nameTags) do
- if tag and tag:FindFirstChild("TextLabel") then
- tag.TextLabel.TextColor3 = color
- end
- end
- for _, highlights in pairs(objectHighlights) do
- for _, highlight in pairs(highlights) do
- if highlight then highlight.Color3 = color end
- end
- end
- end
- end)
- coroutine.resume(rainbowThread)
- end
- -- Очистка всех эффектов
- local function clearHighlights()
- rainbowMode = false
- if rainbowThread then
- coroutine.close(rainbowThread)
- rainbowThread = nil
- end
- if espRadiusThread then
- coroutine.close(espRadiusThread)
- espRadiusThread = nil
- end
- for _, player in pairs(highlightInstances) do
- for _, highlight in pairs(player) do
- if highlight then highlight:Destroy() end
- end
- end
- highlightInstances = {}
- for _, tag in pairs(nameTags) do
- if tag then tag:Destroy() end
- end
- nameTags = {}
- for _, bar in pairs(healthBars) do
- if bar then bar:Destroy() end
- end
- healthBars = {}
- for _, highlights in pairs(objectHighlights) do
- for _, highlight in pairs(highlights) do
- if highlight then highlight:Destroy() end
- end
- end
- objectHighlights = {}
- end
- -- Поток для проверки расстояния
- local function startRadiusCheck()
- if espRadiusThread then coroutine.close(espRadiusThread) end
- espRadiusThread = coroutine.create(function()
- while espRadiusEnabled and task.wait(0.5) do
- updatePlayersVisibility()
- end
- end)
- coroutine.resume(espRadiusThread)
- end
- -- Обработчики игроков
- local function setupPlayerEvents()
- game:GetService("Players").PlayerAdded:Connect(function(player)
- if getOptionValue(Options.HighlightEnabled) then
- if rainbowMode then
- rainbowEffect()
- else
- createHighlight(player, getOptionValue(Options.HighlightColor))
- end
- end
- player.CharacterAdded:Connect(function(character)
- if getOptionValue(Options.HighlightEnabled) then
- if rainbowMode then
- rainbowEffect()
- else
- createHighlight(player, getOptionValue(Options.HighlightColor))
- end
- end
- end)
- end)
- game:GetService("Players").PlayerRemoving:Connect(function(player)
- if highlightInstances[player] then
- for _, highlight in pairs(highlightInstances[player]) do
- if highlight then highlight:Destroy() end
- end
- highlightInstances[player] = nil
- end
- if nameTags[player] then
- nameTags[player]:Destroy()
- nameTags[player] = nil
- end
- if healthBars[player] then
- healthBars[player]:Destroy()
- healthBars[player] = nil
- end
- if objectHighlights[player.Name] then
- for _, highlight in pairs(objectHighlights[player.Name]) do
- if highlight then highlight:Destroy() end
- end
- objectHighlights[player.Name] = nil
- end
- end)
- for _, player in ipairs(game:GetService("Players"):GetPlayers()) do
- if player.Character then
- if getOptionValue(Options.HighlightEnabled) then
- createHighlight(player, getOptionValue(Options.HighlightColor))
- end
- end
- player.CharacterAdded:Connect(function(character)
- if getOptionValue(Options.HighlightEnabled) then
- createHighlight(player, getOptionValue(Options.HighlightColor))
- end
- end)
- end
- end
- -- Элементы интерфейса
- Tabs.Main:AddToggle("HighlightEnabled", {
- Title = "Enable Player Highlight",
- Default = false,
- Callback = function(value)
- if value then
- if rainbowMode then
- rainbowEffect()
- else
- for _, player in ipairs(game:GetService("Players"):GetPlayers()) do
- if player ~= game:GetService("Players").LocalPlayer then
- createHighlight(player, getOptionValue(Options.HighlightColor))
- end
- end
- end
- else
- clearHighlights()
- end
- end
- })
- Tabs.Main:AddColorpicker("HighlightColor", {
- Title = "Highlight Color",
- Default = Color3.fromRGB(0, 255, 0),
- Callback = function(color)
- currentColor = color
- if getOptionValue(Options.HighlightEnabled) and not rainbowMode then
- for _, player in ipairs(game:GetService("Players"):GetPlayers()) do
- if player ~= game:GetService("Players").LocalPlayer then
- createHighlight(player, color)
- end
- end
- end
- end
- })
- Tabs.Main:AddButton({
- Title = "Toggle Rainbow",
- Description = "Enable/disable rainbow effect",
- Callback = function()
- if rainbowMode then
- rainbowMode = false
- if getOptionValue(Options.HighlightEnabled) then
- for _, player in ipairs(game:GetService("Players"):GetPlayers()) do
- if player ~= game:GetService("Players").LocalPlayer then
- createHighlight(player, getOptionValue(Options.HighlightColor))
- end
- end
- end
- else
- if not getOptionValue(Options.HighlightEnabled) then
- Options.HighlightEnabled:SetValue(true)
- end
- rainbowEffect()
- end
- end
- })
- Tabs.Main:AddToggle("ShowNames", {
- Title = "Show Player Names",
- Default = false,
- Callback = function(value)
- showNames = value
- for _, player in ipairs(game:GetService("Players"):GetPlayers()) do
- if player ~= game:GetService("Players").LocalPlayer then
- if nameTags[player] then
- nameTags[player].Enabled = value and isPlayerInRadius(player)
- elseif value then
- createNameTag(player)
- end
- end
- end
- end
- })
- Tabs.Main:AddToggle("ShowHealth", {
- Title = "Show Health Bars",
- Description = "Display health above players",
- Default = false,
- Callback = function(value)
- showHealth = value
- for _, player in ipairs(game:GetService("Players"):GetPlayers()) do
- if player ~= game:GetService("Players").LocalPlayer then
- if healthBars[player] then
- healthBars[player].Enabled = value and isPlayerInRadius(player)
- elseif value then
- createHealthBar(player)
- end
- end
- end
- end
- })
- Tabs.Main:AddToggle("HighlightObjects", {
- Title = "Highlight Player Objects",
- Description = "Highlight objects with player names",
- Default = false,
- Callback = function(value)
- highlightObjects = value
- if value then
- for _, player in ipairs(game:GetService("Players"):GetPlayers()) do
- if player ~= game:GetService("Players").LocalPlayer then
- highlightPlayerObjects(player.Name, currentColor)
- end
- end
- else
- for _, highlights in pairs(objectHighlights) do
- for _, highlight in pairs(highlights) do
- if highlight then highlight:Destroy() end
- end
- end
- objectHighlights = {}
- end
- end
- })
- Tabs.Main:AddToggle("WallHack", {
- Title = "Enable Wall Hack",
- Description = "See players through walls",
- Default = true,
- Callback = function(value)
- wallHackEnabled = value
- if getOptionValue(Options.HighlightEnabled) then
- for _, player in ipairs(game:GetService("Players"):GetPlayers()) do
- if player ~= game:GetService("Players").LocalPlayer then
- createHighlight(player, getOptionValue(Options.HighlightColor))
- end
- end
- end
- end
- })
- -- Добавляем элементы для радиуса ESP
- Tabs.Main:AddToggle("EspRadiusEnabled", {
- Title = "Enable ESP Radius",
- Description = "Only show players within specified radius",
- Default = false,
- Callback = function(value)
- espRadiusEnabled = value
- if value then
- startRadiusCheck()
- elseif espRadiusThread then
- coroutine.close(espRadiusThread)
- espRadiusThread = nil
- end
- -- Обновляем видимость всех игроков
- if getOptionValue(Options.HighlightEnabled) then
- for _, player in ipairs(game:GetService("Players"):GetPlayers()) do
- if player ~= game:GetService("Players").LocalPlayer then
- createHighlight(player, getOptionValue(Options.HighlightColor))
- end
- end
- end
- end
- })
- Tabs.Main:AddSlider("EspRadiusSlider", {
- Title = "ESP Radius",
- Description = "Set the maximum distance to show players",
- Default = 100,
- Min = 10,
- Max = 500,
- Rounding = 0,
- Callback = function(value)
- espRadius = value
- if espRadiusEnabled then
- updatePlayersVisibility()
- end
- end
- })
- -- Инициализация
- setupPlayerEvents()
- -- Настройки сохранения
- SaveManager:SetLibrary(Fluent)
- InterfaceManager:SetLibrary(Fluent)
- SaveManager:IgnoreThemeSettings()
- SaveManager:SetIgnoreIndexes({})
- InterfaceManager:SetFolder("PlayerHighlighter")
- SaveManager:SetFolder("PlayerHighlighter/config")
- InterfaceManager:BuildInterfaceSection(Tabs.Settings)
- SaveManager:BuildConfigSection(Tabs.Settings)
- Window:SelectTab(1)
- Fluent:Notify({
- Title = "Player Highlighter ULTIMATE",
- Content = "Script loaded successfully!",
- Duration = 5
- })
- SaveManager:LoadAutoloadConfig()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement