camera.Changed:connect(function()local d=(game.Lighting:GetSunDirection()-camera.CoordinateFrame.lookVector).magnitude local F=camera:GetPartsObscuringTarget({camera.CoordinateFrame,game.Lighting:GetSunDirection()*10000},{(camera.CoordinateFrame.p-player.Character.Head.Position).magnitude<1 and player.Character or nil})if d>1 then d=1 end for a=1,#F,1 do if F[a]then d=1 break end end;(ts:Create(blind,TweenInfo.new(.5,Enum.EasingStyle.Sine,Enum.EasingDirection.Out,0,false,0),{Brightness=(1-d)*.35})):Play();(ts:Create(blur,TweenInfo.new(.5,Enum.EasingStyle.Sine,Enum.EasingDirection.Out,0,false,0),{Size=15*(1-d)})):Play()end)

camera.Changed:connect(function()
	local dis = (game.Lighting:GetSunDirection()-camera.CoordinateFrame.lookVector).magnitude
	local parts = camera:GetPartsObscuringTarget({camera.CoordinateFrame,game.Lighting:GetSunDirection()*10000},{((camera.CoordinateFrame.p-player.Character.Head.Position).magnitude < 1 and player.Character or nil)})
	if dis > 1 then dis = 1 end
	
	for i = 1,#parts do
		if parts[i] then
			dis = 1
			break
		end
	end
	
	ts:Create(blind,TweenInfo.new(0.5,Enum.EasingStyle.Sine,Enum.EasingDirection.Out,0,false,0),{
		Brightness = (1-dis)*0.35
	}):Play()
	
	ts:Create(blur,TweenInfo.new(0.5,Enum.EasingStyle.Sine,Enum.EasingDirection.Out,0,false,0),{
		Size = 15*(1-dis)
	}):Play()
end)
