Text this: Tuning magnetoresistance in molybdenum disulphide and graphene using a molecular spin transition