Advertisement
Alakazard12

Feet

Feb 16th, 2015
313
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.43 KB | None | 0 0
  1. local mouse = game.Players.LocalPlayer:GetMouse()
  2. local torso = game.Players.LocalPlayer.Character.Torso
  3.  
  4. local container = Workspace:FindFirstChild("LocalBin")
  5. if not container then
  6.     container = Instance.new("Camera")
  7.     container.Name = "LocalBin"
  8.     container.Parent = Workspace
  9. end
  10.  
  11. container:ClearAllChildren()
  12.  
  13. local blockBase = Instance.new("Part")
  14. blockBase.Name = "feet"
  15. blockBase.TopSurface = "Smooth"
  16. blockBase.BottomSurface = "Smooth"
  17. blockBase.FormFactor = "Custom"
  18. blockBase.Size = Vector3.new(4, 0.1, 4)
  19. blockBase.BrickColor = BrickColor.new(Color3.new(0, 0, 0))
  20. blockBase.Anchored = true
  21. blockBase.Transparency = 1
  22.  
  23. local block = blockBase:Clone()
  24. block.Parent = container
  25.  
  26. local py = 0
  27. local lx, ly, lz
  28. local isDownE = false
  29. local isDownQ = false
  30.  
  31. local streaming = false
  32. local follow = false
  33.  
  34. mouse.KeyDown:connect(function(key)
  35.     if key == "e" then
  36.         isDownE = true
  37.     elseif key == "q" then
  38.         isDownQ = true
  39.     elseif key == "0" then
  40.         game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 64
  41.     elseif key == "f" then
  42.         streaming = not streaming
  43.     elseif key == "r" then
  44.         follow = not follow
  45.     end
  46. end)
  47.  
  48. mouse.KeyUp:connect(function(key)
  49.     if key == "e" then
  50.         isDownE = false
  51.     elseif key == "q" then
  52.         isDownQ = false
  53.     elseif key == "0" then
  54.         game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 16
  55.     end
  56. end)
  57.  
  58. Game:GetService("RunService").RenderStepped:connect(function()
  59.     if isDownE then
  60.         py = py + 0.3
  61.         block.CFrame = CFrame.new(torso.Position.X, py, torso.Position.Z)
  62.         game.Players.LocalPlayer.Character:TranslateBy(Vector3.new(0, 0.3, 0))
  63.     elseif isDownQ then
  64.         py = py - 0.3
  65.         block.CFrame = CFrame.new(torso.Position.X, py, torso.Position.Z)
  66.         game.Players.LocalPlayer.Character:TranslateBy(Vector3.new(0, -0.3, 0))
  67.     end
  68.  
  69.     if torso.Position.X ~= lx or torso.Position.Y ~= ly or torso.Position.Z ~= lz then
  70.         block.CFrame = CFrame.new(torso.Position.X, py, torso.Position.Z)
  71.         lx, ly, lz = torso.Position.X, torso.Position.Y, torso.Position.Z
  72.     end
  73.  
  74.     if streaming then
  75.         coroutine.wrap(function()
  76.             local nBlock = block:Clone()
  77.             nBlock.Transparency = 0
  78.             nBlock.Parent = workspace
  79.             nBlock.CanCollide = false
  80.  
  81.             if follow then
  82.                 nBlock.BrickColor = BrickColor.new(Color3.new(1, 1, 1))
  83.             end
  84.  
  85.             for i = 1, 20 do
  86.                 wait(0.05)
  87.                 nBlock.Transparency = i/20
  88.             end
  89.  
  90.             nBlock:Destroy()
  91.         end)()
  92.     end
  93. end)
  94.  
  95.  
  96. --- http://www.altenius.ml:8080/Feet.lua
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement