Venom
During each player's End Phase: Place 1 Venom Counter on each face-up monster, except "Venom" monsters. Monsters lose 500 ATK for each Venom Counter on them. Destroy a monster if its ATK becomes 0 by this effect.
local SETCARD_ID_0 = 0x50 --Venom
local COUNTER_ID_0 = 0x1009 --Venom

local SETCARD_ID_0 = 0x50 --Venom
local COUNTER_ID_0 = 0x1009 --Venom
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)
	c:RegisterEffect(e1)
	--Add counter
	local e2 = Effect.CreateEffect(c)
	e2:SetDescription(aux.Stringid(id, 0))
	e2:SetCategory(CATEGORY_COUNTER)
	e2:SetType(EFFECT_TYPE_TRIGGER_F + EFFECT_TYPE_FIELD)
	e2:SetCode(EVENT_PHASE + PHASE_END)
	e2:SetCountLimit(1)
	e2:SetRange(LOCATION_FZONE)
	e2:SetOperation(s.acop)
	c:RegisterEffect(e2)
	--atk down
	local e3 = Effect.CreateEffect(c)
	e3:SetType(EFFECT_TYPE_FIELD)
	e3:SetCode(EFFECT_UPDATE_ATTACK)
	e3:SetRange(LOCATION_FZONE)
	e3:SetTargetRange(LOCATION_MZONE, LOCATION_MZONE)
	e3:SetValue(s.atkval)
	c:RegisterEffect(e3)
	--destroy
	local e4 = Effect.CreateEffect(c)
	e4:SetDescription(aux.Stringid(id, 1))
	e4:SetCategory(CATEGORY_DESTROY)
	e4:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_F)
	e4:SetCode(EVENT_CUSTOM + id)
	e4:SetRange(LOCATION_FZONE)
	e4:SetTarget(s.destg)
	e4:SetOperation(s.desop)
	c:RegisterEffect(e4)
end
function s.atkval(e, c)
	return c:GetCounter(COUNTER_ID_0) * -500
end
function s.acop(e, tp, eg, ep, ev, re, r, rp)
	local g = Group.CreateGroup()
	local tg = Duel.GetFieldGroup(tp, LOCATION_MZONE, LOCATION_MZONE)
	local tc = tg:GetFirst()
	while tc do
		if tc:IsCanAddCounter(COUNTER_ID_0, 1) and not tc:IsSetCard(SETCARD_ID_0) then
			local atk = tc:GetAttack()
			tc:AddCounter(COUNTER_ID_0, 1)
			if atk > 0 and tc:IsAttack(0) then
				g:AddCard(tc)
			end
		end
		tc = tg:GetNext()
	end
	if g:GetCount() > 0 then
		Duel.RaiseEvent(g, EVENT_CUSTOM + id, e, 0, 0, 0, 0)
	end
end
function s.destg(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return true
	end
	Duel.SetTargetCard(eg)
	Duel.SetOperationInfo(0, CATEGORY_DESTROY, eg, eg:GetCount(), 0, 0)
end
function s.desop(e, tp, eg, ep, ev, re, r, rp)
	local g = eg:Filter(Card.IsRelateToEffect, nil, e)
	if g:GetCount() > 0 then
		Duel.Destroy(g, REASON_EFFECT)
	end
end


Venom
During each player's End Phase: Place 1 Venom Counter on each face-up monster, except "Venom" monsters. Monsters lose 500 ATK for each Venom Counter on them. Destroy a monster if its ATK becomes 0 by this effect.
-- Venom
local SETCARD_ID_0 = 0x50 --Venom
local COUNTER_ID_0 = 0x1009 --Venom
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)
	c:RegisterEffect(e1)
	--Add counter
	local e2 = Effect.CreateEffect(c)
	e2:SetDescription(aux.Stringid(id, 0))
	e2:SetCategory(CATEGORY_COUNTER)
	e2:SetType(EFFECT_TYPE_TRIGGER_F + EFFECT_TYPE_FIELD)
	e2:SetCode(EVENT_PHASE + PHASE_END)
	e2:SetCountLimit(1)
	e2:SetRange(LOCATION_FZONE)
	e2:SetOperation(s.acop)
	c:RegisterEffect(e2)
	--atk down
	local e3 = Effect.CreateEffect(c)
	e3:SetType(EFFECT_TYPE_FIELD)
	e3:SetCode(EFFECT_UPDATE_ATTACK)
	e3:SetRange(LOCATION_FZONE)
	e3:SetTargetRange(LOCATION_MZONE, LOCATION_MZONE)
	e3:SetValue(s.atkval)
	c:RegisterEffect(e3)
	--destroy
	local e4 = Effect.CreateEffect(c)
	e4:SetDescription(aux.Stringid(id, 1))
	e4:SetCategory(CATEGORY_DESTROY)
	e4:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_TRIGGER_F)
	e4:SetCode(EVENT_CUSTOM + id)
	e4:SetRange(LOCATION_FZONE)
	e4:SetTarget(s.destg)
	e4:SetOperation(s.desop)
	c:RegisterEffect(e4)
end
function s.atkval(e, c)
	return c:GetCounter(COUNTER_ID_0) * -500
end
function s.acop(e, tp, eg, ep, ev, re, r, rp)
	local g = Group.CreateGroup()
	local tg = Duel.GetFieldGroup(tp, LOCATION_MZONE, LOCATION_MZONE)
	local tc = tg:GetFirst()
	while tc do
		if tc:IsCanAddCounter(COUNTER_ID_0, 1) and not tc:IsSetCard(SETCARD_ID_0) then
			local atk = tc:GetAttack()
			tc:AddCounter(COUNTER_ID_0, 1)
			if atk > 0 and tc:IsAttack(0) then
				g:AddCard(tc)
			end
		end
		tc = tg:GetNext()
	end
	if g:GetCount() > 0 then
		Duel.RaiseEvent(g, EVENT_CUSTOM + id, e, 0, 0, 0, 0)
	end
end
function s.destg(e, tp, eg, ep, ev, re, r, rp, chk)
	if chk == 0 then
		return true
	end
	Duel.SetTargetCard(eg)
	Duel.SetOperationInfo(0, CATEGORY_DESTROY, eg, eg:GetCount(), 0, 0)
end
function s.desop(e, tp, eg, ep, ev, re, r, rp)
	local g = eg:Filter(Card.IsRelateToEffect, nil, e)
	if g:GetCount() > 0 then
		Duel.Destroy(g, REASON_EFFECT)
	end
end

