Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local uis = game:GetService("UserInputService")
- local originalFOV = workspace.CurrentCamera.FieldOfView
- local zoomedIn = false
- local highZoomFOV = 10
- local normalFOV = 70
- uis.InputBegan:Connect(function(input)
- if input.KeyCode == Enum.KeyCode.V then
- if not zoomedIn then
- zoomedIn = true
- workspace.CurrentCamera.FieldOfView = highZoomFOV
- else
- zoomedIn = false
- workspace.CurrentCamera.FieldOfView = normalFOV
- end
- end
- end)
- uis.InputEnded:Connect(function(input)
- if input.KeyCode == Enum.KeyCode.V then
- workspace.CurrentCamera.FieldOfView = normalFOV
- zoomedIn = false
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement