How would I make the background move

I am new to unity and I am making a menu, and I was wondering how would I make the background move, while the menu buttons move along with the main camera. So far I have made a script call BG_GENERATE and attached it to a 3d object (is this the right way to do this?).

Code:

using UnityEngine;
using System.Collections;

public class BG_Generator : MonoBehaviour {
	public GameObject[] BGSlices;

	public float y, spacing;

	public int MaxTer;

	protected float x;
	
	void Start () {
		x = transform.position.x + 5;
		for (int i = 0; i < MaxTer; i++)
			GenBG ();
	}

	void GenBG() {
		Instantiate (BGSlices[Random.Range(0, BGSlices.Length)], new Vector3(x + spacing, y, 0), Quaternion.identity);
		x += spacing;
	}

	void OnTriggerEnter2D (Collider2D other){
		Debug.Log (other.tag);
		Destroy (other.gameObject);
		GenBG ();
	}
}

Hi amukhi,
you can use offset rather than generating BG.

using UnityEngine;
using System.Collections;

public class OffsetScroller : MonoBehaviour {

public float scrollSpeed;
private Vector2 savedOffset;

void Start () {
    savedOffset = renderer.sharedMaterial.GetTextureOffset ("_MainTex");
}

void Update () {
    float y = Mathf.Repeat (Time.time * scrollSpeed, 1);
    Vector2 offset = new Vector2 (savedOffset.x, y);
    renderer.sharedMaterial.SetTextureOffset ("_MainTex", offset);
}

void OnDisable () {
    renderer.sharedMaterial.SetTextureOffset ("_MainTex", savedOffset);
}

}