So I have a buy button in a shop and you can buy the item more than once. How do I make it to where you can't buy it again and to where the text says "Bought"?
local price = script.Parent.Parent.Price
local tools = game.ReplicatedStorage:WaitForChild("Tools")
local tool = script.Parent.Parent.ItemName
local player = script.Parent.Parent.Parent.Parent.Parent.Parent
script.Parent.MouseButton1Click:connect(function()
if player.leaderstats:FindFirstChild("Money").Value >= price.Value then
player.leaderstats:FindFirstChild("Money").Value = player.leaderstats:FindFirstChild("Money").Value - price.Value
game.ReplicatedStorage.ShopBuy:FireServer(tool.Value)
end
end)

5 comments
Ok, i will try thank you!
It still lets me buy it more than once.
Do the same just after --do code set db to true
ok
Partially works, I can only buy 1 item but 1 item only and the text doesnt chance