Advertisement
CloneTrooper1019

Make Em Loot

Mar 27th, 2014
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.62 KB | None | 0 0
  1. local loc =  workspace.MurderGame.GameContent.Map.Loot
  2. local temp = game:GetService("InsertService"):LoadAsset(151251400):GetChildren()[1]
  3.  
  4. for _,v in pairs(loc:GetChildren()) do
  5.     if not string.find(v.Name,"LOOT_") then
  6.         local new = temp:clone()
  7.         new.Name = "LOOT_"..v.Name
  8.         local hit = new:WaitForChild("HitBox")
  9.         hit.Parent = nil
  10.         if v:IsA("Part") then
  11.             v.Parent = new.LootParts
  12.             v.Anchored = true
  13.         elseif v:IsA("Model") then
  14.             for _,a in pairs(v:GetChildren()) do
  15.                 a.Parent = new.LootParts
  16.             end
  17.             v:Destroy()
  18.         end
  19.         hit.CFrame = new:GetModelCFrame()
  20.         hit.Parent = new
  21.         new.Parent = loc
  22.     end
  23. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement