orl

pres f and see what happens

orl
Feb 11th, 2025
21
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.64 KB | None | 0 0
  1. -- Define a variable to hold the pastebin code function (replace with your actual code)
  2. local pastebinCode = function()
  3. -- Paste your script code here that you would fetch from Pastebin
  4. print("Executing pastebin code!")
  5. -- Example of code from the pastebin
  6. -- You can remove this part and replace it with your own code
  7. end
  8.  
  9. local movementEnabled = true -- Variable to track whether movement is enabled
  10.  
  11. -- Get the UserInputService
  12. local UserInputService = game:GetService("UserInputService")
  13. local Players = game:GetService("Players")
  14. local LocalPlayer = Players.LocalPlayer
  15.  
  16. -- Define your hotkey here
  17. local hotkey = Enum.KeyCode.F -- Change this to your desired hotkey
  18.  
  19. -- Function to toggle movement
  20. local function toggleMovement()
  21. local character = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
  22. local humanoid = character:FindFirstChildOfClass("Humanoid")
  23. if humanoid then
  24. movementEnabled = not movementEnabled -- Toggle the movement state
  25. humanoid.PlatformStand = not movementEnabled -- Disables movement if set to true
  26. if movementEnabled then
  27. print("Movement enabled.")
  28. else
  29. print("Movement disabled.")
  30. end
  31. end
  32. end
  33.  
  34. -- Run the pastebin code when the F key is pressed
  35. UserInputService.InputBegan:Connect(function(input, gameProcessedEvent)
  36. if not gameProcessedEvent and input.KeyCode == hotkey then
  37. -- Execute the pastebin code
  38. pastebinCode() -- Execute the code
  39. toggleMovement() -- Toggle movement
  40. print("Hotkey pressed! Loaded and ran pastebin code, toggled movement.")
  41. end
  42. end)
Advertisement
Add Comment
Please, Sign In to add comment