Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (Module is here: ' https://www.roblox.com/catalog/993003470/redirect ' )
- --[[-- Developer API --]]--
- --[[
- Welcome, you will here learn how to use my developer API Module for your own game!
- General information :
- ----------------------
- This is for developers who want to save their data to a server,
- or for developers who need to access the roblox' api.
- (Don't worry if you need it because of both of dem' reasons, it's still there for you ;))
- If you need this, then this is the perfect choice for you!
- Security is really important for everyone, that's why I am securing your information by encrypting it.
- I want to make you feel comfortable making your choice if you want this or not,
- that's why I can guarantee all your data is saved within the second. Almost as fast as you can say "Hey".
- With easy set-up and instructions for this Developer API Module, you can set this service up within 1 minute.
- If you use this for saving your data then as a non-premium member, you can still save in up to 15 places, with unlimited space.
- Donations though, are appreciated.
- Premium membership only 50 Robux each 2 months, and you can pre order for as long time as you need or want to.
- The prices will in the future be increased.
- Premium benefits:
- -Even more secure
- -Backups
- -Priority saving, save faster
- -Unlimited places
- -Unlimited space
- ---
- As non-premium member, you get:
- -Save in up to 15 places
- -Save fast
- --]]
- --[[-- SETTING UP --]]--
- --[[
- Alright, so the first thing we are going to do is requiring the module.
- This is done by doing "local devAPI = require(993003470)"
- The script will now look like this:
- --]]
- ---
- local devAPI = require(993003470)
- ---
- --[[
- If this is your first time in that place of yours, then it's time to Initiate it so the server can make space for your
- data.
- To do this do:
- devAPI:Initiate()
- (If you haven't already, open your Output window) Now look in the 'Output' window. It will give you
- your username and password, and if you're a premium member, your backup key.
- In your script add variables for these keys. They are essential to get access to your data.
- THE USERNAME AND PASSWORD WILL ONLY BE PRINTED OUT ONCE, REMEMBER TO STORE THEM SO YOU DON'T LOSE THEM!
- Now, your script should look somehow like this:
- --]]
- local devAPI = require(993003470)
- local Username = "xxxxxx";
- local Password = "xxxxxxxxxxxxxxx";
- --[[
- Great, you have now put the login information to your script.
- Now you are done setting up your own data saver.
- Below here, I will drop examples of how to use.
- Note that you don't need username and password for accessing the Roblox API
- --]]
- --[[-- Saving data --]]--
- local devAPI = require(993003470);
- local username = "xxxxxx";
- local password = "xxxxxxxxxxxxxx";
- local YOUR_TABLE = {}
- YOUR_TABLE["NAME"] = "SWORD"
- YOUR_TABLE["PRICE"] = 666
- local saveData = devAPI:SaveAsync(username, password, YOUR_TABLE)
- --Now the module encodes your data and sends to the server.
- --Returns a table with "status" and "info"
- print("Status: " , saveData["status"]);
- print("Info: ", saveData["info"]);
- --[[-- Getting data --]]--
- local devAPI = require(993003470);
- local username = "xxxxxx";
- local password = "xxxxxxxxxxxxxx";
- local fetchData = devAPI:GetAsync(username, password);
- --Returns atable with "status", "info" and "data"
- print("Status: ", fetchData["status"])
- if (fetchData["status"] == "success") then
- print("Data : ", fetchData["data"])
- local data = fetchData["data"]
- print(data.PRICE)
- --Continue here
- elseif fetchData["status"] == "error" then
- print("Info : ", fetchData["info"])
- end
- --[[-- Getting group information --]]--
- local devAPI = require(993003470);
- local username = "xxxxxx";
- local password = "xxxxxxxxxxxxxx";
- local groupInfo = devAPI:GroupInfo("2", true, "Name") --Requires 1 argument. 2 optional 1) Return the table with or without decoding it | 2) Name of what they want to return (i.e "Name" will return the group name) . Example: GroupInfo(id, true, "Name")
- print(groupInfo)
- --> LOL
- --[[-- Checking if two users are friends --]]--
- local devAPI = require(993003470);
- local username = "xxxxxx";
- local password = "xxxxxxxxxxxxxx";
- local isFriends = devAPI:IsFriends("1", "1") -- Requires 2 arguments, the user id of the 2 users as string.
- print(isFriends)
- --> TRUE
- --[[-- Getting the name from the user id --]]--
- local devAPI = require(993003470);
- local username = "xxxxxx";
- local password = "xxxxxxxxxxxxxx";
- local userName = devAPI:GetNameFromID("18442032", true); --Requires 1 argument. 1 optional 1) If you want it to just print the username instead of a table
- print(userName)
- --> Kekulator
- --[[-- Getting the id from the username --]]
- local devAPI = require(993003470);
- local username = "xxxxxx";
- local password = "xxxxxxxxxxxxxx";
- local userID = devAPI:GetIDFromName("Kekulator", true) -- Requires 1 argument. 1 optional 1) If you want it to just print the username instead of a table
- print(userID)
- --> 18442032
Add Comment
Please, Sign In to add comment