Credit to @Bubble_Sweet_Tea- for the original project.
Credit to @play3r_unkn0wn for the comment to how to fix the problem (the clicks had to be exactly the amount of clicks something in the shop to buy something).