Run it
Copy the script and paste it into your executor.
local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local VirtualUser = cloneref and cloneref(game:GetService("VirtualUser")) or game:GetService("VirtualUser")
local LocalPlayer = Players.LocalPlayer
local antiAfkEnabled = false
local antiAfkConn
local function toggleAntiAfk()
antiAfkEnabled = not antiAfkEnabled
if antiAfkEnabled then
print("[Anti-AFK] Enabled ✅")
-- Disconnect existing AFK connections
local GC = getconnections or get_signal_cons
if GC then
for _, v in pairs(GC(LocalPlayer.Idled))
v.Disable v:() v.Disconnect v:()
antiAfkConn = LocalPlayer.Idled:(()
VirtualUser:()
VirtualUser:(.())
)
()
antiAfkConn
antiAfkConn:()
antiAfkConn =
UserInputService.InputBegan:((input, gameProcessed)
gameProcessed
input.KeyCode == .KeyCode.X
()
)
AntiAfk (made by chatgpt) Universal Press X to active
Stay safe
Never paste your .ROBLOSECURITY cookie anywhere, and use an alt account with scripts.