SHARE
TWEET

Untitled

a guest Aug 22nd, 2019 218 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ---------------------Computers---------------------------------------
  2. script.Parent.Buttons.Computers.MouseButton1Click:Connect(function()
  3.     local Type = "Computers"
  4.     if script.Parent.Frames[Type].Visible == false then
  5.         for i,v in pairs(script.Parent.Frames:GetChildren()) do
  6.             if v.Name ~= Type then
  7.                 v.Visible = false
  8.             end
  9.             script.Parent.Frames[Type].Visible = true
  10.         end
  11.     end
  12. end)
  13. ---------------------------Servers----------------
  14. script.Parent.Buttons.Servers.MouseButton1Click:Connect(function()
  15.     local Type = "Servers"
  16.     if script.Parent.Frames[Type].Visible == false then
  17.         for i,v in pairs(script.Parent.Frames:GetChildren()) do
  18.             if v.Name ~= Type then
  19.                 v.Visible = false
  20.             end
  21.             script.Parent.Frames[Type].Visible = true
  22.         end
  23.     end
  24. end)
  25. -----------------Workers------------------------------
  26. script.Parent.Buttons.Workers.MouseButton1Click:Connect(function()
  27.     local Type = "Workers"
  28.     if script.Parent.Frames[Type].Visible == false then
  29.         for i,v in pairs(script.Parent.Frames:GetChildren()) do
  30.             if v.Name ~= Type then
  31.                 v.Visible = false
  32.             end
  33.             script.Parent.Frames[Type].Visible = true
  34.         end
  35.     end
  36. end)
  37. ---------------------Networks----------------------------
  38. script.Parent.Buttons.Networks.MouseButton1Click:Connect(function()
  39.     local Type = "Networks"
  40.     if script.Parent.Frames[Type].Visible == false then
  41.         for i,v in pairs(script.Parent.Frames:GetChildren()) do
  42.             if v.Name ~= Type then
  43.                 v.Visible = false
  44.             end
  45.             script.Parent.Frames[Type].Visible = true
  46.         end
  47.     end
  48. end)
  49. ----------------Modems------------------------------
  50. script.Parent.Buttons.Modems.MouseButton1Click:Connect(function()
  51.     local Type = "Modems"
  52.     if script.Parent.Frames[Type].Visible == false then
  53.         for i,v in pairs(script.Parent.Frames:GetChildren()) do
  54.             if v.Name ~= Type then
  55.                 v.Visible = false
  56.             end
  57.             script.Parent.Frames[Type].Visible = true
  58.         end
  59.     end
  60. end)
  61. -------------------Building-------------------------
  62. script.Parent.Buttons.Building.MouseButton1Click:Connect(function()
  63.     local Type = "Building"
  64.     if script.Parent.Frames[Type].Visible == false then
  65.         for i,v in pairs(script.Parent.Frames:GetChildren()) do
  66.             if v.Name ~= Type then
  67.                 v.Visible = false
  68.             end
  69.             script.Parent.Frames[Type].Visible = true
  70.         end
  71.     end
  72. end)
  73. --------------------Routers------------------------
  74. script.Parent.Buttons.Routers.MouseButton1Click:Connect(function()
  75.     local Type = "Routers"
  76.     if script.Parent.Frames[Type].Visible == false then
  77.         for i,v in pairs(script.Parent.Frames:GetChildren()) do
  78.             if v.Name ~= Type then
  79.                 v.Visible = false
  80.             end
  81.             script.Parent.Frames[Type].Visible = true
  82.         end
  83.     end
  84. end)
  85. ---------------------Money Makers---------------------
  86. script.Parent.Buttons.MoneyMakers.MouseButton1Click:Connect(function()
  87.     local Type = "MoneyMakers"
  88.     if script.Parent.Frames[Type].Visible == false then
  89.         for i,v in pairs(script.Parent.Frames:GetChildren()) do
  90.             if v.Name ~= Type then
  91.                 v.Visible = false
  92.             end
  93.             script.Parent.Frames[Type].Visible = true
  94.         end
  95.     end
  96. end)
  97. ----------------------------------------------------
  98. for i,v in pairs(script.Parent.Frames:GetDescendants()) do
  99.      if v.ClassName == "TextButton" then
  100.         v.MouseButton1Click:Connect(function()
  101.             script.parent.MainView.CurrentCamera = v.Parent.ViewportFrame:FindFirstChild("Camera")
  102.             local Model = v.Parent.ViewportFrame:FindFirstChild("Model"):Clone()
  103.             if Model ~= nil then
  104.                 Model.Parent = script.Parent.MainView
  105.             end
  106.             script.Parent.Labels.name.Text =  v.Stats.Name.Value
  107.             script.Parent.Labels.Stat1.Text = "Cost" .. v.Stats.Cost.Value
  108.             script.Parent.Labels.Stat2.Text = "Gives"  .. v.Stats.Cost.Value
  109.             script.Parent.Labels.Stat3.Text = "Accepts Qubits" .. v.Stats.Cost.Value
  110.             script.Parent.Labels.Stat4.Text = "Min Network Requirments" .. v.Stats["Min Network Requirments"].Value
  111.            
  112.         end)
  113.     end
  114. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top