Advertisement
27x34k

WalkSpeed Changer

Jan 6th, 2022
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.40 KB | None | 0 0
  1. -- Gui to Lua
  2. -- Version: 3.2
  3.  
  4. -- Instances:
  5.  
  6. local speed = Instance.new("ScreenGui")
  7. local Frame = Instance.new("Frame")
  8. local speedmanager = Instance.new("TextBox")
  9. local UICorner = Instance.new("UICorner")
  10. local TextButton = Instance.new("TextButton")
  11. local UICorner_2 = Instance.new("UICorner")
  12. local TextButton_2 = Instance.new("TextButton")
  13. local UICorner_3 = Instance.new("UICorner")
  14. local UICorner_4 = Instance.new("UICorner")
  15.  
  16. --Properties:
  17.  
  18. speed.Name = "speed"
  19. speed.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  20. speed.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  21.  
  22. Frame.Parent = speed
  23. Frame.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  24. Frame.Position = UDim2.new(0.720379114, 0, 0.702660441, 0)
  25. Frame.Size = UDim2.new(0, 207, 0, 132)
  26.  
  27. speedmanager.Name = "speedmanager"
  28. speedmanager.Parent = Frame
  29. speedmanager.BackgroundColor3 = Color3.fromRGB(31, 31, 31)
  30. speedmanager.Position = UDim2.new(0.183574885, 0, 0.151515156, 0)
  31. speedmanager.Size = UDim2.new(0, 130, 0, 28)
  32. speedmanager.Font = Enum.Font.SourceSans
  33. speedmanager.PlaceholderColor3 = Color3.fromRGB(144, 144, 144)
  34. speedmanager.PlaceholderText = "Speed here"
  35. speedmanager.Text = ""
  36. speedmanager.TextColor3 = Color3.fromRGB(255, 255, 255)
  37. speedmanager.TextScaled = true
  38. speedmanager.TextSize = 14.000
  39. speedmanager.TextWrapped = true
  40.  
  41. UICorner.Parent = speedmanager
  42.  
  43. TextButton.Parent = Frame
  44. TextButton.BackgroundColor3 = Color3.fromRGB(31, 31, 31)
  45. TextButton.Position = UDim2.new(0.299516916, 0, 0.575757563, 0)
  46. TextButton.Size = UDim2.new(0, 83, 0, 37)
  47. TextButton.Font = Enum.Font.SourceSans
  48. TextButton.Text = "Submit speed"
  49. TextButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  50. TextButton.TextScaled = true
  51. TextButton.TextSize = 14.000
  52. TextButton.TextWrapped = true
  53.  
  54. UICorner_2.Parent = TextButton
  55.  
  56. TextButton_2.Parent = Frame
  57. TextButton_2.BackgroundColor3 = Color3.fromRGB(39, 39, 39)
  58. TextButton_2.BackgroundTransparency = 0.750
  59. TextButton_2.Size = UDim2.new(0, 24, 0, 20)
  60. TextButton_2.Font = Enum.Font.SourceSansBold
  61. TextButton_2.Text = "X"
  62. TextButton_2.TextColor3 = Color3.fromRGB(214, 0, 0)
  63. TextButton_2.TextScaled = true
  64. TextButton_2.TextSize = 14.000
  65. TextButton_2.TextWrapped = true
  66.  
  67. UICorner_3.Parent = TextButton_2
  68.  
  69. UICorner_4.Parent = Frame
  70.  
  71. -- Scripts:
  72.  
  73. local function SAJCT_fake_script() -- TextButton.LocalScript
  74. local script = Instance.new('LocalScript', TextButton)
  75.  
  76. script.Parent.MouseButton1Click:Connect(function()
  77. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = script.Parent.Parent.speedmanager.Text
  78. end)
  79. end
  80. coroutine.wrap(SAJCT_fake_script)()
  81. local function GHMFK_fake_script() -- TextButton_2.LocalScript
  82. local script = Instance.new('LocalScript', TextButton_2)
  83.  
  84. script.Parent.MouseButton1Click:Connect(function()
  85. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 16
  86. end)
  87.  
  88. end
  89. coroutine.wrap(GHMFK_fake_script)()
  90. local function IUBUEE_fake_script() -- TextButton_2.Script
  91. local script = Instance.new('Script', TextButton_2)
  92.  
  93. script.Parent.MouseButton1Click:Connect(function()
  94. wait(0.01)
  95. script.Parent.Parent.Parent:Destroy()
  96. end)
  97.  
  98. end
  99. coroutine.wrap(IUBUEE_fake_script)()
  100. local function DTOABQB_fake_script() -- Frame.LocalScript
  101. local script = Instance.new('LocalScript', Frame)
  102.  
  103. local UIS = game:GetService('UserInputService')
  104. local frame = script.Parent
  105. local dragToggle = nil
  106. local dragSpeed = 0.25
  107. local dragStart = nil
  108. local startPos = nil
  109.  
  110. local function updateInput(input)
  111. local delta = input.Position - dragStart
  112. local position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X,
  113. startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  114. game:GetService('TweenService'):Create(frame, TweenInfo.new(dragSpeed), {Position = position}):Play()
  115. end
  116.  
  117. frame.InputBegan:Connect(function(input)
  118. if (input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch) then
  119. dragToggle = true
  120. dragStart = input.Position
  121. startPos = frame.Position
  122. input.Changed:Connect(function()
  123. if input.UserInputState == Enum.UserInputState.End then
  124. dragToggle = false
  125. end
  126. end)
  127. end
  128. end)
  129.  
  130. UIS.InputChanged:Connect(function(input)
  131. if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  132. if dragToggle then
  133. updateInput(input)
  134. end
  135. end
  136. end)
  137.  
  138. end
  139. coroutine.wrap(DTOABQB_fake_script)()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement