Need help Players can’t buy more similar tools they already have(similar tool spam )

  1. What do you want to achieve?
    I want everyone buy limited only using 1 tool when buy on shop
    Example: "You already have that “Tool”
    Tool in here only one, it’s mean when buying specific tool on shop, you had have it, but you are want to buy more than tool and spam until out of money. So I need you guys to help add more inside script that on under
  2. What is the issue?
    I want people can’t buy more similar tool they already have
  3. What solutions have you tried so far?
    Added more another script and finding on Youtube but don’t have it anything working

Script 1(Buying tool)[Script normal]

script.Parent.RemoteEvent.OnServerEvent:Connect(function(plr)
	plr.leaderstats.Money.Value -= 900
	local gun = game.ServerStorage["Colt LMG"]:Clone()
	gun.Parent = plr.Backpack
end)

Script 2(Annouce you enough money or not)[Local Script]

script.Parent.MouseButton1Click:Connect(function()
	if player.leaderstats.Money.Value >= 200 then
		script.Parent.RemoteEvent:FireServer()
		
	else
		script.Parent.Text = "Not Enough Money"
		script.Parent.BackgroundColor3 = Color3.new(1, 0, 0.0156863)
		wait(2)
		script.Parent.Text = "Purchase"
		script.Parent.BackgroundColor3 = Color3.new(0.14902, 0.705882, 0.0627451)
	end
end)

I’m sorry, but I don’t quite get what are you trying to achieve. Are you trying to make it so that players are not allowed to buy another same tool when they already have one of it?

yes, I want people not to spam tools they already have, they can spam tools that then drop for people to use and can make lag map, also if they drop many tools, it would be trouble

I see, thanks for clarifying better.

The simplest approach to this issue is to do a conditional check on the server script and see if plr.Backpack:FindFirstChild(Tool) evaluates true. If it does, then just do nothing .

Where I should add this part inside the script?

As I’ve mentioned, you should do the conditional check on the server script(Script 1).

it looks like this
Screenshot (1337)
and it on workspace, inside Gun Seller guy

I’m sorry, but I am unable to help you further as I don’t know fully of how your system is organized. The best I can do is to give you suggestions on what to do and you must apply it appropriately.

I would be appreciated if you can kindly reread what I’ve just said in my previous reply.