BINO2002

Untitled

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