for i,v in pairs(Two:GetChildren()) do
	if v:IsA("ImageLabel") then
		v.Btn.Btn.MouseButton1Click:connect(function()
			if v.Btn.Stat.Text == "SELECT" then
				selectedclass = v.Name
				Two:TweenPosition(UDim2.new(-1, -413, 0.5, -242), Enum.EasingDirection.Out, Enum.EasingStyle.Quint, 1, false)
			elseif v.Btn.Stat.Text == "PURCHASE" then	
				if v.Name == "Crown" then
					MS:PromptPurchase(Players.LocalPlayer, BCshirt)
				elseif v.Name == "Investor" then
					MS:PromptPurchase(Players.LocalPlayer, FCshirt)	
				end
			end
		end)
	end
end

I want to make it so that when a player purchases the product, it processes their purchase and changes their rank.

1 comment

1

I think the last script at the end of this page will help you: https://developer.roblox.com/en-us/articles/Developer-Products-In-Game-Purchases