is there a way to, make this script not take the money, but just gives the item once it realize, you have enough exp, im working on a level system, and i realize the game does not work right when the script takes the money, so i wanted to know how do you make this script not take the money but finds the amount and you click it and it give tool, but if you dont have enough money i wont give it too you.
wait(0.5)
player = script.Parent.Parent.Parent.Parent.Parent
money = player.leaderstats.Exp
price = 150
tool = game.Lighting:findFirstChild("Beretta") -- put the excact weapon name here. the weapon has to be in game Lighting
function buy()
if money.Value >= price then
money.Value = money.Value - price
local a = tool:clone()
a.Parent = player.Backpack
local b = tool:clone()
b.Parent = player.StarterGear
end
end
script.Parent.MouseButton1Down:connect(buy)

2 comments
so what exacly do i add, when i add + it gives the player the item and gives them the money, when i add this >= it eats all the money up
^ what incapaz said, and also I mean just remove the line. You don't need it.