-- FPS Aimbot | ESP (names, health, tracer lines) + credit notification -- LocalScript -> StarterPlayer > StarterPlayerScripts local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local TweenService = game:GetService("TweenService") local player = Players.LocalPlayer local camera = workspace.CurrentCamera ---------------------------------------------------------------- -- SETTINGS ---------------------------------------------------------------- local TOGGLE_KEY = Enum.KeyCode.Z local TEAM_CHECK = false -- true = hide teammates local SHOW_HIGHLIGHT = true local SHOW_NAME_HEALTH = true local SHOW_TRACERS = true local TRACER_THICKNESS = 2 local MAX_DISTANCE = 2000 -- studs local NOTIFICATION_TIME = 5 -- seconds the credit popup stays visible ---------------------------------------------------------------- -- UI ROOT ---------------------------------------------------------------- local gui = Instance.new("ScreenGui") gui.Name = "ESPGui" gui.ResetOnSpawn = false gui.IgnoreGuiInset = true gui.DisplayOrder = 10 gui.Parent = player:WaitForChild("PlayerGui") local enabled = true local tracked = {} -- [Player] = {highlight, billboard, line, ...} ---------------------------------------------------------------- -- HELPERS ---------------------------------------------------------------- local function healthColor(pct) return Color3.fromHSV(math.clamp(pct, 0, 1) * 0.33, 1, 1) -- red -> green end local function cleanup(plr) local data = tracked[plr] if not data then return end for _, obj in pairs(data) do if typeof(obj) == "Instance" then obj:Destroy() end end tracked[plr] = nil end local function build(plr, char) cleanup(plr) local hum = char:WaitForChild("Humanoid", 5) local head = char:WaitForChild("Head", 5) local root = char:WaitForChild("HumanoidRootPart", 5) if not (hum and head and root) then return end -- Outline / wallhack local hl = Instance.new("Highlight") hl.FillTransparency = 0.6 hl.OutlineTransparency = 0 hl.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop hl.Adornee = char hl.Parent = gui -- Name + health billboard local bb = Instance.new("BillboardGui") bb.Size = UDim2.fromOffset(140, 44) bb.StudsOffset = Vector3.new(0, 2.6, 0) bb.AlwaysOnTop = true bb.Adornee = head bb.Parent = gui local nameLabel = Instance.new("TextLabel") nameLabel.BackgroundTransparency = 1 nameLabel.Size = UDim2.new(1, 0, 0, 18) nameLabel.Font = Enum.Font.GothamBold nameLabel.TextSize = 14 nameLabel.TextColor3 = Color3.new(1, 1, 1) nameLabel.TextStrokeTransparency = 0.3 nameLabel.Text = plr.DisplayName nameLabel.Parent = bb local barBack = Instance.new("Frame") barBack.Position = UDim2.new(0.1, 0, 0, 22) barBack.Size = UDim2.new(0.8, 0, 0, 8) barBack.BackgroundColor3 = Color3.fromRGB(25, 25, 25) barBack.BorderSizePixel = 0 barBack.Parent = bb local barFill = Instance.new("Frame") barFill.Size = UDim2.fromScale(1, 1) barFill.BorderSizePixel = 0 barFill.Parent = barBack local hpLabel = Instance.new("TextLabel") hpLabel.BackgroundTransparency = 1 hpLabel.Position = UDim2.new(0, 0, 0, 30) hpLabel.Size = UDim2.new(1, 0, 0, 14) hpLabel.Font = Enum.Font.GothamMedium hpLabel.TextSize = 12 hpLabel.TextColor3 = Color3.new(1, 1, 1) hpLabel.TextStrokeTransparency = 0.4 hpLabel.Parent = bb -- Tracer line local line = Instance.new("Frame") line.AnchorPoint = Vector2.new(0.5, 0.5) line.BorderSizePixel = 0 line.Visible = false line.Parent = gui tracked[plr] = { highlight = hl, billboard = bb, line = line, barFill = barFill, hpLabel = hpLabel, hum = hum, root = root, char = char, } end local function track(plr) if plr == player then return end plr.CharacterAdded:Connect(function(char) build(plr, char) end) plr.CharacterRemoving:Connect(function() cleanup(plr) end) if plr.Character then task.spawn(build, plr, plr.Character) end end ---------------------------------------------------------------- -- SETUP ---------------------------------------------------------------- for _, plr in ipairs(Players:GetPlayers()) do track(plr) end Players.PlayerAdded:Connect(track) Players.PlayerRemoving:Connect(cleanup) UserInputService.InputBegan:Connect(function(input, processed) if processed then return end if input.KeyCode == TOGGLE_KEY then enabled = not enabled end end) ---------------------------------------------------------------- -- UPDATE LOOP ---------------------------------------------------------------- RunService.RenderStepped:Connect(function() camera = workspace.CurrentCamera if not camera then return end local vp = camera.ViewportSize local origin = Vector2.new(vp.X / 2, vp.Y) local myChar = player.Character local myRoot = myChar and myChar:FindFirstChild("HumanoidRootPart") for plr, d in pairs(tracked) do local visible = enabled and d.hum.Parent ~= nil and d.hum.Health > 0 and d.root.Parent ~= nil if visible and TEAM_CHECK and plr.Team ~= nil and plr.Team == player.Team then visible = false end if visible and myRoot and (d.root.Position - myRoot.Position).Magnitude > MAX_DISTANCE then visible = false end if not visible then d.highlight.Enabled = false d.billboard.Enabled = false d.line.Visible = false continue end local pct = d.hum.Health / math.max(d.hum.MaxHealth, 1) local color = healthColor(pct) -- Outline d.highlight.Enabled = SHOW_HIGHLIGHT d.highlight.FillColor = color d.highlight.OutlineColor = color -- Name + health d.billboard.Enabled = SHOW_NAME_HEALTH d.barFill.Size = UDim2.fromScale(math.clamp(pct, 0, 1), 1) d.barFill.BackgroundColor3 = color d.hpLabel.Text = math.floor(d.hum.Health + 0.5) .. " HP" -- Tracer if SHOW_TRACERS then local pos = camera:WorldToViewportPoint(d.root.Position) local p = Vector2.new(pos.X, pos.Y) -- target is behind the camera: flip so the line points the right way if pos.Z < 0 then p = Vector2.new(vp.X, vp.Y * 2) - p p = Vector2.new(p.X, vp.Y) -- keep it pinned to the bottom edge end p = Vector2.new( math.clamp(p.X, 0, vp.X), math.clamp(p.Y, 0, vp.Y) ) local delta = p - origin local length = delta.Magnitude d.line.Visible = length > 1 d.line.Size = UDim2.fromOffset(length, TRACER_THICKNESS) d.line.Position = UDim2.fromOffset((origin.X + p.X) / 2, (origin.Y + p.Y) / 2) d.line.Rotation = math.deg(math.atan2(delta.Y, delta.X)) d.line.BackgroundColor3 = color else d.line.Visible = false end end end) ---------------------------------------------------------------- -- CREDIT NOTIFICATION (shows for NOTIFICATION_TIME, then disappears) ---------------------------------------------------------------- task.spawn(function() local notif = Instance.new("Frame") notif.Name = "CreditNotification" notif.AnchorPoint = Vector2.new(0.5, 0) notif.Size = UDim2.fromOffset(300, 50) notif.Position = UDim2.new(0.5, 0, 0, -70) -- starts off-screen notif.BackgroundColor3 = Color3.fromRGB(20, 20, 25) notif.BackgroundTransparency = 0.15 notif.BorderSizePixel = 0 notif.Parent = gui local corner = Instance.new("UICorner") corner.CornerRadius = UDim.new(0, 10) corner.Parent = notif local stroke = Instance.new("UIStroke") stroke.Color = Color3.fromRGB(0, 200, 120) stroke.Thickness = 2 stroke.Parent = notif local text = Instance.new("TextLabel") text.BackgroundTransparency = 1 text.Size = UDim2.fromScale(1, 1) text.Font = Enum.Font.GothamBold text.TextSize = 18 text.TextColor3 = Color3.new(1, 1, 1) text.Text = "Made by Macw1u!(ScriptBlox)" text.Parent = notif -- slide in TweenService:Create( notif, TweenInfo.new(0.5, Enum.EasingStyle.Back, Enum.EasingDirection.Out), { Position = UDim2.new(0.5, 0, 0, 20) } ):Play() task.wait(NOTIFICATION_TIME) -- fade out local fadeInfo = TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.In) TweenService:Create(notif, fadeInfo, { BackgroundTransparency = 1 }):Play() TweenService:Create(text, fadeInfo, { TextTransparency = 1 }):Play() local fadeOut = TweenService:Create(stroke, fadeInfo, { Transparency = 1 }) fadeOut:Play() fadeOut.Completed:Wait() notif:Destroy() end)