Run it
Copy the script and paste it into your executor.
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
)
UserInputService.InputBegan:((input, gpe)
gpe
input.UserInputType == .UserInputType.MouseButton2
zoomEnabled = zoomEnabled
)
UserInputService.InputChanged:((input, gpe)
gpe
zoomEnabled
input.UserInputType == .UserInputType.MouseWheel
input.Position.Z >
currentZoomFOV = .(currentZoomFOV - SCROLL_STEP, MIN_ZOOM_FOV, MAX_ZOOM_FOV)
currentZoomFOV = .(currentZoomFOV + SCROLL_STEP, MIN_ZOOM_FOV, MAX_ZOOM_FOV)
)
player.CharacterAdded:(()
zoomEnabled =
currentZoomFOV =
camera.FieldOfView = NORMAL_FOV
camera.CameraType = .CameraType.Custom
)Zoom in with RMB scroll to zoom in and out.

Universal