Advertisement
bbaaccuuaa

Untitled

Feb 9th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.36 KB | None | 0 0
  1.  
  2. game.StarterGui:SetCore("SendNotification", {
  3. Title = "Credits";
  4. Text = "By Yolomino And KermitTheFrog";
  5. Icon = "Your Rbx Image";
  6. Duration = 5;})
  7. local Blueprint = "Wall3Tall"
  8. local Preview = false
  9. local preview = game.ReplicatedStorage.Purchasables.Structures.BlueprintStructures[Blueprint].Model:Clone()
  10. local Player = game:GetService("Players").LocalPlayer
  11. local Mouse = Player:GetMouse()
  12. local Fast = Instance.new("Tool",Player.Backpack)
  13. local Mode = Instance.new("Tool",Player.Backpack)
  14. local mode = 0
  15. local X = 0
  16. local Y = 0
  17. local Z = 0
  18. local prefix = "!"
  19. Mode.RequiresHandle = false
  20. Mode.Name = "Mode: Normal"
  21. preview.PrimaryPart = preview.Main
  22. preview.Parent = workspace
  23. for i,v in pairs(preview:GetChildren()) do
  24. if v:IsA("Part") then
  25. v.CanCollide = false
  26. if v.Name ~= "Main" then
  27. v.Transparency = 0.7
  28. v.BrickColor = BrickColor.new("Deep Blue")
  29. end
  30. end
  31. end
  32. Fast.RequiresHandle = false
  33. Fast.Name = "FastPlace"
  34. Fast.Equipped:connect(function(mouse)
  35. Preview = true
  36. spawn(function()
  37. while Preview do
  38. wait()
  39. ray = Ray.new(workspace.Camera.CFrame.p, (game.Players.LocalPlayer:GetMouse().hit.p - workspace.Camera.CFrame.p).unit * 300)
  40. part,position = workspace:FindPartOnRay(ray,preview)
  41. if mode == 0 then
  42. preview:MoveTo(position)
  43. preview:SetPrimaryPartCFrame(CFrame.new(preview.Main.Position.X,preview.Main.Position.Y,preview.Main.Position.Z)*CFrame.Angles(math.rad(X),math.rad(Y),math.rad(Z)))
  44. elseif mode == 1 then
  45. preview:SetPrimaryPartCFrame(CFrame.new(position.X,position.Y,position.Z)*CFrame.Angles(math.rad(X),math.rad(Y),math.rad(Z)))
  46. end
  47. end
  48. preview:SetPrimaryPartCFrame(CFrame.new(0,0,0))
  49. end)
  50. mouse.KeyDown:connect(function(key)
  51. if key == "r" then
  52. if Y+90 > 90 then
  53. Y = 0
  54. else
  55. Y = Y+90
  56. end
  57. elseif key == "f" then
  58. if mode == 0 then
  59. mode = 1
  60. Mode.Name = "Mode: Tilt"
  61. elseif mode == 1 then
  62. mode = 0
  63. Mode.Name = "Mode: Normal"
  64. end
  65. elseif key == "t" then
  66. if X+90 > 90 then
  67. X = 0
  68. else
  69. X = X+90
  70. end
  71. elseif key == "q" then
  72. ray = Ray.new(workspace.Camera.CFrame.p, (game.Players.LocalPlayer:GetMouse().hit.p - workspace.Camera.CFrame.p).unit * 300)
  73. piece,position = workspace:FindPartOnRay(ray,preview)
  74. if piece:IsA("Model") then
  75. game:GetService("ReplicatedStorage").Interaction.DestroyStructure:FireServer(piece)
  76. elseif piece:IsA("Part") and piece.Parent:IsA("Model") then
  77. game:GetService("ReplicatedStorage").Interaction.DestroyStructure:FireServer(piece.Parent)
  78. end
  79. end
  80. end)
  81. Fast.Unequipped:connect(function()
  82. Preview = false
  83. end)
  84. Fast.Activated:connect(function()
  85. game:GetService("ReplicatedStorage").PlaceStructure.ClientPlacedBlueprint:FireServer(Blueprint, CFrame.new(preview.Main.Position.X,preview.Main.Position.Y,preview.Main.Position.Z)*CFrame.Angles(math.rad(X),math.rad(Y),math.rad(Z)), Player)
  86. end)
  87. end)
  88. local function UpdateBlueprint()
  89. k = preview
  90. preview = game.ReplicatedStorage.Purchasables.Structures.BlueprintStructures[Blueprint].Model:Clone()
  91. preview.PrimaryPart = preview.Main
  92. preview.Parent = workspace
  93. for i,v in pairs(preview:GetChildren()) do
  94. if v:IsA("Part") then
  95. v.CanCollide = false
  96. if v.Name ~= "Main" then
  97. v.Transparency = 0.7
  98. v.BrickColor = BrickColor.new("Deep Blue")
  99. end
  100. end
  101. end
  102. k:Destroy()
  103. end
  104. local function ChatHook(command,args)
  105. if command:lower() == "setblueprint" or command:lower() == "setblue" or command:lower() == "setprint" then
  106. if #args == 0 then return end
  107. Blueprint = args[1]
  108. UpdateBlueprint()
  109. end
  110. end
  111.  
  112. game:GetService("Players").LocalPlayer.Chatted:Connect(function(msg)
  113. if msg:find("!") then
  114. local args={}
  115. for v in msg:gmatch("%w+") do
  116. table.insert(args,v)
  117. end
  118. local Command = args[1];table.remove(args,1)
  119. ChatHook(Command,args)
  120. if msg:Lower() == prefix .. "BluePrints" then
  121. print("
  122. Walls
  123. Wall2Short
  124. Wall2ShortThin
  125. Wall2
  126. Wall2Thin
  127. Wall2Tall
  128. Wall2TallThin
  129. Wall2ShortCorner
  130. Wall2Corner
  131. Wall2TallCorner
  132. Wall1Short
  133. Wall1ShortThin
  134. Wall1
  135. Wall1Thin
  136. Wall1Tall
  137. Wall1TallThin
  138. Wall1ShortCorner
  139. Wall1Corner
  140. Wall1TallCorner
  141. Wall3
  142. Wall3Thin
  143. Wall3Tall
  144. Wall3TallThin
  145. Wall3Corner
  146. Wall3TallCorner
  147. Floors
  148. Floor1Large
  149. Floor1
  150. Floor1Small
  151. Floor1Tiny
  152. Floor2Large
  153. Floor2
  154. Floor2Small
  155. Floor2Tiny
  156. Doors
  157. Door1
  158. Wedges
  159. Stair1
  160. Stair2
  161. Wedge1
  162. Wedge1_Thin
  163. Wedge2
  164. Wedge2_Thin
  165. Wedge3
  166. Wedge3_Thin
  167. Wedge4
  168. Wedge4_Thin
  169. Wedge5_Thin
  170. Wedge5
  171. Wedge6_Thin
  172. Wedge6
  173. Wedge7_Thin
  174. Wedge7
  175. Wedge8_Thin
  176. Wedge8
  177. Wedge9_Thin
  178. Wedge9
  179. Wedge10_Thin
  180. Wedge10")
  181. end
  182. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement