Categories > Coding > Lua >
[REL] Basic Game Validator
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
Random quote here...
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
Cancel
Post
Im netral, not evil, not too kind either.
Replied
bruh
Content length must be 10-5000 chars
Cancel
Post
https://media.discordapp.net/attachments/1010636204225601659/1012865624797610044/sKQybOLT.gif
Replied
This code is ✨GARBAGE✨ and ✨USELESS✨ by anyone who knows even a little bit of Lua...
Cancel
Post
#Free_Username_R3tr0
Â
Im netral, not evil, not too kind either.
Random quote here...
Im netral, not evil, not too kind either.
Users viewing this thread:
( Members: 0, Guests: 1, Total: 1 )
Cancel
Post