Advertisement
rrixh

unvrsl speed slider

Oct 10th, 2023
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.61 KB | None | 0 0
  1. -- put this skript in ServerScriptService
  2.  
  3. local SpeedGUI = Instance.new("ScreenGui")
  4. SpeedGUI.Name = "SpeedGUI"
  5. SpeedGUI.DisplayOrder = 1000
  6. SpeedGUI.IgnoreGuiInset = true
  7. SpeedGUI.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  8.  
  9. local SmallerFrame = Instance.new("Frame")
  10. SmallerFrame.Name = "SmallerSpeedFrame"
  11. SmallerFrame.Size = UDim2.new(0, 50, 0, 50)
  12. SmallerFrame.Position = UDim2.new(0.05, 0, 0.9, -60) -- Adjusted position
  13. SmallerFrame.BackgroundColor3 = Color3.new(0.4, 0, 0.7)
  14. SmallerFrame.BackgroundTransparency = 0.5
  15. SmallerFrame.Parent = SpeedGUI
  16.  
  17. local PlusButton = Instance.new("TextButton")
  18. PlusButton.Name = "PlusButton"
  19. PlusButton.Size = UDim2.new(1, 0, 1, 0)
  20. PlusButton.Position = UDim2.new(0, 0, 0, 0)
  21. PlusButton.BackgroundColor3 = Color3.new(0.4, 0, 0.7)
  22. PlusButton.TextColor3 = Color3.new(1, 1, 1)
  23. PlusButton.Text = "+"
  24. PlusButton.FontSize = Enum.FontSize.Size18
  25. PlusButton.Parent = SmallerFrame
  26.  
  27. local SpeedLabel = Instance.new("TextLabel")
  28. SpeedLabel.Name = "SpeedLabel"
  29. SpeedLabel.Size = UDim2.new(0, 200, 0, 50)
  30. SpeedLabel.Position = UDim2.new(1, 10, 0, 0)
  31. SpeedLabel.BackgroundColor3 = Color3.new(0.4, 0, 0.7)
  32. SpeedLabel.BackgroundTransparency = 0.5
  33. SpeedLabel.TextColor3 = Color3.new(1, 1, 1)
  34. SpeedLabel.Text = "Speed GUI"
  35. SpeedLabel.FontSize = Enum.FontSize.Size18
  36. SpeedLabel.Parent = SmallerFrame
  37.  
  38. local FullFrame = Instance.new("Frame")
  39. FullFrame.Name = "FullSpeedFrame"
  40. FullFrame.Size = UDim2.new(0, 350, 0, 150)
  41. FullFrame.Position = UDim2.new(0.05, 0, 0.5, -75)
  42. FullFrame.BackgroundColor3 = Color3.new(0.4, 0, 0.7)
  43. FullFrame.BackgroundTransparency = 0.5
  44. FullFrame.Parent = SpeedGUI
  45. FullFrame.Visible = false
  46.  
  47. local SetSpeedLabel = Instance.new("TextLabel")
  48. SetSpeedLabel.Name = "SetSpeedLabel"
  49. SetSpeedLabel.Size = UDim2.new(1, 0, 0.2, 0)
  50. SetSpeedLabel.Position = UDim2.new(0, 0, 0, 0)
  51. SetSpeedLabel.BackgroundColor3 = Color3.new(0.4, 0, 0.7)
  52. SetSpeedLabel.TextColor3 = Color3.new(1, 1, 1)
  53. SetSpeedLabel.Text = "Set Speed"
  54. SetSpeedLabel.FontSize = Enum.FontSize.Size18
  55. SetSpeedLabel.Parent = FullFrame
  56.  
  57. local SpeedInput = Instance.new("TextBox")
  58. SpeedInput.Name = "SpeedInput"
  59. SpeedInput.Size = UDim2.new(0.7, 0, 0.2, 0)
  60. SpeedInput.Position = UDim2.new(0.15, 0, 0.3, 0)
  61. SpeedInput.BackgroundColor3 = Color3.new(1, 1, 1)
  62. SpeedInput.PlaceholderText = "Enter Speed"
  63. SpeedInput.FontSize = Enum.FontSize.Size18
  64. SpeedInput.Parent = FullFrame
  65.  
  66. local SetSpeedButton = Instance.new("TextButton")
  67. SetSpeedButton.Name = "SetSpeedButton"
  68. SetSpeedButton.Size = UDim2.new(0.7, 0, 0.2, 0)
  69. SetSpeedButton.Position = UDim2.new(0.15, 0, 0.6, 0)
  70. SetSpeedButton.BackgroundColor3 = Color3.new(0, 0, 0)
  71. SetSpeedButton.TextColor3 = Color3.new(1, 1, 1)
  72. SetSpeedButton.Text = "Set Speed"
  73. SetSpeedButton.FontSize = Enum.FontSize.Size18
  74. SetSpeedButton.Parent = FullFrame
  75.  
  76. local MinusButton = Instance.new("TextButton")
  77. MinusButton.Name = "MinusButton"
  78. MinusButton.Size = UDim2.new(0.1, 0, 0.1, 0)
  79. MinusButton.Position = UDim2.new(0.9, 0, 0, 0)
  80. MinusButton.BackgroundColor3 = Color3.new(0, 0, 0)
  81. MinusButton.TextColor3 = Color3.new(1, 1, 1)
  82. MinusButton.Text = "-"
  83. MinusButton.FontSize = Enum.FontSize.Size18
  84. MinusButton.Parent = FullFrame
  85.  
  86. -- Credits Label
  87. local CreditLabel = Instance.new("TextLabel")
  88. CreditLabel.Name = "CreditLabel"
  89. CreditLabel.Size = UDim2.new(1, 0, 0.1, 0)
  90. CreditLabel.Position = UDim2.new(0, 0, 0.9, 0)
  91. CreditLabel.BackgroundColor3 = Color3.new(0.4, 0, 0.7)
  92. CreditLabel.BackgroundTransparency = 0.5
  93. CreditLabel.TextColor3 = Color3.new(1, 1, 1)
  94. CreditLabel.Text = "Made by Valfelx"
  95. CreditLabel.FontSize = Enum.FontSize.Size14
  96. CreditLabel.Parent = FullFrame
  97.  
  98. -- Function to expand the full GUI and hide the smaller one
  99. local function expandFullGUI()
  100.     SmallerFrame.Visible = false
  101.     FullFrame.Visible = true
  102. end
  103.  
  104. -- Function to toggle back to the smaller GUI when clicking the minus button
  105. MinusButton.MouseButton1Click:Connect(function()
  106.     SmallerFrame.Visible = true
  107.     FullFrame.Visible = false
  108. end)
  109.  
  110. -- Function to update the speed label and set the player's speed when the button is clicked
  111. SetSpeedButton.MouseButton1Click:Connect(function()
  112.     local newSpeed = tonumber(SpeedInput.Text)
  113.     if newSpeed then
  114.         SpeedLabel.Text = "Speed: " .. newSpeed
  115.         game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = newSpeed
  116.     else
  117.         warn("Invalid speed input")
  118.     end
  119. end)
  120.  
  121. -- Toggle the full GUI when clicking the plus button
  122. PlusButton.MouseButton1Click:Connect(function()
  123.     if FullFrame.Visible then
  124.         SmallerFrame.Visible = true
  125.         FullFrame.Visible = false
  126.     else
  127.         expandFullGUI()
  128.     end
  129. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement