Generate a YGOPro Lua script for the following Yu-Gi-Oh card effect:
You can only equip this card to a Level 3 or lower Normal Monster on your side of the field. When you activate this card, Tribute all Normal Monsters (except Tokens) on your side of the field, except the equipped monster. Increase the ATK of the equipped monster by 1000 points for each Normal Monster that you Tributed.
--魂喰らいの魔刀
--Sword of the Soul-Eater
local s,id=GetID()
function s.initial_effect(c)
	aux.AddEquipProcedure(c,0,s.filter,nil,s.cost,s.target,s.operation)
end
function s.filter(c)
	return c:IsType(TYPE_NORMAL) and c:IsLevelBelow(3)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
	e:SetLabel(1)
	if chk==0 then return true end
end
function s.rfilter(c)
	local tpe=c:GetType()
	return (tpe&TYPE_NORMAL)~=0 and (tpe&TYPE_TOKEN)==0 and c:IsReleasable()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,tc,chk)
	local label=e:GetLabel()
	e:SetLabel(0)
	if chk==0 then return true end
	if label==1 then
		local rg=Duel.GetMatchingGroup(s.rfilter,tp,LOCATION_MZONE,0,tc)
		Duel.Release(rg,REASON_COST)
		Duel.SetTargetParam(#rg*1000)
	else
		Duel.SetTargetParam(0)
	end
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
	local c=e:GetHandler()
	local tc=Duel.GetFirstTarget()
	if c:IsRelateToEffect(e) and tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) then
		local e1=Effect.CreateEffect(c)
		e1:SetType(EFFECT_TYPE_EQUIP)
		e1:SetCode(EFFECT_UPDATE_ATTACK)
		e1:SetValue(Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM))
		e1:SetReset(RESET_EVENT|RESETS_STANDARD)
		c:RegisterEffect(e1)
	end
end