local P = game:GetService("Players") local R = game:GetService("RunService") local C = workspace.CurrentCamera local L = P.LocalPlayer local e = true local b = true local o = {} local c = {} local E_C = Color3.fromRGB(255, 0, 0) local T_C = Color3.fromRGB(0, 255, 0) local B_C = Color3.fromRGB(255, 0, 0) local W_C = Color3.fromRGB(255, 255, 255) local g = Instance.new("ScreenGui") g.ResetOnSpawn = false g.Parent = L:WaitForChild("PlayerGui") local S = UDim2.new(0, 120, 0, 35) local G_C = Color3.fromRGB(30, 30, 30) local S_C = Color3.fromRGB(70, 70, 70) local F = Instance.new("Frame") F.Size = S F.Position = UDim2.new(0, 12, 0, 12) F.BackgroundColor3 = G_C F.BorderSizePixel = 0 F.Parent = g local S_1 = Instance.new("UIStroke", F) S_1.Color = S_C S_1.Thickness = 1.5 local B_1 = Instance.new("TextButton") B_1.Size = UDim2.new(1, 0, 1, 0) B_1.Position = UDim2.new(0, 0, 0, 0) B_1.BackgroundColor3 = e and T_C or E_C B_1.Text = e and "ESP | ON" or "ESP | OFF" B_1.TextColor3 = Color3.new(1, 1, 1) B_1.TextSize = 14 B_1.Font = Enum.Font.GothamBold B_1.Parent = F B_1.MouseButton1Click:Connect(function() e = not e B_1.Text = e and "ESP | ON" or "ESP | OFF" B_1.BackgroundColor3 = e and T_C or E_C end) local F_2 = Instance.new("Frame") F_2.Size = S F_2.Position = UDim2.new(0, 12, 0, 12 + S.Y.Offset + 8) F_2.BackgroundColor3 = G_C F_2.BorderSizePixel = 0 F_2.Parent = g local S_2 = Instance.new("UIStroke", F_2) S_2.Color = S_C S_2.Thickness = 1.5 local B_2 = Instance.new("TextButton") B_2.Size = UDim2.new(1, 0, 1, 0) B_2.Position = UDim2.new(0, 0, 0, 0) B_2.BackgroundColor3 = b and B_C or Color3.fromRGB(70, 70, 70) B_2.Text = b and "BEAM | ON" or "BEAM | OFF" B_2.TextColor3 = Color3.new(1, 1, 1) B_2.TextSize = 14 B_2.Font = Enum.Font.GothamBold B_2.Parent = F_2 B_2.MouseButton1Click:Connect(function() b = not b B_2.Text = b and "BEAM | ON" or "BEAM | OFF" B_2.BackgroundColor3 = b and B_C or Color3.fromRGB(70, 70, 70) end) local function i(p) if not L or not L.Team then return true end if p == L then return false end return L.Team ~= p.Team end local function G(p) if not L.Character then return E_C end return i(p) and E_C or T_C end local function a(p, char) if p == L or o[p] then return end local c_i = G(p) local d_c, f_b = {}, {} for i=1, 8 do d_c[i] = Drawing.new("Line") d_c[i].Thickness = 3 d_c[i].Color = c_i d_c[i].Transparency = 1 end for i=1, 4 do f_b[i] = Drawing.new("Line") f_b[i].Thickness = 1.5 f_b[i].Color = c_i f_b[i].Transparency = 1 end local beam = Drawing.new("Line") beam.Thickness = 3 beam.Color = B_C beam.Transparency = 1 local n_t = Drawing.new("Text") n_t.Size = 14 n_t.Center = true n_t.Outline = true n_t.Color = W_C n_t.Font = 2 local s_t = Drawing.new("Text") s_t.Size = 12 s_t.Center = true s_t.Outline = true s_t.Color = W_C s_t.Font = 2 local h_o = Drawing.new("Line") h_o.Thickness = 2 h_o.Color = Color3.fromRGB(255, 255, 255) h_o.Transparency = 1 local h_f = Drawing.new("Line") h_f.Thickness = 2 h_f.Color = Color3.fromRGB(0, 255, 0) h_f.Transparency = 1 o[p] = { corners = d_c, fullBox = f_b, beam = beam, nameText = n_t, statusText = s_t, healthBarOutline = h_o, healthBarFill = h_f } end local function r(p) if o[p] then for _, v in pairs(o[p].corners or {}) do if v and v.Remove then v:Remove() end end for _, v in pairs(o[p].fullBox or {}) do if v and v.Remove then v:Remove() end end if o[p].beam and o[p].beam.Remove then o[p].beam:Remove() end if o[p].nameText and o[p].nameText.Remove then o[p].nameText:Remove() end if o[p].statusText and o[p].statusText.Remove then o[p].statusText:Remove() end if o[p].healthBarOutline and o[p].healthBarOutline.Remove then o[p].healthBarOutline:Remove() end if o[p].healthBarFill and o[p].healthBarFill.Remove then o[p].healthBarFill:Remove() end o[p] = nil end end local function cl() for p, _ in pairs(o) do if not P:FindFirstChild(p.Name) then r(p) end end end local d = R.RenderStepped:Connect(function() local lc = L.Character local lr = lc and lc:FindFirstChild("HumanoidRootPart") local x = C.ViewportSize.X local y = C.ViewportSize.Y local h = Vector2.new(x / 2, 0) for p, v in pairs(o) do local char = p.Character local rt = char and char:FindFirstChild("HumanoidRootPart") local hd = char and char:FindFirstChild("Head") local hum = char and char:FindFirstChild("Humanoid") local is_e = i(p) local c_b = is_e and E_C or T_C local t_c = W_C if b and rt and lr then local rp, on = C:WorldToViewportPoint(rt.Position) v.beam.Visible = on if on then v.beam.To = Vector2.new(rp.X, rp.Y) v.beam.From = h v.beam.Color = B_C end else v.beam.Visible = false end if not e then for _, line in pairs(v.corners or {}) do line.Visible = false end for _, line in pairs(v.fullBox or {}) do line.Visible = false end if v.nameText then v.nameText.Visible = false end if v.statusText then v.statusText.Visible = false end if v.healthBarOutline then v.healthBarOutline.Visible = false end if v.healthBarFill then v.healthBarFill.Visible = false end continue end if not char or not rt or not hd or not hum or hum.Health <= 0 then for _, line in pairs(v.corners or {}) do line.Visible = false end for _, line in pairs(v.fullBox or {}) do line.Visible = false end if v.nameText then v.nameText.Visible = false end if v.statusText then v.statusText.Visible = false end if v.healthBarOutline then v.healthBarOutline.Visible = false end if v.healthBarFill then v.healthBarFill.Visible = false end continue end local rp, on = C:WorldToViewportPoint(rt.Position) local ho = 0.5 local lpo = 3.5 local hp = C:WorldToViewportPoint(hd.Position + Vector3.new(0, ho, 0)) local lp = C:WorldToViewportPoint(rt.Position - Vector3.new(0, lpo, 0)) if on then for _, line in pairs(v.corners) do line.Color = c_b end for _, line in pairs(v.fullBox) do line.Color = c_b end v.nameText.Color = t_c v.statusText.Color = t_c local dist = math.floor((lr.Position - rt.Position).Magnitude) local health = math.floor(hum.Health) local max = hum.MaxHealth v.nameText.Text = p.DisplayName v.nameText.Position = Vector2.new(rp.X, hp.Y - 15) v.nameText.Visible = true local H = math.abs(hp.Y - lp.Y) local W = H * 0.65 local c_l = math.min(W, H) * 0.2 local tl = Vector2.new(rp.X - W / 2, hp.Y) local tr = Vector2.new(rp.X + W / 2, hp.Y) local bl = Vector2.new(rp.X - W / 2, hp.Y + H) local br = Vector2.new(rp.X + W / 2, hp.Y + H) v.fullBox[1].From = tl v.fullBox[1].To = tr v.fullBox[2].From = tr v.fullBox[2].To = br v.fullBox[3].From = br v.fullBox[3].To = bl v.fullBox[4].From = bl v.fullBox[4].To = tl for _, line in pairs(v.fullBox) do line.Visible = true end v.corners[1].From = tl v.corners[1].To = Vector2.new(tl.X + c_l, tl.Y) v.corners[2].From = tl v.corners[2].To = Vector2.new(tl.X, tl.Y + c_l) v.corners[3].From = tr v.corners[3].To = Vector2.new(tr.X - c_l, tr.Y) v.corners[4].From = tr v.corners[4].To = Vector2.new(tr.X, tr.Y + c_l) v.corners[5].From = bl v.corners[5].To = Vector2.new(bl.X + c_l, bl.Y) v.corners[6].From = bl v.corners[6].To = Vector2.new(bl.X, bl.Y - c_l) v.corners[7].From = br v.corners[7].To = Vector2.new(br.X - c_l, br.Y) v.corners[8].From = br v.corners[8].To = Vector2.new(br.X, br.Y - c_l) for _, line in pairs(v.corners) do line.Visible = true end local hb_y = bl.Y + 4 local hb_w = W local hb_e = bl.X + hb_w v.healthBarOutline.From = Vector2.new(bl.X, hb_y) v.healthBarOutline.To = Vector2.new(hb_e, hb_y) v.healthBarOutline.Visible = true local hf_e = bl.X + (hb_w * (health / max)) v.healthBarFill.From = Vector2.new(bl.X, hb_y) v.healthBarFill.To = Vector2.new(hf_e, hb_y) v.healthBarFill.Color = Color3.new(1 - (health / max), health / max, 0) v.healthBarFill.Visible = true v.statusText.Text = "[" .. health .. "/" .. dist .. "m]" v.statusText.Position = Vector2.new(rp.X, hb_y + 12) v.statusText.Visible = true else for _, line in pairs(v.corners or {}) do line.Visible = false end for _, line in pairs(v.fullBox or {}) do line.Visible = false end if v.nameText then v.nameText.Visible = false end if v.statusText then v.statusText.Visible = false end if v.healthBarOutline then v.healthBarOutline.Visible = false end if v.healthBarFill then v.healthBarFill.Visible = false end end end end) R.Heartbeat:Connect(cl) local function ap(p) if p == L or o[p] then return end local function hh(char) if char:FindFirstChild("Humanoid") and not o[p] then a(p, char) end end local ca_c = p.CharacterAdded:Connect(hh) c[p] = ca_c if p.Character then hh(p.Character) end end local function rp(p) r(p) if c[p] and c[p].Disconnect then c[p]:Disconnect() c[p] = nil end end local function loop_a() for _, p in pairs(P:GetPlayers()) do if p ~= L and not o[p] then ap(p) end end end local function loop_p() while task.wait(1) do loop_a() end end task.spawn(loop_p) P.PlayerAdded:Connect(ap) P.PlayerRemoving:Connect(rp) for _, p in pairs(P:GetPlayers()) do if p ~= L then ap(p) end end g.Destroying:Connect(function() if d then d:Disconnect() end for p in pairs(o) do r(p) end for p, con in pairs(c) do if con and con.Disconnect then con:Disconnect() end end end)