local U=.25 local j=Vector3.new local H=CFrame.new local A=CFrame.Angles local Q=math.acos local u=math.cos local Y=math.sin local z=math.random local G=math.pi*2 local c={}local g=game.Workspace.CurrentCamera local o local D local x=1 local p local E=0 local i=0 local S=math.rad(80)local B=0 local v=require(script:WaitForChild("\068\097\109\112\105\110\103"))local t=require(script:WaitForChild("\069\097\115\105\110\103"))local X=v.new()local T=v.new()local C=v.new()C.P=3 C.D=.05 local I=false local K=0 local P=nil local q={{Pivot=H(0,3.5,-1.1),Offset=H(0,8,40),Ease=t.outQuint};{Pivot=H(0,3.5,-1.1);Offset=H(0,0,0);Ease=t.outQuint};{Pivot=H(0,-3.5,-0.5);Offset=H(0,0,0);Ease=t.outQuint}}
-- Time it takes to tween between view switches:
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,
	},
}
