Advertisement
HowToRoblox

PickWinnerScript

Jan 11th, 2020
757
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.83 KB | None | 0 0
  1. local entries = {
  2.     "no0b1234567897",
  3.     "BaconMannMcGee",
  4.     "screwupboy",
  5.     "EliteGuest3089",
  6.     "TankerWastaken",
  7.     "3MooR_Gamer",
  8.     "Voidlet",
  9.     "jguuh",
  10.     "ChewieJarry",
  11.     "Niker_y",
  12.     "DeterminedLeonAdrian",
  13.     "MiDuzz1",
  14.     "MrDarkWarrior07",
  15.     "GenyaMolotok123",
  16.     "InventoryEgg",
  17.     "BadDestroyer808",
  18.     "Pavel1012345",
  19.     "BROXSKCZ",
  20.     "NorthZGaming",
  21.     "Midnight_playz1308",
  22.     "HAHOOS",
  23.     "socincet",
  24.     "LIewelyn",
  25.     "Stars413",
  26.     "HarshPatellll",
  27.     "Atric49",
  28.     "ISkyLordDoge",
  29.     "OwnHour",
  30.     "canceltheshow1",
  31.     "firelion_128",
  32.     "RyanPlaysRoblox66_6",
  33.     "iJexkll",
  34.     "igor2654",
  35.     "taylorboog",
  36.     "ImNotStealthyBro",
  37.     "ToxcPlayz",
  38.     "Tim2008thekillr",
  39.     "Uxzi_Developer",
  40.     "Ytdarklord12",
  41.     "The_ReaperxD7",
  42.     "roblox_test12322",
  43.     "TheOnlineNinja4321",
  44.     "esra_playz",
  45.     "JuzeyPlayz",
  46.     "SacredKilluh",
  47.     "Hyruzz",
  48.     "GlDl0N",
  49.     "liamshaw2",
  50.     "TwistedkidHG",
  51.     "GuitarGavin",
  52.     "iKnifeMasterjr",
  53.     "20anguyen5",
  54.     "DOREMONCKMY"
  55.     }
  56.  
  57.  
  58. local rollButton = script.Parent.RollButton
  59.  
  60. local username = script.Parent.PlayerName
  61.  
  62.  
  63. local drumRoll = script.Parent.DrumRoll
  64.  
  65. local winnerSound = script.Parent.WinnerSound
  66.  
  67.  
  68. local isRolling = false
  69.  
  70.  
  71. rollButton.MouseButton1Click:Connect(function()
  72.    
  73.     if isRolling == true then return end
  74.    
  75.     username.TextColor3 = Color3.fromRGB(255, 255, 255)
  76.    
  77.     isRolling = true
  78.    
  79.     drumRoll:Play()
  80.    
  81.     for i = 1, 2 do
  82.    
  83.         for x, entry in pairs(entries) do
  84.                
  85.             username.Text = entries[math.random(1, #entries)]
  86.                
  87.             wait(5 / #entries)
  88.         end
  89.  
  90.     end
  91.    
  92.     username.Text = ""
  93.    
  94.     username.Size = UDim2.new(0, 0, 0, 0)
  95.    
  96.     wait(1)
  97.    
  98.     username.Text = entries[math.random(1, #entries)]
  99.    
  100.     username:TweenSize(UDim2.new(0.98, 0, 0.515, 0), Enum.EasingDirection.InOut, Enum.EasingStyle.Quint, 0.4)
  101.    
  102.     winnerSound:Play()
  103.    
  104.     username.TextColor3 = Color3.fromRGB(213, 255, 0)
  105.    
  106.     isRolling = false
  107.    
  108. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement