Advertisement
Zwiebelle1301706

Quiz script! Loadstring at the bottom, or just pate all wit control.

May 21st, 2024 (edited)
840
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 70.60 KB | None | 0 0
  1. --[[
  2. -> This script is for fun quizzes, made by @Verwendedeinherz
  3. -> Dev: @Verwendedeinherz
  4. -> Scripter: @Verwendedeinherz aka @Uweder1 / @lIIlIIlIIIlIIII
  5. -> Idea: N/A
  6. -> Helper: @Verwendedeinherz
  7.  
  8.  
  9. █▀█ █░█ █ ▀█   █▀ █▀▀ █▀█ █ █▀█ ▀█▀
  10. ▀▀█ █▄█ █ █▄   ▄█ █▄▄ █▀▄ █ █▀▀ ░█░
  11.  
  12. ❗Have fun❗
  13.  
  14. ]]--
  15.  
  16. print("Quiz script by VXPLOITS!!")
  17. wait(0.5)
  18. wait(1.3)
  19. print("Sucesfully loaded the script!")
  20. wait(1)
  21. game.StarterGui:SetCore("SendNotification", {
  22.     Title = "Damians Discord [COPIED TO CLIPBOARD]!";
  23.     Text = "https://discord.gg/Np72b8mC";
  24.     Icon = "";
  25.     Duration = "25";
  26. })
  27.  
  28. setclipboard("@Verwendedeinherz's Discord -> https://discord.gg/6An5J3kQ")
  29. toclipboard("@Verwendedeinherz's Discord -> https://discord.gg/6An5J3kQ")
  30.  
  31. local letters = {"A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"}
  32. local userCooldowns = {}
  33. local currentQuestion
  34. local questionAnsweredBy
  35. local quizRunning = false
  36. local players = game:GetService("Players")
  37. local localPlayer = players.LocalPlayer
  38. local blockedPlayers = {}
  39. local whiteListedplayers = {}
  40. local mode = "quiz"
  41. local answeredCorrectly = {}
  42. local submittedAnswer = {}
  43. local awaitingAnswer = false
  44. local questionPoints = 1
  45. local timeSinceLastMessage = tick()
  46. local placeId = game.PlaceId
  47. local replicatedStorage = game:GetService("ReplicatedStorage")
  48. local textChatService = game:GetService("TextChatService")
  49. local quizCooldown = false
  50. local answerOptionsSaid = 0 -- how many answer options have been said (0 = none, 1 = a, 2 = b, etc.). Prevents users from spamming letters before they even know what the corresponding answer option is
  51. local minMessageCooldown = 2.3 -- how much you need to wait to send another message to avoid ratelimit
  52.  
  53. local settings = {
  54.     questionTimeout = 10,
  55.     userCooldown = 5,
  56.     sendLeaderBoardAfterQuestions = 5,
  57.     automaticLeaderboards = true,
  58.     automaticCurrentQuizLeaderboard = true,
  59.     automaticServerQuizLeaderboard = true,
  60.     signStatus = true,
  61.     romanNumbers = true,
  62.     autoplay = false,
  63.     repeatTagged = true
  64. }
  65.  
  66. local numberMap = {
  67.     {1000, 'M'},
  68.     {900, 'CM'},
  69.     {500, 'D'},
  70.     {400, 'CD'},
  71.     {100, 'C'},
  72.     {90, 'XC'},
  73.     {50, 'L'},
  74.     {40, 'XL'},
  75.     {10, 'X'},
  76.     {9, 'IX'},
  77.     {5, 'V'},
  78.     {4, 'IV'},
  79.     {1, 'I'}
  80. }
  81.  
  82. function intToRoman(num)
  83.     local roman = ""
  84.     while num > 0 do
  85.         for _, v in pairs(numberMap)do
  86.             local romanChar = v[2]
  87.             local int = v[1]
  88.             while num >= int do
  89.                 roman = roman..romanChar
  90.                 num = num - int
  91.             end
  92.         end
  93.     end
  94.     return roman
  95. end
  96.  
  97. local oldChat: boolean
  98. if replicatedStorage:FindFirstChild('DefaultChatSystemChatEvents') then
  99.     oldChat = true
  100. else
  101.     oldChat = false
  102. end
  103.  
  104. local function Chat(msg)
  105.     if replicatedStorage:FindFirstChild('DefaultChatSystemChatEvents') then
  106.         replicatedStorage.DefaultChatSystemChatEvents.SayMessageRequest:FireServer(msg, "All")
  107.     else
  108.         textChatService.TextChannels.RBXGeneral:SendAsync(msg)
  109.     end
  110. end
  111.  
  112. local function Shuffle(tbl) -- Table shuffle function by sleitnick
  113.     local rng = Random.new()
  114.     for i = #tbl, 2, -1 do
  115.         local j = rng:NextInteger(1, i)
  116.         tbl[i], tbl[j] = tbl[j], tbl[i]
  117.     end
  118.     return tbl
  119. end
  120.  
  121. function roundNumber(num, numDecimalPlaces)
  122.     return tonumber(string.format("%." .. (numDecimalPlaces or 0) .. "f", num))
  123. end
  124.  
  125. local antiFilteringDone: boolean
  126. local importantMessageSent: boolean -- if a important message that needs to be resent if filtered has been sent recently
  127. local messageBeforeFilter: string
  128. local answeredByAltMessage: string -- alt message specially for the correct answer text
  129. function SendMessageWhenReady(message: string, important: boolean?, altMessage: string?) -- sends message so roblox won't rate limit it. if message is "important", script will send it again if it gets filtered/tagged first time. Altmessage is the message to send instead of original if it gets tagged
  130.     if not quizRunning then
  131.         return
  132.     end
  133.     if not settings.repeatTagged then
  134.         important = false
  135.     end
  136.     if important then
  137.         importantMessageSent = true
  138.         messageBeforeFilter = message
  139.         answeredByAltMessage = altMessage
  140.         antiFilteringDone = false
  141.     end
  142.     if tick() - timeSinceLastMessage >= minMessageCooldown then
  143.         Chat(message)
  144.         timeSinceLastMessage = tick()
  145.     else
  146.         task.wait(minMessageCooldown - (tick() - timeSinceLastMessage))
  147.         if not quizRunning then
  148.             return
  149.         end
  150.         Chat(message)
  151.         timeSinceLastMessage = tick()
  152.     end
  153.     if important then
  154.         while not antiFilteringDone and quizRunning do -- yields until the anti filter functions have done their job
  155.             task.wait()
  156.         end
  157.     end
  158.     importantMessageSent = false
  159. end
  160.  
  161. local boothGame = false
  162. local signRemote
  163. local changeSignTextRemote
  164. if placeId == 8351248417 then
  165.     signRemote = replicatedStorage:WaitForChild("Remotes"):WaitForChild("SettingsRem")
  166.     changeSignTextRemote = replicatedStorage.SharedModules.TextInputPrompt.TextInputEvent
  167.     if signRemote and changeSignTextRemote then
  168.         boothGame = true
  169.     end
  170. end
  171. local function UpdateSignText(text: string)
  172.     if not boothGame or not settings.signStatus or not text then -- only works in "booth game"
  173.         return
  174.     end
  175.     local sign = localPlayer.Character:FindFirstChild("TextSign") or localPlayer.Backpack:FindFirstChild("TextSign")
  176.     if not sign then
  177.         return
  178.     end
  179.     signRemote:FireServer({"SignServer"})
  180.     changeSignTextRemote:FireServer(text)
  181. end
  182.  
  183. local maxCharactersInMessage = 200
  184. if placeId == 5118029260 then -- GRP cuts down messages at 100 characters
  185.     maxCharactersInMessage = 100
  186. end
  187.  
  188. local endMessage = "Quiz ended"
  189. if localPlayer.UserId == 2005147350 then
  190.     endMessage = "Quiz ended"
  191. end
  192.  
  193. local function CalculateReadTime(text: string): number
  194.     local timeToWait = #string.split(text, " ") / 1
  195.     if timeToWait < minMessageCooldown then
  196.         timeToWait = minMessageCooldown
  197.     end
  198.     return timeToWait
  199. end
  200. -------
  201.  
  202. --- Question OOP ---
  203. local question = {}
  204. question.__index = question
  205.  
  206. function question.New(quesitonText: string, options: table, value: number, correctAnswer: number)
  207.     local newQuestion = {}
  208.     newQuestion.mainQuestion = quesitonText
  209.     newQuestion.answers = options
  210.     if not correctAnswer then
  211.         correctAnswer = 1
  212.     end
  213.     newQuestion.rightAnswer = letters[correctAnswer]
  214.     newQuestion.rightAnswerIndex = correctAnswer
  215.     if not value then
  216.         newQuestion.value = 1
  217.     else
  218.         newQuestion.value = value
  219.     end
  220.     setmetatable(newQuestion, question)
  221.     return newQuestion
  222. end
  223.  
  224. function question:Ask()
  225.     if not quizRunning then
  226.         return
  227.     end
  228.     answerOptionsSaid = 0
  229.     local rightAnswerBeforeShuffle = self.answers[self.rightAnswerIndex]
  230.     self.answers = Shuffle(self.answers)
  231.     self.rightAnswerIndex = table.find(self.answers, rightAnswerBeforeShuffle)
  232.     self.rightAnswer = letters[self.rightAnswerIndex]
  233.     if self.value > 1 then
  234.         SendMessageWhenReady("⭐ | "..self.value.."x points for question")
  235.         task.wait(2)
  236.     end
  237.     questionAnsweredBy = nil
  238.     UpdateSignText(self.mainQuestion)
  239.     currentQuestion = self
  240.     questionPoints = self.value
  241.     SendMessageWhenReady("🎙️ | "..self.mainQuestion, true)
  242.     if not quizRunning then
  243.         return
  244.     end
  245.     task.wait(CalculateReadTime(self.mainQuestion))
  246.  
  247.     for i, v in ipairs(self.answers) do
  248.         if questionAnsweredBy or not quizRunning then
  249.             return
  250.         end
  251.         if i ~= 1 then
  252.             task.wait(CalculateReadTime(v))
  253.         end
  254.         if questionAnsweredBy or not quizRunning then
  255.             return
  256.         end
  257.         SendMessageWhenReady(letters[i]..")"..v, true) -- 1 = A) 2 = B) 3 = C) etc.
  258.         answerOptionsSaid = i
  259.     end
  260. end
  261.  
  262. local function SplitIntoMessages(itemTable: table, separtor: string, waitTime: number?) -- split table into multiple messages to prevent roblox cutting down the message
  263.     local tempItemList = {}
  264.     local currentLength = 0
  265.     for _, item in pairs(itemTable) do
  266.         if quizRunning then
  267.             return
  268.         end
  269.         if currentLength + #item + (#separtor * #tempItemList) >= maxCharactersInMessage then -- maxCharactersInMessage characters is the limit for chat messages in Roblox. For each item, we are adding a sepatator
  270.             local conctatTable = table.concat(tempItemList, separtor)
  271.             Chat(conctatTable)
  272.             task.wait(waitTime or CalculateReadTime(conctatTable) * 0.3) -- multiplied by 0.3 because full read time is too long
  273.             if quizRunning then
  274.                 return
  275.             end
  276.             table.clear(tempItemList)
  277.             table.insert(tempItemList, item)
  278.             currentLength = #item
  279.         else
  280.             table.insert(tempItemList, item)
  281.             currentLength = currentLength + #item
  282.         end
  283.     end
  284.     if not quizRunning then
  285.         Chat(table.concat(tempItemList, separtor))
  286.     end
  287. end
  288. --- Category OOP ---
  289. local categoryManager = {}
  290. local categories = {}
  291. categoryManager.__index = categoryManager
  292.  
  293. function categoryManager.New(categoryName)
  294.     categories[categoryName] = {}
  295.     local newCategory = categories[categoryName]
  296.     setmetatable(newCategory, categoryManager)
  297.     return newCategory
  298. end
  299.  
  300. function categoryManager:Add(quesitonText: string, options: table, value: number, correctAnswer: number)
  301.     local newQuestion = question.New(quesitonText, options, value, correctAnswer)
  302.     table.insert(self, newQuestion)
  303. end
  304.  
  305. --- Points OOP ---
  306. local pointManager = {}
  307. local userPoints = {}
  308. pointManager.__index = pointManager
  309.  
  310. function pointManager.NewAccount(player)
  311.     userPoints[player.Name] = {}
  312.     local playerPoints = userPoints[player.Name]
  313.     playerPoints.GlobalPoints = 0
  314.     playerPoints.CurrentQuizPoints = 0
  315.     setmetatable(playerPoints, pointManager)
  316.     return playerPoints
  317. end
  318.  
  319. function pointManager.AddPoints(player, points: number, type: string)
  320.     if not points or not tonumber(points) then
  321.         points = 1
  322.     end
  323.     if not type then
  324.         type = "All"
  325.     end
  326.     local playerAccount = userPoints[player.Name]
  327.     if not playerAccount then
  328.         playerAccount = pointManager.NewAccount(player)
  329.     end
  330.     if type == "All" then
  331.         playerAccount.GlobalPoints += points
  332.         if quizRunning then
  333.             playerAccount.CurrentQuizPoints += points
  334.         end
  335.     elseif type == "Global" then
  336.         playerAccount.GlobalPoints += points
  337.     elseif type == "CurrentQuiz" then
  338.         playerAccount.CurrentQuizPoints += points
  339.     end
  340. end
  341.  
  342. function pointManager.ClearQuizPointsForPlayer(player)
  343.     local playerAccount = userPoints[player.Name]
  344.     if not playerAccount then
  345.         return
  346.     end
  347.     playerAccount.CurrentQuizPoints = 0
  348. end
  349.  
  350. function pointManager.ClearQuizPoints()
  351.     for _, v in pairs(userPoints) do
  352.         v.CurrentQuizPoints = 0
  353.     end
  354. end
  355.  
  356. function pointManager.ClearGlobalPointsForPlayer(player)
  357.     local playerAccount = userPoints[player.Name]
  358.     if not playerAccount then
  359.         return
  360.     end
  361.     playerAccount.GlobalPoints = 0
  362. end
  363.  
  364. function pointManager.ClearGlobalPoints()
  365.     for _, v in pairs(userPoints) do
  366.         v.GlobalPoints = 0
  367.     end
  368. end
  369.  
  370. function pointManager.RemoveAccount(player)
  371.     if userPoints[player.Name] then
  372.         userPoints[player.Name] = nil
  373.     end
  374. end
  375.  
  376. function pointManager.ResetAllPoints()
  377.     for _, v in pairs(userPoints) do
  378.         v.GlobalPoints = 0
  379.         v.CurrentQuizPoints = 0
  380.     end
  381. end
  382. -------
  383.  
  384. local function requestSendMessage(message)
  385.     timeSinceLastMessage = tick() - timeSinceLastMessage
  386.     if timeSinceLastMessage > 2.5 then
  387.         Chat(message)
  388.         timeSinceLastMessage = tick()
  389.     end
  390. end
  391.  
  392. local function startChatListening(message: string, player: Player)
  393.     local messageContent = string.upper(message) or ""
  394.     if not currentQuestion or questionAnsweredBy or table.find(userCooldowns, player.Name) or table.find(blockedPlayers, player.Name) or table.find(submittedAnswer, player.Name) or (#whiteListedplayers > 0 and not table.find(whiteListedplayers, player.Name)) then
  395.         return
  396.     end
  397.     local matchAnswer
  398.     local minLenght = 4
  399.     if #currentQuestion.answers[currentQuestion.rightAnswerIndex] < minLenght then
  400.         minLenght = #currentQuestion.answers[currentQuestion.rightAnswerIndex] -- if minlenght is higher the the lenght of the correct answer, decrease it
  401.     end
  402.     if #messageContent >= minLenght then
  403.         for _, v in ipairs(currentQuestion.answers) do
  404.             if v:upper() == messageContent then
  405.                 matchAnswer = v
  406.                 print("first function", v)
  407.                 print(v:upper(), "=", messageContent, "correct: ", currentQuestion.answers[currentQuestion.rightAnswerIndex])
  408.                 break
  409.             elseif (string.match(v:upper(), messageContent) and #string.match(v:upper(), messageContent) >= minLenght) or string.match(messageContent, v:upper()) then
  410.                 print(string.match(v:upper(), messageContent), string.match(messageContent, v:upper()), "match funtion", v)
  411.                 print("Answer is correct: ", matchAnswer == currentQuestion.answers[currentQuestion.rightAnswerIndex])
  412.                 if matchAnswer then -- no more than 1 match
  413.                     return
  414.                 end
  415.                 matchAnswer = v
  416.             end
  417.         end
  418.     end
  419.     local matchingLetter = nil
  420.     if not matchAnswer then -- check if single letter is specified. For example: "I think it is B"
  421.         local senderCharacter = player.Character
  422.         local character = localPlayer.Character
  423.         if not senderCharacter or not character then
  424.             return
  425.         end
  426.  
  427.         local patterns = {}
  428.         patterns[1] = "%s([A-"..letters[#currentQuestion.answers].."])%s" -- checks for letter surrounded by spaces on both sides (ex: "I think B is the right answer")
  429.         patterns[2] = "%s([B-"..letters[#currentQuestion.answers].."])$" -- checks for letter with space before it at the end of the string (ex: "I think it is B")
  430.         patterns[3] = "^([A-"..letters[#currentQuestion.answers].."])%s" -- checks for letter with space after it at the beginning of the string (ex: "B I think")
  431.         patterns[4] = "^([A-"..letters[#currentQuestion.answers].."])$" -- checks for letter with no spaces after or before it (ex: "B")
  432.  
  433.         local magnitude = (character.HumanoidRootPart.Position - senderCharacter.HumanoidRootPart.Position).Magnitude -- make sure sender is not too far away to prevent false matches
  434.         if magnitude < 10 then
  435.             messageContent = string.gsub(messageContent, "[%).?]", "") -- removes ), ., and ? to recognize people saying a) or b. or c?
  436.             for i = 1, 4 do
  437.                 local match = messageContent:match(patterns[i])
  438.                 if match and table.find(letters, match) <= answerOptionsSaid then
  439.                     if matchingLetter then -- if more than one match, return
  440.                         return
  441.                     end
  442.                     matchingLetter = match
  443.                 end
  444.             end
  445.         else
  446.             matchingLetter = messageContent:match(patterns[4])
  447.             if matchingLetter then
  448.                 if table.find(letters, matchingLetter) > answerOptionsSaid then
  449.                     matchingLetter = nil
  450.                 end
  451.             end
  452.         end
  453.     end
  454.     if matchingLetter or matchAnswer then
  455.         print("Matching letter:", matchingLetter, "==", currentQuestion.rightAnswer, "==", matchingLetter == currentQuestion.rightAnswer, "Matching answer:", matchAnswer, "==", currentQuestion.answers[currentQuestion.rightAnswerIndex], "==", matchAnswer == currentQuestion.answers[currentQuestion.rightAnswerIndex])
  456.         if matchingLetter == currentQuestion.rightAnswer or matchAnswer == currentQuestion.answers[currentQuestion.rightAnswerIndex] then
  457.             if mode == "quiz" then
  458.                 print("1")
  459.                 questionAnsweredBy = player
  460.                 currentQuestion = nil
  461.             else
  462.                 table.insert(submittedAnswer, player.Name)
  463.                 table.insert(answeredCorrectly, player.DisplayName)
  464.                 if #answeredCorrectly == 1 then
  465.                     pointManager.AddPoints(player, questionPoints * 1.5) -- person who answers first gets 1.5x points
  466.                 else
  467.                     pointManager.AddPoints(player, questionPoints)
  468.                 end
  469.             end
  470.             if awaitingAnswer then
  471.                 requestSendMessage("❌ | "..player.DisplayName.." wrong answer. Try again in "..tostring(settings.userCooldown).." seconds")
  472.             end
  473.             table.insert(userCooldowns, player.Name)
  474.             task.delay(settings.userCooldown, function()
  475.                 table.remove(userCooldowns, table.find(userCooldowns, player.Name))
  476.             end)
  477.         elseif mode == "kahoot" then
  478.             table.insert(submittedAnswer, player.Name)
  479.         end
  480.     end
  481. end
  482.  
  483. local filtersInARow = 0
  484. local function processMessage(player: Player, message: string)
  485.     if player ~= localPlayer then
  486.         startChatListening(message, player)
  487.     else
  488.         if not importantMessageSent or not quizRunning then
  489.             return
  490.         end
  491.         if messageBeforeFilter == message or (answeredByAltMessage and string.find(message, answeredByAltMessage)) then -- if message before and after filtering are exactly the same, the message has not been filtered
  492.             filtersInARow = 0
  493.             antiFilteringDone = true
  494.             return
  495.         elseif math.abs(#message - #messageBeforeFilter) > 5 then -- if the lenght is diffrent from messageBeforeFilter the message is unrelated. Also give some space for diffrence to account for roblox weirdness with filtered lengh being diffrent from original lenght
  496.             return
  497.         end
  498.         filtersInARow += 1
  499.         if filtersInARow == 1 then
  500.             SendMessageWhenReady("🔁 | Waiting for filter to clear and resending filtered message...")
  501.             task.wait(5) -- waiting makes the the filtering system less agressive
  502.         elseif filtersInARow == 2 then
  503.             SendMessageWhenReady("🔁 | Resending previous message because of chat filter...")
  504.             task.wait(6)
  505.         else
  506.             SendMessageWhenReady("Attempting to get around Roblox tagging")
  507.             task.wait(6)
  508.             filtersInARow = 0
  509.         end
  510.         if not quizRunning then
  511.             return
  512.         end
  513.         if questionAnsweredBy and answeredByAltMessage then -- proceed to say message after question asnwered only if the message is the message with the correct answer
  514.             SendMessageWhenReady(answeredByAltMessage)
  515.             antiFilteringDone = true
  516.             return
  517.         elseif questionAnsweredBy then
  518.             antiFilteringDone = true
  519.             return
  520.         end
  521.         SendMessageWhenReady(messageBeforeFilter)
  522.         antiFilteringDone = true
  523.     end
  524. end
  525.  
  526.  
  527. local chatConnection
  528. local joinConnection
  529. local playerChatConnections = {}
  530. if oldChat then
  531.     settings.repeatTagged = false -- repeating tagged messages does not work on old chat system because of problems with diffrent chat event (player.Chatted vs textChatService.MessageReceived)
  532.     for _, player in players:GetPlayers() do
  533.         if player ~= localPlayer then
  534.             local connection
  535.             connection = player.Chatted:Connect(function(message)
  536.                 startChatListening(message, player)
  537.             end)
  538.             table.insert(playerChatConnections, connection)
  539.         end
  540.     end
  541.     joinConnection = players.PlayerAdded:Connect(function(player)
  542.         local connection
  543.         connection = player.Chatted:Connect(function(message)
  544.             startChatListening(message, player)
  545.         end)
  546.         table.insert(playerChatConnections, connection)
  547.     end)
  548. else
  549.     chatConnection = textChatService.MessageReceived:Connect(function(textChatMessage)
  550.         local player = if textChatMessage.TextSource then players:GetPlayerByUserId(textChatMessage.TextSource.UserId) else nil
  551.         if not player then
  552.             return
  553.         end
  554.         local message = textChatMessage.Text
  555.         processMessage(player, message)
  556.     end)
  557. end
  558.  
  559.  
  560. local function awaitAnswer(targetQuestion)
  561.     if not quizRunning then
  562.         return
  563.     end
  564.     awaitingAnswer = true
  565.     local timeIsOut = false
  566.     local function Timeout()
  567.         if not quizRunning then
  568.             return
  569.         end
  570.         task.wait(settings.questionTimeout)
  571.         UpdateSignText(targetQuestion.rightAnswer..")"..targetQuestion.answers[targetQuestion.rightAnswerIndex])
  572.         SendMessageWhenReady("⏰ | Time is out! Correct answer was: "..targetQuestion.rightAnswer..")"..targetQuestion.answers[targetQuestion.rightAnswerIndex], true)
  573.         timeIsOut = true
  574.         currentQuestion = nil
  575.         questionAnsweredBy = nil
  576.         awaitingAnswer = false
  577.     end
  578.     local function SignTime()
  579.         for timeLeft = settings.questionTimeout, 1, -1 do
  580.             if questionAnsweredBy then
  581.                 return
  582.             end
  583.             if settings.romanNumbers then
  584.                 UpdateSignText(tostring(intToRoman(timeLeft))) -- convert to roman number and then convert to string
  585.             else
  586.                 UpdateSignText(tostring(timeLeft))
  587.             end
  588.             task.wait(1)
  589.         end
  590.     end
  591.     local timeoutCoroutine = coroutine.create(Timeout)
  592.     local signTimeCoroutine = coroutine.create(SignTime)
  593.     coroutine.resume(timeoutCoroutine)
  594.     if boothGame and settings.signStatus then
  595.         coroutine.resume(signTimeCoroutine)
  596.     end
  597.  
  598.     if mode == "quiz" then
  599.         while questionAnsweredBy == nil and not timeIsOut and quizRunning do
  600.             task.wait()
  601.         end
  602.         if timeIsOut or not quizRunning then
  603.             return
  604.         end
  605.         coroutine.close(timeoutCoroutine)
  606.         coroutine.close(signTimeCoroutine)
  607.         pointManager.AddPoints(questionAnsweredBy, targetQuestion.value)
  608.         task.delay(0.5, function() -- delayed to give time to the signtimecoroutine to stop chanong sign text
  609.             UpdateSignText(targetQuestion.rightAnswer..")"..targetQuestion.answers[targetQuestion.rightAnswerIndex])
  610.         end)
  611.         SendMessageWhenReady("✔️ | "..questionAnsweredBy.DisplayName.." answered correctly. Answer was: "..targetQuestion.rightAnswer..")"..targetQuestion.answers[targetQuestion.rightAnswerIndex], true, "Answer was: "..targetQuestion.rightAnswer..")"..targetQuestion.answers[targetQuestion.rightAnswerIndex])
  612.         questionAnsweredBy = nil
  613.         awaitingAnswer = false
  614.         table.clear(userCooldowns)
  615.     else
  616.         while not timeIsOut and quizRunning do
  617.             task.wait(1)
  618.             questionPoints -= questionPoints / settings.questionTimeout
  619.         end
  620.         task.wait(2)
  621.         if not quizRunning then
  622.             return
  623.         end
  624.         if #answeredCorrectly > 0 then
  625.             local tempuserList = {} -- split players into multiple messages to prevent roblox cutting down the message
  626.             local currentLength = 37
  627.             local firstIteration = true
  628.             for _, user in pairs(answeredCorrectly) do
  629.                 if currentLength + #user + (2 * #tempuserList) >= maxCharactersInMessage then -- maxCharactersInMessage is the limit for chat messages in Roblox. For each user, we are adding 2 more characters (, )
  630.                     if firstIteration then
  631.                         SendMessageWhenReady("✔️ | Players who answered correctly: "..table.concat(tempuserList, ", "))
  632.                         firstIteration = false
  633.                     else
  634.                         SendMessageWhenReady(table.concat(tempuserList, ", "))
  635.                     end
  636.                     task.wait(3)
  637.                     table.clear(tempuserList)
  638.                     table.insert(tempuserList, user)
  639.                     currentLength = #user
  640.                 else
  641.                     table.insert(tempuserList, user)
  642.                     currentLength = currentLength + #user
  643.                 end
  644.             end
  645.             if #tempuserList > 0 then
  646.                 if firstIteration then
  647.                     SendMessageWhenReady("✔️ | Players who answered correctly: "..table.concat(tempuserList, ", "))
  648.                     firstIteration = false
  649.                 else
  650.                     SendMessageWhenReady(table.concat(tempuserList, ", "))
  651.                 end
  652.             end
  653.         end
  654.         table.clear(answeredCorrectly)
  655.         table.clear(submittedAnswer)
  656.         awaitingAnswer = false
  657.         currentQuestion = nil
  658.     end
  659. end
  660.  
  661. --- Questions ---
  662.  
  663. local flagsEasy = categoryManager.New("Flags-easy")
  664. flagsEasy:Add("What flag is this? 🇹🇷", {"Turkey", "Spain", "Greece", "Cyprus"})
  665. flagsEasy:Add("What flag is this? 🇪🇸", {"Spain", "Portugal", "Greece", "Mexico"})
  666. flagsEasy:Add("What flag is this? 🇵🇱", {"Poland", "Indonesia", "Austria", "Greenland"})
  667. flagsEasy:Add("What flag is this? 🇮🇳", {"India", "Pakistan", "Sri Lanka", "Afghanistan"})
  668. flagsEasy:Add("What flag is this? 🇳🇴", {"Norway", "Sweden", "Denmark", "Iceland"}, 2)
  669.  
  670. local flagsEasy2 = categoryManager.New("Flags-easy2")
  671. flagsEasy2:Add("What flag is this? 🇫🇷", {"France", "England", "Netherlands", "Russia"})
  672. flagsEasy2:Add("What flag is this? 🇬🇷", {"Greece", "Serbia", "Argentina", "Spain"})
  673. flagsEasy2:Add("What flag is this? 🇦🇷", {"Argentina", "Honduras", "Chile", "Brazil"})
  674. flagsEasy2:Add("What flag is this? 🇨🇳", {"China", "Japan", "Bejing", "Vietnam"})
  675. flagsEasy2:Add("What flag is this? 🇷🇸", {"Serbia", "Bosnia", "Croatia", "Slovakia"}, 2)
  676.  
  677. local flagsMedium = categoryManager.New("Flags-medium")
  678. flagsMedium:Add("What flag is this? 🇲🇽", {"Mexico", "Netherlands", "Iran", "Spain"})
  679. flagsMedium:Add("What flag is this? 🇵🇹", {"Portugal", "Brazil", "Madrid", "Spain"})
  680. flagsMedium:Add("What flag is this? 🇲🇦", {"Morocco", "Vietnam", "China", "Israel"}, 2)
  681. flagsMedium:Add("What flag is this? 🇧🇪", {"Belgium", "Germany", "France", "Romania"})
  682. flagsMedium:Add("What flag is this? 🇮🇩", {"Indonesia", "Poland", "Peru", "Switzerland"})
  683.  
  684. local flagsHard = categoryManager.New("Flags-hard")
  685. flagsHard:Add("What flag is this? 🇩🇴", {"Dominican Republic", "Denmark", "Djibouti"})
  686. flagsHard:Add("What flag is this? 🇪🇷", {"Eritrea", "Ecuador", "El Salvador"})
  687. flagsHard:Add("What flag is this? 🇫🇮", {"Finland", "Sweden", "Falkland Islands"})
  688. flagsHard:Add("What flag is this? 🇿🇲", {"Zambia", "Zimbabwe", "Zaire"}, 2)
  689. flagsHard:Add("What flag is this? 🇸🇴", {"Somalia", "Solomon Islands", "Samoa"})
  690.  
  691. local science = categoryManager.New("Science")
  692. science:Add("The standard unit of measurement used for measuring force is which of the following?", {"Newton", "Mile", "Watt", "Kilogram"})
  693. science:Add("How long does it take the earth to do one full rotation of the sun?", {"365 days", "7 days", "30 days"})
  694. science:Add("Oil, natural gas and coal are examples of …", {"Fossil fuels", "Renewable resources", "Biofuels", "Geothermal resources"}, 2)
  695. science:Add("Why do our pupils constrict in bright light?", {"To let in less light", "To give our eyes more oxygen", "To change our vision to 3D"})
  696. science:Add("What is cooling lava called?", {"Igneous rocks", "Magma", "Fossils"})
  697.  
  698. local science2 = categoryManager.New("Science2")
  699. science2:Add("What is faster, sound or light?", {"Light", "Sound", "They travel at the same speed", "They don't move"})
  700. science2:Add("What is the main cause of seasons on the Earth?", {"The tilt of the Earth's axis in relation to the sun", "The speed that the Earth rotates around the sun", "Changes in amount of energy coming from the sun", "The distance between the Earth and the sun"}, 2)
  701. science2:Add("Who developed the theory of relativity?", {"Albert Einstein", "Isaac Newton", "Galileo Galilei"})
  702. science2:Add("Which of these is a major concern about the overuse of antibiotics?", {"It can lead to antibiotic-resistant bacteria", "There will be an antibiotic shortage", "Antibiotics can cause secondary infections", "Antibiotics will get into the water system"})
  703. science2:Add("What is the powerhouse of the cell?", {"Mitochondria", "Nucleus", "Cytoplasm", "Nucleic membrane"}, 2)
  704.  
  705. local history = categoryManager.New("History")
  706. history:Add("Which of these countries did the Soviet Union NEVER invade?", {"Sweden", "Afghanistan", "Finland", "Poland"})
  707. history:Add("What was the main cause of the French Revolution in 1789?", {"The social and economic inequality of the Third Estate", "The invasion of Napoleon Bonaparte", "The assassination of King Louis XVI", "The spread of the Black Death"})
  708. history:Add("Which of these historical events happened first?", {"The American Revolution", "The French Revolution", "The Industrial Revolution", "The Russian Revolution"}, 2)
  709. history:Add("What ancient civilization built the Machu Picchu complex?", {"Inca", "Aztec", "Maya", "Egypt"})
  710. history:Add("In what modern-day country was Karl Marx, the communist philosopher, born?", {"Germany", "France", "Russia", "China"}, 2)
  711.  
  712. local history2 = categoryManager.New("History2")
  713. history2:Add("The disease that killed a third of Europe's population in the 14th century is known as:", {"Plague (Black Death)", "Spanish Flu", "Smallpox", "Malaria"})
  714. history2:Add("What famous rifle is known in America as 'The Gun that Won the West?'", {"Winchester Model 1873", "Henry Repeating Rifle", "Colt Peacemake", "Remington Army Revolver"}, 2)
  715. history2:Add("Were Italy and the United Kingdom allies or enemies during World War One?", {"Allies", "Enmies"})
  716. history2:Add("How were Holy Roman Emperors chosen?", {"Elected by a small group of princes", "Chosen by the pope", "Democratic vote of the people"}, 2)
  717. history2:Add("Where and when was Siddhārtha Gautama, AKA Buddha, born?", {"Approx. 500 BC, Nepal", "Approx. 1 AD, Palestine", "Approx. 900 AD, China"})
  718.  
  719. local foodAndDrink = categoryManager.New("Food and drink")
  720. foodAndDrink:Add("Which country is the largest producer of coffee in the world?", {"Brazil", "Vietnam", "Colombia", "Ethiopia"})
  721. foodAndDrink:Add("What is the name of the Italian dessert made from layers of sponge cake soaked in coffee and mascarpone cheese?", {"Tiramisu", "Maritozzo", "Cannoli", "Zabaglione"})
  722. foodAndDrink:Add("What is the main ingredient of the Spanish dish, Paella?", {"Rice", "Bread", "Pasta", "Chicken"})
  723. foodAndDrink:Add("What is the name of the fermented milk drink that is popular in Eastern Europe and Central Asia?", {"Kefir", "Yakult", "Lassi", "Ayran"})
  724. foodAndDrink:Add("Which country does feta cheese come from?", {"Greece", "Switzerland", "Spain", "France"}, 2)
  725.  
  726. local trivia = categoryManager.New("Trivia")
  727. trivia:Add("Which is NOT a Nobel Prize category?", {"Mathematics", "Physics", "Literature", "Chemistry"})
  728. trivia:Add("Which musical instrument has 47 strings and seven pedals?", {"Harp", "Piano", "Guitar", "Violin"})
  729. trivia:Add("Which artist painted the Mona Lisa?", {"Leonardo da Vinci", "Michelangelo", "Vincent van Gogh", "Pablo Picasso"})
  730. trivia:Add("Which country is the only one to have a non-rectangular flag?", {"Nepal", "Switzerland", "Japan", "Qatar"})
  731. trivia:Add("'Bokmal' and 'Nynorsk' are the two official written forms of WHICH language?", {"Norwegian", "Italian", "Danish", "Spanish"}, 2)
  732.  
  733. local trivia2 = categoryManager.New("Trivia2")
  734. trivia2:Add("Which animal is the national emblem of Australia?", {"Kangaroo", "Koala", "Emu", "Platypus"})
  735. trivia2:Add("What does the Richter scale measure?", {"Earthquake intensity", "Wind Speed", "Temperature", "Tornado Strength"}, 2)
  736. trivia2:Add("Which currency is used in Japan?", {"Yen", "Dollar", "Euro", "Pound"})
  737. trivia2:Add("Which famous scientist developed the theory of relativity?", {"Albert Einstein", "Isaac Newton", "Galileo Galilei", "Charles Darwin"})
  738. trivia2:Add("In sport, what does the term PGA refer to?", {"Professional Golfers Association", "Par Golfing Average", "Playing Golf Average", "Part-Time Golfing Amaterurs"})
  739.  
  740. local guessTheLanguage = categoryManager.New("Guess the language")
  741. guessTheLanguage:Add("Привет", {"Russian", "Norwegian", "Swedish", "Xhosa"})
  742. guessTheLanguage:Add("שָׁלוֹם", {"Hebrew", "Tamil", "Lao", "Mandarin"})
  743. guessTheLanguage:Add("Guten Tag", {"German", "Tagalog", "Finnish", "Dutch"})
  744. guessTheLanguage:Add("こんにちは", {"Japanese", "Chinese", "Turkish", "Arabic"}, 2)
  745. guessTheLanguage:Add("नमस्ते", {"Hindi", "Indonesian", "Cantonese", "Nahuatl"})
  746.  
  747. local capitals = categoryManager.New("Capitals")
  748. capitals:Add("What is the capital city of the USA?", {"Washington D.C.", "New York City", "Los Angeles", "Austin"})
  749. capitals:Add("What is the capital city of Slovakia?", {"Bratislava", "Frankfurt", "Dublin", "Brussels"}, 2)
  750. capitals:Add("What is the capital city of Poland?", {"Warsaw", "Kiev", "Moscow", "Krakow"})
  751. capitals:Add("What is the capital city of Germany?", {"Berlin", "Frankfurt", "Hamburg", "Düsseldorf"})
  752. capitals:Add("What is the capital city of Canada?", {"Ottawa", "Toronto", "Vancouver", "Montreal"})
  753.  
  754. local capitalsHard = categoryManager.New("Capitals-hard")
  755. capitalsHard:Add("What is the capital of Belgium?", {"Brussels", "Liege", "Amsterdam"})
  756. capitalsHard:Add("What is the capital of Somalia?", {"Mogadishu", "Garoowe", "Berbera"})
  757. capitalsHard:Add("What is the capital city of Mongolia?", {"Ulaanbaatar", "Hanoi", "Seoul"})
  758. capitalsHard:Add("What is the capital city of Australia?", {"Canberra", "Sydney", "Perth"})
  759. capitalsHard:Add("What is the capital city of New Zealand?", {"Wellington", "Auckland", "Hamilton"})
  760.  
  761. local geography = categoryManager.New("Geography")
  762. geography:Add("Which river flows through London?", {"River Thames", "River Severn", "River Trent"})
  763. geography:Add("On which continent is the Sahara Desert located?", {"Africa", "Asia", "Europe"})
  764. geography:Add("Which of these cities is NOT a national capital?", {"Sydney", "Oslo", "Wellington", "Bangkok"}, 2)
  765. geography:Add("Which of these continents has the largest land area?", {"Asia", "Africa", "Europe", "South America"})
  766. geography:Add("What is the smallest country in the world?", {"Vatican City", "Belgium", "Luxembourd"})
  767.  
  768. local geographyMedium = categoryManager.New("Geography-medium")
  769. geographyMedium:Add("Which island is the largest in the world?", {"Greenland", "Madagascar", "Borneo", "New Guinea"})
  770. geographyMedium:Add("Which continent has the most countries?", {"Africa", "Europe", "Asia", "Australia"})
  771. geographyMedium:Add("Which one of the following countries is further north?", {"Scotland", "The Netherlands", "Belgium", "Poland"})
  772. geographyMedium:Add("What is the longest river in the world?", {"The Nile", "Amzon River", "Yangtze River", "Yellow River"})
  773. geographyMedium:Add("Which ocean is the deepest?", {"Pacific Ocean", "Atlantic Ocean", "Indian Ocean", "Arctic Ocean"}, 2)
  774.  
  775. local geographyHard = categoryManager.New("Geography-hard")
  776. geographyHard:Add("Which country has the longest coastline?", {"Canada", "Chile", "Norway", "Australia"})
  777. geographyHard:Add("Which continent is the only one without a desert?", {"Europe", "Asia", "North America", "Africa"})
  778. geographyHard:Add("Which one of the following countries is not an enclave?", {"Italy", "Vatican City", "San Marino", "Lasotho"}, 2)
  779. geographyHard:Add("Which is the northernmost capital city in the world?", {"Reykjavik, Iceland", "Oslo, Norway", "Helsinki, Finland", "Moscow, Russia"})
  780. geographyHard:Add("Which city is the only one located on two continents?", {"Istanbul", "Cairo", "Moscow", "Panama City"})
  781.  
  782. local gaming = categoryManager.New("Gaming")
  783. gaming:Add("What is the best-selling video game of all time?", {"Minecraft", "FIFA 18", "Call of Duty: Modern Warfare 3", "Tetris"})
  784. gaming:Add("What was the first commercially successful video game?", {"Pong", "Donkey Kong Country", "Super Mario Bros", "Spacewar"})
  785. gaming:Add("What is the name of the main character in the Legend of Zelda series?", {"Link", "Zelda", "Ganon", "Mario"})
  786. gaming:Add("What video game did Mario, the Nintendo character, first appear in?", {"Donkey Kong", "Super Mario Bros", "Marios Cement Factory", "Mario Bros"}, 2)
  787. gaming:Add("What is the name of the virtual reality device developed by Valve?", {"Valve Index", "Oculus Rift", "Meta Quest", "Valve VR"})
  788.  
  789. local gaming2 = categoryManager.New("Gaming2")
  790. gaming2:Add("What is the name of the fictional city where the Grand Theft Auto III and IV games are set?", {"Liberty City", "Vice City", "San Andreas", "Los Santos"})
  791. gaming2:Add("What is the name of the game developer who created Half-Life, Portal, and Counter-Strike?", {"Valve", "Blizzard", "Bethesda", "Rockstar"})
  792. gaming:Add("What is the name of the gaming console that was released by Nintendo in 2006 and featured motion controls?", {"Wii", "Switch", "GameCube", "DS"})
  793. gaming2:Add("What is the name of the platform game series that features a plumber who rescues a princess from a turtle-like villain?", {"Super Mario", "Sonic the Hedgehog", "Crash Bandicoot", "Rayman"})
  794. gaming2:Add("How many standalone Grand Theft Auto titles have been released?", {"7", "5", "8", "10"}, 2)
  795.  
  796. local movies = categoryManager.New("Movies")
  797. movies:Add("Which actor played the role of Jack Sparrow in the 'Pirates of the Caribbean' franchise?", {"Johnny Depp", "Orlando Bloom", "Keira Knightley", "Geoffrey Rush"})
  798. movies:Add("What was the first movie in the Marvel Cinematic Universe?", {"Iron Man", "The Avengers", "Batman", "Spider-Man"}, 2)
  799. movies:Add("Which movie is based on the novel by J.R.R. Tolkien?", {"The Lord of the Rings", "The Chronicles of Narnia", "The Hunger Games", "The Da Vinci Code"})
  800. movies:Add("What is the name of the protagonist in The Matrix?", {"Neo", "Morpheus", "Trinity", "Cypher"})
  801. movies:Add("In the movie 'Frozen', who is Olaf?", {"A snowman", "A ghost", "A knight", "A reindeer"})
  802.  
  803. local roblox = categoryManager.New("Roblox")
  804. roblox:Add("What was the original name of Roblox?", {"DynaBlocks", "SuperBlocks", "XtraBlocks"})
  805. roblox:Add("What is the name of Roblox's other virtual currency that has been removed since 2016?", {"Tix", "Builder Coins", "Ro-Points"})
  806. roblox:Add("What program do you use to make games on Roblox?", {"Roblox Studio", "Roblox Player", "Roblox Create", "Roblox Creator"})
  807. roblox:Add("Private servers were previously known as ...", {"VIP servers", "Personal servers", "Exclusive servers"})
  808. roblox:Add("Which YouTuber won the RB Battles season 1 championship?", {"KreekCraft", "Tofuu", "Seedeng", "BriannaPlayz"}, 2)
  809.  
  810. local roblox2 = categoryManager.New("Roblox2")
  811. roblox2:Add("What is another name for the avatar shop?", {"Catalog", "Avatar Creator", "Avatar Editor"})
  812. roblox2:Add("What programming language do you need to use to create Roblox games?", {"Luau", "JavaScript", "Python", "PHP"}, 2)
  813. roblox2:Add("What is the name of the virtual reality headset that Roblox supports?", {"Oculus Rift", "Oculus Quest", "PlayStation VR", "Samsung Gear VR"})
  814. roblox2:Add("What was the former name of Roblox premium?", {"Builders Club", "Roblox Plus", "Roblox Pro", "VIP Club"})
  815. roblox2:Add("What was the very first Roblox game to reach 1B+ visits?", {"MeepCity", "Arsenal", "Build a Boat For Treasure", "Adopt Me"}, 2)
  816.  
  817. local english = categoryManager.New("English")
  818. english:Add("I'm very happy _____ in India. I really miss being there.", {"to have lived", "to live", "to be living", "to be lived"})
  819. english:Add("They didn't reach an agreement ______ their differences.", {"on account of", "with", "because", "owing"})
  820. english:Add("I wish I _____ those words. But now it's too late.", {"had never said", "never said", "have never said", "not having said"}, 2)
  821. english:Add("She was working on her computer with her baby next to _____.", {"her", "herself", "her own", "hers"})
  822. english:Add("_____ in trying to solve this problem. It's clearly unsolvable.", {"There's no point", "It's no point", "There isn't point", "It's no need"})
  823.  
  824. local animals = categoryManager.New("Animals")
  825. animals:Add("What is the largest land animal?", {"Elephant", "Giraffe", "Whale", "Rhino"})
  826. animals:Add("What is the name of a baby kangaroo?", {"Joey", "Cub", "Pup", "Kit"})
  827. animals:Add("Capable of exceeding 186 miles per hour, what is the fastest creature in the animal kingdom?", {"Peregrine falcon", "Cheetah", "Horse", "Lion"})
  828. animals:Add("What is the only mammal that can fly?", {"Bat", "Penguin", "Pterodactyl", "Dragon"}, 2)
  829. animals:Add("Which of these “fish” is actually a fish?", {"Swordfish", "Starfish", "Crayfish", "Jellyfish"})
  830.  
  831. local sports = categoryManager.New("Sports")
  832. sports:Add("What sport is played on a field with 15 players on each team?", {"Rugby", "Soccer", "Cricket", "Lacrosse"})
  833. sports:Add("What is the name of the trophy awarded to the winner of the NBA Finals?", {"Larry O'Brien Trophy", "NBA Champion Trophy", "Stanley Cup", "World Series Trophy"}, 2)
  834. sports:Add("What sport uses a shuttlecock?", {"Badminton", "Tennis", "Squash", "Ping pong"})
  835. sports:Add("What sport involves sliding stones on a sheet of ice towards a target area?", {"Curling", "Bobsleigh", "Luge", "Ice hockey"}, 2)
  836. sports:Add("What sport is also known as table tennis?", {"Ping pong", "Badminton", "Squash", "Tennis"})
  837.  
  838. local minecraft = categoryManager.New("Minecraft")
  839. minecraft:Add("What is the name of the green creature that explodes?", {"Creeper", "Zombie", "Skeleton", "Slime"})
  840. minecraft:Add("Which tool is best for digging stone and bricks?", {"Pickaxe", "Shovel", "Axe", "Drill"})
  841. minecraft:Add("What is the name of the dimension where you fight the Ender Dragon?", {"The End", "The Nether", "The Overworld", "The Void"}, 2)
  842. minecraft:Add("What item do you need to tame a wolf?", {"Bone", "Apple", "Fish"})
  843. minecraft:Add("What block can you use to make a portal to the Nether?", {"Obsidian", "Netherrack", "Cobblestone", "Bedrock"})
  844.  
  845. local chess = categoryManager.New("Chess")
  846. chess:Add("What is the name of the piece that can only move diagonally?", {"Bishop", "Knight", "Queen"})
  847. chess:Add("What is the term for a situation where a king is under attack and cannot escape?", {"Checkmate", "Stalemate", "En passant", "Castling"})
  848. chess:Add("What is the name of the chess strategy that involves sacrificing a piece to gain an advantage?", {"Gambit", "Fork", "Pin", "Skewer"})
  849. chess:Add("What is the name of the special move where a king and a rook swap places?", {"Castling", "Promotion", "Capture", "Fork"})
  850. chess:Add("Which piece is involved in 'en passant'?", {"Pawn", "Queen", "Bishop", "Knight"}, 2)
  851.  
  852. local WWII = categoryManager.New("WWII")
  853. WWII:Add("Which countries formed the Axis powers in WWII?", {"Germany, Italy and Japan", "France, Britain and Russia", "China, India and Australia", "Canada, Mexico and Brazil"})
  854. WWII:Add("Which country was attacked by Japan in 1941, prompting its entry into WWII?", {"USA", "China", "India", "Australia"})
  855. WWII:Add("Which two countries were the first to declare war on Germany?", {"Britain and France", "Italy and Greece", "Norway and Denmark", "Poland and Russia"})
  856. WWII:Add("What was the name of the operation that marked the Allied invasion of Normandy in 1944?", {"Operation Overlord", "Operation Barbarossa", "Operation Torch", "Operation Garden"}, 2)
  857. WWII:Add("What was the name of the code-breaking machine developed by the British to crack German ciphers?", {"Bombe", "Turing", "Lorenz", "Enigma"})
  858.  
  859. local WWI = categoryManager.New("WWI")
  860. WWI:Add("Which country made the first declaration of war in WWI?", {"Austria-Hungary", "Serbia", "Russia", "Germany"})
  861. WWI:Add("What was the name of the British passenger ship that was sunk by a German submarine in 1915?", {"Lusitania", "Titanic", "Britannia", "Olympic"})
  862. WWI:Add("What was the nickname given to the type of warfare that involved digging trenches and fighting from them?", {"Trench warfare", "Guerrilla warfare", "Dirt warfare", "Siege warfare"})
  863. WWI:Add("What caused Great Britain to join World War I?", {"German troops marching through Belgium", "German bombing raids on London", "German use of illegal chemical weapons", "Germans sinking British civilian ships"})
  864. WWI:Add("What was the name of the alliance between Germany, Austria-Hungary and Italy?", {"The Central Powers", "The Axis Powers", "The Triple Entente", "The League of Nations"}, 2)
  865.  
  866. local luau = categoryManager.New("Luau")
  867. luau:Add("What is the keyword for defining a function in Luau?", {"function", "def", "func", "sub"})
  868. luau:Add("What is the syntax for creating a comment in Luau?", {"-- comment", "// comment", "# comment", "' comment"}, 2)
  869. luau:Add("What is the data type for storing multiple values in Luau?", {"table", "array", "list", "set"})
  870. luau:Add("How do you declare a table in Luau?", {"local table = {}", "local table = []", "local table = table.new()", "local table = ()"})
  871. luau:Add("What is the symbol for concatenating strings in Luau?", {"..", "+", "&", "%"}, 2)
  872.  
  873. local astronomy = categoryManager.New("Astronomy")
  874. astronomy:Add("What is the name of the dwarf planet that was once considered a ninth planet in our solar system?", {"Pluto", "Ceres", "Eris", "Haumea"})
  875. astronomy:Add("What is the name of the theory that describes how the universe began with a massive expansion from a single point?", {"The Big Bang theory", "The Steady State theory", "The Inflationary theory", "The String theory"})
  876. astronomy:Add("What is the name of the largest planet in our solar system?", {"Jupiter", "Saturn", "Earth", "Neptune"})
  877. astronomy:Add("What is the term for a group of stars that form a recognizable pattern?", {"A constellation", "A nebula", "A cluster", "A galaxy"})
  878. astronomy:Add("What is the name of the largest moon in our solar system?", {"Ganymede", "Titan", "Io", "Europa"}, 2)
  879.  
  880. local memes = categoryManager.New("Memes")
  881. memes:Add("Which meme features a dog sitting in a burning room?", {"This is fine", "Doge", "Grumpy Cat", "Bad Luck Brian"})
  882. memes:Add("What is the name of the frog character that is often associated with the phrase 'feels good man'?", {"Pepe", "Kermit", "Frogger", "Freddy"}, 2)
  883. memes:Add("What is the term for a meme that looks low-quality and pixelated?", {"Deep-fried", "Dank", "Cringe", "Ironic"})
  884. memes:Add("What is the name of the meme that features a stock photo of a man looking at another woman while his girlfriend looks at him angrily?", {"Distracted Boyfriend", "Cheating Husband", "Jealous Girlfriend", "Flirting Couple"})
  885. memes:Add("What is the name of the meme that features an elderly man with a forced smile?", {"Hide the Pain Harold", "Bad Luck Brian", "Grumpy Cat", "Success Kid"})
  886.  
  887. local anarchy = categoryManager.New("Anarchy")
  888. anarchy:Add("What does the word 'anarchy' mean?", {"Absence of government and absolute freedom of the individual", "A state of disorder due to absence or nonrecognition of authority", "A political ideology that advocates self-governance and voluntary associations", "A system of social organization based on mutual aid and cooperation"})
  889. anarchy:Add("Which of these symbols is commonly associated with anarchy?", {"A circled A", "A hammer and sickle", "A peace sign", "A red star"})
  890. anarchy:Add("Which anarchist principle asserts that individuals should be free to pursue their interests and preferences, without being constrained by any fixed or imposed roles, norms, or identities?", {"Individualism", "Egoism", "Existentialism", "Nihilism"})
  891. anarchy:Add("Which of these contemporary movements is inspired by anarchist principles?", {"Occupy Wall Street", "Black Lives Matter", "Extinction Rebellion", "All of the above"}, 2)
  892. anarchy:Add("Which of these genres of music is often linked to anarchy?", {"Punk rock", "Classical music", "Country music", "Blues"})
  893.  
  894. local anime = categoryManager.New("Anime")
  895. anime:Add("What is the name of the main character in Naruto?", {"Naruto Uzumaki", "Sasuke Uchiha", "Kakashi Hatake", "Itachi Uchiha"})
  896. anime:Add("What is the name of the pirate crew that Monkey D. Luffy leads in One Piece?", {"Straw Hat Pirates", "Blackbeard Pirates", "Red Hair Pirates", "Whitebeard Pirates"})
  897. anime:Add("What is the name of the powerful notebook that can kill anyone whose name is written in it in it?", {"Death Note", "Kira Note", "Shinigami Note", "Life Note"})
  898. anime:Add("What is the main character's power in 'My Hero Academia'?", {"One For All", "All For One", "Half-Cold Half-Hot", "Explosion"}, 2)
  899. anime:Add("What is the name of the forest spirit that Satsuki and Mei befriend in My Neighbor Totoro?", {"Totoro", "Catbus", "Kodama", "Makkuro Kurosuke"})
  900.  
  901. local scienceHard = categoryManager.New("Science-hard")
  902. scienceHard:Add("What is the name of the largest bone in the human body?", {"Femur", "Humerus", "Tibia", "Pelvis"})
  903. scienceHard:Add("What is the term for the amount of substance in a system that contains as many elementary entities as there are atoms in 12 grams of carbon-12?", {"Mole", "Gram", "Molecule", "Atom"})
  904. scienceHard:Add("What is the name of the phenomenon in which light is scattered by particles in a medium that are not much larger than the wavelength of the light?", {"Rayleigh scattering", "Diffraction", "Refraction", "Dispersion"}, 2)
  905. scienceHard:Add("What is the name of the branch of mathematics that deals with the properties and relationships of abstract entities such as numbers, symbols, sets, and functions?", {"Algebra", "Geometry", "Calculus", "Logic"})
  906. scienceHard:Add("What is the name of the unit of electric potential difference, electric potential energy per unit charge?", {"Volt", "Ampere", "Ohm", "Watt"})
  907.  
  908. local mathCategory = categoryManager.New("Math")
  909. mathCategory:Add("What is the value of PI (rounded to two decimal places)?", {"3.14", "3.15", "3.16", "3.17"})
  910. mathCategory:Add("What is the name of the property that states a + b = b + a?", {"Commutative property", "Associative property", "Distributive property", "Identity property"}, 2)
  911. mathCategory:Add("What is the formula for the area of a circle?", {"pi * r^2", "2 * pi * r", "pi * d", "pi * r"})
  912. mathCategory:Add("What is the name of the branch of mathematics that studies shapes and angles?", {"Geometry", "Algebra", "Calculus", "Arithmetic"})
  913. mathCategory:Add("What is the value of x in the equation 2x + 5 = 13?", {"4", "3", "5", "6"})
  914.  
  915. local mathHard = categoryManager.New("Math-hard")
  916. mathHard:Add("What is the name of the theorem that states that a² + b² = c² for a right triangle?", {"Pythagorean theorem", "Fermat's last theorem", "Binomial theorem", "Euclid's theorem"})
  917. mathHard:Add("What is the derivative of e^x?", {"e^x", "x*e^(x-1)", "ln(x)", "1/e^x"})
  918. mathHard:Add("What is the name of the constant that is approximately equal to 2.71828?", {"Euler's number", "Golden ratio", " number", "Planck's constant"})
  919. mathHard:Add("What is the name of the sequence that starts with 1, 1, 2, 3, 5, 8, ...?", {"Fibonacci Sequence", "Arithmetic Sequence", "Geometric Sequence", "Harmonic Sequence"}, 2)
  920. mathHard:Add("What is the name of the branch of mathematics that deals with patterns and sequences?", {"Combinatorics", "Algebra", "Calculus", "Geometry"})
  921.  
  922. local coldWar = categoryManager.New("Cold war")
  923. coldWar:Add("In 1946 Winston Churchill popularized what term used to describe Soviet relations with Western powers?", {"Iron curtain", "Mutually assured destruction", "Quagmire", "Special relationship"})
  924. coldWar:Add("Frequently cited as the counterpart to the CIA, what was the name of the Soviet intelligence agency?", {"KGB", "ICBM", "SALT", "DMZ"})
  925. coldWar:Add("Devised in 1959, the DEFCON system has five stages of military readiness. Which DEFCON rating is used when a nuclear attack is imminent or already underway?", {"DEFCON 1", "DEFCON 3", "DEFCON 5"})
  926. coldWar:Add("Although never fully leaving the organization, in 1966 what country withdrew its military from NATO and expelled NATO headquarters from its borders?", {"France", "United States", "Poland", "West Germany"})
  927. coldWar:Add("Often seen as the Soviet version of the United States’ Vietnam quagmire, the U.S.S.R.’s 10-year-long invasion of what country began in 1979?", {"Afghanistan", "Poland", "Czechoslovakia", "Ukraine"}, 2)
  928.  
  929. local chemistry = categoryManager.New("Chemistry")
  930. chemistry:Add("What is the chemical formula of water?", {"H2O", "CO2", "O2", "2HO"})
  931. chemistry:Add("What is the name of the process that converts a solid into a gas without passing through a liquid state?", {"Sublimation", "Evaporation", "Condensation", "Deposition"})
  932. chemistry:Add("What is the name of the element with the symbol K?", {"Potassium", "Calcium", "Krypton", "Kalium"})
  933. chemistry:Add("What is the name of the process that separates a mixture of liquids based on their boiling points?", {"Distillation", "Filtration", "Crystallization", "Chromatography"})
  934. chemistry:Add("What is the name of the organic compound that has the general formula CnH2n+2?", {"Alkane", "Alkene", "Alkyne", "Ammonia"}, 2)
  935.  
  936. local biology = categoryManager.New("Biology")
  937. biology:Add("What is the name of the process by which plants make their own food?", {"Photosynthesis", "Respiration", "Transpiration", "Fermentation"})
  938. biology:Add("What is the smallest unit of life?", {"Cell", "Atom", "Molecule", "Organ"})
  939. biology:Add("What is the term for a group of cells that perform a specific function?", {"Tissue", "Organ", "System", "Organism"})
  940. biology:Add("What are the four types of macromolecules found in living things?", {"Carbohydrates, proteins, lipids, and nucleic acids", "Glucose, amino acids, fatty acids, and nucleotides", "Starch, enzymes, fats, and DNA", "Sugars, peptides, oils, and RNA"}, 2)
  941. biology:Add("What is the name of the molecule that carries genetic information in most living organisms?", {"DNA", "RNA", "ATP", "ADP"})
  942.  
  943. local RobloxKnowlage = categoryManager.New("RobloxKnowlage")
  944. RobloxKnowlage:Add("What language of scripting does roblox use?,", {"LuaU", "HTML", "JavaScript", "Lua"})
  945. RobloxKnowlage:Add("What was the oldest verison of roblox?,", {"1988", "2006", "1976", "2002"})
  946. RobloxKnowlage:Add("Which game of these has the most visits?,", {"BloxFruits", "JailBreak", "BloxPiece", "MM2"})
  947. RobloxKnowlage:Add("What error code appears when you have a bad connection?,", {"Error code 277", "Error code 211", "Error code 432", "Error code 263"})
  948. RobloxKnowlage:Add("Who made roblox?,", {"David Baszucki", "Eternal?", "David bazooka?", "Builderman"})
  949.  
  950. local RobloxKnowlage = categoryManager.New("RobloxKnowlage2")
  951. RobloxKnowlage:Add("What is the message of a HW ban?,", {"You have been banned.", "You have been hardware banned.", "You have been IP banned.", "You have been terminated."})
  952. RobloxKnowlage:Add("What was the most popular exploit?,", {"Synapse", "KRNL", "Codex", "Wave"})
  953. RobloxKnowlage:Add("Who was the most dangrous h4cker?,", {"Elernate", "C0Ol Kid", "BunBun", "Jenna"})
  954. RobloxKnowlage:Add("Who made the game doors? (CAN BE A GROUP TOO),", {"LSplash", "Nikilis", "Big games", "ROLVe"})
  955. RobloxKnowlage:Add("Who made roblox?,", {"David Baszucki", "Eternal?", "David bazooka?", "Builderman"})
  956.  
  957. local RobloxKnowlage = categoryManager.New("RobloxKnowlage2")
  958. RobloxKnowlage:Add("Which of these cars is the fastest?,", {"911?", "bugatti", "supra", "You have been terminated."})
  959. RobloxKnowlage:Add("What was the most popular exploit?,", {"Synapse", "KRNL", "Codex", "Wave"})
  960. RobloxKnowlage:Add("Who was the most dangrous h4cker?,", {"Elernate", "C0Ol Kid", "BunBun", "Jenna"})
  961. RobloxKnowlage:Add("Who made the game doors? (CAN BE A GROUP TOO),", {"LSplash", "Nikilis", "Big games", "ROLVe"})
  962. RobloxKnowlage:Add("Who made roblox?,", {"David Baszucki", "Eternal?", "David bazooka?", "Builderman"})
  963.  
  964.  
  965. local categoryTable = {}
  966. for k, v in pairs(categories) do
  967.     table.insert(categoryTable, k)
  968. end
  969. table.sort(categoryTable)
  970.  
  971. local function sendCategories()
  972.     if not quizRunning then
  973.         Chat("❓ | Quiz topics:")
  974.         task.wait(3)
  975.         SplitIntoMessages(categoryTable, ", ", 5)
  976.     end
  977. end
  978.  
  979. local function getDisplayNameByUsername(username)
  980.     local displayName = players:FindFirstChild(username).DisplayName
  981.     return displayName
  982. end
  983.  
  984. local function sortUserPoints(type)
  985.     local array = {}
  986.     for key, value in pairs(userPoints) do
  987.         array[#array+1] = {key, value[type]}
  988.     end
  989.     table.sort(array, function(a, b)
  990.         return a[2] > b[2]
  991.     end)
  992.     return array
  993. end
  994.  
  995. local function sendLeaderboard(type, message)
  996.     local array
  997.     if not message then
  998.         message = ""
  999.     end
  1000.     if type == "Current quiz" then
  1001.         array = sortUserPoints("CurrentQuizPoints")
  1002.     else
  1003.         array = sortUserPoints("GlobalPoints")
  1004.     end
  1005.     task.wait(1.5)
  1006.     if array[1] and array[1][2] > 0 then
  1007.         Chat(message..type.." leaderboard:")
  1008.         local username = array[1][1]
  1009.         local displayName = getDisplayNameByUsername(username)
  1010.         local points = tostring(roundNumber(array[1][2], 1))
  1011.         task.wait(2.5)
  1012.         Chat("🥇 "..displayName.." (@"..username..") - "..points.." points")
  1013.         UpdateSignText("🥇 "..displayName)
  1014.         if array[2] and array[2][2] > 0 then
  1015.             username = array[2][1]
  1016.             displayName = getDisplayNameByUsername(username)
  1017.             points = tostring(roundNumber(array[2][2], 1))
  1018.             task.wait(2.5)
  1019.             Chat("🥈 "..displayName.." (@"..username..") - "..points.." points")
  1020.             UpdateSignText("🥈 "..displayName)
  1021.             if array[3] and array[3][2] > 0 then
  1022.                 task.wait(2.5)
  1023.                 username = array[3][1]
  1024.                 displayName = getDisplayNameByUsername(username)
  1025.                 points = tostring(roundNumber(array[3][2], 1))
  1026.                 Chat("🥉 "..displayName.." (@"..username..") - "..points.." points")
  1027.                 UpdateSignText("🥉 "..displayName)
  1028.                 task.wait(2.5)
  1029.             end
  1030.         end
  1031.     end
  1032. end
  1033.  
  1034. local autoplayChosenCategories = {} -- categories previously chosen by autoplay
  1035. local function choseAutoplayCategory()
  1036.     local chosenCategory = categoryTable[math.random(#categoryTable)]
  1037.     if table.find(autoplayChosenCategories, chosenCategory) then -- if category has been previously chosen, chose another category
  1038.         return choseAutoplayCategory()
  1039.     else
  1040.         return chosenCategory
  1041.     end
  1042. end
  1043.  
  1044. local function startQuiz(category)
  1045.     if quizRunning or quizCooldown then
  1046.         return
  1047.     end
  1048.     quizRunning = true
  1049.     pointManager.ClearQuizPoints()
  1050.     Chat('🚀 | Initiating "'..category..'" quiz...')
  1051.     UpdateSignText(category)
  1052.     task.wait(3)
  1053.     local loopIterations = 0
  1054.     for _, v in pairs(categories[category]) do
  1055.         if not quizRunning then
  1056.             return
  1057.         end
  1058.         v:Ask()
  1059.         awaitAnswer(v)
  1060.         if not quizRunning then
  1061.             return
  1062.         end
  1063.         task.wait(6)
  1064.         loopIterations += 1
  1065.         if not quizRunning then
  1066.             return
  1067.         end
  1068.         if loopIterations == settings.sendLeaderBoardAfterQuestions and settings.automaticLeaderboards and settings.automaticCurrentQuizLeaderboard then
  1069.             sendLeaderboard("Current quiz", "📜 | ")
  1070.             loopIterations = 0
  1071.         end
  1072.     end
  1073.     task.wait(3)
  1074.     if loopIterations ~= 0 and settings.automaticLeaderboards and settings.automaticCurrentQuizLeaderboard then
  1075.         sendLeaderboard("Current quiz", "📜 | ")
  1076.     end
  1077.     UpdateSignText(endMessage)
  1078.     task.delay(15, function()
  1079.        UpdateSignText("")
  1080.     end)
  1081.     if settings.automaticLeaderboards and settings.automaticServerQuizLeaderboard then
  1082.         sendLeaderboard("Server", "🏆 | Quiz ended. ")
  1083.         task.wait(2)
  1084.     else
  1085.         SendMessageWhenReady("🏁 | Quiz ended")
  1086.         task.wait(3)
  1087.     end
  1088.     UpdateSignText(endMessage)
  1089.     quizRunning = false
  1090.     if settings.autoplay then
  1091.         table.insert(autoplayChosenCategories, category)
  1092.         Chat("🎲 | Picking next category...")
  1093.         local chosenCategory = choseAutoplayCategory()
  1094.         if #autoplayChosenCategories == #categoryTable then -- if every category has been chosen, clear the chosencategories table
  1095.             table.clear(autoplayChosenCategories)
  1096.         end
  1097.         task.wait(5)
  1098.         startQuiz(chosenCategory)
  1099.     end
  1100. end
  1101.  
  1102. local quizModeRules = {"Each question has one right answer and one to three wrong answers.", "If you answer correctly, you will earn one point (or two points if the question is a double point question).", "If you answer incorrectly, you will have to wait "..tostring(settings.userCooldown).." seconds before you can submit another answer."}
  1103. local kahootModeRules = {"Each question has one right answer and one to three wrong answers.", "You can only submit ONE answer per round.", "The first answer you submit is your final answer, and it can not be changed.", "You have "..tostring(settings.questionTimeout).." seconds to answer the question after all the options have been said.", "Every second after all the options have been said, the points you will gain for answering correctly decrease.", "In other words, the quicker you answer, the more points you will gain.", "Additionally, the first person who submits a correct answer gets 1.5x points."}
  1104. local function sendRules()
  1105.     if mode == "quiz" then
  1106.         Chat("📜 | Quiz mode rules:")
  1107.         task.wait(2)
  1108.         SplitIntoMessages(quizModeRules, " ")
  1109.     elseif mode == "kahoot" then
  1110.         Chat("📜 | Kahoot mode rules:")
  1111.         task.wait(2)
  1112.         SplitIntoMessages(kahootModeRules, " ")
  1113.     end
  1114. end
  1115.  
  1116. game:GetService("Players").PlayerRemoving:Connect(function(player) -- remove player's userpoint account on leave
  1117.     pointManager.RemoveAccount(player)
  1118. end)
  1119.  
  1120. local function getPlayerByPlayerName(name)
  1121.     if name then
  1122.         name = name:lower()
  1123.         for i, v in ipairs(players:GetPlayers()) do
  1124.             if string.lower(string.sub(v.Name, 1, #name)) == name then
  1125.                 return v
  1126.             end
  1127.             if string.lower(string.sub(v.DisplayName, 1, #name)) == name then
  1128.                 return v
  1129.             end
  1130.         end
  1131.         for i, v in ipairs(players:GetPlayers()) do
  1132.             if string.match(v.Name:lower(), name) then
  1133.                 return v
  1134.             end
  1135.             if string.match(v.DisplayName:lower(), name) then
  1136.                 return v
  1137.             end
  1138.         end
  1139.     end
  1140. end
  1141.  
  1142. local function getTargetPlayer(name) -- try to get a target player from the name
  1143.     local target
  1144.     if name == " " or name == "" then
  1145.         -- if target player isn't specified, use the localplayer
  1146.         target = localPlayer
  1147.         return target
  1148.     end
  1149.     local matchingPlayer = getPlayerByPlayerName(name)
  1150.     if name:lower() == "me" then
  1151.         target = localPlayer
  1152.         return target
  1153.     elseif name:lower() == "random" then
  1154.         local playerTable = players:GetPlayers()
  1155.         target = playerTable[math.random(#playerTable)]
  1156.         return target
  1157.     elseif matchingPlayer then
  1158.         target = matchingPlayer
  1159.         return target
  1160.     end
  1161.     target = nil
  1162.     return target
  1163. end
  1164.  
  1165. local function getCategoryName(name) -- detects category from begging of string, for example: "gene" will return "general" category
  1166.     name = name:lower()
  1167.     for _, category in ipairs(categoryTable) do
  1168.         if string.lower(string.sub(category, 1, #name)) == name then
  1169.             return category
  1170.         end
  1171.     end
  1172. end
  1173. ---------- UI ----------
  1174. local library = loadstring(game:HttpGet('https://raw.githubusercontent.com/bloodball/-back-ups-for-libs/main/wall%20v3'))()
  1175.  
  1176. local w = library:CreateWindow("Quiz script 📑")
  1177. local b = w:CreateFolder("Main controls⚡")
  1178.  
  1179. b:Label("MADE BY: @Vxploits",{
  1180.     TextSize = 15,
  1181.     TextColor = Color3.fromRGB(255,255,255),
  1182.     BgColor = Color3.fromRGB(69,69,69)
  1183. })
  1184.  
  1185. local selectedCategory
  1186.  
  1187. b:Box("Category", "string", function(value)
  1188.     selectedCategory = getCategoryName(value)
  1189. end)
  1190.  
  1191. b:Dropdown("Category", categoryTable, true, function(mob)
  1192.     selectedCategory = mob
  1193. end)
  1194.  
  1195. b:Button("Start quiz", function()
  1196.     if categories[selectedCategory] then
  1197.         startQuiz(selectedCategory)
  1198.     end
  1199. end)
  1200.  
  1201. b:Button("Stop quiz", function()
  1202.     quizCooldown = true
  1203.     quizRunning = false
  1204.     currentQuestion = nil
  1205.     questionAnsweredBy = nil
  1206.     awaitingAnswer = false
  1207.     task.delay(5, function()
  1208.         quizCooldown = false
  1209.     end)
  1210. end)
  1211.  
  1212. b:Button("Send categories", function()
  1213.     sendCategories()
  1214. end)
  1215.  
  1216. b:Button("Send rules", function()
  1217.     sendRules()
  1218. end)
  1219.  
  1220. b:Button("Send current LB", function()
  1221.     sendLeaderboard("Current quiz", "📜 | ")
  1222. end)
  1223.  
  1224. b:Button("Send server LB", function()
  1225.     sendLeaderboard("Server", "🏆 | ")
  1226. end)
  1227.  
  1228. b:Button("Reset all points", function()
  1229.     pointManager.ResetAllPoints()
  1230. end)
  1231.  
  1232. local c = w:CreateFolder("Player controls 🦎")
  1233. local targetPlayer
  1234.  
  1235. c:Box("Target", "string", function(value)
  1236.     targetPlayer = getTargetPlayer(value)
  1237. end)
  1238.  
  1239. local pointsToAdd
  1240. c:Box("Amount of points", "number", function(value)
  1241.     if value and tonumber(value) then
  1242.         pointsToAdd = value
  1243.     end
  1244. end)
  1245.  
  1246. c:Button("Apply global points", function()
  1247.     if pointsToAdd then
  1248.         pointManager.AddPoints(targetPlayer, pointsToAdd, "Global")
  1249.     end
  1250. end)
  1251.  
  1252. c:Button("Apply quiz points", function()
  1253.     if pointsToAdd then
  1254.         pointManager.AddPoints(targetPlayer, pointsToAdd, "CurrentQuiz")
  1255.     end
  1256. end)
  1257.  
  1258. c:Button("Rest quiz points", function()
  1259.     pointManager.ClearQuizPointsForPlayer(targetPlayer)
  1260. end)
  1261.  
  1262. c:Button("Rest global points", function()
  1263.     pointManager.ClearGlobalPointsForPlayer(targetPlayer)
  1264. end)
  1265.  
  1266. c:Button("Reset all points", function()
  1267.     pointManager.RemoveAccount(targetPlayer)
  1268. end)
  1269.  
  1270. c:Button("Block", function()
  1271.     table.insert(blockedPlayers, targetPlayer.Name)
  1272. end)
  1273.  
  1274. c:Button("Unblock", function()
  1275.     table.remove(blockedPlayers, table.find(blockedPlayers, targetPlayer.Name))
  1276. end)
  1277.  
  1278. c:Button("Unblock all", function()
  1279.     table.clear(blockedPlayers)
  1280. end)
  1281.  
  1282. c:Button("Whitelist", function()
  1283.     table.insert(whiteListedplayers, targetPlayer.Name)
  1284. end)
  1285.  
  1286. c:Button("Unwhitelist", function()
  1287.     table.remove(whiteListedplayers, table.find(whiteListedplayers, targetPlayer.Name))
  1288. end)
  1289.  
  1290. c:Button("Disable whitelist", function()
  1291.     table.clear(whiteListedplayers)
  1292. end)
  1293.  
  1294. local d = w:CreateFolder("Settings 🍀")
  1295.  
  1296. d:Dropdown("Mode", {"Quiz", "Kahoot"}, true, function(mob)
  1297.     mode = mob:lower()
  1298.     if mob == "Quiz" then
  1299.         Chat("❓ | Quiz mode enabled")
  1300.     elseif mob == "Kahoot" then
  1301.         Chat("✉️ | Kahoot mode enabled")
  1302.     end
  1303. end)
  1304.  
  1305. d:Toggle("Autoplay quizzes automatically", function(value)
  1306.     settings.autoplay = value
  1307. end)
  1308.  
  1309. d:Box("Question timeout", "number", function(value)
  1310.     if value then
  1311.         settings.questionTimeout = value
  1312.     end
  1313. end)
  1314.  
  1315. d:Box("User cooldown on wrong answer", "number", function(value)
  1316.     if value then
  1317.         settings.userCooldown = value
  1318.     end
  1319. end)
  1320.  
  1321. d:Box("Automatically send leaderboard after questions", "number", function(value)
  1322.     if value then
  1323.         settings.sendLeaderBoardAfterQuestions = value
  1324.     end
  1325. end)
  1326.  
  1327. d:Toggle("Disable automatic leaderboards", function(value)
  1328.     settings.automaticLeaderboards = not value
  1329. end)
  1330.  
  1331. d:Toggle("Disable automatic sending of current quiz LB", function(value)
  1332.     settings.automaticCurrentQuizLeaderboard = not value
  1333. end)
  1334.  
  1335. d:Toggle("Disable automatic sending of server LB at the end of quiz", function(value)
  1336.     settings.automaticServerQuizLeaderboard = not value
  1337. end)
  1338.  
  1339. d:Toggle("Do not repeat tagged messages", function(value)
  1340.     if not oldChat then
  1341.         settings.repeatTagged = not value
  1342.     end
  1343. end)
  1344.  
  1345. if boothGame then
  1346.     d:Toggle("Disable sign status (booth game only)", function(value)
  1347.         settings.signStatus = not value
  1348.     end)
  1349.     d:Toggle("Don't use roman numbers for sign timer (may get tagged)", function(value)
  1350.         settings.romanNumbers = not value
  1351.     end)
  1352. end
  1353.  
  1354. local f = library:CreateWindow("Quizzes to put in Catergory! 🐢")
  1355. local f = f:CreateFolder("if not work use capital letter")
  1356.  
  1357. f:Label("flags if not work then Flags",{
  1358.     TextSize = 15,
  1359.     TextColor = Color3.fromRGB(255,255,255),
  1360.     BgColor = Color3.fromRGB(69,69,69)
  1361. })
  1362.  
  1363. f:Label("RobloxKnowlage, RobloxKnowlage2",{
  1364.     TextSize = 15,
  1365.     TextColor = Color3.fromRGB(255,255,255),
  1366.     BgColor = Color3.fromRGB(69,69,69)
  1367. })
  1368.  
  1369. f:Label("Flags-Medium",{
  1370.     TextSize = 15,
  1371.     TextColor = Color3.fromRGB(255,255,255),
  1372.     BgColor = Color3.fromRGB(69,69,69)
  1373. })
  1374.  
  1375. f:Label("Flags-Easy2",{
  1376.     TextSize = 15,
  1377.     TextColor = Color3.fromRGB(255,255,255),
  1378.     BgColor = Color3.fromRGB(69,69,69)
  1379. })
  1380.  
  1381. f:Label("Flags-Hard",{
  1382.     TextSize = 15,
  1383.     TextColor = Color3.fromRGB(255,255,255),
  1384.     BgColor = Color3.fromRGB(69,69,69)
  1385. })
  1386.  
  1387. f:Label("science",{
  1388.     TextSize = 15,
  1389.     TextColor = Color3.fromRGB(255,255,255),
  1390.     BgColor = Color3.fromRGB(69,69,69)
  1391. })
  1392.  
  1393. f:Label("science2",{
  1394.     TextSize = 15,
  1395.     TextColor = Color3.fromRGB(255,255,255),
  1396.     BgColor = Color3.fromRGB(69,69,69)
  1397. })
  1398.  
  1399. f:Label("history AND history2",{
  1400.     TextSize = 15,
  1401.     TextColor = Color3.fromRGB(255,255,255),
  1402.     BgColor = Color3.fromRGB(69,69,69)
  1403. })
  1404.  
  1405. f:Label("foodAndDrink",{
  1406.     TextSize = 15,
  1407.     TextColor = Color3.fromRGB(255,255,255),
  1408.     BgColor = Color3.fromRGB(69,69,69)
  1409. })
  1410.  
  1411. f:Label("Trivia AND Trivia2",{
  1412.     TextSize = 15,
  1413.     TextColor = Color3.fromRGB(255,255,255),
  1414.     BgColor = Color3.fromRGB(69,69,69)
  1415. })
  1416.  
  1417. f:Label("guessTheLanguage",{
  1418.     TextSize = 15,
  1419.     TextColor = Color3.fromRGB(255,255,255),
  1420.     BgColor = Color3.fromRGB(69,69,69)
  1421. })
  1422.  
  1423. f:Label("capitals AND capitalsHard",{
  1424.     TextSize = 15,
  1425.     TextColor = Color3.fromRGB(255,255,255),
  1426.     BgColor = Color3.fromRGB(69,69,69)
  1427. })
  1428.  
  1429. f:Label("geography AND geographyMedium AND geographyHard",{
  1430.     TextSize = 15,
  1431.     TextColor = Color3.fromRGB(255,255,255),
  1432.     BgColor = Color3.fromRGB(69,69,69)
  1433. })
  1434.  
  1435. f:Label("gaming AND gaming2",{
  1436.     TextSize = 15,
  1437.     TextColor = Color3.fromRGB(255,255,255),
  1438.     BgColor = Color3.fromRGB(69,69,69)
  1439. })
  1440.  
  1441. f:Label("movies [From now on i add more in one lable :C ]",{
  1442.     TextSize = 15,
  1443.     TextColor = Color3.fromRGB(255,255,255),
  1444.     BgColor = Color3.fromRGB(69,69,69)
  1445. })
  1446.  
  1447. f:Label("roblox, roblox2, english, animals, sports, minecraft",{
  1448.     TextSize = 15,
  1449.     TextColor = Color3.fromRGB(255,255,255),
  1450.     BgColor = Color3.fromRGB(69,69,69)
  1451. })
  1452.  
  1453. f:Label("chess, WWII, WWI, Luau, astronomy",{
  1454.     TextSize = 15,
  1455.     TextColor = Color3.fromRGB(255,255,255),
  1456.     BgColor = Color3.fromRGB(69,69,69)
  1457. })
  1458.  
  1459. f:Label("memes, anarchy, anime, mathHard, coldWar, Biology",{
  1460.     TextSize = 15,
  1461.     TextColor = Color3.fromRGB(255,255,255),
  1462.     BgColor = Color3.fromRGB(69,69,69)
  1463. })
  1464.  
  1465. local e = w:CreateFolder("Destroy GUI ❌")
  1466.  
  1467. e:Button("Disable connections", function()
  1468.     if oldChat then
  1469.         for _, connection in playerChatConnections do
  1470.             joinConnection:Disconnect()
  1471.             connection:Disconnect()
  1472.         end
  1473.     else
  1474.         chatConnection:Disconnect()
  1475.     end
  1476. end)
  1477. e:DestroyGui()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement