Is it allowed to take project from another code, [Question for compo & jam]

Hello there, so I am participating in the jam, and while making my game I took some of the code from my other games, mainly generic code such as: Pause systems, Health bars, Mouse movement, etc. so my question is: is this allowed? I am asking for both the compo & the jam, since while I am particpiating in the jam right now, next time I might participate in the compo and I'll probably use some old code for some generic things again.