Wow-oh-my-god

Untitled

Oct 16th, 2023
19
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. -- Khởi tạo ESP object
  2. local Players = game:GetService("Players")
  3. local LocalPlayer = Players.LocalPlayer
  4.  
  5. local function createBillboardGui(part)
  6. local BillboardGui = Instance.new("BillboardGui")
  7. BillboardGui.Name = "ESP"
  8. BillboardGui.AlwaysOnTop = true
  9. BillboardGui.Size = UDim2.new(0, 100, 0, 40)
  10. BillboardGui.StudsOffset = Vector3.new(0, 3, 0)
  11.  
  12. local TextLabel = Instance.new("TextLabel")
  13. TextLabel.Name = "Name"
  14. TextLabel.BackgroundTransparency = 1
  15. TextLabel.Size = UDim2.new(1, 0, 1, 0)
  16. TextLabel.Text = part.Parent.Name
  17. TextLabel.TextColor3 = Color3.new(1, 1, 1)
  18. TextLabel.TextStrokeColor3 = Color3.new(0, 0, 0)
  19. TextLabel.TextStrokeTransparency = 0
  20. TextLabel.Font = Enum.Font.SourceSansBold
  21. TextLabel.TextScaled = true
  22. TextLabel.Parent = BillboardGui
  23.  
  24. BillboardGui.Parent = part
  25. end
  26.  
  27. -- Tạo ESP cho toàn bộ người chơi
  28. for _, player in ipairs(Players:GetPlayers()) do
  29. if player ~= LocalPlayer then
  30. local character = player.Character
  31. if character then
  32. for _, part in ipairs(character:GetDescendants()) do
  33. if part:IsA("BasePart") then
  34. createBillboardGui(part)
  35. end
  36. end
  37. end
  38.  
  39. player.CharacterAdded:Connect(function(character)
  40. for _, part in ipairs(character:GetDescendants()) do
  41. if part:IsA("BasePart") then
  42. createBillboardGui(part)
  43. end
  44. end
  45. end)
  46. end
  47. end
Add Comment
Please, Sign In to add comment