Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Hello world!")
- Character = script.Parent
- Humanoid = Character.Humanoid
- Torso = Character.Torso
- w = nil;
- Character:WaitForChild("Head").ChildAdded:connect(function(Child)
- repeat wait () until Character.Head:FindFirstChild("HeadWeld") ~= nil and Character.Head.HeadWeld.Part0 ~= nil and Character.Head.HeadWeld.Part1 ~= nil
- w = Character.Head:FindFirstChild("HeadWeld");
- end)
- function OnDeath()
- mode = Instance.new("Model")
- mode.Name = "Raggy"
- mode.Parent = game.Workspace
- wait();
- Humanoid:Destroy()
- if Torso then
- zam=Torso:Clone()
- zam.Parent=mode
- x=Character:GetChildren()
- for i=1,#x do
- if x[i].Name=="Head" then
- local zem=x[i]:Clone()
- zem.Parent=mode
- zem.Name="notahead"
- zem.Transparency = 0
- local Neck = Instance.new("Weld")
- Neck.Name = "Neck"
- Neck.Part0 = zam
- Neck.Part1 = zem
- Neck.C0 = CFrame.new(0, 1.5, 0)
- Neck.C1 = CFrame.new()
- Neck.Parent = zam
- script.face:Clone().Parent = zem;
- end
- if x[i].Name=="Right Arm" then
- local Limb=x[i]:Clone()
- Limb.Parent=mode
- Limb.CFrame = zam.CFrame * CFrame.new(1.5, 0, 0)
- local Joint = Instance.new("Glue")
- Joint.Name = "RightShoulder"
- Joint.Part0 = zam
- Joint.Part1 = Limb
- Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- Joint.Parent = zam
- local B = Instance.new("Part")
- B.TopSurface = 0
- B.BottomSurface = 0
- B.formFactor = "Symmetric"
- B.Size = Vector3.new(1, 1, 1)
- B.Transparency = 1
- B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
- B.Parent = mode
- local W = Instance.new("Weld")
- W.Part0 = Limb
- W.Part1 = B
- W.C0 = CFrame.new(0, -0.5, 0)
- W.Parent = Limb
- end
- if x[i].Name=="Left Arm" then
- local Limb=x[i]:Clone()
- Limb.Parent=mode
- Limb.CFrame = zam.CFrame * CFrame.new(-1.5, 0, 0)
- local Joint = Instance.new("Glue")
- Joint.Name = "LeftShoulder"
- Joint.Part0 = zam
- Joint.Part1 = Limb
- Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- Joint.Parent = zam
- local B = Instance.new("Part")
- B.TopSurface = 0
- B.BottomSurface = 0
- B.formFactor = "Symmetric"
- B.Size = Vector3.new(1, 1, 1)
- B.Transparency = 1
- B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
- B.Parent = mode
- local W = Instance.new("Weld")
- W.Part0 = Limb
- W.Part1 = B
- W.C0 = CFrame.new(0, -0.5, 0)
- W.Parent = Limb
- end
- if x[i].Name=="Right Leg" then
- local Limb=x[i]:Clone()
- Limb.Parent=mode
- Limb.CFrame = zam.CFrame * CFrame.new(0.5, -2, 0)
- local Joint = Instance.new("Glue")
- Joint.Name = "RightHip"
- Joint.Part0 = zam
- Joint.Part1 = Limb
- Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
- Joint.Parent = zam
- local B = Instance.new("Part")
- B.TopSurface = 0
- B.BottomSurface = 0
- B.formFactor = "Symmetric"
- B.Size = Vector3.new(1, 1, 1)
- B.Transparency = 1
- B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
- B.Parent = mode
- local W = Instance.new("Weld")
- W.Part0 = Limb
- W.Part1 = B
- W.C0 = CFrame.new(0, -0.5, 0)
- W.Parent = Limb
- end
- if x[i].Name=="Left Leg" then
- local Limb=x[i]:Clone()
- Limb.Parent=mode
- Limb.CFrame = zam.CFrame * CFrame.new(-0.5, -2, 0)
- local Joint = Instance.new("Glue")
- Joint.Name = "LeftHip"
- Joint.Part0 = zam
- Joint.Part1 = Limb
- Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
- Joint.Parent = zam
- local B = Instance.new("Part")
- B.TopSurface = 0
- B.BottomSurface = 0
- B.formFactor = "Symmetric"
- B.Size = Vector3.new(1, 1, 1)
- B.Transparency = 1
- B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
- B.Parent = mode
- local W = Instance.new("Weld")
- W.Part0 = Limb
- W.Part1 = B
- W.C0 = CFrame.new(0, -0.5, 0)
- W.Parent = Limb
- end
- end
- bland=Instance.new("Humanoid")
- bland.Parent=mode
- local Bar = Instance.new("Part")
- Bar.TopSurface = 0
- Bar.BottomSurface = 0
- Bar.formFactor = "Symmetric"
- Bar.Size = Vector3.new(1, 1, 1)
- Bar.Transparency = 1
- Bar.CFrame = zam.CFrame * CFrame.new(0, 0.5, 0)
- Bar.Parent = mode
- local Weld = Instance.new("Weld")
- Weld.Part0 = zam
- Weld.Part1 = Bar
- Weld.C0 = CFrame.new(0, 0.5, 0)
- Weld.Parent = zam
- end
- wait();
- Player = game.Players:GetPlayerFromCharacter(Character)
- local CharParts = Character:GetChildren()
- for i = 1,#CharParts do
- if CharParts[i]:IsA("Clothing") then
- CharParts[i].Parent = mode
- end
- end
- pcall(function()
- w.Parent = mode --
- w.Part0 = mode:FindFirstChild("notahead")
- w.Name = "HatWeld"
- Character.HatPart:Clone().Parent = mode
- w.Part1 = mode.HatPart --
- end)
- Character:Destroy();
- wait(1)
- end
- Humanoid.Died:connect(OnDeath)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement