Senko
If an EARTH monster(s) is Normal or Special Summoned to your field (except during the Damage Step): You can Special Summon this card from your hand. You can banish this card from your GY, then target 1 Level 5 or higher Warrior monster you control and 1 Attack Position monster your opponent controls; your monster loses exactly 1500 ATK, and if it does, destroy that opponent's monster. You can only use each effect of "Senko the Skybolt Star" once per turn.
local s, id, o = GetID()
function s.initial_effect(c)
	--spsummon
	local e1 = Effect.CreateEffect(c)
	e1:SetDescription(aux.Stringid(id, 0))
	e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
	e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O)
	e1:SetCode(EVENT_SUMMON_SUCCESS)
	e1:SetRange(LOCATION_HAND)
	e1:SetProperty(EFFECT_FLAG_DELAY)
	e1:SetCountLimit(1, id)
	e1:SetCondition(s.spcon)
	e1:SetTarget(s.sptg)
	e1:SetOperation(s.spop)
	c:RegisterEffect(e1)
	local e2 = e1:Clone()
	e2:SetCode(EVENT_SPSUMMON_SUCCESS)
	c:RegisterEffect(e2)
	--destroy
	local e3 = Effect.CreateEffect(c)
	e3:SetDescription(aux.Stringid(id, 1))
	e3:SetCategory(CATEGORY_DESTROY + CATEGORY_ATKCHANGE)
	e3:SetType(EFFECT_TYPE_IGNITION)
	e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
	e3:SetRange(LOCATION_GRAVE)
	e3:SetCountLimit(1, id + 1)
	e3:SetCost(aux.bfgcost)
	e3:SetTarget(s.target)
	e3:SetOperation(s.activate)
	c:RegisterEffect(e3)
end
function s.spfilter(c, tp)
	return c:IsFaceup() and c:IsControler(tp) and c:IsAttribute(ATTRIBUTE_EARTH)
end
function s.spcon(e, tp, eg, ep, ev, re, r, rp)
	return eg:IsExists(s.spfilter, 1, nil, tp)
end
function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and e:GetHandler():IsCanBeSpecialSummoned(e, 0, tp, false, false)
	end
	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, e:GetHandler(), 1, 0, 0)
end
function s.spop(e, tp, eg, ep, ev, re, r, rp)
	local c = e:GetHandler()
	if not c:IsRelateToEffect(e) then
		return
	end
	Duel.SpecialSummon(c, 0, tp, tp, false, false, POS_FACEUP)
end
function s.filter1(c, tp)
	return c:IsFaceup() and c:IsLevelAbove(5) and c:IsRace(RACE_WARRIOR) and c:IsAttackAbove(1500)
end
function s.filter2(c, check)
	return c:IsPosition(POS_FACEUP_ATTACK)
end
function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
	if chkc then
		return false
	end
	if chk == 0 then
		return Duel.IsExistingTarget(s.filter1, tp, LOCATION_MZONE, 0, 1, nil) and Duel.IsExistingTarget(s.filter2, tp, 0, LOCATION_MZONE, 1, nil)
	end
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TARGET)
	local g1 = Duel.SelectTarget(tp, s.filter1, tp, LOCATION_MZONE, 0, 1, 1, nil)
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_DESTROY)
	local g2 = Duel.SelectTarget(tp, s.filter2, tp, 0, LOCATION_MZONE, 1, 1, nil)
	e:SetLabelObject(g1:GetFirst())
	Duel.SetOperationInfo(0, CATEGORY_DESTROY, g2, 1, 0, 0)
end
function s.activate(e, tp, eg, ep, ev, re, r, rp)
	local tc = e:GetLabelObject()
	local tg = Duel.GetChainInfo(0, CHAININFO_TARGET_CARDS)
	local lc = tg:GetFirst()
	if lc == tc then
		lc = tg:GetNext()
	end
	if tc:IsRelateToEffect(e) and tc:IsControler(tp) and tc:IsFaceup() and tc:IsAttackAbove(1500) then
		local e1 = Effect.CreateEffect(e:GetHandler())
		e1:SetType(EFFECT_TYPE_SINGLE)
		e1:SetCode(EFFECT_UPDATE_ATTACK)
		e1:SetValue(-1500)
		e1:SetReset(RESET_EVENT + RESETS_STANDARD)
		tc:RegisterEffect(e1)
		if not tc:IsHasEffect(EFFECT_REVERSE_UPDATE) and lc:IsRelateToEffect(e) and lc:IsControler(1 - tp) then
			Duel.Destroy(lc, REASON_EFFECT)
		end
	end
end


Senko
If an EARTH monster(s) is Normal or Special Summoned to your field (except during the Damage Step): You can Special Summon this card from your hand. You can banish this card from your GY, then target 1 Level 5 or higher Warrior monster you control and 1 Attack Position monster your opponent controls; your monster loses exactly 1500 ATK, and if it does, destroy that opponent's monster. You can only use each effect of "Senko the Skybolt Star" once per turn.
-- Senko
local s, id, o = GetID()
function s.initial_effect(c)
	--spsummon
	local e1 = Effect.CreateEffect(c)
	e1:SetDescription(aux.Stringid(id, 0))
	e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
	e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_O)
	e1:SetCode(EVENT_SUMMON_SUCCESS)
	e1:SetRange(LOCATION_HAND)
	e1:SetProperty(EFFECT_FLAG_DELAY)
	e1:SetCountLimit(1, id)
	e1:SetCondition(s.spcon)
	e1:SetTarget(s.sptg)
	e1:SetOperation(s.spop)
	c:RegisterEffect(e1)
	local e2 = e1:Clone()
	e2:SetCode(EVENT_SPSUMMON_SUCCESS)
	c:RegisterEffect(e2)
	--destroy
	local e3 = Effect.CreateEffect(c)
	e3:SetDescription(aux.Stringid(id, 1))
	e3:SetCategory(CATEGORY_DESTROY + CATEGORY_ATKCHANGE)
	e3:SetType(EFFECT_TYPE_IGNITION)
	e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
	e3:SetRange(LOCATION_GRAVE)
	e3:SetCountLimit(1, id + 1)
	e3:SetCost(aux.bfgcost)
	e3:SetTarget(s.target)
	e3:SetOperation(s.activate)
	c:RegisterEffect(e3)
end
function s.spfilter(c, tp)
	return c:IsFaceup() and c:IsControler(tp) and c:IsAttribute(ATTRIBUTE_EARTH)
end
function s.spcon(e, tp, eg, ep, ev, re, r, rp)
	return eg:IsExists(s.spfilter, 1, nil, tp)
end
function s.sptg(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and e:GetHandler():IsCanBeSpecialSummoned(e, 0, tp, false, false)
	end
	Duel.SetOperationInfo(0, CATEGORY_SPECIAL_SUMMON, e:GetHandler(), 1, 0, 0)
end
function s.spop(e, tp, eg, ep, ev, re, r, rp)
	local c = e:GetHandler()
	if not c:IsRelateToEffect(e) then
		return
	end
	Duel.SpecialSummon(c, 0, tp, tp, false, false, POS_FACEUP)
end
function s.filter1(c, tp)
	return c:IsFaceup() and c:IsLevelAbove(5) and c:IsRace(RACE_WARRIOR) and c:IsAttackAbove(1500)
end
function s.filter2(c, check)
	return c:IsPosition(POS_FACEUP_ATTACK)
end
function s.target(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
	if chkc then
		return false
	end
	if chk == 0 then
		return Duel.IsExistingTarget(s.filter1, tp, LOCATION_MZONE, 0, 1, nil) and Duel.IsExistingTarget(s.filter2, tp, 0, LOCATION_MZONE, 1, nil)
	end
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TARGET)
	local g1 = Duel.SelectTarget(tp, s.filter1, tp, LOCATION_MZONE, 0, 1, 1, nil)
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_DESTROY)
	local g2 = Duel.SelectTarget(tp, s.filter2, tp, 0, LOCATION_MZONE, 1, 1, nil)
	e:SetLabelObject(g1:GetFirst())
	Duel.SetOperationInfo(0, CATEGORY_DESTROY, g2, 1, 0, 0)
end
function s.activate(e, tp, eg, ep, ev, re, r, rp)
	local tc = e:GetLabelObject()
	local tg = Duel.GetChainInfo(0, CHAININFO_TARGET_CARDS)
	local lc = tg:GetFirst()
	if lc == tc then
		lc = tg:GetNext()
	end
	if tc:IsRelateToEffect(e) and tc:IsControler(tp) and tc:IsFaceup() and tc:IsAttackAbove(1500) then
		local e1 = Effect.CreateEffect(e:GetHandler())
		e1:SetType(EFFECT_TYPE_SINGLE)
		e1:SetCode(EFFECT_UPDATE_ATTACK)
		e1:SetValue(-1500)
		e1:SetReset(RESET_EVENT + RESETS_STANDARD)
		tc:RegisterEffect(e1)
		if not tc:IsHasEffect(EFFECT_REVERSE_UPDATE) and lc:IsRelateToEffect(e) and lc:IsControler(1 - tp) then
			Duel.Destroy(lc, REASON_EFFECT)
		end
	end
end

