Change Gui when player is idle, walking, etc

Hello, I would like to know a possible way to change a gui when the player is idle, walking, etc.

What do I want to achieve?

How to make a gui change when a player is idle, walking, etc.

What solutions have I tried?

I looked through many different dev forums but to my knowledge, I couldn’t find one that could help.

Whats is my issue?

I don’t know how to script and as said above I’ve checked for possible solutions.

Try using Humanoid.MoveDirection, which is as the name implies:

RunService.Heartbeat:Connect(function()
    if Humanoid.MoveDirection.Magnitude > 0 then
        print("player is moving")
    else
        print("idle")
    end
end)

https://developer.roblox.com/en-us/api-reference/event/Humanoid/StateChanged