PremiumWrapper is a wrapper module which makes it extremely simplistic to add benefits for premium users.
There is no documentation however, the API is marked with LuaDoc (supported by RobloxLSP) and TSDoc.
Lua:
local PremiumWrapper = require(path.to.pw);
local wrapper = PremiumWrapper.new(); -- Creates connections, returns the wrapper
wrapper:BindOnPremiumJoin(function(player)
print(wrapper:PlayerIsPremium(player)); -- Always true
-- Etc
end)
TypeScript:
import PremiumWrapper from '@rbxts/premium-wrapper';
let wrapper = new PremiumWrapper(); // Creates connections, returns the wrapper
wrapper.BindOnPremiumJoin((player) => {
print(wrapper.PlayerIsPremium(player)) // Always true
// Etc
})
Roblox model:
GitHub releases:
npm (for Roblox-ts users):
npm i @rbxts/premium-wrapper