Advertisement
BenDeApple

WalkSpeed Changer

Jun 20th, 2019
582
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.15 KB | None | 0 0
  1. -- Farewell Infortality.
  2. -- Version: 2.82
  3. -- Instances:
  4. local WalkSpeed = Instance.new("ScreenGui")
  5. local Ok = Instance.new("Frame")
  6. local Script = Instance.new("TextBox")
  7. local TextLabel = Instance.new("TextLabel")
  8. --Properties:
  9. WalkSpeed.Name = "WalkSpeed"
  10. WalkSpeed.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  11. WalkSpeed.ResetOnSpawn = false
  12.  
  13. Ok.Name = "Ok"
  14. Ok.Parent = WalkSpeed
  15. Ok.BackgroundColor3 = Color3.new(0, 0, 0)
  16. Ok.BorderColor3 = Color3.new(1, 1, 1)
  17. Ok.BorderSizePixel = 5
  18. Ok.Position = UDim2.new(0.195571959, 0, 0.661855698, 0)
  19. Ok.Size = UDim2.new(0, 259, 0, 93)
  20.  
  21. Script.Name = "Script"
  22. Script.Parent = Ok
  23. Script.BackgroundColor3 = Color3.new(0, 0, 0)
  24. Script.BorderColor3 = Color3.new(1, 1, 1)
  25. Script.Position = UDim2.new(0.034600541, 0, 0.0615254268, 0)
  26. Script.Size = UDim2.new(0, 241, 0, 56)
  27. Script.Font = Enum.Font.SourceSans
  28. Script.Text = ""
  29. Script.TextColor3 = Color3.new(1, 1, 1)
  30. Script.TextScaled = true
  31. Script.TextSize = 14
  32. Script.TextWrapped = true
  33.  
  34. TextLabel.Parent = Ok
  35. TextLabel.BackgroundColor3 = Color3.new(1, 1, 1)
  36. TextLabel.BackgroundTransparency = 1
  37. TextLabel.Position = UDim2.new(0.0608120114, 0, 0.752673805, 0)
  38. TextLabel.Size = UDim2.new(0, 227, 0, 23)
  39. TextLabel.Font = Enum.Font.SourceSans
  40. TextLabel.Text = "Enter WalkSpeed HERE"
  41. TextLabel.TextColor3 = Color3.new(1, 1, 1)
  42. TextLabel.TextSize = 20
  43. -- Scripts:
  44. function SCRIPT_CIPU65_FAKESCRIPT() -- Script.LocalScript
  45.     local script = Instance.new('LocalScript')
  46.     script.Parent = Script
  47.     local textbox = script.Parent
  48.     local player  = game.Players.LocalPlayer
  49.     local Frame = script.Parent.Parent
  50.     local gui = Frame.Parent
  51.    
  52.     textbox.Changed:Connect(function()
  53.         player.Character.Humanoid.WalkSpeed = textbox.Text
  54.         if textbox.Text == "" then
  55.             player.Character.Humanoid.WalkSpeed = 16
  56.         end
  57.     end)
  58.  
  59. end
  60. coroutine.resume(coroutine.create(SCRIPT_CIPU65_FAKESCRIPT))
  61. function SCRIPT_QIOL68_FAKESCRIPT() -- Ok.Draggable GUI
  62.     local script = Instance.new('LocalScript')
  63.     script.Parent = Ok
  64.     local UserInputService = game:GetService("UserInputService")
  65.    
  66.     local gui = script.Parent
  67.    
  68.     local dragging
  69.     local dragInput
  70.     local dragStart
  71.     local startPos
  72.    
  73.     local function update(input)
  74.         local delta = input.Position - dragStart
  75.         gui.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
  76.     end
  77.    
  78.     gui.InputBegan:Connect(function(input)
  79.         if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  80.             dragging = true
  81.             dragStart = input.Position
  82.             startPos = gui.Position
  83.            
  84.             input.Changed:Connect(function()
  85.                 if input.UserInputState == Enum.UserInputState.End then
  86.                     dragging = false
  87.                 end
  88.             end)
  89.         end
  90.     end)
  91.    
  92.     gui.InputChanged:Connect(function(input)
  93.         if input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch then
  94.             dragInput = input
  95.         end
  96.     end)
  97.    
  98.     UserInputService.InputChanged:Connect(function(input)
  99.         if input == dragInput and dragging then
  100.             update(input)
  101.         end
  102.     end)
  103.  
  104. end
  105. coroutine.resume(coroutine.create(SCRIPT_QIOL68_FAKESCRIPT))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement