basic mining script