ti.teg.tnod.I Posted May 11, 2011 Share Posted May 11, 2011 This is a script to hold crouch / w / a / s / d. Simply hold control and press the desired key, release the key, release control. The key will then be held. The key will release if you press "t" or the held key. program HoldMCKeys; var KeyState : integer; DoCrouch, DoW, DoA, DoS, DoD : boolean; procedure FreeKeys; begin IsKeyDown('w'); IsKeyDown('a'); IsKeyDown('s'); IsKeyDown('d'); end; //Created by: ti.teg.tnod.I //Description: Toggles crouch (If crouch is shift) //Used Like: Crouch(True); procedure Crouch(Hold: boolean); begin if Hold then KeyDown(16) else KeyUp(16); end; begin ActivateClient; repeat if IsFunctionKeyDown(1) then begin if (KeyState = 0) then begin if IsFunctionKeyDown(0) then begin DoCrouch := True; KeyState := 1; end else if IsKeyDown('w') then begin DoW := True; KeyState := 1; end else if IsKeyDown('a') then begin DoA := True; KeyState := 1; end else if IsKeyDown('s') then begin DoS := True KeyState := 1; end else if IsKeyDown('d') then begin DoD := True; KeyState := 1; end; end else if (KeyState = 3) then KeyState := 0; end else if IsKeyDown('t') and (KeyState = 3) then begin Crouch(False); KeyUp(87); KeyUp(65); KeyUp(83); KeyUp(68); KeyState := 0; end else if (KeyState = 1) then begin if DoCrouch then begin Crouch(DoCrouch); DoCrouch := False; end else if DoW then begin KeyDown(87); DoW := False; end else if DoA then begin KeyDown(65); DoA := False; end else if DoS then begin KeyDown(83); DoS := False; end else if DoD then begin KeyDown(68); DoD := False; end; KeyState := 3; end; FreeKeys; Wait(100); until(False); end. Quote Link to comment Share on other sites More sharing options...