Categories > Coding > Lua >

[REL] Basic Game Validator

Posts: 1990

Threads: 198

Joined: Apr, 2021

Reputation: 13

Posted

Hello!

Another thread time! This time I will explain a bit about game validating. Even wondering why sometimes some scripts are kicking you from the game because you're in the wrong game, or wondering how to do that? This is very easy and simple, just like this thread to understand!

 

So first of all what would you like to do is get a ROBLOX's game ID. You can do this by going to any ROBLOX's game site and copy the numbers. I'll get Prison Life's ID for example. This is the entire link for Prison Life. What do we want to grab are the numbers. Prison Life's ID is 155615604. Example:

 

www.roblox.com/games/155615604/Prison-Life-Cars-fixed

                                        ^^^^^^^^

                                           GAMEID

 

This exists in every's ROBLOX game and it cannot be changed unless you make a new game. So after getting it, you make a simple if code. If you're too lazy to guess it or write it, there it is.

if(game.PlaceId == 155615604) then
   -- The 155615604 is the ID of the game
end

 

After you've done that, you can be happy of your first achievement. But how to kick the player if the ID is incorrect? Well, you have to add a local for the player. Example:

local player = game.Players.LocalPlayer

 

Great! So the kick script is actually just like a string of a print. (Yeah maybe not great explanation for this.) So you can use the player:Kick() code to kick the player. Code:

local player = game.Players.LocalPlayer

player:Kick("Too noob to play!")

 

And great! You just made the game validator code! If you wonder how it should look fully complete, then there is the code.

local player = game.Players.LocalPlayer

if(game.PlaceId == 155615604) then
      print("Do nothing than print into the console - click F9 to see the output")
      -- You can also add other code here
else
      player:Kick("Invalid PlaceId!")
end

-- Put this code in your script or exploit to check if it works!

 

Thank you for reading!
- Aja

 

  • 0

Random quote here...

Posts: 194

Threads: 10

Joined: Feb, 2021

Reputation: 9

Replied

this prob works and more readable i think?

local gamelist = {
    ["Arsenal"] = "gameidyes",
    ["MM2"] = "gameidyes"
}

if (game.PlaceId == gamelist["Arsenal"]) then
    --arsenal
end

if (game.PlaceId == gamelist["MM2"]) then
    --mm2
end
  • 0

Im netral, not evil, not too kind either.

eb_

Formally known as Shade

vip

Posts: 1045

Threads: 5

Joined: Jun, 2020

Reputation: 44

Replied

bruh 

 

 

 

 

Content length must be 10-5000 chars

 

  • 0

https://media.discordapp.net/attachments/1010636204225601659/1012865624797610044/sKQybOLT.gif

friknob

R3tr0

Posts: 42

Threads: 2

Joined: Aug, 2021

Reputation: 0

Replied

This code is ✨GARBAGE✨ and ✨USELESS✨ by anyone who knows even a little bit of Lua...

  • 0

Added

@OrbitRBX This code is ok...

  • 0

#Free_Username_R3tr0

 

Posts: 194

Threads: 10

Joined: Feb, 2021

Reputation: 9

Replied

@friknob oke lol

  • 0

Im netral, not evil, not too kind either.

Posts: 1990

Threads: 198

Joined: Apr, 2021

Reputation: 13

Replied

@OrbitRBX there are different methods and I've selected this one.

  • 0

Added

@friknob why being so rude?

  • 0

Random quote here...

Posts: 194

Threads: 10

Joined: Feb, 2021

Reputation: 9

Replied

  • 0

Im netral, not evil, not too kind either.

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )