Advertisement
MisterH_t

wordsSystem | Script

Aug 12th, 2022 (edited)
959
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.90 KB | None | 0 0
  1. Qualquer problema, me contacte no Discord mistr#2399.
  2. ------------------------------------------------------
  3.  
  4. game.Players.PlayerAdded:connect(function(plr)
  5.     plr.CharacterAdded:connect(function(char)
  6.         local head = char.Head
  7.        
  8.         local rwords = math.random(1,100) --Defina o limite de palavras (100/mais).
  9.        
  10.         local gui = script.wordsGui:Clone()
  11.         gui.Parent = head
  12.  
  13.         spawn(function()
  14.             while task.wait() do
  15.                 gui.wordsValue.Text = rwords
  16.             end
  17.         end)
  18.  
  19.         plr.Chatted:connect(function(msg)
  20.             local amt = #string.split(msg," ")
  21.             if amt >= rwords then
  22.                 plr:Kick("You ran out of words.")
  23.             else
  24.                 rwords -= amt
  25.             end
  26.         end)
  27.     end)
  28. end)
  29.  
  30. -----------------------------------------------------------------
  31. Tenha a certeza que:
  32. - O BillboardGui tenha o nome de "wordsGui";
  33. - O Parente do BillboardGui seja o Script;
  34. - Não mude nada no Script, a não ser o valor máximo de palavras.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement