Jayki25177

Working ESP script Universal

Mar 26th, 2024 (edited)
78
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.24 KB | None | 0 0
  1. -- Script to highlight players visible through walls with a rainbow effect and display their names
  2.  
  3. -- Function to create a rainbow effect
  4. local function rainbowColor()
  5. local frequency = 0.3
  6. local amplitude = 127
  7. local center = 128
  8. local speed = 0.1
  9. local r = math.sin(frequency * tick() + 0) * amplitude + center
  10. local g = math.sin(frequency * tick() + 2) * amplitude + center
  11. local b = math.sin(frequency * tick() + 4) * amplitude + center
  12. return Color3.fromRGB(r, g, b)
  13. end
  14.  
  15. -- Main loop to update player visibility
  16. while true do
  17. wait(0.1) -- Adjust the delay based on your preference
  18.  
  19. -- Loop through all players
  20. for _, player in pairs(game.Players:GetPlayers()) do
  21. -- Check if the player is visible through walls
  22. if player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
  23. local humanoidRootPart = player.Character.HumanoidRootPart
  24. local playerScreenPos, visible = workspace.CurrentCamera:WorldToViewportPoint(humanoidRootPart.Position)
  25.  
  26. -- Check if the player is visible on the screen
  27. if visible then
  28. -- Create a rainbow-colored highlight around the player
  29. local highlight = Instance.new("BoxHandleAdornment")
  30. highlight.Adornee = humanoidRootPart
  31. highlight.Size = Vector3.new(4, 8, 4) -- Adjust the size of the highlight
  32. highlight.Color3 = rainbowColor() -- Apply the rainbow effect
  33. highlight.Transparency = 0.5
  34. highlight.AlwaysOnTop = true
  35. highlight.ZIndex = 5
  36. highlight.Parent = humanoidRootPart
  37.  
  38. -- Create a text label displaying the player's name
  39. local nameLabel = Instance.new("TextLabel")
  40. nameLabel.Text = player.Name
  41. nameLabel.Size = UDim2.new(0, 100, 0, 20)
  42. nameLabel.TextColor3 = Color3.new(1, 1, 1)
  43. nameLabel.BackgroundTransparency = 1
  44. nameLabel.Position = UDim2.new(0, 0, -1, 0) -- Adjust the position relative to the highlight
  45. nameLabel.Parent = highlight
  46. end
  47. end
  48. end
  49. end
Advertisement
Comments
Add Comment
Please, Sign In to add comment