Button.Activated:Connect(function()if MarketplaceService:UserOwnsGamePassAsync(PlayerId,Gamepass.Value)then Message.Properties.Type.ItemAlreadyOwn.Value=true Message.Properties.FireMessage.Value=true else if GamepassInfo.IsForSale==true then MarketplaceService:PromptProductPurchase(Player,Gamepass.Value)else Message.Properties.Type.NotForSale.Value=true Message.Properties.FireMessage.Value=true end end end)
--Script:

Button.Activated:Connect(function()
	if MarketplaceService:UserOwnsGamePassAsync(PlayerId, Gamepass.Value) then
		--FireMessage
		Message.Properties.Type.ItemAlreadyOwn.Value = true
		Message.Properties.FireMessage.Value = true
	else
		if GamepassInfo["IsForSale"] == true then
			MarketplaceService:PromptProductPurchase(Player, Gamepass.Value)
		else
			Message.Properties.Type.NotForSale.Value = true
			Message.Properties.FireMessage.Value = true
		end
	end
end)
