Roblox Central

Discussion for all things Roblox. (roblox.com)

Welcome to the new forum! Any suggestions you have are greatly appreciated.
WARNING: Before referring anyone to this website, Please read this topic

    SkyScrapers!

    Share
    avatar
    Earth
    Admin

    Posts : 402
    Join date : 2009-06-18
    Location : According to my IP address: Topeka, Kansas.

    SkyScrapers!

    Post by Earth on Tue Jul 14, 2009 12:19 pm

    Change my name at the end. Then just say construct!

    Warning! Earth is not responsible for any seisures caused by looking at calculations for placement of bricks.


    Code:

    NormalFloor = false
    Colors = {1,194,199}
    function Part(CFrame,Color,Size,Transparency,formFactor,Parent,Mesh)
    P = Instance.new("Part")
    P.Anchored = true
    P.CFrame = CFrame
    P.BrickColor = Color
    P.Size = Size
    P.Transparency = Transparency
    P.formFactor = formFactor
    if Mesh then
    B = Instance.new("BlockMesh")
    B.Parent = P
    B.Scale = Vector3.new(0.99,1,1.1)
    end
    P.Parent = Parent
    end
    function FormWalls(Color,Dimension,Building,Windows,Door,Color2,Transparency,Epicenter)
    Part(CFrame.new(Epicenter.x+Dimension.x/2,Dimension.y/2+CurrentLevel+Epicenter.y,Epicenter.z),Color2,Dimension-Vector3.new((Dimension.x-2),0,0),Transparency,0,Building)
    Part(CFrame.new(Epicenter.x-Dimension.x/2,Dimension.y/2+CurrentLevel+Epicenter.y,Epicenter.z),Color2,Dimension-Vector3.new((Dimension.x-2),0,0),Transparency,0,Building)
    Part(CFrame.new(Epicenter.x,Dimension.y/2+CurrentLevel+Epicenter.y,Epicenter.z-Dimension.z/2),Color2,Dimension-Vector3.new(0,0,(Dimension.z-2)),Transparency,0,Building)
    if not Door then
    Part(CFrame.new(Epicenter.x,Dimension.y/2+CurrentLevel+Epicenter.y,Epicenter.z+Dimension.z/2),Color2,Dimension-Vector3.new(0,0,(Dimension.z-2)),Transparency,0,Building)
    elseif Door then
    Part(CFrame.new(Epicenter.x-((Dimension.x)/4)-1.5,Dimension.y/4+CurrentLevel+Epicenter.y,Epicenter.z+Dimension.z/2),Color2,Vector3.new(((Dimension.x/2)-3),Dimension.y/2,2),Transparency,0,Building)
    Part(CFrame.new(Epicenter.x+((Dimension.x)/4)+1.5,Dimension.y/4+CurrentLevel+Epicenter.y,Epicenter.z+Dimension.z/2),Color2,Vector3.new(((Dimension.x/2)-3),Dimension.y/2,2),Transparency,0,Building)
    Part(CFrame.new(Epicenter.x,Dimension.y/(4/3)+CurrentLevel+Epicenter.y,Epicenter.z+Dimension.z/2),Color2,Dimension-Vector3.new(0,(Dimension.y/2),(Dimension.z-2)),Transparency,0,Building)
    end
    --Walls made
    Part(CFrame.new(Epicenter.x+(Dimension.x/2),Dimension.y/2+CurrentLevel+Epicenter.y,Epicenter.z+(Dimension.z/2)),Color,Vector3.new(3,Dimension.y+2,3),0,0,Building)
    Part(CFrame.new(Epicenter.x-(Dimension.x/2),Dimension.y/2+CurrentLevel+Epicenter.y,Epicenter.z+(Dimension.z/2)),Color,Vector3.new(3,Dimension.y+2,3),0,0,Building)
    Part(CFrame.new(Epicenter.x-(Dimension.x/2),Dimension.y/2+CurrentLevel+Epicenter.y,Epicenter.z-(Dimension.z/2)),Color,Vector3.new(3,Dimension.y+2,3),0,0,Building)
    Part(CFrame.new(Epicenter.x+(Dimension.x/2),Dimension.y/2+CurrentLevel+Epicenter.y,Epicenter.z-(Dimension.z/2)),Color,Vector3.new(3,Dimension.y+2,3),0,0,Building)
    --Supports
    CurrentLevel = CurrentLevel+Dimension.y
    end
    function CreateFloor(Color,Building,Size,NormalFloor,Epicenter,Dimension)
    if not NormalFloor then
    Part(CFrame.new(Epicenter.x,Epicenter.y+Size.y/2+CurrentLevel,Epicenter.z),Color,Size+Vector3.new(2,0,2),0,0,Building)
    NormalFloor = true
    elseif NormalFloor then
    Part(CFrame.new(Epicenter.x-3,Epicenter.y+Size.y/2+CurrentLevel,Epicenter.z),Color,Size+Vector3.new(-4,0,2),0,0,Building)
    Part(CFrame.new(Epicenter.x+(Dimension.x/2)-2,Epicenter.y+Size.y/2+CurrentLevel,Epicenter.z+((Dimension.z/4)*1.63)),Color,Vector3.new(6,0,(Dimension.z/4)),0,0,Building)
    Position1 = Vector3.new(Epicenter.x+(Dimension.x/2)-2,Epicenter.y+CurrentLevel-Dimension.y,Epicenter.z-(Dimension.z/4))
    Position2 = Vector3.new(Epicenter.x+(Dimension.x/2)-2,Epicenter.y+CurrentLevel,Epicenter.z+(Dimension.z/2.35)-((Dimension.z/4)-2.2))
    Part(CFrame.new((Position1+Position2)/2,Position1),Color,Vector3.new(6,0,((Position2-Position1).magnitude)),0,0,Building,true)
    Part(CFrame.new(Epicenter.x+Dimension.x/2,CurrentLevel+Epicenter.y+0.5,Epicenter.z),Color,Vector3.new(2,1,Dimension.z),Transparency,0,Building)
    Part(CFrame.new(Epicenter.x+(Dimension.x/2)-2,Epicenter.y+Size.y/2+CurrentLevel,Epicenter.z-((Dimension.z/4)*1.63)),Color,Vector3.new(6,0,(Dimension.z/4)),0,0,Building)
    end
    CurrentLevel = CurrentLevel+Size.y
    end

    function FormBuilding(Epicenter,Dimension,Color,Floors)
    Building = Instance.new("Model")
    Building.Parent = Workspace
    Building.Name = "Building"
    CurrentLevel = Epicenter.y
    FormWalls(Color,Dimension,Building,0,true,Color,0,Epicenter)
    for i=0,Floors-1 do
    CreateFloor(Color,Building,Vector3.new(Dimension.x,1,Dimension.z),true,Epicenter,Dimension)
    wait()
    FormWalls(Color,Dimension,Building,0,false,Color,0,Epicenter)
    wait()
    end
    CreateFloor(Color,Building,Vector3.new(Dimension.x,1,Dimension.z),false,Epicenter,Dimension)
    end
    function SkyScraper(Epicenter,Dimension,Color,Floors)
    Building = Instance.new("Model")
    Building.Parent = Workspace
    Building.Name = "SkyScraper"
    CurrentLevel = Epicenter.y
    FormWalls(Color,Dimension,Building,0,true,Color,0,Epicenter)
    for i=0,Floors-1 do
    CreateFloor(Color,Building,Vector3.new(Dimension.x,1,Dimension.z),true,Epicenter,Dimension)
    wait()
    FormWalls(Color,Dimension,Building,0,false,BrickColor.new(23),0.75,Epicenter)
    wait()
    end
    CreateFloor(Color,Building,Vector3.new(Dimension.x,1,Dimension.z),false,Epicenter,Dimension)
    Building:makeJoints()
    end

    function BuildCity(BuildingAcross,Dim,Focus)
    for X=-Dim*BuildingAcross,Dim*BuildingAcross,BuildingAcross*Dim do
    for Z=-Dim*BuildingAcross,Dim*BuildingAcross,BuildingAcross*Dim do
    SkyScraper(Vector3.new(X,0,Z)+Focus,Vector3.new(BuildingAcross,BuildingAcross/2,BuildingAcross),BrickColor.new(Colors[math.random(1,#Colors)]),math.random(3,6))
    end
    end
    end
    --BuildCity(32)
    game.Players.earth100.Chatted:connect(function (Mes)
    if Mes == "construct" then
    BuildingAcross = 32
    SkyScraper(Vector3.new(game.Players.earth100.Character.Torso.Position.x,0,game.Players.earth100.Character.Torso.Position.z),Vector3.new(BuildingAcross,BuildingAcross/2,BuildingAcross),BrickColor.new(Colors[math.random(1,#Colors)]),math.random(3,6))
    end
    end)
    avatar
    Meelo
    Admin

    Posts : 217
    Join date : 2009-06-19

    Re: SkyScrapers!

    Post by Meelo on Tue Jul 14, 2009 3:13 pm

    Pfft, my script's better (SkyScraper destroyer >Very Happy)

    Code:
    for i,v in ipairs(workspace:GetChildren())do
    if(v.Name == "SkyScraper")then
    for l,q in ipairs(v:GetChildren())do
    q.Anchored = false
    end
    v:BreakJoints()
    end
    end


    _________________
    Banhappy? BANHAPPY? I'LL SHOW YOU BANHAPPY!
    avatar
    Earth
    Admin

    Posts : 402
    Join date : 2009-06-18
    Location : According to my IP address: Topeka, Kansas.

    Re: SkyScrapers!

    Post by Earth on Wed Jul 15, 2009 4:42 pm

    Dot Dot P

    Jfeather
    Admin

    Posts : 232
    Join date : 2009-06-18
    Location : This Forum. Duh.

    Re: SkyScrapers!

    Post by Jfeather on Wed Jul 15, 2009 8:09 pm

    Cool scripts, except when two towers connect >_<


    _________________


    Remember to link your RC profile to your Roblox profile. You can do this in the "Information" section of your profile.
    To find someone's Roblox profile, it is located under their "Contact" tab on their RC profile.
    avatar
    Earth
    Admin

    Posts : 402
    Join date : 2009-06-18
    Location : According to my IP address: Topeka, Kansas.

    Re: SkyScrapers!

    Post by Earth on Thu Jul 16, 2009 11:32 am

    Yup

    Sponsored content

    Re: SkyScrapers!

    Post by Sponsored content


      Current date/time is Sun Dec 16, 2018 8:55 am