daily pastebin goal
39%
SHARE
TWEET

Untitled

a guest Jun 19th, 2017 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- By: StealthLava
  2. -- LU: [14.03.10]
  3.  
  4. --[ Setup ]--
  5. -- Locations
  6. local StealthLava = script.Parent
  7. local Player = game.Players.LocalPlayer
  8. local Avatar = Player.Character
  9. local Mouse = Player:GetMouse()
  10.  
  11. -- Emptys
  12. local Hold = nil
  13.  
  14. --[ Get Items ]--
  15. local Humanoid = Avatar:WaitForChild("Humanoid")
  16. local Torso = Avatar:WaitForChild("Torso")
  17. local RH = Torso:WaitForChild("Right Hip")
  18. local LH = Torso:WaitForChild("Left Hip")
  19.  
  20. local RL = Avatar:WaitForChild("Right Leg")
  21. local LL = Avatar:WaitForChild("Left Leg")
  22.  
  23. local RJ = Avatar:WaitForChild("HumanoidRootPart"):WaitForChild("RootJoint")
  24.  
  25. --[ Functions ]--
  26. function CreateWeld(Part, CF)
  27.     local w = Instance.new("Weld")
  28.     w.Name = "LegWeld"
  29.     w.Parent = Torso
  30.     w.Part0 = Torso
  31.     w.Part1 = Part
  32.     w.C1 = CF
  33. end
  34.  
  35. function StandUp()
  36.     -- Right Leg
  37.     RH.Part1 = RL
  38.  
  39.     -- Left Leg
  40.     LH.Part1 = LL
  41.  
  42.     -- Delete Welds
  43.     for i, s in pairs(Torso:GetChildren()) do
  44.         if (s.Name == "LegWeld") and (s.ClassName == "Weld") then
  45.             s:Destroy()
  46.         end
  47.     end
  48.  
  49.     -- Raise Character
  50.     RJ.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
  51.     RJ.C1 = CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
  52. end
  53.  
  54. --[ Hooks ]--
  55. -- Controls
  56. Mouse.KeyDown:connect(function(Key)
  57.     if (Hold ~= nil) then return end
  58.     if (string.upper(Key) ~= "C") and (string.lower(Key) ~= " ") then return end
  59.     Hold = true
  60.  
  61.     if (Torso:FindFirstChild("LegWeld") == nil) and (string.lower(Key) ~= " ") then
  62.         -- Right Leg
  63.         RH.Part1 = nil
  64.         CreateWeld(RL, CFrame.new(-0.5, 0.75, 1))
  65.  
  66.         -- Left Leg
  67.         LH.Part1 = nil
  68.         CreateWeld(LL, CFrame.new(0.5, 0.495, 1.25) * CFrame.Angles(math.rad(90), 0, 0))
  69.        
  70.         -- Lower Character
  71.         RJ.C0 = CFrame.new(0, -1.25, 0) * CFrame.Angles(0, 0, 0)
  72.         RJ.C1 = CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0)
  73.        
  74.         -- Slow Walk Speed
  75.         Humanoid.CameraOffset = Vector3.new(0, -1.25, 0)       
  76.     else
  77.         StandUp()
  78.  
  79.         -- Normal Walk Speed
  80.         Humanoid.CameraOffset = Vector3.new(0, 0, 0)       
  81.     end
  82.  
  83.     wait(0.5)
  84.  
  85.     Hold = nil
  86. end)
  87.  
  88. -- Value Changed
  89. Humanoid.Changed:connect(function()
  90.     if Hold == nil then StandUp() end
  91. end)
RAW Paste Data
Top