local function Y(Y)local b,e,s=0,0,0 local C=Keyboard:IsDown(KEY_W)or Keyboard:IsDown(KEY_UP)local V=Keyboard:IsDown(KEY_A)or Keyboard:IsDown(KEY_LEFT)local j=Keyboard:IsDown(KEY_S)or Keyboard:IsDown(KEY_DOWN)local h=Keyboard:IsDown(KEY_D)or Keyboard:IsDown(KEY_RIGHT)local R=Keyboard:IsDown(KEY_LEFTSHIFT)or Keyboard:IsDown(KEY_RIGHTSHIFT)if b==0 then b=V~=h and(h and 1 or-1)or 0 end if e==0 then e=C~=j and(j and-1 or 1)or 0 end s=UpdateBoost(R,Y)and 1 or 0 if countdownGui.TimerFrame.Visible then s=-1 b=0 e=0 end engine.BoostInput=s engine.YawInput=b engine.PitchInput=e end

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()