Advertisement
Imakerblxscripts55

Untitled

Sep 15th, 2024
16
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. -- Place this LocalScript in a ScreenGui in StarterGui
  2.  
  3. local player = game.Players.LocalPlayer
  4. local character = player.Character or player.CharacterAdded:Wait()
  5. local humanoid = character:WaitForChild("Humanoid")
  6.  
  7. -- Create the GUI button
  8. local screenGui = Instance.new("ScreenGui")
  9. screenGui.Parent = player:WaitForChild("PlayerGui")
  10.  
  11. local button = Instance.new("TextButton")
  12. button.Size = UDim2.new(0, 200, 0, 50)
  13. button.Position = UDim2.new(0.5, -100, 0.5, -25)
  14. button.Text = "Change Speed"
  15. button.Parent = screenGui
  16.  
  17. -- Function to change speed
  18. local function changeSpeed()
  19. local newSpeed = 50 -- Change this value to your desired speed
  20. humanoid.WalkSpeed = newSpeed
  21. end
  22.  
  23. -- Connect button click to function
  24. button.MouseButton1Click:Connect(changeSpeed)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement