events.TradeItem.OnServerEvent:Connect(function(Z,q,C)local A=Z.Character:FindFirstChildWhichIsA("\084\111\111\108")A:Destroy()if C then(tools[q.ActionText]:Clone()).Parent=Z.Backpack end end)NPCs.Seller.UpperTorso.ProximityPrompt.Triggered:Connect(function(Z)local q=Z.Character if not q then return end local C=q:FindFirstChildWhichIsA("\084\111\111\108")if not C or not C:FindFirstChild("\072\097\110\100\108\101")then return end local A=C.Handle:FindFirstChild("\080\114\105\099\101")if A then C:Destroy()Z.Wallet.Value+=A.Value end end)
--[[
To make another trader, duplicate a trader and change the proximity prompt text in their UpperTorso
ActionText: "FinalItemName"
ObjectText = "ItemRequired: 0/AmountRequired"
]]
events.TradeItem.OnServerEvent:Connect(function(plr, PP, final)
	local tool = plr.Character:FindFirstChildWhichIsA("Tool")
	tool:Destroy()
	if final then
		tools[PP.ActionText]:Clone().Parent = plr.Backpack
	end
end)

NPCs.Seller.UpperTorso.ProximityPrompt.Triggered:Connect(function(plr)
	local char = plr.Character
	if not char then
		return
	end
	local tool = char:FindFirstChildWhichIsA("Tool")
	if not tool or not tool:FindFirstChild("Handle") then
		return
	end
	local res = tool.Handle:FindFirstChild("Price")
	if res then
		tool:Destroy()
		plr.Wallet.Value += res.Value
	end
end)
