Guest User

roblox elevator script

a guest
Mar 2nd, 2020
5,128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.48 KB | None | 0 0
  1.  
  2. --Converted with ttyyuu12345's model to script plugin v4
  3. function sandbox(var,func)
  4. local env = getfenv(func)
  5. local newenv = setmetatable({},{
  6. __index = function(self,k)
  7. if k=="script" then
  8. return var
  9. else
  10. return env[k]
  11. end
  12. end,
  13. })
  14. setfenv(func,newenv)
  15. return func
  16. end
  17. cors = {}
  18. mas = Instance.new("Model",game:GetService("Lighting"))
  19. Model0 = Instance.new("Model")
  20. Part1 = Instance.new("Part")
  21. BillboardGui2 = Instance.new("BillboardGui")
  22. TextLabel3 = Instance.new("TextLabel")
  23. Script4 = Instance.new("Script")
  24. Part5 = Instance.new("Part")
  25. SurfaceGui6 = Instance.new("SurfaceGui")
  26. TextLabel7 = Instance.new("TextLabel")
  27. ManualWeld8 = Instance.new("ManualWeld")
  28. Part9 = Instance.new("Part")
  29. Model0.Name = "Elevator"
  30. Model0.Parent = mas
  31. Part1.Parent = Model0
  32. Part1.CFrame = CFrame.new(-5.55000305, 0.509353995, -5.87496901, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  33. Part1.Position = Vector3.new(-5.55000305, 0.509353995, -5.87496901)
  34. Part1.Size = Vector3.new(5.21999979, 1.01999998, 4.94999981)
  35. Part1.Anchored = true
  36. Part1.BottomSurface = Enum.SurfaceType.Smooth
  37. Part1.TopSurface = Enum.SurfaceType.Smooth
  38. BillboardGui2.Parent = Part1
  39. BillboardGui2.LightInfluence = 1
  40. BillboardGui2.Size = UDim2.new(0, 200, 0, 50)
  41. BillboardGui2.Active = true
  42. BillboardGui2.ClipsDescendants = true
  43. BillboardGui2.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  44. BillboardGui2.AlwaysOnTop = true
  45. TextLabel3.Parent = BillboardGui2
  46. TextLabel3.Size = UDim2.new(0, 200, 0, 50)
  47. TextLabel3.BackgroundColor = BrickColor.new("Institutional white")
  48. TextLabel3.BackgroundColor3 = Color3.new(1, 1, 1)
  49. TextLabel3.BackgroundTransparency = 1
  50. TextLabel3.Font = Enum.Font.SourceSans
  51. TextLabel3.FontSize = Enum.FontSize.Size28
  52. TextLabel3.Text = "Working Elevator!"
  53. TextLabel3.TextColor = BrickColor.new("Really red")
  54. TextLabel3.TextColor3 = Color3.new(1, 0, 0)
  55. TextLabel3.TextSize = 25
  56. Script4.Name = "Code"
  57. Script4.Parent = Part1
  58. table.insert(cors,sandbox(Script4,function()
  59. debounce = true
  60. part = script.Parent
  61.  
  62. function onTouched(hit)
  63. if (hit.Parent:findFirstChild("Humanoid") ~= nil and debounce == true) then
  64. debounce = false
  65. wait(1)
  66. part.Size = Vector3.new(5.22, 2.02, 4.95)
  67. wait(1)
  68. part.Size = Vector3.new(5.22, 4.02, 4.95)
  69. wait(1)
  70. part.Size = Vector3.new(5.22, 6.02, 4.95)
  71. wait(1)
  72. part.Size = Vector3.new(5.22, 8.02, 4.95)
  73. wait(1)
  74. part.Size = Vector3.new(5.22, 10.02, 4.95)
  75. wait(1)
  76. part.Size = Vector3.new(5.22, 12.02, 4.95)
  77. wait(1)
  78. part.Size = Vector3.new(5.22, 14.02, 4.95)
  79. wait(1)
  80. part.Size = Vector3.new(5.22, 16.02, 4.95)
  81. wait(1)
  82. part.Size = Vector3.new(5.22, 18.02, 4.95)
  83. wait(1)
  84. part.Size = Vector3.new(5.22, 20.02, 4.95)
  85. wait(1)
  86. part.Size = Vector3.new(5.22, 22.02, 4.95)
  87. wait(1)
  88. part.Size = Vector3.new(5.22, 24.02, 4.95)
  89. wait(1)
  90. part.Size = Vector3.new(5.22, 26.02, 4.95)
  91. wait(1)
  92. part.Size = Vector3.new(5.22, 28.02, 4.95)
  93. wait(1)
  94. part.Size = Vector3.new(5.22, 30.02, 4.95)
  95. wait(1)
  96. part.Size = Vector3.new(5.22, 32.02, 4.95)
  97. wait(1)
  98. part.Size = Vector3.new(5.22, 34.02, 4.95)
  99. wait(1)
  100. part.Size = Vector3.new(5.22, 36.02, 4.95)
  101. wait(1)
  102. part.Size = Vector3.new(5.22, 38.02, 4.95)
  103. wait(1)
  104. part.Size = Vector3.new(5.22, 40.02, 4.95)
  105. wait(1)
  106. part.Size = Vector3.new(5.22, 42.02, 4.95)
  107. wait(1)
  108. part.Size = Vector3.new(5.22, 44.02, 4.95)
  109. wait(1)
  110. part.Size = Vector3.new(5.22, 48.02, 4.95)
  111. wait(5)
  112. part.Size = Vector3.new(5.22, 1.02, 4.95)
  113. wait(1)
  114. debounce = true
  115. end
  116. end
  117.  
  118.  
  119. part.Touched:connect(onTouched)
  120. end))
  121. Part5.Name = "Sign"
  122. Part5.Parent = Model0
  123. Part5.CFrame = CFrame.new(17.1914063, 27.7139893, -6.14999723, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  124. Part5.Orientation = Vector3.new(0, 90, 0)
  125. Part5.Position = Vector3.new(17.1914063, 27.7139893, -6.14999723)
  126. Part5.Rotation = Vector3.new(0, 90, 0)
  127. Part5.Color = Color3.new(0.972549, 0.972549, 0.972549)
  128. Part5.Size = Vector3.new(4, 2, 0.25)
  129. Part5.Anchored = true
  130. Part5.BrickColor = BrickColor.new("Institutional white")
  131. Part5.brickColor = BrickColor.new("Institutional white")
  132. Part5.FormFactor = Enum.FormFactor.Symmetric
  133. Part5.formFactor = Enum.FormFactor.Symmetric
  134. SurfaceGui6.Parent = Part5
  135. SurfaceGui6.CanvasSize = Vector2.new(200, 100)
  136. TextLabel7.Parent = SurfaceGui6
  137. TextLabel7.Size = UDim2.new(1, 0, 1, 0)
  138. TextLabel7.BackgroundColor = BrickColor.new("Institutional white")
  139. TextLabel7.BackgroundColor3 = Color3.new(1, 1, 1)
  140. TextLabel7.BackgroundTransparency = 1
  141. TextLabel7.Font = Enum.Font.SourceSansBold
  142. TextLabel7.FontSize = Enum.FontSize.Size48
  143. TextLabel7.Text = "Wellcome :D"
  144. TextLabel7.TextColor = BrickColor.new("Institutional white")
  145. TextLabel7.TextColor3 = Color3.new(1, 1, 1)
  146. TextLabel7.TextScaled = true
  147. TextLabel7.TextSize = 48
  148. TextLabel7.TextStrokeTransparency = 0
  149. TextLabel7.TextWrap = true
  150. TextLabel7.TextWrapped = true
  151. ManualWeld8.Name = "Sign Terrain Joint"
  152. ManualWeld8.Parent = Part5
  153. ManualWeld8.Part1 = Part5
  154. ManualWeld8.part1 = Part5
  155. Part9.Name = "top"
  156. Part9.Parent = Model0
  157. Part9.CFrame = CFrame.new(9.58411407, 24.0989914, -5.94499588, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  158. Part9.Position = Vector3.new(9.58411407, 24.0989914, -5.94499588)
  159. Part9.Size = Vector3.new(25.0500069, 1.23000121, 9.06999779)
  160. Part9.Anchored = true
  161. Part9.BottomSurface = Enum.SurfaceType.Smooth
  162. Part9.TopSurface = Enum.SurfaceType.Smooth
  163. for i,v in pairs(mas:GetChildren()) do
  164. v.Parent = workspace
  165. pcall(function() v:MakeJoints() end)
  166. end
  167. mas:Destroy()
  168. for i,v in pairs(cors) do
  169. spawn(function()
  170. pcall(v)
  171. end)
  172. end
Advertisement
Add Comment
Please, Sign In to add comment