Generate a YGOPro Lua script for the following Yu-Gi-Oh card effect:
While your opponent has 4 or less cards in their GY, this card gains 600 ATK. While your opponent has 8 or more cards in their GY, this card loses 300 ATK.
--ネオフレムベル・サーベル
--Neo Flamvell Sabre
local s,id=GetID()
function s.initial_effect(c)
	--atk
	local e1=Effect.CreateEffect(c)
	e1:SetType(EFFECT_TYPE_SINGLE)
	e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
	e1:SetRange(LOCATION_MZONE)
	e1:SetCode(EFFECT_UPDATE_ATTACK)
	e1:SetValue(s.val)
	c:RegisterEffect(e1)
end
function s.val(e)
	local gct=Duel.GetFieldGroupCount(e:GetHandler():GetControler(),0,LOCATION_GRAVE)
	if gct<=4 then return 600
	elseif gct>=8 then return -300
	else return 0 end
end