The quiz Center that cookie made, it’s skipping 1 question and not kicking and promoting me. Is there some bug or?
Shouldn’t be a bug. Make sure that no spam clicking is happening. Go slow and steady through the quiz.
The thing is, can’t anyone spam click (unless you add a cooldown)?
Yeh, but we’re in testing purposes.
It shouldn’t be spam clicked.
As other people don’t have problems.
I’m not spam clicking its skipping and not doing what i needs to do
Maybe you set it up incorrectly? It works fine for me?
For me it isn’t, so yea
Maybe you set it up incorrectly?
Try setting it up again.
I did everything step by step, it says now that I got a question fault when it’s that answer.
Strange. I’m not sure then.
Yes, so yea weird stuff
Keeps stuck on it
--Variables
local ApiKey = script.ApiKey.Value
local GroupId = script.GroupId.Value
local HttpService = game:GetService("HttpService")
local AppUrl = script.AppUrl.Value
local req_points = 0
local TotalQuestions = 0
local CorrectAnswers = 0
local CompletedQuestions = 0
local checking = false
local PassedRank = 0
local url = script.AppUrl.Value
local APIKEY = script.ApiKey.Value
local groupId = script.GroupId.Value
--OnServerEvent
game.ReplicatedStorage.SendData.OnServerEvent:Connect(function(players, Req, total, PassRank)
req_points = Req
TotalQuestions = total
PassedRank = PassRank
end)
--ManageQuestions
wait(5)
game.ReplicatedStorage.NextQuestion:FireAllClients() --Waits and then does first question
--Remote Events
game.ReplicatedStorage.PointStatus.OnServerEvent:Connect(function(player, status)
if status == true then
if CompletedQuestions <= TotalQuestions then
CorrectAnswers = CorrectAnswers +1
print("Current points: " ..CorrectAnswers)
CompletedQuestions = CompletedQuestions +1
wait(3)
game.ReplicatedStorage.NextQuestion:FireAllClients()
end
else
if CompletedQuestions <= TotalQuestions then
print("Current points: " ..CorrectAnswers)
CompletedQuestions = CompletedQuestions +1
wait(3)
game.ReplicatedStorage.NextQuestion:FireAllClients()
print("Current points: " ..CorrectAnswers)
end
end
end)
local function promoteStatus(plr)
print("Now ranking!")
local url_with_data = url.."?user_name="..plr.Name.."&key=".. APIKEY.."&groupid=" ..groupId.."&role_number="..PassedRank
local response = HttpService:GetAsync(url_with_data)
local data = HttpService:JSONDecode(response)
local Data = {
["content"] = plr.Name .."was promoted as they passed the quiz!"
}
Data = http:JSONEncode(Data)
http:PostAsync("https://discord.com/api/webhooks/897185160234160188/cyGUfCAPBD17axVuZar8BakdtuuuAAgnmGWNx4w8tj0NqamMv222ts8ebObvBhLMihFP", Data) --Put the webhook you saved between the two quotes.
wait(5)
plr:kick("You were promoted! \n You should have been ranked in the group!")
end
game.ReplicatedStorage.CheckIfPassed.OnServerEvent:Connect(function(PlayerInstance)
print("Checking.")
if CorrectAnswers >= req_points then
game.ReplicatedStorage.PromotionStatus:FireAllClients(true)
promoteStatus(PlayerInstance)
else
local data = HttpService:JSONDecode(response)
local Data = {
["content"] = plr.Name .."failed as they did not get enough questions correct in the quiz!"
}
Data = http:JSONEncode(Data)
http:PostAsync("", Data) --Put the webhook you saved between the two quotes.
game.ReplicatedStorage.PromotionStatus:FireAllClients(false)
PlayerInstance:Kick("You failed the application. \n try again later!")
end
end)
local player = game.Players.LocalPlayer
local ManagerGui = game.StarterGui.ApplicationGui
local CurrentQuestion = 1
local QuestionsFrame = script.Parent.Questions_Frame
local PointStatus = game.ReplicatedStorage.PointStatus
local SendData = game.ReplicatedStorage.SendData
--EDIT ME
local req_Points = 4
local TotalQuestions = 4
local ApplicationName = "United Kingdom Center"
local PassRank = 3
local questions = {
[1] = {
"Who is our current Founder?",
"PersesTheTitan",
"Jim",
"Expective_NL",
"SinghXValor",
1
},
[2] = {
"Who is our Group Management?",
"Tiger",
"k1dnn",
"Expective_NL",
"Bradolink",
3
},
[3] = {
"Which side of the road we drive?",
"Right",
"Everywhere",
"Left",
"Middle",
3
},
[4] = {
"Who is our current Monarch?",
"PersesTheTitan",
"BradPlaysFTW",
"KyleSWoodwin",
"TigerFX",
2
},
}
--DON'T EDIT ME
print(ApplicationName)
script.Parent.Title.Text = ApplicationName
game.ReplicatedStorage.SendData:FireServer(req_Points, TotalQuestions, PassRank)
local function Correct()
if CurrentQuestion <= TotalQuestions then
QuestionsFrame.Question_Here.Text = "Nice! That was Correct!"
game.ReplicatedStorage.PointStatus:FireServer(true)
end
end
local function Incorrect()
QuestionsFrame.Question_Here.Text = "Oops! That was Incorrect!"
game.ReplicatedStorage.PointStatus:FireServer(false)
end
local function executeNextQuestion()
local if_selected_answer = false
if_selected_answer = false
local current_question = questions[CurrentQuestion]
QuestionsFrame.Question_Here.Text = current_question[1]
QuestionsFrame.ANSWER1.Text = current_question[2]
QuestionsFrame.ANSWER2.Text = current_question[3]
QuestionsFrame.ANSWER3.Text = current_question[4]
QuestionsFrame.ANSWER4.Text = current_question[5]
local correct_answer = current_question[6]
local selected_answer = 0
local function check()
if selected_answer == correct_answer then
print("Correct")
Correct()
else
print("Incorrect")
Incorrect()
end
end
QuestionsFrame.OP1.MouseButton1Click:Connect(function()
if if_selected_answer == false then
if_selected_answer = true
selected_answer = 1
check()
CurrentQuestion = CurrentQuestion +1
end
end)
QuestionsFrame.OP2.MouseButton1Click:Connect(function()
if if_selected_answer == false then
if_selected_answer = true
selected_answer = 2
check()
CurrentQuestion = CurrentQuestion +1
end
end)
QuestionsFrame.OP3.MouseButton1Click:Connect(function()
if if_selected_answer == false then
if_selected_answer = true
selected_answer = 3
check()
CurrentQuestion = CurrentQuestion +1
end
end)
QuestionsFrame.OP4.MouseButton1Click:Connect(function()
if if_selected_answer == false then
if_selected_answer = true
selected_answer = 4
check()
CurrentQuestion = CurrentQuestion +1
end
end)
wait(3)
if_selected_answer = false
end
game.ReplicatedStorage.NextQuestion.OnClientEvent:Connect(function()
print("Fired")
if CurrentQuestion <= TotalQuestions then
executeNextQuestion()
else
script.Parent.Title.Text = "Checking if you passed..."
script.Parent.Questions_Frame:Destroy()
game.ReplicatedStorage.CheckIfPassed:FireServer(game.Players.LocalPlayer)
end
end)
game.ReplicatedStorage.PromotionStatus.OnClientEvent:Connect(function(status)
if status == false then
script.Parent.Title.Text = "You failed the application, try again later!"
else
script.Parent.Title.Text = "Currently promoting!"
end
end)
Hey can you help me out ^?
It works fine for me, I don’t know what’s going on.
I’ll look for you, if I find something I will get back to you, it could take me 1hr+ to look, so bear with me.
Alright, this are my codes;
--Variables
local ApiKey = script.ApiKey.Value
local GroupId = script.GroupId.Value
local HttpService = game:GetService("HttpService")
local AppUrl = script.AppUrl.Value
local req_points = 0
local TotalQuestions = 0
local CorrectAnswers = 0
local CompletedQuestions = 0
local checking = false
local PassedRank = 1
local url = script.AppUrl.Value
local APIKEY = script.ApiKey.Value
local groupId = script.GroupId.Value
--OnServerEvent
game.ReplicatedStorage.SendData.OnServerEvent:Connect(function(players, Req, total, PassRank)
req_points = Req
TotalQuestions = total
PassedRank = PassRank
end)
--ManageQuestions
wait(5)
game.ReplicatedStorage.NextQuestion:FireAllClients() --Waits and then does first question
--Remote Events
game.ReplicatedStorage.PointStatus.OnServerEvent:Connect(function(player, status)
if status == true then
if CompletedQuestions <= TotalQuestions then
CorrectAnswers = CorrectAnswers +1
print("Current points: " ..CorrectAnswers)
CompletedQuestions = CompletedQuestions +1
wait(3)
game.ReplicatedStorage.NextQuestion:FireAllClients()
end
else
if CompletedQuestions <= TotalQuestions then
print("Current points: " ..CorrectAnswers)
CompletedQuestions = CompletedQuestions +1
wait(3)
game.ReplicatedStorage.NextQuestion:FireAllClients()
print("Current points: " ..CorrectAnswers)
end
end
end)
local function promoteStatus(plr)
print("Now ranking!")
local url_with_data = url.."?user_name="..plr.Name.."&key=".. APIKEY.."&groupid=" ..groupId.."&role_number="..PassedRank
local response = HttpService:GetAsync(url_with_data)
local data = HttpService:JSONDecode(response)
local Data = {
["content"] = plr.Name .."was promoted as they passed the quiz!"
}
Data = HttpService:JSONEncode(Data)
HttpService:PostAsync("secret", Data) --Put the webhook you saved between the two quotes.
wait(5)
plr:kick("You were promoted! \n You should have been ranked in the group!")
end
game.ReplicatedStorage.CheckIfPassed.OnServerEvent:Connect(function(PlayerInstance)
print("Checking.")
if CorrectAnswers >= req_points then
game.ReplicatedStorage.PromotionStatus:FireAllClients(true)
promoteStatus(PlayerInstance)
else
local data = HttpService:JSONDecode(response)
local Data = {
["content"] = plr.Name .."failed as they did not get enough questions correct in the quiz!"
}
Data = HttpService:JSONEncode(Data)
HttpService:PostAsync("", Data) --Put the webhook you saved between the two quotes.
game.ReplicatedStorage.PromotionStatus:FireAllClients(false)
PlayerInstance:Kick("You failed the application. \n try again later!")
end
end)
local player = game.Players.LocalPlayer
local ManagerGui = game.StarterGui.ApplicationGui
local CurrentQuestion = 1
local QuestionsFrame = script.Parent.Questions_Frame
local PointStatus = game.ReplicatedStorage.PointStatus
local SendData = game.ReplicatedStorage.SendData
--EDIT ME
local req_Points = 4
local TotalQuestions = 4
local ApplicationName = "Title"
local PassRank = 3
local questions = {
[1] = {
"Who is our current Founder?",
"PersesTheTitan",
"SinghXValor",
"Jim",
"Expective_NL",
1
},
[2] = {
"Who is our Group Management?",
"Tiger",
"Expective_NL",
"Bradolink",
"k1dnn",
2
},
[3] = {
"Which side of the road we drive?",
"Anywhere",
"Right",
"Middle",
"Left",
4
},
[4] = {
"Who is our current Monarch?",
"PersesTheTitan",
"TigerFX",
"BradPlaysFTW",
"KyleSWoodwin",
3
},
}
--DON'T EDIT ME
print(ApplicationName)
script.Parent.Title.Text = ApplicationName
game.ReplicatedStorage.SendData:FireServer(req_Points, TotalQuestions, PassRank)
local function Correct()
if CurrentQuestion <= TotalQuestions then
QuestionsFrame.Question_Here.Text = "Nice! That was Correct!"
game.ReplicatedStorage.PointStatus:FireServer(true)
end
end
local function Incorrect()
QuestionsFrame.Question_Here.Text = "Oops! That was Incorrect!"
game.ReplicatedStorage.PointStatus:FireServer(false)
end
local function executeNextQuestion()
local if_selected_answer = false
if_selected_answer = false
local current_question = questions[CurrentQuestion]
QuestionsFrame.Question_Here.Text = current_question[1]
QuestionsFrame.ANSWER1.Text = current_question[2]
QuestionsFrame.ANSWER2.Text = current_question[3]
QuestionsFrame.ANSWER3.Text = current_question[4]
QuestionsFrame.ANSWER4.Text = current_question[5]
local correct_answer = current_question[6]
local selected_answer = 0
local function check()
if selected_answer == correct_answer then
print("Correct")
Correct()
else
print("Incorrect")
Incorrect()
end
end
QuestionsFrame.OP1.MouseButton1Click:Connect(function()
if if_selected_answer == false then
if_selected_answer = true
selected_answer = 1
check()
CurrentQuestion = CurrentQuestion +1
end
end)
QuestionsFrame.OP2.MouseButton1Click:Connect(function()
if if_selected_answer == false then
if_selected_answer = true
selected_answer = 2
check()
CurrentQuestion = CurrentQuestion +1
end
end)
QuestionsFrame.OP3.MouseButton1Click:Connect(function()
if if_selected_answer == false then
if_selected_answer = true
selected_answer = 3
check()
CurrentQuestion = CurrentQuestion +1
end
end)
QuestionsFrame.OP4.MouseButton1Click:Connect(function()
if if_selected_answer == false then
if_selected_answer = true
selected_answer = 4
check()
CurrentQuestion = CurrentQuestion +1
end
end)
wait(3)
if_selected_answer = false
end
game.ReplicatedStorage.NextQuestion.OnClientEvent:Connect(function()
print("Fired")
if CurrentQuestion <= TotalQuestions then
executeNextQuestion()
else
script.Parent.Title.Text = "Checking if you passed..."
script.Parent.Questions_Frame:Destroy()
game.ReplicatedStorage.CheckIfPassed:FireServer(game.Players.LocalPlayer)
end
end)
game.ReplicatedStorage.PromotionStatus.OnClientEvent:Connect(function(status)
if status == false then
script.Parent.Title.Text = "You failed the application, try again later!"
else
script.Parent.Title.Text = "Currently promoting!"
end
end)
Github;
Heroku;
Dont upload those links, I removed them for you.