Advertisement
MawinCK

Zoom Script by me(Press "V" to active and off)

May 3rd, 2024
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. local uis = game:GetService("UserInputService")
  2. local originalFOV = workspace.CurrentCamera.FieldOfView
  3. local zoomedIn = false
  4. local highZoomFOV = 10
  5. local normalFOV = 70
  6.  
  7. uis.InputBegan:Connect(function(input)
  8. if input.KeyCode == Enum.KeyCode.V then
  9. if not zoomedIn then
  10. zoomedIn = true
  11. workspace.CurrentCamera.FieldOfView = highZoomFOV
  12. else
  13. zoomedIn = false
  14. workspace.CurrentCamera.FieldOfView = normalFOV
  15. end
  16. end
  17. end)
  18.  
  19. uis.InputEnded:Connect(function(input)
  20. if input.KeyCode == Enum.KeyCode.V then
  21. workspace.CurrentCamera.FieldOfView = normalFOV
  22. zoomedIn = false
  23. end
  24. end)
  25.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement