Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local VotingValues = game.ReplicatedStorage.VotingValues
- local votes = {VotingValues.Good, VotingValues.Bad}
- function VotingSystem(Time)
- VotingValues.VotingOn.Value = true
- for i = Time,0,-1 do
- VotingValues.VotingStatus.Value = i.." Seconds Left To Choose!"
- wait(1)
- end
- VotingValues.VotingOn.Value = false
- end
- wait(5)
- VotingSystem(15)
- table.sort(votes, function(A, B)
- return A.Value > B.Value
- end)
- local chosen = votes[1].Name
- if chosen == "Good" then
- print("Good Ending!")
- elseif chosen == "Bad" then
- print("Bad Ending!")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement