Sacki

omg working elevator roblo!!

Sep 26th, 2017
367
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. floors = 5
  2.  
  3. function prop(part, parent, collide, tran, ref, x, y, z, color, anchor, form)
  4. part.Parent = parent
  5. part.formFactor = form
  6. part.CanCollide = collide
  7. part.Transparency = tran
  8. part.Reflectance = ref
  9. part.Size = Vector3.new(x,y,z)
  10. part.BrickColor = BrickColor.new(color)
  11. part.TopSurface = 0
  12. part.BottomSurface = 0
  13. part.Anchored = anchor
  14. part.Locked = true
  15. part:BreakJoints()
  16. end
  17.  
  18. main = Vector3.new(0,0,-50)
  19. y = workspace.Base.Position.Y + (workspace.Base.Size.Y/2)
  20.  
  21. local ele = Instance.new("Model",workspace)
  22. ele.Name = "xSElevator"
  23.  
  24. function floor()
  25. local f = Instance.new("Part")
  26. prop(f,ele,true,0,0,70,1,70,"Dark grey",true,"Custom")
  27. f.CFrame = CFrame.new(main) * CFrame.new(0,y,0)
  28. for i=-90,90,180 do
  29. local w = Instance.new("Part")
  30. prop(w,ele,true,0,0,70,30,2,"Dark grey",true,"Custom")
  31. w.CFrame = CFrame.new(f.Position) * CFrame.Angles(0,math.rad(i),0) * CFrame.new(0,w.Size.Y/2,-35)
  32. end
  33. local r = Instance.new("Part")
  34. prop(r,ele,true,0,0,69,5,69,"Dark grey",true,"Custom")
  35. r.CFrame = CFrame.new(main) * CFrame.new(0,y+28,0)
  36. for i=-20,20,40 do
  37. local w2 = Instance.new("Part")
  38. prop(w2,ele,true,0,0,28,30,2,"Dark grey",true,"Custom")
  39. w2.CFrame = CFrame.new(main) * CFrame.new(i,y+15,34)
  40. end
  41. local w3 = Instance.new("Part")
  42. prop(w3,ele,true,0,0,12,18,2,"Dark grey",true,"Custom")
  43. w3.CFrame = CFrame.new(main) * CFrame.new(0,y+20.5,34)
  44. end
  45.  
  46. for i=1,floors do
  47. floor()
  48. y = y + 30
  49. end
Add Comment
Please, Sign In to add comment