Advertisement
atai8676

auto wallhop script for roblox (MOBILE ONLY)

May 31st, 2024
40,992
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.48 KB | Gaming | 0 0
  1. local player = game.Players.LocalPlayer
  2. local UIS = game:GetService("UserInputService")
  3.  
  4. local flickEnabled = true
  5. local flickButton
  6. local xButton
  7.  
  8. -- Create the GUI elements
  9. local gui = Instance.new("ScreenGui")
  10. gui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  11.  
  12. local container = Instance.new("Frame")
  13. container.Size = UDim2.new(0.25, 0, 0.15, 0) -- Adjust size for a slightly smaller container
  14. container.Position = UDim2.new(0.7, 0, 0.1, 0) -- Move GUI to top right corner
  15. container.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  16. container.BorderSizePixel = 0
  17. container.Parent = gui
  18.  
  19. flickButton = Instance.new("TextButton")
  20. flickButton.Text = "FLICK"
  21. flickButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  22. flickButton.Size = UDim2.new(0.6, 0, 0.6, 0) -- Adjust size for a slightly bigger flick button
  23. flickButton.Position = UDim2.new(0.2, 0, 0.2, 0) -- Adjust position within the container
  24. flickButton.BackgroundColor3 = Color3.fromRGB(255, 165, 0) -- Orange color
  25. flickButton.Parent = container
  26.  
  27. xButton = Instance.new("TextButton")
  28. xButton.Text = "X"
  29. xButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  30. xButton.Size = UDim2.new(0.1, 0, 0.1, 0)
  31. xButton.Position = UDim2.new(0.85, 0, 0, 0)
  32. xButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  33. xButton.Parent = container
  34.  
  35. local function flickCamera90Degrees()
  36. local currentCam = workspace.CurrentCamera
  37. local initialPos = currentCam.CFrame.Position
  38. local initialRot = currentCam.CFrame - initialPos
  39. currentCam.CFrame = CFrame.new(initialPos) * CFrame.Angles(0, math.rad(90), 0) * initialRot
  40. print("Camera flicked 90 degrees!")
  41. end
  42.  
  43. local function flickCameraBack90Degrees()
  44. local currentCam = workspace.CurrentCamera
  45. local initialPos = currentCam.CFrame.Position
  46. local initialRot = currentCam.CFrame - initialPos
  47. currentCam.CFrame = CFrame.new(initialPos) * CFrame.Angles(0, math.rad(-90), 0) * initialRot
  48. print("Camera flicked back 90 degrees!")
  49. end
  50.  
  51. local function flickCameraSequence()
  52. flickCamera90Degrees()
  53. wait(0.03)
  54. flickCameraBack90Degrees()
  55. end
  56.  
  57. flickButton.MouseButton1Click:Connect(function()
  58. if flickEnabled then
  59. flickCameraSequence()
  60. end
  61. end)
  62.  
  63. xButton.MouseButton1Click:Connect(function()
  64. gui:Destroy()
  65. end)
  66.  
  67. UIS.TouchTap:Connect(function(touchPositions, inputState, inputObject)
  68. if inputState == Enum.UserInputState.Begin then
  69. if flickEnabled then
  70. flickCameraSequence()
  71. end
  72. end
  73. end)
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement