Generate a YGOPro Lua script for the following Yu-Gi-Oh card effect:
This card gains an effect based on your Main Monster Zone it is in. ● Leftmost: Increase its Level by 4. ● Rightmost: Increase its Level by 3. ● Center: Increase its Level by 2. ● Others: Increase its Level by 1.
--星向鳥
--Star Staring Starling
--Scripted by AlphaKretin
local s,id=GetID()
function s.initial_effect(c)
	local e1=Effect.CreateEffect(c)
	e1:SetType(EFFECT_TYPE_SINGLE)
	e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
	e1:SetRange(LOCATION_MZONE)
	e1:SetCode(EFFECT_UPDATE_LEVEL)
	e1:SetCondition(s.lvcon)
	e1:SetValue(s.lvval)
	c:RegisterEffect(e1)
end
s.levels={4,1,2,1,3}
function s.lvcon(e,tp,eg,ep,ev,re,r,rp)
	return e:GetHandler():GetSequence()<5
end
function s.lvval(e,tp,eg,ep,ev,re,r,rp)
	return s.levels[e:GetHandler():GetSequence()+1]
end