RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"Make A banning Gui that closes and opens and only appears on the owner"
-- local script (StarterGUI) local player = game.Players.LocalPlayer local ownerId = 123456789 -- Replace this with the owner's UserId if player.UserId == ownerId then local screenGui = Instance.new("ScreenGui", player.PlayerGui) local banGui = Instance.new("Frame", screenGui) banGui.BackgroundColor3 = Color3.fromRGB(0, 0, 0) banGui.Size = UDim2.new(0, 300, 0, 200) banGui.Position = UDim2.new(0.5, -150, 0.5, -100) banGui.Visible = false local openButton = Instance.new("TextButton", screenGui) openButton.Text = "Open Ban GUI" openButton.TextColor3 = Color3.fromRGB(255, 255, 255) openButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0) openButton.Position = UDim2.new(0, 10, 0, 10) openButton.UICorner = 5 local closeButton = Instance.new("TextButton", banGui) closeButton.Text = "Close Ban GUI" closeButton.TextColor3 = Color3.fromRGB(255, 255, 255) closeButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0) closeButton.Position = UDim2.new(0, 10, 0, 10) closeButton.UICorner = 5 openButton.MouseButton1Click:Connect(function() banGui.Visible = true end) closeButton.MouseButton1Click:Connect(function() banGui.Visible = false end) end