Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Lag Detection Notification Script
- -- Works for most Roblox executors
- local StarterGui = game:GetService("StarterGui")
- local RunService = game:GetService("RunService")
- -- Function to send a clean notification
- local function ShowNotification(title, message, duration)
- StarterGui:SetCore("SendNotification", {
- Title = title, -- Notification title
- Text = message, -- Notification message
- Duration = duration or 5 -- Duration in seconds
- })
- end
- -- Initial Notification: Start Monitoring
- ShowNotification("Result", "Monitoring Lag Status...", 5)
- -- Lag Detection Variables
- local lastFrameTime = tick()
- local crashThreshold = 2 -- Time in seconds for "YOU ARE ABOUT TO CRASH"
- local nearCrashThreshold = 3 -- Time in seconds for "NEAR OF CRASH"
- RunService.RenderStepped:Connect(function()
- local currentFrameTime = tick()
- local delta = currentFrameTime - lastFrameTime
- lastFrameTime = currentFrameTime
- -- Conditions for Lag States
- if delta < 0.5 then
- -- No Lag
- ShowNotification("Result", "There No Lag This Time", 3)
- elseif delta >= 0.5 and delta < crashThreshold then
- -- Lag Detected
- ShowNotification("Result", "Warning You Are Lagging⚠️", 4)
- elseif delta >= crashThreshold and delta < nearCrashThreshold then
- -- Extreme Lag Detected
- ShowNotification("RESULT☢️", "YOU ARE ABOUT TO CRASH☢️☢️☢️", 5)
- elseif delta >= nearCrashThreshold then
- -- Near Crash Detected
- ShowNotification("☣️", "NEAR OF CRASH☢️☣️", 6)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement