Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Visuals.togglePlayerEsp(state)
- Visuals.playerEspToggle = state
- if state then
- return Visuals.playerEsp()
- else
- local d = game:GetService("CoreGui"):FindFirstChild("PlayerEsp") and game:GetService("CoreGui"):FindFirstChild("PlayerEsp"):Destroy()
- end
- end
- function Visuals.playerEsp()
- local playerEspFolder = game:GetService("CoreGui"):FindFirstChild("PlayerEsp") or Instance.new("Folder", game:GetService("CoreGui"))
- playerEspFolder.Name = "PlayerEsp"
- local function Create(player)
- if player.Character then
- local b= Instance.new("BillboardGui", playerEspFolder)
- b.AlwaysOnTop = true
- b.ClipsDescendants = false
- b.Size = UDim2.new(4, 0, 6, 0)
- b.Adornee = player.Character
- b.Enabled = true
- b.Name = player.Name
- local container= Instance.new("Frame", esp)
- container.Name = "x"
- container.Size = UDim2.new(1, -2, 1, -2)
- container.Position = UDim2.new(0, 1, 0, 1)
- container.BackgroundTransparency = 1
- local inlines = Instance.new("Folder", container)
- inlines.Name = "z"
- local inline1 = Instance.new("Frame", inlines)
- inline1.Name = "t"
- inline1.BorderSizePixel = 0
- inline1.Size = UDim2.new(0, 1, 1, 0)
- local inline2 = Instance.new("Frame", inlines)
- inline2.Name = "t"
- inline2.BorderSizePixel = 0
- inline2.Position = UDim2.new(1, 0, 0, 0)
- inline2.Size = UDim2.new(0, -1, 1, 0)
- local inline3 = Instance.new("Frame", inlines)
- inline3.Name = "t"
- inline3.BorderSizePixel = 0
- inline3.Size = UDim2.new(1, 0, 0, 1)
- local inline4 = Instance.new("Frame", inlines)
- inline4.Name = "Frame"
- inline4.BorderSizePixel = 0
- inline4.Position = UDim2.new(0, 0, 1, 0)
- inline4.Size = UDim2.new(1, 0, 0, -1)
- for k, v in next, inlines:GetChildren() do
- v.BackgroundColor3 = player.TeamColor.Color
- end
- end
- end
- for i, player in next, game.Players:GetChildren() do
- if player ~= plr and player.Team ~= plr.Team then
- Create(player)
- end
- end
- spawn(
- function()
- while Visuals.playerEspToggle do
- for i, player in next, game.Players:GetChildren() do
- if player ~= plr then
- if playerEspFolder:FindFirstChild(player.Name) then
- playerEspFolder[player.Name]:Destroy()
- end
- if player ~= plr and player.Team ~= plr.Team then
- Create(player)
- end
- end
- end
- wait(4)
- end
- end
- )
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement