Background Loop for 2D Endless runner

I need a background loop script or scrolling script for an endless runner.

if(transform.position.x < rect.width / 2)
{
transform.position = 0,0,0;
}

Watch this, It might help:

@DualTrastPujaro