Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Library = loadstring(game:HttpGet("https://raw.githubusercontent.com/Blissful4992/ESPs/main/3D%20Drawing%20Api.lua"))()
- local LocalPlayer = game:GetService("Players").LocalPlayer
- function CreateESP(Player)
- local Parts = {Player = Player, Parts = {}}
- if Player ~= nil and game:GetService("Players")[Player.Name] and LocalPlayer.Name ~= Player.Name and Player.Character then
- if Player.Character:FindFirstChild("HumanoidRootPart") then
- local ESP = Library:New3DCube()
- ESP.Visible = true
- ESP.ZIndex = 1
- ESP.Transparency = 0.5
- ESP.Color = Color3.fromRGB(255, 0, 0)
- ESP.Thickness = 1
- ESP.Filled = true
- ESP.Position = Player.Character.HumanoidRootPart.Position
- ESP.Size = Player.Character.HumanoidRootPart.Size
- table.insert(Parts.Parts, ESP)
- end
- end
- return Parts
- end
- local Players = {}
- for i, v in pairs(game:GetService("Players"):GetPlayers()) do
- if v ~= nil and v.Name ~= LocalPlayer.Name then
- local Parts = CreateESP(v)
- Players[v.Name] = Parts
- end
- end
- game:GetService("Players").PlayerAdded:Connect(function(Player)
- wait(5)
- if Player ~= nil and Player.Name ~= LocalPlayer.Name then
- local Parts = CreateESP(Player)
- Players[Player.Name] = Parts
- end
- end)
- local function HasPart(Player, Part)
- if Player ~= nil and Player.Character ~= nil and Part ~= nil then
- if Player.Backpack and Player.Backpack:FindFirstChild(Part) then
- return true
- elseif Player.Character and Player.Character:FindFirstChild(Part) then
- return true
- end
- end
- end
- local Target = workspace.Events.GetTargetLocal:InvokeServer()
- local Role = workspace.Events.GetRoleLocal:InvokeServer()
- local Guns = {
- "Luger",
- "M1911",
- "Hand Cannon",
- "MAC10",
- "Six Shooter",
- "Mauser"
- }
- local function HasGun(Player)
- for i, v in pairs(Guns) do
- if HasPart(Player, v) then
- return true
- end
- end
- return false
- end
- local PlayerService = game:GetService("Players")
- local UpdateCounter = 0
- while wait() do
- UpdateCounter = UpdateCounter + 1
- if UpdateCounter >= 100 then
- UpdateCounter = 0
- spawn(function()
- Target = workspace.Events.GetTargetLocal:InvokeServer()
- Role = workspace.Events.GetRoleLocal:InvokeServer()
- for i, v in pairs(PlayerService:GetPlayers()) do
- if not Players[v.Name] then
- local Parts = CreateESP(v)
- Players[v.Name] = Parts
- end
- end
- end)
- end
- local Number = 0
- for i, v in pairs(Players) do
- Number = Number + 1
- if game:GetService("Players"):FindFirstChild(i) and v.Player and typeof(v.Player) == "Instance" and game:GetService("Players"):FindFirstChild(v.Player.Name) then
- if v.Player.Character and v.Player.Character:FindFirstChild("HumanoidRootPart") then
- for i1, v1 in pairs(v.Parts) do
- v1.Position = v.Player.Character.HumanoidRootPart.Position
- v1.Size = v.Player.Character.HumanoidRootPart.Size
- v1.Rotation = v.Player.Character.HumanoidRootPart.Rotation
- if HasGun(v.Player) and v.Player:FindFirstChild("Role") and v.Player.Role.Value == "Police" then
- v1.Color = Color3.fromRGB(0, 0, 255)
- elseif HasGun(v.Player) and v.Player:FindFirstChild("Role") and v.Player.Role.Value == "Framed" then
- v1.Color = Color3.fromRGB(255, 0, 0)
- elseif HasGun(v.Player) and v.Player:FindFirstChild("Role") and v.Player.Role.Value == "Undercover" then
- v1.Color = Color3.fromRGB(0, 255, 0)
- else
- v1.Color = Color3.fromRGB(80, 80, 80)
- end
- if v.Player.Character:FindFirstChild("Humanoid") and v.Player.Character:FindFirstChild("Humanoid").Health == 0 or not v.Player.Character:FindFirstChild("Humanoid") then
- v1.Visible = false
- else
- v1.Visible = true
- end
- if Role == "Framed" and Target and Target.Name == v.Player.Name then
- v1.Color = Color3.fromRGB(183, 0, 255)
- end
- end
- end
- else
- for i1, v1 in pairs(v.Parts) do
- v1.Visible = false
- end
- table.remove(Players, Number)
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement