AutoRejoin - Anti-AFK System v.10

Automatically rejoins players to the same server before Roblox's 20-minute idle kick.
  • cover_1024x512.png
  • carousel_1_how_it_works.png
  • carousel_2_features.png
  • carousel_3_installation.png
  • cover_1024x512.png
  • carousel_1_how_it_works.png
  • carousel_2_features.png
  • carousel_3_installation.png
AutoRejoin — Anti-AFK System
Keep your players in-game forever. No more idle kicks.

by coreshun

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

The Problem

Roblox automatically kicks players after 20 minutes of inactivity. For idle games, tycoons, AFK farming games, and simulators — this kills your player retention and session time.

The Solution

AutoRejoin detects when a player has been idle for 18 minutes (2 minutes before the kick) and automatically teleports them back to the same server. The player never gets disconnected — they seamlessly rejoin with all progress intact.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Features

  • Smart Idle Detection — Tracks mouse, keyboard, and touch input. Timer resets on any activity.
  • Same-Server Rejoin — Uses TeleportToPlaceInstance to return the player to the exact same server, not a random one.
  • Fallback Teleport — If same-server fails (server closed), falls back to any available server.
  • Studio Detection — Automatically disables in Roblox Studio (TeleportService doesn't work there). No errors in your output.
  • Retry Logic — 3 attempts for same-server, 3 attempts for any-server. Robust against transient failures.
  • Lightweight — Single LocalScript, no dependencies, no server-side code needed.
  • Zero Configuration — Drop it in and it works. No setup, no remotes, no datastores.
  • Mobile + PC + Console — Works on all platforms. Touch input tracked for mobile.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

How It Works

Code:
Player joins game
    ↓
Script starts tracking input (mouse, keyboard, touch)
    ↓
Every 10 seconds: check time since last input
    ↓
If idle ≥ 18 minutes:
    ↓
Attempt 1: TeleportToPlaceInstance (same server)
    ↓ (if fails)
Attempt 2: Teleport (any server)
    ↓
Player is back in-game — no disconnect!

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Installation

One step. That's it.

  1. Place the AutoRejoin script in StarterPlayerScripts as a LocalScript

No server scripts. No modules. No configuration. It works immediately on publish.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Perfect For

  • Idle / Clicker games
  • Tycoon games
  • AFK farming games
  • Simulators with passive income
  • Any game where players leave it running

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

What's Included

  • AutoRejoin (LocalScript) — the complete anti-AFK system, single file
  • README — installation guide and feature overview

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Technical Details

  • Script Type: LocalScript
  • Placement: StarterPlayerScripts
  • Dependencies: None
  • Services Used: UserInputService, TeleportService, Players, RunService
  • Idle Threshold: 18 minutes (configurable — change IDLE_LIMIT variable)
  • Check Interval: Every 10 seconds
  • Retry Attempts: 3 same-server + 3 any-server
  • Performance Impact: Negligible (one timer check every 10s)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Support

Join our Discord: discord.gg/hdB5tadkk8
Or message coreshun on BuiltByBit.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Open source — fully readable and editable Luau code. No obfuscation.
Buy a license now
$3.99
EULA
Standard EULA
Use on any projects you own with attribution
Support
Standard
Includes:
Download the resource
Access new updates
Support from the creator
Support duration
1 year
Share and earn
Refer this resource and earn a 40% commission.
576 Views
9 Purchases
7 Downloads
Apr 6, 2026 Published
Apr 27, 2026 Updated
Not yet rated
722.4 KB File size
Open source
  1. Yes
DRM-free
  1. Yes
Unobfuscated
  1. Yes
Type
  1. System
Genre
  1. Simulator
  1. Tycoon
  1. Idle
Supported languages
  1. English
Creator
Recommended for you
Stop exploiters in their tracks with 9 server-authoritative detections.
Not yet rated
39 purchases
A fully configurable Chat Tags, Name Colors, Team Chat & Anti-Spam System built on TextChatService
Not yet rated
27 purchases
Drop-in settings menu. Center modal, 4 widgets, DataStore saves, sound FX, all platforms.
5.00 star(s) 1 ratings
19 purchases
A Roblox Studio plugin with color picking, color scheme generators, eyedropper, apply to selections.
Not yet rated
2 purchases
Award XP in one line. The engine owns the curve, rewards, prestige, saving, and the UI.
Not yet rated
1 purchase
Share and earn
Refer this resource and earn a 40% commission.
576 Views
9 Purchases
7 Downloads
Apr 6, 2026 Published
Apr 27, 2026 Updated
Not yet rated
722.4 KB File size
Open source
  1. Yes
DRM-free
  1. Yes
Unobfuscated
  1. Yes
Type
  1. System
Genre
  1. Simulator
  1. Tycoon
  1. Idle
Supported languages
  1. English
Creator
Recommended for you
Stop exploiters in their tracks with 9 server-authoritative detections.
Not yet rated
39 purchases
A fully configurable Chat Tags, Name Colors, Team Chat & Anti-Spam System built on TextChatService
Not yet rated
27 purchases
Drop-in settings menu. Center modal, 4 widgets, DataStore saves, sound FX, all platforms.
5.00 star(s) 1 ratings
19 purchases
A Roblox Studio plugin with color picking, color scheme generators, eyedropper, apply to selections.
Not yet rated
2 purchases
Award XP in one line. The engine owns the curve, rewards, prestige, saving, and the UI.
Not yet rated
1 purchase
Top