Login
Create

'Password' System

5TY2G

What is this??

This is a snippet that you can paste into your workshop game that allows you to set a custom sequence of inputs to use as a 'password' to allow other players in the game to access your custom debug tools, cheats, or other fun stuff.
It is recommended to simply paste the code snippet.
Suggestions for improvement or cleanup welcome.

How to Use

Set the global Password variable to an array that represents the sequence you want to use. You can use an array of any size, though I haven't tested excessively short or long passwords.

In the default example, the sequence is Ability 2 🢒 Ability 2 🢒 Ability 2 🢒 Crouch 🢒 Crouch 🢒 Crouch 🢒 Ability 2 🢒 Ability 2 🢒 Ability 2. With default keybinds, this represents the following button presses: E 🢒 E 🢒 E 🢒 Ctrl 🢒 Ctrl 🢒 Ctrl 🢒 E 🢒 E 🢒 E.

Once the player enters buttons in the same sequence as the password, it sets the player var Authorized to true. You can use this as a flag for your other rules. If the player enters the sequence again, it sets Authorized to false again.

Use this table as a reference for creating your password. Since I could not use the actual button objects, the password system works with strings.

String (use this to set PW) Actual Name of Button Default Keybind
primary Primary Fire Mouse 1
secondary Secondary Fire Mouse 2
ability1 Ability 1 Shift
ability2 Ability 2 E
ultimate Ultimate Q
interact Interact F
jump Jump Space
crouch Crouch Ctrl
melee Melee V
reload Reload R

NOTES

  • This system tracks only the most recent N button presses, where N is the length of the password. If you planned on extending this to add custom functionality to different passwords, you will have to change this behavior.
  • The player's input buffer is cleared when there is a code match.
Categories | Tools
Heroes | All
Maps | All
Created At |
Updated At |

Snippet

Loading...
Fullscreen
Copy to clipboard
Elo Hell Logo_H-M-Dark
Join the Elo Hell Workshops Discord
Workshop.codes - Background image