Number
2+ Level 5 monsters
Once per turn, during your Main Phase 1: You can detach 2 materials from this card; each player rolls a six-sided die twice. The player with the higher total cannot activate monster effects or declare an attack, until the end of the next turn. Once per turn, if either player rolls a six-sided die (or dice) while this card has material, you can treat one of the results as 7.
local s, id, o = GetID()
function s.initial_effect(c)
	--xyz summon
	aux.AddXyzProcedure(c, nil, 5, 2, nil, nil, 99)
	c:EnableReviveLimit()
	--dice
	local e1 = Effect.CreateEffect(c)
	e1:SetDescription(aux.Stringid(id, 0))
	e1:SetCategory(CATEGORY_DICE)
	e1:SetType(EFFECT_TYPE_IGNITION)
	e1:SetRange(LOCATION_MZONE)
	e1:SetCountLimit(1)
	e1:SetCondition(s.dccon)
	e1:SetCost(s.dccost)
	e1:SetTarget(s.dctg)
	e1:SetOperation(s.dcop)
	c:RegisterEffect(e1)
	--dice
	local e2 = Effect.CreateEffect(c)
	e2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
	e2:SetCode(EVENT_TOSS_DICE_NEGATE)
	e2:SetRange(LOCATION_MZONE)
	e2:SetCondition(s.dicecon)
	e2:SetOperation(s.diceop)
	c:RegisterEffect(e2)
end
aux.xyz_number[id] = 67
function s.dccon(e, tp, eg, ep, ev, re, r, rp)
	return Duel.GetCurrentPhase() == PHASE_MAIN1
end
function s.dccost(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return e:GetHandler():CheckRemoveOverlayCard(tp, 2, REASON_COST)
	end
	e:GetHandler():RemoveOverlayCard(tp, 2, 2, REASON_COST)
end
function s.dctg(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return true
	end
	Duel.SetOperationInfo(0, CATEGORY_DICE, nil, 0, PLAYER_ALL, 2)
end
function s.dcop(e, tp, eg, ep, ev, re, r, rp)
	local c = e:GetHandler()
	local d1, d2, d3, d4 = Duel.TossDice(tp, 2, 2)
	if d1 + d2 > d3 + d4 then
		local e1 = Effect.CreateEffect(c)
		e1:SetType(EFFECT_TYPE_FIELD)
		e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
		e1:SetCode(EFFECT_CANNOT_ACTIVATE)
		e1:SetTargetRange(1, 0)
		e1:SetValue(s.actlimit)
		e1:SetReset(RESET_PHASE + PHASE_END, 2)
		Duel.RegisterEffect(e1, tp)
		local e2 = Effect.CreateEffect(c)
		e2:SetType(EFFECT_TYPE_FIELD)
		e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
		e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
		e2:SetTargetRange(1, 0)
		e2:SetReset(RESET_PHASE + PHASE_END, 2)
		Duel.RegisterEffect(e2, tp)
	elseif d1 + d2 < d3 + d4 then
		local e1 = Effect.CreateEffect(c)
		e1:SetType(EFFECT_TYPE_FIELD)
		e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
		e1:SetCode(EFFECT_CANNOT_ACTIVATE)
		e1:SetTargetRange(0, 1)
		e1:SetValue(s.actlimit)
		e1:SetReset(RESET_PHASE + PHASE_END, 2)
		Duel.RegisterEffect(e1, tp)
		local e2 = Effect.CreateEffect(c)
		e2:SetType(EFFECT_TYPE_FIELD)
		e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
		e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
		e2:SetTargetRange(0, 1)
		e2:SetReset(RESET_PHASE + PHASE_END, 2)
		Duel.RegisterEffect(e2, tp)
	end
end
function s.actlimit(e, re, tp)
	return re:IsActiveType(TYPE_MONSTER)
end
function s.dicecon(e, tp, eg, ep, ev, re, r, rp)
	local c = e:GetHandler()
	return c:GetOverlayCount() > 0 and c:GetFlagEffect(id) == 0
end
function s.diceop(e, tp, eg, ep, ev, re, r, rp)
	local cc = Duel.GetCurrentChain()
	local cid = Duel.GetChainInfo(cc, CHAININFO_CHAIN_ID)
	if Duel.SelectYesNo(tp, aux.Stringid(id, 1)) then
		Duel.Hint(HINT_CARD, 0, id)
		e:GetHandler():RegisterFlagEffect(id, RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END, 0, 1)
		local dc = { Duel.GetDiceResult() }
		local ac = 1
		local ct = (ev & 0xff) + (ev >> 16 & 0xff)
		if ct > 1 then
			--choose the index of results
			Duel.Hint(HINT_SELECTMSG, tp, aux.Stringid(id, 2))
			local val, idx = Duel.AnnounceNumber(tp, table.unpack(aux.idx_table, 1, ct))
			ac = idx + 1
		end
		dc[ac] = 7
		Duel.SetDiceResult(table.unpack(dc))
	end
end


Number
2+ Level 5 monsters
Once per turn, during your Main Phase 1: You can detach 2 materials from this card; each player rolls a six-sided die twice. The player with the higher total cannot activate monster effects or declare an attack, until the end of the next turn. Once per turn, if either player rolls a six-sided die (or dice) while this card has material, you can treat one of the results as 7.
-- Number
local s, id, o = GetID()
function s.initial_effect(c)
	--xyz summon
	aux.AddXyzProcedure(c, nil, 5, 2, nil, nil, 99)
	c:EnableReviveLimit()
	--dice
	local e1 = Effect.CreateEffect(c)
	e1:SetDescription(aux.Stringid(id, 0))
	e1:SetCategory(CATEGORY_DICE)
	e1:SetType(EFFECT_TYPE_IGNITION)
	e1:SetRange(LOCATION_MZONE)
	e1:SetCountLimit(1)
	e1:SetCondition(s.dccon)
	e1:SetCost(s.dccost)
	e1:SetTarget(s.dctg)
	e1:SetOperation(s.dcop)
	c:RegisterEffect(e1)
	--dice
	local e2 = Effect.CreateEffect(c)
	e2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
	e2:SetCode(EVENT_TOSS_DICE_NEGATE)
	e2:SetRange(LOCATION_MZONE)
	e2:SetCondition(s.dicecon)
	e2:SetOperation(s.diceop)
	c:RegisterEffect(e2)
end
aux.xyz_number[id] = 67
function s.dccon(e, tp, eg, ep, ev, re, r, rp)
	return Duel.GetCurrentPhase() == PHASE_MAIN1
end
function s.dccost(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return e:GetHandler():CheckRemoveOverlayCard(tp, 2, REASON_COST)
	end
	e:GetHandler():RemoveOverlayCard(tp, 2, 2, REASON_COST)
end
function s.dctg(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return true
	end
	Duel.SetOperationInfo(0, CATEGORY_DICE, nil, 0, PLAYER_ALL, 2)
end
function s.dcop(e, tp, eg, ep, ev, re, r, rp)
	local c = e:GetHandler()
	local d1, d2, d3, d4 = Duel.TossDice(tp, 2, 2)
	if d1 + d2 > d3 + d4 then
		local e1 = Effect.CreateEffect(c)
		e1:SetType(EFFECT_TYPE_FIELD)
		e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
		e1:SetCode(EFFECT_CANNOT_ACTIVATE)
		e1:SetTargetRange(1, 0)
		e1:SetValue(s.actlimit)
		e1:SetReset(RESET_PHASE + PHASE_END, 2)
		Duel.RegisterEffect(e1, tp)
		local e2 = Effect.CreateEffect(c)
		e2:SetType(EFFECT_TYPE_FIELD)
		e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
		e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
		e2:SetTargetRange(1, 0)
		e2:SetReset(RESET_PHASE + PHASE_END, 2)
		Duel.RegisterEffect(e2, tp)
	elseif d1 + d2 < d3 + d4 then
		local e1 = Effect.CreateEffect(c)
		e1:SetType(EFFECT_TYPE_FIELD)
		e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
		e1:SetCode(EFFECT_CANNOT_ACTIVATE)
		e1:SetTargetRange(0, 1)
		e1:SetValue(s.actlimit)
		e1:SetReset(RESET_PHASE + PHASE_END, 2)
		Duel.RegisterEffect(e1, tp)
		local e2 = Effect.CreateEffect(c)
		e2:SetType(EFFECT_TYPE_FIELD)
		e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
		e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
		e2:SetTargetRange(0, 1)
		e2:SetReset(RESET_PHASE + PHASE_END, 2)
		Duel.RegisterEffect(e2, tp)
	end
end
function s.actlimit(e, re, tp)
	return re:IsActiveType(TYPE_MONSTER)
end
function s.dicecon(e, tp, eg, ep, ev, re, r, rp)
	local c = e:GetHandler()
	return c:GetOverlayCount() > 0 and c:GetFlagEffect(id) == 0
end
function s.diceop(e, tp, eg, ep, ev, re, r, rp)
	local cc = Duel.GetCurrentChain()
	local cid = Duel.GetChainInfo(cc, CHAININFO_CHAIN_ID)
	if Duel.SelectYesNo(tp, aux.Stringid(id, 1)) then
		Duel.Hint(HINT_CARD, 0, id)
		e:GetHandler():RegisterFlagEffect(id, RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END, 0, 1)
		local dc = { Duel.GetDiceResult() }
		local ac = 1
		local ct = (ev & 0xff) + (ev >> 16 & 0xff)
		if ct > 1 then
			--choose the index of results
			Duel.Hint(HINT_SELECTMSG, tp, aux.Stringid(id, 2))
			local val, idx = Duel.AnnounceNumber(tp, table.unpack(aux.idx_table, 1, ct))
			ac = idx + 1
		end
		dc[ac] = 7
		Duel.SetDiceResult(table.unpack(dc))
	end
end

