Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Rayfield = loadstring(game:HttpGet('https://raw.githubusercontent.com/shlexware/Rayfield/main/source'))()
- local Window = Rayfield:CreateWindow({
- Name = "Rayfield Example Window",
- LoadingTitle = "Rayfield Interface Suite",
- LoadingSubtitle = "by Sirius",
- ConfigurationSaving = {
- Enabled = true,
- FolderName = nil, -- Create a custom folder for your hub/game
- FileName = "Big Hub"
- },
- Discord = {
- Enabled = false,
- Invite = "sirius", -- The Discord invite code, do not include discord.gg/
- 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 = "Sirius Hub",
- Subtitle = "Key System",
- Note = "Join the discord (discord.gg/sirius)",
- FileName = "SiriusKey",
- SaveKey = true,
- GrabKeyFromSite = false, -- If this is true, set Key below to the RAW site you would like Rayfield to get the key from
- Key = ":p"
- }
- })
- local Tab = Window:CreateTab("Tab Example", 4483362458)
- local Section = Tab:CreateSection("Section Example")
- Rayfield:Notify({
- Title = "Notification Title",
- Content = "Notification Content",
- Duration = 6.5,
- Image = 4483362458,
- Actions = { -- Notification Buttons
- Ignore = {
- Name = "Okay!",
- Callback = function()
- print("The user tapped Okay!")
- end
- },
- },
- })
- local Button = Tab:CreateButton({
- Name = "Button Example",
- Callback = function()
- -- The function that takes place when the button is pressed
- end,
- })
- local Toggle = Tab:CreateToggle({
- Name = "Toggle Example",
- CurrentValue = false,
- Flag = "Toggle1", -- A flag is the identifier for the configuration file, make sure every element has a different flag if you're using configuration saving to ensure no overlaps
- Callback = function(Value)
- -- The function that takes place when the toggle is pressed
- -- The variable (Value) is a boolean on whether the toggle is true or false
- end,
- })
- local Slider = Tab:CreateSlider({
- Name = "Slider Example",
- Range = {0, 100},
- Increment = 10,
- Suffix = "Bananas",
- CurrentValue = 10,
- Flag = "Slider1", -- A flag is the identifier for the configuration file, make sure every element has a different flag if you're using configuration saving to ensure no overlaps
- Callback = function(Value)
- -- The function that takes place when the slider changes
- -- The variable (Value) is a number which correlates to the value the slider is currently at
- end,
- })
- local Input = Tab:CreateInput({
- Name = "Input Example",
- PlaceholderText = "Input Placeholder",
- RemoveTextAfterFocusLost = false,
- Callback = function(Text)
- -- The function that takes place when the input is changed
- -- The variable (Text) is a string for the value in the text box
- end,
- })
- local Dropdown = Tab:CreateDropdown({
- Name = "Dropdown Example",
- Options = {"Option 1","Option 2"},
- CurrentOption = "Option 1",
- Flag = "Dropdown1", -- A flag is the identifier for the configuration file, make sure every element has a different flag if you're using configuration saving to ensure no overlaps
- Callback = function(Option)
- -- The function that takes place when the selected option is changed
- -- The variable (Option) is a string for the value that the dropdown was changed to
- end,
- })
- local Paragraph = Tab:CreateParagraph({Title = "Paragraph Example", Content = "Paragraph Example"})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement