On your last day, you (should) receive your letter of recommendation (Arbeitszeugnis), which by law needs to be a positive statement of what you have done, enabling you to get another job.
Slacking off in the last 4 weeks _may_ cause your employer to give you slightly less than a glowing review. Some employers take those letters seriously and if your last boss writes "he did the best he could with the tasks that were given to him", that's not going to reflect well on you.
edit: there is a whole "secret" language for those certificates of employment / recommendation letters, where employers may try to sneak in outrageous stuff ("He had an open ear for the concerns of his female coworkers" - grabbing them or being otherwise inappropriate towards them ), but since most companies do not want to haggle in front of a judge about the exact phrasing, it mostly is written in an okay way. Often you will be told: "Write this letter yourself, you know best what you did here, I am going to sign off on it."