Advertisement
ManlyFoes

Untitled

Apr 21st, 2016
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.94 KB | None | 0 0
  1. --MADE BY OneLegend (NOT THE SCRIPT) REGULAR SCRIPT: Go to line 3 and put your name where it says "YOUR NAME HERE"
  2.  
  3. me = game.Players.oceaneismyname
  4.  
  5.  
  6. if script.Parent.className ~= "HopperBin" then
  7.  
  8. h = Instance.new("HopperBin")
  9.  
  10. h.Parent = me.Backpack
  11.  
  12. h.Name = "Castle"
  13.  
  14. script.Parent = h
  15.  
  16. end
  17.  
  18.  
  19.  
  20. bin = script.Parent
  21.  
  22.  
  23.  
  24. hold = false
  25.  
  26.  
  27.  
  28. wallbricks = {}
  29.  
  30.  
  31.  
  32. bin.Selected:connect(function(mouse)
  33.  
  34. mouse.Button1Down:connect(function()
  35.  
  36. hold = true
  37.  
  38. local br = Instance.new("Part",me.Character)
  39.  
  40. br.formFactor = 0
  41.  
  42. br.Size = Vector3.new(1,1,1)
  43.  
  44. br.CanCollide = false
  45.  
  46. br.Anchored = true
  47.  
  48. br.TopSurface = 0
  49.  
  50. br.BottomSurface = 0
  51.  
  52. br.CFrame = CFrame.new(mouse.Hit.p)
  53.  
  54. table.insert(wallbricks,br)
  55.  
  56. while hold do
  57.  
  58. wait()
  59.  
  60. br.CFrame = CFrame.new(mouse.Hit.p)
  61.  
  62. end
  63.  
  64. end)
  65.  
  66. mouse.Button1Up:connect(function()
  67.  
  68. hold = false
  69.  
  70. end)
  71.  
  72. mouse.KeyDown:connect(function(key)
  73.  
  74. key = key:lower()
  75.  
  76. if key == "q" then
  77.  
  78. local br = Instance.new("Part",me.Character)
  79.  
  80. br.formFactor = 0
  81.  
  82. br.Size = Vector3.new(1,1,1)
  83.  
  84. br.CanCollide = false
  85.  
  86. br.Anchored = true
  87.  
  88. br.TopSurface = 0
  89.  
  90. br.BottomSurface = 0
  91.  
  92. br.CFrame = CFrame.new(wallbricks[1].Position)
  93.  
  94. table.insert(wallbricks,br)
  95.  
  96. for i=1, #wallbricks do
  97.  
  98. local brick1 = wallbricks[i]
  99.  
  100. local brick2 = wallbricks[i+1]
  101.  
  102. local dist = (brick1.Position - brick2.Position).magnitude
  103.  
  104. local wall = Instance.new("Part")
  105.  
  106. wall.Parent = workspace
  107.  
  108. wall.formFactor = 0
  109.  
  110. wall.Size = Vector3.new(1,8,dist)
  111.  
  112. wall.Anchored = true
  113.  
  114. wall.TopSurface = 0
  115.  
  116. wall.BottomSurface = 0
  117.  
  118. wall.CFrame = CFrame.new(brick1.Position, brick2.Position)
  119.  
  120. wall.CFrame = wall.CFrame * CFrame.new(0,wall.Size.Y/2,-dist/2)
  121.  
  122. end
  123.  
  124. for i=1, #wallbricks do
  125.  
  126. wallbricks[1]:remove()
  127.  
  128. table.remove(wallbricks, 1)
  129.  
  130. end
  131.  
  132. end
  133.  
  134. end)
  135.  
  136. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement