Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local r = game:GetService("RunService")
- local Players = game:GetService("Players") or game.Players
- local Workspace = game:GetService("Workspace") or workspace or game.Workspace
- local L = game:GetService("Lighting") or game.Lighting
- local http = game:GetService("HttpService")
- local user = game:GetService("UserInputService")
- local RS = game:GetService("ReplicatedStorage") or game.ReplicatedStorage
- local TS = game:GetService("TweenService")
- local CG = game:GetService("CoreGui")
- local Teams = game:GetService("Teams") or game.Teams
- local Camera = Workspace.CurrentCamera or Workspace:FindFirstChild("Camera")
- local LP = Players.LocalPlayer
- local Mouse = LP:GetMouse()
- local Colors = {
- Red = Color3.fromRGB(100,0,0),
- Green = Color3.fromRGB(0,100,0),
- Blue = Color3.fromRGB(0,0,100),
- Tracers = Color3.fromRGB(),
- ESP = Color3.fromRGB(),
- HeadDot = Color3.fromRGB(),
- ChamsColor = Color3.fromRGB(),
- Boxes = Color3.fromRGB(),
- Crosshair = Color3.fromRGB(100,0,255),
- }
- local functions = { }
- local visuals = {
- tracer_shit = {
- enabled = false,
- x = {},
- obj = {},
- },
- esp_shit = {
- enabled = false,
- x = {},
- obj = {},
- },
- headdot_shit = {
- enabled = false,
- x = {},
- },
- chams_shit = {
- enabled = false,
- x = {},
- obj = {},
- },
- box_shit = {
- x = {},
- enabled = false,
- },
- crosshair_shit = {},
- circlecrosshair_shit = {},
- fullbright_shit = {
- enabled = false,
- x = {},
- },
- Settings = {
- Enemy = false,
- BoxFilled = false,
- CircleFilled = true,
- DistanceVal = 2500,
- Distance false,
- TracerColors = true,
- ESPColors = true,
- HeadDotColors = true,
- BoxColors = true,
- },
- loops = {},
- }
- function functions:GetDistance(plr)
- local char = plr.Character or plr.CharacterAdded:wait()
- if char and Character then
- local hum = char:FindFirstChild("HumanoidRootPart") or char:WaitForChild("HumanoidRootPart")
- local hum1 = Character:FindFirstChild("HumanoidRootPart") or Character:WaitForChild("HumanoidRootPart")
- if hum and hum1 then
- local dist = (hum1.Position - hum.Position).magnitude
- return dist
- else
- return 999
- end
- end
- end
- function functions:GetTeamColor(player)
- if LP.Team == player.Team then
- return Color3.new(0, 1, 0)
- end;
- if tostring(LP.Team) == "Prisoner" then
- if tostring(player.Team) == "Police" then
- return Color3.new(1, 0, 0)
- else
- return Color3.new(0, 1, 0)
- end
- elseif tostring(LP.Team) == "Criminal" then
- if tostring(player.Team) == "Police" then
- return Color3.new(1, 0, 0)
- else
- return Color3.new(0, 1, 0)
- end
- elseif tostring(LP.Team) == "Police" then
- if tostring(player.Team) == "Criminal" then
- return Color3.new(1, 0, 0)
- else
- return Color3.new(1, 1, 0)
- end
- end;
- return Color3.new(1, 0, 0)
- end
- function functions:CreateLoop(name, func, waitt, canBeDestroyed, ...)
- if visuals.loops[name] ~= nil then return end
- visuals.loops[name] = { }
- visuals.loops[name].Running = false
- visuals.loops[name].Destroy = false
- visuals.loops[name].CanBeDestroyed = canBeDestroyed
- visuals.loops[name].Loop = coroutine.create(function(...)
- while true do
- if visuals.loops[name].Running then
- func(...)
- end
- if visuals.loops[name].Destroy then
- break
- end
- if type(wait) == "userdata" then
- waitt:wait()
- else
- wait(waitt)
- end
- end
- end)
- end
- function functions:RunLoop(name, func, waitt, canBeDestroyed, ...)
- if visuals.loops[name] == nil then
- if func ~= nil then
- self:CreateLoop(name, func, waitt, canBeDestroyed, ...)
- end
- end
- visuals.loops[name].Running = true
- local succ, out = coroutine.resume(visuals.loops[name].Loop)
- if not succ then
- warn("Loop: " .. tostring(name) .. " ERROR: " .. tostring(out))
- end
- end
- function functions:StopLoop(name)
- if visuals.loops[name] == nil then return end
- visuals.loops[name].Running = false
- end
- function functions:DestroyLoop(name)
- if visuals.loops[name] == nil then return end
- self:StopLoop(name)
- visuals.loops[name].Destroy = true
- visuals.loops[name] = nil
- end
- function functions:DestroyAllLoops()
- for i, v in next, visuals.loops do
- self:DestroyLoop(i)
- end
- end
- function functions:CreateFolder(name,parent)
- local x = Instance.new("Folder",parent)
- x.Name = name
- return x
- end
- do--tracer
- function visuals.tracer_shit.obj:CreateTracer(obj)
- local x = Drawing.new("Line")
- self[tostring(obj)] = {}
- self[tostring(obj)].enabled = false
- self[tostring(obj)].obj = x
- x.Thickness = 2
- x.Visible = self.obj[tostring(obj)].enabled
- x.Color = Colors.Blue
- return x
- end
- function visuals.tracer_shit.obj:RemoveTracer(obj)
- if self.obj[tostring(obj)] ~= nil then
- self.obj[tostring(obj)]:Remove()
- self[tostring(obj)] = nil
- end
- end
- function visuals.tracer_shit.obj:UpdateTracer(obj)
- local x = self[tostring(obj)].obj
- if x then
- local x1, x2 = Camera:WorldToViewportPoint(obj.CFrame.p - Vector3.new(0, 3, 0))
- if x2 and isrbxactive() then
- x.Visible = true
- x.From = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y)
- x.To = Vector2.new(x1.X,x1.Y)
- else
- x.Visible = false
- end
- end
- end
- function visuals.tracer_shit:CreateTracer(plr)
- local x = Drawing.new("Line")
- x.Thickness = 2
- x.Visible = self.enabled
- self.x[tostring(plr)] = x
- if visuals.Settings.TracerColors then
- x.Color = functions:GetTeamColor(plr)
- else
- x.Color = Colors.Tracers
- end
- return x
- end
- function visuals.tracer_shit:RemoveTracer(plr)
- if self.x[tostring(plr)] ~= nil then
- self.x[tostring(plr)]:Remove()
- self.x[tostring(plr)] = nil
- end
- end
- function visuals.tracer_shit:UpdateTracer(plr)
- local x = self.x[tostring(plr)]
- local char = plr.Character
- if char and x then
- if functions:GetDistance(plr) > visuals.Settings.DistanceVal then
- x.Visible = false
- return
- end
- if plr.Name == LP.Name or plr.Team == LP.Team then return end
- local t = char:FindFirstChild("HumanoidRootPart")
- if t then
- local x1, x2 = Camera:WorldToViewportPoint(t.CFrame.p - Vector3.new(0, 3, 0))
- if x2 and isrbxactive() then
- x.Visible = self.enabled
- x.From = Vector2.new(Camera.ViewportSize.X / 2, Camera.ViewportSize.Y)
- x.To = Vector2.new(x1.X,x1.Y)
- if visuals.Settings.TracerColors then
- x.Color = functions:GetTeamColor(plr)
- else
- x.Color = Colors.Tracers
- end
- else
- x.Visible = false
- end
- end
- end
- end
- function visuals.tracer_shit:Init()
- functions:CreateLoop("UpdatePlayerTracers",function()
- for i,v in pairs(Players:GetPlayers()) do
- self:UpdateTracer(v)
- end
- end,r.RenderStepped)
- for i,v in pairs(Players:GetPlayers()) do
- self:CreateTracer(v)
- end
- Players.PlayerAdded:connect(function(x)
- self:CreateTracer(x)
- end)
- Players.PlayerRemoving:connect(function(x)
- self:RemoveTracer(x)
- end)
- end
- end--tracer
- do--head dot
- function visuals.headdot_shit:CreateDot(plr)
- local char = plr.Character or plr.CharacterAdded:wait()
- if char then
- local head = char:FindFirstChild("Head")
- if head then
- local x = Drawing.new("Circle")
- if visuals.Settings.TracerColors then
- x.Color = functions:GetTeamColor(plr)
- else
- x.Color = Colors.HeadDot
- end
- x.Filled = visuals.Settings.CircleFilled
- x.Transparency = 0.4
- x.Visible = self.enabled
- self.x[tostring(plr)] = x
- end
- end
- end
- function visuals.headdot_shit:UpdateDot(plr)
- local x = self.x[tostring(plr)]
- local char = plr.Character or plr.CharacterAdded:wait()
- if char then
- local head = char:FindFirstChild("Head")
- if x and head then
- local pos, scr = Camera:WorldToViewportPoint(head.Position)
- if functions:GetDistance(plr) > visuals.Settings.DistanceVal then
- x.Visible = false
- return
- end
- if plr.Name == LP.Name or plr.Team == LP.Team then return end
- if isrbxactive() and scr then
- if visuals.Settings.TracerColors then
- x.Color = functions:GetTeamColor(plr)
- else
- x.Color = Colors.HeadDot
- end
- x.Radius = 700 / pos.Z
- x.Filled = visuals.Settings.CircleFilled
- x.Visible = self.enabled
- x.Position = Vector2.new(pos.X, pos.Y)
- else
- x.Visible = false
- end
- end
- end
- end
- function visuals.headdot_shit:RemoveDot(plr)
- if self.x[tostring(plr)] ~= nil then
- self.x[tostring(plr)]:Remove()
- self.x[tostring(plr)] = nil
- end
- end
- function visuals.headdot_shit:Init()
- functions:CreateLoop("UpdatePlayerDot",function()
- for i,v in pairs(Players:GetPlayers()) do
- self:UpdateDot(v)
- end
- end,r.RenderStepped)
- for i,v in pairs(Players:GetPlayers()) do
- self:CreateDot(v)
- end
- Players.PlayerAdded:connect(function(x)
- self:CreateDot(x)
- end)
- Players.PlayerRemoving:connect(function(x)
- self:RemoveDot(x)
- end)
- end
- end--head dot
- do--box esp
- function visuals.box_shit:CreateBox(parent,size,color)
- local ESP = Instance.new("BillboardGui")
- local Frame = Instance.new("Frame")
- local Frame_2 = Instance.new("Frame")
- local Frame_3 = Instance.new("Frame")
- local Frame_4 = Instance.new("Frame")
- local Frame_5 = Instance.new("Frame")
- --Properties:
- ESP.Name = "BoxESP"
- ESP.Parent = parent
- ESP.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
- ESP.Active = true
- ESP.LightInfluence = 1
- ESP.Size = size
- ESP.AlwaysOnTop = true
- ESP.Adornee = parent
- Frame.Parent = ESP
- Frame.BackgroundColor3 = Color3.new(1, 1, 1)
- Frame.BackgroundTransparency = 1
- Frame.BorderSizePixel = 0
- Frame.Size = UDim2.new(1, -2, 1, -2)
- Frame_2.Parent = Frame
- Frame_2.BackgroundColor3 = color
- Frame_2.BorderSizePixel = 0
- Frame_2.Size = UDim2.new(1, 0, 0, 1)
- Frame_3.Parent = Frame
- Frame_3.BackgroundColor3 = color
- Frame_3.BorderSizePixel = 0
- Frame_3.Position = UDim2.new(0, 0, 1, 0)
- Frame_3.Size = UDim2.new(1, 0, 0, 1)
- Frame_4.Parent = Frame
- Frame_4.BackgroundColor3 = color
- Frame_4.BorderSizePixel = 0
- Frame_4.Size = UDim2.new(0, 1, 1, 0)
- Frame_5.Parent = Frame
- Frame_5.BackgroundColor3 = color
- Frame_5.BorderSizePixel = 0
- Frame_5.Position = UDim2.new(1, 0, 0, 0)
- Frame_5.Size = UDim2.new(0, 1, 1, 0)
- end
- end--box esp
- do--fullbright
- function visuals.fullbright_shit:Init()
- self.x["Ambient"] = L.Ambient
- self.x["Brightness"] = L.Brightness
- self.x["ColorShift_Bottom"] = L.ColorShift_Bottom
- self.x["ColorShift_Top"] = L.ColorShift_Top
- self.x["OutdoorAmbient"] = L.OutdoorAmbient
- visuals.Initialized.Fullbright = true;
- end
- function visuals.fullbright_shit:Enabled()
- L.Ambient = Color3.new(1, 1, 1)
- L.Brightness = 2
- L.ColorShift_Bottom = Color3.new(1, 1, 1)
- L.ColorShift_Top = Color3.new(1, 1, 1)
- L.OutdoorAmbient = Color3.new(1, 1, 1)
- end
- function visuals.fullbright_shit:Disable()
- for i,v in pairs(self.x) do
- L[i] = v
- end
- end
- end--fullbright
- do--crosshair
- function visuals.crosshair_shit:Enable()
- visuals.crosshair_shit.x.To = Vector2.new((Workspace.CurrentCamera.ViewportSize.X / 2) - 12, (Workspace.CurrentCamera.ViewportSize.Y / 2))
- visuals.crosshair_shit.x.From = Vector2.new((Workspace.CurrentCamera.ViewportSize.X / 2) + 12, (Workspace.CurrentCamera.ViewportSize.Y / 2))
- visuals.crosshair_shit.y.To = Vector2.new((Workspace.CurrentCamera.ViewportSize.X / 2), (Workspace.CurrentCamera.ViewportSize.Y / 2) - 12)
- visuals.crosshair_shit.y.From = Vector2.new((Workspace.CurrentCamera.ViewportSize.X / 2), (Workspace.CurrentCamera.ViewportSize.Y / 2) + 12)
- visuals.crosshair_shit.x.Visible = true
- visuals.crosshair_shit.y.Visible = true
- end
- function visuals.crosshair_shit:Init()
- visuals.crosshair_shit.x = Drawing.new("Line")
- visuals.crosshair_shit.x.Visible = false
- visuals.crosshair_shit.x.Thickness = 3
- visuals.crosshair_shit.x.Color = Colors.Crosshair
- visuals.crosshair_shit.y = Drawing.new("Line")
- visuals.crosshair_shit.y.Visible = false
- visuals.crosshair_shit.y.Thickness = 3
- visuals.crosshair_shit.y.Color = Colors.Crosshair
- end
- function visuals.crosshair_shit:Disable()
- visuals.crosshair_shit.x.Visible = false
- visuals.crosshair_shit.y.Visible = false
- end
- end--crosshair
- do--circle crosshair
- function visuals.circlecrosshair_shit:Enable()
- visuals.circlecrosshair_shit.z.Position = Vector2.new(Workspace.CurrentCamera.ViewportSize.X / 2, Workspace.CurrentCamera.ViewportSize.Y / 2)
- visuals.circlecrosshair_shit.z.Visible = true
- end
- function visuals.circlecrosshair_shit:Init()
- visuals.circlecrosshair_shit.z = Drawing.new("Circle")
- visuals.circlecrosshair_shit.z.Visible = false
- visuals.circlecrosshair_shit.z.Radius = 50
- visuals.circlecrosshair_shit.z.Filled = false
- visuals.circlecrosshair_shit.z.Transparency = 0.4
- visuals.circlecrosshair_shit.z.NumSides = 12
- visuals.circlecrosshair_shit.z.Thickness = 5
- visuals.circlecrosshair_shit.z.Color = Colors.Crosshair
- end
- function visuals.circlecrosshair_shit:Disable()
- visuals.circlecrosshair_shit.z.Visible = false
- end
- end--circle
- return visuals
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement