local Players = game:GetService("Players") local UserInputService = game:GetService("UserInputService") local RunService = game:GetService("RunService") local player = Players.LocalPlayer local camera = workspace.CurrentCamera local NORMAL_FOV = 70 local MIN_ZOOM_FOV = 10 local MAX_ZOOM_FOV = 40 local SCROLL_STEP = 3 local zoomEnabled = false local currentZoomFOV = 25 camera.CameraType = Enum.CameraType.Custom RunService.RenderStepped:Connect(function() if zoomEnabled then camera.FieldOfView = currentZoomFOV else camera.FieldOfView = NORMAL_FOV end end) UserInputService.InputBegan:Connect(function(input, gpe) if gpe then return end if input.UserInputType == Enum.UserInputType.MouseButton2 then zoomEnabled = not zoomEnabled end end) UserInputService.InputChanged:Connect(function(input, gpe) if gpe then return end if not zoomEnabled then return end if input.UserInputType == Enum.UserInputType.MouseWheel then if input.Position.Z > 0 then currentZoomFOV = math.clamp(currentZoomFOV - SCROLL_STEP, MIN_ZOOM_FOV, MAX_ZOOM_FOV) else currentZoomFOV = math.clamp(currentZoomFOV + SCROLL_STEP, MIN_ZOOM_FOV, MAX_ZOOM_FOV) end end end) player.CharacterAdded:Connect(function() zoomEnabled = false currentZoomFOV = 25 camera.FieldOfView = NORMAL_FOV camera.CameraType = Enum.CameraType.Custom end)