rblx-js v1.1.2
RBLX-JS

About
Rblx-js is a free open-source library made with Roblox APIs, which can be used as an Npm package. Rblx-js consists of multiple functions that can retrieve data for any User, Group, Game, Asset & Badge. The main purpose of creating a Rblx-js is to ease out the use of Roblox APIs. Rblx-js does not require your account information or cookies.
Installation
npm install rblx-jsconst Rblx = require("rblx-js")Documentation
Welcome to the documentation of Rblx-js, all the functions are posted here with a code snippet, description, and example response for extra help. Make sure you use all the commands in an Asynchronous function.
Users
userName()
This function is used to retrieve the user's userName by their ID. Requires userId parameter.
const Data = await Rblx.userName(1877006416)
console.log(Data) JUB0TuserInfo()
This function is used to retrieve the user's information from the Roblox API. The returned data consists of user's displayName, userId, userName and some more values. Requires the userId parameter.
const Data = await Rblx.userInfo(1877006416)
console.log(Data){
description: 'Basar karte hain tere dil main,\n' +
'Asar hai tou shikwa kare kyun?\n' +
'- Talha Yunus\n' +
'Rigby(#)6654',
created: '2020-09-08T15:08:38.22Z',
isBanned: false,
externalAppDisplayName: null,
id: 1877006416,
name: 'JUB0T',
displayName: 'B0T'
}displayName()
This function is used to retrieve the user's displayName by their userId. Requires userId parameter.
const Data = await Rblx.displayName(1877006416)
console.log(Data) B0TuserNameHistory()
This function is used to retrieve the user's previous username(s) from the Roblox API. Requires userId parameter.
const Data = await Rblx.userNameHistory(1877006416)
console.log(Data) []profileInfo()
This function is used to retrieve the user's profile information from the Roblox API. The returned data consists of user's games, userId, username and some more values. Requires userId parameter.
const Data = await Rblx.profileInfo(2871326)
console.log(Data) {
Title: 'Experiences',
Games: [
{
CreatorID: 0,
CreatorName: 'eesh20',
CreatorAbsoluteUrl: 'https://www.roblox.com/users/2871326/profile/',
Plays: 34,
Price: 0,
ProductID: 0,
IsOwned: false,
IsVotingEnabled: true,
TotalUpVotes: 1,
TotalDownVotes: 0,
TotalBought: 0,
UniverseID: 15034089,
HasErrorOcurred: false,
Favorites: 0,
Description: 'Idk',
GameDetailReferralUrl: 'https://www.roblox.com/games/refer?PlaceId=10112976&Position=1&PageType=Profile',
Thumbnail: [Object],
UseDataSrc: false,
IsAsyncThumbnailEnabled: false,
GamePageResources: null,
Name: 'Default Game - 2009',
PlaceID: 10112976,
PlayerCount: 0,
ImageId: 0
}
],userStatus()
This function is used to return the last status set by the user(This feature has been removed from the website). Requires userId parameter.
const Status = await Rblx.userStatus(1877006416)
console.log(Status) Bro What?userRoles()
This function is used to retrieve rank of the user in their group(s). Requires the userId parameter.
const Data = await Rblx.userRoles(2871326)
console.log(Data)[
{
group: { id: 10014757, name: 'JUB0T Studios', memberCount: 10 },
role: { id: 59945479, name: 'Developer', rank: 250 }
},
{
group: { id: 8283990, name: 'Roblox Anubis', memberCount: 39 },
role: { id: 51307898, name: 'ʀᴇꜱᴘᴇᴄᴛᴇᴅ', rank: 75 }
}
]profilePic()
This function is used to retrieve the profile picture url of a user. Requires the userId parameter.
const profilePic = await Rblx.profilePic(2871326)
console.log(profilePic) https://tr.rbxcdn.com/e187ccbd25b2a1f2563916cbe0bfc053/420/420/AvatarHeadshot/PngcanViewInventory()
This function is used to check whether a user's inventory is set to Viewable(Public). Requires the userId parameter.
const Data = await Rblx.canViewInventory(1877006416)
console.log(Data) trueisOnline()
This function is used to see if a user is online, the function may only return a boolean. Requires the userId parameter.
const Data = await Rblx.isOnline(1877006416)
console.log(Data) trueuserFriends()
This function is used to retrieve the list of friends for a user. Requires the userId parameter.
const Data = await Rblx.userFriends(2871326)
console.log(Data)[
{
Id: 2319209858,
Username: 'Aimbotterkr10000',
AvatarUri: 'https://tr.rbxcdn.com/12825df476a9c308ad9f800823fa8f4f/30/30/Avatar/Jpeg',
AvatarFinal: true,
IsOnline: false
},
{
Id: 1329108008,
Username: 'renethis32',
AvatarUri: 'https://tr.rbxcdn.com/8d8a7f0a43a1e0039625dc062214c2d9/30/30/Avatar/Jpeg',
AvatarFinal: true,
IsOnline: false
},
{
Id: 1877006416,
Username: 'JUB0T',
AvatarUri: 'https://tr.rbxcdn.com/10faa3c64eff8559e5c196492cad29d7/30/30/Avatar/Jpeg',
AvatarFinal: true,
IsOnline: false
}
]userByName()
This function is used to get information about a user by name. Requires the userName parameter.
const Data = await Rblx.userByName("jub0t")
console.log(Data){
Id: 1877006416,
Username: 'JUB0T',
AvatarUri: null,
AvatarFinal: false,
IsOnline: false
}avatarInfo()
This function is used to get information about a user's avatar. Requires the userId parameter.
const Data = await Rblx.avatarInfo(2871326)
console.log(Data){
scales: {
height: 0.9,
width: 0.7,
head: 0.95,
depth: 0.85,
proportion: 1,
bodyType: 1
},
playerAvatarType: 'R15',
bodyColors: {
headColorId: 18,
torsoColorId: 18,
rightArmColorId: 18,
leftArmColorId: 18,
rightLegColorId: 18,
leftLegColorId: 18
},
assets: [
{ id: 7699174, name: 'Silly Fun', assetType: [Object] },
{
id: 10922818,
name: 'DGK ghetto hoodie by 1blox',
assetType: [Object]
},
{
id: 49346669,
name: 'Light blue suspender Black checker jeans. TEST',
assetType: [Object]
},
{ id: 2510235063, name: 'Rthro Idle', assetType: [Object] },
{ id: 6555565708, name: 'Royal Blood Beanie', assetType: [Object] }
],
defaultShirtApplied: false,
defaultPantsApplied: false,
emotes: []
}Badges
badgeInfo()
This function is used to get information about a badge from a Roblox game. Requiresthe badgeId parameter.
const Data = await Rblx.badgeInfo(958186367)
console.log(Data){
id: 958186367,
name: 'Most Valuable Player (MVP)',
description: "The rarest badge of them all! Obtain all other badges for this MVP badge. You'll also get an exclusive wheel for any of your vehicles!",
displayName: 'Most Valuable Player (MVP)',
displayDescription: "The rarest badge of them all! Obtain all other badges for this MVP badge. You'll also get an exclusive wheel for any of your vehicles!",
enabled: true,
iconImageId: 958185418,
displayIconImageId: 958185418,
created: '2017-08-03T23:00:42.487-05:00',
updated: '2017-08-03T23:00:42.487-05:00',
statistics: {
pastDayAwardedCount: 381,
awardedCount: 649707,
winRatePercentage: 0.001
},
awardingUniverse: { id: 245662005, name: '💎 TOMB! Jailbreak', rootPlaceId: 606849621 }
}robloxBadges()
This function is used to get the list of RobloxBadges owned by a user. Requiresthe userId parameter.
const Data = await Rblx.robloxBadges(1877006416)
console.log(Data)[
{
id: 2,
name: 'Friendship',
description: 'This badge is given to members who have embraced the Roblox community and have made at least 20 friends. People who have this badge are good people to know and can probably help you out if you are having trouble.',
imageUrl: 'https://images.rbxcdn.com/5eb20917cf530583e2641c0e1f7ba95e.png'
},
{
id: 6,
name: 'Homestead',
description: 'The homestead badge is earned by having your personal place visited 100 times. People who achieve this have demonstrated their ability to build cool things that other Robloxians were interested enough in to check out. Get a jump-start on earning this reward by inviting people to come visit your place.',
imageUrl: 'https://images.rbxcdn.com/b66bc601e2256546c5dd6188fce7a8d1.png'
}
]Games
gameThumbnail()
This function is used to get a thumbnailUrl from a Roblox game. Requiresthe gameId parameter.
const Data = await Rblx.gameThumbnail(606849621)
console.log(Data) https://t4.rbxcdn.com/df8b01bd786410f4c8fab77b7bb620e8gameIcon()
This function is used to get the Icon from a Roblox game. Requiresthe gameId parameter.
const Data = await Rblx.gameIcon(6872265039)
console.log(Data) https://t6.rbxcdn.com/b2ee43c451e69b7e82be48d8aeb8e1a9gameInfo()
This function is used to get information about a Roblox game. Requiresthe gameId parameter.
const Data = await Rblx.gameInfo(6872265039)
console.log(Data){
id: 6872265039,
name: 'BedWars 🛌🏹 [ARCHER KIT!]',
url: 'https://www.roblox.com/games/6872265039/BedWars-ARCHER-KIT',
thumbnailFinal: true,
thumbnailUrl: 'https://t6.rbxcdn.com/b2ee43c451e69b7e82be48d8aeb8e1a9',
bcOverlayUrl: null,
limitedOverlayUrl: null,
deadlineOverlayUrl: null,
limitedAltText: null,
newOverlayUrl: null,
imageSize: 'large',
saleOverlayUrl: null,
iosOverlayUrl: null,
transparentBackground: false
}Groups
groupInfo()
This function is used to get information about a group. Requiresthe groupId parameter.
const Data = await Rblx.groupInfo(10014757)
console.log(Data) {
id: 10014757,
name: 'JUB0T Studios',
description: 'Development Group\n\nCopyright © 2021',
owner: { id: 1877006416, type: 'User' },
created: '2021-03-17T15:21:42.113Z'
}groupUsers()
This function is used to get list of the users in a Roblox group. Requiresthe groupId parameter.
const Status = await Rblx.groupUsers(10014757)
console.log(Status)[
{
user: {
buildersClubMembershipType: 'None',
userId: 1877006416,
username: 'JUB0T',
displayName: 'B0T'
},
role: { id: 59945478, name: 'Lead Dev', rank: 255 }
},
{
user: {
buildersClubMembershipType: 'None',
userId: 2871326,
username: 'eesh20',
displayName: 'Jareer'
},
role: { id: 59945479, name: 'Developer', rank: 250 }
},
]primaryGroup()
This function is used to get the information about the Primary group of a user. Requiresthe userId parameter.
const Data = await Rblx.primaryGroup(1877006416)
console.log(Data){
group: {
id: 10014757,
name: 'JUB0T Studios',
description: 'Development Group\n\nCopyright © 2021',
owner: {
buildersClubMembershipType: 'None',
userId: 1877006416,
username: 'JUB0T',
displayName: 'B0T'
},
shout: null,
isBuildersClubOnly: false,
publicEntryAllowed: true
},
role: { id: 59945478, name: 'Lead Dev', rank: 255 }
}groupIcon()
This function is used to get Icon of a Roblox group. Requiresthe groupId parameter.
const Data = await Rblx.groupIcon(10014757)
console.log(Data) https://t4.rbxcdn.com/d056495e16c8492db266df07a8d82e32groupIdByName()
This function is used to a groupId by its name. Requires groupId parameter.
const Data = await Rblx.groupIdByName("Badimo")
console.log(Data) 3059674Assets
assetInfo()
This function is used information about an asset from the Roblox Catalog. Requiresthe assetId parameter.
const Data = await Rblx.assetInfo(6211939438)
console.log(Data){
id: 6211939438,
name: 'Loose Black Anime Side Buns',
url: 'https://www.roblox.com/catalog/6211939438/Loose-Black-Anime-Side-Buns',
'thumbnailUrl:': 'https://tr.rbxcdn.com/b2c1f8853e6e149bc6e69828e1ac1d28/420/420/Hat/Png'
}assetIcon()
This function is used to get the icon of an asset. Requiresthe assetId parameter.
const IconUrl = await Rblx.assetIcon(6211939438)
console.log(IconUrl) https://tr.rbxcdn.com/6074c840ea6b17e70d3078d88ec4e452/768/432/Hat/PnggamepassIcon()
This function is used to get the icon of a gamepass. Requiresthe gamepassId parameter.
const Data = await Rblx.gamepassIcon(2070427)
console.log(Data) https://t7.rbxcdn.com/74873c4b0de3d2e6e88081ed8c139563canManageAsset()
This function is used to check if the user can manage the specified asset. Requires the userId & assetId parameter.
const Data = await Rblx.canManageAsset(1877006416, 6974738390)
console.log(Data) trueassetOwnership()
This function is used to check if a user owns an assets. Requires the userId & assetId parameter.
const Data = await Rblx.assetOwnership(1877006416, 3814476174)
console.log(Data) trueassetFavorites()
This function is used to get the ammount of favorites an asset has. Requires the userId & assetId parameter.
const Data = await Rblx.assetFavorites(5461550398)
console.log(Data) 44573License
MIT License Copyright (c) 2021 Jareer
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.