These scripts make sure that holding down the mouse or a keyboard key for a split second too long does not count as multiple clicks or presses, causing glitches in projects. The previousState variable holds the boolean (true/false 1/0) value of the mouse the frame before. The program checks if the mouse is held, but hasn't been held beforehand. If you swap it around, it will check for a mouse release.
• Added a key sensing cat, using the same principle • Removed unnecessary counting of extra clicks • Simplified the script • Added helpful comments for users This could be useful for keeping scripts efficient and in one place, even if some parts of it are possible in other ways.