Advertisement
Vincent_Ablat

Longest answer wins Script

Dec 18th, 2022 (edited)
6,402
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1.  
  2. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  3.  
  4. local hintAnswer = ReplicatedStorage.HintAnswer
  5. local submitAnswer = ReplicatedStorage.SubmittedAnswer
  6.  
  7. local function answerQuestion()
  8. local correctAnswer = hintAnswer.Value
  9. local answerLength = #correctAnswer
  10.  
  11. task.wait(math.random(20, 30) / 10 + answerLength / 5) -- 2 - 3s of "thinking", typing speed at 5 cps (average)
  12.  
  13. submitAnswer:FireServer(correctAnswer, answerLength)
  14. end
  15.  
  16. answerQuestion()
  17.  
  18. hintAnswer:GetPropertyChangedSignal("Value"):Connect(answerQuestion)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement