contitions about subscription???

i want to add an "extra addon" subsciption but with contitions.
for example:

Buy this "extra addon" subscription IF you have the Basic Membership already.
and if the member have Pro Membership, he cant buy it.

how i do that??
I saw this feature and many other at aMember pro script.