function Maid.__newindex(C,M,J)if Maid[M]~=nil then error(("\067\097\110\110\111\116 \117\115\101 \'\037\115\' \097\115 \097 \077\097\105\100 \107\101\121"):format(tostring(M)),2)end local G=C._tasks local W=G[M]if W==J then return end G[M]=J if W then if type(W)=="\102\117\110\099\116\105\111\110"then W()elseif typeof(W)=="\082\066\088\083\099\114\105\112\116\067\111\110\110\101\099\116\105\111\110"then W:Disconnect()elseif W.Destroy then W:Destroy()end end end

function Maid:__newindex(index, newTask)
	if Maid[index] ~= nil then
		error(("Cannot use '%s' as a Maid key"):format(tostring(index)), 2)
	end

	local tasks = self._tasks
	local oldTask = tasks[index]

	if oldTask == newTask then
		return
	end

	tasks[index] = newTask

	if oldTask then
		if type(oldTask) == "function" then
			oldTask()
		elseif typeof(oldTask) == "RBXScriptConnection" then
			oldTask:Disconnect()
		elseif oldTask.Destroy then
			oldTask:Destroy()
		end
	end
end
