Advertisement
Guest User

Untitled

a guest
Nov 25th, 2015
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.96 KB | None | 0 0
  1. local Radius = 200
  2. local Parts = 30
  3. local CenterPos = (workspace:FindFirstChild("GenerationCenterPiece") and workspace:FindFirstChild("GenerationCenterPiece").Position) or Vector3.new(0,0,0)
  4. local YAdjustment = (workspace:FindFirstChild("GenerationCenterPiece") and workspace:FindFirstChild("GenerationCenterPiece").Size.Y) or 0
  5.  
  6. for i = 1, Parts do
  7.     local P = Instance.new("Part")
  8.     P.Anchored = true
  9.     P.BottomSurface, P.TopSurface = "Smooth", "Smooth"
  10.     P.Size = Vector3.new(40,100,8)
  11.     P.BrickColor = BrickColor.White()
  12.     P.CFrame = CFrame.new(CenterPos) * (CFrame.Angles(0,math.rad(360/Parts) * i, 0) * CFrame.new(0,-YAdjustment/2 + P.Size.Y/2,Radius))
  13.     P.Parent = workspace
  14.     P.Name = "Wall"
  15.    
  16.     local Barring1 = P:Clone()
  17.     Barring1.Size = Vector3.new(P.Size.X, 3, 1)
  18.     Barring1.CFrame = P.CFrame * CFrame.new(0, P.Size.Y/2 + Barring1.Size.Y/2, P.Size.Z/2 - Barring1.Size.Z/2)
  19.     Barring1.Parent = workspace
  20.     Barring1.Name = "WallGuard1"
  21.    
  22.     local Barring2 = P:Clone()
  23.     Barring2.Size = Vector3.new(P.Size.X, 3, 1)
  24.     Barring2.CFrame = P.CFrame * CFrame.new(0, P.Size.Y/2 + Barring2.Size.Y/2, P.Size.Z/-2 + Barring2.Size.Z/2)
  25.     Barring2.Parent = workspace
  26.     Barring2.Name = "WallGuard2"
  27.    
  28.     local NextRotation = math.rad(360/Parts) * (i+1)
  29.     local CurrentRotation = math.rad(360/Parts) * (i)
  30.     local Difference = NextRotation - CurrentRotation
  31.     local MidPoint = Difference/2
  32.    
  33.     local Buttress = P:Clone()
  34.     Buttress.Size = Vector3.new(10, P.Size.Y + 5, P.Size.Z + 5)
  35.     Buttress.CFrame = P.CFrame * CFrame.new(P.Size.X/2,(Buttress.Size.Y - P.Size.Y)/2,0) * CFrame.Angles(0,MidPoint,0)
  36.     Buttress.Parent = workspace
  37.     Buttress.Name = "Buttress"
  38.    
  39.     -- Generate platform to be unioned by studio guy (you/me)
  40.     local Platform = P:Clone()
  41.     Platform.Size = Vector3.new(P.Size.X, 1, Radius/2 + 5)
  42.     Platform.CFrame = P.CFrame * CFrame.new(0, P.Size.Y/2 - 15, -P.Size.Z/2 - Platform.Size.Z/2 + 5)
  43.     Platform.Parent = workspace
  44.     Platform.Name = "PlatformPiece (Needs to be Unioned)"
  45.    
  46.     wait()
  47. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement