Advertisement
atai8676

auto wallhop script for roblox (PC ONLY)

May 28th, 2024 (edited)
10,186
1
Never
2
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | Gaming | 1 0
  1. local UIS = game:GetService("UserInputService")
  2.  
  3. local function flickCamera90Degrees()
  4. local currentCam = workspace.CurrentCamera
  5. local initialPos = currentCam.CFrame.Position
  6. local initialRot = currentCam.CFrame - initialPos
  7. currentCam.CFrame = CFrame.new(initialPos) * CFrame.Angles(0, math.rad(90), 0) * initialRot -- Rotate the camera by 90 degrees around the Y-axis while maintaining the position and orientation
  8. print("Camera flicked 90 degrees!")
  9. end
  10.  
  11. local function flickCameraBack90Degrees()
  12. local currentCam = workspace.CurrentCamera
  13. local initialPos = currentCam.CFrame.Position
  14. local initialRot = currentCam.CFrame - initialPos
  15. currentCam.CFrame = CFrame.new(initialPos) * CFrame.Angles(0, math.rad(-90), 0) * initialRot -- Rotate the camera back by -90 degrees around the Y-axis while maintaining the position and orientation
  16. print("Camera flicked back 90 degrees!")
  17. end
  18.  
  19. local function flickCameraSequence()
  20. flickCamera90Degrees()
  21. wait(0.03) -- Adjusted wait time for slightly faster flick speed
  22. flickCameraBack90Degrees()
  23. end
  24.  
  25. UIS.InputBegan:Connect(function(input, processed)
  26. if not processed and input.KeyCode == Enum.KeyCode.Q then
  27. flickCameraSequence()
  28. end
  29. end)
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement