I apologize if my question didn't make enough sense, I'm kind of still learning.
local UserItems = { ['Banana'] = 20429; ['Apple'] = 50000; ['Watermelon'] = 250000; ['Pineapple'] = 30000; }
Let's say that a user has these items above, how do I iterate through the dictionary and get the items that costs, let's say, 300K? (In that case, it should pick the Apple and Watermelon to make up the 300K)