local function G(G,t)if t.Anchored then return end if CollectionService:HasTag(t,Constants.Tag.Tool.RepairKit)then if G._health~=G._maxHealth then t:Destroy()G:incrementHealth(DEFAULT_TOOLKIT_HEALING_AMOUNT)end elseif CollectionService:HasTag(t,Constants.Tag.Monster)and not G._monsterDebounce then G._monsterDebounce=true G:incrementHealth(-MONSTER_DAMAGE)delay(MONSTER_DEBOUNCE_TIME,function()G._monsterDebounce=false end)end end local t=ClassUtils.makeClass(script.Name)
--[[
	If a Repair Kit touches the system, increase the health - if it's a monster, decrease its health.
]]
local function onTouched(self, otherPart)
	if otherPart.Anchored then
		return
	end

	if CollectionService:HasTag(otherPart, Constants.Tag.Tool.RepairKit) then
		if self._health ~= self._maxHealth then
			otherPart:Destroy()
			self:incrementHealth(DEFAULT_TOOLKIT_HEALING_AMOUNT)
		end
	elseif CollectionService:HasTag(otherPart, Constants.Tag.Monster) and not self._monsterDebounce then
		self._monsterDebounce = true

		self:incrementHealth(-MONSTER_DAMAGE)

		delay(MONSTER_DEBOUNCE_TIME, function()
			self._monsterDebounce = false
		end)
	end
end

local BaseSystem = ClassUtils.makeClass(script.Name)
