local function d(d,F,a)local D=Instance.new(d)if F then D.Value=F end D.Changed:connect(a)a(D.Value)return D end local F=d("\067\111\108\111\114\051\086\097\108\117\101",RAIN_DEFAULT_COLOR,function(d)local F=ColorSequence.new(d)Emitter.RainStraight.Color=F Emitter.RainTopDown.Color=F for d,a in pairs(splashAttachments)do a.RainSplash.Color=F end for d,a in pairs(rainAttachments)do a.RainStraight.Color=F a.RainTopDown.Color=F end end)local function a(d)local F=(1-d)*(1-GlobalModifier.Value)local a=1-F straightLowAlpha=RAIN_STRAIGHT_ALPHA_LOW*F+a topdownLowAlpha=RAIN_TOPDOWN_ALPHA_LOW*F+a local D=NumberSequence.new({NSK010,NumberSequenceKeypoint.new(RAIN_TRANSPARENCY_T1,F*RAIN_SPLASH_ALPHA_LOW+a,0);NumberSequenceKeypoint.new(RAIN_TRANSPARENCY_T2,F*RAIN_SPLASH_ALPHA_LOW+a,0),NSK110})for d,F in pairs(splashAttachments)do F.RainSplash.Transparency=D end end local D=d("\078\117\109\098\101\114\086\097\108\117\101",RAIN_DEFAULT_TRANSPARENCY,a)GlobalModifier.Changed:connect(a)local b=d("\078\117\109\098\101\114\086\097\108\117\101",RAIN_DEFAULT_SPEEDRATIO,function(d)Emitter.RainStraight.Speed=NumberRange.new(d*RAIN_STRAIGHT_MAX_SPEED)Emitter.RainTopDown.Speed=NumberRange.new(d*RAIN_TOPDOWN_MAX_SPEED)end)local p=d("\078\117\109\098\101\114\086\097\108\117\101",RAIN_DEFAULT_INTENSITYRATIO,function(d)Emitter.RainStraight.Rate=RAIN_STRAIGHT_MAX_RATE*d Emitter.RainTopDown.Rate=RAIN_TOPDOWN_MAX_RATE*d intensityOccludedRain=math.ceil(RAIN_OCCLUDED_MAXINTENSITY*d)numSplashes=RAIN_SPLASH_NUM*d end)local f=d("\078\117\109\098\101\114\086\097\108\117\101",RAIN_DEFAULT_LIGHTEMISSION,function(d)Emitter.RainStraight.LightEmission=d Emitter.RainTopDown.LightEmission=d for F,a in pairs(rainAttachments)do a.RainStraight.LightEmission=d a.RainTopDown.LightEmission=d end for F,a in pairs(splashAttachments)do a.RainSplash.LightEmission=d end end)local l=d("\078\117\109\098\101\114\086\097\108\117\101",RAIN_DEFAULT_LIGHTINFLUENCE,function(d)Emitter.RainStraight.LightInfluence=d Emitter.RainTopDown.LightInfluence=d for F,a in pairs(rainAttachments)do a.RainStraight.LightInfluence=d a.RainTopDown.LightInfluence=d end for F,a in pairs(splashAttachments)do a.RainSplash.LightInfluence=d end end)local B=d("\086\101\099\116\111\114\051\086\097\108\117\101",RAIN_DEFAULT_DIRECTION,function(d)if d.magnitude>.001 then rainDirection=d.unit end end)

local function makeProperty(valueObjectClass, defaultValue, setter)
	local valueObject = Instance.new(valueObjectClass)
	if defaultValue then
		valueObject.Value = defaultValue
	end
	valueObject.Changed:connect(setter)
	setter(valueObject.Value)
	return valueObject
end

local Color = makeProperty("Color3Value", RAIN_DEFAULT_COLOR, function(value)
	
	local value = ColorSequence.new(value)
	
	Emitter.RainStraight.Color = value
	Emitter.RainTopDown.Color = value
	
	for _,v in pairs(splashAttachments) do
		v.RainSplash.Color = value
	end
	for _,v in pairs(rainAttachments) do
		v.RainStraight.Color = value
		v.RainTopDown.Color = value
	end
	
end)

local function updateTransparency(value)
	
	local opacity = (1 - value) * (1 - GlobalModifier.Value)
	local transparency = 1 - opacity
	
	straightLowAlpha = RAIN_STRAIGHT_ALPHA_LOW * opacity + transparency
	topdownLowAlpha = RAIN_TOPDOWN_ALPHA_LOW * opacity + transparency
	
	local splashSequence = NumberSequence.new {
		NSK010;
		NumberSequenceKeypoint.new(RAIN_TRANSPARENCY_T1, opacity*RAIN_SPLASH_ALPHA_LOW + transparency, 0);
		NumberSequenceKeypoint.new(RAIN_TRANSPARENCY_T2, opacity*RAIN_SPLASH_ALPHA_LOW + transparency, 0);
		NSK110;
	}
	
	for _,v in pairs(splashAttachments) do
		v.RainSplash.Transparency = splashSequence
	end
	
end
local Transparency = makeProperty("NumberValue", RAIN_DEFAULT_TRANSPARENCY, updateTransparency)
GlobalModifier.Changed:connect(updateTransparency)

local SpeedRatio = makeProperty("NumberValue", RAIN_DEFAULT_SPEEDRATIO, function(value)
	
	Emitter.RainStraight.Speed = NumberRange.new(value * RAIN_STRAIGHT_MAX_SPEED)
	Emitter.RainTopDown.Speed = NumberRange.new(value * RAIN_TOPDOWN_MAX_SPEED)
	
end)

local IntensityRatio = makeProperty("NumberValue", RAIN_DEFAULT_INTENSITYRATIO, function(value)
	
	Emitter.RainStraight.Rate = RAIN_STRAIGHT_MAX_RATE * value
	Emitter.RainTopDown.Rate = RAIN_TOPDOWN_MAX_RATE * value
	
	intensityOccludedRain = math.ceil(RAIN_OCCLUDED_MAXINTENSITY * value)
	numSplashes = RAIN_SPLASH_NUM * value
	
end)

local LightEmission = makeProperty("NumberValue", RAIN_DEFAULT_LIGHTEMISSION, function(value)
	
	Emitter.RainStraight.LightEmission = value
	Emitter.RainTopDown.LightEmission = value
	
	for _,v in pairs(rainAttachments) do
		v.RainStraight.LightEmission = value
		v.RainTopDown.LightEmission = value
	end
	for _,v in pairs(splashAttachments) do
		v.RainSplash.LightEmission = value
	end
	
end)

local LightInfluence = makeProperty("NumberValue", RAIN_DEFAULT_LIGHTINFLUENCE, function(value)
	
	Emitter.RainStraight.LightInfluence = value
	Emitter.RainTopDown.LightInfluence = value
	
	for _,v in pairs(rainAttachments) do
		v.RainStraight.LightInfluence = value
		v.RainTopDown.LightInfluence = value
	end
	for _,v in pairs(splashAttachments) do
		v.RainSplash.LightInfluence = value
	end
	
end)

local RainDirection = makeProperty("Vector3Value", RAIN_DEFAULT_DIRECTION, function(value)
	if value.magnitude > 0.001 then
		rainDirection = value.unit
	end
end)

