Created
December 23, 2025 01:39
-
-
Save ryzen885/cabf9b12aef9ba7cb1f8aec6611e96fe to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local Window = Rayfield:CreateWindow({ | |
| Name = "Rayfield Example Window", | |
| Icon = 0, -- Icon in Topbar. Can use Lucide Icons (string) or Roblox Image (number). 0 to use no icon (default). | |
| LoadingTitle = "Rayfield Interface Suite", | |
| LoadingSubtitle = "by Sirius", | |
| Theme = "Default", -- Check https://docs.sirius.menu/rayfield/configuration/themes | |
| ToggleUIKeybind = "K", -- The keybind to toggle the UI visibility (string like "K" or Enum.KeyCode) | |
| DisableRayfieldPrompts = false, | |
| DisableBuildWarnings = false, -- Prevents Rayfield from warning when the script has a version mismatch with the interface | |
| ConfigurationSaving = { | |
| Enabled = true, | |
| FolderName = nil, -- Create a custom folder for your hub/game | |
| FileName = "Big Hub" | |
| }, | |
| Discord = { | |
| Enabled = true, -- Prompt the user to join your Discord server if their executor supports it | |
| Invite = "discord.gg/nvvVbgTjcf", -- The Discord invite code, do not include discord.gg/. E.g. discord.gg/ ABCD would be ABCD | |
| RememberJoins = true -- Set this to false to make them join the discord every time they load it up | |
| }, | |
| KeySystem = true, -- Set this to true to use our key system | |
| KeySettings = { | |
| Title = "Silly", | |
| Subtitle = "Silly Key System", | |
| Note = "Join our Discord Server for the key", -- Use this to tell the user how to get a key | |
| FileName = "SillyKey", -- It is recommended to use something unique as other scripts using Rayfield may overwrite your key file | |
| SaveKey = true, -- The user's key will be saved, but if you change the key, they will be unable to use your script | |
| GrabKeyFromSite = false, -- If this is true, set Key below to the RAW site you would like Rayfield to get the key from | |
| Key = {"1234"} -- List of keys that will be accepted by the system, can be RAW file links (pastebin, github etc) or simple strings ("hello","key22") | |
| } | |
| }) | |
| wait(1) | |
| Rayfield:Destroy() | |
| getgenv().GG = { | |
| Language = { | |
| CheckboxEnabled = "Enabled", | |
| CheckboxDisabled = "Disabled", | |
| SliderValue = "Value", | |
| DropdownSelect = "Select", | |
| DropdownNone = "None", | |
| DropdownSelected = "Selected", | |
| ButtonClick = "Click", | |
| TextboxEnter = "Enter", | |
| ModuleEnabled = "Enabled", | |
| ModuleDisabled = "Disabled", | |
| TabGeneral = "General", | |
| TabSettings = "Settings", | |
| Loading = "Loading...", | |
| Error = "Error", | |
| Success = "Success" | |
| } | |
| } | |
| -- Replace the SelectedLanguage with a reference to GG.Language | |
| local SelectedLanguage = GG.Language | |
| function convertStringToTable(inputString) | |
| local result = {} | |
| for value in string.gmatch(inputString, "([^,]+)") do | |
| local trimmedValue = value:match("^%s*(.-)%s*$") | |
| tablein(result, trimmedValue) | |
| end | |
| return result | |
| end | |
| function convertTableToString(inputTable) | |
| return table.concat(inputTable, ", ") | |
| end | |
| local UserInputService = cloneref(game:GetService('UserInputService')) | |
| local ContentProvider = cloneref(game:GetService('ContentProvider')) | |
| local TweenService = cloneref(game:GetService('TweenService')) | |
| local HttpService = cloneref(game:GetService('HttpService')) | |
| local TextService = cloneref(game:GetService('TextService')) | |
| local RunService = cloneref(game:GetService('RunService')) | |
| local Lighting = cloneref(game:GetService('Lighting')) | |
| local Players = cloneref(game:GetService('Players')) | |
| local CoreGui = cloneref(game:GetService('CoreGui')) | |
| local Debris = cloneref(game:GetService('Debris')) | |
| local mouse = Players.LocalPlayer:GetMouse() | |
| local Silly = CoreGui:FindFirstChild('Silly') | |
| if Silly then | |
| Debris:AddItem(Silly, 0) | |
| end | |
| if not isfolder("Silly") then | |
| makefolder("Silly") | |
| end | |
| local Connections = setmetatable({ | |
| disconnect = function(self, connection) | |
| if not self[connection] then | |
| return | |
| end | |
| self[connection]:Disconnect() | |
| self[connection] = nil | |
| end, | |
| disconnect_all = function(self) | |
| for _, value in self do | |
| if typeof(value) == 'function' then | |
| continue | |
| end | |
| value:Disconnect() | |
| end | |
| end | |
| }, Connections) | |
| local Util = setmetatable({ | |
| map = function(self: any, value: number, in_minimum: number, in_maximum: number, out_minimum: number, out_maximum: number) | |
| return (value - in_minimum) * (out_maximum - out_minimum) / (in_maximum - in_minimum) + out_minimum | |
| end, | |
| viewport_point_to_world = function(self: any, location: any, distance: number) | |
| local unit_ray = workspace.CurrentCamera:ScreenPointToRay(location.X, location.Y) | |
| return unit_ray.Origin + unit_ray.Direction * distance | |
| end, | |
| get_offset = function(self: any) | |
| local viewport_size_Y = workspace.CurrentCamera.ViewportSize.Y | |
| return self:map(viewport_size_Y, 0, 2560, 8, 56) | |
| end | |
| }, Util) | |
| local AcrylicBlur = {} | |
| AcrylicBlur.__index = AcrylicBlur | |
| function AcrylicBlur.new(object: GuiObject) | |
| local self = setmetatable({ | |
| _object = object, | |
| _folder = nil, | |
| _frame = nil, | |
| _root = nil | |
| }, AcrylicBlur) | |
| self:setup() | |
| return self | |
| end | |
| function AcrylicBlur:create_folder() | |
| local old_folder = workspace.CurrentCamera:FindFirstChild('AcrylicBlur') | |
| if old_folder then | |
| Debris:AddItem(old_folder, 0) | |
| end | |
| local folder = Instance.new('Folder') | |
| folder.Name = 'AcrylicBlur' | |
| folder.Parent = workspace.CurrentCamera | |
| self._folder = folder | |
| end | |
| function AcrylicBlur:create_depth_of_fields() | |
| local depth_of_fields = Lighting:FindFirstChild('AcrylicBlur') or Instance.new('DepthOfFieldEffect') | |
| depth_of_fields.FarIntensity = 0 | |
| depth_of_fields.FocusDistance = 0.05 | |
| depth_of_fields.InFocusRadius = 0.1 | |
| depth_of_fields.NearIntensity = 1 | |
| depth_of_fields.Name = 'AcrylicBlur' | |
| depth_of_fields.Parent = Lighting | |
| for _, object in Lighting:GetChildren() do | |
| if not object:IsA('DepthOfFieldEffect') then | |
| continue | |
| end | |
| if object == depth_of_fields then | |
| continue | |
| end | |
| Connections[object] = object:GetPropertyChangedSignal('FarIntensity'):Connect(function() | |
| object.FarIntensity = 0 | |
| end) | |
| object.FarIntensity = 0 | |
| end | |
| end | |
| function AcrylicBlur:create_frame() | |
| local frame = Instance.new('Frame') | |
| frame.Size = UDim2.new(1, 0, 1, 0) | |
| frame.Position = UDim2.new(0.5, 0, 0.5, 0) | |
| frame.AnchorPoint = Vector2.new(0.5, 0.5) | |
| frame.BackgroundTransparency = 1 | |
| frame.Parent = self._object | |
| self._frame = frame | |
| end | |
| function AcrylicBlur:create_root() | |
| local part = Instance.new('Part') | |
| part.Name = 'Root' | |
| part.Color = Color3.new(0, 0, 0) | |
| part.Material = Enum.Material.Glass | |
| part.Size = Vector3.new(1, 1, 0) -- Use a thin part | |
| part.Anchored = true | |
| part.CanCollide = false | |
| part.CanQuery = false | |
| part.Locked = true | |
| part.CastShadow = false | |
| part.Transparency = 0.98 | |
| part.Parent = self._folder | |
| -- Create a SpecialMesh to simulate the acrylic blur effect | |
| local specialMesh = Instance.new('SpecialMesh') | |
| specialMesh.MeshType = Enum.MeshType.Brick -- Use Brick mesh or another type suitable for the effect | |
| specialMesh.Offset = Vector3.new(0, 0, -0.000001) -- Small offset to prevent z-fighting | |
| specialMesh.Parent = part | |
| self._root = part -- Store the part as root | |
| end | |
| function AcrylicBlur:setup() | |
| self:create_depth_of_fields() | |
| self:create_folder() | |
| self:create_root() | |
| self:create_frame() | |
| self:render(0.001) | |
| self:check_quality_level() | |
| end | |
| function AcrylicBlur:render(distance: number) | |
| local positions = { | |
| top_left = Vector2.new(), | |
| top_right = Vector2.new(), | |
| bottom_right = Vector2.new(), | |
| } | |
| local function update_positions(size: any, position: any) | |
| positions.top_left = position | |
| positions.top_right = position + Vector2.new(size.X, 0) | |
| positions.bottom_right = position + size | |
| end | |
| local function update() | |
| local top_left = positions.top_left | |
| local top_right = positions.top_right | |
| local bottom_right = positions.bottom_right | |
| local top_left3D = Util:viewport_point_to_world(top_left, distance) | |
| local top_right3D = Util:viewport_point_to_world(top_right, distance) | |
| local bottom_right3D = Util:viewport_point_to_world(bottom_right, distance) | |
| local width = (top_right3D - top_left3D).Magnitude | |
| local height = (top_right3D - bottom_right3D).Magnitude | |
| if not self._root then | |
| return | |
| end | |
| self._root.CFrame = CFrame.fromMatrix((top_left3D + bottom_right3D) / 2, workspace.CurrentCamera.CFrame.XVector, workspace.CurrentCamera.CFrame.YVector, workspace.CurrentCamera.CFrame.ZVector) | |
| self._root.Mesh.Scale = Vector3.new(width, height, 0) | |
| end | |
| local function on_change() | |
| local offset = Util:get_offset() | |
| local size = self._frame.AbsoluteSize - Vector2.new(offset, offset) | |
| local position = self._frame.AbsolutePosition + Vector2.new(offset / 2, offset / 2) | |
| update_positions(size, position) | |
| task.spawn(update) | |
| end | |
| Connections['cframe_update'] = workspace.CurrentCamera:GetPropertyChangedSignal('CFrame'):Connect(update) | |
| Connections['viewport_size_update'] = workspace.CurrentCamera:GetPropertyChangedSignal('ViewportSize'):Connect(update) | |
| Connections['field_of_view_update'] = workspace.CurrentCamera:GetPropertyChangedSignal('FieldOfView'):Connect(update) | |
| Connections['frame_absolute_position'] = self._frame:GetPropertyChangedSignal('AbsolutePosition'):Connect(on_change) | |
| Connections['frame_absolute_size'] = self._frame:GetPropertyChangedSignal('AbsoluteSize'):Connect(on_change) | |
| task.spawn(update) | |
| end | |
| function AcrylicBlur:check_quality_level() | |
| local game_settings = UserSettings().GameSettings | |
| local quality_level = game_settings.SavedQualityLevel.Value | |
| if quality_level < 8 then | |
| self:change_visiblity(false) | |
| end | |
| Connections['quality_level'] = game_settings:GetPropertyChangedSignal('SavedQualityLevel'):Connect(function() | |
| local game_settings = UserSettings().GameSettings | |
| local quality_level = game_settings.SavedQualityLevel.Value | |
| self:change_visiblity(quality_level >= 8) | |
| end) | |
| end | |
| function AcrylicBlur:change_visiblity(state: boolean) | |
| self._root.Transparency = state and 0.98 or 1 | |
| end | |
| local Config = setmetatable({ | |
| save = function(self: any, file_name: any, config: any) | |
| local success_save, result = pcall(function() | |
| local flags = HttpService:JSONEncode(config) | |
| writefile('Silly/'..file_name..'.json', flags) | |
| end) | |
| if not success_save then | |
| warn('failed to save config', result) | |
| end | |
| end, | |
| load = function(self: any, file_name: any, config: any) | |
| local success_load, result = pcall(function() | |
| if not isfile('Silly/'..file_name..'.json') then | |
| self:save(file_name, config) | |
| return | |
| end | |
| local flags = readfile('Silly/'..file_name..'.json') | |
| if not flags then | |
| self:save(file_name, config) | |
| return | |
| end | |
| return HttpService:JSONDecode(flags) | |
| end) | |
| if not success_load then | |
| warn('failed to load config', result) | |
| end | |
| if not result then | |
| result = { | |
| _flags = {}, | |
| _keybinds = {}, | |
| _library = {} | |
| } | |
| end | |
| return result | |
| end | |
| }, Config) | |
| local Library = { | |
| _config = Config:load(game.GameId), | |
| _choosing_keybind = false, | |
| _device = nil, | |
| _ui_open = true, | |
| _ui_scale = 1, | |
| _ui_loaded = false, | |
| _ui = nil, | |
| _dragging = false, | |
| _drag_start = nil, | |
| _container_position = nil | |
| } | |
| Library.__index = Library | |
| function Library.new() | |
| local self = setmetatable({ | |
| _loaded = false, | |
| _tab = 0, | |
| }, Library) | |
| self:create_ui() | |
| return self | |
| end | |
| -- Create Notification Container | |
| local NotificationContainer = Instance.new("Frame") | |
| NotificationContainer.Name = "RobloxCoreGuis" | |
| NotificationContainer.Size = UDim2.new(0, 300, 0, 0) -- Fixed width (300px), dynamic height (Y) | |
| NotificationContainer.Position = UDim2.new(0.8, 0, 0, 10) -- Right side, offset by 10 from top | |
| NotificationContainer.BackgroundTransparency = 1 | |
| NotificationContainer.ClipsDescendants = false; | |
| NotificationContainer.Parent = game:GetService("CoreGui").RobloxGui:FindFirstChild("RobloxCoreGuis") or Instance.new("ScreenGui", game:GetService("CoreGui").RobloxGui) | |
| NotificationContainer.AutomaticSize = Enum.AutomaticSize.Y | |
| -- UIListLayout to arrange notifications vertically | |
| local UIListLayout = Instance.new("UIListLayout") | |
| UIListLayout.FillDirection = Enum.FillDirection.Vertical | |
| UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder | |
| UIListLayout.Padding = UDim.new(0, 10) | |
| UIListLayout.Parent = NotificationContainer | |
| -- Function to create notifications | |
| function Library.SendNotification(settings) | |
| -- Create the notification frame (this will be managed by UIListLayout) | |
| local Notification = Instance.new("Frame") | |
| Notification.Size = UDim2.new(1, 0, 0, 60) -- Width = 100% of NotificationContainer's width, dynamic height (Y) | |
| Notification.BackgroundTransparency = 1 -- Outer frame is transparent for layout to work | |
| Notification.BorderSizePixel = 0 | |
| Notification.Name = "Notification" | |
| Notification.Parent = NotificationContainer -- Parent it to your NotificationContainer (the parent of the list layout) | |
| Notification.AutomaticSize = Enum.AutomaticSize.Y -- Allow this frame to resize based on child height | |
| -- Add rounded corners to outer frame | |
| local UICorner = Instance.new("UICorner") | |
| UICorner.CornerRadius = UDim.new(0, 4) | |
| UICorner.Parent = Notification | |
| -- Create the inner frame for the notification's content | |
| local InnerFrame = Instance.new("Frame") | |
| InnerFrame.Size = UDim2.new(1, 0, 0, 60) -- Start with an initial height, width will adapt | |
| InnerFrame.Position = UDim2.new(0, 0, 0, 0) -- Positioned inside the outer notification frame | |
| InnerFrame.BackgroundColor3 = Color3.fromRGB(120, 0, 0) | |
| InnerFrame.BackgroundTransparency = 0.2 | |
| InnerFrame.BorderSizePixel = 0 | |
| InnerFrame.Name = "InnerFrame" | |
| InnerFrame.Parent = Notification | |
| InnerFrame.AutomaticSize = Enum.AutomaticSize.Y -- Automatically resize based on its content | |
| -- Add rounded corners to the inner frame | |
| local InnerUICorner = Instance.new("UICorner") | |
| InnerUICorner.CornerRadius = UDim.new(0, 4) | |
| InnerUICorner.Parent = InnerFrame | |
| -- Title Label (with automatic size support) | |
| local Title = Instance.new("TextLabel") | |
| Title.Text = settings.title or "Notification Title" | |
| Title.TextColor3 = Color3.fromRGB(210, 210, 210) | |
| Title.FontFace = Font.new('rbxasset://fonts/families/GothamSSm.json', Enum.FontWeight.SemiBold, Enum.FontStyle.Normal) | |
| Title.TextSize = 14 | |
| Title.Size = UDim2.new(1, -10, 0, 20) -- Width is 1 (100% of parent width), height is fixed initially | |
| Title.Position = UDim2.new(0, 5, 0, 5) | |
| Title.BackgroundTransparency = 1 | |
| Title.TextXAlignment = Enum.TextXAlignment.Left | |
| Title.TextYAlignment = Enum.TextYAlignment.Center | |
| Title.TextWrapped = true -- Enable wrapping | |
| Title.AutomaticSize = Enum.AutomaticSize.Y -- Allow the title to resize based on content | |
| Title.Parent = InnerFrame | |
| -- Body Text (with automatic size support) | |
| local Body = Instance.new("TextLabel") | |
| Body.Text = settings.text or "This is the body of the notification." | |
| Body.TextColor3 = Color3.fromRGB(255, 200, 200) | |
| Body.FontFace = Font.new('rbxasset://fonts/families/GothamSSm.json', Enum.FontWeight.Regular, Enum.FontStyle.Normal) | |
| Body.TextSize = 12 | |
| Body.Size = UDim2.new(1, -10, 0, 30) -- Width is 1 (100% of parent width), height is fixed initially | |
| Body.Position = UDim2.new(0, 5, 0, 25) | |
| Body.BackgroundTransparency = 1 | |
| Body.TextXAlignment = Enum.TextXAlignment.Left | |
| Body.TextYAlignment = Enum.TextYAlignment.Top | |
| Body.TextWrapped = true -- Enable wrapping for long text | |
| Body.AutomaticSize = Enum.AutomaticSize.Y -- Allow the body text to resize based on content | |
| Body.Parent = InnerFrame | |
| -- Force the size to adjust after the text is fully loaded and wrapped | |
| task.spawn(function() | |
| wait(0.1) -- Allow text wrapping to finish | |
| -- Adjust inner frame size based on content | |
| local totalHeight = Title.TextBounds.Y + Body.TextBounds.Y + 10 -- Add padding | |
| InnerFrame.Size = UDim2.new(1, 0, 0, totalHeight) -- Resize the inner frame | |
| end) | |
| -- Use task.spawn to ensure the notification tweening happens asynchronously | |
| task.spawn(function() | |
| -- Tween In the Notification (inner frame) | |
| local tweenIn = TweenService:Create(InnerFrame, TweenInfo.new(0.5, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), { | |
| Position = UDim2.new(0, 0, 0, 10 + NotificationContainer.Size.Y.Offset) | |
| }) | |
| tweenIn:Play() | |
| -- Wait for the duration before tweening out | |
| local duration = settings.duration or 5 -- Default to 5 seconds if not provided | |
| wait(duration) | |
| -- Tween Out the Notification (inner frame) to the right side of the screen | |
| local tweenOut = TweenService:Create(InnerFrame, TweenInfo.new(0.5, Enum.EasingStyle.Quint, Enum.EasingDirection.In), { | |
| Position = UDim2.new(1, 310, 0, 10 + NotificationContainer.Size.Y.Offset) -- Move to the right off-screen | |
| }) | |
| tweenOut:Play() | |
| -- Remove the notification after it is done tweening out | |
| tweenOut.Completed:Connect(function() | |
| Notification:Destroy() | |
| end) | |
| end) | |
| end | |
| function Library:get_screen_scale() | |
| local viewport_size_x = workspace.CurrentCamera.ViewportSize.X | |
| self._ui_scale = viewport_size_x / 1400 | |
| end | |
| function Library:get_device() | |
| local device = 'Unknown' | |
| if not UserInputService.TouchEnabled and UserInputService.KeyboardEnabled and UserInputService.MouseEnabled then | |
| device = 'PC' | |
| elseif UserInputService.TouchEnabled then | |
| device = 'Mobile' | |
| elseif UserInputService.GamepadEnabled then | |
| device = 'Console' | |
| end | |
| self._device = device | |
| end | |
| function Library:removed(action: any) | |
| self._ui.AncestryChanged:Once(action) | |
| end | |
| function Library:flag_type(flag: any, flag_type: any) | |
| if not Library._config._flags[flag] then | |
| return | |
| end | |
| return typeof(Library._config._flags[flag]) == flag_type | |
| end | |
| function Library:remove_table_value(__table: any, table_value: string) | |
| for index, value in __table do | |
| if value ~= table_value then | |
| continue | |
| end | |
| table.remove(__table, index) | |
| end | |
| end | |
| function Library:create_ui() | |
| local Silly = CoreGui:FindFirstChild('Silly') | |
| if Silly then | |
| Debris:AddItem(Silly, 0) | |
| end | |
| local Silly = Instance.new('ScreenGui') | |
| Silly.ResetOnSpawn = false | |
| Silly.Name = 'Silly' | |
| Silly.ZIndexBehavior = Enum.ZIndexBehavior.Sibling | |
| Silly.Parent = CoreGui | |
| local Container = Instance.new('Frame') | |
| Container.ClipsDescendants = true | |
| Container.BorderColor3 = Color3.fromRGB(0, 0, 0) | |
| Container.AnchorPoint = Vector2.new(0.5, 0.5) | |
| Container.Name = 'Container' | |
| Container.BackgroundTransparency = 0.15 | |
| Container.BackgroundColor3 = Color3.fromRGB(120, 0, 0) | |
| Container.Position = UDim2.new(0.5, 0, 0.5, 0) | |
| Container.Size = UDim2.new(0, 0, 0, 0) | |
| Container.Active = true | |
| Container.BorderSizePixel = 0 | |
| Container.Parent = Silly | |
| local UICorner = Instance.new('UICorner') | |
| UICorner.CornerRadius = UDim.new(0, 10) | |
| UICorner.Parent = Container | |
| local UIS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment