TRX 200SX knocking noise???

I just picked up a honda 200sx and i cleaned it up prety good then started it up. There seems to be a knocking sound coming from somehere in the engine, i think the case, when you give it throttle. The sound also occurs when you shut off the motor its like a sudden hault after the ignition is shut off and it makes a lound single knock. Im concerned about taking it out for a ride and making it worse, does anyome have any idea as to what this problem could be?? Thanks.