Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2014
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.08 KB | None | 0 0
  1. print("Hello world!")
  2.  
  3. Character = script.Parent
  4. Humanoid = Character.Humanoid
  5. Torso = Character.Torso
  6.  
  7. w = nil;
  8. Character:WaitForChild("Head").ChildAdded:connect(function(Child)
  9.     repeat wait () until Character.Head:FindFirstChild("HeadWeld") ~= nil and Character.Head.HeadWeld.Part0 ~= nil and Character.Head.HeadWeld.Part1 ~= nil
  10.     w = Character.Head:FindFirstChild("HeadWeld");
  11. end)
  12.  
  13. function OnDeath()
  14.     mode = Instance.new("Model")
  15.     mode.Name = "Raggy"
  16.     mode.Parent = game.Workspace
  17.     wait();
  18.     Humanoid:Destroy()
  19.     if Torso then
  20.         zam=Torso:Clone()
  21.         zam.Parent=mode
  22.         x=Character:GetChildren()
  23.         for i=1,#x do
  24.             if x[i].Name=="Head" then
  25.                 local zem=x[i]:Clone()
  26.                 zem.Parent=mode
  27.                 zem.Name="notahead"
  28.                 zem.Transparency = 0
  29.                 local Neck = Instance.new("Weld")
  30.                 Neck.Name = "Neck"
  31.                 Neck.Part0 = zam
  32.                 Neck.Part1 = zem
  33.                 Neck.C0 = CFrame.new(0, 1.5, 0)
  34.                 Neck.C1 = CFrame.new()
  35.                 Neck.Parent = zam
  36.                 script.face:Clone().Parent = zem;
  37.             end
  38.             if x[i].Name=="Right Arm" then
  39.                 local Limb=x[i]:Clone()
  40.                 Limb.Parent=mode
  41.                 Limb.CFrame = zam.CFrame * CFrame.new(1.5, 0, 0)
  42.                 local Joint = Instance.new("Glue")
  43.                 Joint.Name = "RightShoulder"
  44.                 Joint.Part0 = zam
  45.                 Joint.Part1 = Limb
  46.                 Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  47.                 Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  48.                 Joint.Parent = zam
  49.    
  50.                 local B = Instance.new("Part")
  51.                 B.TopSurface = 0
  52.                 B.BottomSurface = 0
  53.                 B.formFactor = "Symmetric"
  54.                 B.Size = Vector3.new(1, 1, 1)
  55.                 B.Transparency = 1
  56.                 B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  57.                 B.Parent = mode
  58.                 local W = Instance.new("Weld")
  59.                 W.Part0 = Limb
  60.                 W.Part1 = B
  61.                 W.C0 = CFrame.new(0, -0.5, 0)
  62.                 W.Parent = Limb
  63.    
  64.             end
  65.             if x[i].Name=="Left Arm" then
  66.                 local Limb=x[i]:Clone()
  67.                 Limb.Parent=mode
  68.    
  69.                 Limb.CFrame = zam.CFrame * CFrame.new(-1.5, 0, 0)
  70.                 local Joint = Instance.new("Glue")
  71.                 Joint.Name = "LeftShoulder"
  72.                 Joint.Part0 = zam
  73.                 Joint.Part1 = Limb
  74.                 Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  75.                 Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  76.                 Joint.Parent = zam
  77.    
  78.                 local B = Instance.new("Part")
  79.                 B.TopSurface = 0
  80.                 B.BottomSurface = 0
  81.                 B.formFactor = "Symmetric"
  82.                 B.Size = Vector3.new(1, 1, 1)
  83.                 B.Transparency = 1
  84.                 B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  85.                 B.Parent = mode
  86.                 local W = Instance.new("Weld")
  87.                 W.Part0 = Limb
  88.                 W.Part1 = B
  89.                 W.C0 = CFrame.new(0, -0.5, 0)
  90.                 W.Parent = Limb
  91.    
  92.             end
  93.             if x[i].Name=="Right Leg" then
  94.                 local Limb=x[i]:Clone()
  95.                 Limb.Parent=mode
  96.    
  97.                 Limb.CFrame = zam.CFrame * CFrame.new(0.5, -2, 0)
  98.                 local Joint = Instance.new("Glue")
  99.                 Joint.Name = "RightHip"
  100.                 Joint.Part0 = zam
  101.                 Joint.Part1 = Limb
  102.                 Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  103.                 Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  104.                 Joint.Parent = zam
  105.    
  106.                 local B = Instance.new("Part")
  107.                 B.TopSurface = 0
  108.                 B.BottomSurface = 0
  109.                 B.formFactor = "Symmetric"
  110.                 B.Size = Vector3.new(1, 1, 1)
  111.                 B.Transparency = 1
  112.                 B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  113.                 B.Parent = mode
  114.                 local W = Instance.new("Weld")
  115.                 W.Part0 = Limb
  116.                 W.Part1 = B
  117.                 W.C0 = CFrame.new(0, -0.5, 0)
  118.                 W.Parent = Limb
  119.    
  120.             end
  121.             if x[i].Name=="Left Leg" then
  122.                 local Limb=x[i]:Clone()
  123.                 Limb.Parent=mode
  124.    
  125.                 Limb.CFrame = zam.CFrame * CFrame.new(-0.5, -2, 0)
  126.                 local Joint = Instance.new("Glue")
  127.                 Joint.Name = "LeftHip"
  128.                 Joint.Part0 = zam
  129.                 Joint.Part1 = Limb
  130.                 Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  131.                 Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  132.                 Joint.Parent = zam
  133.    
  134.                 local B = Instance.new("Part")
  135.                 B.TopSurface = 0
  136.                 B.BottomSurface = 0
  137.                 B.formFactor = "Symmetric"
  138.                 B.Size = Vector3.new(1, 1, 1)
  139.                 B.Transparency = 1
  140.                 B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  141.                 B.Parent = mode
  142.                 local W = Instance.new("Weld")
  143.                 W.Part0 = Limb
  144.                 W.Part1 = B
  145.                 W.C0 = CFrame.new(0, -0.5, 0)
  146.                 W.Parent = Limb
  147.             end
  148.         end
  149.         bland=Instance.new("Humanoid")
  150.         bland.Parent=mode
  151.         local Bar = Instance.new("Part")
  152.         Bar.TopSurface = 0
  153.         Bar.BottomSurface = 0
  154.         Bar.formFactor = "Symmetric"
  155.         Bar.Size = Vector3.new(1, 1, 1)
  156.         Bar.Transparency = 1
  157.         Bar.CFrame = zam.CFrame * CFrame.new(0, 0.5, 0)
  158.         Bar.Parent = mode
  159.         local Weld = Instance.new("Weld")
  160.         Weld.Part0 = zam
  161.         Weld.Part1 = Bar
  162.         Weld.C0 = CFrame.new(0, 0.5, 0)
  163.         Weld.Parent = zam
  164.     end
  165.     wait();
  166.     Player = game.Players:GetPlayerFromCharacter(Character)
  167.    
  168.     local CharParts = Character:GetChildren()
  169.     for i = 1,#CharParts do
  170.         if CharParts[i]:IsA("Clothing") then
  171.             CharParts[i].Parent = mode
  172.         end
  173.     end
  174.  
  175.     pcall(function()
  176.         w.Parent = mode --
  177.         w.Part0 = mode:FindFirstChild("notahead")
  178.         w.Name = "HatWeld"
  179.         Character.HatPart:Clone().Parent = mode
  180.         w.Part1 = mode.HatPart --
  181.     end)
  182.    
  183.     Character:Destroy();
  184.  
  185.     wait(1)
  186. end
  187.  
  188. Humanoid.Died:connect(OnDeath)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement