Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- VotingValues.VoteEvent.OnServerEvent:Connect(function(player, previous, chosen)
- local votes = VotingValues[chosen]
- votes.Value = votes.Value + 1
- if previous ~= nil then
- local prev = VotingValues[previous]
- prev.Value = prev.Value - 1
- end
- end)
- VotingValues.VotingOn.Value = false
- wait(5)
- VotingValues.VotingOn.Value = true
- for i = 15,0,-1 do
- VotingValues.VotingStatus.Value = i.." Seconds Left to chosen!"
- wait(1)
- end
- local votes = {VotingValues.Good, VotingValues.Bad}
- table.sort(votes, function(a, b)
- return a.Value > b.Value
- end)
- local chosen = votes[1].Name
- if chosen == "Good" then
- print("Good Ending!")
- else
- print("Bad Ending!")
- end
Advertisement
Add Comment
Please, Sign In to add comment