Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---------------------Computers---------------------------------------
- script.Parent.Buttons.Computers.MouseButton1Click:Connect(function()
- local Type = "Computers"
- if script.Parent.Frames[Type].Visible == false then
- for i,v in pairs(script.Parent.Frames:GetChildren()) do
- if v.Name ~= Type then
- v.Visible = false
- end
- script.Parent.Frames[Type].Visible = true
- end
- end
- end)
- ---------------------------Servers----------------
- script.Parent.Buttons.Servers.MouseButton1Click:Connect(function()
- local Type = "Servers"
- if script.Parent.Frames[Type].Visible == false then
- for i,v in pairs(script.Parent.Frames:GetChildren()) do
- if v.Name ~= Type then
- v.Visible = false
- end
- script.Parent.Frames[Type].Visible = true
- end
- end
- end)
- -----------------Workers------------------------------
- script.Parent.Buttons.Workers.MouseButton1Click:Connect(function()
- local Type = "Workers"
- if script.Parent.Frames[Type].Visible == false then
- for i,v in pairs(script.Parent.Frames:GetChildren()) do
- if v.Name ~= Type then
- v.Visible = false
- end
- script.Parent.Frames[Type].Visible = true
- end
- end
- end)
- ---------------------Networks----------------------------
- script.Parent.Buttons.Networks.MouseButton1Click:Connect(function()
- local Type = "Networks"
- if script.Parent.Frames[Type].Visible == false then
- for i,v in pairs(script.Parent.Frames:GetChildren()) do
- if v.Name ~= Type then
- v.Visible = false
- end
- script.Parent.Frames[Type].Visible = true
- end
- end
- end)
- ----------------Modems------------------------------
- script.Parent.Buttons.Modems.MouseButton1Click:Connect(function()
- local Type = "Modems"
- if script.Parent.Frames[Type].Visible == false then
- for i,v in pairs(script.Parent.Frames:GetChildren()) do
- if v.Name ~= Type then
- v.Visible = false
- end
- script.Parent.Frames[Type].Visible = true
- end
- end
- end)
- -------------------Building-------------------------
- script.Parent.Buttons.Building.MouseButton1Click:Connect(function()
- local Type = "Building"
- if script.Parent.Frames[Type].Visible == false then
- for i,v in pairs(script.Parent.Frames:GetChildren()) do
- if v.Name ~= Type then
- v.Visible = false
- end
- script.Parent.Frames[Type].Visible = true
- end
- end
- end)
- --------------------Routers------------------------
- script.Parent.Buttons.Routers.MouseButton1Click:Connect(function()
- local Type = "Routers"
- if script.Parent.Frames[Type].Visible == false then
- for i,v in pairs(script.Parent.Frames:GetChildren()) do
- if v.Name ~= Type then
- v.Visible = false
- end
- script.Parent.Frames[Type].Visible = true
- end
- end
- end)
- ---------------------Money Makers---------------------
- script.Parent.Buttons.MoneyMakers.MouseButton1Click:Connect(function()
- local Type = "MoneyMakers"
- if script.Parent.Frames[Type].Visible == false then
- for i,v in pairs(script.Parent.Frames:GetChildren()) do
- if v.Name ~= Type then
- v.Visible = false
- end
- script.Parent.Frames[Type].Visible = true
- end
- end
- end)
- ----------------------------------------------------
- for i,v in pairs(script.Parent.Frames:GetDescendants()) do
- if v.ClassName == "TextButton" then
- v.MouseButton1Click:Connect(function()
- script.parent.MainView.CurrentCamera = v.Parent.ViewportFrame:FindFirstChild("Camera")
- local Model = v.Parent.ViewportFrame:FindFirstChild("Model"):Clone()
- if Model ~= nil then
- Model.Parent = script.Parent.MainView
- end
- script.Parent.Labels.name.Text = v.Stats.Name.Value
- script.Parent.Labels.Stat1.Text = "Cost" .. v.Stats.Cost.Value
- script.Parent.Labels.Stat2.Text = "Gives" .. v.Stats.Cost.Value
- script.Parent.Labels.Stat3.Text = "Accepts Qubits" .. v.Stats.Cost.Value
- script.Parent.Labels.Stat4.Text = "Min Network Requirments" .. v.Stats["Min Network Requirments"].Value
- end)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement