Feedback on script

I wrote my first script to kill goblins, loot their bones, and drop them. I did not set an area yet, but will later.
I know the script is not good, and it acts up (clicking multiple goblins without killing the first, missing bone pickups, not burying all), but I cannot figure out why.

If anyone would like to look over it and give me some feedback/better ways to accomplish the task that would be great.

You’ve uploaded the compiled .class file instead of the source file (.java). Upload the source instead to GitHub if you want any actual feedback.

uploaded the right file yesterday. If you had some time to look at it that would be great. I know it is very poorly written, just want some pointers.