function Camera()local v=workspace.CurrentCamera local U=0 local L=0 local C=0 local I=0 local G=0 local function y()if not pcall(function()G=DPadUp if GMode==2 then if math.abs(RStickX)>.1 then local v=1 if RStickX<0 then v=-1 end U=(v*math.abs((math.abs(RStickX)-.1)/.9))*-60 else U=0 end if math.abs(RStickY)>.1 then local v=1 if RStickY<0 then v=-1 end C=math.min((v*math.abs((math.abs(RStickY)-.1)/.9))*-75,30)else C=0 end else if U>I then U=math.max(I,U-20)elseif U<I then U=math.min(I,U+20)end C=0 end L=-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 I=math.min(1,car.DriveSeat.Velocity.Magnitude/500)local G=((car.DriveSeat.Position+Vector3.new(0,8+I*2,0))-(car.DriveSeat.CFrame*CFrame.Angles(math.rad(C),math.rad(U+L),0)).lookVector*17)+(car.DriveSeat.Velocity.Unit*-7)*I v.CoordinateFrame=CFrame.new(G,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 I=50 elseif v=="\120"then I=-180 elseif v=="\099"then I=-50 end end)mouse.KeyUp:connect(function(v)if v=="\122"and I==50 then I=0 elseif v=="\120"and(I==-160 or I==-180)then I=0 elseif v=="\099"and I==-50 then I=0 end end)table.insert(Binded,y)end Camera()
---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) > 0.1 then
						local sPos = 1
						if RStickX < 0 then
							sPos = -1
						end
						CRot = sPos * math.abs(((math.abs(RStickX) - 0.1) / 0.9)) * -60
					else
						CRot = 0
					end
					if math.abs(RStickY) > 0.1 then
						local sPos = 1
						if RStickY < 0 then
							sPos = -1
						end
						CUp = math.min(sPos * math.abs(((math.abs(RStickY) - 0.1) / 0.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()
