
983 Views
348 Executions
Anti AFK
Universal Script 📌
TheKnockoutScripterPublished 5
8 months ago
Please login to perform these actions:Does it work?
No reports yetNo 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!
--[[
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








Seems to work fine!
@Revontulet do u want ur own script if yes js comment what u want :)
@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.