Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Creating an Account System using Cloud Variables?
- Newman699
-
Scratcher
9 posts
Creating an Account System using Cloud Variables?
I'm trying to recreate a game that uses an account system, and i can't seem to figure out how to do so. (What i want to do is have the username as your scratch username, and your password as, well, your password.) (i also want to see if it's possible to encrypt the desired password, if possible.) i've looked into several other forum posts, but to no avail. so, can anybody help with my dilemma? if so, i can credit you in the “Notes and Credits” section.
- TeenySpoon
-
Scratcher
1000+ posts
Creating an Account System using Cloud Variables?
Hi!
You can create a script like this:
This is how it works:
Unfortunately, this does not encrypt/decrypt the passwords, but it already checks for the player's username, so no other players can access it even if they have the password.
Also, I feel like you don't need an account system because you can already use the username. Instead of creating an account system, you could just use lists to assign data to a certain username. When the user with that name logs on, all of his/her progress is restored.
Please tell me if this was helpful.
Thank you!
You can create a script like this:
when I receive [login/sign up v]
if <[acct usernames v] contains (username)?> then
ask [Enter password:] and wait
if <(item # (username) of [acct passwords v] :: list) = (answer)> then
broadcast [logged in v]
else
broadcast [error v]
end
else
add (username) to [acct usernames v]
ask [Create password:] and wait
add (answer) to [acct passwords v]
end
This is how it works:
- Create a button that broadcasts “login/sign up” when clicked.
- Create a sprite called “Account manager”
- Insert the script above.
- The script checks to see if a list of usernames contains the player's username.
Then it asks for a password.
If the item # of the username in the password list is what was entered, “logged in” will be broadcast.
If not, then an “error” will be broadcast, and you can create some code to handle this. (Maybe a message pops up explaining the password was wrong?) - If the username is not in the list of people who have signed up, the player gets to create an account.
Unfortunately, this does not encrypt/decrypt the passwords, but it already checks for the player's username, so no other players can access it even if they have the password.
Also, I feel like you don't need an account system because you can already use the username. Instead of creating an account system, you could just use lists to assign data to a certain username. When the user with that name logs on, all of his/her progress is restored.
Please tell me if this was helpful.
Thank you!
- ItBeJC
-
Scratcher
1000+ posts
Creating an Account System using Cloud Variables?
Keep in mind, your system would be limited. Each cloud variable can only store 256 characters, and you can only have 10 cloud variables in a single Scratch project. I suggest using save codes instead, and making the code very hard to hack.
- RandomCocconut
-
Scratcher
500+ posts
Creating an Account System using Cloud Variables?
You can use Scratch variables to store the username and password entered by the user. However, it is important to note that Scratch variables are not secure and can be easily manipulated or accessed by other users.
To encrypt the password, you can use a simple encryption algorithm in Scratch such as the Caesar Cipher. However, it is important to note that this method is not very secure and can be easily cracked.
To encrypt the password, you can use a simple encryption algorithm in Scratch such as the Caesar Cipher. However, it is important to note that this method is not very secure and can be easily cracked.
- 09878901234321
-
Scratcher
500+ posts
Creating an Account System using Cloud Variables?
You can easily hack account passwords with this method. You could have another server like in these:
https://scratch.mit.edu/projects/417561335
https://scratch.mit.edu/projects/536175847/
I don't know how these work exactly but it could still help.
https://scratch.mit.edu/projects/417561335
https://scratch.mit.edu/projects/536175847/
I don't know how these work exactly but it could still help.
Last edited by 09878901234321 (April 30, 2023 21:03:46)
- itz_yaboyben5
-
Scratcher
1 post
Creating an Account System using Cloud Variables?
I make a game called 800 exo
Last edited by itz_yaboyben5 (April 30, 2023 21:10:12)
- Discussion Forums
- » Help with Scripts
-
» Creating an Account System using Cloud Variables?