Generate a YGOPro Lua script for the following Yu-Gi-Oh card effect:
During your turn, if you have activated a "Chronomaly" Spell Card previously this turn, you can Special Summon this card (from your hand). You can only control 1 "Chronomaly Aztec Mask Golem".
--先史遺産アステカ・マスク・ゴーレム
--Chronomaly Aztec Mask Golem
local s,id=GetID()
function s.initial_effect(c)
	c:SetUniqueOnField(1,0,id)
	--Special Summon
	local e1=Effect.CreateEffect(c)
	e1:SetType(EFFECT_TYPE_FIELD)
	e1:SetCode(EFFECT_SPSUMMON_PROC)
	e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
	e1:SetRange(LOCATION_HAND)
	e1:SetCondition(s.hspcon)
	c:RegisterEffect(e1)
	Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter)
end
s.listed_series={SET_CHRONOMALY}
function s.chainfilter(re,tp,cid)
	return not (re:IsSpellEffect() and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsSetCard(SET_CHRONOMALY))
end
function s.hspcon(e,c)
	if c==nil then return true end
	local tp=c:GetControler()
	return Duel.GetCustomActivityCount(id,tp,ACTIVITY_CHAIN)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end