Binok123456

Skibidi

Mar 9th, 2025
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.18 KB | None | 0 0
  1. -- LocalScript chạy qua Executor
  2. local Players = game:GetService("Players")
  3.  
  4. -- Hàm để thêm ESP cho một nhân vật
  5. local function addESP(character)
  6. if not character then return end
  7.  
  8. -- Đợi các phần cần thiết
  9. local humanoidRootPart = character:FindFirstChild("HumanoidRootPart") or character:WaitForChild("HumanoidRootPart", 5)
  10. local humanoid = character:FindFirstChild("Humanoid") or character:WaitForChild("Humanoid", 5)
  11. if not humanoidRootPart or not humanoid then return end
  12.  
  13. -- Tạo Highlight (viền trắng, thân đỏ)
  14. local highlight = Instance.new("Highlight")
  15. highlight.FillColor = Color3.fromRGB(255, 0, 0) -- Màu đỏ cho thân
  16. highlight.OutlineColor = Color3.fromRGB(255, 255, 255) -- Viền trắng
  17. highlight.FillTransparency = 0.5 -- Độ trong suốt của màu thân
  18. highlight.OutlineTransparency = 0 -- Viền không trong suốt
  19. highlight.Parent = character
  20.  
  21. -- Tạo BillboardGui để hiển thị tên
  22. local billboard = Instance.new("BillboardGui")
  23. billboard.Size = UDim2.new(0, 100, 0, 50) -- Kích thước của tên
  24. billboard.StudsOffset = Vector3.new(0, 3, 0) -- Đặt tên phía trên đầu
  25. billboard.AlwaysOnTop = true -- Luôn hiển thị trên cùng
  26. billboard.Parent = humanoidRootPart
  27.  
  28. local nameLabel = Instance.new("TextLabel")
  29. nameLabel.Size = UDim2.new(1, 0, 1, 0)
  30. nameLabel.BackgroundTransparency = 1
  31. nameLabel.Text = character.Name -- Tên của nhân vật
  32. nameLabel.TextColor3 = Color3.fromRGB(255, 255, 255) -- Màu chữ trắng
  33. nameLabel.TextScaled = true -- Tự điều chỉnh kích thước chữ
  34. nameLabel.Parent = billboard
  35. end
  36.  
  37. -- Áp dụng ESP cho tất cả người chơi hiện tại
  38. for _, player in pairs(Players:GetPlayers()) do
  39. if player.Character then
  40. addESP(player.Character)
  41. end
  42. end
  43.  
  44. -- Áp dụng ESP cho người chơi mới khi họ xuất hiện
  45. Players.PlayerAdded:Connect(function(player)
  46. player.CharacterAdded:Connect(function(character)
  47. addESP(character)
  48. end)
  49. if player.Character then
  50. addESP(player.Character)
  51. end
  52. end)
Advertisement
Add Comment
Please, Sign In to add comment