SOU1LESSSIMREAL

Speed gui by me

Feb 4th, 2024
1,121
-1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.63 KB | None | 0 1
  1. local gui = Instance.new("ScreenGui")
  2. gui.Name = "SpeedGUI"
  3. gui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  4.  
  5.  
  6. local frame = Instance.new("Frame")
  7. frame.Size = UDim2.new(0, 150, 0, 50)
  8. frame.Position = UDim2.new(0, 10, 0, 10)
  9. frame.BackgroundColor3 = Color3.new(0.5, 0.5, 0.5)
  10. frame.Parent = gui
  11.  
  12.  
  13. local speedLabel = Instance.new("TextLabel")
  14. speedLabel.Size = UDim2.new(1, -10, 0, 20)
  15. speedLabel.Position = UDim2.new(0, 5, 0, 5)
  16. speedLabel.Text = "Walkspeed: " .. tostring(game.Players.LocalPlayer.Character.Humanoid.WalkSpeed)
  17. speedLabel.TextColor3 = Color3.new(1, 1, 1)
  18. speedLabel.BackgroundTransparency = 1
  19. speedLabel.Parent = frame
  20.  
  21.  
  22. local increaseButton = Instance.new("TextButton")
  23. increaseButton.Size = UDim2.new(0.4, -5, 0, 20)
  24. increaseButton.Position = UDim2.new(0, 5, 0, 30)
  25. increaseButton.Text = "+"
  26. increaseButton.Parent = frame
  27.  
  28.  
  29. local decreaseButton = Instance.new("TextButton")
  30. decreaseButton.Size = UDim2.new(0.4, -5, 0, 20)
  31. decreaseButton.Position = UDim2.new(0.6, 0, 0, 30)
  32. decreaseButton.Text = "-"
  33. decreaseButton.Parent = frame
  34.  
  35.  
  36. increaseButton.MouseButton1Click:Connect(function()
  37.     game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = game.Players.LocalPlayer.Character.Humanoid.WalkSpeed + 5
  38.     speedLabel.Text = "Walkspeed: " .. tostring(game.Players.LocalPlayer.Character.Humanoid.WalkSpeed)
  39. end)
  40.  
  41.  
  42. decreaseButton.MouseButton1Click:Connect(function()
  43.     game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = game.Players.LocalPlayer.Character.Humanoid.WalkSpeed - 5
  44.     speedLabel.Text = "Walkspeed: " .. tostring(game.Players.LocalPlayer.Character.Humanoid.WalkSpeed)
  45. end)
Advertisement
Add Comment
Please, Sign In to add comment