Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- ESP Script for Roblox & games made with lua
- -- Set the color of the ESP
- local ESPColor = Color3.new(1, 0, 0) -- Red
- -- Set the thickness of the ESP lines
- local ESPThickness = 2
- -- Set the distance from the player to draw the ESP
- local ESPDistance = 100
- -- Get the player's character
- local player = game.Players.LocalPlayer
- -- Get the player's character model
- local character = player.Character
- -- Create a new script to run on the server
- local serverScript = Instance.new("Script")
- serverScript.Parent = game.ReplicatedStorage
- -- Define a function to draw the ESP
- local function drawESP()
- -- Get all characters within the ESP distance
- for _, character in pairs(game.Workspace:GetDescendants()) do
- if character:IsA("Model") and character.Name ~= player.Name and character:FindFirstChild("Humanoid") then
- -- Get the character's position and size
- local pos = character.HumanoidRootPart.Position
- local size = character.HumanoidRootPart.Size
- -- Check if the character is within the ESP distance
- if (pos - character.HumanoidRootPart.Position).magnitude < ESPDistance then
- -- Draw the ESP
- local line = Instance.new("Part")
- line.Anchored = true
- line.Transparency = 0.5
- line.BrickColor = ESPColor
- line.Size = Vector3.new(size.X, size.Y, size.Z)
- line.CFrame = CFrame.new(pos)
- line.Parent = workspace
- end
- end
- end
- end
- -- Run the drawESP function every frame
- while true do
- drawESP()
- wait(0.1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement