First, we will want to add an ID system to the Power-ups, this will make it so the game knows the difference between the different power-ups and it’s really easy to implement.
On our Power-up Script, make a variable of type int and add [SerializeField] so we can see it in the inspector. Now we can set the Triple Shot prefab to have an ID of 0, the Speedup an ID of 1, later we can add in a Shield and give it an ID of 2.
ID system is done. Now we just need to check the ID of the Power-up we picked up by the player and add logic for what happens when we do. We can add in an if statement to check the ID before adding it to the player.
At this point, we can check if the triple shot still works and if it does we have a working system.
All that is left, is to be able to spawn the new Power-ups in.
Change over to the Spawn Manager’s Script and add in somewhere to store all the Power-ups, An Array will be perfect for this, by adding  at the end after GameObject, this will turn it into an Array of GameObjects.
Back to the inspector. We can now add in all the Power-ups. Set the size to 3 and drag in the PreFabs for each Power-up, making sure that the element number matches up with the ID for each Power-up.
Now to pick a random ID to spawn in. Back to the Spawn Manager Script in the method for spawning the Power-ups, All we need here is to pick a random ID and spawn that ID from the list. Which would look a little something like this.
Here I'm using _powerUpContainer.Length, which returns how many elements are in the list, so we don’t have to come back in and change the value each time we add a new power-up. Then in the next line, we are spawning the random value we get from _powerID which at the moment is between 0 and 2, even though the length returns 3. This is because Ints in Random.Range are exclusive, meaning anything up to this number but not including.
And with that, we have a new Power-up System that can be added onto with little to no effort.