Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local AlreadyGot = {};
- game:GetService("RunService").Heartbeat:Connect(function()
- for i,v in pairs(game.Players:GetChildren()) do
- local chara = v.Character
- if AlreadyGot[chara] == nil then
- table.insert(AlreadyGot, chara);
- local Line = Drawing.new("Line")
- local a,b = workspace.CurrentCamera:WorldToViewportPoint(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position).X, workspace.CurrentCamera:WorldToViewportPoint(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position).Y
- local x,y = workspace.CurrentCamera:WorldToViewportPoint(chara.HumanoidRootPart.Position).X, workspace.CurrentCamera:WorldToViewportPoint(chara:WaitForChild("HumanoidRootPart").Position).Y
- local chara = v.Character
- local _, withinScreenBounds = workspace.CurrentCamera:WorldToScreenPoint(chara.Head.Position)
- if withinScreenBounds then
- Line.Visible = true
- else
- Line.Visible = false
- end;
- Line.From = Vector2.new(a,b)
- Line.To = Vector2.new(x,y)
- if v.TeamColor == game:GetService("Players").LocalPlayer.TeamColor then
- Line.Color = Color3.fromRGB(0, 255, 0)
- else
- Line.Color = Color3.fromRGB(255, 0, 0)
- end;
- Line.Thickness = 2
- Line.Transparency = 1
- wait(0.001);
- Line:Remove()
- end
- end;
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement