I mean like if I was to make a gun shop and you need this item to buy from the shop what would I need to do? I not good at scripting :(
A Good way of making this is to have a leaderstats not shown and call it for example: levelup add a stat called buy1 when the player will buy the gun, buy1 will receive 1 point. Why are you asking? Well, now you need a script that checks the stat, and if the stat is 1 then a command runs.
Here is the script of the stat checking.
local stat = game.Players.LocalPlayer.levelup.buy1 --leaderstat finding stat.Changed:connect(function (property) if stat.Value >= 1 then --command end end)
remember this has to be a local script
Enjoy ^^