Custom leave button?

Hey there, people! (Pretty small question today)

I was wondering if there’s a way to make a custom leave button. For example in most games with custom leave button are just kicking the player out of the game. But is it possible to close out the roblox application with the button I clicked? Any help is appreciated! Thanks!

(guys, this arid guy looks dumb, i bet there’s no way to do this)
1 Like

I don’t think there is a way to do this as you can’t control an application with the scripts however, you can do

local btn = script.Parent
local localPlayer = game:GetService("Players").LocalPlayer

btn.MouseButton1Click:Connect(function()
	localPlayer:Kick("message")
end)

and It should work

6 Likes

Only Roblox’s core scripts/programs can control the application itself. I’m sorry, but regular scripts don’t have permission to close it.

1 Like

you can’t, the closest thing you can do is kick the player.