local d=.25 local M=Vector3.new local b=CFrame.new local f=CFrame.Angles local t=math.acos local v=math.cos local w=math.sin local h=math.random local n=math.pi*2 local C={}local E=game.Workspace.CurrentCamera local r local H local T=1 local N local l=0 local p=0 local U=math.rad(80)local j=0 local q=require(script:WaitForChild("\068\097\109\112\105\110\103"))local W=require(script:WaitForChild("\069\097\115\105\110\103"))local A=q.new()local k=q.new()local R=q.new()R.P=3 R.D=.05 local V=false local c=0 local D=nil local Q={{Pivot=b(0,3.5,-1.1);Offset=b(0,8,40);Ease=W.outQuint};{Pivot=b(0,3.5,-1.1);Offset=b(0,0,0);Ease=W.outQuint};{Pivot=b(0,-3.5,-0.5);Offset=b(0,0,0);Ease=W.outQuint}}

local TWEEN_DURATION = 0.25


local V3 = Vector3.new
local CF = CFrame.new
local ANG = CFrame.Angles
local ACOS = math.acos
local COS = math.cos
local SIN = math.sin
local RAND = math.random
local TAU = math.pi * 2


local CamLock = {}

local cam = game.Workspace.CurrentCamera
local plane
local seat

local currentViewIndex = 1
local currentView

local viewRotH = 0
local viewRotV = 0
local MAX_VIEW_ROT_V = math.rad(80)

local mobileDeviceBank = 0

local Damping = require(script:WaitForChild("Damping"))
local easing = require(script:WaitForChild("Easing"))

local dampCam = Damping.new()
local dampRot = Damping.new()
local dampShake = Damping.new()
	dampShake.P = 3
	dampShake.D = 0.05


local tweening = false
local tweenStart = 0
local tweenFromView = nil



local views = {
	
	-- Pivot:   Point around which camera rotates
	-- Offset:  Camera offset from pivot point
	-- Ease:    Ease function used when tweening into the view
	
	-- Third-person:
	{
		Pivot   = CF(0, 3.5, -1.1);
		Offset  = CF(0, 8, 40);
		Ease    = easing.outQuint;
	};

	-- First-person:
	{
		Pivot   = CF(0, 3.5, -1.1);
		Offset  = CF(0, 0, 0);
		Ease    = easing.outQuint;
	};
	
	-- Landing gear:
	{
		Pivot   = CF(0, -3.5, -0.5);
		Offset  = CF(0, 0, 0);
		Ease    = easing.outQuint;
	};
	
}

