Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local D = false
- function onTouch(hit)
- if D == false then
- D = true
- if hit.Parent:findFirstChild("Humanoid") ~= nil then
- if hit.Parent:findFirstChild("Humanoid").Health > 0 then
- local P = hit.Parent:GetChildren()
- local M = Instance.new("Model")
- local H = Instance.new("Humanoid")
- M.Parent = game.Workspace
- M.Name = hit.Parent.Name
- if hit.Parent:findFirstChild("Pants") ~= nil then
- hit.Parent.Pants.Parent = M
- end
- if hit.Parent:findFirstChild("Shirt") ~= nil then
- hit.Parent.Shirt.Parent = M
- end
- for i=1, #P do
- if P[i].className == "Part" then
- local C = P[i]:clone()
- C.Parent = M
- C.Locked = false
- C.CanCollide = true
- P[i]:remove()
- end
- if P[i].className == "Hat" then
- P[i].Parent = M
- end
- end
- M:MoveTo(Vector3.new(8, 6, -1))
- M:MakeJoints()
- local P = M:GetChildren()
- for i=1, #P do
- if P[i].Name ~= "Torso" and P[i].Name ~= "Pants" and P[i].Name ~= "Shirt" and P[i].className ~= "Hat" then
- Weld(M.Torso,P[i])
- end
- if P[i].className == "Hat" then
- Weld(M.Torso,P[i].Handle)
- end
- end
- H.Parent = M
- end
- end
- wait(2)
- D = false
- end
- end
- mouse.KeyDown:connect(function(key)
- print("Key Pressed : "..key)
- if key == "e" then
- function Weld(x,y)
- local W = Instance.new("Weld")
- W.Part0 = x
- W.Part1 = y
- local CJ = CFrame.new(x.Position)
- local C0 = x.CFrame:inverse()*CJ
- local C1 = y.CFrame:inverse()*CJ
- W.C0 = C0
- W.C1 = C1
- W.Parent = x
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement