Universal Script 📌
300 Views
6.5k Executions

Perfect AntiAFK

Universal Script 📌
neutral
neutral100 followers
4 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
Script hub
176.1k
1.6M
Bumped 9 hours ago
Key System
Script hub
19.1k
3.7k
Bumped 9 hours ago
Key System
Paid
Script hub
22.5k
145.1k
Bumped 9 hours ago
Universal Script 📌
8.8k
29.1k
Bumped 13 hours ago
Universal Script 📌
13.2k
4.5k
Bumped 14 hours ago