Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local players = game:GetService("Players"):GetChildren()
- local Work = game:GetService("Workspace")
- function zigzag(X)
- return math.acos(math.cos(X * math.pi)) / math.pi
- end
- counter = 0
- function ESPPOS(part)
- local screen = Work.CurrentCamera:WorldToViewportPoint(part.Position)
- return Vector2.new(screen.x, screen.y)
- end
- function ESPBOX(part)
- local screen = Work.CurrentCamera:WorldToViewportPoint(part.Position)
- return Vector2.new(screen.x - (part.Size.X / 2), screen.y - (part.Size.Y / 2))
- end
- function ESPText(part)
- local name = Drawing.new("Text")
- name.Text = part.Parent.Name
- name.Color = Color3.new(math.random(), math.random(), math.random())
- name.Position = ESPPOS(part)
- name.Size = 23.00
- name.Outline = true
- name.Center = true
- name.Visible = true
- game:GetService("RunService").Stepped:connect(
- function()
- local destroyed = not part:IsDescendantOf(Work)
- if destroyed then
- name:Remove()
- end
- if part ~= nil then
- name.Position = ESPPOS(part)
- end
- local _, screen = Work.CurrentCamera:WorldToViewportPoint(part.Position)
- if screen then
- name.Visible = true
- else
- name.Visible = false
- end
- end
- )
- game:GetService("RunService").Stepped:connect(
- function()
- local destroyed = not part:IsDescendantOf(Work)
- if destroyed then
- return
- else
- name.Color = Color3.fromHSV(zigzag(counter), 1, 1)
- counter = counter + 0.0001
- end
- end
- )
- end
- function ESPLine(part)
- local Line = Drawing.new("Line")
- Line.Visible = true
- Line.From = Vector2.new(1000, 1000)
- Line.To = ESPPOS(part)
- Line.Thickness = 2
- Line.Transparency = 1
- Line.Color = Color3.new(math.random(), math.random(), math.random())
- game:GetService("RunService").Stepped:connect(
- function()
- local destroyed = not part:IsDescendantOf(Work)
- if destroyed then
- Line:Remove()
- end
- if part ~= nil then
- Line.To = ESPPOS(part)
- end
- local _, screen = Work.CurrentCamera:WorldToViewportPoint(part.Position)
- if screen then
- Line.Visible = true
- else
- Line.Visible = false
- end
- end
- )
- game:GetService("RunService").Stepped:connect(
- function()
- local destroyed = not part:IsDescendantOf(Work)
- if destroyed then
- return
- else
- Line.Color = Color3.fromHSV(zigzag(counter), 1, 1)
- counter = counter + 0.0001
- end
- end
- )
- end
- function ESPSquare(part)
- local Square = Drawing.new("Square")
- Square.Visible = true
- Square.Position = ESPBOX(part)
- Square.Size = Vector2.new(39, 59)
- Square.Thickness = 2
- Square.Filled = false
- Square.Transparency = 1
- Square.Color = Color3.new(math.random(), math.random(), math.random())
- game:GetService("RunService").Stepped:connect(
- function()
- local destroyed = not part:IsDescendantOf(Work)
- if destroyed then
- Square:Remove()
- end
- if part ~= nil then
- Square.Position = ESPBOX(part)
- end
- local _, screen = Work.CurrentCamera:WorldToViewportPoint(part.Position)
- if screen then
- Square.Visible = true
- else
- Square.Visible = false
- end
- end
- )
- game:GetService("RunService").Stepped:connect(
- function()
- local destroyed = not part:IsDescendantOf(Work)
- if destroyed then
- return
- else
- Square.Color = Color3.fromHSV(zigzag(counter), 1, 1)
- counter = counter + 0.0001
- end
- end
- )
- end
- for i = 1, #players do
- if players[i] ~= game.Players.LocalPlayer then
- if players[i].Character:FindFirstChild("Head") or players[i].Character:WaitForChild("Head") then
- ESPText(players[i].Character:FindFirstChild("Head"))
- ESPLine(players[i].Character:FindFirstChild("Head"))
- ESPSquare(players[i].Character:FindFirstChild("Head"))
- end
- players[i].CharacterAdded:connect(
- function(char)
- local hrp = char:WaitForChild("Head")
- ESPText(hrp)
- ESPLine(hrp)
- ESPSquare(hrp)
- end
- )
- end
- end
- game:GetService("Players").PlayerAdded:Connect(
- function(plr)
- plr.CharacterAdded:connect(
- function(chur)
- wait(3)
- local hrp = chur:WaitForChild("Head")
- ESPText(hrp)
- ESPLine(hrp)
- ESPSquare(hrp)
- end
- )
- end
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement