--[[ RoRelay module for Roblox games · https://rorelay.link/developers Setup: 1. Put this ModuleScript in ServerScriptService. Never in ReplicatedStorage or anywhere players can read it: the API key must stay on the server. 2. Game Settings → Security → turn on "Allow HTTP Requests". 3. Fill in ServerId and ApiKey below (dashboard → Developers → Make a key). Example (a server Script): local RoRelay = require(game.ServerScriptService.RoRelay) game.Players.PlayerAdded:Connect(function(player) local linked = RoRelay.IsLinked(player.UserId) print(player.Name, linked and "is verified in our Fluxer community" or "hasn't verified") end) Every function returns nil plus an error message when something goes wrong, so check the result. The API allows 60 requests a minute per key, of which 20 can be role updates. ]] local HttpService = game:GetService("HttpService") local RoRelay = {} RoRelay.ServerId = "PUT_YOUR_SERVER_ID_HERE" -- the number in rorelay.link/dashboard/ RoRelay.ApiKey = "PUT_YOUR_API_KEY_HERE" -- starts with rr_ RoRelay.BaseUrl = "https://rorelay.link/api/v1" local function request(method, path) local ok, response = pcall(function() return HttpService:RequestAsync({ Url = RoRelay.BaseUrl .. "/guilds/" .. RoRelay.ServerId .. path, Method = method, Headers = { ["Authorization"] = RoRelay.ApiKey }, }) end) if not ok then return nil, tostring(response) end local decoded = nil pcall(function() decoded = HttpService:JSONDecode(response.Body) end) if not response.Success then return nil, (decoded and decoded.message) or ("HTTP " .. tostring(response.StatusCode)) end return decoded end -- Fluxer user IDs (strings) of members of your server who linked this Roblox user. function RoRelay.GetFluxerIds(robloxUserId) local data, err = request("GET", "/roblox/" .. tostring(robloxUserId)) if not data then return nil, err end return data.fluxerIds end -- true if someone in your server linked this Roblox user. function RoRelay.IsLinked(robloxUserId) local ids, err = RoRelay.GetFluxerIds(robloxUserId) if not ids then return nil, err end return #ids > 0 end -- The Roblox account a member uses in your server: { robloxId, username, displayName }, or nil. function RoRelay.GetRobloxAccount(fluxerUserId) local data, err = request("GET", "/fluxer/" .. tostring(fluxerUserId)) if not data then return nil, err end return data.roblox end -- Refresh the Fluxer roles of everyone in your server linked to this Roblox user, -- e.g. right after you promote them in your group. function RoRelay.UpdateRoles(robloxUserId) local data, err = request("POST", "/roblox/" .. tostring(robloxUserId) .. "/update") if not data then return nil, err end return data.updated end return RoRelay