Generate a YGOPro Lua script for the following Yu-Gi-Oh card effect:
If 2 or more of your opponent's monsters are destroyed by battle with your monsters during the same Battle Phase, this card can make a second attack during that Battle Phase.
--ライノタウルス
--Rhinotaurus
local s,id=GetID()
function s.initial_effect(c)
	--Second attack
	local e1=Effect.CreateEffect(c)
	e1:SetType(EFFECT_TYPE_SINGLE)
	e1:SetCode(EFFECT_EXTRA_ATTACK)
	e1:SetCondition(s.macon)
	e1:SetValue(1)
	c:RegisterEffect(e1)
	aux.GlobalCheck(s,function()
		s[0]=0
		s[1]=0
		local ge1=Effect.CreateEffect(c)
		ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
		ge1:SetCode(EVENT_BATTLE_DESTROYING)
		ge1:SetOperation(s.checkop)
		Duel.RegisterEffect(ge1,0)
		aux.AddValuesReset(function()
			s[0]=0
			s[1]=0
		end)
	end)
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
	local bc=eg:GetFirst()
	local cp=bc:GetControler()
	if not bc:IsRelateToBattle() then cp=bc:GetPreviousControler() end
	s[cp]=s[cp]+1
end
function s.macon(e)
	return s[e:GetHandlerPlayer()]>=2
end