rblxscripts.net
search
/
homeHomelocal_fire_departmentScriptssports_esportsGameslibrary_booksHubsbuildExecutors & Tools
TermsPrivacyDiscordAPI
© 2026 rblxscripts.net
ANTI-AFK V2 | a script that prevents Roblox from kicking you after 20 minutes
code
Open Source
smartphone
Mobile Friendly
Universal

ANTI-AFK V2 | a script that prevents Roblox from kicking you after 20 minutes

by
Publisher5
visibility209 viewsscheduleCreated 3 months ago
3
Swipe to scroll
local Players = game:GetService("Players")
local VirtualUser = game:GetService("VirtualUser")
local TweenService = game:GetService("TweenService")

local player = Players.LocalPlayer

local TITLE_TEXT = "AFK Protection Activated"
local SUBTITLE_TEXT = "You can now safely AFK. You won't be kicked for being idle."

local GUI_WIDTH = 320
local GUI_HEIGHT = 95
local DISPLAY_TIME = 5
local SLIDE_TIME = 0.5

player.Idled:Connect(function()
	VirtualUser:CaptureController()
	VirtualUser:ClickButton2(Vector2.new())
end)

local gui = Instance.new("ScreenGui")
gui.Name = "AFKProtectionNotification"
gui.ResetOnSpawn = false
gui.Parent = player:WaitForChild("PlayerGui")

local frame = Instance.new("Frame")
frame.Size = UDim2.fromOffset(GUI_WIDTH, GUI_HEIGHT)
frame.Position = UDim2.new(0.5, -GUI_WIDTH / 2, 1, 20)
frame.BackgroundColor3 = Color3.fromRGB(30, 30, 35)
frame.BorderSizePixel = 0
frame.Parent = gui

This script prevents Roblox from kicking the player after being idle for 20 minutes.

This script could be used to farm money, coins, xp and many more items. When the script is executed a popup will show up on the bottom of your screen notifying you that it has been enabled.

If you notice any issues please comment the issue so we can fix it in the future.

Comments 1

Publisher5
Publisher5
Uploader12/08/2026, 10:44
i went afk for 4 hours and it worked perfectly :)

Popular scripts

rblxscripts.net
Infinite Yield Script | Roblox Admin Commands FE Gui - Universal
code
Open Source
18.4K33
7mo ago
Universal

Infinite Yield Script | Roblox Admin Commands FE Gui

by
bugxie
Admin
Admin
Verified User
Verified User
3030
rblxscripts.net
C00lkid Gui V2 | OP C00lkid Script - Universal
code
Open Source
smartphone
Mobile Friendly
6.1K27
3mo ago
Universal

C00lkid Gui V2 | OP C00lkid Script

by
PancakeReal
1212
rblxscripts.net
dropkick script FE roblox FLING SCRIPT - Universal
smartphone
Mobile Friendly
4.1K24
2mo ago
Universal

dropkick script FE roblox FLING SCRIPT

by
2017cuterfan
66
rblxscripts.net
Delfi Gifter - Robux Gamepass Gifter & Roblox Plus + ADMIN!! - Universal
code
Open Source
smartphone
Mobile Friendly
27K20
12d ago
Universal

Delfi Gifter - Robux Gamepass Gifter & Roblox Plus + ADMIN!!

by
bugxie
Admin
Admin
Verified User
Verified User
3030
rblxscripts.net
c00lkidd Gui V1 | OP c00lkid Script - Universal
code
Open Source
smartphone
Mobile Friendly
4.1K19
3mo ago
Universal

c00lkidd Gui V1 | OP c00lkid Script

by
PancakeReal
1212
rblxscripts.net
Roblox SimpleSpy V3 | View remotes, Functioninfo spy, Remote-to-Script for arguments! - Universal
code
Open Source
smartphone
Mobile Friendly
4.1K15
5mo ago
Universal

Roblox SimpleSpy V3 | View remotes, Functioninfo spy, Remote-to-Script for arguments!

by
bugxie
Admin
Admin
Verified User
Verified User
3030
rblxscripts.net
FE face changer (works on r15 games only) - Universal
smartphone
Mobile Friendly
28215
2mo ago
Universal

FE face changer (works on r15 games only)

by
2017cuterfan
66
rblxscripts.net
Developer Toolbox | Rspy, Dex, Hydroxide, And More | Advanced Dev Tools - Universal
code
Open Source
smartphone
Mobile Friendly
3.2K13
6mo ago
Universal

Developer Toolbox | Rspy, Dex, Hydroxide, And More | Advanced Dev Tools

by
law
Moderator
Moderator
Verified User
Verified User
1111
Browse all scripts