So I know this is my third post in literally 1 hour lol (did you see @ItsDannyBruh though lol) but I had something so massive I had to post: literally what prevents people from changing my keyvalues to whatever they want and clearing my chat, because I see this happen a lot with lots of hackers, so does anybody know how to prevent it thanks.

    cherrys There is no way to block hacking. Accept it. However, for chats, you can easily block noobs using libraries like Vault (which I lost the link to...), or scripts like this anywhere in your project:

    if(getURLPath()[3]=="view"){
    for( var i in window) delete window[i]
    throw "No hacking."
    }

    Breakdown: using getURLPath gives you a whole new perspective, and it allows you to see the URL of the potential hackers that you couldn't have seen before. It returns a list, which for Gamelab could be: ["projects","gamelab","id","view or nothing (or edit)"]. If the last elements (index 3) is "view," the user is in view mode, and could be using the console to do nasty hacks. Thus, you delete all window methods and throw an error to stop them from using the project. Again, completely blocking hacks is impossible, though.

    EDIT: that "Siri" badge is looking possible now...

      cherrys Here's actually an improved answer:
      If you use line breaks, you can bypass the code I wrote above. Thus, you could put that code in a library, and import it as a security library. That will prevent line break hacking.

        Ravage Ok... but it says I can't export a library without a function so do I put it in a function

          cherrys No, do NOT put it inside a function. Just create a placeholder function (with the mandatory comment above it to make it valid for exports). Example of the library:

          //The code I wrote above (paste it here)
          //placeholder
          function a(){
          }

          Then you can just export the library, copy the ID, paste it into the chat project.

          cherrys Have you ever clicked on the line numbers in the CDO editor, and haven that purple pause button show up? That's a line break. When the code is run, and that line is reached, the code will just pause, allowing you to inject whatever you want in the console. You then press the "Continue" button in the console for the project to keep running.

            cherrys Are you seriously trying to hack using line breaks?

            Well, I don't care, so here's how you do it. If somebody is dumb enough to not have made a security library, you find the line of code which will stop the project from working when you are in hacking mode. You put a line break on any line before that. Run the project. It will stop at the line, and you can paste the following code into the console: getURLPath = function(){return ["","","",""]}. That will make getURLPath() always return something that makes it seem like you are not hacking. You can then hit Continue, and peacefully hack!...

              Ravage Wait lol I noticed that in your explanation of getURLPath() you said that the last element could be edit how???

                cherrys Ah, we have a disciple of the dark arts. If you make the end of the game URL //edit with 2 slashes, it puts you in edit mode. You can then edit the code as you want. Have fun...

                  cherrys Like I said, you can just edit the code as you wish. For example, you can just pop off the code that detects the user being in view mode (if it's not in a library). In fact, poorer implementations don't take //edit into account, and they won't detect you being in edit mode. I'm going to stop here. The rest is for you to find out.

                    i do have to admit i post a lot in just 5 minutes

                    Chat