Hi, I have a shop inside of my game and different skins have different rarities. Each rarity has a set amount of price, for example common 100, uncommon 200, rare 300 etc. I have all of the skins in Folders that names are the different rarities. I store how much each rarity is priced at in a module script and whenever a player selects a different skin it changes a value in StarterGui to the weapon name they selected.
How could I securely pass over the weapon rarity to the server? If I were to have a StringValue in StarterGui that stores the weapons rarity and pass that over to the server it would be easily exploited by just changing the value and then a legendary skin could be the price of a common skin. I thought about having an array stored in a ModuleScript that stores all the skins and rarites of those skins but that may not be as efficient. So what would be the best way to secure the skins rarities without them being exploited?