Is there a clear difference between 剧本 and 脚本？ I know that 剧本 can also be the more formal “screenplay”。 But beyond that I'm not sure if there is a difference
剧本 and 脚本 are different.
剧本 is just like a novel, telling the actors and directors what the story is.
脚本 includes more detailed and technical information of every section or frame such as shot lengths, scene lens, mapping, background music and so on. When you get 脚本, you'll feel like watching an edited film. 脚本 are mostly for directors and camera operators during the film shooting and the film cutters in later period edit.
In animated movies, 剧本 and 脚本 are nearly the same. And mostly we use 脚本.
As Wang Dingwei mentioned， 脚本 means SCRIPT in computer programming. BASH, Python, Ruby, Nuva are all scripting languages.