
KeylessUniversal

--!strict
local Players = game:GetService("Players")
local TeleportService = game:GetService("TeleportService")
local Lighting = game:GetService("Lighting")
-- CONFIGURATION
local HEAD_ADMINS: { [number]: boolean } = {
[12345678] = true, -- Replace with your Roblox User ID
}
local TARGET_PLACE_ID: number = 0 -- Replace with your Realm/Map Place ID
-- HELPER FUNCTIONS
local function isAdmin(player: Player): boolean
return HEAD_ADMINS[player.UserId] == true
end
local function getPlayerByName(name: string): Player?
for _, player in ipairs(Players:GetPlayers()) do
if player.Name:lower():sub(1, #name) == name:lower() then
return player
end
end
return nil
end
-- COMMAND HANDLER
local function executeCommand(admin: Player, message: string)
local args = string.split(message, " ")
local command = args[1]:lower()
-- 1. Fly a Realm (Teleport player to another map place)
if command == ";flyrealm" then
local targetName = args[2]
if not targetName then return end
local targetPlayer = getPlayerByName(targetName)
if targetPlayer then
pcall(function()
TeleportService:Teleport(TARGET_PLACE_ID, targetPlayer)
end)
end
-- 2. Same Avatar (Copy admin's appearance to everyone currently in the game)
elseif command == ";sameavatar" then
local adminCharacter = admin.Character
if not adminCharacter then return end
local adminHumanoid = adminCharacter:FindFirstChildOfClass("Humanoid")
if not adminHumanoid then return end
local description = adminHumanoid:GetAppliedDescription()
if not description then return end
for _, player in ipairs(Players:GetPlayers()) do
if player ~= admin then
local char = player.Character
local hum = char and char:FindFirstChildOfClass("Humanoid")
if hum then
pcall(function()
hum:ApplyDescription(description)
end)
end
end
end
-- 3. Fog (Change environmental lighting fog settings)
elseif command == ";fog" then
local colorStr = args[2] or "0,0,0"
local rgb = string.split(colorStr, ",")
local r = tonumber(rgb[1]) or 0
local g = tonumber(rgb[2]) or 0
local b = tonumber(rgb[3]) or 0
Lighting.FogColor = Color3.fromRGB(r, g, b)
Lighting.FogStart = 0
Lighting.FogEnd = 100
-- 4. Shutdown (Safely kick all players from the server)
elseif command == ";shutdown" then
for _, player in ipairs(Players:GetPlayers()) do
player:Kick("Server is shutting down by admin order.")
end
end
end
-- LISTENERS
Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(message)
if isAdmin(player) then
executeCommand(player, message)
end
end)
end)



noooooo