Thank you for your fast response.
So I realized that this must be a weird memory leak issue that I still don't understand. You can see it in the video, that after I modify a variable that is not even referenced, the FPS decreases significantly. When I put the repeat loops in comment, the FPS goes back to the normal value, but I don't understand why, since the loops did not decrease the FPS until I modified something.
Check out this short clip:
I tested it with the old inventory's Draw GUI event too,( which is way more complicated with more loops) and the results were the same.