Depends how complicated you want to make it.
Array of data would be recommended.
Functions to make it streamlined and mininimal.
But to explain in new user terms.
You will be comparing variables, either data stored in array or via variables
upgradea = 0 or 1
upgradeB = 0 or 1
Set up conditions
upgradeA = 1
upgradeB = 1
then weapon = 1