Advertisement
VenoxComeback

CF

Apr 15th, 2025
18
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. local Player = game.Players.LocalPlayer
  2. local UIS = game:GetService("UserInputService")
  3. local RunService = game:GetService("RunService")
  4.  
  5. local speed = 1 -- higher = faster, you can tweak this
  6. local enabled = false
  7.  
  8. -- Toggle with C
  9. UIS.InputBegan:Connect(function(input, gameProcessed)
  10. if not gameProcessed and input.KeyCode == Enum.KeyCode.C then
  11. enabled = not enabled
  12. end
  13. end)
  14.  
  15. RunService.RenderStepped:Connect(function()
  16. if not enabled then return end
  17.  
  18. local char = Player.Character
  19. if not char then return end
  20. local root = char:FindFirstChild("HumanoidRootPart")
  21. local humanoid = char:FindFirstChild("Humanoid")
  22.  
  23. if root and humanoid and humanoid.MoveDirection.Magnitude > 0 then
  24. local moveDirection = humanoid.MoveDirection.Unit
  25. root.CFrame = root.CFrame + (moveDirection * speed)
  26. end
  27. end)
  28.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement