local player = game.Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local rootPart = character:WaitForChild("HumanoidRootPart") local UIS = game:GetService("UserInputService") local RS = game:GetService("RunService") -- GUI local screenGui = Instance.new("ScreenGui") screenGui.ResetOnSpawn = false screenGui.IgnoreGuiInset = true screenGui.Parent = player.PlayerGui -- Logo button local logoBtn = Instance.new("TextButton") logoBtn.Size = UDim2.new(0, 45, 0, 45) logoBtn.Position = UDim2.new(0, 20, 0.3, -22) logoBtn.BackgroundColor3 = Color3.fromRGB(20, 20, 20) logoBtn.TextColor3 = Color3.fromRGB(100, 180, 255) logoBtn.Text = "🎯" logoBtn.Font = Enum.Font.GothamBold logoBtn.TextSize = 22 logoBtn.BorderSizePixel = 0 logoBtn.Parent = screenGui Instance.new("UICorner", logoBtn).CornerRadius = UDim.new(0, 12) local logoStroke = Instance.new("UIStroke") logoStroke.Color = Color3.fromRGB(60, 60, 60) logoStroke.Thickness = 1.5 logoStroke.Parent = logoBtn local logoDragging = false local logoDragStart, logoStartPos logoBtn.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1 then logoDragging = true logoDragStart = input.Position logoStartPos = logoBtn.Position end end) logoBtn.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1 then logoDragging = false end end) -- Main frame local frame = Instance.new("Frame") frame.Size = UDim2.new(0, 240, 0, 400) frame.Position = UDim2.new(0.5, -120, 0.5, -200) frame.BackgroundColor3 = Color3.fromRGB(20, 20, 20) frame.BackgroundTransparency = 0.2 frame.BorderSizePixel = 0 frame.Parent = screenGui Instance.new("UICorner", frame).CornerRadius = UDim.new(0, 16) local stroke = Instance.new("UIStroke") stroke.Color = Color3.fromRGB(60, 60, 60) stroke.Thickness = 1.5 stroke.Parent = frame -- Header local header = Instance.new("TextLabel") header.Size = UDim2.new(1, 0, 0, 30) header.Position = UDim2.new(0, 0, 0, 5) header.BackgroundTransparency = 1 header.TextColor3 = Color3.fromRGB(255, 255, 255) header.Text = "🎯 Player Tracker" header.Font = Enum.Font.GothamBold header.TextSize = 14 header.Parent = frame local divider = Instance.new("Frame") divider.Size = UDim2.new(0, 210, 0, 1) divider.Position = UDim2.new(0.5, -105, 0, 35) divider.BackgroundColor3 = Color3.fromRGB(60, 60, 60) divider.BorderSizePixel = 0 divider.Parent = frame -- Column headers local colHeader = Instance.new("TextLabel") colHeader.Size = UDim2.new(0, 210, 0, 20) colHeader.Position = UDim2.new(0.5, -105, 0, 40) colHeader.BackgroundTransparency = 1 colHeader.TextColor3 = Color3.fromRGB(100, 180, 255) colHeader.Text = "Player HP Dist" colHeader.Font = Enum.Font.GothamBold colHeader.TextSize = 11 colHeader.TextXAlignment = Enum.TextXAlignment.Left colHeader.Parent = frame local divider2 = Instance.new("Frame") divider2.Size = UDim2.new(0, 210, 0, 1) divider2.Position = UDim2.new(0.5, -105, 0, 60) divider2.BackgroundColor3 = Color3.fromRGB(60, 60, 60) divider2.BorderSizePixel = 0 divider2.Parent = frame -- Scroll frame local scrollFrame = Instance.new("ScrollingFrame") scrollFrame.Size = UDim2.new(0, 220, 0, 320) scrollFrame.Position = UDim2.new(0.5, -110, 0, 65) scrollFrame.BackgroundTransparency = 1 scrollFrame.BorderSizePixel = 0 scrollFrame.ScrollBarThickness = 4 scrollFrame.ScrollBarImageColor3 = Color3.fromRGB(100, 180, 255) scrollFrame.Parent = frame local listLayout = Instance.new("UIListLayout") listLayout.Padding = UDim.new(0, 4) listLayout.Parent = scrollFrame -- Open/close local guiOpen = true logoBtn.MouseButton1Click:Connect(function() guiOpen = not guiOpen frame.Visible = guiOpen end) -- Dragging local dragging = false local dragStart, startPos frame.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1 then dragging = true dragStart = input.Position startPos = frame.Position end end) frame.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseButton1 then dragging = false end end) UIS.InputChanged:Connect(function(input) if input.UserInputType == Enum.UserInputType.Touch or input.UserInputType == Enum.UserInputType.MouseMove then if logoDragging then local delta = input.Position - logoDragStart logoBtn.Position = UDim2.new( logoStartPos.X.Scale, logoStartPos.X.Offset + delta.X, logoStartPos.Y.Scale, logoStartPos.Y.Offset + delta.Y ) end if dragging then local delta = input.Position - dragStart frame.Position = UDim2.new( startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y ) end end end) -- Teleport function local function teleportTo(target) local targetChar = target.Character if targetChar then local targetRoot = targetChar:FindFirstChild("HumanoidRootPart") if targetRoot and rootPart then rootPart.CFrame = targetRoot.CFrame + Vector3.new(0, 3, 0) end end end -- Player rows cache local playerRows = {} local function getHealthColor(hp, maxHp) local pct = hp / math.max(maxHp, 1) if pct > 0.6 then return Color3.fromRGB(80, 220, 80) elseif pct > 0.3 then return Color3.fromRGB(255, 200, 0) else return Color3.fromRGB(255, 80, 80) end end local function updatePlayers() -- Remove rows for players who left for name, row in pairs(playerRows) do if not game.Players:FindFirstChild(name) then row:Destroy() playerRows[name] = nil end end for _, p in pairs(game.Players:GetPlayers()) do if p == player then continue end local char = p.Character local hum = char and char:FindFirstChildOfClass("Humanoid") local pRoot = char and char:FindFirstChild("HumanoidRootPart") local hp = hum and math.floor(hum.Health) or 0 local maxHp = hum and math.floor(hum.MaxHealth) or 100 local dist = pRoot and rootPart and math.floor((pRoot.Position - rootPart.Position).Magnitude) or 0 local alive = hum and hum.Health > 0 if not playerRows[p.Name] then -- Create row local row = Instance.new("Frame") row.Size = UDim2.new(0, 215, 0, 36) row.BackgroundColor3 = Color3.fromRGB(35, 35, 35) row.BorderSizePixel = 0 row.Parent = scrollFrame Instance.new("UICorner", row).CornerRadius = UDim.new(0, 8) local nameLabel = Instance.new("TextLabel") nameLabel.Size = UDim2.new(0, 90, 1, 0) nameLabel.Position = UDim2.new(0, 8, 0, 0) nameLabel.BackgroundTransparency = 1 nameLabel.TextColor3 = Color3.fromRGB(255, 255, 255) nameLabel.Text = p.Name nameLabel.Font = Enum.Font.GothamBold nameLabel.TextSize = 11 nameLabel.TextXAlignment = Enum.TextXAlignment.Left nameLabel.TextTruncate = Enum.TextTruncate.AtEnd nameLabel.Name = "NameLabel" nameLabel.Parent = row local hpLabel = Instance.new("TextLabel") hpLabel.Size = UDim2.new(0, 45, 1, 0) hpLabel.Position = UDim2.new(0, 100, 0, 0) hpLabel.BackgroundTransparency = 1 hpLabel.TextColor3 = Color3.fromRGB(80, 220, 80) hpLabel.Text = tostring(hp) hpLabel.Font = Enum.Font.GothamBold hpLabel.TextSize = 11 hpLabel.Name = "HpLabel" hpLabel.Parent = row local distLabel = Instance.new("TextLabel") distLabel.Size = UDim2.new(0, 40, 1, 0) distLabel.Position = UDim2.new(0, 145, 0, 0) distLabel.BackgroundTransparency = 1 distLabel.TextColor3 = Color3.fromRGB(180, 180, 180) distLabel.Text = tostring(dist) distLabel.Font = Enum.Font.GothamBold distLabel.TextSize = 11 distLabel.Name = "DistLabel" distLabel.Parent = row local tpBtn = Instance.new("TextButton") tpBtn.Size = UDim2.new(0, 28, 0, 24) tpBtn.Position = UDim2.new(0, 183, 0.5, -12) tpBtn.BackgroundColor3 = Color3.fromRGB(100, 180, 255) tpBtn.TextColor3 = Color3.new(1, 1, 1) tpBtn.Text = "TP" tpBtn.Font = Enum.Font.GothamBold tpBtn.TextSize = 11 tpBtn.BorderSizePixel = 0 tpBtn.Name = "TpBtn" tpBtn.Parent = row Instance.new("UICorner", tpBtn).CornerRadius = UDim.new(0, 6) tpBtn.MouseButton1Click:Connect(function() teleportTo(p) end) playerRows[p.Name] = row else -- Update existing row local row = playerRows[p.Name] local hpLabel = row:FindFirstChild("HpLabel") local distLabel = row:FindFirstChild("DistLabel") if hpLabel then hpLabel.Text = alive and tostring(hp) or "💀" hpLabel.TextColor3 = alive and getHealthColor(hp, maxHp) or Color3.fromRGB(255, 80, 80) end if distLabel then distLabel.Text = tostring(dist) end end end -- Update canvas size scrollFrame.CanvasSize = UDim2.new(0, 0, 0, listLayout.AbsoluteContentSize.Y + 8) end -- Respawn player.CharacterAdded:Connect(function(newChar) character = newChar rootPart = newChar:WaitForChild("HumanoidRootPart") end) -- Update loop RS.Heartbeat:Connect(function() if guiOpen then updatePlayers() end end)