You could just use whatever variable/check you have for if the upgrade is bought and then set the destroy-distance based on that. Pseudo code
Condition: DistanceUpgrade = 0
Action: Destroy bullet after distance traveled = 200
Condition: DistanceUpgrade = 1
Action: Destroy bullet after distance traveled = 300
Also, for the button? use the same variable/check for it. Set the "DistanceUpgrade" variable or however you named it to 1 after clicking the button (assuming the player meets the currency requirements?) and then set it's frame/animation to a greyed-out version or whatever and prevent interaction/clicking by checking if the frame/animation isn't the original-state upon opening the shop (i.e, it was already bought and so set to "ItemBought" animation/frame)