Advertisement
_Heh

Max Plot?

Jan 28th, 2020
14,324
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.69 KB | None | 0 0
  1. for i,v in pairs(game.Workspace.Game.Buttons:GetChildren()) do
  2. if v.Name == game.Players.LocalPlayer.Name then
  3. for i,v2 in pairs(v:GetChildren()) do
  4. game:GetService("ReplicatedStorage").RE.relinquish:FireServer(v2, true)
  5. end
  6. end
  7. end
  8.  
  9. for i,v in pairs(game.Workspace.Game.Buttons:GetChildren()) do
  10. if v.Name == game.Players.LocalPlayer.Name then
  11. for i,v2 in pairs(v:GetChildren()) do
  12. for i,v3 in pairs(v2:GetChildren()) do
  13. if v3:IsA("ObjectValue") then
  14. v3.Name = v3.Value.Name
  15. end
  16. end
  17. end
  18. end
  19. end
  20.  
  21.  
  22. for i,v in pairs(game.Workspace.Game.Buttons:GetChildren()) do
  23. if v.Name == game.Players.LocalPlayer.Name then
  24. for i,v2 in pairs(v:GetChildren()) do
  25. for i,v3 in pairs(v2:GetChildren()) do
  26. if v3:IsA("ObjectValue") then
  27. if v3.Name == "Barracks" then
  28. local Class = game.ReplicatedStorage.Game.Buildings["Barracks"]["2"];
  29. local Button = v2;
  30. local Target = game:GetService("ReplicatedStorage").RE.insertBuilding;
  31. Target:FireServer(Class, Button);
  32. else
  33. if v3.Name == "Greenhouse" then
  34. local Class = game.ReplicatedStorage.Game.Buildings["Greenhouse"]["2"];
  35. local Button = v2;
  36. local Target = game:GetService("ReplicatedStorage").RE.insertBuilding;
  37. Target:FireServer(Class, Button);
  38. else
  39. if v3.Name == "Factory" then
  40. local Class = game.ReplicatedStorage.Game.Buildings["Factory"]["3"];
  41. local Button = v2;
  42. local Target = game:GetService("ReplicatedStorage").RE.insertBuilding;
  43. Target:FireServer(Class, Button);
  44. else
  45. if v3.Name == "Oil Field" then
  46. local Class = game.ReplicatedStorage.Game.Buildings["Oil Field"]["2"];
  47. local Button = v2;
  48. local Target = game:GetService("ReplicatedStorage").RE.insertBuilding;
  49. Target:FireServer(Class, Button);
  50. else
  51. if v3.Name == "Guard Tower" then
  52. local Class = game.ReplicatedStorage.Game.Buildings["Guard Tower"]["1"];
  53. local Button = v2;
  54. local Target = game:GetService("ReplicatedStorage").RE.insertBuilding;
  55. Target:FireServer(Class, Button);
  56. else
  57. if v3.Name == "Wall" then
  58. local Class = game.ReplicatedStorage.Game.Buildings["Wall"]["2"];
  59. local Button = v2;
  60. local Target = game:GetService("ReplicatedStorage").RE.insertBuilding;
  61. Target:FireServer(Class, Button);
  62. else
  63. if v3.Name == "Generator Powerplant" then
  64. local Class = game.ReplicatedStorage.Game.Buildings["Generator Powerplant"]["1"];
  65. local Button = v2;
  66. local Target = game:GetService("ReplicatedStorage").RE.insertBuilding;
  67. Target:FireServer(Class, Button);
  68. else
  69. if v3.Name == "Missile Factory" then
  70. local Class = game.ReplicatedStorage.Game.Buildings["Missile Factory"]["1"];
  71. local Button = v2;
  72. local Target = game:GetService("ReplicatedStorage").RE.insertBuilding;
  73. Target:FireServer(Class, Button);
  74. else
  75. if v3.Name == "Command Center" then
  76. local Class = game.ReplicatedStorage.Game.Buildings["Command Center"]["2"];
  77. local Button = v2;
  78. local Target = game:GetService("ReplicatedStorage").RE.insertBuilding;
  79. Target:FireServer(Class, Button);
  80. else
  81. if v3.Name == "Drone Factory" then
  82. local Class = game.ReplicatedStorage.Game.Buildings["Drone Factory"]["1"];
  83. local Button = v2;
  84. local Target = game:GetService("ReplicatedStorage").RE.insertBuilding;
  85. Target:FireServer(Class, Button);
  86. else
  87. if v3.Name == "Military" then
  88. local Class = game.ReplicatedStorage.Game.Buildings.Military["Tank Factory"]["2"];
  89. local Button = v2;
  90. local Target = game:GetService("ReplicatedStorage").RE.insertBuilding;
  91. Target:FireServer(Class, Button);
  92. else
  93. if v3.Name == "Nuclear Powerplant" then
  94. local Class = game.ReplicatedStorage.Game.Buildings["Nuclear Powerplant"]["1"];
  95. local Button = v2;
  96. local Target = game:GetService("ReplicatedStorage").RE.insertBuilding;
  97. Target:FireServer(Class, Button);
  98. else
  99. if v3.Name == "Airport" then
  100. local Class = game.ReplicatedStorage.Game.Buildings["Airport"]["1"];
  101. local Button = v2;
  102. local Target = game:GetService("ReplicatedStorage").RE.insertBuilding;
  103. Target:FireServer(Class, Button);
  104. else
  105. if v3.Name == "Helicopter Bay" then
  106. local Class = game.ReplicatedStorage.Game.Buildings["Helicopter Bay"]["2"];
  107. local Button = v2;
  108. local Target = game:GetService("ReplicatedStorage").RE.insertBuilding;
  109. Target:FireServer(Class, Button);
  110. else
  111. if v3.Name == "Main Base" then
  112. local Class = game.ReplicatedStorage.Game.Buildings["Main Base"]["2"];
  113. local Button = v2;
  114. local Target = game:GetService("ReplicatedStorage").RE.insertBuilding;
  115. Target:FireServer(Class, Button);
  116. end
  117. end
  118. end
  119. end
  120. end
  121. end
  122. end
  123. end
  124. end
  125. end
  126. end
  127. end
  128. end
  129. end
  130. end
  131. end
  132. end
  133. end
  134. end
  135. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement