Mass
Activate only while you control an "Alien" monster. Select and take control of up to 3 of your opponent's monsters that each have an A-Counter(s) on them. This card is destroyed during the End Phase of the turn it is activated.
local SETCARD_ID_0 = 0xc --Alien
local COUNTER_ID_0 = 0x100e --A-Counter

local SETCARD_ID_0 = 0xc --Alien
local COUNTER_ID_0 = 0x100e --A-Counter
local s, id, o = GetID()
function s.initial_effect(c)
	--Activate
	local e1 = Effect.CreateEffect(c)
	e1:SetCategory(CATEGORY_CONTROL)
	e1:SetType(EFFECT_TYPE_ACTIVATE)
	e1:SetCode(EVENT_FREE_CHAIN)
	e1:SetProperty(EFFECT_FLAG_CARD_TARGET + EFFECT_FLAG_CONTINUOUS_TARGET)
	e1:SetCondition(s.condition)
	e1:SetTarget(s.target)
	e1:SetOperation(s.operation)
	c:RegisterEffect(e1)
	--destroy
	local e2 = Effect.CreateEffect(c)
	e2:SetDescription(aux.Stringid(id, 0))
	e2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
	e2:SetCode(EVENT_PHASE + PHASE_END)
	e2:SetRange(LOCATION_SZONE)
	e2:SetCountLimit(1)
	e2:SetCondition(s.descon)
	e2:SetOperation(s.desop)
	c:RegisterEffect(e2)
	--control
	local e3 = Effect.CreateEffect(c)
	e3:SetType(EFFECT_TYPE_TARGET)
	e3:SetCode(EFFECT_SET_CONTROL)
	e3:SetRange(LOCATION_SZONE)
	e3:SetTarget(s.cttg)
	e3:SetValue(s.ctval)
	c:RegisterEffect(e3)
end
function s.cfilter(c)
	return c:IsFaceup() and c:IsSetCard(SETCARD_ID_0)
end
function s.condition(e, tp, eg, ep, ev, re, r, rp)
	return Duel.IsExistingMatchingCard(s.cfilter, tp, LOCATION_MZONE, 0, 1, nil)
end
function s.filter(c)
	return c:GetCounter(COUNTER_ID_0) > 0 and c:IsControlerCanBeChanged()
end
function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
	if chkc then
		return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1 - tp) and s.filter(chkc)
	end
	if chk == 0 then
		return Duel.IsExistingTarget(s.filter, tp, 0, LOCATION_MZONE, 1, nil)
	end
	local ft = Duel.GetLocationCount(tp, LOCATION_MZONE, 1 - tp, LOCATION_REASON_CONTROL)
	if ft > 3 then
		ft = 3
	end
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_CONTROL)
	local g = Duel.SelectTarget(tp, s.filter, tp, 0, LOCATION_MZONE, 1, ft, nil)
	Duel.SetOperationInfo(0, CATEGORY_CONTROL, g, g:GetCount(), 0, 0)
end
function s.operation(e, tp, eg, ep, ev, re, r, rp)
	local c = e:GetHandler()
	local g = Duel.GetChainInfo(0, CHAININFO_TARGET_CARDS)
	if g:GetCount() > Duel.GetLocationCount(tp, LOCATION_MZONE) then
		return
	end
	local tc = g:GetFirst()
	while tc do
		if tc:IsFaceup() and tc:GetCounter(COUNTER_ID_0) > 0 and tc:IsRelateToEffect(e) then
			c:SetCardTarget(tc)
		end
		tc = g:GetNext()
	end
	c:RegisterFlagEffect(id, RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END, 0, 1)
end
function s.cttg(e, c)
	return c:GetCounter(COUNTER_ID_0) > 0
end
function s.ctval(e, c)
	return e:GetHandlerPlayer()
end
function s.descon(e, tp, eg, ep, ev, re, r, rp)
	return e:GetHandler():GetFlagEffect(id) ~= 0
end
function s.desop(e, tp, eg, ep, ev, re, r, rp)
	Duel.Destroy(e:GetHandler(), REASON_EFFECT)
end


Mass
Activate only while you control an "Alien" monster. Select and take control of up to 3 of your opponent's monsters that each have an A-Counter(s) on them. This card is destroyed during the End Phase of the turn it is activated.
-- Mass
local SETCARD_ID_0 = 0xc --Alien
local COUNTER_ID_0 = 0x100e --A-Counter
local s, id, o = GetID()
function s.initial_effect(c)
	--Activate
	local e1 = Effect.CreateEffect(c)
	e1:SetCategory(CATEGORY_CONTROL)
	e1:SetType(EFFECT_TYPE_ACTIVATE)
	e1:SetCode(EVENT_FREE_CHAIN)
	e1:SetProperty(EFFECT_FLAG_CARD_TARGET + EFFECT_FLAG_CONTINUOUS_TARGET)
	e1:SetCondition(s.condition)
	e1:SetTarget(s.target)
	e1:SetOperation(s.operation)
	c:RegisterEffect(e1)
	--destroy
	local e2 = Effect.CreateEffect(c)
	e2:SetDescription(aux.Stringid(id, 0))
	e2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
	e2:SetCode(EVENT_PHASE + PHASE_END)
	e2:SetRange(LOCATION_SZONE)
	e2:SetCountLimit(1)
	e2:SetCondition(s.descon)
	e2:SetOperation(s.desop)
	c:RegisterEffect(e2)
	--control
	local e3 = Effect.CreateEffect(c)
	e3:SetType(EFFECT_TYPE_TARGET)
	e3:SetCode(EFFECT_SET_CONTROL)
	e3:SetRange(LOCATION_SZONE)
	e3:SetTarget(s.cttg)
	e3:SetValue(s.ctval)
	c:RegisterEffect(e3)
end
function s.cfilter(c)
	return c:IsFaceup() and c:IsSetCard(SETCARD_ID_0)
end
function s.condition(e, tp, eg, ep, ev, re, r, rp)
	return Duel.IsExistingMatchingCard(s.cfilter, tp, LOCATION_MZONE, 0, 1, nil)
end
function s.filter(c)
	return c:GetCounter(COUNTER_ID_0) > 0 and c:IsControlerCanBeChanged()
end
function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
	if chkc then
		return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1 - tp) and s.filter(chkc)
	end
	if chk == 0 then
		return Duel.IsExistingTarget(s.filter, tp, 0, LOCATION_MZONE, 1, nil)
	end
	local ft = Duel.GetLocationCount(tp, LOCATION_MZONE, 1 - tp, LOCATION_REASON_CONTROL)
	if ft > 3 then
		ft = 3
	end
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_CONTROL)
	local g = Duel.SelectTarget(tp, s.filter, tp, 0, LOCATION_MZONE, 1, ft, nil)
	Duel.SetOperationInfo(0, CATEGORY_CONTROL, g, g:GetCount(), 0, 0)
end
function s.operation(e, tp, eg, ep, ev, re, r, rp)
	local c = e:GetHandler()
	local g = Duel.GetChainInfo(0, CHAININFO_TARGET_CARDS)
	if g:GetCount() > Duel.GetLocationCount(tp, LOCATION_MZONE) then
		return
	end
	local tc = g:GetFirst()
	while tc do
		if tc:IsFaceup() and tc:GetCounter(COUNTER_ID_0) > 0 and tc:IsRelateToEffect(e) then
			c:SetCardTarget(tc)
		end
		tc = g:GetNext()
	end
	c:RegisterFlagEffect(id, RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END, 0, 1)
end
function s.cttg(e, c)
	return c:GetCounter(COUNTER_ID_0) > 0
end
function s.ctval(e, c)
	return e:GetHandlerPlayer()
end
function s.descon(e, tp, eg, ep, ev, re, r, rp)
	return e:GetHandler():GetFlagEffect(id) ~= 0
end
function s.desop(e, tp, eg, ep, ev, re, r, rp)
	Duel.Destroy(e:GetHandler(), REASON_EFFECT)
end

