Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- LocalScript chạy qua Executor
- local Players = game:GetService("Players")
- -- Hàm để thêm ESP cho một nhân vật
- local function addESP(character)
- if not character then return end
- -- Đợi các phần cần thiết
- local humanoidRootPart = character:FindFirstChild("HumanoidRootPart") or character:WaitForChild("HumanoidRootPart", 5)
- local humanoid = character:FindFirstChild("Humanoid") or character:WaitForChild("Humanoid", 5)
- if not humanoidRootPart or not humanoid then return end
- -- Tạo Highlight (viền trắng, thân đỏ)
- local highlight = Instance.new("Highlight")
- highlight.FillColor = Color3.fromRGB(255, 0, 0) -- Màu đỏ cho thân
- highlight.OutlineColor = Color3.fromRGB(255, 255, 255) -- Viền trắng
- highlight.FillTransparency = 0.5 -- Độ trong suốt của màu thân
- highlight.OutlineTransparency = 0 -- Viền không trong suốt
- highlight.Parent = character
- -- Tạo BillboardGui để hiển thị tên
- local billboard = Instance.new("BillboardGui")
- billboard.Size = UDim2.new(0, 100, 0, 50) -- Kích thước của tên
- billboard.StudsOffset = Vector3.new(0, 3, 0) -- Đặt tên phía trên đầu
- billboard.AlwaysOnTop = true -- Luôn hiển thị trên cùng
- billboard.Parent = humanoidRootPart
- local nameLabel = Instance.new("TextLabel")
- nameLabel.Size = UDim2.new(1, 0, 1, 0)
- nameLabel.BackgroundTransparency = 1
- nameLabel.Text = character.Name -- Tên của nhân vật
- nameLabel.TextColor3 = Color3.fromRGB(255, 255, 255) -- Màu chữ trắng
- nameLabel.TextScaled = true -- Tự điều chỉnh kích thước chữ
- nameLabel.Parent = billboard
- end
- -- Áp dụng ESP cho tất cả người chơi hiện tại
- for _, player in pairs(Players:GetPlayers()) do
- if player.Character then
- addESP(player.Character)
- end
- end
- -- Áp dụng ESP cho người chơi mới khi họ xuất hiện
- Players.PlayerAdded:Connect(function(player)
- player.CharacterAdded:Connect(function(character)
- addESP(character)
- end)
- if player.Character then
- addESP(player.Character)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment