---
title: "Anti afk by ZeroVzDev | Universal Roblox Script - ScriptBlox"
description: "Anti afk for any Roblox game: Anti afk script ---open source----"
canonical_url: "https://scriptblox.com/script/Universal-Script-Anti-afk-249154"
meta:
  "og:description": "Anti afk for any Roblox game: Anti afk script ---open source----"
  "og:image": "https://scriptblox.com/images/script/0-1775982702264.jpg"
  "og:title": "Anti afk by ZeroVzDev | Universal Roblox Script - ScriptBlox"
  "twitter:description": "Anti afk for any Roblox game: Anti afk script ---open source----"
  "twitter:image": "https://scriptblox.com/images/script/0-1775982702264.jpg"
  "twitter:title": "Anti afk by ZeroVzDev | Universal Roblox Script - ScriptBlox"
---

> Index of every page on this site: [llms.txt](https://scriptblox.com/llms.txt)

![Universal Script 📌](https://scriptblox.com/images/script/0-1775982702264.jpg)

# **Anti afk**

[**Universal Script 📌**](https://scriptblox.com/game/universal)**![ZeroVzDev](https://scriptblox.com/images/photo/698fe27f72bc47e288e2688a-1775982874293.jpg) [ZeroVzDev](https://scriptblox.com/u/ZeroVzDev)Published 10**

8 months ago

[**Get an executor**](https://scriptblox.com/executors?kind=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](https://scriptblox.com/raw/Universal-Script-Anti-afk-249154)

```
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 **](https://scriptblox.com/login?redirect=/script/Universal-Script-Anti-afk-249154)

No comments yet. Be the first!

```json
{"@context":"https://schema.org","@type":"SoftwareSourceCode","@id":"https://scriptblox.com/script/Universal-Script-Anti-afk-249154#script","url":"https://scriptblox.com/script/Universal-Script-Anti-afk-249154","name":"Anti afk","programmingLanguage":"Lua","runtimePlatform":"Roblox","author":{"@type":"Person","name":"ZeroVzDev","url":"https://scriptblox.com/u/ZeroVzDev"},"datePublished":"2026-04-12T08:31:42.286Z","image":"https://scriptblox.com/images/script/0-1775982702264.jpg","isAccessibleForFree":true}
```

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://scriptblox.com/#website","@type":"WebSite","description":"Search free Roblox scripts uploaded by the community, with live status for every major executor. Browse by game, copy the loadstring and run it in your executor.","inLanguage":"en","name":"ScriptBlox","url":"https://scriptblox.com/"},{"@id":"https://scriptblox.com/script/Universal-Script-Anti-afk-249154#webpage","@type":"WebPage","description":"Anti afk for any Roblox game: Anti afk script ---open source----","name":"Anti afk by ZeroVzDev | Universal Roblox Script - ScriptBlox","url":"https://scriptblox.com/script/Universal-Script-Anti-afk-249154","breadcrumb":{"@id":"https://scriptblox.com/script/Universal-Script-Anti-afk-249154#breadcrumb"},"isPartOf":{"@id":"https://scriptblox.com/#website"},"mainEntity":{"@id":"https://scriptblox.com/script/Universal-Script-Anti-afk-249154#script"},"potentialAction":[{"@type":"ReadAction","target":["https://scriptblox.com/script/Universal-Script-Anti-afk-249154"]}]},{"@id":"https://scriptblox.com/script/Universal-Script-Anti-afk-249154#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Home","item":"https://scriptblox.com","position":1},{"@type":"ListItem","name":"Universal","item":"https://scriptblox.com/game/universal","position":2},{"@type":"ListItem","name":"Anti afk","position":3}]}]}
```

## Sitemap

See the full [sitemap](https://scriptblox.com/sitemap.md) for all pages.
