local b do b=Instance.new("\080\097\114\116")b.Transparency=1 b.Anchored=true b.CanCollide=false b.Locked=false b.Archivable=false b.TopSurface=Enum.SurfaceType.Smooth b.BottomSurface=Enum.SurfaceType.Smooth b.Name="\095\095\082\097\105\110\069\109\105\116\116\101\114"b.Size=MIN_SIZE b.Archivable=false local y=Instance.new("\080\097\114\116\105\099\108\101\069\109\105\116\116\101\114")y.Name="\082\097\105\110\083\116\114\097\105\103\104\116"y.LightEmission=RAIN_DEFAULT_LIGHTEMISSION y.LightInfluence=RAIN_DEFAULT_LIGHTINFLUENCE y.Size=RAIN_STRAIGHT_SIZE y.Texture=RAIN_STRAIGHT_ASSET y.LockedToPart=true y.Enabled=false y.Lifetime=RAIN_STRAIGHT_LIFETIME y.Rate=RAIN_STRAIGHT_MAX_RATE y.Speed=NumberRange.new(RAIN_STRAIGHT_MAX_SPEED)y.EmissionDirection=Enum.NormalId.Bottom y.Parent=b local V=Instance.new("\080\097\114\116\105\099\108\101\069\109\105\116\116\101\114")V.Name="\082\097\105\110\084\111\112\068\111\119\110"V.LightEmission=RAIN_DEFAULT_LIGHTEMISSION V.LightInfluence=RAIN_DEFAULT_LIGHTINFLUENCE V.Size=RAIN_TOPDOWN_SIZE V.Texture=RAIN_TOPDOWN_ASSET V.LockedToPart=true V.Enabled=false V.Rotation=RAIN_TOPDOWN_ROTATION V.Lifetime=RAIN_TOPDOWN_LIFETIME V.Rate=RAIN_TOPDOWN_MAX_RATE V.Speed=NumberRange.new(RAIN_TOPDOWN_MAX_SPEED)V.EmissionDirection=Enum.NormalId.Bottom V.Parent=b end local y,V do y={}V={}for S=1,RAIN_SPLASH_NUM,1 do local X=Instance.new("\065\116\116\097\099\104\109\101\110\116")X.Name="\095\095\082\097\105\110\083\112\108\097\115\104\065\116\116\097\099\104\109\101\110\116"local U=Instance.new("\080\097\114\116\105\099\108\101\069\109\105\116\116\101\114")U.LightEmission=RAIN_DEFAULT_LIGHTEMISSION U.LightInfluence=RAIN_DEFAULT_LIGHTINFLUENCE U.Size=RAIN_SPLASH_SIZE U.Texture=RAIN_SPLASH_ASSET U.Rotation=RAIN_SPLASH_ROTATION U.Lifetime=RAIN_SPLASH_LIFETIME U.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})U.Enabled=false U.Rate=0 U.Speed=NumberRange.new(0)U.Name="\082\097\105\110\083\112\108\097\115\104"U.Parent=X X.Archivable=false table.insert(y,X)local G=Instance.new("\065\116\116\097\099\104\109\101\110\116")G.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 L=b.RainStraight:Clone()L.Speed=NumberRange.new(RAIN_OCCLUDED_MINSPEED,RAIN_OCCLUDED_MAXSPEED)L.SpreadAngle=RAIN_OCCLUDED_SPREAD L.LockedToPart=false L.Enabled=false L.Parent=G local D=b.RainTopDown:Clone()D.Speed=NumberRange.new(RAIN_OCCLUDED_MINSPEED,RAIN_OCCLUDED_MAXSPEED)D.SpreadAngle=RAIN_OCCLUDED_SPREAD D.LockedToPart=false D.Enabled=false D.Parent=G G.Archivable=false table.insert(V,G)end end
-- emitter block around camera used when outside
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

	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
