How to do a script who act for all item C# / Js

Hey, I posted a topic but I wasn’t connected so I lost it…

My problem is :

I want a script that I place on an empty that will calculate my distance from the closest potion. My potion have the tag “Potion”. I want that the script allow the player to take the potion if he is close. I don’t want to place a script like " OnMouseUp() { Destroy(gameobject); } on each object, but a script that I’ll place one time and affect all item with “Potion” tag.

I hope I was clear, I tried many thing in the past 3 hours… Thank you!

Damn it, I found how to do it a minute after posting this. Now this is working !