Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function createPart(name1,x1,y1,z1,parent1,xs,ys,zs,type)
- --Sets the properties of part.
- part = Instance.new(type,parent1)
- part.Name = name
- part.FormFactor = "Custom"
- part.Size = Vector3.new(xs,ys,zs)
- part.Position = Vector3.new(x1,y1,z1)
- part.Anchored = true
- part.BottomSurface = 10
- part.TopSurface = 10
- part.RightSurface = 10
- part.LeftSurface = 10
- part.FrontSurface = 10
- part.BackSurface = 10
- end
- function adjustParts(x2,y2,z2,parent2)
- --Gets the children.
- local c = model2:GetChildren()
- for index, child in pairs(c) do
- --Adjusts by addition.
- child.Position = child.Position + Vector3.new(x2,y2,z2)
- end
- end
- function combineModelsN(name,base)
- local c = base:GetChildren()
- NewModel = Instance.new("Model",game.Workspace)
- for index, child in pairs(c) do
- if child.className == "Model" then
- local d = child:GetChildren()
- for index, children in pairs(d) do
- children.Parent = NewModel
- end
- child:remove()
- end
- end
- end
- function combineModelsT(m1,m2,loc)
- NewModel = Instance.new("Model",loc)
- local c = m1:GetChildren()
- for index, children in pairs(c) do
- children.Parent = NewModel
- end
- m1:remove()
- local c = m2:GetChildren()
- for index, children in pairs(c) do
- children.Parent = NewModel
- end
- m2:remove()
- end
- function setColorM(model,color)
- local c = model:GetChildren()
- for index, child in pairs(c) do
- child.BrickColor = color
- end
- end
- _G.createPart = createPart
- _G.adjustParts = adjustParts
- _G.combineModelsN = combineModelsN
- _G.combineModelsT = combineModelsT
- _G.setColorM = setColorM
- _G.FunctionsStored = true --Make scripts wait for this to use functions
- script:Destroy()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement