Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local camera = workspace.CurrentCamera;
- local characters=workspace.Characters
- local players= game:service("Players");
- local player = game.Players.LocalPlayer;
- local run = game:service("RunService");
- local espfold = Instance.new("Folder", player)
- while wait(.1) do
- for i,v in pairs(game.Workspace.Characters:GetChildren()) do
- if players:GetPlayerFromCharacter(v)~=player then
- if (not espfold:FindFirstChild(v.Name)) then
- local pp=Instance.new("StringValue", espfold)
- pp.Name=v.Name
- spawn(function()
- local a=Drawing.new("Line");
- a.Thickness=0.5;
- a.Transparency=1;
- a.Visible=true;
- a.Color=Color3.new(255,255,255)
- a.From = Vector2.new(camera.ViewportSize.X / 2, camera.ViewportSize.Y / 2 + 400)
- local runcon=run.Stepped:Connect(function()
- if not a then
- if characters:FindFirstChild(v.Name) then
- local a=Drawing.new("Line");
- a.Thickness=0.5;
- a.Transparency=1;
- a.Visible=true;
- a.Color=Color3.new(255,255,255)
- a.From = Vector2.new(camera.ViewportSize.X / 2, camera.ViewportSize.Y / 2 + 400)
- local vector, onScreen= camera:WorldToScreenPoint(v.Hitbox.Head.Position)
- if onScreen then
- a.To = Vector2.new(vector.X, vector.Y)
- else
- a:Remove()
- if runcon then
- runcon:Disconnect()
- end
- end
- else
- espfold[v.Name]:Destroy()
- if a then
- a:Remove()
- end
- if runcon then
- runcon:Disconnect()
- end
- end
- else
- if characters:FindFirstChild(v.Name) then
- local vector, onScreen= camera:WorldToScreenPoint(v.Hitbox.Head.Position)
- if onScreen then
- a.To = Vector2.new(vector.X, vector.Y)
- else
- a:Remove()
- if runcon then
- runcon:Disconnect()
- end
- end
- else
- espfold[v.Name]:Destroy()
- if a then
- a:Remove()
- end
- if runcon then
- runcon:Disconnect()
- end
- end
- end
- end)
- end)
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement