Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local VoteRemotes = game.ReplicatedStorage.VoteRemotes
- local VoteValues = game.ReplicatedStorage.VoteValues
- function Voting_System(Time)
- for i = Time,0,-1 do
- VoteValues.Status.Value = i.." Seconds Left To Choose!"
- wait(1)
- end
- end
- function BadgeAward(Id)
- for i,v in pairs(game.Players:GetPlayers()) do
- game:GetService("BadgeService"):AwardBadge(v.UserId, Id)
- end
- end
- --- MainScript ---
- VoteRemotes.ToggleVoteEvent:FireAllClients(true)
- Voting_System(15)
- VoteRemotes.ToggleVoteEvent:FireAllClients(false)
- if VoteValues.Option1.Value > VoteValues.Option2.Value then
- print("Option One Won!")
- wait(5)
- BadgeAward(2152687115723422)
- elseif VoteValues.Option2.Value > VoteValues.Option1.Value then
- print("Option Two Won!")
- wait(5)
- BadgeAward(2794804832658513)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement