Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Scripted DeathToTheStadium
- --SEVERSCRIPT
- wait(4)
- local Module = require(script.Parent.BasicFunctions)
- local ScreenContainer = script.Parent.Parent
- local FramesFolder = ScreenContainer:WaitForChild("Frames")
- local MainFrame = ScreenContainer.MainFrame
- local ImageButton = ScreenContainer.ImageButton
- local Credits = FramesFolder.Credits
- local Rules = FramesFolder.Rules
- local Teams = FramesFolder.Team
- local CreditsButton = MainFrame.Credits
- local RulesButton = MainFrame.Rules
- local TeamsButton = MainFrame.Teams
- local Color1 = Color3.new() -- Set your Colors
- local Color2 = Color3.new() -- Set your Colors
- local function SetVisibiility()
- Module:IsVisible(Credits)
- end
- for i,v in pairs(FramesFolder:GetChildren()) do
- local Frame = v
- v.ImageButton.MouseButton1Down:Connect(function() Module:IsVisible(Frame) end)
- end
- ImageButton.MouseButton1Down:Connect(function()
- Module:ChangeButtonColor(ImageButton,Color3.new(119, 255, 61),Color3.new(0.764706, 0.921569, 0.188235))
- Module:IsVisible(MainFrame)
- end)
- CreditsButton.MouseButton1Down:Connect(function() Module:IsVisible(Credits); MainFrame.Visible = false; end)
- RulesButton.MouseButton1Down:Connect(function() Module:IsVisible(Rules); MainFrame.Visible = false; end)
- TeamsButton.MouseButton1Down:Connect(function() Module:IsVisible(Teams); MainFrame.Visible = false; end)
- ---ModuleScript
- local module = {}
- function module:IsVisible(Frame)
- if Frame.Visible == true then
- Frame.Visible = false
- elseif Frame.Visible == false then
- Frame.Visible = true
- end
- end
- function module:ChangeButtonColor(Imagebutton,Color1,Color2)
- if Imagebutton.ImageColor3 == Color1 then
- Imagebutton.ImageColor3 = Color2
- elseif Imagebutton.ImageColor3 == Color2 then
- Imagebutton.ImageColor3 = Color1
- else
- Imagebutton.ImageColor3 = Color1
- end
- end
- return module
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement