Looping the game world on the x coordinate

Figured it out, feel free to delete this post.