example... you click on it, roblox closes how you do that ?
You could use Player:Kick() to disconnect the player from the server, however this wont close the window.To close out of the window, they'd have to do that manually. An example of how that'd work is like this (In a LocalScript inside of the Gui):
local Player = game.Players.LocalPlayer --Only works in Client-Side LocalScripts script.Parent.MouseButton1Click:connect(function() Player:Kick("Custom Message") --Shows message when kicked, or can be empty for default message. end)
Anyways, this should work. If you have any further questions, please leave a comment below. Hope I helped :P