Heres the equip button:

local modelName = script.Parent.Parent.ModelName
local boxName = script.Parent.Parent.Parent.CurrentBox

script.Parent.MouseButton1Click:Connect(function()

	local outcome = game.ReplicatedStorage.CreateTransaction:InvokeServer(modelName.Value)

	if outcome == true then
		
		
		
		script.Parent.Text = "Equipped"
	
	elseif outcome == "not enough cash" then
		
	elseif outcome == "already bought" then
		if game.Players.LocalPlayer.Equipped.Value ~= modelName.Value then
			game.ReplicatedStorage.EquipTool:FireServer(modelName.Value)
			script.Parent.Text = "Equipped"
		end
	end

end)
	
	
boxName:GetPropertyChangedSignal("Value"):Connect(function()
	
	local model = nil
	
	for i, object in pairs(game.Workspace.ItemRoller["Box"..boxName.Value]:GetChildren()) do
	
		if object:IsA("Model") then
			model = object 
		end
	
	end
	
	local toolsBought = game.ReplicatedStorage.GetToolsBought:InvokeServer()
	
	for i, tool in pairs(toolsBought) do
		
		if tool == model.Name then
			
			
			script.Parent.Text = "Equipped"
		else
			script.Parent.Text = "Equip"
			
		end
		
	end

	
	
end)

2 comments

0

so, the issue is that the (script.Parent.Text = "Equipped") is being printed or however you're checking, more than once?

0

Yes.