Advertisement
Prokri43

Jh

Oct 11th, 2023
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. -- Create ScreenGui
  2. local screenGui = Instance.new("ScreenGui")
  3. screenGui.Parent = game.Players.LocalPlayer.PlayerGui
  4.  
  5. -- Create JumpPower TextBox
  6. local jumpPowerTextBox = Instance.new("TextBox")
  7. jumpPowerTextBox.Parent = screenGui
  8. jumpPowerTextBox.Position = UDim2.new(0.1, 0, 0.1, 0)
  9. jumpPowerTextBox.Size = UDim2.new(0, 200, 0, 30)
  10. jumpPowerTextBox.PlaceholderText = "Enter JumpPower"
  11.  
  12. -- Create WalkSpeed TextBox
  13. local walkSpeedTextBox = Instance.new("TextBox")
  14. walkSpeedTextBox.Parent = screenGui
  15. walkSpeedTextBox.Position = UDim2.new(0.1, 0, 0.3, 0)
  16. walkSpeedTextBox.Size = UDim2.new(0, 200, 0, 30)
  17. walkSpeedTextBox.PlaceholderText = "Enter WalkSpeed"
  18.  
  19. -- Create Apply Button
  20. local applyButton = Instance.new("TextButton")
  21. applyButton.Parent = screenGui
  22. applyButton.Position = UDim2.new(0.1, 0, 0.5, 0)
  23. applyButton.Size = UDim2.new(0, 100, 0, 30)
  24. applyButton.Text = "Apply Changes"
  25.  
  26. -- Function to apply changes
  27. local function applyChanges()
  28. local newJumpPower = tonumber(jumpPowerTextBox.Text)
  29. local newWalkSpeed = tonumber(walkSpeedTextBox.Text)
  30.  
  31. if newJumpPower and newWalkSpeed then
  32. game.Players.LocalPlayer.Character:FindFirstChild("Humanoid").JumpPower = newJumpPower
  33. game.Players.LocalPlayer.Character:FindFirstChild("Humanoid").WalkSpeed = newWalkSpeed
  34. else
  35. print("Invalid input")
  36. end
  37. end
  38.  
  39. -- Connect function to button click
  40. applyButton.MouseButton1Click:Connect(applyChanges)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement