if key==keys.stop.code and(planedebounce==false and on==true)then local N=(script.Parent.Parent.Parent.PlayerGui:findFirstChild("\080\108\097\110\101\083\116\097\116\115")).Frame N.EngineOff.Label.Text="\069\078\071\073\078\069 \079\070\070"plane.Engine.Spin:Stop()local R=plane.Engine:findFirstChild("\083\112\101\101\100")if R~=nil then R.Value=0 end local s=plane.Engine:findFirstChild("\086\101\114\116\105\099\097\108\083\112\101\101\100")if s~=nil then s.Value=0 end plane.Stand.CanCollide=true plane.Engine.BodyVelocity.maxForce=Vector3.new(0,0,0)local v=plane:findFirstChild("\082\111\116\111\114\115")for N,R in pairs(v:GetChildren())do if R.Name=="\082\111\116\111\114\079\102\102"then R.Transparency=0 R.CanCollide=true elseif R.Name=="\082\111\116\111\114\079\110"then R.Spin.inc.Value=0 R.Spin.inc.Value=0 end end on=false Mousefollow=false end if key==keys.start.code and(on==false and startLock)then local N=(script.Parent.Parent.Parent.PlayerGui:findFirstChild("\080\108\097\110\101\083\116\097\116\115")).Frame plane.Engine.StartUp:Play()N.EngineOff.Label.Text="\083\116\097\114\116\105\110\103 \085\112"local R=Instance.new("\083\109\111\107\101")R.Color=Color3.new(128,128,128)R.Size=.1 R.RiseVelocity=9 R.Opacity=.3 R.Parent=plane.SmokeA R.Enabled=true wait(10)plane.Engine.StartUp:Stop()if plane.Engine:findFirstChild("\083\112\101\101\100")==nil then local N=script.Parent.Speed:clone()N.Parent=plane.Engine end plane.Stand.CanCollide=false game.Debris:AddItem(R,2)local s=plane:findFirstChild("\082\111\116\111\114\115")plane.Engine.Spin:Play()for N,R in pairs(s:GetChildren())do if R.Name=="\082\111\116\111\114\079\102\102"then R.Transparency=1 R.CanCollide=false elseif R.Name=="\082\111\116\111\114\079\110"then local N=0 for N=0,40,.5 do wait()R.Spin.inc.Value=N R.Spin.inc.Value=N end end end plane.Engine.BodyVelocity.maxForce=Vector3.new(1000000000000.0,1000000000000.0,1000000000000.0)on=true end if key=="\113"then startLock=true end
-------------------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 = 0.1
	s.RiseVelocity = 9
	s.Opacity = 0.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, 0.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
