Advertisement
yamanohera155233

Clone

Jun 18th, 2016
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. me = game.Players.Yamanohera15523
  2.  
  3. if script.Parent.className ~= "HopperBin" then
  4. h = Instance.new("HopperBin",me.Backpack)
  5. h.Name = "Clone model"
  6. script.Parent = h
  7. end
  8.  
  9. bin = script.Parent
  10.  
  11. bin.Selected:connect(function(mouse)
  12. mouse.Button1Down:connect(function()
  13. local targ = mouse.Target
  14. if targ.Parent:IsA("Model") then
  15. local mod = targ.Parent
  16. local yay = Instance.new("Model",workspace)
  17. for _,v in pairs(mod:GetChildren()) do
  18. local a = v:clone()
  19. a.Parent = yay
  20. if a:IsA("BasePart") then
  21. a.Anchored = true
  22. a.CanCollide = true
  23. elseif a:IsA("Hat") then
  24. if a:findFirstChild("Handle") then
  25. a.Handle.Anchored = true
  26. end
  27. end
  28. end
  29. end
  30. end)
  31. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement