function Camera()local v=workspace.CurrentCamera local o=0 local F=0 local z=0 local f=0 local Q=0 local function K()if not pcall(function()Q=DPadUp if GMode==2 then if math.abs(RStickX)>.1 then local v=1 if RStickX<0 then v=-1 end o=(v*math.abs((math.abs(RStickX)-.1)/.9))*-60 else o=0 end if math.abs(RStickY)>.1 then local v=1 if RStickY<0 then v=-1 end z=math.min((v*math.abs((math.abs(RStickY)-.1)/.9))*-75,30)else z=0 end else if o>f then o=math.max(f,o-20)elseif o<f then o=math.min(f,o+20)end z=0 end F=-180*ButtonR3 v.CameraSubject=car.DriveSeat v.FieldOfView=70 if GMode==0 then v.CameraType=Enum.CameraType.Custom player.CameraMaxZoomDistance=400 else v.CameraType="\083\099\114\105\112\116\097\098\108\101"local f=math.min(1,car.DriveSeat.Velocity.Magnitude/500)local Q=((car.DriveSeat.Position+Vector3.new(0,8+f*2,0))-(car.DriveSeat.CFrame*CFrame.Angles(math.rad(z),math.rad(o+F),0)).lookVector*17)+(car.DriveSeat.Velocity.Unit*-7)*f v.CoordinateFrame=CFrame.new(Q,car.DriveSeat.Position)end end)then v.FieldOfView=70 v.CameraSubject=player.Character.Humanoid v.CameraType=Enum.CameraType.Custom player.CameraMaxZoomDistance=400 run:UnbindFromRenderStep("\067\097\109\085\112\100\097\116\101")end end mouse.KeyDown:connect(function(v)if v=="\122"then f=50 elseif v=="\120"then f=-180 elseif v=="\099"then f=-50 end end)mouse.KeyUp:connect(function(v)if v=="\122"and f==50 then f=0 elseif v=="\120"and(f==-160 or f==-180)then f=0 elseif v=="\099"and f==-50 then f=0 end end)table.insert(Binded,K)end Camera()

function Camera()
	local cam=workspace.CurrentCamera
	local CRot=0
	local CBack=0
	local CUp=0
	local look=0
	local camChange = 0
	local function CamUpdate()
		if not pcall (function()
			camChange=DPadUp
			if GMode==2 then
				if math.abs(RStickX)>.1 then
					local sPos=1
					if RStickX<0 then sPos=-1 end
					CRot=sPos*math.abs(((math.abs(RStickX)-.1)/(.9)))*-60
				else
					CRot=0
				end
				if math.abs(RStickY)>.1 then
					local sPos=1
					if RStickY<0 then sPos=-1 end
					CUp=math.min(sPos*math.abs(((math.abs(RStickY)-.1)/(.9)))*-75,30)
				else
					CUp=0
				end
			else
				if CRot>look then
					CRot=math.max(look,CRot-20)
				elseif CRot<look then
					CRot=math.min(look,CRot+20)
				end
				CUp=0
			end
			CBack=-180*ButtonR3
			cam.CameraSubject=car.DriveSeat
			cam.FieldOfView=70
			if GMode==0 then
				cam.CameraType=Enum.CameraType.Custom
				player.CameraMaxZoomDistance=400
			else
				cam.CameraType = "Scriptable"
				local pspeed = math.min(1,car.DriveSeat.Velocity.Magnitude/500)
				local cc = car.DriveSeat.Position+Vector3.new(0,8+(pspeed*2),0)-((car.DriveSeat.CFrame*CFrame.Angles(math.rad(CUp),math.rad(CRot+CBack),0)).lookVector*17)+(car.DriveSeat.Velocity.Unit*-7*pspeed)
				cam.CoordinateFrame = CFrame.new(cc,car.DriveSeat.Position)
			end
		end) then
			cam.FieldOfView=70
			cam.CameraSubject=player.Character.Humanoid
			cam.CameraType=Enum.CameraType.Custom
			player.CameraMaxZoomDistance=400
			run:UnbindFromRenderStep("CamUpdate")
		end
	end
	mouse.KeyDown:connect(function(key)
		if key=="z" then
			look=50
		elseif key=="x" then
			look=-180
		elseif key=="c" then
			look=-50
		end
	end)
	mouse.KeyUp:connect(function(key)
		if key=="z" and look==50 then
			look=0
		elseif key=="x" and (look==-160 or look==-180) then
			look=0
		elseif key=="c" and look==-50 then
			look=0
		end
	end)
	--run:BindToRenderStep("CamUpdate",Enum.RenderPriority.Camera.Value,CamUpdate)
	--table.insert(Binded,"CamUpdate")
	table.insert(Binded,CamUpdate)
end
Camera()