LeGoldenRobloxian

House

Jun 2nd, 2017
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.13 KB | None | 0 0
  1. --[-[House -Cool]-] [[Idea from kayden963]]----------------------------------------------------------------------------------------------------------------------------
  2. I = Instance.new
  3. function create(anchored, bottom, cancollide, cframe, color, name, parent, reflec, size, top, trans)
  4. Part = I("Part")
  5. Part.Anchored = anchored
  6. Part.BottomSurface = bottom
  7. Part.CanCollide = cancollide
  8. Part.CFrame = cframe
  9. Part.BrickColor = BrickColor.new(color)
  10. Part.Locked = true
  11. Part.Name = name
  12. Part.Parent = parent
  13. Part.Reflectance = reflec
  14. Part.Size = size
  15. Part.TopSurface = top
  16. Part.Transparency = trans
  17. end
  18.  
  19. --------------------------------------------------------------------------------------
  20.  
  21. House = I("Model")
  22. House.Name = "House"
  23. House.Parent = Workspace
  24.  
  25. Human = I("Humanoid")
  26. Human.MaxHealth = 0
  27. Human.Name = "Human"
  28.  
  29. Corners = I("Model")
  30. Corners.Name = "Corners"
  31. Corners.Parent = House
  32.  
  33. Cyl = I("CylinderMesh")
  34. Cyl.Name = "CylinderMesh"
  35.  
  36. Mesh = I("BlockMesh")
  37. Mesh.Name = "Mesh"
  38.  
  39. Teles = I("Model")
  40. Teles.Name = "Teleports"
  41. Teles.Parent = House
  42. InTele = I("Model")
  43. InTele.Name = "In"--[[ [Idea from kayden963 for buttons and red poles]]
  44. InTele.Parent = Teles
  45. OutTele = I("Model")
  46. OutTele.Name = "Out"
  47. OutTele.Parent = Teles
  48.  
  49. Walls = I("Model")
  50. Walls.Name = "Walls"
  51. Walls.Parent = House
  52.  
  53. Windows = I("Model")
  54. Windows.Name = "Windows"
  55. Windows.Parent = House
  56.  
  57. Clicked = I("ClickDetector")
  58. Clicked.Name = "ClickCheck"
  59.  
  60. Decal = I("Decal")
  61.  
  62.  
  63. LeftWall = Instance.new("Model")
  64. LeftWall.Name = "LeftWall"
  65. LeftWall.Parent = Walls
  66. Lobby = Instance.new("Model")
  67. Lobby.Name = "Lobby"
  68. Lobby.Parent = LeftWall
  69. WallsL = Instance.new("Model")
  70. WallsL.Name = "Walls"
  71. WallsL.Parent = Lobby
  72.  
  73.  
  74. --------------------------------------------------------------------------------------
  75.  
  76. create(true, "Smooth", true, CFrame.new(45.5, 54.2, -3), "Black", "BackConWall", WallsL, 0, Vector3.new(14, 7.2, 1), "Smooth", 0)
  77. create(true, "Smooth", true, CFrame.new(53, 54.2, -5.5), "Black", "BackRightWall", WallsL, 0, Vector3.new(1, 7.2, 4), "Smooth", 0)
  78. create(true, "Smooth", true, CFrame.new(0, 65.6, 37), "Black", "BackWall", Walls, 0, Vector3.new(71, 30, 1), "Smooth", 0)
  79. create(true, "Smooth", true, CFrame.new(60, 54.2, -8), "Black", "BackWall", WallsL, 0, Vector3.new(13, 7.2, 1), "Smooth", 0)
  80. create(true, "Smooth", true, CFrame.new(36.5, 65.6, -36.5), "Bright red", "BLCorner", Corners, 0.3, Vector3.new(2, 30, 2), "Smooth", 0)
  81. create(true, "Smooth", true, CFrame.new(37, 65.6, -19), "Black", "BLeftWall", LeftWall, 0, Vector3.new(1, 30, 33), "Smooth", 0)
  82. create(true, "Smooth", true, CFrame.new(-36.5, 65.6, -36.5), "Bright red", "BRCorner", Corners, 0.3, Vector3.new(2, 30, 2), "Smooth", 0)
  83. create(true, "Smooth", true, CFrame.new(-1.5, 53.6, 0), "Bright red", "BWindowC", Windows, 0, Vector3.new(2, 1.2, 2), "Smooth", 0)
  84. create(true, "Smooth", true, CFrame.new(45, 50, 0), "Black", "ConFloor", Lobby, 0, Vector3.new(15, 1.2, 7), "Smooth", 0)
  85. create(true, "Smooth", true, CFrame.new(45, 55.4, 0), "Black", "ConRoof", Lobby, 0, Vector3.new(15, 1.2, 7), "Smooth", 0)
  86. create(true, "Smooth", true, CFrame.new(37, 69.2, 0), "Black", "DoorWall", LeftWall, 0, Vector3.new(1, 22.8, 5), "Smooth", 0)
  87. create(true, "Smooth", true, CFrame.new(37, 65.6, 19), "Black", "FLeftWall", LeftWall, 0, Vector3.new(1, 30, 33), "Smooth", 0)
  88. create(true, "Smooth", true, CFrame.new(0, 50, 0), "Black", "Floor", House, 0, Vector3.new(75, 1.2, 75), "Smooth", 0)
  89. create(true, "Smooth", true, CFrame.new(60, 50, 0), "Really red", "Floor", Lobby, 0, Vector3.new(15, 1.2, 17), "Smooth", 0)
  90. create(true, "Smooth", true, CFrame.new(45.5, 54.2, 3), "Black", "FrontConWall", WallsL, 0, Vector3.new(14, 7.2, 1), "Smooth", 0)
  91. create(true, "Smooth", true, CFrame.new(53, 54.2, 5.5), "Black", "FrontRightWall", WallsL, 0, Vector3.new(1, 7.2, 4), "Smooth", 0)
  92. create(true, "Smooth", true, CFrame.new(60, 54.2, 8), "Black", "FrontWall", WallsL, 0, Vector3.new(13, 7.2, 1), "Smooth", 0)
  93. create(true, "Smooth", true, CFrame.new(0, 65.6, -37), "Black", "FrontWall", Walls, 0, Vector3.new(71, 30, 1), "Smooth", 0)
  94. create(true, "Smooth", true, CFrame.new(1.5, 53.6, 0), "Bright red", "FWindowC", Windows, 0, Vector3.new(2, 1.2, 2), "Smooth", 0)
  95. create(true, "Smooth", true, CFrame.new(10, 1.7, 0), "Institutional white", "Head", InTele, 0, Vector3.new(2, 3.4, 2), "Smooth", 0) --InTeleTo
  96. create(true, "Smooth", true, CFrame.new(-10, 52.3, 0), "Institutional white", "Head", OutTele, 0, Vector3.new(2, 3.4, 2), "Smooth", 0) --OutTeleTo
  97. create(true, "Smooth", true, CFrame.new(10, 52.3, 0), "Institutional white", "InTeleFrom", InTele, 0, Vector3.new(2, 3.4, 2), "Smooth", 0)
  98. create(true, "Smooth", true, CFrame.new(67, 54.2, 0), "Black", "LeftWall", WallsL, 0, Vector3.new(1, 7.2, 15), "Smooth", 0)
  99. create(true, "Smooth", true, CFrame.new(-4.5, 53.6, 0), "Bright red", "LWindowC", Windows, 0, Vector3.new(2, 1.2, 2), "Smooth", 0)
  100. create(true, "Smooth", true, CFrame.new(-10, 1.7, 0), "Institutional white", "OutTeleFrom", OutTele, 0, Vector3.new(2, 3.4, 2), "Smooth", 0)
  101. create(true, "Smooth", true, CFrame.new(-37, 65.6, 0), "Black", "RightWall", Walls, 0, Vector3.new(1, 30, 71), "Smooth", 0)
  102. create(true, "Smooth", true, CFrame.new(0, 81.2, 0), "Black", "Roof", House, 0, Vector3.new(75, 1.2, 75), "Smooth", 0)
  103. create(false, "Smooth", true, CFrame.new(60, 55.4, 0), "Really red", "Roofele", Lobby, 0, Vector3.new(13, 1.2, 15), "Smooth", 0)
  104. Lobby.Roofele:BreakJoints()
  105. pos = Instance.new("BodyPosition", Lobby.Roofele)
  106. pos.maxForce = Vector3.new(math.huge, 1000, math.huge)
  107. pos.position = Lobby.Floor.Position + Vector3.new(0, 1, 0)
  108. create(true, "Smooth", true, CFrame.new(4.5, 53.6, 0), "Bright red", "RWindowC", Windows, 0, Vector3.new(2, 1.2, 2), "Smooth", 0)
  109. create(true, "Smooth", true, CFrame.new(8.5, 50.6, 2), "Bright red", "ele", Windows, 0, Vector3.new(2, 1.2, 2), "Smooth", 0)
  110. create(true, "Smooth", true, CFrame.new(36.5, 65.6, 36.5), "Bright red", "TLCorner", Corners, 0.3, Vector3.new(2, 30, 2), "Smooth", 0)
  111. create(true, "Smooth", true, CFrame.new(-36.5, 65.6, 36.5), "Bright red", "TRCorner", Corners, 0.3, Vector3.new(2, 30, 2), "Smooth", 0)
  112. create(true, "Smooth", true, CFrame.new(0, 51.8, 0), "Reddish brown", "WindowBase", Windows, 0, Vector3.new(13, 2.4, 4), "Smooth", 0)
  113.  
  114. --------------------------------------------------------------------------------------
  115.  
  116. BWindowClick = Clicked:Clone()
  117. BWindowClick.Parent = Windows.BWindowC
  118.  
  119. FWindowClick = Clicked:Clone()
  120. FWindowClick.Parent = Windows.FWindowC
  121.  
  122. LWindowClick = Clicked:Clone()
  123. LWindowClick.Parent = Windows.LWindowC
  124.  
  125. RWindowClick = Clicked:Clone()
  126. RWindowClick.Parent = Windows.RWindowC
  127.  
  128. eleClick = Clicked:Clone()
  129. eleClick.Parent = Windows.ele
  130.  
  131. Window1 = Walls.BackWall
  132. Window2 = Walls.FrontWall
  133. Window3 = Walls.LeftWall:GetChildren()
  134. Window4 = Walls.RightWall
  135.  
  136. C1 = FWindowClick
  137. C2 = BWindowClick
  138. C3 = RWindowClick
  139. C4 = LWindowClick
  140. C5 = eleClick
  141.  
  142. C1.MouseClick:connect(function() if Window1.Transparency == 0 then Window1.Transparency = 0.5 else Window1.Transparency = 0 end end)
  143. C2.MouseClick:connect(function() if Window2.Transparency == 0 then Window2.Transparency = 0.5 else Window2.Transparency = 0 end end)
  144. C3.MouseClick:connect(function() for _, v in pairs(Window3) do if v.className == "Part" then if v.Transparency == 0 then v.Transparency = 0.5 else v.Transparency = 0 end end end end)
  145. C4.MouseClick:connect(function() if Window4.Transparency == 0 then Window4.Transparency = 0.5 else Window4.Transparency = 0 end end)
  146. C5.MouseClick:connect(function() if pos.position == Lobby.Floor.Position + Vector3.new(0, 1, 0) then pos.position = Lobby.Floor.Position + Vector3.new(0, 5.4, 0) else pos.position = Lobby.Floor.Position + Vector3.new(0, 1, 0) end end)
  147. --------------------------------------------------------------------------------------
  148.  
  149. BWindowD = Decal:Clone()
  150. BWindowD.Face = "Top"
  151. BWindowD.Name = "DownArrow"
  152. BWindowD.Parent = Windows.BWindowC
  153. BWindowD.Texture = "http://www.roblox.com/asset/?id=29563831" --Made by Nickardson
  154.  
  155. FWindowD = Decal:Clone()
  156. FWindowD.Face = "Top"
  157. FWindowD.Name = "UpArrow"
  158. FWindowD.Parent = Windows.FWindowC
  159. FWindowD.Texture = "http://www.roblox.com/asset/?id=29563813" --Made by Nickardson
  160.  
  161. LWindowD = Decal:Clone()
  162. LWindowD.Face = "Top"
  163. LWindowD.Name = "LeftArrow"
  164. LWindowD.Parent = Windows.LWindowC
  165. LWindowD.Texture = "http://www.roblox.com/asset/?id=29563831" --Made by Nickardson
  166.  
  167. RWindowD = Decal:Clone()
  168. RWindowD.Face = "Top"
  169. RWindowD.Name = "RightArrow"
  170. RWindowD.Parent = Windows.RWindowC
  171. RWindowD.Texture = "http://www.roblox.com/asset/?id=29563813" --Made by Nickardson
  172.  
  173. Windows.LWindowC.CFrame = Windows.LWindowC.CFrame * CFrame.Angles(0, math.pi/2, 0)
  174. Windows.RWindowC.CFrame = Windows.RWindowC.CFrame * CFrame.Angles(0, math.pi/2, 0)
  175.  
  176. --------------------------------------------------------------------------------------
  177.  
  178. function searchAndAddMesh(Where)
  179. if not Where then Where = Workspace end
  180. for _, v in pairs(Where:GetChildren()) do
  181. if v:IsA("Part") then
  182. mesh = Mesh:Clone()
  183. mesh.Parent = v
  184. end
  185. searchAndAddMesh(v)
  186. end
  187. end
  188.  
  189. for _, v in pairs(House:GetChildren()) do
  190. searchAndAddMesh(v)
  191. end
  192.  
  193. InTeleFM = Cyl:Clone()
  194. InTeleFM.Parent = InTele.InTeleFrom
  195.  
  196. InTeleTM = Cyl:Clone()
  197. InTeleTM.Parent = InTele.Head
  198.  
  199. OutTeleFM = Cyl:Clone()
  200. OutTeleFM.Parent = OutTele.OutTeleFrom
  201.  
  202. OutTeleTM = Cyl:Clone()
  203. OutTeleTM.Parent = OutTele.Head
  204.  
  205. IF = InTele.InTeleFrom
  206. IT = InTele.Head
  207. OF = OutTele.OutTeleFrom
  208. OT = OutTele.Head
  209.  
  210. debounce = false
  211. IT.Touched:connect(function(part) if debounce == false then if part.Parent:findFirstChild("Humanoid") ~= nil then torso = part.Parent:findFirstChild("Torso") if torso ~= nil then debounce = true torso.CFrame = IF.CFrame wait(3) debounce = false end end end end)
  212. debounce2 = false
  213. OT.Touched:connect(function(part) if debounce2 == false then if part.Parent:findFirstChild("Humanoid") ~= nil then torso = part.Parent:findFirstChild("Torso") if torso ~= nil then debounce2 = true torso.CFrame = OF.CFrame wait(3) debounce2 = false end end end end)
  214.  
  215. --------------------------------------------------------------------------------------
  216.  
  217. ITH = Human:Clone()
  218. ITH.Parent = InTele
  219.  
  220. OTH = Human:Clone()
  221. OTH.Parent = OutTele
Add Comment
Please, Sign In to add comment