Advertisement
UhhLegoboy

Elevator

Apr 14th, 2017
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 14.90 KB | None | 0 0
  1. local runDummyScript = function(f,scri)
  2. local oldenv = getfenv(f)
  3. local newenv = setmetatable({}, {
  4. __index = function(_, k)
  5. if k:lower() == 'script' then
  6. return scri
  7. else
  8. return oldenv[k]
  9. end
  10. end
  11. })
  12. setfenv(f, newenv)
  13. ypcall(function() f() end)
  14. end
  15. cors = {}
  16. mas = Instance.new("Model",game:GetService("Lighting"))
  17. mas.Name = "CompiledModel"
  18. o1 = Instance.new("Model")
  19. o2 = Instance.new("Part")
  20. o3 = Instance.new("Seat")
  21. o4 = Instance.new("Seat")
  22. o5 = Instance.new("Seat")
  23. o6 = Instance.new("Seat")
  24. o7 = Instance.new("Seat")
  25. o8 = Instance.new("Seat")
  26. o9 = Instance.new("Part")
  27. o10 = Instance.new("Seat")
  28. o11 = Instance.new("Seat")
  29. o12 = Instance.new("Seat")
  30. o13 = Instance.new("Part")
  31. o14 = Instance.new("Part")
  32. o15 = Instance.new("Part")
  33. o16 = Instance.new("Part")
  34. o17 = Instance.new("Part")
  35. o18 = Instance.new("Sound")
  36. o19 = Instance.new("Part")
  37. o20 = Instance.new("Part")
  38. o21 = Instance.new("ClickDetector")
  39. o22 = Instance.new("Script")
  40. o23 = Instance.new("Sound")
  41. o24 = Instance.new("Part")
  42. o25 = Instance.new("BodyForce")
  43. o1.Name = "Elavator"
  44. o1.Parent = mas
  45. o2.Name = "Floor"
  46. o2.Parent = o1
  47. o2.Material = Enum.Material.Wood
  48. o2.BrickColor = BrickColor.new("Pastel brown")
  49. o2.Position = Vector3.new(-34.000042, 0.125003815, -28.5000191)
  50. o2.Size = Vector3.new(15, 0.25, 14)
  51. o2.CFrame = CFrame.new(-34.000042, 0.125003815, -28.5000191, 1.00001001, 0, 0, 0, 1, 0, 0, 0, 1.00001001)
  52. o2.BackSurface = Enum.SurfaceType.Universal
  53. o2.BottomSurface = Enum.SurfaceType.Smooth
  54. o2.FrontSurface = Enum.SurfaceType.Universal
  55. o2.LeftSurface = Enum.SurfaceType.Universal
  56. o2.RightSurface = Enum.SurfaceType.Universal
  57. o2.TopSurface = Enum.SurfaceType.Universal
  58. o2.Color = Color3.new(1, 0.8, 0.6)
  59. o2.Position = Vector3.new(-34.000042, 0.125003815, -28.5000191)
  60. o3.Parent = o1
  61. o3.Material = Enum.Material.SmoothPlastic
  62. o3.BrickColor = BrickColor.new("Black")
  63. o3.Position = Vector3.new(-39.5501442, 0.750003994, -26.7499809)
  64. o3.Rotation = Vector3.new(-0, -90, 0)
  65. o3.Size = Vector3.new(2, 1, 2)
  66. o3.CFrame = CFrame.new(-39.5501442, 0.750003994, -26.7499809, 0, 0, -1.00001049, 0, 1, 0, 1.00001049, 0, 0)
  67. o3.BackSurface = Enum.SurfaceType.Universal
  68. o3.BottomSurface = Enum.SurfaceType.Universal
  69. o3.FrontSurface = Enum.SurfaceType.Universal
  70. o3.LeftSurface = Enum.SurfaceType.Universal
  71. o3.RightSurface = Enum.SurfaceType.Universal
  72. o3.TopSurface = Enum.SurfaceType.Universal
  73. o3.Color = Color3.new(0.105882, 0.164706, 0.207843)
  74. o3.Position = Vector3.new(-39.5501442, 0.750003994, -26.7499809)
  75. o4.Parent = o1
  76. o4.Material = Enum.Material.SmoothPlastic
  77. o4.BrickColor = BrickColor.new("Black")
  78. o4.Position = Vector3.new(-39.5501709, 0.750003994, -30.7500401)
  79. o4.Rotation = Vector3.new(-0, -90, 0)
  80. o4.Size = Vector3.new(2, 1, 2)
  81. o4.CFrame = CFrame.new(-39.5501709, 0.750003994, -30.7500401, 0, 0, -1.00001049, 0, 1, 0, 1.00001049, 0, 0)
  82. o4.BackSurface = Enum.SurfaceType.Universal
  83. o4.BottomSurface = Enum.SurfaceType.Universal
  84. o4.FrontSurface = Enum.SurfaceType.Universal
  85. o4.LeftSurface = Enum.SurfaceType.Universal
  86. o4.RightSurface = Enum.SurfaceType.Universal
  87. o4.TopSurface = Enum.SurfaceType.Universal
  88. o4.Color = Color3.new(0.105882, 0.164706, 0.207843)
  89. o4.Position = Vector3.new(-39.5501709, 0.750003994, -30.7500401)
  90. o5.Parent = o1
  91. o5.Material = Enum.Material.SmoothPlastic
  92. o5.BrickColor = BrickColor.new("Black")
  93. o5.Position = Vector3.new(-39.5501747, 0.750003994, -28.7500057)
  94. o5.Rotation = Vector3.new(-0, -90, 0)
  95. o5.Size = Vector3.new(2, 1, 2)
  96. o5.CFrame = CFrame.new(-39.5501747, 0.750003994, -28.7500057, 0, 0, -1.00001049, 0, 1, 0, 1.00001049, 0, 0)
  97. o5.BackSurface = Enum.SurfaceType.Universal
  98. o5.BottomSurface = Enum.SurfaceType.Universal
  99. o5.FrontSurface = Enum.SurfaceType.Universal
  100. o5.LeftSurface = Enum.SurfaceType.Universal
  101. o5.RightSurface = Enum.SurfaceType.Universal
  102. o5.TopSurface = Enum.SurfaceType.Universal
  103. o5.Color = Color3.new(0.105882, 0.164706, 0.207843)
  104. o5.Position = Vector3.new(-39.5501747, 0.750003994, -28.7500057)
  105. o6.Parent = o1
  106. o6.Material = Enum.Material.SmoothPlastic
  107. o6.BrickColor = BrickColor.new("Black")
  108. o6.Position = Vector3.new(-28.5500412, 0.750003994, -28.750021)
  109. o6.Rotation = Vector3.new(0, 90, 0)
  110. o6.Size = Vector3.new(2, 1, 2)
  111. o6.CFrame = CFrame.new(-28.5500412, 0.750003994, -28.750021, 0, 0, 1.00001431, 0, 1, 0, -1.00001431, 0, 0)
  112. o6.BackSurface = Enum.SurfaceType.Universal
  113. o6.BottomSurface = Enum.SurfaceType.Universal
  114. o6.FrontSurface = Enum.SurfaceType.Universal
  115. o6.LeftSurface = Enum.SurfaceType.Universal
  116. o6.RightSurface = Enum.SurfaceType.Universal
  117. o6.TopSurface = Enum.SurfaceType.Universal
  118. o6.Color = Color3.new(0.105882, 0.164706, 0.207843)
  119. o6.Position = Vector3.new(-28.5500412, 0.750003994, -28.750021)
  120. o7.Parent = o1
  121. o7.Material = Enum.Material.SmoothPlastic
  122. o7.BrickColor = BrickColor.new("Black")
  123. o7.Position = Vector3.new(-28.5500412, 0.750003994, -26.7499771)
  124. o7.Rotation = Vector3.new(0, 90, 0)
  125. o7.Size = Vector3.new(2, 1, 2)
  126. o7.CFrame = CFrame.new(-28.5500412, 0.750003994, -26.7499771, 0, 0, 1.00001431, 0, 1, 0, -1.00001431, 0, 0)
  127. o7.BackSurface = Enum.SurfaceType.Universal
  128. o7.BottomSurface = Enum.SurfaceType.Universal
  129. o7.FrontSurface = Enum.SurfaceType.Universal
  130. o7.LeftSurface = Enum.SurfaceType.Universal
  131. o7.RightSurface = Enum.SurfaceType.Universal
  132. o7.TopSurface = Enum.SurfaceType.Universal
  133. o7.Color = Color3.new(0.105882, 0.164706, 0.207843)
  134. o7.Position = Vector3.new(-28.5500412, 0.750003994, -26.7499771)
  135. o8.Parent = o1
  136. o8.Material = Enum.Material.SmoothPlastic
  137. o8.BrickColor = BrickColor.new("Black")
  138. o8.Position = Vector3.new(-28.5500717, 0.750003994, -30.7500553)
  139. o8.Rotation = Vector3.new(0, 90, 0)
  140. o8.Size = Vector3.new(2, 1, 2)
  141. o8.CFrame = CFrame.new(-28.5500717, 0.750003994, -30.7500553, 0, 0, 1.00001431, 0, 1, 0, -1.00001431, 0, 0)
  142. o8.BackSurface = Enum.SurfaceType.Universal
  143. o8.BottomSurface = Enum.SurfaceType.Universal
  144. o8.FrontSurface = Enum.SurfaceType.Universal
  145. o8.LeftSurface = Enum.SurfaceType.Universal
  146. o8.RightSurface = Enum.SurfaceType.Universal
  147. o8.TopSurface = Enum.SurfaceType.Universal
  148. o8.Color = Color3.new(0.105882, 0.164706, 0.207843)
  149. o8.Position = Vector3.new(-28.5500717, 0.750003994, -30.7500553)
  150. o9.Parent = o1
  151. o9.Material = Enum.Material.SmoothPlastic
  152. o9.Position = Vector3.new(-29.4999962, 6.625, -21.9999542)
  153. o9.Size = Vector3.new(4, 12.75, 1)
  154. o9.CFrame = CFrame.new(-29.4999962, 6.625, -21.9999542, 1.00001001, 0, 0, 0, 1, 0, 0, 0, 1.00001001)
  155. o9.BackSurface = Enum.SurfaceType.Universal
  156. o9.BottomSurface = Enum.SurfaceType.Universal
  157. o9.FrontSurface = Enum.SurfaceType.Universal
  158. o9.LeftSurface = Enum.SurfaceType.Universal
  159. o9.RightSurface = Enum.SurfaceType.Universal
  160. o9.TopSurface = Enum.SurfaceType.Universal
  161. o9.Position = Vector3.new(-29.4999962, 6.625, -21.9999542)
  162. o10.Parent = o1
  163. o10.Material = Enum.Material.SmoothPlastic
  164. o10.BrickColor = BrickColor.new("Black")
  165. o10.Position = Vector3.new(-34.0499382, 0.750003994, -33.5002327)
  166. o10.Rotation = Vector3.new(-180, 0, -180)
  167. o10.Size = Vector3.new(2, 1, 2)
  168. o10.CFrame = CFrame.new(-34.0499382, 0.750003994, -33.5002327, -1.00001001, 0, 0, 0, 1, 0, 0, 0, -1.00001001)
  169. o10.BackSurface = Enum.SurfaceType.Universal
  170. o10.BottomSurface = Enum.SurfaceType.Universal
  171. o10.FrontSurface = Enum.SurfaceType.Universal
  172. o10.LeftSurface = Enum.SurfaceType.Universal
  173. o10.RightSurface = Enum.SurfaceType.Universal
  174. o10.TopSurface = Enum.SurfaceType.Universal
  175. o10.Color = Color3.new(0.105882, 0.164706, 0.207843)
  176. o10.Position = Vector3.new(-34.0499382, 0.750003994, -33.5002327)
  177. o11.Parent = o1
  178. o11.Material = Enum.Material.SmoothPlastic
  179. o11.BrickColor = BrickColor.new("Black")
  180. o11.Position = Vector3.new(-36.0501213, 0.750003994, -33.500206)
  181. o11.Rotation = Vector3.new(-180, 0, -180)
  182. o11.Size = Vector3.new(2, 1, 2)
  183. o11.CFrame = CFrame.new(-36.0501213, 0.750003994, -33.500206, -1.00001001, 0, 0, 0, 1, 0, 0, 0, -1.00001001)
  184. o11.BackSurface = Enum.SurfaceType.Universal
  185. o11.BottomSurface = Enum.SurfaceType.Universal
  186. o11.FrontSurface = Enum.SurfaceType.Universal
  187. o11.LeftSurface = Enum.SurfaceType.Universal
  188. o11.RightSurface = Enum.SurfaceType.Universal
  189. o11.TopSurface = Enum.SurfaceType.Universal
  190. o11.Color = Color3.new(0.105882, 0.164706, 0.207843)
  191. o11.Position = Vector3.new(-36.0501213, 0.750003994, -33.500206)
  192. o12.Parent = o1
  193. o12.Material = Enum.Material.SmoothPlastic
  194. o12.BrickColor = BrickColor.new("Black")
  195. o12.Position = Vector3.new(-32.0497551, 0.750003994, -33.5002327)
  196. o12.Rotation = Vector3.new(-180, 0, -180)
  197. o12.Size = Vector3.new(2, 1, 2)
  198. o12.CFrame = CFrame.new(-32.0497551, 0.750003994, -33.5002327, -1.00001001, 0, 0, 0, 1, 0, 0, 0, -1.00001001)
  199. o12.BackSurface = Enum.SurfaceType.Universal
  200. o12.BottomSurface = Enum.SurfaceType.Universal
  201. o12.FrontSurface = Enum.SurfaceType.Universal
  202. o12.LeftSurface = Enum.SurfaceType.Universal
  203. o12.RightSurface = Enum.SurfaceType.Universal
  204. o12.TopSurface = Enum.SurfaceType.Universal
  205. o12.Color = Color3.new(0.105882, 0.164706, 0.207843)
  206. o12.Position = Vector3.new(-32.0497551, 0.750003994, -33.5002327)
  207. o13.Parent = o1
  208. o13.Material = Enum.Material.SmoothPlastic
  209. o13.Position = Vector3.new(-41.0001106, 6.625, -28.5000191)
  210. o13.Size = Vector3.new(1, 12.75, 14)
  211. o13.CFrame = CFrame.new(-41.0001106, 6.625, -28.5000191, 1.00001001, 0, 0, 0, 1, 0, 0, 0, 1.00001001)
  212. o13.BackSurface = Enum.SurfaceType.Universal
  213. o13.BottomSurface = Enum.SurfaceType.Universal
  214. o13.FrontSurface = Enum.SurfaceType.Universal
  215. o13.LeftSurface = Enum.SurfaceType.Universal
  216. o13.RightSurface = Enum.SurfaceType.Universal
  217. o13.TopSurface = Enum.SurfaceType.Universal
  218. o13.Position = Vector3.new(-41.0001106, 6.625, -28.5000191)
  219. o14.Parent = o1
  220. o14.Material = Enum.Material.SmoothPlastic
  221. o14.Position = Vector3.new(-38.5000877, 6.625, -21.9999542)
  222. o14.Size = Vector3.new(4, 12.75, 1)
  223. o14.CFrame = CFrame.new(-38.5000877, 6.625, -21.9999542, 1.00001001, 0, 0, 0, 1, 0, 0, 0, 1.00001001)
  224. o14.BackSurface = Enum.SurfaceType.Universal
  225. o14.BottomSurface = Enum.SurfaceType.Universal
  226. o14.FrontSurface = Enum.SurfaceType.Universal
  227. o14.LeftSurface = Enum.SurfaceType.Universal
  228. o14.RightSurface = Enum.SurfaceType.Universal
  229. o14.TopSurface = Enum.SurfaceType.Universal
  230. o14.Position = Vector3.new(-38.5000877, 6.625, -21.9999542)
  231. o15.Parent = o1
  232. o15.Material = Enum.Material.SmoothPlastic
  233. o15.Position = Vector3.new(-34.000042, 6.625, -35.0000839)
  234. o15.Size = Vector3.new(13, 12.75, 1)
  235. o15.CFrame = CFrame.new(-34.000042, 6.625, -35.0000839, 1.00001001, 0, 0, 0, 1, 0, 0, 0, 1.00001001)
  236. o15.BackSurface = Enum.SurfaceType.Universal
  237. o15.BottomSurface = Enum.SurfaceType.Universal
  238. o15.FrontSurface = Enum.SurfaceType.Universal
  239. o15.LeftSurface = Enum.SurfaceType.Universal
  240. o15.RightSurface = Enum.SurfaceType.Universal
  241. o15.TopSurface = Enum.SurfaceType.Universal
  242. o15.Position = Vector3.new(-34.000042, 6.625, -35.0000839)
  243. o16.Parent = o1
  244. o16.Material = Enum.Material.SmoothPlastic
  245. o16.Position = Vector3.new(-26.9999714, 6.625, -28.5000191)
  246. o16.Size = Vector3.new(1, 12.75, 14)
  247. o16.CFrame = CFrame.new(-26.9999714, 6.625, -28.5000191, 1.00001001, 0, 0, 0, 1, 0, 0, 0, 1.00001001)
  248. o16.BackSurface = Enum.SurfaceType.Universal
  249. o16.BottomSurface = Enum.SurfaceType.Universal
  250. o16.FrontSurface = Enum.SurfaceType.Universal
  251. o16.LeftSurface = Enum.SurfaceType.Universal
  252. o16.RightSurface = Enum.SurfaceType.Universal
  253. o16.TopSurface = Enum.SurfaceType.Universal
  254. o16.Position = Vector3.new(-26.9999714, 6.625, -28.5000191)
  255. o17.Parent = o1
  256. o17.Material = Enum.Material.Wood
  257. o17.BrickColor = BrickColor.new("Really black")
  258. o17.Position = Vector3.new(-34.5000458, 12.8750038, -28.625021)
  259. o17.Size = Vector3.new(1.5, 0.25, 1.75)
  260. o17.CFrame = CFrame.new(-34.5000458, 12.8750038, -28.625021, 1.00001001, 0, 0, 0, 1, 0, 0, 0, 1.00001001)
  261. o17.BackSurface = Enum.SurfaceType.Universal
  262. o17.BottomSurface = Enum.SurfaceType.Universal
  263. o17.FrontSurface = Enum.SurfaceType.Universal
  264. o17.LeftSurface = Enum.SurfaceType.Universal
  265. o17.RightSurface = Enum.SurfaceType.Universal
  266. o17.TopSurface = Enum.SurfaceType.Universal
  267. o17.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  268. o17.Position = Vector3.new(-34.5000458, 12.8750038, -28.625021)
  269. o18.Parent = o17
  270. o18.SoundId = "rbxassetid://258852901"
  271. o18.Volume = 2
  272. o18.Looped = true
  273. o19.Parent = o1
  274. o19.Material = Enum.Material.SmoothPlastic
  275. o19.Position = Vector3.new(-34.000042, 11, -21.9999542)
  276. o19.Size = Vector3.new(5, 4, 1)
  277. o19.CFrame = CFrame.new(-34.000042, 11, -21.9999542, 1.00001001, 0, 0, 0, 1, 0, 0, 0, 1.00001001)
  278. o19.BackSurface = Enum.SurfaceType.Universal
  279. o19.BottomSurface = Enum.SurfaceType.Universal
  280. o19.FrontSurface = Enum.SurfaceType.Universal
  281. o19.LeftSurface = Enum.SurfaceType.Universal
  282. o19.RightSurface = Enum.SurfaceType.Universal
  283. o19.TopSurface = Enum.SurfaceType.Universal
  284. o19.Position = Vector3.new(-34.000042, 11, -21.9999542)
  285. o20.Parent = o1
  286. o20.Material = Enum.Material.Neon
  287. o20.BrickColor = BrickColor.new("Really red")
  288. o20.Position = Vector3.new(-38.1250839, 3.74998069, -22.6249599)
  289. o20.Rotation = Vector3.new(90, -90, 0)
  290. o20.Size = Vector3.new(1.25, 0.25, 0.5)
  291. o20.CFrame = CFrame.new(-38.1250839, 3.74998069, -22.6249599, 0, 5.96052416e-007, -1.00001097, -1.00000215, 0, 0, 0, 1.0000118, -5.96052416e-007)
  292. o20.BackSurface = Enum.SurfaceType.Universal
  293. o20.BottomSurface = Enum.SurfaceType.Universal
  294. o20.FrontSurface = Enum.SurfaceType.Universal
  295. o20.LeftSurface = Enum.SurfaceType.Universal
  296. o20.RightSurface = Enum.SurfaceType.Universal
  297. o20.TopSurface = Enum.SurfaceType.Universal
  298. o20.Color = Color3.new(1, 0, 0)
  299. o20.Position = Vector3.new(-38.1250839, 3.74998069, -22.6249599)
  300. o21.Parent = o20
  301. o22.Parent = o20
  302. table.insert(cors,coroutine.create(function()
  303. wait()
  304. runDummyScript(function()
  305. script.Parent.ClickDetector.mouseClick : connect(function()
  306.     script.Parent.BrickColor = BrickColor.new("Lime green")
  307.     script.Parent.Sound : play()
  308.     wait(5)
  309.     script.Parent.ClickDetector : Destroy()
  310. script.Parent.Parent.Top.BodyForce.Force = Vector3.new(0,50000,0)
  311. wait(15)
  312. script.Parent.Parent.Floor.Anchored = true
  313. script.Parent.Parent.Top.BodyForce : Destroy()
  314. wait(1)
  315. script.Parent.Sound : play()
  316. end)
  317. end,o22)
  318. end))
  319. o23.Parent = o20
  320. o23.SoundId = "rbxassetid://138169063"
  321. o23.Volume = 1
  322. o24.Name = "Top"
  323. o24.Parent = o1
  324. o24.Material = Enum.Material.Metal
  325. o24.BrickColor = BrickColor.new("Institutional white")
  326. o24.Position = Vector3.new(-34.000042, 13.125, -28.5000191)
  327. o24.Size = Vector3.new(15, 0.25, 14)
  328. o24.CFrame = CFrame.new(-34.000042, 13.125, -28.5000191, 1.00001001, 0, 0, 0, 1, 0, 0, 0, 1.00001001)
  329. o24.BackSurface = Enum.SurfaceType.Universal
  330. o24.BottomSurface = Enum.SurfaceType.Universal
  331. o24.FrontSurface = Enum.SurfaceType.Universal
  332. o24.LeftSurface = Enum.SurfaceType.Universal
  333. o24.RightSurface = Enum.SurfaceType.Universal
  334. o24.TopSurface = Enum.SurfaceType.Universal
  335. o24.Color = Color3.new(0.972549, 0.972549, 0.972549)
  336. o24.Position = Vector3.new(-34.000042, 13.125, -28.5000191)
  337. o25.Parent = o24
  338. mas.Parent = workspace
  339. mas:MakeJoints()
  340. local mas1 = mas:GetChildren()
  341. for i=1,#mas1 do
  342.     mas1[i].Parent = workspace
  343.     ypcall(function() mas1[i]:MakeJoints() end)
  344. end
  345. mas:Destroy()
  346. for i=1,#cors do
  347. coroutine.resume(cors[i])
  348. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement