-- Anti-AFK Script with Bypass Counter -- 1. Get necessary services local VirtualUser = game:GetService("VirtualUser") local Players = game:GetService("Players") local StarterGui = game:GetService("StarterGui") local LocalPlayer = Players.LocalPlayer -- 2. Initialize the bypass counter local bypassCount = 0 -- 3. Function to show the initial and triggered notifications local function SendBypassNotification(isInitial) local title = "Anti-AFK Active!" local text = "Script is running and ready to bypass the idle kick." local duration = 5 if not isInitial then -- This is the triggered notification title = "AFK Bypass Successful!" text = "Idle timer reset. Bypassed " .. bypassCount .. " time" .. (bypassCount ~= 1 and "s" or "") .. "." duration = 3 -- Shorter duration for continuous feedback end StarterGui:SetCore("SendNotification", { Title = title, Text = text, Duration = duration, Button1 = "OK" }) end -- 4. Display the initial activation notification SendBypassNotification(true) -- 5. Connect the anti-AFK logic to the Idled event LocalPlayer.Idled:Connect(function() -- Core Anti-AFK Logic: Simulate input VirtualUser:CaptureController() VirtualUser:ClickButton2(Vector2.new(0, 0)) -- Update the counter and display the triggered notification bypassCount = bypassCount + 1 SendBypassNotification(false) end) -- The script now provides both initial confirmation and a running bypass count.