Advertisement
SmokeDelsin

test123

May 10th, 2015
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1. function onKeydown(key)
  2. local W = Instance.new("Weld")
  3. W.Part0 = x
  4. W.Part1 = y
  5. local CJ = CFrame.new(x.Position)
  6. local C0 = x.CFrame:inverse()*CJ
  7. local C1 = y.CFrame:inverse()*CJ
  8. W.C0 = C0
  9. W.C1 = C1
  10. W.Parent = x
  11. end
  12.  
  13. local D = false
  14. function onTouch(shift)
  15. if D == false then
  16. D = true
  17. if hit.Parent:findFirstChild("Humanoid") ~= nil then
  18. if hit.Parent:findFirstChild("Humanoid").Health > 0 then
  19. local P = hit.Parent:GetChildren()
  20. local M = Instance.new("Model")
  21. local H = Instance.new("Humanoid")
  22. M.Parent = game.Workspace
  23. M.Name = hit.Parent.Name
  24. if hit.Parent:findFirstChild("Pants") ~= nil then
  25. hit.Parent.Pants.Parent = M
  26. end
  27. if hit.Parent:findFirstChild("Shirt") ~= nil then
  28. hit.Parent.Shirt.Parent = M
  29. end
  30. for i=1, #P do
  31. if P[i].className == "Part" then
  32. local C = P[i]:clone()
  33. C.Parent = M
  34. C.Locked = false
  35. C.CanCollide = true
  36. P[i]:remove()
  37. end
  38. if P[i].className == "Hat" then
  39. P[i].Parent = M
  40. end
  41. end
  42. M:MoveTo(Vector3.new(8, 6, -1))
  43. M:MakeJoints()
  44. local P = M:GetChildren()
  45. for i=1, #P do
  46. if P[i].Name ~= "Torso" and P[i].Name ~= "Pants" and P[i].Name ~= "Shirt" and P[i].className ~= "Hat" then
  47. Weld(M.Torso,P[i])
  48. end
  49. if P[i].className == "Hat" then
  50. Weld(M.Torso,P[i].Handle)
  51. end
  52. end
  53. H.Parent = M
  54. end
  55. end
  56. wait(2)
  57. D = false
  58. end
  59. end
  60.  
  61.  
  62. function onSelect(mouse)
  63. mouse.KeyDown:connect(onKeydown)
  64. end
  65. script.Parent.Keyboard:connect(Shift)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement