Universal Script 📌
1.2k Views
3.7k Executions

Anti afk

Universal Script 📌
ZeroVzDev
ZeroVzDevPublished 10
7 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

Anti afk script ---open source----

View Raw
local Players = game:GetService("Players")
local VirtualUser = game:GetService("VirtualUser")
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")

local LocalPlayer = Players.LocalPlayer
local cooldown = 0
local interval = 55
local enabled = true
local totalPings = 0
local sessionTime = 0

-- Bypass Roblox idle detection
LocalPlayer.Idled:Connect(function()
    VirtualUser:Button2Down(Vector2.new(0, 0), workspace.CurrentCamera.CFrame)
    task.wait(0.1)
    VirtualUser:Button2Up(Vector2.new(0, 0), workspace.CurrentCamera.CFrame)
end)

RunService.Heartbeat:Connect(function(dt)
    if not enabled then return end

    cooldown -= dt
    sessionTime += dt

    if cooldown <= 0 then
        cooldown = interval

        -- Method 1: VirtualUser click
        pcall(function()
            VirtualUser:Button2Down(Vector2.new(0, 0), workspace.CurrentCamera.CFrame)
            task.wait(0.1)
            VirtualUser:Button2Up(Vector2.new(0, 0), workspace.CurrentCamera.CFrame)
        end)

        -- Method 2: Camera CFrame nudge
        pcall(function()
            local cam = workspace.CurrentCamera
            local cf = cam.CFrame
            cam.CFrame = cf * CFrame.Angles(0, 0.0001, 0)


Comments

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

Tags

More universal scripts

See all
Universal Script 📌
27
0
Approved 1 hour ago
Key System
Script hub
3.0M
1.1M
Bumped 6 hours ago
Key System

Script hub

#6 today

CanHub V2 200 GAMES KEYLESS

Script hub
259
104
1 day ago
Script hub
277.6k
165.7k
Bumped 6 hours ago
Key System
Universal Script 📌
6.7k
17.1k
Bumped 7 hours ago
Script hub
1.7M
432.5k
Bumped 8 hours ago
Key System

Script hub

#7 today

Verified script badgeAxonic Hub | 50+ Games Supported