Universal Script πŸ“Œ
77.8k Views
137 Executions

Script Verified Rayfield Modifier

Universal Script πŸ“Œ
vxsty
vxsty
Verified Badge
Verified User
Hall of Fame10M views
2 years ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

Allows modifying the Rayfield UI according to what you like! This script allows you to fetch tabs based on many options, like latin_only, search_regex, find_only, visible_only, ... Allows you to create so many custom elements!

Updates

  1. Script edited: Added "Space" element, "Frame" element, "Content" element

  2. Script edited: Update script

  3. Script edited: Added :CreateFrame, Lets you display anything you want inside rayfield, Returns the frame aswell, You can edit it and parent things to it, Fixed Parabutton's background colors being messed up.

  4. Script edited: :GetTabsByName now returns a Content member aswell, Which is the content of that tab, Parabuttons now don't need icons to be created.

  5. Script edited: Added Parabuttons- Paragraphs with icons that you can click and attach callbacks to.

View Raw
local Rayfield = gethui():WaitForChild("Rayfield"):WaitForChild("Main")
local TabList = Rayfield:WaitForChild("TabList")
local Elements = Rayfield:WaitForChild("Elements")

local TemplateElements = Elements:WaitForChild("Template")

local RMod = {}
local insert = table.insert
local Instance_new = Instance.new

function RMod:Defaultify(Default, Table)
    for i, v in next, Default do
        if type(v) == "table" and type(Table[i]) == "table" then
            self:Defaultify(v, Table[i])
        else
            Table[i] = Table[i] == nil and v or Table[i]
        end
    end
    return Table
end

function RMod:NoRegex(Str)
    for _, Char in next, ("$%^&*()[]-+?."):split("") do
        Str = Str:gsub("%" .. Char, "%%" .. (Char == "%" and "%" or "") .. Char)
    end
    return Str
end

function RMod:GetTabsByName(Name, SearchOptions) --! Returns a table like: {Instance = Tab, Rename = function, Delete = function, Hide = function, Show = function}
    --[[
    * SearchOptions (table):
    ^ case_insensitive: If true, It will ignore capital letters, everything will be searched for in lowercase
    ^ latin_only: If true, It will ONLY look for letters and numbers, for example, Hello World, Will be converted into HelloWorld, HelloΔ«World will be converted into HelloWorld
    ^ visible_only: If true, Will not include hidden tabs (tabs hidden with Tab:Hide()),
    ^ search_regex: If true, will search for tab names WITH REGEX, For example:
    ^ RMod:GetTabsByName("Hello%s*World", {search_regex=true}) will get the tabs: HelloWorld, Hello World, Hello  World, Hello   World and so on, if false then it will search for raw names.
    ^ find_only: If false or nil, Will require the tab's name to be EXACTLY the same as Name, Otherwise only a chunk of it.
    ]]
    SearchOptions = SearchOptions or {}



Comments

14
Log in to join the conversation. Login
envidz's profile picture
envidz2 years ago

Congrats, another banger, 11/10

4
xxsystemxw123's profile picture
xxsystemxw1237 months ago

God

1
gigachadbaconorigin's profile picture
gigachadbaconorigin1 year ago

What executor is this

1
Chessguy's profile picture
Chessguy2 years ago

Thank you very much

1
vxsty's profile picture
vxstyVerified
Verified Badge
Verified User
Hall of FameUploader2 years ago

@jacinthjacob0 Load rayfield then load this.

1
Chessguy's profile picture
Chessguy2 years ago

How do i execute this

1
vxsty's profile picture
vxstyVerified
Verified Badge
Verified User
Hall of FameUploader2 years ago

@SkireScripts No way the skid master?! GGs man

1