[VX Ace] Need help unjumbling a script

I've been looking for a fix to a problem I've had for a few days now, and this script seems to be the one thing that might work, but a forum update destroyed it and I'm not good enough with scripts to put it back together.

# Ignore Input.# Version 1.0.0# 03/05/15 - DD/MM/YY# www.rpgmakersource.com# forums.rpgmakersource.com## Use Input.ignore = true/false in a Script Event Command.# Free to use on free or commercial games. Don't remove the original header.class << Input attr_accessor :ignore [:trigger?, 😛ress?, :repeat?, :dir4, :dir8].each { |name| class_eval %Q( alias_method🙂ignore_original_#{name}, :#{name}) def #{name}(*args) @ignore ? #{name[/\d/].nil? ? false : 0} : ignore_original_#{name}(*args) end)} end

Is anyone able to put it back in the proper format? Or alternatively, is there a good script out there for disabling all inputs?

Thanks!
Code:
# Ignore Input.
# Version 1.0.0
# 03/05/15 - DD/MM/YY
# www.rpgmakersource.com
# forums.rpgmakersource.com
## Use Input.ignore = true/false in a Script Event Command.
# Free to use on free or commercial games. Don't remove the original header.
class << Input
attr_accessor :ignore
[:trigger?, :press?, :repeat?, :dir4, :dir8].each { |name|
class_eval %Q(alias_method(:ignore_original_#{name}, :#{name})
def #{name}(*args)
@ignore ? #{name[/\d/].nil? ? false : 0} :ignore_original_#{name}(*args) end)}
end
Worked for me.
Thank you very much!
Is anyone able to put it back in the proper format?

despite the fact that the way you posted it butchered it even more than the original script you saw.

If you need help doing something with a script, just post a link to the original. If you MUST repost the script, at least put it into code tags to keep any formatting that might be there, and to stop the forum auto-changing characters, like it's done in your post.

Original thread: https://forums.rpgmakerweb.com/threads/vx-ace-need-help-unjumbling-a-script.88149/