Coolscriptguy

Untitled

Dec 1st, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.19 KB | None | 0 0
  1. --Speed Edit Made by Lindsay @ V3rmillion.net, this is simple as fuck.
  2.  
  3.  
  4. --
  5. local SpeedEdit = Instance.new('ScreenGui', game.Players.LocalPlayer.PlayerGui)
  6. SpeedEdit.Name = 'SpeedEdit'
  7. SpeedEdit.Enabled = true
  8. SpeedEdit.ResetOnSpawn = false
  9. --
  10. local Drag = Instance.new('Frame', SpeedEdit)
  11. Drag.Name = 'Drag'
  12. Drag.Size = UDim2.new(0.3,0,0,20)
  13. Drag.Active = true
  14. Drag.Draggable = true
  15. Drag.BackgroundTransparency = 0.5
  16. --
  17. local Speeed = Instance.new('TextBox', Drag)
  18. Speeed.Position = UDim2.new(0,0,0,20)
  19. Speeed.Name = 'Speeed'
  20. Speeed.Size = Drag.Size
  21. Speeed.Visible = false
  22. Speeed.BackgroundTransparency = 0.7
  23. Speeed.Text = 'Press x to focus.'
  24. Speeed.TextSize = 8
  25. --
  26. local P = Instance.new('TextButton', Drag)
  27. P.Name = 'P'
  28. P.Position = UDim2.new(0,0,0,0)
  29. P.Size = UDim2.new(0,20,0,20)
  30. P.BackgroundTransparency = 1
  31. P.Text = 'P'
  32. P.TextSize = 14
  33. P.Font = 'SciFi'
  34. --
  35. local ChangePlr = Instance.new('TextBox', Drag)
  36. ChangePlr.Name = 'ChangePlr'
  37. ChangePlr.BackgroundTransparency = 0.7
  38. ChangePlr.Size = Speeed.Size
  39. ChangePlr.Position = Speeed.Position
  40. ChangePlr.Text = 'Player'
  41. ChangePlr.Font = 'Legacy'
  42. ChangePlr.TextSize = 8
  43. ChangePlr.Visible = false
  44. --
  45. local ChangeValue = Instance.new('TextBox', Drag)
  46. ChangeValue.Name = 'ChangeValue'
  47. ChangeValue.BackgroundTransparency = 0.7
  48. ChangeValue.Size = Speeed.Size
  49. ChangeValue.Position = Speeed.Position
  50. ChangeValue.Text = 'WalkSpeed'
  51. ChangeValue.Font = 'Legacy'
  52. ChangeValue.TextSize = 8
  53. ChangeValue.Visible = false
  54. --
  55. local ChangeExec = Instance.new('TextButton', Drag)
  56. ChangeExec.Name = 'ChangeExec'
  57. ChangeExec.BackgroundTransparency = 0.7
  58. ChangeExec.Size = Speeed.Size
  59. ChangeExec.Position = Speeed.Position
  60. ChangeExec.Text = "Change Player's walkspeed to WalkSpeed."
  61. ChangeExec.Font = 'Legacy'
  62. ChangeExec.TextSize = 10
  63. ChangeExec.Visible = false
  64. --
  65. local OpenNClose = Instance.new('TextButton', Drag)
  66. OpenNClose.Name = 'OpenNClose'
  67. OpenNClose.Size = UDim2.new(0,15,0,20)
  68. OpenNClose.Position = UDim2.new(0.9,10,0,0)
  69. OpenNClose.Text = '+'
  70. OpenNClose.BackgroundTransparency = 1
  71. --
  72. local Namee = Instance.new('TextLabel', Drag)
  73. Namee.Name = 'Namee'
  74. Namee.Size = UDim2.new(1,0,0,15)
  75. Namee.Text = 'Walkspeed Edit'
  76. Namee.Font = 'SciFi'
  77. Namee.TextSize = 18
  78. Namee.BackgroundTransparency = 1
  79. --
  80.  
  81. local Speed = game.Players.LocalPlayer.PlayerGui.SpeedEdit.Drag.Speeed
  82. local OpenNClose = game.Players.LocalPlayer.PlayerGui.SpeedEdit.Drag.OpenNClose
  83. local Name = game.Players.LocalPlayer.PlayerGui.SpeedEdit.Drag.Namee
  84. local Mouse = game.Players.LocalPlayer:GetMouse()
  85. local P = game.Players.LocalPlayer.PlayerGui.SpeedEdit.Drag.P
  86. local ChangePlr = game.Players.LocalPlayer.PlayerGui.SpeedEdit.Drag.ChangePlr
  87. local ChangeValue = game.Players.LocalPlayer.PlayerGui.SpeedEdit.Drag.ChangeValue
  88. local ChangeExec = game.Players.LocalPlayer.PlayerGui.SpeedEdit.Drag.ChangeExec
  89.  
  90. OpenNClose.MouseButton1Down:connect(function()
  91. if Speed.Visible == false and ChangeValue.Visible == false then
  92. OpenNClose.Text = '-'
  93. --This is appear
  94. Speed.Visible = true
  95. Speed:TweenSize(UDim2.new(1,0,0,20), 'InOut', 'Linear', 0.3, true)
  96. wait(0.3)
  97. elseif
  98. Speed.Visible == true then
  99. OpenNClose.Text = '+'
  100. --This is go away
  101. Speed:TweenSize(UDim2.new(1,0,0,0), 'InOut', 'Linear', 0.3, true)
  102. Speed.Text = ''
  103. wait(0.3)
  104. Speed.Visible = false
  105. end
  106. end)
  107.  
  108. Mouse.KeyDown:connect(function(key)
  109. if key == 'x' and Speed.Visible == true and ChangeValue.Visible == false then Speed:CaptureFocus()
  110. elseif key == 'x' and ChangeValue.Visible == true and Speed.Visible == false then ChangePlr:CaptureFocus()
  111. end
  112. end)
  113.  
  114.  
  115. Speed.FocusLost:connect(function(Entered)
  116. if Entered and Speed.Text ~= '' then
  117. game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = Speed.Text else
  118. end
  119. end)
  120.  
  121. ChangePlr.FocusLost:connect(function(Enter)
  122. if Enter and ChangeExec.Text ~= '' then
  123. ChangeValue:CaptureFocus()
  124. end
  125. end)
  126.  
  127. ChangeValue.FocusLost:connect(function(Enterr)
  128. if Enterr and ChangeValue.Text ~= '' then
  129. local plr = ChangePlr.Text
  130. local val = ChangeValue.Text
  131. game.Players[plr].Character.Humanoid.WalkSpeed = val
  132. end
  133. end)
  134.  
  135. --Open
  136. P.MouseButton1Down:connect(function()
  137. if Speed.Visible == true and ChangeValue.Visible == true then print('Aye') elseif Speed.Visible == false and ChangeValue.Visible == false then
  138. ChangePlr.Visible = true
  139. ChangePlr:TweenSize(UDim2.new(1,0,0,20), 'InOut', 'Linear', 0.3, true)
  140. ChangePlr.Text = 'Player'
  141. wait(0.3)
  142. ChangeValue.Visible = true
  143. ChangeValue:TweenSizeAndPosition(UDim2.new(1,0,0,20), UDim2.new(0,0,0,40), 'InOut', 'Linear', 0.3, true)
  144. ChangeValue.Text = 'WalkSpeed'
  145. wait(0.3)
  146. ChangeExec.Visible = true
  147. ChangeExec:TweenSizeAndPosition(UDim2.new(1,0,0,20), UDim2.new(0,0,0,60), 'InOut', 'Linear', 0.3, true)
  148. ChangeExec.Text = "Change Player's WalkSpeed"
  149. end
  150. end)
  151.  
  152. --Close
  153. P.MouseButton1Down:connect(function()
  154.  
  155. ChangeExec:TweenSize(UDim2.new(1,0,0,0), 'InOut', 'Linear', 0.3, true)
  156. ChangeExec.Text = ''
  157. wait(0.3)
  158. ChangeExec.Visible = false
  159.  
  160. if ChangeValue.Visible == true then
  161. ChangeValue.Text = ''
  162. ChangeValue:TweenSize(UDim2.new(1,0,0,0), 'InOut', 'Linear', 0.3, true)
  163. wait(0.3)
  164. ChangeValue.Visible = false
  165.  
  166. ChangePlr:TweenSize(UDim2.new(1,0,0,0), 'InOut', 'Linear', 0.3, true)
  167. ChangePlr.Text = ''
  168. wait(0.3)
  169. ChangePlr.Visible = false
  170.  
  171. end
Add Comment
Please, Sign In to add comment