Document stub.png This article or section may not have content matching Scratch Wiki editing standards. Please improve it according to Scratch Wiki:Guidelines and Scratch Wiki:Editing Conventions. (December 2024)
Document.png Please expand this article or section. You can help by adding more information if you are an editor. More information might be found in a section of the talk page. (December 2024)
This article is about creating a human verification system in a Scratch project. For the human verification feature in the Scratch account creation process, see Creating an Account#reCAPTCHA.

The Math Method

In this method, the project asks the user some math to solve, to continue playing the project. First, create a custom block, or a broadcast. Create two or more variables, to store the numbers you will include in human verification. Use the Pick Random block to set the variables to any value. Now, use the Ask block to ask the question. Now, let scratch solve the problem and check the response. This is an sample:

when I receive [Human Verification v]
set [Human Verification 1 v] to (Pick Random (1) to (25)
set [Human Verification 2 v] to (Pick Random (1) to (5))
ask (join [Solve ] (join (Human verification 1) (join [ * ] (Human Verification 2) ))) and wait
if <(Answer) = ((Human Verification 1) * (Human Verification 2))> then
    say [Correct answer!] for (2) seconds
else
    say [Wrong answer] for (5) seconds
    stop [all v]
end

The Keyboard Check

In this method, we ask the user to press certain keys, to continue.

when I receive [Human Verification v]
say [Please press the spacebar.]
wait until <key (space v) pressed?>
say [Successful!] for (2) seconds
Cookies help us deliver our services. By using our services, you agree to our use of cookies.