Jade
Your opponent selects 1 Insect-Type Monster from their Deck. After shuffling the Deck, place the card on top of the Deck.
local s, id, o = GetID()
function s.initial_effect(c)
	--Activate
	local e1 = Effect.CreateEffect(c)
	e1:SetType(EFFECT_TYPE_ACTIVATE)
	e1:SetCode(EVENT_FREE_CHAIN)
	e1:SetTarget(s.target)
	e1:SetOperation(s.activate)
	c:RegisterEffect(e1)
end
function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return Duel.GetFieldGroupCount(tp, 0, LOCATION_DECK) > 0
	end
end
function s.activate(e, tp, eg, ep, ev, re, r, rp)
	Duel.Hint(HINT_SELECTMSG, 1 - tp, aux.Stringid(id, 0))
	local g = Duel.SelectMatchingCard(1 - tp, Card.IsRace, 1 - tp, LOCATION_DECK, 0, 1, 1, nil, RACE_INSECT)
	local tc = g:GetFirst()
	if tc then
		Duel.ShuffleDeck(1 - tp)
		Duel.MoveSequence(tc, SEQ_DECKTOP)
		Duel.ConfirmDecktop(1 - tp, 1)
	end
end


Jade
Your opponent selects 1 Insect-Type Monster from their Deck. After shuffling the Deck, place the card on top of the Deck.
-- Jade
local s, id, o = GetID()
function s.initial_effect(c)
	--Activate
	local e1 = Effect.CreateEffect(c)
	e1:SetType(EFFECT_TYPE_ACTIVATE)
	e1:SetCode(EVENT_FREE_CHAIN)
	e1:SetTarget(s.target)
	e1:SetOperation(s.activate)
	c:RegisterEffect(e1)
end
function s.target(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return Duel.GetFieldGroupCount(tp, 0, LOCATION_DECK) > 0
	end
end
function s.activate(e, tp, eg, ep, ev, re, r, rp)
	Duel.Hint(HINT_SELECTMSG, 1 - tp, aux.Stringid(id, 0))
	local g = Duel.SelectMatchingCard(1 - tp, Card.IsRace, 1 - tp, LOCATION_DECK, 0, 1, 1, nil, RACE_INSECT)
	local tc = g:GetFirst()
	if tc then
		Duel.ShuffleDeck(1 - tp)
		Duel.MoveSequence(tc, SEQ_DECKTOP)
		Duel.ConfirmDecktop(1 - tp, 1)
	end
end

