A man has been arrested after attempting to rob a bank with a gun similar to an AK47