So first thing, about sharing your project, you can add it to a git repositor, like GitHub, GitLab or BitBucket, and make it public, don't forget to add a license file. So anyone can just go and look at it, but if that is not what you want, snippets of code should do fine. An extra bonus is that your project stays saved in more than one place besides your computer.
Now for your slime to detect your player. You add a RayCast2D or an Area2D to your slime and check if there is any collision during the physics step, physics_process method, if there is and the object you are colliding with is the player, you start the attack animation and cause the damage in due time.
Of course this is a very superficial explanation, but it should at least give you an idea of how to proceed and what to search for and ask more specific questions of what help you need.