local Rayfield = loadstring(game:HttpGet('https://[Log in to view URL]'))()
-- Configurations
local Config = {
Name = "Rodan Hub|@RodanHub = Youtube",
Icon = 110387052435330,
LoadingTitle = "Rodan Hub",
LoadingSubtitle = "by @RodanHubonYT",
Theme = "Default",
DisableRayfieldPrompts = false,
DisableBuildWarnings = false,
ConfigFolder = "RodanHub",
DiscordInvite = "PfazPQfc",
KeySettings = {
Title = "Rodan Hub",
Subtitle = "Key System",
Note = "Get Key By Joining Discord | YT=@RodanHubonYT",
FileName = "RodanHubKey_" .. game.Players.LocalPlayer.Name,
SaveKey = true,
GrabKeyFromSite = true, -- Uses a remote server for the key
KeyURL = "https://[Log in to view URL]", -- URL to fetch new keys
ExpireDays = 3 -- Keys expire every 3 days
}
}
-- Helper function to fetch a key
local function fetchKey()
local success, key = pcall(function()
return game:HttpGet(Config.KeySettings.KeyURL)
end)
if success and key then
return key
else
warn("Failed to fetch key: " .. tostring(key))
return nil
end
end
-- Helper function to save the key locally
local function saveKey(key)
writefile(Config.KeySettings.FileName, key)
end
-- Helper function to load and check the key
local function loadKey()
if isfile(Config.KeySettings.FileName) then
local keyData = readfile(Config.KeySettings.FileName)
local key, timestamp = unpack(string.split(keyData, "|"))
if os.time() - tonumber(timestamp) < Config.KeySettings.ExpireDays * 86400 then
return key
else
return nil -- Key expired
end
else
return nil -- Key not found
end
end
-- Load the key or fetch a new one if expired
local currentKey = loadKey()
if not currentKey then
local newKey = fetchKey()
if newKey then
saveKey(newKey .. "|" .. os.time())
currentKey = newKey
else
error("Failed to retrieve a valid key.")
end
end
-- Create Window
local Window = Rayfield:CreateWindow({
Name = Config.Name,
Icon = Config.Icon,
LoadingTitle = Config.LoadingTitle,
LoadingSubtitle = Config.LoadingSubtitle,
Theme = Config.Theme,
DisableRayfieldPrompts = Config.DisableRayfieldPrompts,
DisableBuildWarnings = Config.DisableBuildWarnings,
ConfigurationSaving = {
Enabled = true,
FolderName = Config.ConfigFolder,
FileName = Config.KeySettings.FileName
},
Discord = {
Enabled = true,
Invite = Config.DiscordInvite,
RememberJoins = true
},
KeySystem = true,
KeySettings = Config.KeySettings
})
To embed this project on your website, copy the following code and paste it into your website's HTML: