What do controller scripts do and how do they work in frameworks?

I keep seeing the word controller appended to script names, but I’ve never fully understood their purpose. I’ve heard they handle events the player triggers, such as when a button is pressed, but I’m unsure how that fits into the bigger picture. I’ve been trying to base my framework on the MVC (Model, View, Controller) design pattern; right now I have services that handle game logic and on the client I handle UI and events triggered by the player. My intuition would be to separate UI into one module, and events into another, given that I’m applying the MVC design pattern correctly. Am I thinking about controller scripts correctly, and do people follow this design pattern as I’m suggesting?

They say a controller is the client-side equivalent of a service, but the definition of a controller in this thread seems different.

It doesnt really matter, just choose a framework and code the style that you like and comfortable with. Controller is just a moduleScript that communicate with other scripts, you could do whatever you want, just find a style that you like and keep improve it