Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local func = Instance.new("RemoteFunction",script)
- func.OnServerInvoke:connect(function(plr,key)
- local char = plr.Character
- local rag = false
- function ragdollc()
- local ded = char
- local h1 = ded:FindFirstChild("Head")
- local t1 = ded:FindFirstChild("Torso") or ded:FindFirstChild("UpperTorso")
- local ra1 = ded:FindFirstChild("Right Arm")
- local la1 = ded:FindFirstChild("Left Arm")
- local rl1 = ded:FindFirstChild("Right Leg")
- local ll1 = ded:FindFirstChild("Left Leg")
- local nec1 = t1:FindFirstChild("Neck")
- local rs1 = t1:FindFirstChild("Right Shoulder")
- local ls1 = t1:FindFirstChild("Left Shoulder")
- local rh1 = t1:FindFirstChild("Right Hip")
- local lh1 = t1:FindFirstChild("Left Hip")
- local hum1 = ded:FindFirstChildOfClass("Humanoid")
- local rut1 = ded:FindFirstChild("HumanoidRootPart")
- for i,v in pairs(ded:GetChildren()) do
- if v:IsA("BasePart") then
- v.Anchored = false
- end
- if v:IsA("Accessory") or v:IsA("Hat") then
- v.Handle.Anchored = false
- end
- end
- hum1.PlatformStand = true
- --//Joints~//--
- --Neck--
- if nec1 ~= nil then
- nec1.Part1 = nil
- 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"
- 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
- local wh = Instance.new("Weld",ch) wh.Part0 = h1 wh.Part1 = ch
- end
- --Right Arm--
- if rs1 ~= nil then
- rs1.Part1 = nil
- 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)
- rsa.Name = "yo"
- 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
- 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))
- end
- --Left Arm--
- if ls1 ~= nil then
- ls1.Part1 = nil
- 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"
- 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
- 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))
- end
- --Right Leg--
- if rh1 ~= nil then
- rh1.Part1 = nil
- 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"
- 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
- 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))
- end
- --Left Leg--
- if lh1 ~= nil then
- lh1.Part1 = nil
- 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"
- 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
- 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))
- end
- --//End of Joints~//--
- hum1.PlatformStand = true
- end
- function unragdollc()
- local ded = char
- local h1 = ded:FindFirstChild("Head")
- local t1 = ded:FindFirstChild("Torso") or ded:FindFirstChild("UpperTorso")
- local ra1 = ded:FindFirstChild("Right Arm")
- local la1 = ded:FindFirstChild("Left Arm")
- local rl1 = ded:FindFirstChild("Right Leg")
- local ll1 = ded:FindFirstChild("Left Leg")
- local nec1 = t1:FindFirstChild("Neck")
- local rs1 = t1:FindFirstChild("Right Shoulder")
- local ls1 = t1:FindFirstChild("Left Shoulder")
- local rh1 = t1:FindFirstChild("Right Hip")
- local lh1 = t1:FindFirstChild("Left Hip")
- local hum1 = ded:FindFirstChildOfClass("Humanoid")
- local rut1 = ded:FindFirstChild("HumanoidRootPart")
- rut1.CFrame = CFrame.new(rut1.CFrame.p,Vector3.new(nil,rut.CFrame.y,rut.CFrame.z)) * CFrame.new(0,2,0)
- for i,v in pairs(ded:GetChildren()) do
- if v:IsA("BasePart") then
- v.Anchored = false
- end
- if v:IsA("Accessory") or v:IsA("Hat") then
- v.Handle.Anchored = false
- end
- end
- for i,v in pairs(t1:GetChildren()) do
- if v.Name == "yo" then
- v:Destroy()
- end
- end
- hum1.PlatformStand = false
- if nec1 ~= nil and h1 ~= nil then
- nec1.Part1 = h1
- end
- if rs1 ~= nil and ra1 ~= nil then
- rs1.Part1 = ra1
- end
- if ls1 ~= nil and la1 ~= nil then
- ls1.Part1 = la1
- end
- if rh1 ~= nil and rl1 ~= nil then
- rh1.Part1 = rl1
- end
- if lh1 ~= nil and ll1 ~= nil then
- lh1.Part1 = ll1
- end
- end
- function keyd(k)
- k = k:lower()
- if k == "r" then
- if not rag then
- ragdollc()
- rag = true
- else
- unragdollc()
- rag = false
- end
- end
- end
- end)
- local ls = NLS([[
- local plr = game:GetService("Players").LocalPlayer
- local mouse = plr:GetMouse()
- mouse.KeyDown:connect(function(ke)
- func:InvokeServer(ke)
- end)
- ]],owner.Character)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement