AntiAfk
Key Required

AntiAfk

cool hangoutbytedbyted 4.5K views 171 executesUpdated Oct 19, 2025
5.0/ 5(3 votes)
30100% Positive
Lua Script•44 lines (1160 chars)
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)) do
				if v.Disable then v:Disable() elseif v.Disconnect then v:Disconnect() end
			end
		end

		-- Connect new anti-AFK function
		antiAfkConn = LocalPlayer.Idled:Connect(function()
			VirtualUser:CaptureController()
			VirtualUser:ClickButton2(Vector2.new())
		end)
	else
		print("[Anti-AFK] Disabled ❌")
		
		if antiAfkConn then
			antiAfkConn:Disconnect()
			antiAfkConn = nil
		end
	end
end

-- Press X to toggle
UserInputService.InputBegan:Connect(function(input, gameProcessed)
	if gameProcessed then return end
	if input.KeyCode == Enum.KeyCode.X then
		toggleAntiAfk()
	end
end)

Features & Information

AntiAfk (made by chatgpt) Universal Press X to active
#antiafk#follower#bot

Community Comments (4)

SyrexGenesisSyrexGenesisOct 19, 2025

Thanks

Replying to @SyrexGenesis
bytedbytedOct 19, 2025

@SyrexGenesis Np

SyrexGenesisSyrexGenesisOct 19, 2025

Oh and btw does this in every game right? And does it works on mobile or no?

SyrexGenesisSyrexGenesisOct 19, 2025

@thirst alr