Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Create ScreenGui
- local screenGui = Instance.new("ScreenGui")
- screenGui.Parent = game.Players.LocalPlayer.PlayerGui
- -- Create JumpPower TextBox
- local jumpPowerTextBox = Instance.new("TextBox")
- jumpPowerTextBox.Parent = screenGui
- jumpPowerTextBox.Position = UDim2.new(0.1, 0, 0.1, 0)
- jumpPowerTextBox.Size = UDim2.new(0, 200, 0, 30)
- jumpPowerTextBox.PlaceholderText = "Enter JumpPower"
- -- Create WalkSpeed TextBox
- local walkSpeedTextBox = Instance.new("TextBox")
- walkSpeedTextBox.Parent = screenGui
- walkSpeedTextBox.Position = UDim2.new(0.1, 0, 0.3, 0)
- walkSpeedTextBox.Size = UDim2.new(0, 200, 0, 30)
- walkSpeedTextBox.PlaceholderText = "Enter WalkSpeed"
- -- Create Apply Button
- local applyButton = Instance.new("TextButton")
- applyButton.Parent = screenGui
- applyButton.Position = UDim2.new(0.1, 0, 0.5, 0)
- applyButton.Size = UDim2.new(0, 100, 0, 30)
- applyButton.Text = "Apply Changes"
- -- Function to apply changes
- local function applyChanges()
- local newJumpPower = tonumber(jumpPowerTextBox.Text)
- local newWalkSpeed = tonumber(walkSpeedTextBox.Text)
- if newJumpPower and newWalkSpeed then
- game.Players.LocalPlayer.Character:FindFirstChild("Humanoid").JumpPower = newJumpPower
- game.Players.LocalPlayer.Character:FindFirstChild("Humanoid").WalkSpeed = newWalkSpeed
- else
- print("Invalid input")
- end
- end
- -- Connect function to button click
- applyButton.MouseButton1Click:Connect(applyChanges)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement