Universal Script 📌
329 Views
8.5k Executions

Perfect AntiAFK

Universal Script 📌
neutral
neutral
Verified Badge
Verified User
100 followers
5 months ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

This anti-AFK script was made because most other anti-AFK scripts are unnecessarily complicated, with UIs and extra features that are not needed. This one is built to be simple, lightweight, and reliable. Just put it in auto-execute and it will handle the rest. It includes checks to make sure Roblox, Players, and LocalPlayer are loaded before running, which prevents errors caused by the client still starting up.

View Raw
repeat task.wait() until game:IsLoaded()

local Players = game:GetService("Players")
local VirtualUser = game:GetService("VirtualUser")

local Player = Players.LocalPlayer
while not Player do
	Players:GetPropertyChangedSignal("LocalPlayer"):Wait()
	Player = Players.LocalPlayer
end

if getconnections then
	for _, connection in pairs(getconnections(Player.Idled)) do
		pcall(function()
			if connection["Disable"] then
				connection["Disable"](connection)
			elseif connection["Disconnect"] then
				connection["Disconnect"](connection)
			end
		end)
	end
else
	Player.Idled:Connect(function()
		VirtualUser:CaptureController()
		VirtualUser:ClickButton2(Vector2.new())
	end)
end


Comments

0
Log in to join the conversation. Login
No comments yet. Be the first!

More universal scripts

See all
Universal Script 📌
57.3k
270.0k
Bumped 49 minutes ago
Key System
Script hub
2.2M
2.5M
Bumped 4 hours ago
Key System
Script hub
4.0M
2.7M
Bumped 4 hours ago

Script hub

Hall of Fame #5

KeylessVerified script badge[KEYLESS] Moondiety Script | 30+ supported Games

Script hub
565
2.6k
Bumped 6 hours ago
Script hub
7.8k
70.5k
Bumped 6 hours ago