local gui = script.Parent
local replicatedstorage = game:GetService("ReplicatedStorage")
local statustag = replicatedstorage:WaitForChild("StatusTag")
local timertag = replicatedstorage:WaitForChild("TimerTag")
local statustitle = gui:WaitForChild("StatusTitle")
local event = replicatedstorage:WaitForChild("RemoteEvent")
local resultprompt = gui:WaitForChild("ResultPrompt")
local resultname = resultprompt:WaitForChild("ResultName")
local resultdesc = resultprompt:WaitForChild("ResultDescription")
local classprompt = gui:WaitForChild("ClassPrompt")
local classname = resultprompt:WaitForChild("ClassName")
local classdesc = resultprompt:WaitForChild("ClassDescription")
function secondstotimer(seconds)
local minutes = math.floor(seconds / 60)
local remainingseconds = seconds % 60
if remainingseconds <= 0 then
remainingseconds = "00"
elseif remainingseconds <= 9 then
remainingseconds = "0" .. remainingseconds
end
return tostring(minutes) .. ":" .. remainingseconds
end
function updatestatus()
if timertag.Value < 0 then
statustitle.Text = statustag.Value
else
statustitle.Text = statustag.Value .. " (" .. secondstotimer(timertag.Value) .. ")"
end
if statustag == "Intermission" then
statustitle.TextColor3 = Color3.new(203/255, 1, 1)
elseif statustag.Value == "Match" then
statustitle.TextColor3 = Color3.new(1, 1, 203/255)
elseif statustag.Value == "Loading Map" or statustag.Value == "Waiting for Players" then
statustitle.TextColor3 = Color3.new(203/255, 1, 203/255)
end
end
timertag.Changed:connect(updatestatus)
statustag.Changed:connect(updatestatus)
updatestatus()
event.OnClientEvent:connect(function(...)
local tuple = {...}
if tuple[1] == "Result" then
if tuple[2] == "Bloxxer Win" then
resultname.Text = "Mad Bloxxer wins!"
resultname.TextColor3 = Color3.new(1, 74/255, 77/255)
resultdesc.Text = "All players were bloxxed."
else
resultname.Text = "Players win!"
resultname.TextColor3 = Color3.new(111/255, 149/255, 1)
resultdesc.Text = "All players were bloxxed."
end
resultprompt.Visible = true
resultprompt.Position = UDim2.new(0, -400, .5, -92)
resultprompt:TweenPosition(UDim2.new(.5, -170, .5, -92), "Out", "Quad", 1)
wait(7)
resultprompt:TweenPosition(UDim2.new(1, 60, .5, -92), "Out", "Quad", 1)
elseif tuple[1] == "Class" then
if tuple[2] == "Bloxxer" then
classname.Text = "You are the Mad Bloxxer"
classname.TextColor3 = Color3.new(1, 74/255, 77/255)
classdesc.Text = "Your goal is to blox everyone!"
end
elseif tuple[2] == "Sheriff" then
classname.Text = "You are the Sheriff"
classname.TextColor3 = Color3.new(111/255, 149/255, 1)
classdesc.Text = "Your goal is to find the Mad Bloxxer and put them away for good!"
else
classname.Text = "You are a Bystander"
classname.TextColor3 = Color3.new(117/255, 1, 156/255)
classdesc.Text = "Your goal is to help the Sheriff find the Mad Bloxxer."
end
classprompt.Visible = true
classprompt.Position = UDim2.new(0, -400, .5, -92)
classprompt:TweenPosition(UDim2.new(.5, -170, .5, -192), "Out", "Quad", 1)
wait(7)
classprompt:TweenPosition(UDim2.new(1, 60, .5, -92), "Out", "Quad", 1)
end
end)
Error: Players.Player1.PlayerGui.ScreenGui.LocalGuiScript:85: ')' expected (to close '(' at line 47) near 'end'
