ToolChanged=Signal.new()function EquipTool(N)if CurrentTool and CurrentTool.Equipped then CurrentTool:Unequip()CurrentTool.Equipped=false end CurrentTool=N CurrentTool.Equipped=true ToolChanged:Fire(N)N:Equip()end function RecolorHandle(N)SyncAPI:Invoke("\082\101\099\111\108\111\114\072\097\110\100\108\101",N)end
-- Core events
ToolChanged = Signal.new()

function EquipTool(Tool)
	-- Equips and switches to the given tool

	-- Unequip current tool
	if CurrentTool and CurrentTool.Equipped then
		CurrentTool:Unequip()
		CurrentTool.Equipped = false
	end

	-- Set `Tool` as current
	CurrentTool = Tool
	CurrentTool.Equipped = true

	-- Fire relevant events
	ToolChanged:Fire(Tool)

	-- Equip the tool
	Tool:Equip()
end

function RecolorHandle(Color)
	SyncAPI:Invoke("RecolorHandle", Color)
end
