Beargram,
Cannot be Normal Summoned/Set. Must be Special Summoned (from your hand or GY) by banishing 3 Insect and/or Plant monsters from your hand and/or GY. You can only Special Summon "Beargram, Shelled Emperor of the Forest Crown" once per turn. Your opponent cannot activate monster effects in response to your Spell/Trap Card or effect activation. Once per turn, during your Main Phase: You can destroy all face-up monsters on the field, except Insect and Plant monsters, also this card cannot attack directly for the rest of this turn.
local s, id, o = GetID()
function s.initial_effect(c)
	c:SetSPSummonOnce(id)
	c:EnableReviveLimit()
	--splimit
	local e0 = Effect.CreateEffect(c)
	e0:SetType(EFFECT_TYPE_SINGLE)
	e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
	e0:SetCode(EFFECT_SPSUMMON_CONDITION)
	c:RegisterEffect(e0)
	--special summon
	local e1 = Effect.CreateEffect(c)
	e1:SetType(EFFECT_TYPE_FIELD)
	e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
	e1:SetCode(EFFECT_SPSUMMON_PROC)
	e1:SetRange(LOCATION_HAND + LOCATION_GRAVE)
	e1:SetCondition(s.sprcon)
	e1:SetTarget(s.sprtg)
	e1:SetOperation(s.sprop)
	c:RegisterEffect(e1)
	--act limit
	local e2 = Effect.CreateEffect(c)
	e2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
	e2:SetCode(EVENT_CHAINING)
	e2:SetRange(LOCATION_MZONE)
	e2:SetOperation(s.chainop)
	c:RegisterEffect(e2)
	--destroy
	local e3 = Effect.CreateEffect(c)
	e3:SetCategory(CATEGORY_DESTROY)
	e3:SetType(EFFECT_TYPE_IGNITION)
	e3:SetRange(LOCATION_MZONE)
	e3:SetCountLimit(1)
	e3:SetTarget(s.destg)
	e3:SetOperation(s.desop)
	c:RegisterEffect(e3)
end
function s.sprfilter(c)
	return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_INSECT + RACE_PLANT) and c:IsAbleToRemoveAsCost()
end
function s.sprcon(e, c)
	if c == nil then
		return true
	end
	local tp = c:GetControler()
	return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and Duel.IsExistingMatchingCard(s.sprfilter, tp, LOCATION_GRAVE + LOCATION_HAND, 0, 3, c)
end
function s.sprtg(e, tp, eg, ep, ev, re, r, rp, chk, c)
	local g = Duel.GetMatchingGroup(s.sprfilter, tp, LOCATION_GRAVE + LOCATION_HAND, 0, c)
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_REMOVE)
	local sg = g:CancelableSelect(tp, 3, 3, nil)
	if sg then
		sg:KeepAlive()
		e:SetLabelObject(sg)
		return true
	else
		return false
	end
end
function s.sprop(e, tp, eg, ep, ev, re, r, rp, c)
	local g = e:GetLabelObject()
	Duel.Remove(g, POS_FACEUP, REASON_SPSUMMON)
	g:DeleteGroup()
end
function s.chainop(e, tp, eg, ep, ev, re, r, rp)
	if re:IsActiveType(TYPE_SPELL + TYPE_TRAP) and ep == tp then
		Duel.SetChainLimit(s.chainlm)
	end
end
function s.chainlm(re, rp, tp)
	return tp == rp or not re:IsActiveType(TYPE_MONSTER)
end
function s.desfilter(c)
	return c:IsFaceup() and not c:IsRace(RACE_INSECT + RACE_PLANT)
end
function s.destg(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return Duel.IsExistingMatchingCard(s.desfilter, tp, LOCATION_MZONE, LOCATION_MZONE, 1, nil)
	end
	local g = Duel.GetMatchingGroup(s.desfilter, tp, LOCATION_MZONE, LOCATION_MZONE, nil)
	Duel.SetOperationInfo(0, CATEGORY_DESTROY, g, g:GetCount(), 0, 0)
end
function s.desop(e, tp, eg, ep, ev, re, r, rp)
	local g = Duel.GetMatchingGroup(s.desfilter, tp, LOCATION_MZONE, LOCATION_MZONE, nil)
	Duel.Destroy(g, REASON_EFFECT)
	local c = e:GetHandler()
	if c:IsRelateToEffect(e) then
		local e1 = Effect.CreateEffect(c)
		e1:SetType(EFFECT_TYPE_SINGLE)
		e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
		e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
		e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END)
		c:RegisterEffect(e1)
	end
end


Beargram,
Cannot be Normal Summoned/Set. Must be Special Summoned (from your hand or GY) by banishing 3 Insect and/or Plant monsters from your hand and/or GY. You can only Special Summon "Beargram, Shelled Emperor of the Forest Crown" once per turn. Your opponent cannot activate monster effects in response to your Spell/Trap Card or effect activation. Once per turn, during your Main Phase: You can destroy all face-up monsters on the field, except Insect and Plant monsters, also this card cannot attack directly for the rest of this turn.
-- Beargram,
local s, id, o = GetID()
function s.initial_effect(c)
	c:SetSPSummonOnce(id)
	c:EnableReviveLimit()
	--splimit
	local e0 = Effect.CreateEffect(c)
	e0:SetType(EFFECT_TYPE_SINGLE)
	e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
	e0:SetCode(EFFECT_SPSUMMON_CONDITION)
	c:RegisterEffect(e0)
	--special summon
	local e1 = Effect.CreateEffect(c)
	e1:SetType(EFFECT_TYPE_FIELD)
	e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
	e1:SetCode(EFFECT_SPSUMMON_PROC)
	e1:SetRange(LOCATION_HAND + LOCATION_GRAVE)
	e1:SetCondition(s.sprcon)
	e1:SetTarget(s.sprtg)
	e1:SetOperation(s.sprop)
	c:RegisterEffect(e1)
	--act limit
	local e2 = Effect.CreateEffect(c)
	e2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
	e2:SetCode(EVENT_CHAINING)
	e2:SetRange(LOCATION_MZONE)
	e2:SetOperation(s.chainop)
	c:RegisterEffect(e2)
	--destroy
	local e3 = Effect.CreateEffect(c)
	e3:SetCategory(CATEGORY_DESTROY)
	e3:SetType(EFFECT_TYPE_IGNITION)
	e3:SetRange(LOCATION_MZONE)
	e3:SetCountLimit(1)
	e3:SetTarget(s.destg)
	e3:SetOperation(s.desop)
	c:RegisterEffect(e3)
end
function s.sprfilter(c)
	return c:IsType(TYPE_MONSTER) and c:IsRace(RACE_INSECT + RACE_PLANT) and c:IsAbleToRemoveAsCost()
end
function s.sprcon(e, c)
	if c == nil then
		return true
	end
	local tp = c:GetControler()
	return Duel.GetLocationCount(tp, LOCATION_MZONE) > 0 and Duel.IsExistingMatchingCard(s.sprfilter, tp, LOCATION_GRAVE + LOCATION_HAND, 0, 3, c)
end
function s.sprtg(e, tp, eg, ep, ev, re, r, rp, chk, c)
	local g = Duel.GetMatchingGroup(s.sprfilter, tp, LOCATION_GRAVE + LOCATION_HAND, 0, c)
	Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_REMOVE)
	local sg = g:CancelableSelect(tp, 3, 3, nil)
	if sg then
		sg:KeepAlive()
		e:SetLabelObject(sg)
		return true
	else
		return false
	end
end
function s.sprop(e, tp, eg, ep, ev, re, r, rp, c)
	local g = e:GetLabelObject()
	Duel.Remove(g, POS_FACEUP, REASON_SPSUMMON)
	g:DeleteGroup()
end
function s.chainop(e, tp, eg, ep, ev, re, r, rp)
	if re:IsActiveType(TYPE_SPELL + TYPE_TRAP) and ep == tp then
		Duel.SetChainLimit(s.chainlm)
	end
end
function s.chainlm(re, rp, tp)
	return tp == rp or not re:IsActiveType(TYPE_MONSTER)
end
function s.desfilter(c)
	return c:IsFaceup() and not c:IsRace(RACE_INSECT + RACE_PLANT)
end
function s.destg(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return Duel.IsExistingMatchingCard(s.desfilter, tp, LOCATION_MZONE, LOCATION_MZONE, 1, nil)
	end
	local g = Duel.GetMatchingGroup(s.desfilter, tp, LOCATION_MZONE, LOCATION_MZONE, nil)
	Duel.SetOperationInfo(0, CATEGORY_DESTROY, g, g:GetCount(), 0, 0)
end
function s.desop(e, tp, eg, ep, ev, re, r, rp)
	local g = Duel.GetMatchingGroup(s.desfilter, tp, LOCATION_MZONE, LOCATION_MZONE, nil)
	Duel.Destroy(g, REASON_EFFECT)
	local c = e:GetHandler()
	if c:IsRelateToEffect(e) then
		local e1 = Effect.CreateEffect(c)
		e1:SetType(EFFECT_TYPE_SINGLE)
		e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
		e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
		e1:SetReset(RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END)
		c:RegisterEffect(e1)
	end
end

