Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Players = game:GetService("Players")
- local LocalPlayer = Players.LocalPlayer
- local function applyESP(player)
- if player == LocalPlayer then return end
- local function onCharacterAdded(char)
- repeat wait() until char:FindFirstChild("Head") and char:FindFirstChildOfClass("Humanoid")
- -- Name tag
- local head = char:FindFirstChild("Head")
- local billboard = Instance.new("BillboardGui")
- billboard.Name = "ESP_NameTag"
- billboard.Adornee = head
- billboard.Size = UDim2.new(0, 200, 0, 50)
- billboard.StudsOffset = Vector3.new(0, 2, 0)
- billboard.AlwaysOnTop = true
- billboard.Parent = head
- local nameLabel = Instance.new("TextLabel")
- nameLabel.Size = UDim2.new(1, 0, 1, 0)
- nameLabel.BackgroundTransparency = 1
- nameLabel.TextColor3 = Color3.new(1, 1, 1)
- nameLabel.TextStrokeTransparency = 0
- nameLabel.Text = player.Name
- nameLabel.Font = Enum.Font.GothamBold
- nameLabel.TextScaled = true
- nameLabel.Parent = billboard
- -- Outline
- local highlight = Instance.new("Highlight")
- highlight.Name = "ESP_Highlight"
- highlight.FillColor = Color3.new(1, 0, 0)
- highlight.OutlineColor = Color3.new(1, 1, 1)
- highlight.FillTransparency = 0.8
- highlight.OutlineTransparency = 0
- highlight.Adornee = char
- highlight.Parent = char
- end
- player.CharacterAdded:Connect(onCharacterAdded)
- if player.Character then
- onCharacterAdded(player.Character)
- end
- end
- -- ESP only activates while you're alive
- local espActive = true
- -- Add ESP to other players
- for _, p in ipairs(Players:GetPlayers()) do
- applyESP(p)
- end
- -- Watch for new players
- Players.PlayerAdded:Connect(function(player)
- if espActive then
- applyESP(player)
- end
- end)
- -- Disable ESP on local player reset
- LocalPlayer.CharacterAdded:Connect(function()
- espActive = false
- for _, p in ipairs(Players:GetPlayers()) do
- if p ~= LocalPlayer and p.Character then
- -- Remove ESP parts
- local head = p.Character:FindFirstChild("Head")
- if head then
- local tag = head:FindFirstChild("ESP_NameTag")
- if tag then tag:Destroy() end
- end
- local hl = p.Character:FindFirstChild("ESP_Highlight")
- if hl then hl:Destroy() end
- end
- end
- -- Optional notification
- pcall(function()
- game.StarterGui:SetCore("SendNotification", {
- Title = "👁️ ESP Disabled",
- Text = "ESP turned off after reset.",
- Duration = 4
- })
- end)
- end)
- -- Optional startup message
- pcall(function()
- game.StarterGui:SetCore("SendNotification", {
- Title = "🔍 ESP Enabled",
- Text = "Tap reset to disable outlines.",
- Duration = 4
- })
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement