Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local player = game:GetService("Players").LocalPlayer
- local voted = player:WaitForChild("voted")
- local rep = game:GetService("ReplicatedStorage")
- local votere = rep:WaitForChild("RemoteEvent"):WaitForChild("Vote")
- local variables = rep:WaitForChild("Variables")
- local boolean = rep:WaitForChild("Booleans"):WaitForChild("RevealVotes")
- local choice = variables:WaitForChild("Choice1")
- local votechoice = variables:WaitForChild("VoteChoice1")
- local votescounter = script.Parent:FindFirstChild("Votes")
- local map = choice.Value
- if choice.Value then
- script.Parent.Title.Text = map.Name
- end
- choice:GetPropertyChangedSignal("Value"):Connect(function()
- local map = choice.Value
- if choice.Value then
- script.Parent.Title.Text = map.Name
- end
- end)
- if voted.Value == true then
- script.Parent.VOTE.Visible = false
- else
- script.Parent.VOTE.Visible = true
- end
- voted:GetPropertyChangedSignal("Value"):Connect(function()
- if voted.Value == true then
- script.Parent.VOTE.Visible = false
- else
- script.Parent.VOTE.Visible = true
- end
- end)
- script.Parent.VOTE.MouseButton1Click:Connect(function()
- votere:FireServer(choice.Name)
- end)
- if boolean.Value == true then
- votescounter.Visible = true
- for i = 1,20 do
- votescounter.Text = "Votes: "..math.random(0,10)
- wait()
- end
- votescounter.Text = "Votes: "..votechoice.Value
- else
- votescounter.Visible = false
- votescounter.Text = "Votes: "
- end
- boolean:GetPropertyChangedSignal("Value"):Connect(function()
- if boolean.Value == true then
- votescounter.Visible = true
- for i = 1,20 do
- votescounter.Text = "Votes: "..math.random(0,10)
- wait()
- end
- votescounter.Text = "Votes: "..votechoice.Value
- else
- votescounter.Visible = false
- votescounter.Text = "Votes: "
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement