Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local WallCount = 1000
- local TimesToCircle = 5
- local WallTo360 = ((360 / WallCount) * TimesToCircle)
- local RadiusForWalls = 100
- local TimePerIteration= 0.5
- local HaveTowers = false
- local TowerWallToggle = true
- local RadiusForTowers = 430
- local CenterPoint = Vector3.new(0, 0, 0)
- --local WallSize = Vector3.new(320, 100, 5)
- local TowerSize = Vector3.new(20, 120, 20)
- local WallSize = Vector3.new(1, 0.5, 20)
- local counter = 0
- for angle = 1, WallCount do
- counter = counter + 10
- wait(TimePerIteration)
- local Radians = math.rad(angle * WallTo360)
- local Part = Instance.new("Part")
- Part.Parent = workspace.Walls
- if HaveTowers == true then
- if TowerWallToggle == false then
- Part.Size = WallSize
- Part.Name = "Wall"
- TowerWallToggle = true
- X = math.cos(Radians) * RadiusForWalls
- Z = math.sin(Radians)* RadiusForWalls
- else
- Part.Size = TowerSize
- Part.Name = "Tower"
- TowerWallToggle = false
- X = math.cos(Radians) * RadiusForTowers
- Z = math.sin(Radians)* RadiusForTowers
- end
- else
- Part.Size = WallSize
- Part.Name = "Wall"
- X = math.cos(Radians) * RadiusForWalls
- Z = math.sin(Radians)* RadiusForWalls
- end
- Part.Position = Vector3.new((X + CenterPoint.X), ((Part.Size.Y / 2) + CenterPoint.Y + counter), (Z + CenterPoint.Z))
- Part.Orientation = Vector3.new(0, ((-WallTo360 * (angle - 1)) + (90 - WallTo360)), 0)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement