Advertisement
Sungmingamerpro13

FoodVoteScript(MainScript)

Mar 5th, 2023 (edited)
896
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 0.63 KB | None | 0 0
  1. wait(5)
  2.  
  3. FoodsSystem.ToggleVoteEvent:FireAllClients(true)
  4.  
  5. wait(10)
  6.  
  7. FoodsSystem.ToggleVoteEvent:FireAllClients(false)
  8.  
  9. if FoodsSystem.Food1.Value > FoodsSystem.Food2.Value then
  10.    
  11.     print("Option 1 Won")
  12.     for i, v in pairs(game.Players:GetPlayers()) do
  13.         game.ServerStorage.Foods.Burger:Clone().Parent = v.Backpack
  14.     end
  15. elseif FoodsSystem.Food2.Value > FoodsSystem.Food1.Value then
  16.    
  17.     print("Option 2 Won")
  18.     for i, v in pairs(game.Players:GetPlayers()) do
  19.         game.ServerStorage.Foods.Sandwich:Clone().Parent = v.Backpack
  20.     end
  21.    
  22. elseif FoodsSystem.Food1.Value == FoodsSystem.Food2.Value then
  23.    
  24.     print("Tied Vote")
  25. end
  26.  
  27.  
  28.  
Tags: Roblox
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement