local L=game.ServerStorage.States.MapVote L.CurrentlyVoting.Changed:connect(function()local W=L.CurrentlyVoting.Value script.Parent.Image.Visible=W script.Parent.CountLabel.Visible=W script.Parent.MapName.Visible=W script.Parent.Count.Visible=W end)L.Map1.Changed:connect(function()local W=L.Map1.Value script.Parent.Image.Image=W.ImageAsset.Value script.Parent.MapName.Text=W.Name end)L.Count1.Changed:connect(function()script.Parent.Count.Text=L.Count1.Value end)


local voteStates = game.ServerStorage.States.MapVote

voteStates.CurrentlyVoting.Changed:connect(function()
	
	-- Adjust visiblity
	local newVal = voteStates.CurrentlyVoting.Value
	script.Parent.Image.Visible = newVal
	script.Parent.CountLabel.Visible = newVal
	script.Parent.MapName.Visible = newVal
	script.Parent.Count.Visible = newVal
	
end)

voteStates.Map1.Changed:connect(function()
	
	-- Update map name and image
	local newMap = voteStates.Map1.Value
	script.Parent.Image.Image = newMap.ImageAsset.Value
	script.Parent.MapName.Text = newMap.Name
	
end)

voteStates.Count1.Changed:connect(function()
	
	-- Update map count
	script.Parent.Count.Text = voteStates.Count1.Value
	
end)
