I created a button with a local script in it Link: http://i.imgur.com/ogML7pR.png.
Here is the code:
-- BUY SYSTEM, CREATED BY ASWORMEDORIJAN111, FOR TEST.
-- 7.4.2018. OR 4/7/2018
-- VARIABLES
Enabled = script.Parent.Enabled
Cost = script.Parent.SwordCost.Value
ItemName = script.Parent.SwordName.Value
local player = game.Players.LocalPlayer
local character = player.Character
local backpack = player.Backpack
local points = player.leaderstats
-- CODING SECTION
if (Enabled == true) then -- This is code for 'Enabled' value.
script.Disabled = false
else
script.Disabled = true
end
local itemf = game.Lighting
local item = itemf:FindFirstChild(ItemName)
function onclick()
if points > Cost then
item:Clone().Parent = backpack
points = points - Cost
end
end
script.Parent.MouseButton1Click:connect(onclick)
And the output is here: http://i.imgur.com/DsnG4PE.png.******** Idk where did I failed... Sorry for my bad English.

2 comments
pointsis the leaderstats; if it's a number value, you'd dopoints.Value, otherwise you'd do it for a money object in itpoints.Money.Value.What's the name of the gear you want to clone?