Advertisement
RobloxNobScript

Roblox Universal Esp

Jan 19th, 2025
330
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | Gaming | 0 0
  1. -- Create a function to highlight and add a box to players
  2. local function highlightPlayers(player)
  3. -- Ensure the player is in the game and their character is loaded
  4. if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
  5. -- Create a Highlight object
  6. local highlight = Instance.new("Highlight")
  7. highlight.Parent = player.Character
  8. highlight.Adornee = player.Character
  9. highlight.FillColor = Color3.fromRGB(255, 0, 0) -- Red color, you can change this
  10. highlight.OutlineColor = Color3.fromRGB(255, 255, 255) -- White outline, you can change this
  11. highlight.FillTransparency = 0.5
  12. highlight.OutlineTransparency = 0.5
  13.  
  14. -- Create a SelectionBox to add a box around the player
  15. local selectionBox = Instance.new("SelectionBox")
  16. selectionBox.Parent = player.Character
  17. selectionBox.Adornee = player.Character
  18. selectionBox.SurfaceColor3 = Color3.fromRGB(0, 255, 0) -- Green box, you can change this
  19. selectionBox.SurfaceTransparency = 0.5
  20. selectionBox.LineThickness = 0.1
  21. end
  22. end
  23.  
  24. -- Call the function to highlight and add boxes to all players already in the game
  25. for _, player in pairs(game:GetService("Players"):GetPlayers()) do
  26. highlightPlayers(player)
  27. end
  28.  
  29. -- Call the function to highlight and add boxes to new players when they join
  30. game:GetService("Players").PlayerAdded:Connect(function(player)
  31. player.CharacterAdded:Connect(function()
  32. highlightPlayers(player)
  33. end)
  34. end)
Tags: no
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement