local GuiControl = {}
GuiControl.__index = GuiControl
GuiControl.GuiDebounce = false
function GuiControl.new(guis: ScreenGui)
local self = setmetatable({}, GuiControl)
self.Guis = guis
self.Boards = self.Guis:FindFirstChild("Boards")
self.InterMission = self.Guis.Intermission
self.Counter = self.InterMission.TextLabel
self.Counter.Text = "Intermission: "..Status.Value
Status.Changed:Connect(self.Changed, self)
task.spawn(function()
for i, v in next, self.Guis:GetChildren() do
if v:IsA("ImageButton") then
v.MouseEnter:Connect(function()
if v.Name == "PlayerButton" then return end
self:Hover(v, v.Name)
end)
v.MouseLeave:Connect(function()
if v.Name == "PlayerButton" then return end
self:UnHover(v, v.Name)
end)
v.Activated:Connect(function()
if v.Name == "PlayButton" then
--GuiItils[v.Name].Functionality(self, v, v.Name)
task.spawn(GuiItils[v.Name].Functionality, self, v, v.Name)
else
task.spawn(self.TweenGui, self, v, v.Name)
self:OpenBoard(self.Boards[v:GetAttribute("Board")], v:GetAttribute("Board"))
end
end)
end
end
end)
return self
end
function GuiControl:Changed()
if self.Counter then
print("Text Label Exist")
else
print("Not Exist")
end
--self.Counter.Text = "Intermission: "..Status.Value
end
local GuiControl = {}
GuiControl.__index = GuiControl
GuiControl.GuiDebounce = false
function GuiControl.new(guis: ScreenGui)
local self = setmetatable({}, GuiControl)
self.Guis = guis
self.Boards = self.Guis:FindFirstChild("Boards")
self.InterMission = self.Guis.Intermission
self.Counter = self.InterMission.TextLabel
self.Counter.Text = "Intermission: "..Status.Value
function self:Changed()
if self.Counter then
print("Text Label Exist")
else
print("Not Exist")
end
--self.Counter.Text = "Intermission: "..Status.Value
end
Status.Changed:Connect(function()
self:Changed()
end)
task.spawn(function()
for i, v in next, self.Guis:GetChildren() do
if v:IsA("ImageButton") then
v.MouseEnter:Connect(function()
if v.Name == "PlayerButton" then return end
self:Hover(v, v.Name)
end)
v.MouseLeave:Connect(function()
if v.Name == "PlayerButton" then return end
self:UnHover(v, v.Name)
end)
v.Activated:Connect(function()
if v.Name == "PlayButton" then
--GuiItils[v.Name].Functionality(self, v, v.Name)
task.spawn(GuiItils[v.Name].Functionality, self, v, v.Name)
else
task.spawn(self.TweenGui, self, v, v.Name)
self:OpenBoard(self.Boards[v:GetAttribute("Board")], v:GetAttribute("Board"))
end
end)
end
end
end)
return self
end