Universal ESP

74 views
0 comments

Description

universal esp execute and its done...

Features

esp

Script

local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local localPlayer = Players.LocalPlayer

-- Create the name tag above the player's head
local function createNameTag(character, playerName)
	local head = character:FindFirstChild("Head")
	if not head then return end
	if head:FindFirstChild("ESP_NameTag") then return end

	local billboard = Instance.new("BillboardGui")
	billboard.Name = "ESP_NameTag"
	billboard.Adornee = head
	billboard.Size = UDim2.new(0, 100, 0, 25) -- smaller
	billboard.StudsOffset = Vector3.new(0, 2, 0)
	billboard.AlwaysOnTop = true
	billboard.Parent = head

	local textLabel = Instance.new("TextLabel")
	textLabel.Size = UDim2.new(1, 0, 1, 0)
	textLabel.BackgroundTransparency = 1
	textLabel.Text = playerName
	textLabel.TextColor3 = Color3.new(1, 1, 1)
	textLabel.TextStrokeTransparency = 0.5
	textLabel.Font = Enum.Font.FredokaOne
	textLabel.TextScaled = false
	textLabel.TextSize = 25 -- smaller text
	textLabel.Parent = billboard
end

-- Apply red highlight and white outline
local function applyOutline(character)
	if character:FindFirstChild("ESP_Outline") then return end

	local highlight = Instance.new("Highlight")
	highlight.Name = "ESP_Outline"
	highlight.FillTransparency = 0.7 -- transparent red fill
	highlight.FillColor = Color3.new(1, 0, 0) -- red fill
	highlight.OutlineColor = Color3.new(1, 1, 1) -- white outline
	highlight.OutlineTransparency = 0
	highlight.Adornee = character
	highlight.Parent = character
end

-- Attach ESP to the player's character
local function applyESP(player)
	if player == localPlayer then return end

	local function onCharacterAdded(character)
		applyOutline(character)
		createNameTag(character, player.Name)
	end

	if player.Character then
		onCharacterAdded(player.Character)
	end

	player.CharacterAdded:Connect(onCharacterAdded)
end

-- Setup for all current and future players
for _, player in pairs(Players:GetPlayers()) do
	applyESP(player)
end

Players.PlayerAdded:Connect(applyESP)

Comments

Sign in to leave a comment

No comments yet.

Quick Actions