Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Boxes = {}
- local ValidGUI
- local Players = game:GetService("Players")
- local Me = Players.LocalPlayer
- local Mouse = Me:GetMouse()
- local Active = true
- local Cam = workspace.CurrentCamera
- while not ValidGUI do
- ValidGUI = game.CoreGui:FindFirstChildOfClass("ScreenGui")
- wait()
- end
- local ESPPlayer = function(Player)
- if not Boxes[Player.Name] then
- Boxes[Player.Name] = {}
- end
- if Player == Me then return end
- spawn(function()
- for i,v in pairs(Boxes[Player.Name]) do
- v:Destroy()
- end
- local Char = Player.Character or Player.CharacterAdded:Wait()
- local Billboard = Char:FindFirstChildWhichIsA("BillboardGui",true)
- if Billboard then
- for k,l in pairs(Billboard:GetDescendants()) do
- if l.ClassName == "TextLabel" and l.Text:lower():match(Player.Name:lower()) then
- l.ZIndex = 100
- Billboard.AlwaysOnTop = true
- Billboard.MaxDistance = math.huge
- Billboard.LightInfluence = 0
- l.TextTransparency = 0
- break
- end
- end
- end
- local Box = Instance.new("BoxHandleAdornment")
- Box.AlwaysOnTop = true
- Box.ZIndex = 10
- Box.Transparency = .25
- for i,v in pairs(Char:GetChildren()) do
- if v:IsA("BasePart") then
- local BClone = Box:Clone()
- BClone.Color3 = Player.Team == Me.Team and Color3.new(0,1,0) or Color3.new(1,0,0)
- BClone.Adornee = v
- BClone.Size = v.Size + Vector3.new(.01,.01,.01)
- BClone.Parent = ValidGUI
- table.insert(Boxes[Player.Name],BClone)
- end
- end
- Box:Destroy()
- end)
- end
- Players.PlayerAdded:Connect(function(Player)
- Player.CharacterAdded:Connect(function()
- ESPPlayer(Player)
- end)
- end)
- Players.PlayerRemoving:Connect(function(Player)
- for i,v in pairs(Boxes[Player.Name]) do
- v:Destroy()
- end
- Boxes[Player.Name] = nil
- end)
- Mouse.KeyDown:Connect(function(Key)
- if Key:lower() == "l" then
- Active = not Active
- for i,v in pairs(Boxes) do
- for k,l in pairs(v) do
- l.Visible = Active
- end
- end
- end
- end)
- for i,v in pairs(game:GetService("Players"):GetPlayers()) do
- ESPPlayer(v)
- v.CharacterAdded:Connect(function()
- ESPPlayer(v)
- end)
- end
Add Comment
Please, Sign In to add comment