RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"make me a ban gui thats on the right only for the owners"
-- local script (StarterGUI) local player = game.Players.LocalPlayer local ownerIdList = {123456, 789012} -- Replace these numbers with the actual owner's userIds local function isOwner(playerId) for _, ownerId in ipairs(ownerIdList) do if playerId == ownerId then return true end end return false end if isOwner(player.UserId) then local screenGui = Instance.new("ScreenGui", player.PlayerGui) local banGui = Instance.new("Frame", screenGui) banGui.BackgroundColor3 = Color3.fromRGB(0, 0, 0) banGui.AnchorPoint = Vector2.new(1, 0) banGui.Position = UDim2.new(1, 0, 0, 0) banGui.Size = UDim2.new(0.2, 0, 1, 0) local banTitle = Instance.new("TextLabel", banGui) banTitle.Text = "Ban GUI" banTitle.TextColor3 = Color3.fromRGB(255, 255, 255) banTitle.BackgroundColor3 = Color3.fromRGB(0, 0, 0) banTitle.Size = UDim2.new(1, 0, 0.1, 0) local banInput = Instance.new("TextBox", banGui) banInput.PlaceholderText = "Enter player name" banInput.TextColor3 = Color3.fromRGB(255, 255, 255) banInput.BackgroundColor3 = Color3.fromRGB(0, 0, 0) banInput.Size = UDim2.new(1, 0, 0.1, 0) banInput.Position = UDim2.new(0, 0, 0.1, 0) local banButton = Instance.new("TextButton", banGui) banButton.Text = "Ban Player" banButton.TextColor3 = Color3.fromRGB(255, 255, 255) banButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0) banButton.Size = UDim2.new(1, 0, 0.1, 0) banButton.Position = UDim2.new(0, 0, 0.2, 0) banButton.MouseButton1Click:Connect(function() local playerName = banInput.Text local playerToBan = game.Players:FindFirstChild(playerName) if playerToBan then playerToBan:Kick("You have been banned by an owner.") else warn("Player not found") end end) end