robloxexploits.lol
KeylessUniversal

Auto avoid a moderator for safety

skeletonsocrates5 1 day ago 301 views

Run it

Copy the script and paste it into your executor.

Auto avoid a moderator for safety.lua · 79 lines
-- CONFIGURATION
local Settings = {
LeaveOnCreator = true, -- Auto-leave if the game creator joins the server
LeaveOnRobloxAdmin = true, -- Auto-leave if an official Roblox staff member joins

-- Custom lists (Add specific usernames or IDs you want to avoid)
TargetUsernames = {"nameofmod", "GameOwnerFriend"},
TargetUserIds = {1234567, 8901234},

-- Group checking (Optional: kicks you if someone with a high rank in the game's main group joins)
CheckGroupRole = true,
GroupId = game.CreatorId, -- Automatically defaults to the game creator's ID/Group if applicable
MinRankToKick = 200 -- Usually, 200+ are mods/admins in development groups
}

-- SERVICES
local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer

-- LOG FUNCTION
local function debugLog(message)
print("[Anti-Mod]: " .. message)
end

-- DETECTION FUNCTION
local function checkPlayer(player)
if player == LocalPlayer then return end

-- 1. Check if Creator
if Settings.LeaveOnCreator and player.UserId == game.CreatorId then
LocalPlayer:Kick("⚠️ Detected Game Creator: " .. player.Name)
return
end

-- 2. Check if Official Roblox Admin/Staff
if Settings.LeaveOnRobloxAdmin and player:IsInGroup(1200769) then -- 1200769 is the official Roblox Admin group ID
LocalPlayer:Kick("⚠️ Detected Official Roblox Staff/Admin: " .. player.Name)
return
end

-- 3. Check Username Custom List
for _, name in ipairs(Settings.TargetUsernames) do
if player.Name:lower() == name:lower() then
LocalPlayer:Kick("⚠️ Detected Blacklisted Username: " .. player.Name)
return
end
end

-- 4. Check UserID Custom List
for _, id in ipairs(Settings.TargetUserIds) do
if player.UserId == id then
LocalPlayer:Kick("⚠️ Detected Blacklisted UserID: " .. player.Name)
return
end
end

-- 5. Check Group Rank (if the game is owned by a group)
if Settings.CheckGroupRole and game.CreatorType == Enum.CreatorType.Group then
pcall(function()
if player:GetRankInGroup(game.CreatorId) >= Settings.MinRankToKick then
LocalPlayer:Kick("⚠️ Detected Game Group Moderator/Admin: " .. player.Name)
end
end)
end
end

-- SCAN EXISTING PLAYERS
debugLog("Scanning current server players...")
for _, player in ipairs(Players:GetPlayers()) do
checkPlayer(player)
end

-- LISTEN FOR NEW PLAYERS JOINING
Players.PlayerAdded:Connect(function(player)
debugLog("Player joined: " .. player.Name .. " | Scanning...")
checkPlayer(player)
end)

debugLog("Anti-Mod Script Successfully Loaded.")

About this script

You get kick if a moderator joined

More universal scripts