local function t()local t,N=pcall(function()return SocialService:CanSendGameInviteAsync(Player)end)if N==true then SocialService:PromptGameInvite(Player)end end icon.selected:Connect(function()t()end)
--[MAIN FUNCTION]--

local function onButtonPressed()
	local success, result = pcall(function()
		return SocialService:CanSendGameInviteAsync(Player)
	end)

	if result == true then
		SocialService:PromptGameInvite(Player)
	end
end

icon.selected:Connect(function()
	onButtonPressed()
end)
