How do I make a pet damaging System?

I am working on a simulator. I have a pet that follows you and hay that when clicked, you get hay. The hay can be sold for cash. I want to make a system so certain pets have certain damage values. These damage values will effect the amount of health taken away from hay. (The more damage the pet deals, the faster you collect hay). I have absolutely no idea where to even begin (beginner programmer btw). I haven’t found any solutions to my problem anywhere. I don’t necessarily need anyone to flat out give me the script I just need an idea of where to start?

This isn’t really hard to make ya know, But perhaps you could make variables that represent the amount of damage that a pet should do

Once the pet begins to damage the hay simply subtract the damage a pet can do and the amount of health that the hay has

If you know what i mean

Ok thanks I’ll try something like that.