Advertisement
Sungmingamerpro13

MainScript with 4 Votes (Script)

May 13th, 2025
553
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.75 KB | None | 0 0
  1. local VoteRemotes = game.ReplicatedStorage.VoteRemotes
  2. local VoteValues = game.ReplicatedStorage.VoteValues
  3.  
  4. function Voting_System(Time)
  5.     for i = Time,0,-1 do
  6.         VoteValues.Status.Value = i.." Seconds Left To Choose!"
  7.         wait(1)
  8.     end
  9. end
  10.  
  11. --- MainScript ---
  12.  
  13. VoteRemotes.ToggleVoteEvent:FireAllClients(true)
  14. Voting_System(15)
  15. VoteRemotes.ToggleVoteEvent:FireAllClients(false)
  16.  
  17. if VoteValues.Option1.Value > VoteValues.Option2.Value then
  18.     print("Option One Won!")
  19. elseif VoteValues.Option2.Value > VoteValues.Option1.Value then
  20.     print("Option Two Won!")
  21. elseif VoteValues.Option3.Value > VoteValues.Option2.Value then
  22.     print("Option Three Won!")
  23. elseif VoteValues.Option4.Value > VoteValues.Option3.Value then
  24.     print("Option Four Won!")
  25. end
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement