if key=="\100"and(faster==false and(slower==false and(Spd_keep==true and on==true)))then local I=plane.Engine:findFirstChild("\083\112\101\101\100")faster=true while faster do if I.Value<minspeed or I.Value>maxv then return end if I.Value==maxv then faster=false end I.Value=I.Value+1 wait()end elseif key=="\097"and(faster==false and(on==true and Spd_keep==true))then if on==false or plane.Engine:findFirstChild("\083\112\101\101\100")==nil then return end if slower==false and faster==false then local I=plane.Engine:findFirstChild("\083\112\101\101\100")slower=true while slower do if I.Value>=minspeed then I.Value=I.Value-1 elseif I.Value<minspeed then I.Value=minspeed slower=false end wait()end end end if key=="\115"and(planedebounce==false and on==true)then local I=plane.Engine:findFirstChild("\086\101\114\116\105\099\097\108\083\112\101\101\100")if I==nil then return end downer=true uper=false while downer do if I.Value==-20 then downer=false break end if downer==false then break end I.Value=I.Value-1 wait(.1)end end if key=="\119"and(planedebounce==false and on==true)then local I=plane.Engine:findFirstChild("\086\101\114\116\105\099\097\108\083\112\101\101\100")if I==nil then return end uper=true downer=false while uper==true do if uper==false then break end if I.Value>=20 then uper=false end I.Value=I.Value+1 wait(.1)end end if string.byte(key)==23 and on then local I=plane.Engine local R=I.Speed if R.Value<0 then while R.Value~=0 do R.Value=R.Value+1 wait(.1)end elseif R.Value>0 then while R.Value~=0 do R.Value=R.Value-1 wait(.1)end elseif R.Value==0 then R.Value=0 return end end

				if(key == "d")  and (faster == false) and (slower == false) and (Spd_keep == true) and ( on == true) then 
					local val = plane.Engine:findFirstChild("Speed")
					faster = true
					while faster do
						if(val.Value < minspeed) or (val.Value > maxv) then return end							
						if(val.Value == maxv) then faster = false end 
						val.Value = val.Value +1
						wait()
						end 		
				
				elseif(key == "a")  and (faster == false)  and ( on==true) and (Spd_keep == true) then
				if(on == false) or (plane.Engine:findFirstChild("Speed") == nil) then return end
					if(slower == false) and (faster == false) then
						local val = plane.Engine:findFirstChild("Speed")
						slower = true
						while slower do
						if(val.Value >=minspeed) then
						val.Value = val.Value -1
						elseif(val.Value < minspeed) then
						val.Value = minspeed
						slower = false
						end 
						wait()
						end 
				end
					end 
			
			--Below u can see 2 if's these are if the Vert_keep value is set to true
				if(key == "s")  and planedebounce == false and on == true then
				local val = plane.Engine:findFirstChild("VerticalSpeed")
				if(val == nil) then return end
					downer = true
					uper = false 
					while downer do
					if(val.Value == -20) then downer = false break end
					if(downer==false) then break end
					val.Value = val.Value  -1
					wait(.1)
					end	
				end 

				if(key == "w")  and planedebounce == false and on == true then
				local val = plane.Engine:findFirstChild("VerticalSpeed")
				if(val == nil) then return end
					uper = true
					downer = false
					while uper==true do 
					if(uper == false) then break end
					if(val.Value >= 20) then
						uper = false
 
					end
					val.Value = val.Value +1
					
					wait(.1)
						end
				end 
		

	--[[	if(string.byte(key) == 20) and (on == true) then 
			local engine = plane.Engine
			local bg = engine.BodyGyro
				sideleft = true
				while sideleft do
				sideway = 20
				wait(.1)
			end
		end 
			
		if(string.byte(key) == 19) and (on == true) then 
			local engine = plane.Engine
			local bg = engine.BodyGyro
				sideright = true
				while sideright do
				sideway = -20
				wait(.1)
			end
		end 	]]--
	
		if(string.byte(key) == 23) and on then 
			local engine = plane.Engine
			local spd = engine.Speed
			if(spd.Value < 0) then 
			while spd.Value ~= 0 do
				spd.Value = spd.Value +1
			wait(.1)
			end
			elseif(spd.Value > 0) then 
			while spd.Value ~= 0 do
					spd.Value = spd.Value -1
			wait(.1)
			end
			elseif(spd.Value == 0) then spd.Value = 0
			return 
			end
		end 
