Luauberries - libraries for luau and roblox

luauberries logo

SourceDocs

Notable libraries:

  • text chat - utility library for working with TextChatService and its annoying quirks in behavior
  • retryer - a nice easy to use library for retrying functions
  • pagesutil - roblox pages utility, with an easy to use iterator function for pages instances
  • safe teleport - a typed version of roblox’s safe teleport function from the TeleportService docs
  • grouper - a module for getting accurate group ranks for players on the server, and detecting rank changes
  • character - a simple utility module for getting more accurate character types with character added and character removing

If you have any questions, feel free to throw a message in this thread. Or alternatively join the roblox open source community discord and find the luauberries thread in the projects channel!

30 Likes

The safe teleport will be very useful for me, thank you for this resource

2 Likes

v1.4.0

Added libraries:

  • linked list - a luau doubly-linked list implementation
  • character - This is replacing safe_character_added, as a general use for getting better types with CharacterAdded and CharacterRemoving. Just replace uses of safe_character_added with character.added()

Changes:

  • ratelimit - simplified api, with merging keyed and keyless ratelimits into one unified ratelimit object
  • playerzone - Fixed issue of PlayerRemoving becoming connected to each time a player joins, and improved character types.
  • retryer - Added example in README for the infinite retry functions
  • Addded @checked annotations to every module where necessary

Full Changelog: Comparing v1.3.0...v1.4.0 · kalrnlo/rbxlibs · GitHub

1 Like

Working on adding docs, no new docs added but hey theres a nice new site!
after me having to fight w github not accepting the dns for like 8 hours…

Docs update!

More libs have been documented, with more docs coming soon!

New docs

  • Leventine - A fast levenstein distance library for luau
  • Url - A small utility, with basic functions handling url querys, and encoding/decoding urls
  • Is Empty - Checks if a given table is empty

Updated docs

  • Retryer - A utility for easily retrying functions
  • Race - Runs several functions at once, and returns the result of the function that completes first

also uhm shouldve mentioned but the url docs has a nice example for getting data out of the launchdata url player:GetJoinData() returns

Fixed url for pages, also pages now has docs and has been renamed to pages util

Small update!

Not going to be publishing a release yet, as I’m holding off until I finish adding docs for every library and get done with adding tests for librarys that can have tests run in lune

Tests Added

  • Leventine
  • Ratelimit
  • Race
  • Url
  • Is-Empty

Changes

  • Updated ratelimit to not have a count property anymore, and it instead just uses a constant key the count_map

New docs

  • Character - Utility for getting better types with player characters in roblox
  • Pages Util - Utility for dealing with roblox pages instances easily
  • Ratelimit - Object for handling ratelimits intuitively

Updated docs

  • Url - Fixed a bug in example code
1 Like

Added docs for text chat and safe teleport

1 Like

Added docs to player zone Player Zone | rbxlibs

2 Likes

Added exponential backoff to retryer

v2.0.0

v2 has now been released,
with docs updated for grouper,
and new ways to install with prebuilt rbxms on releases for more info check out the installing section on the docs

Release v2.0.0 · kalrnlo/rbxlibs (github.com)

1 Like

v2.1.0

Mainly just a patch to fix some issues with release generation, such as the rbxms being generated using string requires as roblox still currently doesn’t support string requires.

So for any of ya’ll who use studio just find the zip file for the library you want to download in the assets section on the release page, and then unzip it and insert the rbxm included into studio. Although some require other libs such as playerzone (it requires character) so you’re also going to need to download character in that case

Release v2.1.0 · kalrnlo/rbxlibs (github.com)

Small update

figured id post an update given that ive added 2 new libraries today, but anywho been working on a datastore wrapper for awhile now but its almost done. So should be out with a v3 release soon™

Added libraries

  • connector - Utility for handling event callbacks
  • cross - Utility for dealing with cross runtime shenanigans, covering the bear necessities

Better releases

Been a bit, but releases are now done for every library separately rather than one big release.

Improvements

  • Every release for libraries that have dependencies, now include files that include those dependencies so you don’t have to download them seperately! Just look for -deps at the end of file names.
  • Fixed requires in rbxms for libraries that have a /init dir for their source code

Renamed to luauberries because rbxlibs wasn’t that fitting anymore, considering majority of the libraries are more for general luau stuff.

Update 31/08/2024

Going to be using this sorta format for updates now, as I’m no longer doing “all-library” releases and each library will have its own seperate releases.

Added

  • Rbx Safe Conn - Library that connects to events, where you’d want to probably also iterate over an array and call the same callback on every array item

Changed

  • Ratelimit - Uses cross now so it should now properly work cross runtime, and also ratelimit objects are now frozen

Update 15/09/2024

Added

  • Rbx Deeplink - Small utility with basic functions for dealing with roblox deeplinks

Changed

  • Url - removed the silly requirement of specifiying what spaces are encoded as for decoding (what was i thinking originally)

new url, changed username

also should be finally releasing a loganalytics update, with a pre release branch that allows you to get full types for custom events with a new class, although the pre release requires enabling the new solver and the type function FFlags

{
    FFlagLuauUserDefinedTypeFunctionsSyntax2: true,
    FFlagLuauUserDefinedTypeFunctions2: true,
}
1 Like

Added Badger

A BadgeService wrapper that fully handles ratelimiting badge ownership checks, batching checks into tables that areng longer than 10 indexes, and has an arguably nicer API compared to BadgeService.

local Players = game:GetService("Players")
--[[
wrapper around a remote the client fires to the server 
when it loads in, helps not have issues 
w the server clogging up the remote queue for the player,
and also helps w award as BadgeService:AwardBadge() will always fail 
until the players ui loads in,
because it has to display the awarded notification
--]]
local player_loaded = require("@player_loaded")
local badger = require("@badger")

local WELCOME_BADGE = badger(0)

player_loaded.on(function(player)
     badger.award(player, WELCOME_BADGE)
end)