-------------------Start_and_Stop-------------------




		

		if (key==keys.stop.code) and planedebounce == false and (on == true) then--if Shutting down
				local PS = script.Parent.Parent.Parent.PlayerGui:findFirstChild("PlaneStats").Frame
				PS.EngineOff.Label.Text = "ENGINE OFF"
				plane.Engine.Spin:Stop()
				local spd = plane.Engine:findFirstChild("Speed")
				if (spd ~= nil) then
				spd.Value = 0
				end
				local spd = plane.Engine:findFirstChild("VerticalSpeed")
				if (spd ~= nil) then
				spd.Value = 0
				end
						plane.Stand.CanCollide = true
				plane.Engine.BodyVelocity.maxForce = Vector3.new(0,0,0)
					local mod = plane:findFirstChild("Rotors")
					for i,v in pairs(mod:GetChildren()) do 
					if(v.Name == "RotorOff") then
					v.Transparency = 0
					v.CanCollide = true
					elseif(v.Name == "RotorOn") then
					v.Spin.inc.Value = 0
					v.Spin.inc.Value = 0
					end
					end
				
					on = false
					Mousefollow=false
				end 
     	if (key==keys.start.code) and (on == false) and startLock then
				local PS = script.Parent.Parent.Parent.PlayerGui:findFirstChild("PlaneStats").Frame
				plane.Engine.StartUp:Play()
				PS.EngineOff.Label.Text = "Starting Up"
				local s = Instance.new("Smoke") 
				s.Color = Color3.new(128,128,128)
				s.Size = .1
				s.RiseVelocity = 9
				s.Opacity = .3
				s.Parent = plane.SmokeA
				s.Enabled = true
				wait(10)
				plane.Engine.StartUp:Stop()
				if (plane.Engine:findFirstChild("Speed") == nil) then 
				local speed = script.Parent.Speed:clone()
				speed.Parent = plane.Engine
				end 
						plane.Stand.CanCollide = false 
						
						game.Debris:AddItem(s,2)
						local mod = plane:findFirstChild("Rotors")
						plane.Engine.Spin:Play()
						for i,v in pairs(mod:GetChildren()) do
						if(v.Name == "RotorOff") then
						v.Transparency = 1
						v.CanCollide = false
						elseif(v.Name == "RotorOn") then 
							local spininc = 0
							for i = 0, 40, .5 do
								wait()
								v.Spin.inc.Value = i
								v.Spin.inc.Value = i
							end
						end
						end 
						plane.Engine.BodyVelocity.maxForce = Vector3.new(1e+012,1e+012,1e+012)
					on = true
				end
		
				if(key == "q") then 
					startLock = true
				end 
