Advertisement
DarionBoy

Toggleable walkspeed ROBLOX

Apr 9th, 2020
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.58 KB | None | 0 0
  1. -- Gui to Lua
  2.  
  3. -- Version: 3
  4.  
  5. -- Instances:
  6.  
  7. local SpeedGUI = Instance.new("ScreenGui")
  8. local Frame = Instance.new("Frame")
  9. local Toggle = Instance.new("TextLabel")
  10. local ON = Instance.new("TextButton")
  11. local OFF = Instance.new("TextButton")
  12. local Change = Instance.new("TextButton")
  13. local desiredspeedText = Instance.new("TextLabel")
  14. local SpeedDesiredTextBox = Instance.new("TextBox")
  15. local Madeby = Instance.new("TextLabel")
  16. local KeyToPressStringValue = Instance.new("StringValue")
  17. local speedDesiredIntValue = Instance.new("IntValue")
  18.  
  19. --Properties:
  20.  
  21. speedDesiredIntValue.Name = "SpeedDesired"
  22. speedDesiredIntValue.Value = 30
  23. speedDesiredIntValue.Parent = Frame
  24.  
  25. KeyToPressStringValue.Name = "KeyToPress"
  26. KeyToPressStringValue.Value = "E"
  27. KeyToPressStringValue.Parent = Frame
  28.  
  29. SpeedGUI.Name = "SpeedGUI"
  30. SpeedGUI.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  31. SpeedGUI.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  32. SpeedGUI.ResetOnSpawn = false
  33.  
  34. Frame.Parent = SpeedGUI
  35. Frame.BackgroundColor3 = Color3.new(0.113725, 0.113725, 0.113725)
  36. Frame.BackgroundTransparency = 0.5
  37. Frame.Position = UDim2.new(0, 0, 0.143098891, 0)
  38. Frame.Size = UDim2.new(0, 100, 0, 338)
  39. Frame.Draggable = true
  40. Frame.Active = true
  41.  
  42. Toggle.Name = "Toggle"
  43. Toggle.Parent = Frame
  44. Toggle.BackgroundColor3 = Color3.new(1, 1, 1)
  45. Toggle.BackgroundTransparency = 1
  46. Toggle.Position = UDim2.new(0, 0, 0.147928983, 0)
  47. Toggle.Size = UDim2.new(0, 100, 0, 50)
  48. Toggle.Font = Enum.Font.SourceSans
  49. Toggle.Text = "Toggle"
  50. Toggle.TextColor3 = Color3.new(1, 1, 1)
  51. Toggle.TextScaled = true
  52. Toggle.TextSize = 14
  53. Toggle.TextWrapped = true
  54.  
  55. ON.Name = "ON"
  56. ON.Parent = Frame
  57. ON.BackgroundColor3 = Color3.new(0.45098, 1, 0)
  58. ON.BackgroundTransparency = 0.5
  59. ON.Position = UDim2.new(0, 0, 0.320364118, 0)
  60. ON.Size = UDim2.new(0, 50, 0, 50)
  61. ON.Font = Enum.Font.SourceSans
  62. ON.Text = "ON"
  63. ON.TextColor3 = Color3.new(1, 1, 1)
  64. ON.TextScaled = true
  65. ON.TextSize = 14
  66. ON.TextWrapped = true
  67.  
  68. OFF.Name = "OFF"
  69. OFF.Parent = Frame
  70. OFF.BackgroundColor3 = Color3.new(1, 0, 0)
  71. OFF.BackgroundTransparency = 0.5
  72. OFF.Position = UDim2.new(0.5, 0, 0.320364118, 0)
  73. OFF.Size = UDim2.new(0, 50, 0, 50)
  74. OFF.Font = Enum.Font.SourceSans
  75. OFF.Text = "OFF"
  76. OFF.TextColor3 = Color3.new(1, 1, 1)
  77. OFF.TextScaled = true
  78. OFF.TextSize = 14
  79. OFF.TextWrapped = true
  80.  
  81. Change.Name = "Change"
  82. Change.Parent = Frame
  83. Change.BackgroundColor3 = Color3.new(0.192157, 0.192157, 0.192157)
  84. Change.BackgroundTransparency = 0.5
  85. Change.Position = UDim2.new(0, 0, 0.502157867, 0)
  86. Change.Size = UDim2.new(0, 100, 0, 81)
  87. Change.Font = Enum.Font.SourceSans
  88. Change.Text = "Click here to change the key to toggle, default is 'E'"
  89. Change.TextColor3 = Color3.new(1, 1, 1)
  90. Change.TextScaled = true
  91. Change.TextSize = 14
  92. Change.TextWrapped = true
  93.  
  94. desiredspeedText.Name = "desiredspeedText"
  95. desiredspeedText.Parent = Frame
  96. desiredspeedText.BackgroundColor3 = Color3.new(0.184314, 0.184314, 0.184314)
  97. desiredspeedText.BackgroundTransparency = 0.5
  98. desiredspeedText.Position = UDim2.new(0, 0, 0.773519158, 0)
  99. desiredspeedText.Size = UDim2.new(0, 100, 0, 27)
  100. desiredspeedText.Font = Enum.Font.SourceSans
  101. desiredspeedText.Text = "Desired Speed"
  102. desiredspeedText.TextColor3 = Color3.new(1, 1, 1)
  103. desiredspeedText.TextScaled = true
  104. desiredspeedText.TextSize = 14
  105. desiredspeedText.TextWrapped = true
  106.  
  107. SpeedDesiredTextBox.Name = "SpeedDesiredTextBox"
  108. SpeedDesiredTextBox.Parent = Frame
  109. SpeedDesiredTextBox.BackgroundColor3 = Color3.new(0.737255, 0.737255, 0.737255)
  110. SpeedDesiredTextBox.BackgroundTransparency = 0.5
  111. SpeedDesiredTextBox.Position = UDim2.new(0, 0, 0.867595792, 0)
  112. SpeedDesiredTextBox.Size = UDim2.new(0, 100, 0, 38)
  113. SpeedDesiredTextBox.Font = Enum.Font.SourceSans
  114. SpeedDesiredTextBox.Text = "Enter desired speed here, default is 30"
  115. SpeedDesiredTextBox.TextColor3 = Color3.new(0, 0, 0)
  116. SpeedDesiredTextBox.TextScaled = true
  117. SpeedDesiredTextBox.TextSize = 14
  118. SpeedDesiredTextBox.TextWrapped = true
  119.  
  120. Madeby.Name = "Madeby"
  121. Madeby.Parent = Frame
  122. Madeby.BackgroundTransparency = 1
  123. Madeby.Size = UDim2.new(0, 100, 0, 50)
  124. Madeby.Font = Enum.Font.SourceSans
  125. Madeby.Text = "Made by NewMat on V3rmillion"
  126. Madeby.TextColor3 = Color3.new(1, 1, 1)
  127. Madeby.TextScaled = true
  128. Madeby.TextSize = 14
  129. Madeby.TextWrapped = true
  130.  
  131. -- Scripts:
  132.  
  133. local function QLISMC_fake_script() -- SpeedGUI.Controller
  134. local script = Instance.new('LocalScript', SpeedGUI)
  135.  
  136. local player = game.Players.LocalPlayer
  137. local userInputService = game:GetService("UserInputService")
  138.  
  139. local frame = script.Parent.Frame
  140.  
  141. local onButton = frame:WaitForChild("ON")
  142. local offButton = frame:WaitForChild("OFF")
  143. local changeButton = frame:WaitForChild("Change")
  144. local speedDesiredTextBox = frame:WaitForChild("SpeedDesiredTextBox")
  145. local speedDesiredIntValue = frame:WaitForChild("SpeedDesired")
  146.  
  147. local keyToPressStringValue = frame:WaitForChild("KeyToPress")
  148. keyToPressStringValue.Value = "E"
  149. local keyToPressKeyCode = Enum.KeyCode.E
  150.  
  151. local choosingKey = false
  152. local speeding = false
  153.  
  154. _G.speedEnabled = true
  155.  
  156.  
  157.  
  158. changeButton.Text = "Click here to change the key to toggle" .. ", currently it is " .. "'" .. keyToPressStringValue.Value .. "'"
  159.  
  160.  
  161. offButton.MouseButton1Click:connect(function()
  162. _G.speedEnabled = false
  163. end)
  164.  
  165. onButton.MouseButton1Click:connect(function()
  166. _G.speedEnabled = true
  167. end)
  168.  
  169. changeButton.MouseButton1Click:connect(function()
  170. changeButton.Text = "Click any button on your keyboard to set the key"
  171.  
  172. choosingKey = true
  173.  
  174. userInputService.InputBegan:connect(function(input)
  175.  
  176. if input.UserInputType == Enum.UserInputType.Keyboard and choosingKey == true then
  177.  
  178. keyToPressKeyCode = input.KeyCode
  179. keyToPressStringValue.Value = string.char(keyToPressKeyCode.Value):upper()
  180. choosingKey = false
  181.  
  182. changeButton.Text = "'" .. keyToPressStringValue.Value .. "'" .. " button chosen as key"
  183. wait(2)
  184. changeButton.Text = "Click here to change the key to toggle" .. ", currently it is " .. "'" .. keyToPressStringValue.Value .. "'"
  185.  
  186. end
  187.  
  188. end)
  189.  
  190. end)
  191.  
  192.  
  193. speedDesiredTextBox:GetPropertyChangedSignal("Text"):connect(function()
  194. if tonumber(speedDesiredTextBox.Text) ~= nil then
  195.  
  196. speedDesiredIntValue.Value = tonumber(speedDesiredTextBox.Text)
  197.  
  198. end
  199.  
  200.  
  201. end)
  202.  
  203. userInputService.InputBegan:connect(function(input)
  204. if _G.speedEnabled == true then
  205.  
  206. if input.KeyCode == keyToPressKeyCode then
  207.  
  208. if speeding == false then
  209.  
  210. speeding = true
  211. player.Character:findFirstChild("Humanoid").WalkSpeed = speedDesiredIntValue.Value
  212.  
  213. else
  214. speeding = false
  215. player.Character:findFirstChild("Humanoid").WalkSpeed = 16
  216.  
  217. end
  218.  
  219. end
  220.  
  221.  
  222. end
  223.  
  224.  
  225. end)
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233. end
  234. coroutine.wrap(QLISMC_fake_script)()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement