RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"Make it when you press Quit the game disconnects you from the server"
local player = game.Players.LocalPlayer local screenGui = Instance.new("ScreenGui") screenGui.Parent = player.PlayerGui local frame = Instance.new("Frame") frame.Parent = screenGui frame.Size = UDim2.new(0.2, 0, 0.2, 0) frame.Position = UDim2.new(0.4, 0, 0.4, 0) local playButton = Instance.new("TextButton") playButton.Parent = frame playButton.Size = UDim2.new(0.5, 0, 1, 0) playButton.Position = UDim2.new(0, 0, 0, 0) playButton.Text = "Play" local quitButton = Instance.new("TextButton") quitButton.Parent = frame quitButton.Size = UDim2.new(0.5, 0, 1, 0) quitButton.Position = UDim2.new(0.5, 0, 0, 0) quitButton.Text = "Quit" playButton.MouseButton1Down:Connect(function() screenGui:Destroy() end) quitButton.MouseButton1Down:Connect(function() player:Kick("Quit") end)