local function D(D)local n,X,b=0,0,0 local J=Keyboard:IsDown(KEY_W)or Keyboard:IsDown(KEY_UP)local r=Keyboard:IsDown(KEY_A)or Keyboard:IsDown(KEY_LEFT)local G=Keyboard:IsDown(KEY_S)or Keyboard:IsDown(KEY_DOWN)local e=Keyboard:IsDown(KEY_D)or Keyboard:IsDown(KEY_RIGHT)local y=Keyboard:IsDown(KEY_LEFTSHIFT)or Keyboard:IsDown(KEY_RIGHTSHIFT)if n==0 then n=r~=e and(e and 1 or-1)or 0 end if X==0 then X=J~=G and(G and-1 or 1)or 0 end b=UpdateBoost(y,D)and 1 or 0 if countdownGui.TimerFrame.Visible then b=-1 n=0 X=0 end engine.BoostInput=b engine.YawInput=n engine.PitchInput=X end
-- Keyboard Input
local function GetKeyboardInput(step)
	-- Declare & initialize new control inputs
	local yaw, pitch, boost = 0, 0, 0

	-- Key inputs
	local w = Keyboard:IsDown(KEY_W) or Keyboard:IsDown(KEY_UP)
	local a = Keyboard:IsDown(KEY_A) or Keyboard:IsDown(KEY_LEFT)
	local s = Keyboard:IsDown(KEY_S) or Keyboard:IsDown(KEY_DOWN)
	local d = Keyboard:IsDown(KEY_D) or Keyboard:IsDown(KEY_RIGHT)
	local shift = Keyboard:IsDown(KEY_LEFTSHIFT) or Keyboard:IsDown(KEY_RIGHTSHIFT)

	-- Update controls
	if yaw == 0 then
		yaw = ((a ~= d) and (d and 1 or -1) or 0)
	end
	if pitch == 0 then
		pitch = ((w ~= s) and (s and -1 or 1) or 0)
	end
	boost = ((UpdateBoost(shift, step) and 1) or 0)

	-- Throttle is off during countdown
	if countdownGui.TimerFrame.Visible then
		boost = -1
		yaw = 0
		pitch = 0
	end

	-- Set engine input variables
	engine.BoostInput = boost
	engine.YawInput = yaw
	engine.PitchInput = pitch
end -- GetKeyboardInput()
