Advertisement
Steamhesaproblox

Roblox Wallhop Script

May 1st, 2025
145
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
RBScript 5.97 KB | Gaming | 0 0
  1. local screenGui = Instance.new("ScreenGui")
  2. screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  3. screenGui.ResetOnSpawn = false
  4.  
  5. local frame = Instance.new("Frame")
  6. frame.Parent = screenGui
  7. frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  8. frame.Size = UDim2.new(0, 200, 0, 100)
  9. frame.Position = UDim2.new(0.5, -100, 0.5, -50)
  10. frame.Active = true
  11. frame.Draggable = true
  12.  
  13. local onButton = Instance.new("TextButton")
  14. onButton.Parent = frame
  15. onButton.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
  16. onButton.Size = UDim2.new(0, 60, 0, 30)
  17. onButton.Position = UDim2.new(0, 20, 0, 20)
  18. onButton.Text = "On"
  19. onButton.TextScaled = true
  20.  
  21. local offButton = Instance.new("TextButton")
  22. offButton.Parent = frame
  23. offButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
  24. offButton.Size = UDim2.new(0, 60, 0, 30)
  25. offButton.Position = UDim2.new(0, 120, 0, 20)
  26. offButton.Text = "Off"
  27. offButton.TextScaled = true
  28.  
  29. local destroyButton = Instance.new("TextButton")
  30. destroyButton.Parent = frame
  31. destroyButton.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  32. destroyButton.Size = UDim2.new(0, 160, 0, 30)
  33. destroyButton.Position = UDim2.new(0, 20, 0, 60)
  34. destroyButton.Text = "Destroy"
  35. destroyButton.TextScaled = true
  36.  
  37. local statusLabel = Instance.new("TextLabel")
  38. statusLabel.Parent = frame
  39. statusLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  40. statusLabel.Size = UDim2.new(0, 200, 0, 30)
  41. statusLabel.Position = UDim2.new(0, 0, 0, -30)
  42. statusLabel.Text = "WallHop V2: Off"
  43. statusLabel.TextColor3 = Color3.fromRGB(255, 0, 0)
  44. statusLabel.TextScaled = true
  45.  
  46. local toggle = false
  47. local InfiniteJumpEnabled = true
  48. local UserInputService = game:GetService("UserInputService")
  49. local Players = game:GetService("Players")
  50. local Workspace = game:GetService("Workspace")
  51. local RunService = game:GetService("RunService")
  52.  
  53. local raycastParams = RaycastParams.new()
  54. raycastParams.FilterType = Enum.RaycastFilterType.Blacklist
  55.  
  56. local function getWallRaycastResult()
  57.     local player = Players.LocalPlayer
  58.     local character = player.Character
  59.     if not character then return nil end
  60.     local humanoidRootPart = character:FindFirstChild("HumanoidRootPart")
  61.     if not humanoidRootPart then return nil end
  62.  
  63.     raycastParams.FilterDescendantsInstances = {character}
  64.  
  65.     local directions = {
  66.         humanoidRootPart.CFrame.LookVector,
  67.         -humanoidRootPart.CFrame.LookVector,
  68.         humanoidRootPart.CFrame.RightVector,
  69.         -humanoidRootPart.CFrame.RightVector
  70.     }
  71.     local detectionDistance = 2
  72.     local closestHit = nil
  73.     local minDistance = detectionDistance + 1
  74.  
  75.     for _, direction in pairs(directions) do
  76.         local ray = Workspace:Raycast(
  77.             humanoidRootPart.Position,
  78.             direction * detectionDistance,
  79.             raycastParams
  80.         )
  81.         if ray and ray.Instance then
  82.              if ray.Distance < minDistance then
  83.                  minDistance = ray.Distance
  84.                  closestHit = ray
  85.              end
  86.         end
  87.     end
  88.     return closestHit
  89. end
  90.  
  91. onButton.MouseButton1Click:Connect(function()
  92.     statusLabel.Text = "WallHop V2: On"
  93.     statusLabel.TextColor3 = Color3.fromRGB(0, 255, 0)
  94.     toggle = true
  95. end)
  96.  
  97. offButton.MouseButton1Click:Connect(function()
  98.     statusLabel.Text = "WallHop V2: Off"
  99.     statusLabel.TextColor3 = Color3.fromRGB(255, 0, 0)
  100.     toggle = false
  101. end)
  102.  
  103. destroyButton.MouseButton1Click:Connect(function()
  104.     screenGui:Destroy()
  105. end)
  106.  
  107. UserInputService.JumpRequest:Connect(function()
  108.     if not toggle or not InfiniteJumpEnabled then return end
  109.  
  110.     local player = Players.LocalPlayer
  111.     local character = player.Character
  112.     local humanoid = character and character:FindFirstChildOfClass("Humanoid")
  113.     local rootPart = character and character:FindFirstChild("HumanoidRootPart")
  114.     local camera = Workspace.CurrentCamera
  115.  
  116.     if not (humanoid and rootPart and camera) then return end
  117.  
  118.     local wallRayResult = getWallRaycastResult()
  119.  
  120.     if wallRayResult then
  121.         InfiniteJumpEnabled = false
  122.  
  123.         local wallNormal = wallRayResult.Normal
  124.         local horizontalWallNormal = Vector3.new(wallNormal.X, 0, wallNormal.Z).Unit
  125.         if horizontalWallNormal.Magnitude < 0.1 then
  126.              horizontalWallNormal = (rootPart.CFrame.LookVector * Vector3.new(1,0,1)).Unit
  127.              if horizontalWallNormal.Magnitude < 0.1 then horizontalWallNormal = Vector3.new(0,0,-1) end
  128.         end
  129.         local baseDirectionAwayFromWall = horizontalWallNormal
  130.  
  131.         local cameraLook = camera.CFrame.LookVector
  132.         local horizontalCameraLook = Vector3.new(cameraLook.X, 0, cameraLook.Z).Unit
  133.         if horizontalCameraLook.Magnitude < 0.1 then horizontalCameraLook = baseDirectionAwayFromWall end
  134.  
  135.         local maxInfluenceAngle = math.rad(40)
  136.         local dot = math.clamp(baseDirectionAwayFromWall:Dot(horizontalCameraLook), -1, 1)
  137.         local angleBetween = math.acos(dot)
  138.         local cross = baseDirectionAwayFromWall:Cross(horizontalCameraLook)
  139.         local rotationSign = math.sign(cross.Y)
  140.         if rotationSign == 0 then angleBetween = 0 end
  141.         local actualInfluenceAngle = math.min(angleBetween, maxInfluenceAngle)
  142.         local adjustmentRotation = CFrame.Angles(0, actualInfluenceAngle * rotationSign, 0)
  143.         local initialTargetLookDirection = adjustmentRotation * baseDirectionAwayFromWall
  144.  
  145.         rootPart.CFrame = CFrame.lookAt(rootPart.Position, rootPart.Position + initialTargetLookDirection)
  146.  
  147.         RunService.Heartbeat:Wait()
  148.  
  149.         local didJump = false
  150.         if humanoid and humanoid:GetState() ~= Enum.HumanoidStateType.Dead then
  151.              humanoid:ChangeState(Enum.HumanoidStateType.Jumping)
  152.              didJump = true
  153.         end
  154.  
  155.         if didJump then
  156.              local directionTowardsWall = -baseDirectionAwayFromWall
  157.              rootPart.CFrame = CFrame.lookAt(rootPart.Position, rootPart.Position + directionTowardsWall)
  158.         end
  159.  
  160.         task.wait(0.15)
  161.         InfiniteJumpEnabled = true
  162.     end
  163. end)
  164.  
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement