Get Extra Cash Every 10 Kills

I’m not good at scripting but i was trying to make a wave system where you kill 10 monsters and then the next wave starts , but i want to get more cash every 10 kills or every new wave

So I did price.Value = math.ciel(Enemy.Value/10) * 2 but instead of 2 i wanted to make a Value , but I dont know how to make it every 10 kills it adds more to the Value instead of leaving it in a consistent 2

You could just have a value that starts at 0 and increases by 1 every kill. When it reaches ten. Increase another integer value by whatever amount you want and reset the counter back to 0. Then use the the integer that is being increased every 10 kills as the cash amount that will be added

if (Kills % 10) == 0 then
    -- Give extra cash
end
2 Likes

this worked perfectly fine , thank you!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.