local q do q=Instance.new("\080\097\114\116")q.Transparency=1 q.Anchored=true q.CanCollide=false q.Locked=false q.Archivable=false q.TopSurface=Enum.SurfaceType.Smooth q.BottomSurface=Enum.SurfaceType.Smooth q.Name="\095\095\082\097\105\110\069\109\105\116\116\101\114"q.Size=MIN_SIZE q.Archivable=false local K=Instance.new("\080\097\114\116\105\099\108\101\069\109\105\116\116\101\114")K.Name="\082\097\105\110\083\116\114\097\105\103\104\116"K.LightEmission=RAIN_DEFAULT_LIGHTEMISSION K.LightInfluence=RAIN_DEFAULT_LIGHTINFLUENCE K.Size=RAIN_STRAIGHT_SIZE K.Texture=RAIN_STRAIGHT_ASSET K.LockedToPart=true K.Enabled=false K.Lifetime=RAIN_STRAIGHT_LIFETIME K.Rate=RAIN_STRAIGHT_MAX_RATE K.Speed=NumberRange.new(RAIN_STRAIGHT_MAX_SPEED)K.EmissionDirection=Enum.NormalId.Bottom K.Parent=q K.Orientation=Enum.ParticleOrientation.FacingCameraWorldUp local k=Instance.new("\080\097\114\116\105\099\108\101\069\109\105\116\116\101\114")k.Name="\082\097\105\110\084\111\112\068\111\119\110"k.LightEmission=RAIN_DEFAULT_LIGHTEMISSION k.LightInfluence=RAIN_DEFAULT_LIGHTINFLUENCE k.Size=RAIN_TOPDOWN_SIZE k.Texture=RAIN_TOPDOWN_ASSET k.LockedToPart=true k.Enabled=false k.Rotation=RAIN_TOPDOWN_ROTATION k.Lifetime=RAIN_TOPDOWN_LIFETIME k.Rate=RAIN_TOPDOWN_MAX_RATE k.Speed=NumberRange.new(RAIN_TOPDOWN_MAX_SPEED)k.EmissionDirection=Enum.NormalId.Bottom k.Parent=q end local K,k do K={}k={}for B=1,RAIN_SPLASH_NUM,1 do local f=Instance.new("\065\116\116\097\099\104\109\101\110\116")f.Name="\095\095\082\097\105\110\083\112\108\097\115\104\065\116\116\097\099\104\109\101\110\116"local H=Instance.new("\080\097\114\116\105\099\108\101\069\109\105\116\116\101\114")H.LightEmission=RAIN_DEFAULT_LIGHTEMISSION H.LightInfluence=RAIN_DEFAULT_LIGHTINFLUENCE H.Size=RAIN_SPLASH_SIZE H.Texture=RAIN_SPLASH_ASSET H.Rotation=RAIN_SPLASH_ROTATION H.Lifetime=RAIN_SPLASH_LIFETIME H.Transparency=NumberSequence.new({NSK010,NumberSequenceKeypoint.new(RAIN_TRANSPARENCY_T1,RAIN_SPLASH_ALPHA_LOW,0);NumberSequenceKeypoint.new(RAIN_TRANSPARENCY_T2,RAIN_SPLASH_ALPHA_LOW,0),NSK110})H.Enabled=false H.Rate=0 H.Speed=NumberRange.new(0)H.Name="\082\097\105\110\083\112\108\097\115\104"H.Parent=f f.Archivable=false table.insert(K,f)local z=Instance.new("\065\116\116\097\099\104\109\101\110\116")z.Name="\095\095\082\097\105\110\079\099\099\108\117\100\101\100\065\116\116\097\099\104\109\101\110\116"local N=q.RainStraight:Clone()N.Speed=NumberRange.new(RAIN_OCCLUDED_MINSPEED,RAIN_OCCLUDED_MAXSPEED)N.SpreadAngle=RAIN_OCCLUDED_SPREAD N.LockedToPart=false N.Enabled=false N.Parent=z local G=q.RainTopDown:Clone()G.Speed=NumberRange.new(RAIN_OCCLUDED_MINSPEED,RAIN_OCCLUDED_MAXSPEED)G.SpreadAngle=RAIN_OCCLUDED_SPREAD G.LockedToPart=false G.Enabled=false G.Parent=z z.Archivable=false table.insert(k,z)end end

local Emitter do
	
	Emitter = Instance.new("Part")
	Emitter.Transparency = 1
	Emitter.Anchored = true
	Emitter.CanCollide = false
	Emitter.Locked = false
	Emitter.Archivable = false
	Emitter.TopSurface = Enum.SurfaceType.Smooth
	Emitter.BottomSurface = Enum.SurfaceType.Smooth
	Emitter.Name = "__RainEmitter"
	Emitter.Size = MIN_SIZE
	Emitter.Archivable = false
	
	local straight = Instance.new("ParticleEmitter")
	straight.Name = "RainStraight"
	straight.LightEmission = RAIN_DEFAULT_LIGHTEMISSION
	straight.LightInfluence = RAIN_DEFAULT_LIGHTINFLUENCE
	straight.Size = RAIN_STRAIGHT_SIZE
	straight.Texture = RAIN_STRAIGHT_ASSET
	straight.LockedToPart = true
	straight.Enabled = false
	straight.Lifetime = RAIN_STRAIGHT_LIFETIME
	straight.Rate = RAIN_STRAIGHT_MAX_RATE
	straight.Speed = NumberRange.new(RAIN_STRAIGHT_MAX_SPEED)
	straight.EmissionDirection = Enum.NormalId.Bottom
	straight.Parent = Emitter
	straight.Orientation = Enum.ParticleOrientation.FacingCameraWorldUp
	
	local topdown = Instance.new("ParticleEmitter")
	topdown.Name = "RainTopDown"
	topdown.LightEmission = RAIN_DEFAULT_LIGHTEMISSION
	topdown.LightInfluence = RAIN_DEFAULT_LIGHTINFLUENCE
	topdown.Size = RAIN_TOPDOWN_SIZE
	topdown.Texture = RAIN_TOPDOWN_ASSET
	topdown.LockedToPart = true
	topdown.Enabled = false
	topdown.Rotation = RAIN_TOPDOWN_ROTATION
	topdown.Lifetime = RAIN_TOPDOWN_LIFETIME
	topdown.Rate = RAIN_TOPDOWN_MAX_RATE
	topdown.Speed = NumberRange.new(RAIN_TOPDOWN_MAX_SPEED)
	topdown.EmissionDirection = Enum.NormalId.Bottom
	topdown.Parent = Emitter
	
end

local splashAttachments, rainAttachments do
	
	splashAttachments = {}
	rainAttachments = {}
	
	for i = 1, RAIN_SPLASH_NUM do
		
		-- splashes on ground
		local splashAttachment = Instance.new("Attachment")
		splashAttachment.Name = "__RainSplashAttachment"
		local splash = Instance.new("ParticleEmitter")
		splash.LightEmission = RAIN_DEFAULT_LIGHTEMISSION
		splash.LightInfluence = RAIN_DEFAULT_LIGHTINFLUENCE
		splash.Size = RAIN_SPLASH_SIZE
		splash.Texture = RAIN_SPLASH_ASSET
		splash.Rotation = RAIN_SPLASH_ROTATION
		splash.Lifetime = RAIN_SPLASH_LIFETIME
		splash.Transparency = NumberSequence.new {
			NSK010;
			NumberSequenceKeypoint.new(RAIN_TRANSPARENCY_T1, RAIN_SPLASH_ALPHA_LOW, 0);
			NumberSequenceKeypoint.new(RAIN_TRANSPARENCY_T2, RAIN_SPLASH_ALPHA_LOW, 0);
			NSK110;
		}
		splash.Enabled = false
		splash.Rate = 0
		splash.Speed = NumberRange.new(0)
		splash.Name = "RainSplash"
		splash.Parent = splashAttachment
		splashAttachment.Archivable = false
		table.insert(splashAttachments, splashAttachment)
		
		-- occluded rain particle generation
		local rainAttachment = Instance.new("Attachment")
		rainAttachment.Name = "__RainOccludedAttachment"
		local straightOccluded = Emitter.RainStraight:Clone()
		straightOccluded.Speed = NumberRange.new(RAIN_OCCLUDED_MINSPEED, RAIN_OCCLUDED_MAXSPEED)
		straightOccluded.SpreadAngle = RAIN_OCCLUDED_SPREAD
		straightOccluded.LockedToPart = false
		straightOccluded.Enabled = false
		straightOccluded.Parent = rainAttachment
		local topdownOccluded = Emitter.RainTopDown:Clone()
		topdownOccluded.Speed = NumberRange.new(RAIN_OCCLUDED_MINSPEED, RAIN_OCCLUDED_MAXSPEED)
		topdownOccluded.SpreadAngle = RAIN_OCCLUDED_SPREAD
		topdownOccluded.LockedToPart = false
		topdownOccluded.Enabled = false
		topdownOccluded.Parent = rainAttachment
		rainAttachment.Archivable = false
		table.insert(rainAttachments, rainAttachment)
		
	end
	
end

