Advertisement
King12255

Roblox Walkspeed Gui

Dec 10th, 2024
527
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.51 KB | None | 0 0
  1. local ScreenGui = Instance.new("ScreenGui")
  2. local Frame = Instance.new("Frame")
  3. local Num = Instance.new("TextBox")
  4. local Plus = Instance.new("TextButton")
  5. local Minus = Instance.new("TextButton")
  6.  
  7. ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  8. ScreenGui.ResetOnSpawn = false
  9.  
  10. Frame.Size = UDim2.new(0, 200, 0, 100)
  11. Frame.Position = UDim2.new(0.5, -100, 0.5, -50)
  12. Frame.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  13. Frame.Parent = ScreenGui
  14. Frame.Active = true
  15. Frame.Draggable = true
  16.  
  17. Num.Size = UDim2.new(0.6, 0, 0.6, 0)
  18. Num.Position = UDim2.new(0.2, 0, 0.3, 0)
  19. Num.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  20. Num.TextColor3 = Color3.new(1, 1, 1)
  21. Num.TextScaled = true
  22. Num.Font = Enum.Font.SourceSans
  23. Num.ClearTextOnFocus = true
  24. Num.Parent = Frame
  25.  
  26. Plus.Size = UDim2.new(0.2, 0, 0.6, 0)
  27. Plus.Position = UDim2.new(0.8, 0, 0.3, 0)
  28. Plus.BackgroundColor3 = Color3.fromRGB(70, 70, 70)
  29. Plus.TextColor3 = Color3.new(1, 1, 1)
  30. Plus.TextScaled = true
  31. Plus.Font = Enum.Font.SourceSans
  32. Plus.Text = "+"
  33. Plus.Parent = Frame
  34.  
  35. Minus.Size = UDim2.new(0.2, 0, 0.6, 0)
  36. Minus.Position = UDim2.new(0, 0, 0.3, 0)
  37. Minus.BackgroundColor3 = Color3.fromRGB(70, 70, 70)
  38. Minus.TextColor3 = Color3.new(1, 1, 1)
  39. Minus.TextScaled = true
  40. Minus.Font = Enum.Font.SourceSans
  41. Minus.Text = "-"
  42. Minus.Parent = Frame
  43.  
  44. local player = game.Players.LocalPlayer
  45. local character = player.Character or player.CharacterAdded:Wait()
  46. local humanoid = character:WaitForChild("Humanoid")
  47.  
  48. local number = humanoid.WalkSpeed
  49.  
  50. local function UpdateNum()
  51.     Num.Text = tostring(number)
  52. end
  53.  
  54. Plus.MouseButton1Click:Connect(function()
  55.     number = number + 1
  56.     humanoid.WalkSpeed = number
  57.     UpdateNum()
  58. end)
  59.  
  60. Minus.MouseButton1Click:Connect(function()
  61.     if number > 0 then
  62.         number = number - 1
  63.         humanoid.WalkSpeed = number
  64.         UpdateNum()
  65.     end
  66. end)
  67.  
  68. Num.FocusLost:Connect(function(enterPressed)
  69.     if enterPressed then
  70.         local Value = tonumber(Num.Text)
  71.         if Value and Value > 0 then
  72.             number = Value
  73.             humanoid.WalkSpeed = number
  74.             UpdateNum()
  75.         else
  76.             UpdateNum()
  77.         end
  78.     end
  79. end)
  80.  
  81. humanoid:GetPropertyChangedSignal("WalkSpeed"):Connect(function()
  82.     if humanoid.WalkSpeed ~= number then
  83.         number = humanoid.WalkSpeed
  84.         UpdateNum()
  85.     end
  86. end)
  87.  
  88. game:GetService("StarterGui"):SetCore("SendNotification", {
  89.     Title = "WalkSpeed Gui",
  90.     Text = "Made By the_king.78",
  91.     Duration = 12
  92. })
  93.  
  94. UpdateNum()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement