Player is holding down the button

Hey

How do i check if the player is holding down a button. Like the keypadcracker in darkrp, only keeps going if the button is pressed down.

input.IsKeyDown

input.IsKeyDown is fine but please don’t spam calls to it. A better alternative is to use the hook system.

GM/KeyPress and

GM/KeyRelease