--//Controller//--

for _, Floaty in pairs(Floaties:GetChildren()) do
	if Floaty:IsA("BasePart") then
		local OrgPos = Floaty.CFrame
		local FloatPos = OrgPos * CFrame.new(
			Random.new():NextNumber(-0.15, 0.15),
			Random.new():NextNumber(0.15, 0.35),
			Random.new():NextNumber(-0.15, 0.15)
			
		) * CFrame.Angles(
			math.rad(Random.new():NextNumber(-3, 3)),
			math.rad(Random.new():NextNumber(-3, 3)),
			math.rad(Random.new():NextNumber(-3, 3))
			
		)
		
		TweenService:Create(
			Floaty,
			TweenInfo.new(
				Random.new():NextNumber(4, 10),
				Enum.EasingStyle.Cubic,
				Enum.EasingDirection.InOut,
				-1,
				true, 0
			),
			{CFrame = FloatPos}
		):Play()
		
	elseif Floaty:IsA("Model") then
		local PrimaryPart = Floaty.PrimaryPart
		
		local OrgPos = PrimaryPart.CFrame
		local FloatPos = OrgPos * CFrame.new(
			Random.new():NextNumber(-0.5, 0.5),
			Random.new():NextNumber(-5, 5),
			Random.new():NextNumber(-0.5, 0.5)

		) * CFrame.Angles(
			math.rad(Random.new():NextNumber(-360, 360)),
			math.rad(Random.new():NextNumber(-360, 360)),
			math.rad(Random.new():NextNumber(-360, 360))

		)
		
		TweenService:Create(
			Floaty.PrimaryPart,
			TweenInfo.new(
				Random.new():NextNumber(10, 15),
				Enum.EasingStyle.Cubic,
				Enum.EasingDirection.InOut,
				-1,
				true, 0
			),
			{CFrame = FloatPos}
		):Play()
	end
end
