Universal Script 📌
983 Views
348 Executions

Anti AFK

Universal Script 📌
8 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 i find is very useful for knockout to grind ranks to use it type "afk" in the chat and then it will show the ui thanks!

View Raw
--[[
    ANTI-AFK BYPASS WITH GUI
    - Type "afk" in chat to show/hide GUI
    - Draggable window
    - Toggle on/off
    - Stopwatch showing AFK duration
]]

local Players = game:GetService("Players")
local VirtualUser = game:GetService("VirtualUser")
local RunService = game:GetService("RunService")
local LocalPlayer = Players.LocalPlayer

-- ── CLEANUP OLD INSTANCE ─────────────────────
if _G.AFK_GUI then pcall(function() _G.AFK_GUI:Destroy() end) end
if _G.AFK_CONN then pcall(function() _G.AFK_CONN:Disconnect() end) end
if _G.AFK_LOOP then pcall(function() _G.AFK_LOOP:Disconnect() end) end
if _G.AFK_CHAT then pcall(function() _G.AFK_CHAT:Disconnect() end) end

-- ── STATE ────────────────────────────────────
local afkEnabled = false
local afkStartTime = 0
local guiVisible = false

-- ── CREATE GUI ───────────────────────────────
local ScreenGui = Instance.new("ScreenGui")
ScreenGui.Name = "AntiAFKGui"
ScreenGui.ResetOnSpawn = false
ScreenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
ScreenGui.Parent = LocalPlayer:WaitForChild("PlayerGui")
_G.AFK_GUI = ScreenGui

-- Main frame
local MainFrame = Instance.new("Frame")
MainFrame.Name = "MainFrame"
MainFrame.Size = UDim2.new(0, 200, 0, 140)
MainFrame.Position = UDim2.new(0.5, -100, 0.4, 0)
MainFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 35)
MainFrame.BorderSizePixel = 0
MainFrame.Visible = false


Comments

3
Log in to join the conversation. Login
Rho_'s profile picture
Rho_8 months ago

Seems to work fine!

1
TheKnockoutScripter's profile picture
TheKnockoutScripterUploader8 months ago

@Revontulet do u want ur own script if yes js comment what u want :)

1
Rho_'s profile picture
Rho_7 months ago

@TheKnockoutScripter Don't really have any games I need new scripts for, but if you could make a version of this that doesn't need you to type "afk" that'd be awesome, as some games either restrict chat or simply don't have chat, or if you don't want to type into chat for whatever reason.

1

More universal scripts

See all
Script hub
47
1
Approved 2 hours ago

Script hub

Blythe

Universal Script 📌
85
10
Approved 2 hours ago
Universal Script 📌
98
26
Approved 3 hours ago
Universal Script 📌
98
211
Approved 5 hours ago
Universal Script 📌
1.9k
7.1k
Bumped 5 hours ago
Universal Script 📌
7.9k
13.3k
Bumped 6 hours ago
Universal Script 📌
9.1k
17.1k
Bumped 9 hours ago
Universal Script 📌#7 this month

KeylessProject UAI 2.0