Advertisement
Kelsondre69

Jump power changer script for roblox

May 30th, 2024 (edited)
591
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.49 KB | None | 0 0
  1. -- Create the ScreenGui
  2. local screenGui = Instance.new("ScreenGui")
  3. screenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  4. screenGui.Name = "JumpPowerGui"
  5.  
  6. -- Create the Frame
  7. local frame = Instance.new("Frame")
  8. frame.Parent = screenGui
  9. frame.BackgroundColor3 = Color3.new(1, 1, 1)
  10. frame.Size = UDim2.new(0, 300, 0, 250) -- Increased height to accommodate the label
  11. frame.Position = UDim2.new(0.5, -150, 0.5, -125)
  12. frame.Active = true -- Make frame draggable
  13.  
  14. -- Enable dragging of the Frame
  15. local UIS = game:GetService("UserInputService")
  16. local dragging
  17. local dragInput
  18. local dragStart
  19. local startPos
  20.  
  21. local function update(input)
  22. local delta = input.Position - dragStart
  23. frame.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  24. end
  25.  
  26. frame.InputBegan:Connect(function(input)
  27. if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  28. dragging = true
  29. dragStart = input.Position
  30. startPos = frame.Position
  31.  
  32. input.Changed:Connect(function()
  33. if input.UserInputState == Enum.UserInputState.End then
  34. dragging = false
  35. end
  36. end)
  37. end
  38. end)
  39.  
  40. frame.InputChanged:Connect(function(input)
  41. if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  42. dragInput = input
  43. end
  44. end)
  45.  
  46. UIS.InputChanged:Connect(function(input)
  47. if input == dragInput and dragging then
  48. update(input)
  49. end
  50. end)
  51.  
  52. -- Create the TextBox
  53. local textBox = Instance.new("TextBox")
  54. textBox.Parent = frame
  55. textBox.Size = UDim2.new(0, 200, 0, 50)
  56. textBox.Position = UDim2.new(0.5, -100, 0.2, -25)
  57. textBox.Text = "Enter JumpPower"
  58. textBox.TextSize = 18
  59. textBox.TextScaled = true -- Scale the text to fit within the box
  60. textBox.ClearTextOnFocus = true
  61.  
  62. -- Create the TextButton
  63. local button = Instance.new("TextButton")
  64. button.Parent = frame
  65. button.Size = UDim2.new(0, 100, 0, 50)
  66. button.Position = UDim2.new(0.5, -50, 0.6, -25)
  67. button.Text = "Set JumpPower"
  68. button.TextSize = 18
  69. button.TextScaled = true -- Scale the text to fit within the button
  70.  
  71. -- Create the Label
  72. local label = Instance.new("TextLabel")
  73. label.Parent = frame
  74. label.Size = UDim2.new(0, 280, 0, 50)
  75. label.Position = UDim2.new(0.5, -140, 0.85, -25)
  76. label.Text = "Follow me on roblox, I am LuckymensLostAcc"
  77. label.TextSize = 18
  78. label.TextScaled = true -- Scale the text to fit within the label
  79. label.BackgroundTransparency = 1 -- Make the background transparent
  80.  
  81. -- Rainbow Background Coroutine
  82. local function rainbowBackground()
  83. local hue = 0
  84. while true do
  85. hue = hue + 1 / 360
  86. if hue > 1 then
  87. hue = 0
  88. end
  89. frame.BackgroundColor3 = Color3.fromHSV(hue, 1, 1)
  90. wait(0.1)
  91. end
  92. end
  93.  
  94. -- Start the Rainbow Background Coroutine
  95. coroutine.wrap(rainbowBackground)()
  96.  
  97. -- Function to set JumpPower
  98. local function setJumpPower()
  99. local player = game.Players.LocalPlayer
  100. local character = player.Character or player.CharacterAdded:Wait()
  101. local humanoid = character:FindFirstChildOfClass("Humanoid")
  102. local jumpPower = tonumber(textBox.Text)
  103. if humanoid and jumpPower then
  104. humanoid.JumpPower = jumpPower
  105. else
  106. textBox.Text = "Invalid Input"
  107. end
  108. end
  109.  
  110. -- Connect the button to setJumpPower function
  111. button.MouseButton1Click:Connect(setJumpPower)
  112.  
Tags: #roblox
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement