Advertisement
severalpeople1

Untitled

Jul 22nd, 2024
631
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. local player = game.Players.LocalPlayer
  2. local UIS = game:GetService("UserInputService")
  3.  
  4. local flickEnabled = true
  5.  
  6. local function flickCamera90Degrees()
  7. local currentCam = workspace.CurrentCamera
  8. local initialPos = currentCam.CFrame.Position
  9. local initialRot = currentCam.CFrame - initialPos
  10. currentCam.CFrame = CFrame.new(initialPos) * CFrame.Angles(0, math.rad(90), 0) * initialRot
  11.  
  12. end
  13.  
  14. local function flickCameraBack90Degrees()
  15. local currentCam = workspace.CurrentCamera
  16. local initialPos = currentCam.CFrame.Position
  17. local initialRot = currentCam.CFrame - initialPos
  18. currentCam.CFrame = CFrame.new(initialPos) * CFrame.Angles(0, math.rad(-90), 0) * initialRot
  19.  
  20. end
  21.  
  22. local function flickCameraSequence()
  23. flickCamera90Degrees()
  24. wait(0.03)
  25. flickCameraBack90Degrees()
  26. end
  27.  
  28. UIS.InputBegan:Connect(function(input, processed)
  29. if not processed and input.KeyCode == Enum.KeyCode.E then
  30. if flickEnabled then
  31. flickCameraSequence()
  32. end
  33. end
  34. end)
  35.  
  36. UIS.TouchTap:Connect(function(touchPositions, inputState, inputObject)
  37. if inputState == Enum.UserInputState.Begin then
  38. if flickEnabled then
  39. flickCameraSequence()
  40. end
  41. end
  42. end)
  43.  
Advertisement
Comments
  • atai8676
    124 days (edited)
    # text 0.08 KB | 0 0
    1. man this is my script what the hell im not lying u can click on my profile and check
    2.  
Add Comment
Please, Sign In to add comment
Advertisement