How to close the invite friends page

So I have created a invite friend pop up and it is enabled by pressing a button. How would I close it?

Here is my script:

function onButtonPressed()
	local Success, result = pcall(function()
		if status.Value == false then
			status.Value = true
			    return SocialService:CanSendGameInviteAsync(player)
		elseif status.Value == true then
			local s, e = pcall(function()
				status.Value = false
				return SocialService.GameInvitePromptClosed(player)
			end)
			if not s then
				print(e)
			end
			end
		end)
	
    if result == true then
	    SocialService:PromptGameInvite(player)
    end
end

button.MouseButton1Click:Connect(onButtonPressed)