local Players = game:GetService("Players") local TextChatService = game:GetService("TextChatService") _G.DeathStats = _G.DeathStats or { TotalDeaths = 0, LastReportedTotal = 0, StartTime = os.time(), PlayerLog = {}, SpawnTimes = {} -- Tracks how long people live } local function broadcast(msg, color) local hex = color:ToHex() local formatted = string.format("%s", hex, msg) local channel = TextChatService:FindFirstChild("RBXSystem", true) if channel then channel:DisplaySystemMessage(formatted) else game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage", { Text = msg, Color = color, Font = Enum.Font.RobotoMono }) end end local function showStats() local stats = _G.DeathStats if stats.TotalDeaths == stats.LastReportedTotal then return end -- Skip if no deaths local uptime = math.max(1, (os.time() - stats.StartTime)) local dpm = string.format("%.2f", (stats.TotalDeaths / uptime) * 60) -- Logic for Leader/Survivor local victim, survivor = "None", "None" local maxD, minD = -1, 999999 for name, count in pairs(stats.PlayerLog) do if count > maxD then maxD = count; victim = name end if count < minD then minD = count; survivor = name end end local heat = "LOW" if tonumber(dpm) > 5 then heat = "🔥 HIGH" elseif tonumber(dpm) > 2 then heat = "⚠️ MED" end local report = "[ 📊 30s SESSION REPORT ]\n" report ..= "━━━━━━━━━━━━━━━━━━━━━\n" report ..= string.format("💀 Total Deaths: %d\n", stats.TotalDeaths) report ..= string.format("🌡️ Server Heat: %s (%s DPM)\n", heat, dpm) report ..= string.format("🚩 Most Eliminated: %s (%d)\n", victim, maxD) report ..= string.format("🛡️ Top Survivor: %s (%d)\n", survivor, minD) report ..= string.format("⏱️ Uptime: %d min\n", math.floor(uptime/60)) report ..= "━━━━━━━━━━━━━━━━━━━━━" broadcast(report, Color3.fromRGB(255, 200, 0)) stats.LastReportedTotal = stats.TotalDeaths end local function trackPlayer(player) _G.DeathStats.PlayerLog[player.Name] = _G.DeathStats.PlayerLog[player.Name] or 0 player.CharacterAdded:Connect(function(char) local hum = char:WaitForChild("Humanoid") hum.Died:Connect(function() _G.DeathStats.TotalDeaths += 1 _G.DeathStats.PlayerLog[player.Name] += 1 broadcast("[!] " .. player.Name .. " neutralized.", Color3.fromRGB(255, 75, 75)) end) end) end for _, p in pairs(Players:GetPlayers()) do trackPlayer(p) end Players.PlayerAdded:Connect(trackPlayer) task.spawn(function() while true do task.wait(30) showStats() end end)