Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Made by Elopus001
- function createPart(name1,location,parent1,size,type)
- --Sets the properties of part.
- part = Instance.new(type,parent1)
- part.Name = name1
- part.FormFactor = "Custom"
- part.Size = size
- part.Position = location
- 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 = parent2: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
- function cloneAdjust(part,iterations,dx,dy,dz,parent)
- parts = 0
- while parts < iterations do
- parts = parts + 1
- partc = part:clone()
- partc.Position = partc.Position + Vector3.new(dx*(parts),dy*(parts),dz*(parts))
- partc.Parent = parent
- end
- end
- --Call these as a normal functions except with _G. at the beginning
- --Example
- --_G.createPart(examplevalues)
- --Creates a part
- _G.createPart = createPart
- --Adjusts all parts in a model
- _G.adjustParts = adjustParts
- --Combines all models of the same name in the same location
- _G.combineModelsN = combineModelsN
- --Combines models by two values
- _G.combineModelsT = combineModelsT
- --Sets the color of all blocks in a model
- _G.setColorM = setColorM
- --Clones a part and adjusts them by the iteration multiplied by values you give
- _G.cloneAdjust = cloneAdjust
- _G.FunctionsStored = true --Make scripts wait for this to use functions
- script:Destroy()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement