RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"can you make me a ban gui for owners that has a closing button and an open button?"
-- GUI script for ban system local players = game:GetService("Players") local banGui = script.Parent local function openBanGui() banGui.Visible = true end local function closeBanGui() banGui.Visible = false end local function banPlayer(player) player:Kick("You have been banned from the game.") end local function onBanButtonClicked() local playerName = banGui.PlayerNameTextBox.Text local player = players:FindFirstChild(playerName) if player then banPlayer(player) else print("Player not found.") end end banGui.OpenButton.MouseButton1Click:Connect(openBanGui) banGui.CloseButton.MouseButton1Click:Connect(closeBanGui) banGui.BanButton.MouseButton1Click:Connect(onBanButtonClicked)