Advertisement
UltimateCheater

ESP

Jun 1st, 2024
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.64 KB | None | 0 0
  1. -- ESP Script for Roblox & games made with lua
  2.  
  3. -- Set the color of the ESP
  4. local ESPColor = Color3.new(1, 0, 0) -- Red
  5.  
  6. -- Set the thickness of the ESP lines
  7. local ESPThickness = 2
  8.  
  9. -- Set the distance from the player to draw the ESP
  10. local ESPDistance = 100
  11.  
  12. -- Get the player's character
  13. local player = game.Players.LocalPlayer
  14.  
  15. -- Get the player's character model
  16. local character = player.Character
  17.  
  18. -- Create a new script to run on the server
  19. local serverScript = Instance.new("Script")
  20. serverScript.Parent = game.ReplicatedStorage
  21.  
  22. -- Define a function to draw the ESP
  23. local function drawESP()
  24. -- Get all characters within the ESP distance
  25. for _, character in pairs(game.Workspace:GetDescendants()) do
  26. if character:IsA("Model") and character.Name ~= player.Name and character:FindFirstChild("Humanoid") then
  27. -- Get the character's position and size
  28. local pos = character.HumanoidRootPart.Position
  29. local size = character.HumanoidRootPart.Size
  30.  
  31. -- Check if the character is within the ESP distance
  32. if (pos - character.HumanoidRootPart.Position).magnitude < ESPDistance then
  33. -- Draw the ESP
  34. local line = Instance.new("Part")
  35. line.Anchored = true
  36. line.Transparency = 0.5
  37. line.BrickColor = ESPColor
  38. line.Size = Vector3.new(size.X, size.Y, size.Z)
  39. line.CFrame = CFrame.new(pos)
  40. line.Parent = workspace
  41. end
  42. end
  43. end
  44. end
  45.  
  46. -- Run the drawESP function every frame
  47. while true do
  48. drawESP()
  49. wait(0.1)
  50. end
  51.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement