function Maid.__newindex(n,m,O)if Maid[m]~=nil then error(("\'\037\115\' \105\115 \114\101\115\101\114\118\101\100"):format(tostring(m)),2)end local P=n._tasks local g=P[m]if g==O then return end P[m]=O if g then if type(g)=="\102\117\110\099\116\105\111\110"then g()elseif typeof(g)=="\082\066\088\083\099\114\105\112\116\067\111\110\110\101\099\116\105\111\110"then g:Disconnect()elseif g.Destroy then g:Destroy()elseif g.destroy then g:destroy()end end end

function Maid:__newindex(index, newTask)
	if Maid[index] ~= nil then
		error(("'%s' is reserved"):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()
		elseif oldTask.destroy then
			oldTask:destroy()
		end
	end
end
