Advertisement
vL4d_4eVer

asd

Aug 20th, 2018
427
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.57 KB | None | 0 0
  1. local func = Instance.new("RemoteFunction",script)
  2. func.OnServerInvoke:connect(function(plr,key)
  3.     local char = plr.Character
  4.     local rag = false
  5.     function ragdollc()
  6.     local ded = char
  7.     local h1 = ded:FindFirstChild("Head")
  8.     local t1 = ded:FindFirstChild("Torso") or ded:FindFirstChild("UpperTorso")
  9.     local ra1 = ded:FindFirstChild("Right Arm")
  10.     local la1 = ded:FindFirstChild("Left Arm")
  11.     local rl1 = ded:FindFirstChild("Right Leg")
  12.     local ll1 = ded:FindFirstChild("Left Leg")
  13.     local nec1 = t1:FindFirstChild("Neck")
  14.     local rs1 = t1:FindFirstChild("Right Shoulder")
  15.     local ls1 = t1:FindFirstChild("Left Shoulder")
  16.     local rh1 = t1:FindFirstChild("Right Hip")
  17.     local lh1 = t1:FindFirstChild("Left Hip")
  18.     local hum1 = ded:FindFirstChildOfClass("Humanoid")
  19.     local rut1 = ded:FindFirstChild("HumanoidRootPart")
  20.     for i,v in pairs(ded:GetChildren()) do
  21.         if v:IsA("BasePart") then
  22.             v.Anchored = false
  23.         end
  24.         if v:IsA("Accessory") or v:IsA("Hat") then
  25.             v.Handle.Anchored = false
  26.         end
  27.     end
  28.     hum1.PlatformStand = true
  29.     --//Joints~//--
  30.     --Neck--
  31.     if nec1 ~= nil then
  32.     nec1.Part1 = nil
  33.     local neca = Instance.new("Glue",t1) neca.Part0 = t1 neca.Part1 = h1 neca.C0 = CFrame.new(0,1,0) neca.C1 = CFrame.new(0,-.5,0) neca.Name = "yo"
  34.     local ch = Instance.new("Part",t1) ch.Name = "yo" ch.Size = Vector3.new(.75,.6,.75) ch.TopSurface = "Smooth" ch.BottomSurface = "Smooth" ch.Transparency = 1
  35.     local wh = Instance.new("Weld",ch) wh.Part0 = h1 wh.Part1 = ch
  36.     end
  37.     --Right Arm--
  38.     if rs1 ~= nil then
  39.     rs1.Part1 = nil
  40.     local rsa = Instance.new("Glue",t1) rsa.Part0 = t1 rsa.Part1 = ra1 rsa.C0 = CFrame.new(1.5,.5,0) rsa.C1 = CFrame.new(0,.5,0)
  41. rsa.Name = "yo"
  42.     local cra = Instance.new("Part",t1) cra.Name = "yo" cra.Size = Vector3.new(1.5,1,1) cra.TopSurface = "Smooth" cra.BottomSurface = "Smooth" cra.Transparency = 1
  43.     local wra = Instance.new("Weld",cra) wra.Part0 = ra1 wra.Part1 = cra wra.C0 = CFrame.new(0,-.25,0) * CFrame.Angles(rad(0),rad(0),rad(90))
  44.     end
  45.     --Left Arm--
  46.     if ls1 ~= nil then
  47.     ls1.Part1 = nil
  48.     local lsa = Instance.new("Glue",t1) lsa.Part0 = t1 lsa.Part1 = la1 lsa.C0 = CFrame.new(-1.5,.5,0) lsa.C1 = CFrame.new(0,.5,0) lsa.Name = "yo"
  49.     local cla = Instance.new("Part",t1) cla.Name = "yo" cla.Size = Vector3.new(1.5,1,1) cla.TopSurface = "Smooth" cla.BottomSurface = "Smooth" cla.Transparency = 1
  50.     local wla = Instance.new("Weld",cla) wla.Part0 = la1 wla.Part1 = cla wla.C0 = CFrame.new(0,-.25,0) * CFrame.Angles(rad(0),rad(0),rad(90))
  51.     end
  52.     --Right Leg--
  53.     if rh1 ~= nil then
  54.     rh1.Part1 = nil
  55.     local rha = Instance.new("Glue",t1) rha.Part0 = t1 rha.Part1 = rl1 rha.C0 = CFrame.new(.5,-1,0) rha.C1 = CFrame.new(0,1,0) rha.Name = "yo"
  56.     local crl = Instance.new("Part",t1) crl.Name = "yo" crl.Size = Vector3.new(1.5,1,1) crl.TopSurface = "Smooth" crl.BottomSurface = "Smooth" crl.Transparency = 1
  57.     local wrl = Instance.new("Weld",crl) wrl.Part0 = rl1 wrl.Part1 = crl wrl.C0 = CFrame.new(0,-.25,0) * CFrame.Angles(rad(0),rad(0),rad(90))
  58.     end
  59.     --Left Leg--
  60.     if lh1 ~= nil then
  61.     lh1.Part1 = nil
  62.     local lha = Instance.new("Glue",t1) lha.Part0 = t1 lha.Part1 = ll1 lha.C0 = CFrame.new(-.5,-1,0) lha.C1 = CFrame.new(0,1,0) lha.Name = "yo"
  63.     local cll = Instance.new("Part",t1) cll.Name = "yo" cll.Size = Vector3.new(1.5,1,1) cll.TopSurface = "Smooth" cll.BottomSurface = "Smooth" cll.Transparency = 1
  64.     local wll = Instance.new("Weld",cll) wll.Part0 = ll1 wll.Part1 = cll wll.C0 = CFrame.new(0,-.25,0) * CFrame.Angles(rad(0),rad(0),rad(90))
  65.     end
  66.     --//End of Joints~//--
  67.     hum1.PlatformStand = true
  68. end
  69. function unragdollc()
  70.     local ded = char
  71.     local h1 = ded:FindFirstChild("Head")
  72.     local t1 = ded:FindFirstChild("Torso") or ded:FindFirstChild("UpperTorso")
  73.     local ra1 = ded:FindFirstChild("Right Arm")
  74.     local la1 = ded:FindFirstChild("Left Arm")
  75.     local rl1 = ded:FindFirstChild("Right Leg")
  76.     local ll1 = ded:FindFirstChild("Left Leg")
  77.     local nec1 = t1:FindFirstChild("Neck")
  78.     local rs1 = t1:FindFirstChild("Right Shoulder")
  79.     local ls1 = t1:FindFirstChild("Left Shoulder")
  80.     local rh1 = t1:FindFirstChild("Right Hip")
  81.     local lh1 = t1:FindFirstChild("Left Hip")
  82.     local hum1 = ded:FindFirstChildOfClass("Humanoid")
  83.     local rut1 = ded:FindFirstChild("HumanoidRootPart")
  84.     rut1.CFrame = CFrame.new(rut1.CFrame.p,Vector3.new(nil,rut.CFrame.y,rut.CFrame.z)) * CFrame.new(0,2,0)
  85.     for i,v in pairs(ded:GetChildren()) do
  86.         if v:IsA("BasePart") then
  87.             v.Anchored = false
  88.         end
  89.         if v:IsA("Accessory") or v:IsA("Hat") then
  90.             v.Handle.Anchored = false
  91.         end
  92.     end
  93.     for i,v in pairs(t1:GetChildren()) do
  94.     if v.Name == "yo" then
  95.     v:Destroy()
  96.     end
  97.     end
  98.     hum1.PlatformStand = false
  99.     if nec1 ~= nil and h1 ~= nil then
  100.         nec1.Part1 = h1
  101.     end
  102.     if rs1 ~= nil and ra1 ~= nil then
  103.         rs1.Part1 = ra1
  104.     end
  105.     if ls1 ~= nil and la1 ~= nil then
  106.         ls1.Part1 = la1
  107.     end
  108.     if rh1 ~= nil and rl1 ~= nil then
  109.         rh1.Part1 = rl1
  110.     end
  111.     if lh1 ~= nil and ll1 ~= nil then
  112.         lh1.Part1 = ll1
  113.     end
  114. end
  115. function keyd(k)
  116.     k = k:lower()
  117.     if k == "r" then
  118.         if not rag then
  119.             ragdollc()
  120.             rag = true
  121.             else
  122.             unragdollc()
  123.             rag = false
  124.         end
  125.     end
  126. end
  127. end)
  128. local ls = NLS([[
  129. local plr = game:GetService("Players").LocalPlayer
  130. local mouse = plr:GetMouse()
  131. mouse.KeyDown:connect(function(ke)
  132.     func:InvokeServer(ke)
  133. end)
  134. ]],owner.Character)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement