RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"make a kick admin command for me"
-- server script local Players = game:GetService("Players") local adminUsernames = {"YourUsername"} -- Replace with your username or add more admins function isAdmin(player) for _, admin in ipairs(adminUsernames) do if player.Name == admin then return true end end return false end function onChatted(player, message) if isAdmin(player) then local command, targetName = message:match("^(%S+)%s+(%S+)$") if command == "!kick" then local target = Players:FindFirstChild(targetName) if target then target:Kick("You have been kicked by an admin.") else player:Kick("Player not found.") end end end end Players.PlayerAdded:Connect(function(player) player.Chatted:Connect(function(message) onChatted(player, message) end) end)