I only have the cloning part and purchasing system done, so it spawns in when you press the text button and it reduces your money. I'm not sure what to add to make it only clone when there is enough currency in the leaderstat. For example, the price is 200 and I only want it to clone only when you have 200 in the leaderstat. The cloning is also set up with a text button so when you press it, the clone happens. So, all i need is the script add ons to make it only happen when you purchase it with enough money.
--My Script:
**local player = game.Players local button = script.Parent
button.MouseButton1Click:Connect(function() ClonedTalent = game.ServerStorage.Talents.Ben:Clone() ClonedTalent.Parent = game.Workspace ClonedTalent.Name = "Talent" end)**
local button = script.Parent local gui=button.Parent local player=gui.Parent.Parent button.MouseButton1Click:Connect(function() if player.leaderstats.Points.Value>=200 then player.leaderstats.Points.Value-=200 ClonedTalent = game.ServerStorage.Talents.Ben:Clone() ClonedTalent.Parent = game.Workspace ClonedTalent.Name = "Talent" end;end)