Advertisement
OdysseyHubOWNER

BEST SCRIPT

Dec 9th, 2024 (edited)
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 169.19 KB | Gaming | 0 0
  1. --[[
  2.  
  3. Rayfield Interface Suite
  4. by Sirius
  5.  
  6. shlex | Designing + Programming
  7. iRay | Programming
  8. Max | Programming
  9.  
  10. ]]
  11.  
  12. if debugX then
  13. warn('Initialising Rayfield')
  14. end
  15.  
  16. local function getService(name)
  17. local service = game:GetService(name)
  18. return if cloneref then cloneref(service) else service
  19. end
  20.  
  21. local requestsDisabled = getgenv and getgenv().DISABLE_RAYFIELD_REQUESTS
  22. local InterfaceBuild = '3K3W'
  23. local Release = "Build 1.672"
  24. local RayfieldFolder = "Rayfield"
  25. local ConfigurationFolder = RayfieldFolder.."/Configurations"
  26. local ConfigurationExtension = ".rfld"
  27. local settingsTable = {
  28. General = {
  29. -- if needs be in order just make getSetting(name)
  30. rayfieldOpen = {Type = 'bind', Value = 'F6
  31. ', Name = 'Rayfield Keybind'},
  32. -- buildwarnings
  33. -- rayfieldprompts
  34.  
  35. },
  36. System = {
  37. usageAnalytics = {Type = 'toggle', Value = true, Name = 'Anonymised Analytics'},
  38. }
  39. }
  40.  
  41. local HttpService = getService('HttpService')
  42. local RunService = getService('RunService')
  43.  
  44. -- Environment Check
  45. local useStudio = RunService:IsStudio() or false
  46.  
  47. local settingsCreated = false
  48. local cachedSettings
  49. local prompt = useStudio and require(script.Parent.prompt) or loadstring(game:HttpGet('https://raw.githubusercontent.com/SiriusSoftwareLtd/Sirius/refs/heads/request/prompt.lua'))()
  50. local request = (syn and syn.request) or (fluxus and fluxus.request) or (http and http.request) or http_request or request
  51.  
  52.  
  53.  
  54. local function loadSettings()
  55. local file = nil
  56.  
  57. local success, result = pcall(function()
  58. task.spawn(function()
  59. if isfolder and isfolder(RayfieldFolder) then
  60. if isfile and isfile(RayfieldFolder..'/settings'..ConfigurationExtension) then
  61. file = readfile(RayfieldFolder..'/settings'..ConfigurationExtension)
  62. end
  63. end
  64.  
  65. -- for debug in studio
  66. if useStudio then
  67. file = [[
  68. {"General":{"rayfieldOpen":{"Value":"K","Type":"bind","Name":"Rayfield Keybind","Element":{"HoldToInteract":false,"Ext":true,"Name":"Rayfield Keybind","Set":null,"CallOnChange":true,"Callback":null,"CurrentKeybind":"K"}}},"System":{"usageAnalytics":{"Value":false,"Type":"toggle","Name":"Anonymised Analytics","Element":{"Ext":true,"Name":"Anonymised Analytics","Set":null,"CurrentValue":false,"Callback":null}}}}
  69. ]]
  70. end
  71.  
  72.  
  73. if file then
  74. local success, decodedFile = pcall(function() return HttpService:JSONDecode(file) end)
  75. if success then
  76. file = decodedFile
  77. else
  78. file = {}
  79. end
  80. else
  81. file = {}
  82. end
  83.  
  84.  
  85. if not settingsCreated then
  86. cachedSettings = file
  87. return
  88. end
  89.  
  90. if file ~= {} then
  91. for categoryName, settingCategory in pairs(settingsTable) do
  92. if file[categoryName] then
  93. for settingName, setting in pairs(settingCategory) do
  94. if file[categoryName][settingName] then
  95. setting.Value = file[categoryName][settingName].Value
  96. setting.Element:Set(setting.Value)
  97. end
  98. end
  99. end
  100. end
  101. end
  102. end)
  103. end)
  104.  
  105. if not success then
  106. if writefile then
  107. warn('Rayfield had an issue accessing configuration saving capability.')
  108. end
  109. end
  110. end
  111.  
  112. if debugX then
  113. warn('Now Loading Settings Configuration')
  114. end
  115.  
  116. loadSettings()
  117.  
  118. if debugX then
  119. warn('Settings Loaded')
  120. end
  121.  
  122. --if not cachedSettings or not cachedSettings.System or not cachedSettings.System.usageAnalytics then
  123. -- local fileFunctionsAvailable = isfile and writefile and readfile
  124.  
  125. -- if not fileFunctionsAvailable and not useStudio then
  126. -- warn('Rayfield Interface Suite | Sirius Analytics:\n\n\nAs you don\'t have file functionality with your executor, we are unable to save whether you want to opt in or out to analytics.\nIf you do not want to take part in anonymised usage statistics, let us know in our Discord at sirius.menu/discord and we will manually opt you out.')
  127. -- analytics = true
  128. -- else
  129. -- prompt.create(
  130. -- 'Help us improve',
  131. -- [[Would you like to allow Sirius to collect usage statistics?
  132.  
  133. --<font transparency='0.4'>No data is linked to you or your personal activity.</font>]],
  134. -- 'Continue',
  135. -- 'Cancel',
  136. -- function(result)
  137. -- settingsTable.System.usageAnalytics.Value = result
  138. -- analytics = result
  139. -- end
  140. -- )
  141. -- end
  142.  
  143. -- repeat task.wait() until analytics ~= nil
  144. --end
  145.  
  146. if not requestsDisabled then
  147. if debugX then
  148. warn('Querying Settings for Reporter Information')
  149. end
  150. local function sendReport()
  151. if useStudio then
  152. print('Sending Analytics')
  153. else
  154. if debugX then warn('Reporting Analytics') end
  155. task.spawn(function()
  156. local success, reporter = pcall(function()
  157. return loadstring(game:HttpGet("https://analytics.sirius.menu/v1/reporter", true))()
  158. end)
  159. if success and reporter then
  160. pcall(function()
  161. reporter.report("Rayfield", Release, InterfaceBuild)
  162. end)
  163. else
  164. warn("Failed to load or execute the reporter. \nPlease notify Rayfield developers at sirius.menu/discord.")
  165. end
  166. end)
  167. if debugX then warn('Finished Report') end
  168. end
  169. end
  170. if cachedSettings and (#cachedSettings == 0 or (cachedSettings.System and cachedSettings.System.usageAnalytics and cachedSettings.System.usageAnalytics.Value)) then
  171. sendReport()
  172. elseif not cachedSettings then
  173. sendReport()
  174. end
  175. end
  176.  
  177. if debugX then
  178. warn('Moving on to continue initialisation')
  179. end
  180.  
  181. local RayfieldLibrary = {
  182. Flags = {},
  183. Theme = {
  184. Default = {
  185. TextColor = Color3.fromRGB(240, 240, 240),
  186.  
  187. Background = Color3.fromRGB(25, 25, 25),
  188. Topbar = Color3.fromRGB(34, 34, 34),
  189. Shadow = Color3.fromRGB(20, 20, 20),
  190.  
  191. NotificationBackground = Color3.fromRGB(20, 20, 20),
  192. NotificationActionsBackground = Color3.fromRGB(230, 230, 230),
  193.  
  194. TabBackground = Color3.fromRGB(80, 80, 80),
  195. TabStroke = Color3.fromRGB(85, 85, 85),
  196. TabBackgroundSelected = Color3.fromRGB(210, 210, 210),
  197. TabTextColor = Color3.fromRGB(240, 240, 240),
  198. SelectedTabTextColor = Color3.fromRGB(50, 50, 50),
  199.  
  200. ElementBackground = Color3.fromRGB(35, 35, 35),
  201. ElementBackgroundHover = Color3.fromRGB(40, 40, 40),
  202. SecondaryElementBackground = Color3.fromRGB(25, 25, 25),
  203. ElementStroke = Color3.fromRGB(50, 50, 50),
  204. SecondaryElementStroke = Color3.fromRGB(40, 40, 40),
  205.  
  206. SliderBackground = Color3.fromRGB(50, 138, 220),
  207. SliderProgress = Color3.fromRGB(50, 138, 220),
  208. SliderStroke = Color3.fromRGB(58, 163, 255),
  209.  
  210. ToggleBackground = Color3.fromRGB(30, 30, 30),
  211. ToggleEnabled = Color3.fromRGB(0, 146, 214),
  212. ToggleDisabled = Color3.fromRGB(100, 100, 100),
  213. ToggleEnabledStroke = Color3.fromRGB(0, 170, 255),
  214. ToggleDisabledStroke = Color3.fromRGB(125, 125, 125),
  215. ToggleEnabledOuterStroke = Color3.fromRGB(100, 100, 100),
  216. ToggleDisabledOuterStroke = Color3.fromRGB(65, 65, 65),
  217.  
  218. DropdownSelected = Color3.fromRGB(40, 40, 40),
  219. DropdownUnselected = Color3.fromRGB(30, 30, 30),
  220.  
  221. InputBackground = Color3.fromRGB(30, 30, 30),
  222. InputStroke = Color3.fromRGB(65, 65, 65),
  223. PlaceholderColor = Color3.fromRGB(178, 178, 178)
  224. },
  225.  
  226. Ocean = {
  227. TextColor = Color3.fromRGB(230, 240, 240),
  228.  
  229. Background = Color3.fromRGB(20, 30, 30),
  230. Topbar = Color3.fromRGB(25, 40, 40),
  231. Shadow = Color3.fromRGB(15, 20, 20),
  232.  
  233. NotificationBackground = Color3.fromRGB(25, 35, 35),
  234. NotificationActionsBackground = Color3.fromRGB(230, 240, 240),
  235.  
  236. TabBackground = Color3.fromRGB(40, 60, 60),
  237. TabStroke = Color3.fromRGB(50, 70, 70),
  238. TabBackgroundSelected = Color3.fromRGB(100, 180, 180),
  239. TabTextColor = Color3.fromRGB(210, 230, 230),
  240. SelectedTabTextColor = Color3.fromRGB(20, 50, 50),
  241.  
  242. ElementBackground = Color3.fromRGB(30, 50, 50),
  243. ElementBackgroundHover = Color3.fromRGB(40, 60, 60),
  244. SecondaryElementBackground = Color3.fromRGB(30, 45, 45),
  245. ElementStroke = Color3.fromRGB(45, 70, 70),
  246. SecondaryElementStroke = Color3.fromRGB(40, 65, 65),
  247.  
  248. SliderBackground = Color3.fromRGB(0, 110, 110),
  249. SliderProgress = Color3.fromRGB(0, 140, 140),
  250. SliderStroke = Color3.fromRGB(0, 160, 160),
  251.  
  252. ToggleBackground = Color3.fromRGB(30, 50, 50),
  253. ToggleEnabled = Color3.fromRGB(0, 130, 130),
  254. ToggleDisabled = Color3.fromRGB(70, 90, 90),
  255. ToggleEnabledStroke = Color3.fromRGB(0, 160, 160),
  256. ToggleDisabledStroke = Color3.fromRGB(85, 105, 105),
  257. ToggleEnabledOuterStroke = Color3.fromRGB(50, 100, 100),
  258. ToggleDisabledOuterStroke = Color3.fromRGB(45, 65, 65),
  259.  
  260. DropdownSelected = Color3.fromRGB(30, 60, 60),
  261. DropdownUnselected = Color3.fromRGB(25, 40, 40),
  262.  
  263. InputBackground = Color3.fromRGB(30, 50, 50),
  264. InputStroke = Color3.fromRGB(50, 70, 70),
  265. PlaceholderColor = Color3.fromRGB(140, 160, 160)
  266. },
  267.  
  268. AmberGlow = {
  269. TextColor = Color3.fromRGB(255, 245, 230),
  270.  
  271. Background = Color3.fromRGB(45, 30, 20),
  272. Topbar = Color3.fromRGB(55, 40, 25),
  273. Shadow = Color3.fromRGB(35, 25, 15),
  274.  
  275. NotificationBackground = Color3.fromRGB(50, 35, 25),
  276. NotificationActionsBackground = Color3.fromRGB(245, 230, 215),
  277.  
  278. TabBackground = Color3.fromRGB(75, 50, 35),
  279. TabStroke = Color3.fromRGB(90, 60, 45),
  280. TabBackgroundSelected = Color3.fromRGB(230, 180, 100),
  281. TabTextColor = Color3.fromRGB(250, 220, 200),
  282. SelectedTabTextColor = Color3.fromRGB(50, 30, 10),
  283.  
  284. ElementBackground = Color3.fromRGB(60, 45, 35),
  285. ElementBackgroundHover = Color3.fromRGB(70, 50, 40),
  286. SecondaryElementBackground = Color3.fromRGB(55, 40, 30),
  287. ElementStroke = Color3.fromRGB(85, 60, 45),
  288. SecondaryElementStroke = Color3.fromRGB(75, 50, 35),
  289.  
  290. SliderBackground = Color3.fromRGB(220, 130, 60),
  291. SliderProgress = Color3.fromRGB(250, 150, 75),
  292. SliderStroke = Color3.fromRGB(255, 170, 85),
  293.  
  294. ToggleBackground = Color3.fromRGB(55, 40, 30),
  295. ToggleEnabled = Color3.fromRGB(240, 130, 30),
  296. ToggleDisabled = Color3.fromRGB(90, 70, 60),
  297. ToggleEnabledStroke = Color3.fromRGB(255, 160, 50),
  298. ToggleDisabledStroke = Color3.fromRGB(110, 85, 75),
  299. ToggleEnabledOuterStroke = Color3.fromRGB(200, 100, 50),
  300. ToggleDisabledOuterStroke = Color3.fromRGB(75, 60, 55),
  301.  
  302. DropdownSelected = Color3.fromRGB(70, 50, 40),
  303. DropdownUnselected = Color3.fromRGB(55, 40, 30),
  304.  
  305. InputBackground = Color3.fromRGB(60, 45, 35),
  306. InputStroke = Color3.fromRGB(90, 65, 50),
  307. PlaceholderColor = Color3.fromRGB(190, 150, 130)
  308. },
  309.  
  310. Light = {
  311. TextColor = Color3.fromRGB(40, 40, 40),
  312.  
  313. Background = Color3.fromRGB(245, 245, 245),
  314. Topbar = Color3.fromRGB(230, 230, 230),
  315. Shadow = Color3.fromRGB(200, 200, 200),
  316.  
  317. NotificationBackground = Color3.fromRGB(250, 250, 250),
  318. NotificationActionsBackground = Color3.fromRGB(240, 240, 240),
  319.  
  320. TabBackground = Color3.fromRGB(235, 235, 235),
  321. TabStroke = Color3.fromRGB(215, 215, 215),
  322. TabBackgroundSelected = Color3.fromRGB(255, 255, 255),
  323. TabTextColor = Color3.fromRGB(80, 80, 80),
  324. SelectedTabTextColor = Color3.fromRGB(0, 0, 0),
  325.  
  326. ElementBackground = Color3.fromRGB(240, 240, 240),
  327. ElementBackgroundHover = Color3.fromRGB(225, 225, 225),
  328. SecondaryElementBackground = Color3.fromRGB(235, 235, 235),
  329. ElementStroke = Color3.fromRGB(210, 210, 210),
  330. SecondaryElementStroke = Color3.fromRGB(210, 210, 210),
  331.  
  332. SliderBackground = Color3.fromRGB(150, 180, 220),
  333. SliderProgress = Color3.fromRGB(100, 150, 200),
  334. SliderStroke = Color3.fromRGB(120, 170, 220),
  335.  
  336. ToggleBackground = Color3.fromRGB(220, 220, 220),
  337. ToggleEnabled = Color3.fromRGB(0, 146, 214),
  338. ToggleDisabled = Color3.fromRGB(150, 150, 150),
  339. ToggleEnabledStroke = Color3.fromRGB(0, 170, 255),
  340. ToggleDisabledStroke = Color3.fromRGB(170, 170, 170),
  341. ToggleEnabledOuterStroke = Color3.fromRGB(100, 100, 100),
  342. ToggleDisabledOuterStroke = Color3.fromRGB(180, 180, 180),
  343.  
  344. DropdownSelected = Color3.fromRGB(230, 230, 230),
  345. DropdownUnselected = Color3.fromRGB(220, 220, 220),
  346.  
  347. InputBackground = Color3.fromRGB(240, 240, 240),
  348. InputStroke = Color3.fromRGB(180, 180, 180),
  349. PlaceholderColor = Color3.fromRGB(140, 140, 140)
  350. },
  351.  
  352. Amethyst = {
  353. TextColor = Color3.fromRGB(240, 240, 240),
  354.  
  355. Background = Color3.fromRGB(30, 20, 40),
  356. Topbar = Color3.fromRGB(40, 25, 50),
  357. Shadow = Color3.fromRGB(20, 15, 30),
  358.  
  359. NotificationBackground = Color3.fromRGB(35, 20, 40),
  360. NotificationActionsBackground = Color3.fromRGB(240, 240, 250),
  361.  
  362. TabBackground = Color3.fromRGB(60, 40, 80),
  363. TabStroke = Color3.fromRGB(70, 45, 90),
  364. TabBackgroundSelected = Color3.fromRGB(180, 140, 200),
  365. TabTextColor = Color3.fromRGB(230, 230, 240),
  366. SelectedTabTextColor = Color3.fromRGB(50, 20, 50),
  367.  
  368. ElementBackground = Color3.fromRGB(45, 30, 60),
  369. ElementBackgroundHover = Color3.fromRGB(50, 35, 70),
  370. SecondaryElementBackground = Color3.fromRGB(40, 30, 55),
  371. ElementStroke = Color3.fromRGB(70, 50, 85),
  372. SecondaryElementStroke = Color3.fromRGB(65, 45, 80),
  373.  
  374. SliderBackground = Color3.fromRGB(100, 60, 150),
  375. SliderProgress = Color3.fromRGB(130, 80, 180),
  376. SliderStroke = Color3.fromRGB(150, 100, 200),
  377.  
  378. ToggleBackground = Color3.fromRGB(45, 30, 55),
  379. ToggleEnabled = Color3.fromRGB(120, 60, 150),
  380. ToggleDisabled = Color3.fromRGB(94, 47, 117),
  381. ToggleEnabledStroke = Color3.fromRGB(140, 80, 170),
  382. ToggleDisabledStroke = Color3.fromRGB(124, 71, 150),
  383. ToggleEnabledOuterStroke = Color3.fromRGB(90, 40, 120),
  384. ToggleDisabledOuterStroke = Color3.fromRGB(80, 50, 110),
  385.  
  386. DropdownSelected = Color3.fromRGB(50, 35, 70),
  387. DropdownUnselected = Color3.fromRGB(35, 25, 50),
  388.  
  389. InputBackground = Color3.fromRGB(45, 30, 60),
  390. InputStroke = Color3.fromRGB(80, 50, 110),
  391. PlaceholderColor = Color3.fromRGB(178, 150, 200)
  392. },
  393.  
  394. Green = {
  395. TextColor = Color3.fromRGB(30, 60, 30),
  396.  
  397. Background = Color3.fromRGB(235, 245, 235),
  398. Topbar = Color3.fromRGB(210, 230, 210),
  399. Shadow = Color3.fromRGB(200, 220, 200),
  400.  
  401. NotificationBackground = Color3.fromRGB(240, 250, 240),
  402. NotificationActionsBackground = Color3.fromRGB(220, 235, 220),
  403.  
  404. TabBackground = Color3.fromRGB(215, 235, 215),
  405. TabStroke = Color3.fromRGB(190, 210, 190),
  406. TabBackgroundSelected = Color3.fromRGB(245, 255, 245),
  407. TabTextColor = Color3.fromRGB(50, 80, 50),
  408. SelectedTabTextColor = Color3.fromRGB(20, 60, 20),
  409.  
  410. ElementBackground = Color3.fromRGB(225, 240, 225),
  411. ElementBackgroundHover = Color3.fromRGB(210, 225, 210),
  412. SecondaryElementBackground = Color3.fromRGB(235, 245, 235),
  413. ElementStroke = Color3.fromRGB(180, 200, 180),
  414. SecondaryElementStroke = Color3.fromRGB(180, 200, 180),
  415.  
  416. SliderBackground = Color3.fromRGB(90, 160, 90),
  417. SliderProgress = Color3.fromRGB(70, 130, 70),
  418. SliderStroke = Color3.fromRGB(100, 180, 100),
  419.  
  420. ToggleBackground = Color3.fromRGB(215, 235, 215),
  421. ToggleEnabled = Color3.fromRGB(60, 130, 60),
  422. ToggleDisabled = Color3.fromRGB(150, 175, 150),
  423. ToggleEnabledStroke = Color3.fromRGB(80, 150, 80),
  424. ToggleDisabledStroke = Color3.fromRGB(130, 150, 130),
  425. ToggleEnabledOuterStroke = Color3.fromRGB(100, 160, 100),
  426. ToggleDisabledOuterStroke = Color3.fromRGB(160, 180, 160),
  427.  
  428. DropdownSelected = Color3.fromRGB(225, 240, 225),
  429. DropdownUnselected = Color3.fromRGB(210, 225, 210),
  430.  
  431. InputBackground = Color3.fromRGB(235, 245, 235),
  432. InputStroke = Color3.fromRGB(180, 200, 180),
  433. PlaceholderColor = Color3.fromRGB(120, 140, 120)
  434. },
  435.  
  436. Bloom = {
  437. TextColor = Color3.fromRGB(60, 40, 50),
  438.  
  439. Background = Color3.fromRGB(255, 240, 245),
  440. Topbar = Color3.fromRGB(250, 220, 225),
  441. Shadow = Color3.fromRGB(230, 190, 195),
  442.  
  443. NotificationBackground = Color3.fromRGB(255, 235, 240),
  444. NotificationActionsBackground = Color3.fromRGB(245, 215, 225),
  445.  
  446. TabBackground = Color3.fromRGB(240, 210, 220),
  447. TabStroke = Color3.fromRGB(230, 200, 210),
  448. TabBackgroundSelected = Color3.fromRGB(255, 225, 235),
  449. TabTextColor = Color3.fromRGB(80, 40, 60),
  450. SelectedTabTextColor = Color3.fromRGB(50, 30, 50),
  451.  
  452. ElementBackground = Color3.fromRGB(255, 235, 240),
  453. ElementBackgroundHover = Color3.fromRGB(245, 220, 230),
  454. SecondaryElementBackground = Color3.fromRGB(255, 235, 240),
  455. ElementStroke = Color3.fromRGB(230, 200, 210),
  456. SecondaryElementStroke = Color3.fromRGB(230, 200, 210),
  457.  
  458. SliderBackground = Color3.fromRGB(240, 130, 160),
  459. SliderProgress = Color3.fromRGB(250, 160, 180),
  460. SliderStroke = Color3.fromRGB(255, 180, 200),
  461.  
  462. ToggleBackground = Color3.fromRGB(240, 210, 220),
  463. ToggleEnabled = Color3.fromRGB(255, 140, 170),
  464. ToggleDisabled = Color3.fromRGB(200, 180, 185),
  465. ToggleEnabledStroke = Color3.fromRGB(250, 160, 190),
  466. ToggleDisabledStroke = Color3.fromRGB(210, 180, 190),
  467. ToggleEnabledOuterStroke = Color3.fromRGB(220, 160, 180),
  468. ToggleDisabledOuterStroke = Color3.fromRGB(190, 170, 180),
  469.  
  470. DropdownSelected = Color3.fromRGB(250, 220, 225),
  471. DropdownUnselected = Color3.fromRGB(240, 210, 220),
  472.  
  473. InputBackground = Color3.fromRGB(255, 235, 240),
  474. InputStroke = Color3.fromRGB(220, 190, 200),
  475. PlaceholderColor = Color3.fromRGB(170, 130, 140)
  476. },
  477.  
  478. DarkBlue = {
  479. TextColor = Color3.fromRGB(230, 230, 230),
  480.  
  481. Background = Color3.fromRGB(20, 25, 30),
  482. Topbar = Color3.fromRGB(30, 35, 40),
  483. Shadow = Color3.fromRGB(15, 20, 25),
  484.  
  485. NotificationBackground = Color3.fromRGB(25, 30, 35),
  486. NotificationActionsBackground = Color3.fromRGB(45, 50, 55),
  487.  
  488. TabBackground = Color3.fromRGB(35, 40, 45),
  489. TabStroke = Color3.fromRGB(45, 50, 60),
  490. TabBackgroundSelected = Color3.fromRGB(40, 70, 100),
  491. TabTextColor = Color3.fromRGB(200, 200, 200),
  492. SelectedTabTextColor = Color3.fromRGB(255, 255, 255),
  493.  
  494. ElementBackground = Color3.fromRGB(30, 35, 40),
  495. ElementBackgroundHover = Color3.fromRGB(40, 45, 50),
  496. SecondaryElementBackground = Color3.fromRGB(35, 40, 45),
  497. ElementStroke = Color3.fromRGB(45, 50, 60),
  498. SecondaryElementStroke = Color3.fromRGB(40, 45, 55),
  499.  
  500. SliderBackground = Color3.fromRGB(0, 90, 180),
  501. SliderProgress = Color3.fromRGB(0, 120, 210),
  502. SliderStroke = Color3.fromRGB(0, 150, 240),
  503.  
  504. ToggleBackground = Color3.fromRGB(35, 40, 45),
  505. ToggleEnabled = Color3.fromRGB(0, 120, 210),
  506. ToggleDisabled = Color3.fromRGB(70, 70, 80),
  507. ToggleEnabledStroke = Color3.fromRGB(0, 150, 240),
  508. ToggleDisabledStroke = Color3.fromRGB(75, 75, 85),
  509. ToggleEnabledOuterStroke = Color3.fromRGB(20, 100, 180),
  510. ToggleDisabledOuterStroke = Color3.fromRGB(55, 55, 65),
  511.  
  512. DropdownSelected = Color3.fromRGB(30, 70, 90),
  513. DropdownUnselected = Color3.fromRGB(25, 30, 35),
  514.  
  515. InputBackground = Color3.fromRGB(25, 30, 35),
  516. InputStroke = Color3.fromRGB(45, 50, 60),
  517. PlaceholderColor = Color3.fromRGB(150, 150, 160)
  518. },
  519.  
  520. Serenity = {
  521. TextColor = Color3.fromRGB(50, 55, 60),
  522. Background = Color3.fromRGB(240, 245, 250),
  523. Topbar = Color3.fromRGB(215, 225, 235),
  524. Shadow = Color3.fromRGB(200, 210, 220),
  525.  
  526. NotificationBackground = Color3.fromRGB(210, 220, 230),
  527. NotificationActionsBackground = Color3.fromRGB(225, 230, 240),
  528.  
  529. TabBackground = Color3.fromRGB(200, 210, 220),
  530. TabStroke = Color3.fromRGB(180, 190, 200),
  531. TabBackgroundSelected = Color3.fromRGB(175, 185, 200),
  532. TabTextColor = Color3.fromRGB(50, 55, 60),
  533. SelectedTabTextColor = Color3.fromRGB(30, 35, 40),
  534.  
  535. ElementBackground = Color3.fromRGB(210, 220, 230),
  536. ElementBackgroundHover = Color3.fromRGB(220, 230, 240),
  537. SecondaryElementBackground = Color3.fromRGB(200, 210, 220),
  538. ElementStroke = Color3.fromRGB(190, 200, 210),
  539. SecondaryElementStroke = Color3.fromRGB(180, 190, 200),
  540.  
  541. SliderBackground = Color3.fromRGB(200, 220, 235), -- Lighter shade
  542. SliderProgress = Color3.fromRGB(70, 130, 180),
  543. SliderStroke = Color3.fromRGB(150, 180, 220),
  544.  
  545. ToggleBackground = Color3.fromRGB(210, 220, 230),
  546. ToggleEnabled = Color3.fromRGB(70, 160, 210),
  547. ToggleDisabled = Color3.fromRGB(180, 180, 180),
  548. ToggleEnabledStroke = Color3.fromRGB(60, 150, 200),
  549. ToggleDisabledStroke = Color3.fromRGB(140, 140, 140),
  550. ToggleEnabledOuterStroke = Color3.fromRGB(100, 120, 140),
  551. ToggleDisabledOuterStroke = Color3.fromRGB(120, 120, 130),
  552.  
  553. DropdownSelected = Color3.fromRGB(220, 230, 240),
  554. DropdownUnselected = Color3.fromRGB(200, 210, 220),
  555.  
  556. InputBackground = Color3.fromRGB(220, 230, 240),
  557. InputStroke = Color3.fromRGB(180, 190, 200),
  558. PlaceholderColor = Color3.fromRGB(150, 150, 150)
  559. },
  560. }
  561. }
  562.  
  563.  
  564. -- Services
  565. local UserInputService = getService("UserInputService")
  566. local TweenService = getService("TweenService")
  567. local Players = getService("Players")
  568. local CoreGui = getService("CoreGui")
  569.  
  570. -- Interface Management
  571.  
  572. local Rayfield = useStudio and script.Parent:FindFirstChild('Rayfield') or game:GetObjects("rbxassetid://10804731440")[1]
  573. local buildAttempts = 0
  574. local correctBuild = false
  575. local warned
  576. local globalLoaded
  577.  
  578. repeat
  579. if Rayfield:FindFirstChild('Build') and Rayfield.Build.Value == InterfaceBuild then
  580. correctBuild = true
  581. break
  582. end
  583.  
  584. correctBuild = false
  585.  
  586. if not warned then
  587. warn('Rayfield | Build Mismatch')
  588. print('Rayfield may encounter issues as you are running an incompatible interface version ('.. ((Rayfield:FindFirstChild('Build') and Rayfield.Build.Value) or 'No Build') ..').\n\nThis version of Rayfield is intended for interface build '..InterfaceBuild..'.')
  589. warned = true
  590. end
  591.  
  592. toDestroy, Rayfield = Rayfield, useStudio and script.Parent:FindFirstChild('Rayfield') or game:GetObjects("rbxassetid://10804731440")[1]
  593. if toDestroy and not useStudio then toDestroy:Destroy() end
  594.  
  595. buildAttempts = buildAttempts + 1
  596. until buildAttempts >= 2
  597.  
  598. Rayfield.Enabled = false
  599.  
  600. if gethui then
  601. Rayfield.Parent = gethui()
  602. elseif syn and syn.protect_gui then
  603. syn.protect_gui(Rayfield)
  604. Rayfield.Parent = CoreGui
  605. elseif not useStudio and CoreGui:FindFirstChild("RobloxGui") then
  606. Rayfield.Parent = CoreGui:FindFirstChild("RobloxGui")
  607. elseif not useStudio then
  608. Rayfield.Parent = CoreGui
  609. end
  610.  
  611. if gethui then
  612. for _, Interface in ipairs(gethui():GetChildren()) do
  613. if Interface.Name == Rayfield.Name and Interface ~= Rayfield then
  614. Interface.Enabled = false
  615. Interface.Name = "Rayfield-Old"
  616. end
  617. end
  618. elseif not useStudio then
  619. for _, Interface in ipairs(CoreGui:GetChildren()) do
  620. if Interface.Name == Rayfield.Name and Interface ~= Rayfield then
  621. Interface.Enabled = false
  622. Interface.Name = "Rayfield-Old"
  623. end
  624. end
  625. end
  626.  
  627.  
  628. local minSize = Vector2.new(1024, 768)
  629. local useMobileSizing
  630.  
  631. if Rayfield.AbsoluteSize.X < minSize.X and Rayfield.AbsoluteSize.Y < minSize.Y then
  632. useMobileSizing = true
  633. end
  634.  
  635. if UserInputService.TouchEnabled then
  636. useMobilePrompt = true
  637. end
  638.  
  639.  
  640. -- Object Variables
  641.  
  642. local Main = Rayfield.Main
  643. local MPrompt = Rayfield:FindFirstChild('Prompt')
  644. local Topbar = Main.Topbar
  645. local Elements = Main.Elements
  646. local LoadingFrame = Main.LoadingFrame
  647. local TabList = Main.TabList
  648. local dragBar = Rayfield:FindFirstChild('Drag')
  649. local dragInteract = dragBar and dragBar.Interact or nil
  650. local dragBarCosmetic = dragBar and dragBar.Drag or nil
  651.  
  652. local dragOffset = 255
  653. local dragOffsetMobile = 150
  654.  
  655. Rayfield.DisplayOrder = 100
  656. LoadingFrame.Version.Text = Release
  657.  
  658. -- Thanks to Latte Softworks for the Lucide integration for Roblox
  659. local Icons = useStudio and require(script.Parent.icons) or loadstring(game:HttpGet('https://raw.githubusercontent.com/SiriusSoftwareLtd/Rayfield/refs/heads/main/icons.lua'))()
  660.  
  661. -- Variables
  662.  
  663. local CFileName = nil
  664. local CEnabled = false
  665. local Minimised = false
  666. local Hidden = false
  667. local Debounce = false
  668. local searchOpen = false
  669. local Notifications = Rayfield.Notifications
  670.  
  671. local SelectedTheme = RayfieldLibrary.Theme.Default
  672.  
  673. local function ChangeTheme(Theme)
  674. if typeof(Theme) == 'string' then
  675. SelectedTheme = RayfieldLibrary.Theme[Theme]
  676. elseif typeof(Theme) == 'table' then
  677. SelectedTheme = Theme
  678. end
  679.  
  680. Rayfield.Main.BackgroundColor3 = SelectedTheme.Background
  681. Rayfield.Main.Topbar.BackgroundColor3 = SelectedTheme.Topbar
  682. Rayfield.Main.Topbar.CornerRepair.BackgroundColor3 = SelectedTheme.Topbar
  683. Rayfield.Main.Shadow.Image.ImageColor3 = SelectedTheme.Shadow
  684.  
  685. Rayfield.Main.Topbar.ChangeSize.ImageColor3 = SelectedTheme.TextColor
  686. Rayfield.Main.Topbar.Hide.ImageColor3 = SelectedTheme.TextColor
  687. Rayfield.Main.Topbar.Search.ImageColor3 = SelectedTheme.TextColor
  688. if Topbar:FindFirstChild('Settings') then
  689. Rayfield.Main.Topbar.Settings.ImageColor3 = SelectedTheme.TextColor
  690. Rayfield.Main.Topbar.Divider.BackgroundColor3 = SelectedTheme.ElementStroke
  691. end
  692.  
  693. Main.Search.BackgroundColor3 = SelectedTheme.TextColor
  694. Main.Search.Shadow.ImageColor3 = SelectedTheme.TextColor
  695. Main.Search.Search.ImageColor3 = SelectedTheme.TextColor
  696. Main.Search.Input.PlaceholderColor3 = SelectedTheme.TextColor
  697. Main.Search.UIStroke.Color = SelectedTheme.SecondaryElementStroke
  698.  
  699. if Main:FindFirstChild('Notice') then
  700. Main.Notice.BackgroundColor3 = SelectedTheme.Background
  701. end
  702.  
  703. for _, text in ipairs(Rayfield:GetDescendants()) do
  704. if text.Parent.Parent ~= Notifications then
  705. if text:IsA('TextLabel') or text:IsA('TextBox') then text.TextColor3 = SelectedTheme.TextColor end
  706. end
  707. end
  708.  
  709. for _, TabPage in ipairs(Elements:GetChildren()) do
  710. for _, Element in ipairs(TabPage:GetChildren()) do
  711. if Element.ClassName == "Frame" and Element.Name ~= "Placeholder" and Element.Name ~= "SectionSpacing" and Element.Name ~= "Divider" and Element.Name ~= "SectionTitle" and Element.Name ~= "SearchTitle-fsefsefesfsefesfesfThanks" then
  712. Element.BackgroundColor3 = SelectedTheme.ElementBackground
  713. Element.UIStroke.Color = SelectedTheme.ElementStroke
  714. end
  715. end
  716. end
  717. end
  718.  
  719. local function getIcon(name : string)
  720. name = string.match(string.lower(name), "^%s*(.*)%s*$") :: string
  721. local sizedicons = Icons['48px']
  722.  
  723. local r = sizedicons[name]
  724. if not r then
  725. error(`Lucide Icons: Failed to find icon by the name of "{name}"`, 2)
  726. end
  727.  
  728. local rirs = r[2]
  729. local riro = r[3]
  730.  
  731. if type(r[1]) ~= "number" or type(rirs) ~= "table" or type(riro) ~= "table" then
  732. error("Lucide Icons: Internal error: Invalid auto-generated asset entry")
  733. end
  734.  
  735. local irs = Vector2.new(rirs[1], rirs[2])
  736. local iro = Vector2.new(riro[1], riro[2])
  737.  
  738. local asset = {
  739. id = r[1],
  740. imageRectSize = irs,
  741. imageRectOffset = iro,
  742. }
  743.  
  744. return asset
  745. end
  746.  
  747. local function makeDraggable(object, dragObject, enableTaptic, tapticOffset)
  748. local dragging = false
  749. local relative = nil
  750.  
  751. local offset = Vector2.zero
  752. local screenGui = object:FindFirstAncestorWhichIsA("ScreenGui")
  753. if screenGui and screenGui.IgnoreGuiInset then
  754. offset += getService('GuiService'):GetGuiInset()
  755. end
  756.  
  757. local function connectFunctions()
  758. if dragBar and enableTaptic then
  759. dragBar.MouseEnter:Connect(function()
  760. if not dragging and not Hidden then
  761. TweenService:Create(dragBarCosmetic, TweenInfo.new(0.25, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {BackgroundTransparency = 0.5, Size = UDim2.new(0, 120, 0, 4)}):Play()
  762. end
  763. end)
  764.  
  765. dragBar.MouseLeave:Connect(function()
  766. if not dragging and not Hidden then
  767. TweenService:Create(dragBarCosmetic, TweenInfo.new(0.25, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {BackgroundTransparency = 0.7, Size = UDim2.new(0, 100, 0, 4)}):Play()
  768. end
  769. end)
  770. end
  771. end
  772.  
  773. connectFunctions()
  774.  
  775. dragObject.InputBegan:Connect(function(input, processed)
  776. if processed then return end
  777.  
  778. local inputType = input.UserInputType.Name
  779. if inputType == "MouseButton1" or inputType == "Touch" then
  780. dragging = true
  781.  
  782. relative = object.AbsolutePosition + object.AbsoluteSize * object.AnchorPoint - UserInputService:GetMouseLocation()
  783. if enableTaptic and not Hidden then
  784. TweenService:Create(dragBarCosmetic, TweenInfo.new(0.35, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {Size = UDim2.new(0, 110, 0, 4), BackgroundTransparency = 0}):Play()
  785. end
  786. end
  787. end)
  788.  
  789. local inputEnded = UserInputService.InputEnded:Connect(function(input)
  790. if not dragging then return end
  791.  
  792. local inputType = input.UserInputType.Name
  793. if inputType == "MouseButton1" or inputType == "Touch" then
  794. dragging = false
  795.  
  796. connectFunctions()
  797.  
  798. if enableTaptic and not Hidden then
  799. TweenService:Create(dragBarCosmetic, TweenInfo.new(0.35, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {Size = UDim2.new(0, 100, 0, 4), BackgroundTransparency = 0.7}):Play()
  800. end
  801. end
  802. end)
  803.  
  804. local renderStepped = RunService.RenderStepped:Connect(function()
  805. if dragging and not Hidden then
  806. local position = UserInputService:GetMouseLocation() + relative + offset
  807. if enableTaptic and tapticOffset then
  808. TweenService:Create(object, TweenInfo.new(0.4, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {Position = UDim2.fromOffset(position.X, position.Y)}):Play()
  809. TweenService:Create(dragObject.Parent, TweenInfo.new(0.05, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {Position = UDim2.fromOffset(position.X, position.Y + ((useMobileSizing and tapticOffset[2]) or tapticOffset[1]))}):Play()
  810. else
  811. if dragBar and tapticOffset then
  812. dragBar.Position = UDim2.fromOffset(position.X, position.Y + ((useMobileSizing and tapticOffset[2]) or tapticOffset[1]))
  813. end
  814. object.Position = UDim2.fromOffset(position.X, position.Y)
  815. end
  816. end
  817. end)
  818.  
  819. object.Destroying:Connect(function()
  820. if inputEnded then inputEnded:Disconnect() end
  821. if renderStepped then renderStepped:Disconnect() end
  822. end)
  823. end
  824.  
  825.  
  826. local function PackColor(Color)
  827. return {R = Color.R * 255, G = Color.G * 255, B = Color.B * 255}
  828. end
  829.  
  830. local function UnpackColor(Color)
  831. return Color3.fromRGB(Color.R, Color.G, Color.B)
  832. end
  833.  
  834. local function LoadConfiguration(Configuration)
  835. local success, Data = pcall(function() return HttpService:JSONDecode(Configuration) end)
  836. local changed
  837.  
  838. if not success then warn('Rayfield had an issue decoding the configuration file, please try delete the file and reopen Rayfield.') return end
  839.  
  840. -- Iterate through current UI elements' flags
  841. for FlagName, Flag in pairs(RayfieldLibrary.Flags) do
  842. local FlagValue = Data[FlagName]
  843.  
  844. if (typeof(FlagValue) == 'boolean' and FlagValue == false) or FlagValue then
  845. task.spawn(function()
  846. if Flag.Type == "ColorPicker" then
  847. changed = true
  848. Flag:Set(UnpackColor(FlagValue))
  849. else
  850. if (Flag.CurrentValue or Flag.CurrentKeybind or Flag.CurrentOption or Flag.Color) ~= FlagValue then
  851. changed = true
  852. Flag:Set(FlagValue)
  853. end
  854. end
  855. end)
  856. else
  857. warn("Rayfield | Unable to find '"..FlagName.. "' in the save file.")
  858. print("The error above may not be an issue if new elements have been added or not been set values.")
  859. --RayfieldLibrary:Notify({Title = "Rayfield Flags", Content = "Rayfield was unable to find '"..FlagName.. "' in the save file. Check sirius.menu/discord for help.", Image = 3944688398})
  860. end
  861. end
  862.  
  863. return changed
  864. end
  865.  
  866. local function SaveConfiguration()
  867. if not CEnabled or not globalLoaded then return end
  868.  
  869. if debugX then
  870. print('Saving')
  871. end
  872.  
  873. local Data = {}
  874. for i, v in pairs(RayfieldLibrary.Flags) do
  875. if v.Type == "ColorPicker" then
  876. Data[i] = PackColor(v.Color)
  877. else
  878. if typeof(v.CurrentValue) == 'boolean' then
  879. if v.CurrentValue == false then
  880. Data[i] = false
  881. else
  882. Data[i] = v.CurrentValue or v.CurrentKeybind or v.CurrentOption or v.Color
  883. end
  884. else
  885. Data[i] = v.CurrentValue or v.CurrentKeybind or v.CurrentOption or v.Color
  886. end
  887. end
  888. end
  889.  
  890. if useStudio then
  891. if script.Parent:FindFirstChild('configuration') then script.Parent.configuration:Destroy() end
  892.  
  893. local ScreenGui = Instance.new("ScreenGui")
  894. ScreenGui.Parent = script.Parent
  895. ScreenGui.Name = 'configuration'
  896.  
  897. local TextBox = Instance.new("TextBox")
  898. TextBox.Parent = ScreenGui
  899. TextBox.Size = UDim2.new(0, 800, 0, 50)
  900. TextBox.AnchorPoint = Vector2.new(0.5, 0)
  901. TextBox.Position = UDim2.new(0.5, 0, 0, 30)
  902. TextBox.Text = HttpService:JSONEncode(Data)
  903. TextBox.ClearTextOnFocus = false
  904. end
  905.  
  906. if debugX then
  907. warn(HttpService:JSONEncode(Data))
  908. end
  909.  
  910. if writefile then
  911. writefile(ConfigurationFolder .. "/" .. CFileName .. ConfigurationExtension, tostring(HttpService:JSONEncode(Data)))
  912. end
  913. end
  914.  
  915. function RayfieldLibrary:Notify(data) -- action e.g open messages
  916. task.spawn(function()
  917.  
  918. -- Notification Object Creation
  919. local newNotification = Notifications.Template:Clone()
  920. newNotification.Name = data.Title or 'No Title Provided'
  921. newNotification.Parent = Notifications
  922. newNotification.LayoutOrder = #Notifications:GetChildren()
  923. newNotification.Visible = false
  924.  
  925. -- Set Data
  926. newNotification.Title.Text = data.Title or "Unknown Title"
  927. newNotification.Description.Text = data.Content or "Unknown Content"
  928.  
  929. if data.Image then
  930. if typeof(data.Image) == 'string' then
  931. local asset = getIcon(data.Image)
  932.  
  933. newNotification.Icon.Image = 'rbxassetid://'..asset.id
  934. newNotification.Icon.ImageRectOffset = asset.imageRectOffset
  935. newNotification.Icon.ImageRectSize = asset.imageRectSize
  936. else
  937. newNotification.Icon.Image = "rbxassetid://" .. (data.Image or 0)
  938. end
  939. else
  940. newNotification.Icon.Image = "rbxassetid://" .. 0
  941. end
  942.  
  943. -- Set initial transparency values
  944.  
  945. newNotification.Title.TextColor3 = SelectedTheme.TextColor
  946. newNotification.Description.TextColor3 = SelectedTheme.TextColor
  947. newNotification.BackgroundColor3 = SelectedTheme.Background
  948. newNotification.UIStroke.Color = SelectedTheme.TextColor
  949. newNotification.Icon.ImageColor3 = SelectedTheme.TextColor
  950.  
  951. newNotification.BackgroundTransparency = 1
  952. newNotification.Title.TextTransparency = 1
  953. newNotification.Description.TextTransparency = 1
  954. newNotification.UIStroke.Transparency = 1
  955. newNotification.Shadow.ImageTransparency = 1
  956. newNotification.Size = UDim2.new(1, 0, 0, 800)
  957. newNotification.Icon.ImageTransparency = 1
  958. newNotification.Icon.BackgroundTransparency = 1
  959.  
  960. task.wait()
  961.  
  962. newNotification.Visible = true
  963.  
  964. if data.Actions then
  965. warn('Rayfield | Not seeing your actions in notifications?')
  966. print("Notification Actions are being sunset for now, keep up to date on when they're back in the discord. (sirius.menu/discord)")
  967. end
  968.  
  969. -- Calculate textbounds and set initial values
  970. local bounds = {newNotification.Title.TextBounds.Y, newNotification.Description.TextBounds.Y}
  971. newNotification.Size = UDim2.new(1, -60, 0, -Notifications:FindFirstChild("UIListLayout").Padding.Offset)
  972.  
  973. newNotification.Icon.Size = UDim2.new(0, 32, 0, 32)
  974. newNotification.Icon.Position = UDim2.new(0, 20, 0.5, 0)
  975.  
  976. TweenService:Create(newNotification, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Size = UDim2.new(1, 0, 0, math.max(bounds[1] + bounds[2] + 31, 60))}):Play()
  977.  
  978. task.wait(0.15)
  979. TweenService:Create(newNotification, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0.45}):Play()
  980. TweenService:Create(newNotification.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  981.  
  982. task.wait(0.05)
  983.  
  984. TweenService:Create(newNotification.Icon, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {ImageTransparency = 0}):Play()
  985.  
  986. task.wait(0.05)
  987. TweenService:Create(newNotification.Description, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 0.35}):Play()
  988. TweenService:Create(newNotification.UIStroke, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {Transparency = 0.95}):Play()
  989. TweenService:Create(newNotification.Shadow, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {ImageTransparency = 0.82}):Play()
  990.  
  991. local waitDuration = math.min(math.max((#newNotification.Description.Text * 0.1) + 2.5, 3), 10)
  992. task.wait(data.Duration or waitDuration)
  993.  
  994. newNotification.Icon.Visible = false
  995. TweenService:Create(newNotification, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  996. TweenService:Create(newNotification.UIStroke, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  997. TweenService:Create(newNotification.Shadow, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {ImageTransparency = 1}):Play()
  998. TweenService:Create(newNotification.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  999. TweenService:Create(newNotification.Description, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1000.  
  1001. TweenService:Create(newNotification, TweenInfo.new(1, Enum.EasingStyle.Exponential), {Size = UDim2.new(1, -90, 0, 0)}):Play()
  1002.  
  1003. task.wait(1)
  1004.  
  1005. TweenService:Create(newNotification, TweenInfo.new(1, Enum.EasingStyle.Exponential), {Size = UDim2.new(1, -90, 0, -Notifications:FindFirstChild("UIListLayout").Padding.Offset)}):Play()
  1006.  
  1007. newNotification.Visible = false
  1008. newNotification:Destroy()
  1009. end)
  1010. end
  1011.  
  1012. local function openSearch()
  1013. searchOpen = true
  1014.  
  1015. Main.Search.BackgroundTransparency = 1
  1016. Main.Search.Shadow.ImageTransparency = 1
  1017. Main.Search.Input.TextTransparency = 1
  1018. Main.Search.Search.ImageTransparency = 1
  1019. Main.Search.UIStroke.Transparency = 1
  1020. Main.Search.Size = UDim2.new(1, 0, 0, 80)
  1021. Main.Search.Position = UDim2.new(0.5, 0, 0, 70)
  1022.  
  1023. Main.Search.Input.Interactable = true
  1024.  
  1025. Main.Search.Visible = true
  1026.  
  1027. for _, tabbtn in ipairs(TabList:GetChildren()) do
  1028. if tabbtn.ClassName == "Frame" and tabbtn.Name ~= "Placeholder" then
  1029. tabbtn.Interact.Visible = false
  1030. TweenService:Create(tabbtn, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  1031. TweenService:Create(tabbtn.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1032. TweenService:Create(tabbtn.Image, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {ImageTransparency = 1}):Play()
  1033. TweenService:Create(tabbtn.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  1034. end
  1035. end
  1036.  
  1037. Main.Search.Input:CaptureFocus()
  1038. TweenService:Create(Main.Search.Shadow, TweenInfo.new(0.05, Enum.EasingStyle.Quint), {ImageTransparency = 0.95}):Play()
  1039. TweenService:Create(Main.Search, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {Position = UDim2.new(0.5, 0, 0, 57), BackgroundTransparency = 0.9}):Play()
  1040. TweenService:Create(Main.Search.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {Transparency = 0.8}):Play()
  1041. TweenService:Create(Main.Search.Input, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 0.2}):Play()
  1042. TweenService:Create(Main.Search.Search, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {ImageTransparency = 0.5}):Play()
  1043. TweenService:Create(Main.Search, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Size = UDim2.new(1, -35, 0, 35)}):Play()
  1044. end
  1045.  
  1046. local function closeSearch()
  1047. searchOpen = false
  1048.  
  1049. TweenService:Create(Main.Search, TweenInfo.new(0.35, Enum.EasingStyle.Quint), {BackgroundTransparency = 1, Size = UDim2.new(1, -55, 0, 30)}):Play()
  1050. TweenService:Create(Main.Search.Search, TweenInfo.new(0.15, Enum.EasingStyle.Quint), {ImageTransparency = 1}):Play()
  1051. TweenService:Create(Main.Search.Shadow, TweenInfo.new(0.15, Enum.EasingStyle.Quint), {ImageTransparency = 1}):Play()
  1052. TweenService:Create(Main.Search.UIStroke, TweenInfo.new(0.15, Enum.EasingStyle.Quint), {Transparency = 1}):Play()
  1053. TweenService:Create(Main.Search.Input, TweenInfo.new(0.15, Enum.EasingStyle.Quint), {TextTransparency = 1}):Play()
  1054.  
  1055. for _, tabbtn in ipairs(TabList:GetChildren()) do
  1056. if tabbtn.ClassName == "Frame" and tabbtn.Name ~= "Placeholder" then
  1057. tabbtn.Interact.Visible = true
  1058. if tostring(Elements.UIPageLayout.CurrentPage) == tabbtn.Title.Text then
  1059. TweenService:Create(tabbtn, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  1060. TweenService:Create(tabbtn.Image, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {ImageTransparency = 0}):Play()
  1061. TweenService:Create(tabbtn.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  1062. TweenService:Create(tabbtn.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  1063. else
  1064. TweenService:Create(tabbtn, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0.7}):Play()
  1065. TweenService:Create(tabbtn.Image, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {ImageTransparency = 0.2}):Play()
  1066. TweenService:Create(tabbtn.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 0.2}):Play()
  1067. TweenService:Create(tabbtn.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {Transparency = 0.5}):Play()
  1068. end
  1069. end
  1070. end
  1071.  
  1072. Main.Search.Input.Text = ''
  1073. Main.Search.Input.Interactable = false
  1074. end
  1075.  
  1076. local function Hide(notify: boolean?)
  1077. if MPrompt then
  1078. MPrompt.Title.TextColor3 = Color3.fromRGB(255, 255, 255)
  1079. MPrompt.Position = UDim2.new(0.5, 0, 0, -50)
  1080. MPrompt.Size = UDim2.new(0, 40, 0, 10)
  1081. MPrompt.BackgroundTransparency = 1
  1082. MPrompt.Title.TextTransparency = 1
  1083. MPrompt.Visible = true
  1084. end
  1085.  
  1086. task.spawn(closeSearch)
  1087.  
  1088. Debounce = true
  1089. if notify then
  1090. if useMobilePrompt then
  1091. RayfieldLibrary:Notify({Title = "Interface Hidden", Content = "The interface has been hidden, you can unhide the interface by tapping 'Show Rayfield'.", Duration = 7, Image = 4400697855})
  1092. else
  1093. RayfieldLibrary:Notify({Title = "Interface Hidden", Content = `The interface has been hidden, you can unhide the interface by tapping {settingsTable.General.rayfieldOpen.Value or 'K'}.`, Duration = 7, Image = 4400697855})
  1094. end
  1095. end
  1096.  
  1097. TweenService:Create(Main, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Size = UDim2.new(0, 470, 0, 0)}):Play()
  1098. TweenService:Create(Main.Topbar, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Size = UDim2.new(0, 470, 0, 45)}):Play()
  1099. TweenService:Create(Main, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  1100. TweenService:Create(Main.Topbar, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  1101. TweenService:Create(Main.Topbar.Divider, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  1102. TweenService:Create(Main.Topbar.CornerRepair, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  1103. TweenService:Create(Main.Topbar.Title, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1104. TweenService:Create(Main.Shadow.Image, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {ImageTransparency = 1}):Play()
  1105. TweenService:Create(Topbar.UIStroke, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  1106. TweenService:Create(dragBarCosmetic, TweenInfo.new(0.25, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {BackgroundTransparency = 1}):Play()
  1107.  
  1108. if useMobilePrompt and MPrompt then
  1109. TweenService:Create(MPrompt, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Size = UDim2.new(0, 120, 0, 30), Position = UDim2.new(0.5, 0, 0, 20), BackgroundTransparency = 0.3}):Play()
  1110. TweenService:Create(MPrompt.Title, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {TextTransparency = 0.3}):Play()
  1111. end
  1112.  
  1113. for _, TopbarButton in ipairs(Topbar:GetChildren()) do
  1114. if TopbarButton.ClassName == "ImageButton" then
  1115. TweenService:Create(TopbarButton, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {ImageTransparency = 1}):Play()
  1116. end
  1117. end
  1118.  
  1119. for _, tabbtn in ipairs(TabList:GetChildren()) do
  1120. if tabbtn.ClassName == "Frame" and tabbtn.Name ~= "Placeholder" then
  1121. TweenService:Create(tabbtn, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  1122. TweenService:Create(tabbtn.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1123. TweenService:Create(tabbtn.Image, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {ImageTransparency = 1}):Play()
  1124. TweenService:Create(tabbtn.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  1125. end
  1126. end
  1127.  
  1128. dragInteract.Visible = false
  1129.  
  1130. for _, tab in ipairs(Elements:GetChildren()) do
  1131. if tab.Name ~= "Template" and tab.ClassName == "ScrollingFrame" and tab.Name ~= "Placeholder" then
  1132. for _, element in ipairs(tab:GetChildren()) do
  1133. if element.ClassName == "Frame" then
  1134. if element.Name ~= "SectionSpacing" and element.Name ~= "Placeholder" then
  1135. if element.Name == "SectionTitle" or element.Name == 'SearchTitle-fsefsefesfsefesfesfThanks' then
  1136. TweenService:Create(element.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1137. elseif element.Name == 'Divider' then
  1138. TweenService:Create(element.Divider, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  1139. else
  1140. TweenService:Create(element, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  1141. TweenService:Create(element.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  1142. TweenService:Create(element.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1143. end
  1144. for _, child in ipairs(element:GetChildren()) do
  1145. if child.ClassName == "Frame" or child.ClassName == "TextLabel" or child.ClassName == "TextBox" or child.ClassName == "ImageButton" or child.ClassName == "ImageLabel" then
  1146. child.Visible = false
  1147. end
  1148. end
  1149. end
  1150. end
  1151. end
  1152. end
  1153. end
  1154.  
  1155. task.wait(0.5)
  1156. Main.Visible = false
  1157. Debounce = false
  1158. end
  1159.  
  1160. local function Maximise()
  1161. Debounce = true
  1162. Topbar.ChangeSize.Image = "rbxassetid://"..10137941941
  1163.  
  1164. TweenService:Create(Topbar.UIStroke, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  1165. TweenService:Create(Main.Shadow.Image, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {ImageTransparency = 0.6}):Play()
  1166. TweenService:Create(Topbar.CornerRepair, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  1167. TweenService:Create(Topbar.Divider, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  1168. TweenService:Create(dragBarCosmetic, TweenInfo.new(0.25, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {BackgroundTransparency = 0.7}):Play()
  1169. TweenService:Create(Main, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Size = useMobileSizing and UDim2.new(0, 500, 0, 275) or UDim2.new(0, 500, 0, 475)}):Play()
  1170. TweenService:Create(Topbar, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Size = UDim2.new(0, 500, 0, 45)}):Play()
  1171. TabList.Visible = true
  1172. task.wait(0.2)
  1173.  
  1174. Elements.Visible = true
  1175.  
  1176. for _, tab in ipairs(Elements:GetChildren()) do
  1177. if tab.Name ~= "Template" and tab.ClassName == "ScrollingFrame" and tab.Name ~= "Placeholder" then
  1178. for _, element in ipairs(tab:GetChildren()) do
  1179. if element.ClassName == "Frame" then
  1180. if element.Name ~= "SectionSpacing" and element.Name ~= "Placeholder" then
  1181. if element.Name == "SectionTitle" or element.Name == 'SearchTitle-fsefsefesfsefesfesfThanks' then
  1182. TweenService:Create(element.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 0.4}):Play()
  1183. elseif element.Name == 'Divider' then
  1184. TweenService:Create(element.Divider, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0.85}):Play()
  1185. else
  1186. TweenService:Create(element, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  1187. TweenService:Create(element.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  1188. TweenService:Create(element.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  1189. end
  1190. for _, child in ipairs(element:GetChildren()) do
  1191. if child.ClassName == "Frame" or child.ClassName == "TextLabel" or child.ClassName == "TextBox" or child.ClassName == "ImageButton" or child.ClassName == "ImageLabel" then
  1192. child.Visible = true
  1193. end
  1194. end
  1195. end
  1196. end
  1197. end
  1198. end
  1199. end
  1200.  
  1201. task.wait(0.1)
  1202.  
  1203. for _, tabbtn in ipairs(TabList:GetChildren()) do
  1204. if tabbtn.ClassName == "Frame" and tabbtn.Name ~= "Placeholder" then
  1205. if tostring(Elements.UIPageLayout.CurrentPage) == tabbtn.Title.Text then
  1206. TweenService:Create(tabbtn, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  1207. TweenService:Create(tabbtn.Image, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {ImageTransparency = 0}):Play()
  1208. TweenService:Create(tabbtn.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  1209. TweenService:Create(tabbtn.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  1210. else
  1211. TweenService:Create(tabbtn, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0.7}):Play()
  1212. TweenService:Create(tabbtn.Image, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {ImageTransparency = 0.2}):Play()
  1213. TweenService:Create(tabbtn.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 0.2}):Play()
  1214. TweenService:Create(tabbtn.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {Transparency = 0.5}):Play()
  1215. end
  1216.  
  1217. end
  1218. end
  1219.  
  1220. task.wait(0.5)
  1221. Debounce = false
  1222. end
  1223.  
  1224.  
  1225. local function Unhide()
  1226. Debounce = true
  1227. Main.Position = UDim2.new(0.5, 0, 0.5, 0)
  1228. Main.Visible = true
  1229. TweenService:Create(Main, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Size = useMobileSizing and UDim2.new(0, 500, 0, 275) or UDim2.new(0, 500, 0, 475)}):Play()
  1230. TweenService:Create(Main.Topbar, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Size = UDim2.new(0, 500, 0, 45)}):Play()
  1231. TweenService:Create(Main.Shadow.Image, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {ImageTransparency = 0.6}):Play()
  1232. TweenService:Create(Main, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  1233. TweenService:Create(Main.Topbar, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  1234. TweenService:Create(Main.Topbar.Divider, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  1235. TweenService:Create(Main.Topbar.CornerRepair, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  1236. TweenService:Create(Main.Topbar.Title, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  1237.  
  1238. if MPrompt then
  1239. TweenService:Create(MPrompt, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Size = UDim2.new(0, 40, 0, 10), Position = UDim2.new(0.5, 0, 0, -50), BackgroundTransparency = 1}):Play()
  1240. TweenService:Create(MPrompt.Title, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1241.  
  1242. task.spawn(function()
  1243. task.wait(0.5)
  1244. MPrompt.Visible = false
  1245. end)
  1246. end
  1247.  
  1248. if Minimised then
  1249. task.spawn(Maximise)
  1250. end
  1251.  
  1252. dragBar.Position = useMobileSizing and UDim2.new(0.5, 0, 0.5, dragOffsetMobile) or UDim2.new(0.5, 0, 0.5, dragOffset)
  1253.  
  1254. dragInteract.Visible = true
  1255.  
  1256. for _, TopbarButton in ipairs(Topbar:GetChildren()) do
  1257. if TopbarButton.ClassName == "ImageButton" then
  1258. if TopbarButton.Name == 'Icon' then
  1259. TweenService:Create(TopbarButton, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {ImageTransparency = 0}):Play()
  1260. else
  1261. TweenService:Create(TopbarButton, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {ImageTransparency = 0.8}):Play()
  1262. end
  1263.  
  1264. end
  1265. end
  1266.  
  1267. for _, tabbtn in ipairs(TabList:GetChildren()) do
  1268. if tabbtn.ClassName == "Frame" and tabbtn.Name ~= "Placeholder" then
  1269. if tostring(Elements.UIPageLayout.CurrentPage) == tabbtn.Title.Text then
  1270. TweenService:Create(tabbtn, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  1271. TweenService:Create(tabbtn.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  1272. TweenService:Create(tabbtn.Image, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {ImageTransparency = 0}):Play()
  1273. TweenService:Create(tabbtn.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  1274. else
  1275. TweenService:Create(tabbtn, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0.7}):Play()
  1276. TweenService:Create(tabbtn.Image, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {ImageTransparency = 0.2}):Play()
  1277. TweenService:Create(tabbtn.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 0.2}):Play()
  1278. TweenService:Create(tabbtn.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {Transparency = 0.5}):Play()
  1279. end
  1280. end
  1281. end
  1282.  
  1283. for _, tab in ipairs(Elements:GetChildren()) do
  1284. if tab.Name ~= "Template" and tab.ClassName == "ScrollingFrame" and tab.Name ~= "Placeholder" then
  1285. for _, element in ipairs(tab:GetChildren()) do
  1286. if element.ClassName == "Frame" then
  1287. if element.Name ~= "SectionSpacing" and element.Name ~= "Placeholder" then
  1288. if element.Name == "SectionTitle" or element.Name == 'SearchTitle-fsefsefesfsefesfesfThanks' then
  1289. TweenService:Create(element.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 0.4}):Play()
  1290. elseif element.Name == 'Divider' then
  1291. TweenService:Create(element.Divider, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0.85}):Play()
  1292. else
  1293. TweenService:Create(element, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  1294. TweenService:Create(element.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  1295. TweenService:Create(element.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  1296. end
  1297. for _, child in ipairs(element:GetChildren()) do
  1298. if child.ClassName == "Frame" or child.ClassName == "TextLabel" or child.ClassName == "TextBox" or child.ClassName == "ImageButton" or child.ClassName == "ImageLabel" then
  1299. child.Visible = true
  1300. end
  1301. end
  1302. end
  1303. end
  1304. end
  1305. end
  1306. end
  1307.  
  1308. TweenService:Create(dragBarCosmetic, TweenInfo.new(0.25, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {BackgroundTransparency = 0.5}):Play()
  1309.  
  1310. task.wait(0.5)
  1311. Minimised = false
  1312. Debounce = false
  1313. end
  1314.  
  1315. local function Minimise()
  1316. Debounce = true
  1317. Topbar.ChangeSize.Image = "rbxassetid://"..11036884234
  1318.  
  1319. Topbar.UIStroke.Color = SelectedTheme.ElementStroke
  1320.  
  1321. task.spawn(closeSearch)
  1322.  
  1323. for _, tabbtn in ipairs(TabList:GetChildren()) do
  1324. if tabbtn.ClassName == "Frame" and tabbtn.Name ~= "Placeholder" then
  1325. TweenService:Create(tabbtn, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  1326. TweenService:Create(tabbtn.Image, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {ImageTransparency = 1}):Play()
  1327. TweenService:Create(tabbtn.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1328. TweenService:Create(tabbtn.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  1329. end
  1330. end
  1331.  
  1332. for _, tab in ipairs(Elements:GetChildren()) do
  1333. if tab.Name ~= "Template" and tab.ClassName == "ScrollingFrame" and tab.Name ~= "Placeholder" then
  1334. for _, element in ipairs(tab:GetChildren()) do
  1335. if element.ClassName == "Frame" then
  1336. if element.Name ~= "SectionSpacing" and element.Name ~= "Placeholder" then
  1337. if element.Name == "SectionTitle" or element.Name == 'SearchTitle-fsefsefesfsefesfesfThanks' then
  1338. TweenService:Create(element.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1339. elseif element.Name == 'Divider' then
  1340. TweenService:Create(element.Divider, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  1341. else
  1342. TweenService:Create(element, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  1343. TweenService:Create(element.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  1344. TweenService:Create(element.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1345. end
  1346. for _, child in ipairs(element:GetChildren()) do
  1347. if child.ClassName == "Frame" or child.ClassName == "TextLabel" or child.ClassName == "TextBox" or child.ClassName == "ImageButton" or child.ClassName == "ImageLabel" then
  1348. child.Visible = false
  1349. end
  1350. end
  1351. end
  1352. end
  1353. end
  1354. end
  1355. end
  1356.  
  1357. TweenService:Create(dragBarCosmetic, TweenInfo.new(0.25, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {BackgroundTransparency = 1}):Play()
  1358. TweenService:Create(Topbar.UIStroke, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  1359. TweenService:Create(Main.Shadow.Image, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {ImageTransparency = 1}):Play()
  1360. TweenService:Create(Topbar.CornerRepair, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  1361. TweenService:Create(Topbar.Divider, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  1362. TweenService:Create(Main, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Size = UDim2.new(0, 495, 0, 45)}):Play()
  1363. TweenService:Create(Topbar, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Size = UDim2.new(0, 495, 0, 45)}):Play()
  1364.  
  1365. task.wait(0.3)
  1366.  
  1367. Elements.Visible = false
  1368. TabList.Visible = false
  1369.  
  1370. task.wait(0.2)
  1371. Debounce = false
  1372. end
  1373.  
  1374. local function updateSettings()
  1375. local encoded
  1376. local success, err = pcall(function()
  1377. encoded = HttpService:JSONEncode(settingsTable)
  1378. end)
  1379.  
  1380. if success then
  1381. if useStudio then
  1382. if script.Parent['get.val'] then
  1383. script.Parent['get.val'].Value = encoded
  1384. end
  1385. end
  1386. if writefile then
  1387. writefile(RayfieldFolder..'/settings'..ConfigurationExtension, encoded)
  1388. end
  1389. end
  1390. end
  1391.  
  1392. local function createSettings(window)
  1393. if not (writefile and isfile and readfile and isfolder and makefolder) and not useStudio then
  1394. if Topbar['Settings'] then Topbar.Settings.Visible = false end
  1395. Topbar['Search'].Position = UDim2.new(1, -75, 0.5, 0)
  1396. warn('Can\'t create settings as no file-saving functionality is available.')
  1397. return
  1398. end
  1399.  
  1400. local newTab = window:CreateTab('Rayfield Settings', 0, true)
  1401.  
  1402. if TabList['Rayfield Settings'] then
  1403. TabList['Rayfield Settings'].LayoutOrder = 1000
  1404. end
  1405.  
  1406. if Elements['Rayfield Settings'] then
  1407. Elements['Rayfield Settings'].LayoutOrder = 1000
  1408. end
  1409.  
  1410. -- Create sections and elements
  1411. for categoryName, settingCategory in pairs(settingsTable) do
  1412. newTab:CreateSection(categoryName)
  1413.  
  1414. for _, setting in pairs(settingCategory) do
  1415. if setting.Type == 'input' then
  1416. setting.Element = newTab:CreateInput({
  1417. Name = setting.Name,
  1418. CurrentValue = setting.Value,
  1419. PlaceholderText = setting.Placeholder,
  1420. Ext = true,
  1421. RemoveTextAfterFocusLost = setting.ClearOnFocus,
  1422. Callback = function(Value)
  1423. setting.Value = Value
  1424. updateSettings()
  1425. end,
  1426. })
  1427. elseif setting.Type == 'toggle' then
  1428. setting.Element = newTab:CreateToggle({
  1429. Name = setting.Name,
  1430. CurrentValue = setting.Value,
  1431. Ext = true,
  1432. Callback = function(Value)
  1433. setting.Value = Value
  1434. updateSettings()
  1435. end,
  1436. })
  1437. elseif setting.Type == 'bind' then
  1438. setting.Element = newTab:CreateKeybind({
  1439. Name = setting.Name,
  1440. CurrentKeybind = setting.Value,
  1441. HoldToInteract = false,
  1442. Ext = true,
  1443. CallOnChange = true,
  1444. Callback = function(Value)
  1445. setting.Value = Value
  1446. updateSettings()
  1447. end,
  1448. })
  1449. end
  1450. end
  1451. end
  1452.  
  1453. settingsCreated = true
  1454. loadSettings()
  1455. updateSettings()
  1456. end
  1457.  
  1458.  
  1459.  
  1460. function RayfieldLibrary:CreateWindow(Settings)
  1461. if Rayfield:FindFirstChild('Loading') then
  1462. if getgenv and not getgenv().rayfieldCached then
  1463. Rayfield.Enabled = true
  1464. Rayfield.Loading.Visible = true
  1465.  
  1466. task.wait(1.4)
  1467. Rayfield.Loading.Visible = false
  1468. end
  1469. end
  1470.  
  1471. if getgenv then getgenv().rayfieldCached = true end
  1472.  
  1473. if not correctBuild and not Settings.DisableBuildWarnings then
  1474. task.delay(3,
  1475. function()
  1476. RayfieldLibrary:Notify({Title = 'Build Mismatch', Content = 'Rayfield may encounter issues as you are running an incompatible interface version ('.. ((Rayfield:FindFirstChild('Build') and Rayfield.Build.Value) or 'No Build') ..').\n\nThis version of Rayfield is intended for interface build '..InterfaceBuild..'.\n\nTry rejoining and then run the script twice.', Image = 4335487866, Duration = 15})
  1477. end)
  1478. end
  1479.  
  1480. if isfolder and not isfolder(RayfieldFolder) then
  1481. makefolder(RayfieldFolder)
  1482. end
  1483.  
  1484. local Passthrough = false
  1485. Topbar.Title.Text = Settings.Name
  1486.  
  1487. Main.Size = UDim2.new(0, 420, 0, 100)
  1488. Main.Visible = true
  1489. Main.BackgroundTransparency = 1
  1490. if Main:FindFirstChild('Notice') then Main.Notice.Visible = false end
  1491. Main.Shadow.Image.ImageTransparency = 1
  1492.  
  1493. LoadingFrame.Title.TextTransparency = 1
  1494. LoadingFrame.Subtitle.TextTransparency = 1
  1495.  
  1496. LoadingFrame.Version.TextTransparency = 1
  1497. LoadingFrame.Title.Text = Settings.LoadingTitle or "Rayfield"
  1498. LoadingFrame.Subtitle.Text = Settings.LoadingSubtitle or "Interface Suite"
  1499.  
  1500. if Settings.LoadingTitle ~= "Rayfield Interface Suite" then
  1501. LoadingFrame.Version.Text = "Rayfield UI"
  1502. end
  1503.  
  1504. if Settings.Icon and Settings.Icon ~= 0 and Topbar:FindFirstChild('Icon') then
  1505. Topbar.Icon.Visible = true
  1506. Topbar.Title.Position = UDim2.new(0, 47, 0.5, 0)
  1507.  
  1508. if Settings.Icon then
  1509. if typeof(Settings.Icon) == 'string' then
  1510. local asset = getIcon(Settings.Icon)
  1511.  
  1512. Topbar.Icon.Image = 'rbxassetid://'..asset.id
  1513. Topbar.Icon.ImageRectOffset = asset.imageRectOffset
  1514. Topbar.Icon.ImageRectSize = asset.imageRectSize
  1515. else
  1516. Topbar.Icon.Image = "rbxassetid://" .. (Settings.Icon or 0)
  1517. end
  1518. else
  1519. Topbar.Icon.Image = "rbxassetid://" .. 0
  1520. end
  1521. end
  1522.  
  1523. if dragBar then
  1524. dragBar.Visible = false
  1525. dragBarCosmetic.BackgroundTransparency = 1
  1526. dragBar.Visible = true
  1527. end
  1528.  
  1529. if Settings.Theme then
  1530. local success, result = pcall(ChangeTheme, Settings.Theme)
  1531. if not success then
  1532. local success, result2 = pcall(ChangeTheme, 'Default')
  1533. if not success then
  1534. warn('CRITICAL ERROR - NO DEFAULT THEME')
  1535. print(result2)
  1536. end
  1537. warn('issue rendering theme. no theme on file')
  1538. print(result)
  1539. end
  1540. end
  1541.  
  1542. Topbar.Visible = false
  1543. Elements.Visible = false
  1544. LoadingFrame.Visible = true
  1545.  
  1546. if not Settings.DisableRayfieldPrompts then
  1547. task.spawn(function()
  1548. while true do
  1549. task.wait(math.random(180, 600))
  1550. RayfieldLibrary:Notify({
  1551. Title = "Rayfield Interface",
  1552. Content = "Enjoying this UI library? Find it at sirius.menu/discord",
  1553. Duration = 7,
  1554. Image = 4370033185,
  1555. })
  1556. end
  1557. end)
  1558. end
  1559.  
  1560. pcall(function()
  1561. if not Settings.ConfigurationSaving.FileName then
  1562. Settings.ConfigurationSaving.FileName = tostring(game.PlaceId)
  1563. end
  1564.  
  1565. if Settings.ConfigurationSaving.Enabled == nil then
  1566. Settings.ConfigurationSaving.Enabled = false
  1567. end
  1568.  
  1569. CFileName = Settings.ConfigurationSaving.FileName
  1570. ConfigurationFolder = Settings.ConfigurationSaving.FolderName or ConfigurationFolder
  1571. CEnabled = Settings.ConfigurationSaving.Enabled
  1572.  
  1573. if Settings.ConfigurationSaving.Enabled then
  1574. if not isfolder(ConfigurationFolder) then
  1575. makefolder(ConfigurationFolder)
  1576. end
  1577. end
  1578. end)
  1579.  
  1580.  
  1581. makeDraggable(Main, Topbar, false, {dragOffset, dragOffsetMobile})
  1582. if dragBar then dragBar.Position = useMobileSizing and UDim2.new(0.5, 0, 0.5, dragOffsetMobile) or UDim2.new(0.5, 0, 0.5, dragOffset) makeDraggable(Main, dragInteract, true, {dragOffset, dragOffsetMobile}) end
  1583.  
  1584. for _, TabButton in ipairs(TabList:GetChildren()) do
  1585. if TabButton.ClassName == "Frame" and TabButton.Name ~= "Placeholder" then
  1586. TabButton.BackgroundTransparency = 1
  1587. TabButton.Title.TextTransparency = 1
  1588. TabButton.Image.ImageTransparency = 1
  1589. TabButton.UIStroke.Transparency = 1
  1590. end
  1591. end
  1592.  
  1593. if Settings.Discord and not useStudio then
  1594. if isfolder and not isfolder(RayfieldFolder.."/Discord Invites") then
  1595. makefolder(RayfieldFolder.."/Discord Invites")
  1596. end
  1597.  
  1598. if isfile and not isfile(RayfieldFolder.."/Discord Invites".."/"..Settings.Discord.Invite..ConfigurationExtension) then
  1599. if request then
  1600. pcall(function()
  1601. request({
  1602. Url = 'http://127.0.0.1:6463/rpc?v=1',
  1603. Method = 'POST',
  1604. Headers = {
  1605. ['Content-Type'] = 'application/json',
  1606. Origin = 'https://discord.com'
  1607. },
  1608. Body = HttpService:JSONEncode({
  1609. cmd = 'INVITE_BROWSER',
  1610. nonce = HttpService:GenerateGUID(false),
  1611. args = {code = Settings.Discord.Invite}
  1612. })
  1613. })
  1614. end)
  1615. end
  1616.  
  1617. if Settings.Discord.RememberJoins then -- We do logic this way so if the developer changes this setting, the user still won't be prompted, only new users
  1618. writefile(RayfieldFolder.."/Discord Invites".."/"..Settings.Discord.Invite..ConfigurationExtension,"Rayfield RememberJoins is true for this invite, this invite will not ask you to join again")
  1619. end
  1620. end
  1621. end
  1622.  
  1623. if (Settings.KeySystem) then
  1624. if not Settings.KeySettings then
  1625. Passthrough = true
  1626. return
  1627. end
  1628.  
  1629. if isfolder and not isfolder(RayfieldFolder.."/Key System") then
  1630. makefolder(RayfieldFolder.."/Key System")
  1631. end
  1632.  
  1633. if typeof(Settings.KeySettings.Key) == "string" then Settings.KeySettings.Key = {Settings.KeySettings.Key} end
  1634.  
  1635. if Settings.KeySettings.GrabKeyFromSite then
  1636. for i, Key in ipairs(Settings.KeySettings.Key) do
  1637. local Success, Response = pcall(function()
  1638. Settings.KeySettings.Key[i] = tostring(game:HttpGet(Key):gsub("[\n\r]", " "))
  1639. Settings.KeySettings.Key[i] = string.gsub(Settings.KeySettings.Key[i], " ", "")
  1640. end)
  1641. if not Success then
  1642. print("Rayfield | "..Key.." Error " ..tostring(Response))
  1643. warn('Check docs.sirius.menu for help with Rayfield specific development.')
  1644. end
  1645. end
  1646. end
  1647.  
  1648. if not Settings.KeySettings.FileName then
  1649. Settings.KeySettings.FileName = "No file name specified"
  1650. end
  1651.  
  1652. if isfile and isfile(RayfieldFolder.."/Key System".."/"..Settings.KeySettings.FileName..ConfigurationExtension) then
  1653. for _, MKey in ipairs(Settings.KeySettings.Key) do
  1654. if string.find(readfile(RayfieldFolder.."/Key System".."/"..Settings.KeySettings.FileName..ConfigurationExtension), MKey) then
  1655. Passthrough = true
  1656. end
  1657. end
  1658. end
  1659.  
  1660. if not Passthrough then
  1661. local AttemptsRemaining = math.random(2, 5)
  1662. Rayfield.Enabled = false
  1663. local KeyUI = useStudio and script.Parent:FindFirstChild('Key') or game:GetObjects("rbxassetid://11380036235")[1]
  1664.  
  1665. KeyUI.Enabled = true
  1666.  
  1667. if gethui then
  1668. KeyUI.Parent = gethui()
  1669. elseif syn and syn.protect_gui then
  1670. syn.protect_gui(KeyUI)
  1671. KeyUI.Parent = CoreGui
  1672. elseif not useStudio and CoreGui:FindFirstChild("RobloxGui") then
  1673. KeyUI.Parent = CoreGui:FindFirstChild("RobloxGui")
  1674. elseif not useStudio then
  1675. KeyUI.Parent = CoreGui
  1676. end
  1677.  
  1678. if gethui then
  1679. for _, Interface in ipairs(gethui():GetChildren()) do
  1680. if Interface.Name == KeyUI.Name and Interface ~= KeyUI then
  1681. Interface.Enabled = false
  1682. Interface.Name = "KeyUI-Old"
  1683. end
  1684. end
  1685. elseif not useStudio then
  1686. for _, Interface in ipairs(CoreGui:GetChildren()) do
  1687. if Interface.Name == KeyUI.Name and Interface ~= KeyUI then
  1688. Interface.Enabled = false
  1689. Interface.Name = "KeyUI-Old"
  1690. end
  1691. end
  1692. end
  1693.  
  1694. local KeyMain = KeyUI.Main
  1695. KeyMain.Title.Text = Settings.KeySettings.Title or Settings.Name
  1696. KeyMain.Subtitle.Text = Settings.KeySettings.Subtitle or "Key System"
  1697. KeyMain.NoteMessage.Text = Settings.KeySettings.Note or "No instructions"
  1698.  
  1699. KeyMain.Size = UDim2.new(0, 467, 0, 175)
  1700. KeyMain.BackgroundTransparency = 1
  1701. KeyMain.Shadow.Image.ImageTransparency = 1
  1702. KeyMain.Title.TextTransparency = 1
  1703. KeyMain.Subtitle.TextTransparency = 1
  1704. KeyMain.KeyNote.TextTransparency = 1
  1705. KeyMain.Input.BackgroundTransparency = 1
  1706. KeyMain.Input.UIStroke.Transparency = 1
  1707. KeyMain.Input.InputBox.TextTransparency = 1
  1708. KeyMain.NoteTitle.TextTransparency = 1
  1709. KeyMain.NoteMessage.TextTransparency = 1
  1710. KeyMain.Hide.ImageTransparency = 1
  1711.  
  1712. TweenService:Create(KeyMain, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  1713. TweenService:Create(KeyMain, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Size = UDim2.new(0, 500, 0, 187)}):Play()
  1714. TweenService:Create(KeyMain.Shadow.Image, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {ImageTransparency = 0.5}):Play()
  1715. task.wait(0.05)
  1716. TweenService:Create(KeyMain.Title, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  1717. TweenService:Create(KeyMain.Subtitle, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  1718. task.wait(0.05)
  1719. TweenService:Create(KeyMain.KeyNote, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  1720. TweenService:Create(KeyMain.Input, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  1721. TweenService:Create(KeyMain.Input.UIStroke, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  1722. TweenService:Create(KeyMain.Input.InputBox, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  1723. task.wait(0.05)
  1724. TweenService:Create(KeyMain.NoteTitle, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  1725. TweenService:Create(KeyMain.NoteMessage, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  1726. task.wait(0.15)
  1727. TweenService:Create(KeyMain.Hide, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {ImageTransparency = 0.3}):Play()
  1728.  
  1729.  
  1730. KeyUI.Main.Input.InputBox.FocusLost:Connect(function()
  1731. if #KeyUI.Main.Input.InputBox.Text == 0 then return end
  1732. local KeyFound = false
  1733. local FoundKey = ''
  1734. for _, MKey in ipairs(Settings.KeySettings.Key) do
  1735. --if string.find(KeyMain.Input.InputBox.Text, MKey) then
  1736. -- KeyFound = true
  1737. -- FoundKey = MKey
  1738. --end
  1739.  
  1740.  
  1741. -- stricter key check
  1742. if KeyMain.Input.InputBox.Text == MKey then
  1743. KeyFound = true
  1744. FoundKey = MKey
  1745. end
  1746. end
  1747. if KeyFound then
  1748. TweenService:Create(KeyMain, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  1749. TweenService:Create(KeyMain, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Size = UDim2.new(0, 467, 0, 175)}):Play()
  1750. TweenService:Create(KeyMain.Shadow.Image, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {ImageTransparency = 1}):Play()
  1751. TweenService:Create(KeyMain.Title, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1752. TweenService:Create(KeyMain.Subtitle, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1753. TweenService:Create(KeyMain.KeyNote, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1754. TweenService:Create(KeyMain.Input, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  1755. TweenService:Create(KeyMain.Input.UIStroke, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  1756. TweenService:Create(KeyMain.Input.InputBox, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1757. TweenService:Create(KeyMain.NoteTitle, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1758. TweenService:Create(KeyMain.NoteMessage, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1759. TweenService:Create(KeyMain.Hide, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {ImageTransparency = 1}):Play()
  1760. task.wait(0.51)
  1761. Passthrough = true
  1762. KeyMain.Visible = false
  1763. if Settings.KeySettings.SaveKey then
  1764. if writefile then
  1765. writefile(RayfieldFolder.."/Key System".."/"..Settings.KeySettings.FileName..ConfigurationExtension, FoundKey)
  1766. end
  1767. RayfieldLibrary:Notify({Title = "Key System", Content = "The key for this script has been saved successfully.", Image = 3605522284})
  1768. end
  1769. else
  1770. if AttemptsRemaining == 0 then
  1771. TweenService:Create(KeyMain, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  1772. TweenService:Create(KeyMain, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Size = UDim2.new(0, 467, 0, 175)}):Play()
  1773. TweenService:Create(KeyMain.Shadow.Image, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {ImageTransparency = 1}):Play()
  1774. TweenService:Create(KeyMain.Title, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1775. TweenService:Create(KeyMain.Subtitle, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1776. TweenService:Create(KeyMain.KeyNote, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1777. TweenService:Create(KeyMain.Input, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  1778. TweenService:Create(KeyMain.Input.UIStroke, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  1779. TweenService:Create(KeyMain.Input.InputBox, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1780. TweenService:Create(KeyMain.NoteTitle, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1781. TweenService:Create(KeyMain.NoteMessage, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1782. TweenService:Create(KeyMain.Hide, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {ImageTransparency = 1}):Play()
  1783. task.wait(0.45)
  1784. Players.LocalPlayer:Kick("No Attempts Remaining")
  1785. game:Shutdown()
  1786. end
  1787. KeyMain.Input.InputBox.Text = ""
  1788. AttemptsRemaining = AttemptsRemaining - 1
  1789. TweenService:Create(KeyMain, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Size = UDim2.new(0, 467, 0, 175)}):Play()
  1790. TweenService:Create(KeyMain, TweenInfo.new(0.4, Enum.EasingStyle.Elastic), {Position = UDim2.new(0.495,0,0.5,0)}):Play()
  1791. task.wait(0.1)
  1792. TweenService:Create(KeyMain, TweenInfo.new(0.4, Enum.EasingStyle.Elastic), {Position = UDim2.new(0.505,0,0.5,0)}):Play()
  1793. task.wait(0.1)
  1794. TweenService:Create(KeyMain, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {Position = UDim2.new(0.5,0,0.5,0)}):Play()
  1795. TweenService:Create(KeyMain, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Size = UDim2.new(0, 500, 0, 187)}):Play()
  1796. end
  1797. end)
  1798.  
  1799. KeyMain.Hide.MouseButton1Click:Connect(function()
  1800. TweenService:Create(KeyMain, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  1801. TweenService:Create(KeyMain, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Size = UDim2.new(0, 467, 0, 175)}):Play()
  1802. TweenService:Create(KeyMain.Shadow.Image, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {ImageTransparency = 1}):Play()
  1803. TweenService:Create(KeyMain.Title, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1804. TweenService:Create(KeyMain.Subtitle, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1805. TweenService:Create(KeyMain.KeyNote, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1806. TweenService:Create(KeyMain.Input, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  1807. TweenService:Create(KeyMain.Input.UIStroke, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  1808. TweenService:Create(KeyMain.Input.InputBox, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1809. TweenService:Create(KeyMain.NoteTitle, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1810. TweenService:Create(KeyMain.NoteMessage, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1811. TweenService:Create(KeyMain.Hide, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {ImageTransparency = 1}):Play()
  1812. task.wait(0.51)
  1813. RayfieldLibrary:Destroy()
  1814. KeyUI:Destroy()
  1815. end)
  1816. else
  1817. Passthrough = true
  1818. end
  1819. end
  1820. if Settings.KeySystem then
  1821. repeat task.wait() until Passthrough
  1822. end
  1823.  
  1824. Notifications.Template.Visible = false
  1825. Notifications.Visible = true
  1826. Rayfield.Enabled = true
  1827.  
  1828. task.wait(0.5)
  1829. TweenService:Create(Main, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  1830. TweenService:Create(Main.Shadow.Image, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {ImageTransparency = 0.6}):Play()
  1831. task.wait(0.1)
  1832. TweenService:Create(LoadingFrame.Title, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  1833. task.wait(0.05)
  1834. TweenService:Create(LoadingFrame.Subtitle, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  1835. task.wait(0.05)
  1836. TweenService:Create(LoadingFrame.Version, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  1837.  
  1838.  
  1839. Elements.Template.LayoutOrder = 100000
  1840. Elements.Template.Visible = false
  1841.  
  1842. Elements.UIPageLayout.FillDirection = Enum.FillDirection.Horizontal
  1843. TabList.Template.Visible = false
  1844.  
  1845. -- Tab
  1846. local FirstTab = false
  1847. local Window = {}
  1848. function Window:CreateTab(Name, Image, Ext)
  1849. local SDone = false
  1850. local TabButton = TabList.Template:Clone()
  1851. TabButton.Name = Name
  1852. TabButton.Title.Text = Name
  1853. TabButton.Parent = TabList
  1854. TabButton.Title.TextWrapped = false
  1855. TabButton.Size = UDim2.new(0, TabButton.Title.TextBounds.X + 30, 0, 30)
  1856.  
  1857. if Image and Image ~= 0 then
  1858. if typeof(Image) == 'string' then
  1859. local asset = getIcon(Image)
  1860.  
  1861. TabButton.Image.Image = 'rbxassetid://'..asset.id
  1862. TabButton.Image.ImageRectOffset = asset.imageRectOffset
  1863. TabButton.Image.ImageRectSize = asset.imageRectSize
  1864. else
  1865. TabButton.Image.Image = "rbxassetid://"..Image
  1866. end
  1867.  
  1868. TabButton.Title.AnchorPoint = Vector2.new(0, 0.5)
  1869. TabButton.Title.Position = UDim2.new(0, 37, 0.5, 0)
  1870. TabButton.Image.Visible = true
  1871. TabButton.Title.TextXAlignment = Enum.TextXAlignment.Left
  1872. TabButton.Size = UDim2.new(0, TabButton.Title.TextBounds.X + 52, 0, 30)
  1873. end
  1874.  
  1875.  
  1876.  
  1877. TabButton.BackgroundTransparency = 1
  1878. TabButton.Title.TextTransparency = 1
  1879. TabButton.Image.ImageTransparency = 1
  1880. TabButton.UIStroke.Transparency = 1
  1881.  
  1882. TabButton.Visible = not Ext or false
  1883.  
  1884. -- Create Elements Page
  1885. local TabPage = Elements.Template:Clone()
  1886. TabPage.Name = Name
  1887. TabPage.Visible = true
  1888.  
  1889. TabPage.LayoutOrder = #Elements:GetChildren() or Ext and 10000
  1890.  
  1891. for _, TemplateElement in ipairs(TabPage:GetChildren()) do
  1892. if TemplateElement.ClassName == "Frame" and TemplateElement.Name ~= "Placeholder" then
  1893. TemplateElement:Destroy()
  1894. end
  1895. end
  1896.  
  1897. TabPage.Parent = Elements
  1898. if not FirstTab and not Ext then
  1899. Elements.UIPageLayout.Animated = false
  1900. Elements.UIPageLayout:JumpTo(TabPage)
  1901. Elements.UIPageLayout.Animated = true
  1902. end
  1903.  
  1904. TabButton.UIStroke.Color = SelectedTheme.TabStroke
  1905.  
  1906. if Elements.UIPageLayout.CurrentPage == TabPage then
  1907. TabButton.BackgroundColor3 = SelectedTheme.TabBackgroundSelected
  1908. TabButton.Image.ImageColor3 = SelectedTheme.SelectedTabTextColor
  1909. TabButton.Title.TextColor3 = SelectedTheme.SelectedTabTextColor
  1910. else
  1911. TabButton.BackgroundColor3 = SelectedTheme.TabBackground
  1912. TabButton.Image.ImageColor3 = SelectedTheme.TabTextColor
  1913. TabButton.Title.TextColor3 = SelectedTheme.TabTextColor
  1914. end
  1915.  
  1916.  
  1917. -- Animate
  1918. task.wait(0.1)
  1919. if FirstTab or Ext then
  1920. TabButton.BackgroundColor3 = SelectedTheme.TabBackground
  1921. TabButton.Image.ImageColor3 = SelectedTheme.TabTextColor
  1922. TabButton.Title.TextColor3 = SelectedTheme.TabTextColor
  1923. TweenService:Create(TabButton, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0.7}):Play()
  1924. TweenService:Create(TabButton.Title, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {TextTransparency = 0.2}):Play()
  1925. TweenService:Create(TabButton.Image, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {ImageTransparency = 0.2}):Play()
  1926. TweenService:Create(TabButton.UIStroke, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {Transparency = 0.5}):Play()
  1927. elseif not Ext then
  1928. FirstTab = Name
  1929. TabButton.BackgroundColor3 = SelectedTheme.TabBackgroundSelected
  1930. TabButton.Image.ImageColor3 = SelectedTheme.SelectedTabTextColor
  1931. TabButton.Title.TextColor3 = SelectedTheme.SelectedTabTextColor
  1932. TweenService:Create(TabButton.Image, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {ImageTransparency = 0}):Play()
  1933. TweenService:Create(TabButton, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  1934. TweenService:Create(TabButton.Title, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  1935. end
  1936.  
  1937.  
  1938. TabButton.Interact.MouseButton1Click:Connect(function()
  1939. if Minimised then return end
  1940. TweenService:Create(TabButton, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  1941. TweenService:Create(TabButton.UIStroke, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  1942. TweenService:Create(TabButton.Title, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  1943. TweenService:Create(TabButton.Image, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {ImageTransparency = 0}):Play()
  1944. TweenService:Create(TabButton, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.TabBackgroundSelected}):Play()
  1945. TweenService:Create(TabButton.Title, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {TextColor3 = SelectedTheme.SelectedTabTextColor}):Play()
  1946. TweenService:Create(TabButton.Image, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {ImageColor3 = SelectedTheme.SelectedTabTextColor}):Play()
  1947.  
  1948. for _, OtherTabButton in ipairs(TabList:GetChildren()) do
  1949. if OtherTabButton.Name ~= "Template" and OtherTabButton.ClassName == "Frame" and OtherTabButton ~= TabButton and OtherTabButton.Name ~= "Placeholder" then
  1950. TweenService:Create(OtherTabButton, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.TabBackground}):Play()
  1951. TweenService:Create(OtherTabButton.Title, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {TextColor3 = SelectedTheme.TabTextColor}):Play()
  1952. TweenService:Create(OtherTabButton.Image, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {ImageColor3 = SelectedTheme.TabTextColor}):Play()
  1953. TweenService:Create(OtherTabButton, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0.7}):Play()
  1954. TweenService:Create(OtherTabButton.Title, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {TextTransparency = 0.2}):Play()
  1955. TweenService:Create(OtherTabButton.Image, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {ImageTransparency = 0.2}):Play()
  1956. TweenService:Create(OtherTabButton.UIStroke, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {Transparency = 0.5}):Play()
  1957. end
  1958. end
  1959.  
  1960. if Elements.UIPageLayout.CurrentPage ~= TabPage then
  1961. Elements.UIPageLayout:JumpTo(TabPage)
  1962. end
  1963. end)
  1964.  
  1965. local Tab = {}
  1966.  
  1967. -- Button
  1968. function Tab:CreateButton(ButtonSettings)
  1969. local ButtonValue = {}
  1970.  
  1971. local Button = Elements.Template.Button:Clone()
  1972. Button.Name = ButtonSettings.Name
  1973. Button.Title.Text = ButtonSettings.Name
  1974. Button.Visible = true
  1975. Button.Parent = TabPage
  1976.  
  1977. Button.BackgroundTransparency = 1
  1978. Button.UIStroke.Transparency = 1
  1979. Button.Title.TextTransparency = 1
  1980.  
  1981. TweenService:Create(Button, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  1982. TweenService:Create(Button.UIStroke, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  1983. TweenService:Create(Button.Title, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  1984.  
  1985.  
  1986. Button.Interact.MouseButton1Click:Connect(function()
  1987. local Success, Response = pcall(ButtonSettings.Callback)
  1988. if not Success then
  1989. TweenService:Create(Button, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = Color3.fromRGB(85, 0, 0)}):Play()
  1990. TweenService:Create(Button.ElementIndicator, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  1991. TweenService:Create(Button.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  1992. Button.Title.Text = "Callback Error"
  1993. print("Rayfield | "..ButtonSettings.Name.." Callback Error " ..tostring(Response))
  1994. warn('Check docs.sirius.menu for help with Rayfield specific development.')
  1995. task.wait(0.5)
  1996. Button.Title.Text = ButtonSettings.Name
  1997. TweenService:Create(Button, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  1998. TweenService:Create(Button.ElementIndicator, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {TextTransparency = 0.9}):Play()
  1999. TweenService:Create(Button.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  2000. else
  2001. if not ButtonSettings.Ext then
  2002. SaveConfiguration(ButtonSettings.Name..'\n')
  2003. end
  2004. TweenService:Create(Button, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play()
  2005. TweenService:Create(Button.ElementIndicator, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  2006. TweenService:Create(Button.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  2007. task.wait(0.2)
  2008. TweenService:Create(Button, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  2009. TweenService:Create(Button.ElementIndicator, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {TextTransparency = 0.9}):Play()
  2010. TweenService:Create(Button.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  2011. end
  2012. end)
  2013.  
  2014. Button.MouseEnter:Connect(function()
  2015. TweenService:Create(Button, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play()
  2016. TweenService:Create(Button.ElementIndicator, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {TextTransparency = 0.7}):Play()
  2017. end)
  2018.  
  2019. Button.MouseLeave:Connect(function()
  2020. TweenService:Create(Button, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  2021. TweenService:Create(Button.ElementIndicator, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {TextTransparency = 0.9}):Play()
  2022. end)
  2023.  
  2024. function ButtonValue:Set(NewButton)
  2025. Button.Title.Text = NewButton
  2026. Button.Name = NewButton
  2027. end
  2028.  
  2029. return ButtonValue
  2030. end
  2031.  
  2032. -- ColorPicker
  2033. function Tab:CreateColorPicker(ColorPickerSettings) -- by Throit
  2034. ColorPickerSettings.Type = "ColorPicker"
  2035. local ColorPicker = Elements.Template.ColorPicker:Clone()
  2036. local Background = ColorPicker.CPBackground
  2037. local Display = Background.Display
  2038. local Main = Background.MainCP
  2039. local Slider = ColorPicker.ColorSlider
  2040. ColorPicker.ClipsDescendants = true
  2041. ColorPicker.Name = ColorPickerSettings.Name
  2042. ColorPicker.Title.Text = ColorPickerSettings.Name
  2043. ColorPicker.Visible = true
  2044. ColorPicker.Parent = TabPage
  2045. ColorPicker.Size = UDim2.new(1, -10, 0, 45)
  2046. Background.Size = UDim2.new(0, 39, 0, 22)
  2047. Display.BackgroundTransparency = 0
  2048. Main.MainPoint.ImageTransparency = 1
  2049. ColorPicker.Interact.Size = UDim2.new(1, 0, 1, 0)
  2050. ColorPicker.Interact.Position = UDim2.new(0.5, 0, 0.5, 0)
  2051. ColorPicker.RGB.Position = UDim2.new(0, 17, 0, 70)
  2052. ColorPicker.HexInput.Position = UDim2.new(0, 17, 0, 90)
  2053. Main.ImageTransparency = 1
  2054. Background.BackgroundTransparency = 1
  2055.  
  2056. for _, rgbinput in ipairs(ColorPicker.RGB:GetChildren()) do
  2057. if rgbinput:IsA("Frame") then
  2058. rgbinput.BackgroundColor3 = SelectedTheme.InputBackground
  2059. rgbinput.UIStroke.Color = SelectedTheme.InputStroke
  2060. end
  2061. end
  2062.  
  2063. ColorPicker.HexInput.BackgroundColor3 = SelectedTheme.InputBackground
  2064. ColorPicker.HexInput.UIStroke.Color = SelectedTheme.InputStroke
  2065.  
  2066. local opened = false
  2067. local mouse = Players.LocalPlayer:GetMouse()
  2068. Main.Image = "http://www.roblox.com/asset/?id=11415645739"
  2069. local mainDragging = false
  2070. local sliderDragging = false
  2071. ColorPicker.Interact.MouseButton1Down:Connect(function()
  2072. task.spawn(function()
  2073. TweenService:Create(ColorPicker, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play()
  2074. TweenService:Create(ColorPicker.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  2075. task.wait(0.2)
  2076. TweenService:Create(ColorPicker, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  2077. TweenService:Create(ColorPicker.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  2078. end)
  2079.  
  2080. if not opened then
  2081. opened = true
  2082. TweenService:Create(Background, TweenInfo.new(0.45, Enum.EasingStyle.Exponential), {Size = UDim2.new(0, 18, 0, 15)}):Play()
  2083. task.wait(0.1)
  2084. TweenService:Create(ColorPicker, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Size = UDim2.new(1, -10, 0, 120)}):Play()
  2085. TweenService:Create(Background, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Size = UDim2.new(0, 173, 0, 86)}):Play()
  2086. TweenService:Create(Display, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  2087. TweenService:Create(ColorPicker.Interact, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Position = UDim2.new(0.289, 0, 0.5, 0)}):Play()
  2088. TweenService:Create(ColorPicker.RGB, TweenInfo.new(0.8, Enum.EasingStyle.Exponential), {Position = UDim2.new(0, 17, 0, 40)}):Play()
  2089. TweenService:Create(ColorPicker.HexInput, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Position = UDim2.new(0, 17, 0, 73)}):Play()
  2090. TweenService:Create(ColorPicker.Interact, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Size = UDim2.new(0.574, 0, 1, 0)}):Play()
  2091. TweenService:Create(Main.MainPoint, TweenInfo.new(0.2, Enum.EasingStyle.Exponential), {ImageTransparency = 0}):Play()
  2092. TweenService:Create(Main, TweenInfo.new(0.2, Enum.EasingStyle.Exponential), {ImageTransparency = SelectedTheme ~= RayfieldLibrary.Theme.Default and 0.25 or 0.1}):Play()
  2093. TweenService:Create(Background, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  2094. else
  2095. opened = false
  2096. TweenService:Create(ColorPicker, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Size = UDim2.new(1, -10, 0, 45)}):Play()
  2097. TweenService:Create(Background, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Size = UDim2.new(0, 39, 0, 22)}):Play()
  2098. TweenService:Create(ColorPicker.Interact, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Size = UDim2.new(1, 0, 1, 0)}):Play()
  2099. TweenService:Create(ColorPicker.Interact, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Position = UDim2.new(0.5, 0, 0.5, 0)}):Play()
  2100. TweenService:Create(ColorPicker.RGB, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Position = UDim2.new(0, 17, 0, 70)}):Play()
  2101. TweenService:Create(ColorPicker.HexInput, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Position = UDim2.new(0, 17, 0, 90)}):Play()
  2102. TweenService:Create(Display, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  2103. TweenService:Create(Main.MainPoint, TweenInfo.new(0.2, Enum.EasingStyle.Exponential), {ImageTransparency = 1}):Play()
  2104. TweenService:Create(Main, TweenInfo.new(0.2, Enum.EasingStyle.Exponential), {ImageTransparency = 1}):Play()
  2105. TweenService:Create(Background, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  2106. end
  2107.  
  2108. end)
  2109.  
  2110. UserInputService.InputEnded:Connect(function(input, gameProcessed) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  2111. mainDragging = false
  2112. sliderDragging = false
  2113. end end)
  2114. Main.MouseButton1Down:Connect(function()
  2115. if opened then
  2116. mainDragging = true
  2117. end
  2118. end)
  2119. Main.MainPoint.MouseButton1Down:Connect(function()
  2120. if opened then
  2121. mainDragging = true
  2122. end
  2123. end)
  2124. Slider.MouseButton1Down:Connect(function()
  2125. sliderDragging = true
  2126. end)
  2127. Slider.SliderPoint.MouseButton1Down:Connect(function()
  2128. sliderDragging = true
  2129. end)
  2130. local h,s,v = ColorPickerSettings.Color:ToHSV()
  2131. local color = Color3.fromHSV(h,s,v)
  2132. local hex = string.format("#%02X%02X%02X",color.R*0xFF,color.G*0xFF,color.B*0xFF)
  2133. ColorPicker.HexInput.InputBox.Text = hex
  2134. local function setDisplay()
  2135. --Main
  2136. Main.MainPoint.Position = UDim2.new(s,-Main.MainPoint.AbsoluteSize.X/2,1-v,-Main.MainPoint.AbsoluteSize.Y/2)
  2137. Main.MainPoint.ImageColor3 = Color3.fromHSV(h,s,v)
  2138. Background.BackgroundColor3 = Color3.fromHSV(h,1,1)
  2139. Display.BackgroundColor3 = Color3.fromHSV(h,s,v)
  2140. --Slider
  2141. local x = h * Slider.AbsoluteSize.X
  2142. Slider.SliderPoint.Position = UDim2.new(0,x-Slider.SliderPoint.AbsoluteSize.X/2,0.5,0)
  2143. Slider.SliderPoint.ImageColor3 = Color3.fromHSV(h,1,1)
  2144. local color = Color3.fromHSV(h,s,v)
  2145. local r,g,b = math.floor((color.R*255)+0.5),math.floor((color.G*255)+0.5),math.floor((color.B*255)+0.5)
  2146. ColorPicker.RGB.RInput.InputBox.Text = tostring(r)
  2147. ColorPicker.RGB.GInput.InputBox.Text = tostring(g)
  2148. ColorPicker.RGB.BInput.InputBox.Text = tostring(b)
  2149. hex = string.format("#%02X%02X%02X",color.R*0xFF,color.G*0xFF,color.B*0xFF)
  2150. ColorPicker.HexInput.InputBox.Text = hex
  2151. end
  2152. setDisplay()
  2153. ColorPicker.HexInput.InputBox.FocusLost:Connect(function()
  2154. if not pcall(function()
  2155. local r, g, b = string.match(ColorPicker.HexInput.InputBox.Text, "^#?(%w%w)(%w%w)(%w%w)$")
  2156. local rgbColor = Color3.fromRGB(tonumber(r, 16),tonumber(g, 16), tonumber(b, 16))
  2157. h,s,v = rgbColor:ToHSV()
  2158. hex = ColorPicker.HexInput.InputBox.Text
  2159. setDisplay()
  2160. ColorPickerSettings.Color = rgbColor
  2161. end)
  2162. then
  2163. ColorPicker.HexInput.InputBox.Text = hex
  2164. end
  2165. pcall(function()ColorPickerSettings.Callback(Color3.fromHSV(h,s,v))end)
  2166. local r,g,b = math.floor((h*255)+0.5),math.floor((s*255)+0.5),math.floor((v*255)+0.5)
  2167. ColorPickerSettings.Color = Color3.fromRGB(r,g,b)
  2168. if not ColorPickerSettings.Ext then
  2169. SaveConfiguration(ColorPickerSettings.Flag..'\n'..tostring(ColorPickerSettings.Color))
  2170. end
  2171. end)
  2172. --RGB
  2173. local function rgbBoxes(box,toChange)
  2174. local value = tonumber(box.Text)
  2175. local color = Color3.fromHSV(h,s,v)
  2176. local oldR,oldG,oldB = math.floor((color.R*255)+0.5),math.floor((color.G*255)+0.5),math.floor((color.B*255)+0.5)
  2177. local save
  2178. if toChange == "R" then save = oldR;oldR = value elseif toChange == "G" then save = oldG;oldG = value else save = oldB;oldB = value end
  2179. if value then
  2180. value = math.clamp(value,0,255)
  2181. h,s,v = Color3.fromRGB(oldR,oldG,oldB):ToHSV()
  2182.  
  2183. setDisplay()
  2184. else
  2185. box.Text = tostring(save)
  2186. end
  2187. local r,g,b = math.floor((h*255)+0.5),math.floor((s*255)+0.5),math.floor((v*255)+0.5)
  2188. ColorPickerSettings.Color = Color3.fromRGB(r,g,b)
  2189. if not ColorPickerSettings.Ext then
  2190. SaveConfiguration()
  2191. end
  2192. end
  2193. ColorPicker.RGB.RInput.InputBox.FocusLost:connect(function()
  2194. rgbBoxes(ColorPicker.RGB.RInput.InputBox,"R")
  2195. pcall(function()ColorPickerSettings.Callback(Color3.fromHSV(h,s,v))end)
  2196. end)
  2197. ColorPicker.RGB.GInput.InputBox.FocusLost:connect(function()
  2198. rgbBoxes(ColorPicker.RGB.GInput.InputBox,"G")
  2199. pcall(function()ColorPickerSettings.Callback(Color3.fromHSV(h,s,v))end)
  2200. end)
  2201. ColorPicker.RGB.BInput.InputBox.FocusLost:connect(function()
  2202. rgbBoxes(ColorPicker.RGB.BInput.InputBox,"B")
  2203. pcall(function()ColorPickerSettings.Callback(Color3.fromHSV(h,s,v))end)
  2204. end)
  2205.  
  2206. RunService.RenderStepped:connect(function()
  2207. if mainDragging then
  2208. local localX = math.clamp(mouse.X-Main.AbsolutePosition.X,0,Main.AbsoluteSize.X)
  2209. local localY = math.clamp(mouse.Y-Main.AbsolutePosition.Y,0,Main.AbsoluteSize.Y)
  2210. Main.MainPoint.Position = UDim2.new(0,localX-Main.MainPoint.AbsoluteSize.X/2,0,localY-Main.MainPoint.AbsoluteSize.Y/2)
  2211. s = localX / Main.AbsoluteSize.X
  2212. v = 1 - (localY / Main.AbsoluteSize.Y)
  2213. Display.BackgroundColor3 = Color3.fromHSV(h,s,v)
  2214. Main.MainPoint.ImageColor3 = Color3.fromHSV(h,s,v)
  2215. Background.BackgroundColor3 = Color3.fromHSV(h,1,1)
  2216. local color = Color3.fromHSV(h,s,v)
  2217. local r,g,b = math.floor((color.R*255)+0.5),math.floor((color.G*255)+0.5),math.floor((color.B*255)+0.5)
  2218. ColorPicker.RGB.RInput.InputBox.Text = tostring(r)
  2219. ColorPicker.RGB.GInput.InputBox.Text = tostring(g)
  2220. ColorPicker.RGB.BInput.InputBox.Text = tostring(b)
  2221. ColorPicker.HexInput.InputBox.Text = string.format("#%02X%02X%02X",color.R*0xFF,color.G*0xFF,color.B*0xFF)
  2222. pcall(function()ColorPickerSettings.Callback(Color3.fromHSV(h,s,v))end)
  2223. ColorPickerSettings.Color = Color3.fromRGB(r,g,b)
  2224. if not ColorPickerSettings.Ext then
  2225. SaveConfiguration()
  2226. end
  2227. end
  2228. if sliderDragging then
  2229. local localX = math.clamp(mouse.X-Slider.AbsolutePosition.X,0,Slider.AbsoluteSize.X)
  2230. h = localX / Slider.AbsoluteSize.X
  2231. Display.BackgroundColor3 = Color3.fromHSV(h,s,v)
  2232. Slider.SliderPoint.Position = UDim2.new(0,localX-Slider.SliderPoint.AbsoluteSize.X/2,0.5,0)
  2233. Slider.SliderPoint.ImageColor3 = Color3.fromHSV(h,1,1)
  2234. Background.BackgroundColor3 = Color3.fromHSV(h,1,1)
  2235. Main.MainPoint.ImageColor3 = Color3.fromHSV(h,s,v)
  2236. local color = Color3.fromHSV(h,s,v)
  2237. local r,g,b = math.floor((color.R*255)+0.5),math.floor((color.G*255)+0.5),math.floor((color.B*255)+0.5)
  2238. ColorPicker.RGB.RInput.InputBox.Text = tostring(r)
  2239. ColorPicker.RGB.GInput.InputBox.Text = tostring(g)
  2240. ColorPicker.RGB.BInput.InputBox.Text = tostring(b)
  2241. ColorPicker.HexInput.InputBox.Text = string.format("#%02X%02X%02X",color.R*0xFF,color.G*0xFF,color.B*0xFF)
  2242. pcall(function()ColorPickerSettings.Callback(Color3.fromHSV(h,s,v))end)
  2243. ColorPickerSettings.Color = Color3.fromRGB(r,g,b)
  2244. if not ColorPickerSettings.Ext then
  2245. SaveConfiguration()
  2246. end
  2247. end
  2248. end)
  2249.  
  2250. if Settings.ConfigurationSaving then
  2251. if Settings.ConfigurationSaving.Enabled and ColorPickerSettings.Flag then
  2252. RayfieldLibrary.Flags[ColorPickerSettings.Flag] = ColorPickerSettings
  2253. end
  2254. end
  2255.  
  2256. function ColorPickerSettings:Set(RGBColor)
  2257. ColorPickerSettings.Color = RGBColor
  2258. h,s,v = ColorPickerSettings.Color:ToHSV()
  2259. color = Color3.fromHSV(h,s,v)
  2260. setDisplay()
  2261. end
  2262.  
  2263. ColorPicker.MouseEnter:Connect(function()
  2264. TweenService:Create(ColorPicker, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play()
  2265. end)
  2266.  
  2267. ColorPicker.MouseLeave:Connect(function()
  2268. TweenService:Create(ColorPicker, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  2269. end)
  2270.  
  2271. Rayfield.Main:GetPropertyChangedSignal('BackgroundColor3'):Connect(function()
  2272. for _, rgbinput in ipairs(ColorPicker.RGB:GetChildren()) do
  2273. if rgbinput:IsA("Frame") then
  2274. rgbinput.BackgroundColor3 = SelectedTheme.InputBackground
  2275. rgbinput.UIStroke.Color = SelectedTheme.InputStroke
  2276. end
  2277. end
  2278.  
  2279. ColorPicker.HexInput.BackgroundColor3 = SelectedTheme.InputBackground
  2280. ColorPicker.HexInput.UIStroke.Color = SelectedTheme.InputStroke
  2281. end)
  2282.  
  2283. return ColorPickerSettings
  2284. end
  2285.  
  2286. -- Section
  2287. function Tab:CreateSection(SectionName)
  2288.  
  2289. local SectionValue = {}
  2290.  
  2291. if SDone then
  2292. local SectionSpace = Elements.Template.SectionSpacing:Clone()
  2293. SectionSpace.Visible = true
  2294. SectionSpace.Parent = TabPage
  2295. end
  2296.  
  2297. local Section = Elements.Template.SectionTitle:Clone()
  2298. Section.Title.Text = SectionName
  2299. Section.Visible = true
  2300. Section.Parent = TabPage
  2301.  
  2302. Section.Title.TextTransparency = 1
  2303. TweenService:Create(Section.Title, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {TextTransparency = 0.4}):Play()
  2304.  
  2305. function SectionValue:Set(NewSection)
  2306. Section.Title.Text = NewSection
  2307. end
  2308.  
  2309. SDone = true
  2310.  
  2311. return SectionValue
  2312. end
  2313.  
  2314. -- Divider
  2315. function Tab:CreateDivider()
  2316. local DividerValue = {}
  2317.  
  2318. local Divider = Elements.Template.Divider:Clone()
  2319. Divider.Visible = true
  2320. Divider.Parent = TabPage
  2321.  
  2322. Divider.Divider.BackgroundTransparency = 1
  2323. TweenService:Create(Divider.Divider, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0.85}):Play()
  2324.  
  2325. function DividerValue:Set(Value)
  2326. Divider.Visible = Value
  2327. end
  2328.  
  2329. return DividerValue
  2330. end
  2331.  
  2332. -- Label
  2333. function Tab:CreateLabel(LabelText : string, Icon: number, Color : Color3, IgnoreTheme : boolean)
  2334. local LabelValue = {}
  2335.  
  2336. local Label = Elements.Template.Label:Clone()
  2337. Label.Title.Text = LabelText
  2338. Label.Visible = true
  2339. Label.Parent = TabPage
  2340.  
  2341. Label.BackgroundColor3 = Color or SelectedTheme.SecondaryElementBackground
  2342. Label.UIStroke.Color = Color or SelectedTheme.SecondaryElementStroke
  2343.  
  2344. if Icon then
  2345. if typeof(Icon) == 'string' then
  2346. local asset = getIcon(Icon)
  2347.  
  2348. Label.Icon.Image = 'rbxassetid://'..asset.id
  2349. Label.Icon.ImageRectOffset = asset.imageRectOffset
  2350. Label.Icon.ImageRectSize = asset.imageRectSize
  2351. else
  2352. Label.Icon.Image = "rbxassetid://" .. (Icon or 0)
  2353. end
  2354. else
  2355. Label.Icon.Image = "rbxassetid://" .. 0
  2356. end
  2357.  
  2358. if Icon and Label:FindFirstChild('Icon') then
  2359. Label.Title.Position = UDim2.new(0, 45, 0.5, 0)
  2360. Label.Title.Size = UDim2.new(1, -100, 0, 14)
  2361.  
  2362. if Icon then
  2363. if typeof(Icon) == 'string' then
  2364. local asset = getIcon(Icon)
  2365.  
  2366. Label.Icon.Image = 'rbxassetid://'..asset.id
  2367. Label.Icon.ImageRectOffset = asset.imageRectOffset
  2368. Label.Icon.ImageRectSize = asset.imageRectSize
  2369. else
  2370. Label.Icon.Image = "rbxassetid://" .. (Icon or 0)
  2371. end
  2372. else
  2373. Label.Icon.Image = "rbxassetid://" .. 0
  2374. end
  2375.  
  2376. Label.Icon.Visible = true
  2377. end
  2378.  
  2379. Label.Icon.ImageTransparency = 1
  2380. Label.BackgroundTransparency = 1
  2381. Label.UIStroke.Transparency = 1
  2382. Label.Title.TextTransparency = 1
  2383.  
  2384. TweenService:Create(Label, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {BackgroundTransparency = Color and 0.8 or 0}):Play()
  2385. TweenService:Create(Label.UIStroke, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {Transparency = Color and 0.7 or 0}):Play()
  2386. TweenService:Create(Label.Icon, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {ImageTransparency = 0.2}):Play()
  2387. TweenService:Create(Label.Title, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {TextTransparency = Color and 0.2 or 0}):Play()
  2388.  
  2389. function LabelValue:Set(NewLabel, Icon, Color)
  2390. Label.Title.Text = NewLabel
  2391.  
  2392. if Color then
  2393. Label.BackgroundColor3 = Color or SelectedTheme.SecondaryElementBackground
  2394. Label.UIStroke.Color = Color or SelectedTheme.SecondaryElementStroke
  2395. end
  2396.  
  2397. if Icon and Label:FindFirstChild('Icon') then
  2398. Label.Title.Position = UDim2.new(0, 45, 0.5, 0)
  2399. Label.Title.Size = UDim2.new(1, -100, 0, 14)
  2400.  
  2401. if Icon then
  2402. if typeof(Icon) == 'string' then
  2403. local asset = getIcon(Icon)
  2404.  
  2405. Label.Icon.Image = 'rbxassetid://'..asset.id
  2406. Label.Icon.ImageRectOffset = asset.imageRectOffset
  2407. Label.Icon.ImageRectSize = asset.imageRectSize
  2408. else
  2409. Label.Icon.Image = "rbxassetid://" .. (Icon or 0)
  2410. end
  2411. else
  2412. Label.Icon.Image = "rbxassetid://" .. 0
  2413. end
  2414.  
  2415. Label.Icon.Visible = true
  2416. end
  2417. end
  2418.  
  2419. Rayfield.Main:GetPropertyChangedSignal('BackgroundColor3'):Connect(function()
  2420. Label.BackgroundColor3 = IgnoreTheme and (Color or Label.BackgroundColor3) or SelectedTheme.SecondaryElementBackground
  2421. Label.UIStroke.Color = IgnoreTheme and (Color or Label.BackgroundColor3) or SelectedTheme.SecondaryElementStroke
  2422. end)
  2423.  
  2424. return LabelValue
  2425. end
  2426.  
  2427. -- Paragraph
  2428. function Tab:CreateParagraph(ParagraphSettings)
  2429. local ParagraphValue = {}
  2430.  
  2431. local Paragraph = Elements.Template.Paragraph:Clone()
  2432. Paragraph.Title.Text = ParagraphSettings.Title
  2433. Paragraph.Content.Text = ParagraphSettings.Content
  2434. Paragraph.Visible = true
  2435. Paragraph.Parent = TabPage
  2436.  
  2437. Paragraph.BackgroundTransparency = 1
  2438. Paragraph.UIStroke.Transparency = 1
  2439. Paragraph.Title.TextTransparency = 1
  2440. Paragraph.Content.TextTransparency = 1
  2441.  
  2442. Paragraph.BackgroundColor3 = SelectedTheme.SecondaryElementBackground
  2443. Paragraph.UIStroke.Color = SelectedTheme.SecondaryElementStroke
  2444.  
  2445. TweenService:Create(Paragraph, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  2446. TweenService:Create(Paragraph.UIStroke, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  2447. TweenService:Create(Paragraph.Title, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  2448. TweenService:Create(Paragraph.Content, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  2449.  
  2450. function ParagraphValue:Set(NewParagraphSettings)
  2451. Paragraph.Title.Text = NewParagraphSettings.Title
  2452. Paragraph.Content.Text = NewParagraphSettings.Content
  2453. end
  2454.  
  2455. Rayfield.Main:GetPropertyChangedSignal('BackgroundColor3'):Connect(function()
  2456. Paragraph.BackgroundColor3 = SelectedTheme.SecondaryElementBackground
  2457. Paragraph.UIStroke.Color = SelectedTheme.SecondaryElementStroke
  2458. end)
  2459.  
  2460. return ParagraphValue
  2461. end
  2462.  
  2463. -- Input
  2464. function Tab:CreateInput(InputSettings)
  2465. local Input = Elements.Template.Input:Clone()
  2466. Input.Name = InputSettings.Name
  2467. Input.Title.Text = InputSettings.Name
  2468. Input.Visible = true
  2469. Input.Parent = TabPage
  2470.  
  2471. Input.BackgroundTransparency = 1
  2472. Input.UIStroke.Transparency = 1
  2473. Input.Title.TextTransparency = 1
  2474.  
  2475. Input.InputFrame.InputBox.Text = InputSettings.CurrentValue or ''
  2476.  
  2477. Input.InputFrame.BackgroundColor3 = SelectedTheme.InputBackground
  2478. Input.InputFrame.UIStroke.Color = SelectedTheme.InputStroke
  2479.  
  2480. TweenService:Create(Input, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  2481. TweenService:Create(Input.UIStroke, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  2482. TweenService:Create(Input.Title, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  2483.  
  2484. Input.InputFrame.InputBox.PlaceholderText = InputSettings.PlaceholderText
  2485. Input.InputFrame.Size = UDim2.new(0, Input.InputFrame.InputBox.TextBounds.X + 24, 0, 30)
  2486.  
  2487. Input.InputFrame.InputBox.FocusLost:Connect(function()
  2488. local Success, Response = pcall(function()
  2489. InputSettings.Callback(Input.InputFrame.InputBox.Text)
  2490. InputSettings.CurrentValue = Input.InputFrame.InputBox.Text
  2491. end)
  2492.  
  2493. if not Success then
  2494. TweenService:Create(Input, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = Color3.fromRGB(85, 0, 0)}):Play()
  2495. TweenService:Create(Input.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  2496. Input.Title.Text = "Callback Error"
  2497. print("Rayfield | "..InputSettings.Name.." Callback Error " ..tostring(Response))
  2498. warn('Check docs.sirius.menu for help with Rayfield specific development.')
  2499. task.wait(0.5)
  2500. Input.Title.Text = InputSettings.Name
  2501. TweenService:Create(Input, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  2502. TweenService:Create(Input.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  2503. end
  2504.  
  2505. if InputSettings.RemoveTextAfterFocusLost then
  2506. Input.InputFrame.InputBox.Text = ""
  2507. end
  2508.  
  2509. if not InputSettings.Ext then
  2510. SaveConfiguration()
  2511. end
  2512. end)
  2513.  
  2514. Input.MouseEnter:Connect(function()
  2515. TweenService:Create(Input, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play()
  2516. end)
  2517.  
  2518. Input.MouseLeave:Connect(function()
  2519. TweenService:Create(Input, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  2520. end)
  2521.  
  2522. Input.InputFrame.InputBox:GetPropertyChangedSignal("Text"):Connect(function()
  2523. TweenService:Create(Input.InputFrame, TweenInfo.new(0.55, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {Size = UDim2.new(0, Input.InputFrame.InputBox.TextBounds.X + 24, 0, 30)}):Play()
  2524. end)
  2525.  
  2526. function InputSettings:Set(text)
  2527. Input.InputFrame.InputBox.Text = text
  2528. InputSettings.CurrentValue = text
  2529.  
  2530. local Success, Response = pcall(function()
  2531. InputSettings.Callback(text)
  2532. end)
  2533.  
  2534. if not InputSettings.Ext then
  2535. SaveConfiguration()
  2536. end
  2537. end
  2538.  
  2539. if Settings.ConfigurationSaving then
  2540. if Settings.ConfigurationSaving.Enabled and InputSettings.Flag then
  2541. RayfieldLibrary.Flags[InputSettings.Flag] = InputSettings
  2542. end
  2543. end
  2544.  
  2545. Rayfield.Main:GetPropertyChangedSignal('BackgroundColor3'):Connect(function()
  2546. Input.InputFrame.BackgroundColor3 = SelectedTheme.InputBackground
  2547. Input.InputFrame.UIStroke.Color = SelectedTheme.InputStroke
  2548. end)
  2549.  
  2550. return InputSettings
  2551. end
  2552.  
  2553. -- Dropdown
  2554. function Tab:CreateDropdown(DropdownSettings)
  2555. local Dropdown = Elements.Template.Dropdown:Clone()
  2556. if string.find(DropdownSettings.Name,"closed") then
  2557. Dropdown.Name = "Dropdown"
  2558. else
  2559. Dropdown.Name = DropdownSettings.Name
  2560. end
  2561. Dropdown.Title.Text = DropdownSettings.Name
  2562. Dropdown.Visible = true
  2563. Dropdown.Parent = TabPage
  2564.  
  2565. Dropdown.List.Visible = false
  2566. if DropdownSettings.CurrentOption then
  2567. if type(DropdownSettings.CurrentOption) == "string" then
  2568. DropdownSettings.CurrentOption = {DropdownSettings.CurrentOption}
  2569. end
  2570. if not DropdownSettings.MultipleOptions and type(DropdownSettings.CurrentOption) == "table" then
  2571. DropdownSettings.CurrentOption = {DropdownSettings.CurrentOption[1]}
  2572. end
  2573. else
  2574. DropdownSettings.CurrentOption = {}
  2575. end
  2576.  
  2577. if DropdownSettings.MultipleOptions then
  2578. if DropdownSettings.CurrentOption and type(DropdownSettings.CurrentOption) == "table" then
  2579. if #DropdownSettings.CurrentOption == 1 then
  2580. Dropdown.Selected.Text = DropdownSettings.CurrentOption[1]
  2581. elseif #DropdownSettings.CurrentOption == 0 then
  2582. Dropdown.Selected.Text = "None"
  2583. else
  2584. Dropdown.Selected.Text = "Various"
  2585. end
  2586. else
  2587. DropdownSettings.CurrentOption = {}
  2588. Dropdown.Selected.Text = "None"
  2589. end
  2590. else
  2591. Dropdown.Selected.Text = DropdownSettings.CurrentOption[1] or "None"
  2592. end
  2593.  
  2594. Dropdown.Toggle.ImageColor3 = SelectedTheme.TextColor
  2595. TweenService:Create(Dropdown, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  2596.  
  2597. Dropdown.BackgroundTransparency = 1
  2598. Dropdown.UIStroke.Transparency = 1
  2599. Dropdown.Title.TextTransparency = 1
  2600.  
  2601. Dropdown.Size = UDim2.new(1, -10, 0, 45)
  2602.  
  2603. TweenService:Create(Dropdown, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  2604. TweenService:Create(Dropdown.UIStroke, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  2605. TweenService:Create(Dropdown.Title, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  2606.  
  2607. for _, ununusedoption in ipairs(Dropdown.List:GetChildren()) do
  2608. if ununusedoption.ClassName == "Frame" and ununusedoption.Name ~= "Placeholder" then
  2609. ununusedoption:Destroy()
  2610. end
  2611. end
  2612.  
  2613. Dropdown.Toggle.Rotation = 180
  2614.  
  2615. Dropdown.Interact.MouseButton1Click:Connect(function()
  2616. TweenService:Create(Dropdown, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play()
  2617. TweenService:Create(Dropdown.UIStroke, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  2618. task.wait(0.1)
  2619. TweenService:Create(Dropdown, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  2620. TweenService:Create(Dropdown.UIStroke, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  2621. if Debounce then return end
  2622. if Dropdown.List.Visible then
  2623. Debounce = true
  2624. TweenService:Create(Dropdown, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Size = UDim2.new(1, -10, 0, 45)}):Play()
  2625. for _, DropdownOpt in ipairs(Dropdown.List:GetChildren()) do
  2626. if DropdownOpt.ClassName == "Frame" and DropdownOpt.Name ~= "Placeholder" then
  2627. TweenService:Create(DropdownOpt, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  2628. TweenService:Create(DropdownOpt.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  2629. TweenService:Create(DropdownOpt.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  2630. end
  2631. end
  2632. TweenService:Create(Dropdown.List, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {ScrollBarImageTransparency = 1}):Play()
  2633. TweenService:Create(Dropdown.Toggle, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {Rotation = 180}):Play()
  2634. task.wait(0.35)
  2635. Dropdown.List.Visible = false
  2636. Debounce = false
  2637. else
  2638. TweenService:Create(Dropdown, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Size = UDim2.new(1, -10, 0, 180)}):Play()
  2639. Dropdown.List.Visible = true
  2640. TweenService:Create(Dropdown.List, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {ScrollBarImageTransparency = 0.7}):Play()
  2641. TweenService:Create(Dropdown.Toggle, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {Rotation = 0}):Play()
  2642. for _, DropdownOpt in ipairs(Dropdown.List:GetChildren()) do
  2643. if DropdownOpt.ClassName == "Frame" and DropdownOpt.Name ~= "Placeholder" then
  2644. if DropdownOpt.Name ~= Dropdown.Selected.Text then
  2645. TweenService:Create(DropdownOpt.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  2646. end
  2647. TweenService:Create(DropdownOpt, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  2648. TweenService:Create(DropdownOpt.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  2649. end
  2650. end
  2651. end
  2652. end)
  2653.  
  2654. Dropdown.MouseEnter:Connect(function()
  2655. if not Dropdown.List.Visible then
  2656. TweenService:Create(Dropdown, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play()
  2657. end
  2658. end)
  2659.  
  2660. Dropdown.MouseLeave:Connect(function()
  2661. TweenService:Create(Dropdown, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  2662. end)
  2663.  
  2664. local function SetDropdownOptions()
  2665. for _, Option in ipairs(DropdownSettings.Options) do
  2666. local DropdownOption = Elements.Template.Dropdown.List.Template:Clone()
  2667. DropdownOption.Name = Option
  2668. DropdownOption.Title.Text = Option
  2669. DropdownOption.Parent = Dropdown.List
  2670. DropdownOption.Visible = true
  2671.  
  2672. DropdownOption.BackgroundTransparency = 1
  2673. DropdownOption.UIStroke.Transparency = 1
  2674. DropdownOption.Title.TextTransparency = 1
  2675.  
  2676. --local Dropdown = Tab:CreateDropdown({
  2677. -- Name = "Dropdown Example",
  2678. -- Options = {"Option 1","Option 2"},
  2679. -- CurrentOption = {"Option 1"},
  2680. -- MultipleOptions = true,
  2681. -- Flag = "Dropdown1",
  2682. -- Callback = function(TableOfOptions)
  2683.  
  2684. -- end,
  2685. --})
  2686.  
  2687.  
  2688. DropdownOption.Interact.ZIndex = 50
  2689. DropdownOption.Interact.MouseButton1Click:Connect(function()
  2690. if not DropdownSettings.MultipleOptions and table.find(DropdownSettings.CurrentOption, Option) then
  2691. return
  2692. end
  2693.  
  2694. if table.find(DropdownSettings.CurrentOption, Option) then
  2695. table.remove(DropdownSettings.CurrentOption, table.find(DropdownSettings.CurrentOption, Option))
  2696. if DropdownSettings.MultipleOptions then
  2697. if #DropdownSettings.CurrentOption == 1 then
  2698. Dropdown.Selected.Text = DropdownSettings.CurrentOption[1]
  2699. elseif #DropdownSettings.CurrentOption == 0 then
  2700. Dropdown.Selected.Text = "None"
  2701. else
  2702. Dropdown.Selected.Text = "Various"
  2703. end
  2704. else
  2705. Dropdown.Selected.Text = DropdownSettings.CurrentOption[1]
  2706. end
  2707. else
  2708. if not DropdownSettings.MultipleOptions then
  2709. table.clear(DropdownSettings.CurrentOption)
  2710. end
  2711. table.insert(DropdownSettings.CurrentOption, Option)
  2712. if DropdownSettings.MultipleOptions then
  2713. if #DropdownSettings.CurrentOption == 1 then
  2714. Dropdown.Selected.Text = DropdownSettings.CurrentOption[1]
  2715. elseif #DropdownSettings.CurrentOption == 0 then
  2716. Dropdown.Selected.Text = "None"
  2717. else
  2718. Dropdown.Selected.Text = "Various"
  2719. end
  2720. else
  2721. Dropdown.Selected.Text = DropdownSettings.CurrentOption[1]
  2722. end
  2723. TweenService:Create(DropdownOption.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  2724. TweenService:Create(DropdownOption, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.DropdownSelected}):Play()
  2725. Debounce = true
  2726. end
  2727.  
  2728.  
  2729. local Success, Response = pcall(function()
  2730. DropdownSettings.Callback(DropdownSettings.CurrentOption)
  2731. end)
  2732.  
  2733. if not Success then
  2734. TweenService:Create(Dropdown, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = Color3.fromRGB(85, 0, 0)}):Play()
  2735. TweenService:Create(Dropdown.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  2736. Dropdown.Title.Text = "Callback Error"
  2737. print("Rayfield | "..DropdownSettings.Name.." Callback Error " ..tostring(Response))
  2738. warn('Check docs.sirius.menu for help with Rayfield specific development.')
  2739. task.wait(0.5)
  2740. Dropdown.Title.Text = DropdownSettings.Name
  2741. TweenService:Create(Dropdown, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  2742. TweenService:Create(Dropdown.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  2743. end
  2744.  
  2745. for _, droption in ipairs(Dropdown.List:GetChildren()) do
  2746. if droption.ClassName == "Frame" and droption.Name ~= "Placeholder" and not table.find(DropdownSettings.CurrentOption, droption.Name) then
  2747. TweenService:Create(droption, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.DropdownUnselected}):Play()
  2748. end
  2749. end
  2750. if not DropdownSettings.MultipleOptions then
  2751. task.wait(0.1)
  2752. TweenService:Create(Dropdown, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {Size = UDim2.new(1, -10, 0, 45)}):Play()
  2753. for _, DropdownOpt in ipairs(Dropdown.List:GetChildren()) do
  2754. if DropdownOpt.ClassName == "Frame" and DropdownOpt.Name ~= "Placeholder" then
  2755. TweenService:Create(DropdownOpt, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {BackgroundTransparency = 1}):Play()
  2756. TweenService:Create(DropdownOpt.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  2757. TweenService:Create(DropdownOpt.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  2758. end
  2759. end
  2760. TweenService:Create(Dropdown.List, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {ScrollBarImageTransparency = 1}):Play()
  2761. TweenService:Create(Dropdown.Toggle, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {Rotation = 180}):Play()
  2762. task.wait(0.35)
  2763. Dropdown.List.Visible = false
  2764. end
  2765. Debounce = false
  2766. if not DropdownSettings.Ext then
  2767. SaveConfiguration()
  2768. end
  2769. end)
  2770.  
  2771. Rayfield.Main:GetPropertyChangedSignal('BackgroundColor3'):Connect(function()
  2772. DropdownOption.UIStroke.Color = SelectedTheme.ElementStroke
  2773. end)
  2774. end
  2775. end
  2776. SetDropdownOptions()
  2777.  
  2778. for _, droption in ipairs(Dropdown.List:GetChildren()) do
  2779. if droption.ClassName == "Frame" and droption.Name ~= "Placeholder" then
  2780. if not table.find(DropdownSettings.CurrentOption, droption.Name) then
  2781. droption.BackgroundColor3 = SelectedTheme.DropdownUnselected
  2782. else
  2783. droption.BackgroundColor3 = SelectedTheme.DropdownSelected
  2784. end
  2785.  
  2786. Rayfield.Main:GetPropertyChangedSignal('BackgroundColor3'):Connect(function()
  2787. if not table.find(DropdownSettings.CurrentOption, droption.Name) then
  2788. droption.BackgroundColor3 = SelectedTheme.DropdownUnselected
  2789. else
  2790. droption.BackgroundColor3 = SelectedTheme.DropdownSelected
  2791. end
  2792. end)
  2793. end
  2794. end
  2795.  
  2796. function DropdownSettings:Set(NewOption)
  2797. DropdownSettings.CurrentOption = NewOption
  2798.  
  2799. if typeof(DropdownSettings.CurrentOption) == "string" then
  2800. DropdownSettings.CurrentOption = {DropdownSettings.CurrentOption}
  2801. end
  2802.  
  2803. if not DropdownSettings.MultipleOptions then
  2804. DropdownSettings.CurrentOption = {DropdownSettings.CurrentOption[1]}
  2805. end
  2806.  
  2807. if DropdownSettings.MultipleOptions then
  2808. if #DropdownSettings.CurrentOption == 1 then
  2809. Dropdown.Selected.Text = DropdownSettings.CurrentOption[1]
  2810. elseif #DropdownSettings.CurrentOption == 0 then
  2811. Dropdown.Selected.Text = "None"
  2812. else
  2813. Dropdown.Selected.Text = "Various"
  2814. end
  2815. else
  2816. Dropdown.Selected.Text = DropdownSettings.CurrentOption[1]
  2817. end
  2818.  
  2819.  
  2820. local Success, Response = pcall(function()
  2821. DropdownSettings.Callback(NewOption)
  2822. end)
  2823. if not Success then
  2824. TweenService:Create(Dropdown, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = Color3.fromRGB(85, 0, 0)}):Play()
  2825. TweenService:Create(Dropdown.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  2826. Dropdown.Title.Text = "Callback Error"
  2827. print("Rayfield | "..DropdownSettings.Name.." Callback Error " ..tostring(Response))
  2828. warn('Check docs.sirius.menu for help with Rayfield specific development.')
  2829. task.wait(0.5)
  2830. Dropdown.Title.Text = DropdownSettings.Name
  2831. TweenService:Create(Dropdown, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  2832. TweenService:Create(Dropdown.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  2833. end
  2834.  
  2835. for _, droption in ipairs(Dropdown.List:GetChildren()) do
  2836. if droption.ClassName == "Frame" and droption.Name ~= "Placeholder" then
  2837. if not table.find(DropdownSettings.CurrentOption, droption.Name) then
  2838. droption.BackgroundColor3 = SelectedTheme.DropdownUnselected
  2839. else
  2840. droption.BackgroundColor3 = SelectedTheme.DropdownSelected
  2841. end
  2842. end
  2843. end
  2844. --SaveConfiguration()
  2845. end
  2846.  
  2847. function DropdownSettings:Refresh(optionsTable: table) -- updates a dropdown with new options from optionsTable
  2848. DropdownSettings.Options = optionsTable
  2849. for _, option in Dropdown.List:GetChildren() do
  2850. if option.ClassName == "Frame" and option.Name ~= "Placeholder" then
  2851. option:Destroy()
  2852. end
  2853. end
  2854. SetDropdownOptions()
  2855. end
  2856.  
  2857. if Settings.ConfigurationSaving then
  2858. if Settings.ConfigurationSaving.Enabled and DropdownSettings.Flag then
  2859. RayfieldLibrary.Flags[DropdownSettings.Flag] = DropdownSettings
  2860. end
  2861. end
  2862.  
  2863. Rayfield.Main:GetPropertyChangedSignal('BackgroundColor3'):Connect(function()
  2864. Dropdown.Toggle.ImageColor3 = SelectedTheme.TextColor
  2865. TweenService:Create(Dropdown, TweenInfo.new(0.4, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  2866. end)
  2867.  
  2868. return DropdownSettings
  2869. end
  2870.  
  2871. -- Keybind
  2872. function Tab:CreateKeybind(KeybindSettings)
  2873. local CheckingForKey = false
  2874. local Keybind = Elements.Template.Keybind:Clone()
  2875. Keybind.Name = KeybindSettings.Name
  2876. Keybind.Title.Text = KeybindSettings.Name
  2877. Keybind.Visible = true
  2878. Keybind.Parent = TabPage
  2879.  
  2880. Keybind.BackgroundTransparency = 1
  2881. Keybind.UIStroke.Transparency = 1
  2882. Keybind.Title.TextTransparency = 1
  2883.  
  2884. Keybind.KeybindFrame.BackgroundColor3 = SelectedTheme.InputBackground
  2885. Keybind.KeybindFrame.UIStroke.Color = SelectedTheme.InputStroke
  2886.  
  2887. TweenService:Create(Keybind, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  2888. TweenService:Create(Keybind.UIStroke, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  2889. TweenService:Create(Keybind.Title, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  2890.  
  2891. Keybind.KeybindFrame.KeybindBox.Text = KeybindSettings.CurrentKeybind
  2892. Keybind.KeybindFrame.Size = UDim2.new(0, Keybind.KeybindFrame.KeybindBox.TextBounds.X + 24, 0, 30)
  2893.  
  2894. Keybind.KeybindFrame.KeybindBox.Focused:Connect(function()
  2895. CheckingForKey = true
  2896. Keybind.KeybindFrame.KeybindBox.Text = ""
  2897. end)
  2898. Keybind.KeybindFrame.KeybindBox.FocusLost:Connect(function()
  2899. CheckingForKey = false
  2900. if Keybind.KeybindFrame.KeybindBox.Text == nil or "" then
  2901. Keybind.KeybindFrame.KeybindBox.Text = KeybindSettings.CurrentKeybind
  2902. if not KeybindSettings.Ext then
  2903. SaveConfiguration()
  2904. end
  2905. end
  2906. end)
  2907.  
  2908. Keybind.MouseEnter:Connect(function()
  2909. TweenService:Create(Keybind, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play()
  2910. end)
  2911.  
  2912. Keybind.MouseLeave:Connect(function()
  2913. TweenService:Create(Keybind, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  2914. end)
  2915.  
  2916. UserInputService.InputBegan:Connect(function(input, processed)
  2917. if CheckingForKey then
  2918. if input.KeyCode ~= Enum.KeyCode.Unknown then
  2919. local SplitMessage = string.split(tostring(input.KeyCode), ".")
  2920. local NewKeyNoEnum = SplitMessage[3]
  2921. Keybind.KeybindFrame.KeybindBox.Text = tostring(NewKeyNoEnum)
  2922. KeybindSettings.CurrentKeybind = tostring(NewKeyNoEnum)
  2923. Keybind.KeybindFrame.KeybindBox:ReleaseFocus()
  2924. if not KeybindSettings.Ext then
  2925. SaveConfiguration()
  2926. end
  2927.  
  2928. if KeybindSettings.CallOnChange then
  2929. KeybindSettings.Callback(tostring(NewKeyNoEnum))
  2930. end
  2931. end
  2932. elseif not KeybindSettings.CallOnChange and KeybindSettings.CurrentKeybind ~= nil and (input.KeyCode == Enum.KeyCode[KeybindSettings.CurrentKeybind] and not processed) then -- Test
  2933. local Held = true
  2934. local Connection
  2935. Connection = input.Changed:Connect(function(prop)
  2936. if prop == "UserInputState" then
  2937. Connection:Disconnect()
  2938. Held = false
  2939. end
  2940. end)
  2941.  
  2942. if not KeybindSettings.HoldToInteract then
  2943. local Success, Response = pcall(KeybindSettings.Callback)
  2944. if not Success then
  2945. TweenService:Create(Keybind, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = Color3.fromRGB(85, 0, 0)}):Play()
  2946. TweenService:Create(Keybind.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  2947. Keybind.Title.Text = "Callback Error"
  2948. print("Rayfield | "..KeybindSettings.Name.." Callback Error " ..tostring(Response))
  2949. warn('Check docs.sirius.menu for help with Rayfield specific development.')
  2950. task.wait(0.5)
  2951. Keybind.Title.Text = KeybindSettings.Name
  2952. TweenService:Create(Keybind, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  2953. TweenService:Create(Keybind.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  2954. end
  2955. else
  2956. task.wait(0.25)
  2957. if Held then
  2958. local Loop; Loop = RunService.Stepped:Connect(function()
  2959. if not Held then
  2960. KeybindSettings.Callback(false) -- maybe pcall this
  2961. Loop:Disconnect()
  2962. else
  2963. KeybindSettings.Callback(true) -- maybe pcall this
  2964. end
  2965. end)
  2966. end
  2967. end
  2968. end
  2969. end)
  2970.  
  2971. Keybind.KeybindFrame.KeybindBox:GetPropertyChangedSignal("Text"):Connect(function()
  2972. TweenService:Create(Keybind.KeybindFrame, TweenInfo.new(0.55, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {Size = UDim2.new(0, Keybind.KeybindFrame.KeybindBox.TextBounds.X + 24, 0, 30)}):Play()
  2973. end)
  2974.  
  2975. function KeybindSettings:Set(NewKeybind)
  2976. Keybind.KeybindFrame.KeybindBox.Text = tostring(NewKeybind)
  2977. KeybindSettings.CurrentKeybind = tostring(NewKeybind)
  2978. Keybind.KeybindFrame.KeybindBox:ReleaseFocus()
  2979. if not KeybindSettings.Ext then
  2980. SaveConfiguration()
  2981. end
  2982.  
  2983. if KeybindSettings.CallOnChange then
  2984. KeybindSettings.Callback(tostring(NewKeybind))
  2985. end
  2986. end
  2987.  
  2988. if Settings.ConfigurationSaving then
  2989. if Settings.ConfigurationSaving.Enabled and KeybindSettings.Flag then
  2990. RayfieldLibrary.Flags[KeybindSettings.Flag] = KeybindSettings
  2991. end
  2992. end
  2993.  
  2994. Rayfield.Main:GetPropertyChangedSignal('BackgroundColor3'):Connect(function()
  2995. Keybind.KeybindFrame.BackgroundColor3 = SelectedTheme.InputBackground
  2996. Keybind.KeybindFrame.UIStroke.Color = SelectedTheme.InputStroke
  2997. end)
  2998.  
  2999. return KeybindSettings
  3000. end
  3001.  
  3002. -- Toggle
  3003. function Tab:CreateToggle(ToggleSettings)
  3004. local ToggleValue = {}
  3005.  
  3006. local Toggle = Elements.Template.Toggle:Clone()
  3007. Toggle.Name = ToggleSettings.Name
  3008. Toggle.Title.Text = ToggleSettings.Name
  3009. Toggle.Visible = true
  3010. Toggle.Parent = TabPage
  3011.  
  3012. Toggle.BackgroundTransparency = 1
  3013. Toggle.UIStroke.Transparency = 1
  3014. Toggle.Title.TextTransparency = 1
  3015. Toggle.Switch.BackgroundColor3 = SelectedTheme.ToggleBackground
  3016.  
  3017. if SelectedTheme ~= RayfieldLibrary.Theme.Default then
  3018. Toggle.Switch.Shadow.Visible = false
  3019. end
  3020.  
  3021. TweenService:Create(Toggle, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  3022. TweenService:Create(Toggle.UIStroke, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  3023. TweenService:Create(Toggle.Title, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  3024.  
  3025. if ToggleSettings.CurrentValue == true then
  3026. Toggle.Switch.Indicator.Position = UDim2.new(1, -20, 0.5, 0)
  3027. Toggle.Switch.Indicator.UIStroke.Color = SelectedTheme.ToggleEnabledStroke
  3028. Toggle.Switch.Indicator.BackgroundColor3 = SelectedTheme.ToggleEnabled
  3029. Toggle.Switch.UIStroke.Color = SelectedTheme.ToggleEnabledOuterStroke
  3030. else
  3031. Toggle.Switch.Indicator.Position = UDim2.new(1, -40, 0.5, 0)
  3032. Toggle.Switch.Indicator.UIStroke.Color = SelectedTheme.ToggleDisabledStroke
  3033. Toggle.Switch.Indicator.BackgroundColor3 = SelectedTheme.ToggleDisabled
  3034. Toggle.Switch.UIStroke.Color = SelectedTheme.ToggleDisabledOuterStroke
  3035. end
  3036.  
  3037. Toggle.MouseEnter:Connect(function()
  3038. TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play()
  3039. end)
  3040.  
  3041. Toggle.MouseLeave:Connect(function()
  3042. TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  3043. end)
  3044.  
  3045. Toggle.Interact.MouseButton1Click:Connect(function()
  3046. if ToggleSettings.CurrentValue == true then
  3047. ToggleSettings.CurrentValue = false
  3048. TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play()
  3049. TweenService:Create(Toggle.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  3050. TweenService:Create(Toggle.Switch.Indicator, TweenInfo.new(0.45, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Position = UDim2.new(1, -40, 0.5, 0)}):Play()
  3051. TweenService:Create(Toggle.Switch.Indicator.UIStroke, TweenInfo.new(0.55, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {Color = SelectedTheme.ToggleDisabledStroke}):Play()
  3052. TweenService:Create(Toggle.Switch.Indicator, TweenInfo.new(0.8, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {BackgroundColor3 = SelectedTheme.ToggleDisabled}):Play()
  3053. TweenService:Create(Toggle.Switch.UIStroke, TweenInfo.new(0.55, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {Color = SelectedTheme.ToggleDisabledOuterStroke}):Play()
  3054. TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  3055. TweenService:Create(Toggle.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  3056. else
  3057. ToggleSettings.CurrentValue = true
  3058. TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play()
  3059. TweenService:Create(Toggle.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  3060. TweenService:Create(Toggle.Switch.Indicator, TweenInfo.new(0.5, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Position = UDim2.new(1, -20, 0.5, 0)}):Play()
  3061. TweenService:Create(Toggle.Switch.Indicator.UIStroke, TweenInfo.new(0.55, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {Color = SelectedTheme.ToggleEnabledStroke}):Play()
  3062. TweenService:Create(Toggle.Switch.Indicator, TweenInfo.new(0.8, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {BackgroundColor3 = SelectedTheme.ToggleEnabled}):Play()
  3063. TweenService:Create(Toggle.Switch.UIStroke, TweenInfo.new(0.55, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {Color = SelectedTheme.ToggleEnabledOuterStroke}):Play()
  3064. TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  3065. TweenService:Create(Toggle.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  3066. end
  3067.  
  3068. local Success, Response = pcall(function()
  3069. if debugX then warn('Running toggle \''..ToggleSettings.Name..'\' (Interact)') end
  3070.  
  3071. ToggleSettings.Callback(ToggleSettings.CurrentValue)
  3072. end)
  3073.  
  3074. if not Success then
  3075. TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = Color3.fromRGB(85, 0, 0)}):Play()
  3076. TweenService:Create(Toggle.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  3077. Toggle.Title.Text = "Callback Error"
  3078. print("Rayfield | "..ToggleSettings.Name.." Callback Error " ..tostring(Response))
  3079. warn('Check docs.sirius.menu for help with Rayfield specific development.')
  3080. task.wait(0.5)
  3081. Toggle.Title.Text = ToggleSettings.Name
  3082. TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  3083. TweenService:Create(Toggle.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  3084. end
  3085.  
  3086. if not ToggleSettings.Ext then
  3087. SaveConfiguration()
  3088. end
  3089. end)
  3090.  
  3091. function ToggleSettings:Set(NewToggleValue)
  3092. if NewToggleValue == true then
  3093. ToggleSettings.CurrentValue = true
  3094. TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play()
  3095. TweenService:Create(Toggle.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  3096. TweenService:Create(Toggle.Switch.Indicator, TweenInfo.new(0.5, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Position = UDim2.new(1, -20, 0.5, 0)}):Play()
  3097. TweenService:Create(Toggle.Switch.Indicator, TweenInfo.new(0.4, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Size = UDim2.new(0,12,0,12)}):Play()
  3098. TweenService:Create(Toggle.Switch.Indicator.UIStroke, TweenInfo.new(0.55, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {Color = SelectedTheme.ToggleEnabledStroke}):Play()
  3099. TweenService:Create(Toggle.Switch.Indicator, TweenInfo.new(0.8, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {BackgroundColor3 = SelectedTheme.ToggleEnabled}):Play()
  3100. TweenService:Create(Toggle.Switch.UIStroke, TweenInfo.new(0.55, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {Color = SelectedTheme.ToggleEnabledOuterStroke}):Play()
  3101. TweenService:Create(Toggle.Switch.Indicator, TweenInfo.new(0.45, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Size = UDim2.new(0,17,0,17)}):Play()
  3102. TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  3103. TweenService:Create(Toggle.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  3104. else
  3105. ToggleSettings.CurrentValue = false
  3106. TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play()
  3107. TweenService:Create(Toggle.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  3108. TweenService:Create(Toggle.Switch.Indicator, TweenInfo.new(0.45, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Position = UDim2.new(1, -40, 0.5, 0)}):Play()
  3109. TweenService:Create(Toggle.Switch.Indicator, TweenInfo.new(0.4, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Size = UDim2.new(0,12,0,12)}):Play()
  3110. TweenService:Create(Toggle.Switch.Indicator.UIStroke, TweenInfo.new(0.55, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {Color = SelectedTheme.ToggleDisabledStroke}):Play()
  3111. TweenService:Create(Toggle.Switch.Indicator, TweenInfo.new(0.8, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {BackgroundColor3 = SelectedTheme.ToggleDisabled}):Play()
  3112. TweenService:Create(Toggle.Switch.UIStroke, TweenInfo.new(0.55, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {Color = SelectedTheme.ToggleDisabledOuterStroke}):Play()
  3113. TweenService:Create(Toggle.Switch.Indicator, TweenInfo.new(0.4, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Size = UDim2.new(0,17,0,17)}):Play()
  3114. TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  3115. TweenService:Create(Toggle.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  3116. end
  3117.  
  3118. local Success, Response = pcall(function()
  3119. if debugX then warn('Running toggle \''..ToggleSettings.Name..'\' (:Set)') end
  3120.  
  3121. ToggleSettings.Callback(ToggleSettings.CurrentValue)
  3122. end)
  3123.  
  3124. if not Success then
  3125. TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = Color3.fromRGB(85, 0, 0)}):Play()
  3126. TweenService:Create(Toggle.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  3127. Toggle.Title.Text = "Callback Error"
  3128. print("Rayfield | "..ToggleSettings.Name.." Callback Error " ..tostring(Response))
  3129. warn('Check docs.sirius.menu for help with Rayfield specific development.')
  3130. task.wait(0.5)
  3131. Toggle.Title.Text = ToggleSettings.Name
  3132. TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  3133. TweenService:Create(Toggle.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  3134. end
  3135.  
  3136. if not ToggleSettings.Ext then
  3137. SaveConfiguration()
  3138. end
  3139. end
  3140.  
  3141. if not ToggleSettings.Ext then
  3142. if Settings.ConfigurationSaving then
  3143. if Settings.ConfigurationSaving.Enabled and ToggleSettings.Flag then
  3144. RayfieldLibrary.Flags[ToggleSettings.Flag] = ToggleSettings
  3145. end
  3146. end
  3147. end
  3148.  
  3149.  
  3150. Rayfield.Main:GetPropertyChangedSignal('BackgroundColor3'):Connect(function()
  3151. Toggle.Switch.BackgroundColor3 = SelectedTheme.ToggleBackground
  3152.  
  3153. if SelectedTheme ~= RayfieldLibrary.Theme.Default then
  3154. Toggle.Switch.Shadow.Visible = false
  3155. end
  3156.  
  3157. task.wait()
  3158.  
  3159. if not ToggleSettings.CurrentValue then
  3160. Toggle.Switch.Indicator.UIStroke.Color = SelectedTheme.ToggleDisabledStroke
  3161. Toggle.Switch.Indicator.BackgroundColor3 = SelectedTheme.ToggleDisabled
  3162. Toggle.Switch.UIStroke.Color = SelectedTheme.ToggleDisabledOuterStroke
  3163. else
  3164. Toggle.Switch.Indicator.UIStroke.Color = SelectedTheme.ToggleEnabledStroke
  3165. Toggle.Switch.Indicator.BackgroundColor3 = SelectedTheme.ToggleEnabled
  3166. Toggle.Switch.UIStroke.Color = SelectedTheme.ToggleEnabledOuterStroke
  3167. end
  3168. end)
  3169.  
  3170. return ToggleSettings
  3171. end
  3172.  
  3173. -- Slider
  3174. function Tab:CreateSlider(SliderSettings)
  3175. local SLDragging = false
  3176. local Slider = Elements.Template.Slider:Clone()
  3177. Slider.Name = SliderSettings.Name
  3178. Slider.Title.Text = SliderSettings.Name
  3179. Slider.Visible = true
  3180. Slider.Parent = TabPage
  3181.  
  3182. Slider.BackgroundTransparency = 1
  3183. Slider.UIStroke.Transparency = 1
  3184. Slider.Title.TextTransparency = 1
  3185.  
  3186. if SelectedTheme ~= RayfieldLibrary.Theme.Default then
  3187. Slider.Main.Shadow.Visible = false
  3188. end
  3189.  
  3190. Slider.Main.BackgroundColor3 = SelectedTheme.SliderBackground
  3191. Slider.Main.UIStroke.Color = SelectedTheme.SliderStroke
  3192. Slider.Main.Progress.UIStroke.Color = SelectedTheme.SliderStroke
  3193. Slider.Main.Progress.BackgroundColor3 = SelectedTheme.SliderProgress
  3194.  
  3195. TweenService:Create(Slider, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  3196. TweenService:Create(Slider.UIStroke, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  3197. TweenService:Create(Slider.Title, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  3198.  
  3199. Slider.Main.Progress.Size = UDim2.new(0, Slider.Main.AbsoluteSize.X * ((SliderSettings.CurrentValue + SliderSettings.Range[1]) / (SliderSettings.Range[2] - SliderSettings.Range[1])) > 5 and Slider.Main.AbsoluteSize.X * (SliderSettings.CurrentValue / (SliderSettings.Range[2] - SliderSettings.Range[1])) or 5, 1, 0)
  3200.  
  3201. if not SliderSettings.Suffix then
  3202. Slider.Main.Information.Text = tostring(SliderSettings.CurrentValue)
  3203. else
  3204. Slider.Main.Information.Text = tostring(SliderSettings.CurrentValue) .. " " .. SliderSettings.Suffix
  3205. end
  3206.  
  3207. Slider.MouseEnter:Connect(function()
  3208. TweenService:Create(Slider, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play()
  3209. end)
  3210.  
  3211. Slider.MouseLeave:Connect(function()
  3212. TweenService:Create(Slider, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  3213. end)
  3214.  
  3215. Slider.Main.Interact.InputBegan:Connect(function(Input)
  3216. if Input.UserInputType == Enum.UserInputType.MouseButton1 or Input.UserInputType == Enum.UserInputType.Touch then
  3217. TweenService:Create(Slider.Main.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  3218. TweenService:Create(Slider.Main.Progress.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  3219. SLDragging = true
  3220. end
  3221. end)
  3222.  
  3223. Slider.Main.Interact.InputEnded:Connect(function(Input)
  3224. if Input.UserInputType == Enum.UserInputType.MouseButton1 or Input.UserInputType == Enum.UserInputType.Touch then
  3225. TweenService:Create(Slider.Main.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 0.4}):Play()
  3226. TweenService:Create(Slider.Main.Progress.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 0.3}):Play()
  3227. SLDragging = false
  3228. end
  3229. end)
  3230.  
  3231. Slider.Main.Interact.MouseButton1Down:Connect(function(X)
  3232. local Current = Slider.Main.Progress.AbsolutePosition.X + Slider.Main.Progress.AbsoluteSize.X
  3233. local Start = Current
  3234. local Location = X
  3235. local Loop; Loop = RunService.Stepped:Connect(function()
  3236. if SLDragging then
  3237. Location = UserInputService:GetMouseLocation().X
  3238. Current = Current + 0.025 * (Location - Start)
  3239.  
  3240. if Location < Slider.Main.AbsolutePosition.X then
  3241. Location = Slider.Main.AbsolutePosition.X
  3242. elseif Location > Slider.Main.AbsolutePosition.X + Slider.Main.AbsoluteSize.X then
  3243. Location = Slider.Main.AbsolutePosition.X + Slider.Main.AbsoluteSize.X
  3244. end
  3245.  
  3246. if Current < Slider.Main.AbsolutePosition.X + 5 then
  3247. Current = Slider.Main.AbsolutePosition.X + 5
  3248. elseif Current > Slider.Main.AbsolutePosition.X + Slider.Main.AbsoluteSize.X then
  3249. Current = Slider.Main.AbsolutePosition.X + Slider.Main.AbsoluteSize.X
  3250. end
  3251.  
  3252. if Current <= Location and (Location - Start) < 0 then
  3253. Start = Location
  3254. elseif Current >= Location and (Location - Start) > 0 then
  3255. Start = Location
  3256. end
  3257. TweenService:Create(Slider.Main.Progress, TweenInfo.new(0.45, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {Size = UDim2.new(0, Current - Slider.Main.AbsolutePosition.X, 1, 0)}):Play()
  3258. local NewValue = SliderSettings.Range[1] + (Location - Slider.Main.AbsolutePosition.X) / Slider.Main.AbsoluteSize.X * (SliderSettings.Range[2] - SliderSettings.Range[1])
  3259.  
  3260. NewValue = math.floor(NewValue / SliderSettings.Increment + 0.5) * (SliderSettings.Increment * 10000000) / 10000000
  3261. NewValue = math.clamp(NewValue, SliderSettings.Range[1], SliderSettings.Range[2])
  3262.  
  3263. if not SliderSettings.Suffix then
  3264. Slider.Main.Information.Text = tostring(NewValue)
  3265. else
  3266. Slider.Main.Information.Text = tostring(NewValue) .. " " .. SliderSettings.Suffix
  3267. end
  3268.  
  3269. if SliderSettings.CurrentValue ~= NewValue then
  3270. local Success, Response = pcall(function()
  3271. SliderSettings.Callback(NewValue)
  3272. end)
  3273. if not Success then
  3274. TweenService:Create(Slider, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = Color3.fromRGB(85, 0, 0)}):Play()
  3275. TweenService:Create(Slider.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  3276. Slider.Title.Text = "Callback Error"
  3277. print("Rayfield | "..SliderSettings.Name.." Callback Error " ..tostring(Response))
  3278. warn('Check docs.sirius.menu for help with Rayfield specific development.')
  3279. task.wait(0.5)
  3280. Slider.Title.Text = SliderSettings.Name
  3281. TweenService:Create(Slider, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  3282. TweenService:Create(Slider.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  3283. end
  3284.  
  3285. SliderSettings.CurrentValue = NewValue
  3286. if not SliderSettings.Ext then
  3287. SaveConfiguration()
  3288. end
  3289. end
  3290. else
  3291. TweenService:Create(Slider.Main.Progress, TweenInfo.new(0.3, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {Size = UDim2.new(0, Location - Slider.Main.AbsolutePosition.X > 5 and Location - Slider.Main.AbsolutePosition.X or 5, 1, 0)}):Play()
  3292. Loop:Disconnect()
  3293. end
  3294. end)
  3295. end)
  3296.  
  3297. function SliderSettings:Set(NewVal)
  3298. local NewVal = math.clamp(NewVal, SliderSettings.Range[1], SliderSettings.Range[2])
  3299.  
  3300. TweenService:Create(Slider.Main.Progress, TweenInfo.new(0.45, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {Size = UDim2.new(0, Slider.Main.AbsoluteSize.X * ((NewVal + SliderSettings.Range[1]) / (SliderSettings.Range[2] - SliderSettings.Range[1])) > 5 and Slider.Main.AbsoluteSize.X * (NewVal / (SliderSettings.Range[2] - SliderSettings.Range[1])) or 5, 1, 0)}):Play()
  3301. Slider.Main.Information.Text = tostring(NewVal) .. " " .. (SliderSettings.Suffix or "")
  3302.  
  3303. local Success, Response = pcall(function()
  3304. SliderSettings.Callback(NewVal)
  3305. end)
  3306.  
  3307. if not Success then
  3308. TweenService:Create(Slider, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = Color3.fromRGB(85, 0, 0)}):Play()
  3309. TweenService:Create(Slider.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 1}):Play()
  3310. Slider.Title.Text = "Callback Error"
  3311. print("Rayfield | "..SliderSettings.Name.." Callback Error " ..tostring(Response))
  3312. warn('Check docs.sirius.menu for help with Rayfield specific development.')
  3313. task.wait(0.5)
  3314. Slider.Title.Text = SliderSettings.Name
  3315. TweenService:Create(Slider, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play()
  3316. TweenService:Create(Slider.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {Transparency = 0}):Play()
  3317. end
  3318.  
  3319. SliderSettings.CurrentValue = NewVal
  3320. if not SliderSettings.Ext then
  3321. SaveConfiguration()
  3322. end
  3323. end
  3324.  
  3325. if Settings.ConfigurationSaving then
  3326. if Settings.ConfigurationSaving.Enabled and SliderSettings.Flag then
  3327. RayfieldLibrary.Flags[SliderSettings.Flag] = SliderSettings
  3328. end
  3329. end
  3330.  
  3331. Rayfield.Main:GetPropertyChangedSignal('BackgroundColor3'):Connect(function()
  3332. if SelectedTheme ~= RayfieldLibrary.Theme.Default then
  3333. Slider.Main.Shadow.Visible = false
  3334. end
  3335.  
  3336. Slider.Main.BackgroundColor3 = SelectedTheme.SliderBackground
  3337. Slider.Main.UIStroke.Color = SelectedTheme.SliderStroke
  3338. Slider.Main.Progress.UIStroke.Color = SelectedTheme.SliderStroke
  3339. Slider.Main.Progress.BackgroundColor3 = SelectedTheme.SliderProgress
  3340. end)
  3341.  
  3342. return SliderSettings
  3343. end
  3344.  
  3345. Rayfield.Main:GetPropertyChangedSignal('BackgroundColor3'):Connect(function()
  3346. TabButton.UIStroke.Color = SelectedTheme.TabStroke
  3347.  
  3348. if Elements.UIPageLayout.CurrentPage == TabPage then
  3349. TabButton.BackgroundColor3 = SelectedTheme.TabBackgroundSelected
  3350. TabButton.Image.ImageColor3 = SelectedTheme.SelectedTabTextColor
  3351. TabButton.Title.TextColor3 = SelectedTheme.SelectedTabTextColor
  3352. else
  3353. TabButton.BackgroundColor3 = SelectedTheme.TabBackground
  3354. TabButton.Image.ImageColor3 = SelectedTheme.TabTextColor
  3355. TabButton.Title.TextColor3 = SelectedTheme.TabTextColor
  3356. end
  3357. end)
  3358.  
  3359. return Tab
  3360. end
  3361.  
  3362. Elements.Visible = true
  3363.  
  3364.  
  3365. task.wait(1.1)
  3366. TweenService:Create(Main, TweenInfo.new(0.7, Enum.EasingStyle.Exponential, Enum.EasingDirection.InOut), {Size = UDim2.new(0, 390, 0, 90)}):Play()
  3367. task.wait(0.3)
  3368. TweenService:Create(LoadingFrame.Title, TweenInfo.new(0.2, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  3369. TweenService:Create(LoadingFrame.Subtitle, TweenInfo.new(0.2, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  3370. TweenService:Create(LoadingFrame.Version, TweenInfo.new(0.2, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  3371. task.wait(0.1)
  3372. TweenService:Create(Main, TweenInfo.new(0.6, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {Size = useMobileSizing and UDim2.new(0, 500, 0, 275) or UDim2.new(0, 500, 0, 475)}):Play()
  3373. TweenService:Create(Main.Shadow.Image, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {ImageTransparency = 0.6}):Play()
  3374.  
  3375. Topbar.BackgroundTransparency = 1
  3376. Topbar.Divider.Size = UDim2.new(0, 0, 0, 1)
  3377. Topbar.Divider.BackgroundColor3 = SelectedTheme.ElementStroke
  3378. Topbar.CornerRepair.BackgroundTransparency = 1
  3379. Topbar.Title.TextTransparency = 1
  3380. Topbar.Search.ImageTransparency = 1
  3381. if Topbar:FindFirstChild('Settings') then
  3382. Topbar.Settings.ImageTransparency = 1
  3383. end
  3384. Topbar.ChangeSize.ImageTransparency = 1
  3385. Topbar.Hide.ImageTransparency = 1
  3386.  
  3387.  
  3388. task.wait(0.5)
  3389. Topbar.Visible = true
  3390. TweenService:Create(Topbar, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  3391. TweenService:Create(Topbar.CornerRepair, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0}):Play()
  3392. task.wait(0.1)
  3393. TweenService:Create(Topbar.Divider, TweenInfo.new(1, Enum.EasingStyle.Exponential), {Size = UDim2.new(1, 0, 0, 1)}):Play()
  3394. TweenService:Create(Topbar.Title, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {TextTransparency = 0}):Play()
  3395. task.wait(0.05)
  3396. TweenService:Create(Topbar.Search, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {ImageTransparency = 0.8}):Play()
  3397. task.wait(0.05)
  3398. if Topbar:FindFirstChild('Settings') then
  3399. TweenService:Create(Topbar.Settings, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {ImageTransparency = 0.8}):Play()
  3400. task.wait(0.05)
  3401. end
  3402. TweenService:Create(Topbar.ChangeSize, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {ImageTransparency = 0.8}):Play()
  3403. task.wait(0.05)
  3404. TweenService:Create(Topbar.Hide, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {ImageTransparency = 0.8}):Play()
  3405. task.wait(0.3)
  3406.  
  3407. if dragBar then
  3408. TweenService:Create(dragBarCosmetic, TweenInfo.new(0.6, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0.7}):Play()
  3409. end
  3410.  
  3411. function Window.ModifyTheme(NewTheme)
  3412. local success = pcall(ChangeTheme, NewTheme)
  3413. if not success then
  3414. RayfieldLibrary:Notify({Title = 'Unable to Change Theme', Content = 'We are unable find a theme on file.', Image = 4400704299})
  3415. else
  3416. RayfieldLibrary:Notify({Title = 'Theme Changed', Content = 'Successfully changed theme to '..(typeof(NewTheme) == 'string' and NewTheme or 'Custom Theme')..'.', Image = 4483362748})
  3417. end
  3418. end
  3419.  
  3420. local success, result = pcall(function()
  3421. createSettings(Window)
  3422. end)
  3423.  
  3424. if not success then warn('Rayfield had an issue creating settings.') end
  3425.  
  3426. return Window
  3427. end
  3428.  
  3429. local function setVisibility(visibility: boolean, notify: boolean?)
  3430. if Debounce then return end
  3431. if visibility then
  3432. Hidden = false
  3433. Unhide()
  3434. else
  3435. Hidden = true
  3436. Hide(notify)
  3437. end
  3438. end
  3439.  
  3440. function RayfieldLibrary:SetVisibility(visibility: boolean)
  3441. setVisibility(visibility, false)
  3442. end
  3443.  
  3444. function RayfieldLibrary:IsVisible(): boolean
  3445. return not Hidden
  3446. end
  3447.  
  3448. local hideHotkeyConnection -- Has to be initialized here since the connection is made later in the script
  3449. function RayfieldLibrary:Destroy()
  3450. hideHotkeyConnection:Disconnect()
  3451. Rayfield:Destroy()
  3452. end
  3453.  
  3454. Topbar.ChangeSize.MouseButton1Click:Connect(function()
  3455. if Debounce then return end
  3456. if Minimised then
  3457. Minimised = false
  3458. Maximise()
  3459. else
  3460. Minimised = true
  3461. Minimise()
  3462. end
  3463. end)
  3464.  
  3465. Main.Search.Input:GetPropertyChangedSignal('Text'):Connect(function()
  3466. if #Main.Search.Input.Text > 0 then
  3467. if not Elements.UIPageLayout.CurrentPage:FindFirstChild('SearchTitle-fsefsefesfsefesfesfThanks') then
  3468. local searchTitle = Elements.Template.SectionTitle:Clone()
  3469. searchTitle.Parent = Elements.UIPageLayout.CurrentPage
  3470. searchTitle.Name = 'SearchTitle-fsefsefesfsefesfesfThanks'
  3471. searchTitle.LayoutOrder = -100
  3472. searchTitle.Title.Text = "Results from '"..Elements.UIPageLayout.CurrentPage.Name.."'"
  3473. searchTitle.Visible = true
  3474. end
  3475. else
  3476. local searchTitle = Elements.UIPageLayout.CurrentPage:FindFirstChild('SearchTitle-fsefsefesfsefesfesfThanks')
  3477.  
  3478. if searchTitle then
  3479. searchTitle:Destroy()
  3480. end
  3481. end
  3482.  
  3483. for _, element in ipairs(Elements.UIPageLayout.CurrentPage:GetChildren()) do
  3484. if element.ClassName ~= 'UIListLayout' and element.Name ~= 'Placeholder' and element.Name ~= 'SearchTitle-fsefsefesfsefesfesfThanks' then
  3485. if element.Name == 'SectionTitle' then
  3486. if #Main.Search.Input.Text == 0 then
  3487. element.Visible = true
  3488. else
  3489. element.Visible = false
  3490. end
  3491. else
  3492. if string.lower(element.Name):find(string.lower(Main.Search.Input.Text), 1, true) then
  3493. element.Visible = true
  3494. else
  3495. element.Visible = false
  3496. end
  3497. end
  3498. end
  3499. end
  3500. end)
  3501.  
  3502. Main.Search.Input.FocusLost:Connect(function(enterPressed)
  3503. if #Main.Search.Input.Text == 0 and searchOpen then
  3504. task.wait(0.12)
  3505. closeSearch()
  3506. end
  3507. end)
  3508.  
  3509. Topbar.Search.MouseButton1Click:Connect(function()
  3510. task.spawn(function()
  3511. if searchOpen then
  3512. closeSearch()
  3513. else
  3514. openSearch()
  3515. end
  3516. end)
  3517. end)
  3518.  
  3519. if Topbar:FindFirstChild('Settings') then
  3520. Topbar.Settings.MouseButton1Click:Connect(function()
  3521. task.spawn(function()
  3522. for _, OtherTabButton in ipairs(TabList:GetChildren()) do
  3523. if OtherTabButton.Name ~= "Template" and OtherTabButton.ClassName == "Frame" and OtherTabButton ~= TabButton and OtherTabButton.Name ~= "Placeholder" then
  3524. TweenService:Create(OtherTabButton, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {BackgroundColor3 = SelectedTheme.TabBackground}):Play()
  3525. TweenService:Create(OtherTabButton.Title, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {TextColor3 = SelectedTheme.TabTextColor}):Play()
  3526. TweenService:Create(OtherTabButton.Image, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {ImageColor3 = SelectedTheme.TabTextColor}):Play()
  3527. TweenService:Create(OtherTabButton, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {BackgroundTransparency = 0.7}):Play()
  3528. TweenService:Create(OtherTabButton.Title, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {TextTransparency = 0.2}):Play()
  3529. TweenService:Create(OtherTabButton.Image, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {ImageTransparency = 0.2}):Play()
  3530. TweenService:Create(OtherTabButton.UIStroke, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {Transparency = 0.5}):Play()
  3531. end
  3532. end
  3533.  
  3534. Elements.UIPageLayout:JumpTo(Elements['Rayfield Settings'])
  3535. end)
  3536. end)
  3537.  
  3538. end
  3539.  
  3540.  
  3541. Topbar.Hide.MouseButton1Click:Connect(function()
  3542. setVisibility(Hidden, not useMobileSizing)
  3543. end)
  3544.  
  3545. hideHotkeyConnection = UserInputService.InputBegan:Connect(function(input, processed)
  3546. if (input.KeyCode == Enum.KeyCode[settingsTable.General.rayfieldOpen.Value or 'K'] and not processed) then
  3547. if Debounce then return end
  3548. if Hidden then
  3549. Hidden = false
  3550. Unhide()
  3551. else
  3552. Hidden = true
  3553. Hide()
  3554. end
  3555. end
  3556. end)
  3557.  
  3558. if MPrompt then
  3559. MPrompt.Interact.MouseButton1Click:Connect(function()
  3560. if Debounce then return end
  3561. if Hidden then
  3562. Hidden = false
  3563. Unhide()
  3564. end
  3565. end)
  3566. end
  3567.  
  3568. for _, TopbarButton in ipairs(Topbar:GetChildren()) do
  3569. if TopbarButton.ClassName == "ImageButton" and TopbarButton.Name ~= 'Icon' then
  3570. TopbarButton.MouseEnter:Connect(function()
  3571. TweenService:Create(TopbarButton, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {ImageTransparency = 0}):Play()
  3572. end)
  3573.  
  3574. TopbarButton.MouseLeave:Connect(function()
  3575. TweenService:Create(TopbarButton, TweenInfo.new(0.7, Enum.EasingStyle.Exponential), {ImageTransparency = 0.8}):Play()
  3576. end)
  3577. end
  3578. end
  3579.  
  3580.  
  3581. function RayfieldLibrary:LoadConfiguration()
  3582. local config
  3583.  
  3584. if debugX then
  3585. warn('Loading Configuration')
  3586. end
  3587.  
  3588. if useStudio then
  3589. config = [[{"Toggle1adwawd":true,"ColorPicker1awd":{"B":255,"G":255,"R":255},"Slider1dawd":100,"ColorPicfsefker1":{"B":255,"G":255,"R":255},"Slidefefsr1":80,"dawdawd":"","Input1":"hh","Keybind1":"B","Dropdown1":["Ocean"]}]]
  3590. end
  3591.  
  3592. if CEnabled then
  3593. local notified
  3594. local loaded
  3595.  
  3596. local success, result = pcall(function()
  3597. if useStudio and config then
  3598. loaded = LoadConfiguration(config)
  3599. return
  3600. end
  3601.  
  3602. if isfile then
  3603. if isfile(ConfigurationFolder .. "/" .. CFileName .. ConfigurationExtension) then
  3604. loaded = LoadConfiguration(readfile(ConfigurationFolder .. "/" .. CFileName .. ConfigurationExtension))
  3605. end
  3606. else
  3607. notified = true
  3608. RayfieldLibrary:Notify({Title = "Rayfield Configurations", Content = "We couldn't enable Configuration Saving as you are not using software with filesystem support.", Image = 4384402990})
  3609. end
  3610. end)
  3611.  
  3612. if success and loaded and not notified then
  3613. RayfieldLibrary:Notify({Title = "Rayfield Configurations", Content = "The configuration file for this script has been loaded from a previous session.", Image = 4384403532})
  3614. elseif not success and not notified then
  3615. warn('Rayfield Configurations Error | '..tostring(result))
  3616. RayfieldLibrary:Notify({Title = "Rayfield Configurations", Content = "We've encountered an issue loading your configuration correctly.\n\nCheck the Developer Console for more information.", Image = 4384402990})
  3617. end
  3618. end
  3619.  
  3620. globalLoaded = true
  3621. end
  3622.  
  3623.  
  3624.  
  3625. if useStudio then
  3626. -- run w/ studio
  3627. -- Feel free to place your own script here to see how it'd work in Roblox Studio before running it on your execution software.
  3628.  
  3629.  
  3630. local Window = RayfieldLibrary:CreateWindow({
  3631. Name = "Rayfield Example Window",
  3632. LoadingTitle = "Rayfield Interface Suite",
  3633. Theme = 'Default',
  3634. Icon = 0,
  3635. LoadingSubtitle = "by Sirius",
  3636. ConfigurationSaving = {
  3637. Enabled = true,
  3638. FolderName = nil, -- Create a custom folder for your hub/game
  3639. FileName = "Big Hub52"
  3640. },
  3641. Discord = {
  3642. Enabled = false,
  3643. Invite = "noinvitelink", -- The Discord invite code, do not include discord.gg/. E.g. discord.gg/ABCD would be ABCD
  3644. RememberJoins = true -- Set this to false to make them join the discord every time they load it up
  3645. },
  3646. KeySystem = false, -- Set this to true to use our key system
  3647. KeySettings = {
  3648. Title = "Untitled",
  3649. Subtitle = "Key System",
  3650. Note = "No method of obtaining the key is provided",
  3651. FileName = "Key", -- It is recommended to use something unique as other scripts using Rayfield may overwrite your key file
  3652. SaveKey = true, -- The user's key will be saved, but if you change the key, they will be unable to use your script
  3653. GrabKeyFromSite = false, -- If this is true, set Key below to the RAW site you would like Rayfield to get the key from
  3654. Key = {"Hello"} -- List of keys that will be accepted by the system, can be RAW file links (pastebin, github etc) or simple strings ("hello","key22")
  3655. }
  3656. })
  3657.  
  3658. local Tab = Window:CreateTab("Tab Example", 'key-round') -- Title, Image
  3659. local Tab2 = Window:CreateTab("Tab Example 2", 4483362458) -- Title, Image
  3660.  
  3661. local Section = Tab2:CreateSection("Section")
  3662.  
  3663.  
  3664. local ColorPicker = Tab2:CreateColorPicker({
  3665. Name = "Color Picker",
  3666. Color = Color3.fromRGB(255,255,255),
  3667. Flag = "ColorPicfsefker1", -- 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
  3668. Callback = function(Value)
  3669. -- The function that takes place every time the color picker is moved/changed
  3670. -- The variable (Value) is a Color3fromRGB value based on which color is selected
  3671. end
  3672. })
  3673.  
  3674. local Slider = Tab2:CreateSlider({
  3675. Name = "Slider Example",
  3676. Range = {0, 100},
  3677. Increment = 10,
  3678. Suffix = "Bananas",
  3679. CurrentValue = 40,
  3680. Flag = "Slidefefsr1", -- 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
  3681. Callback = function(Value)
  3682. -- The function that takes place when the slider changes
  3683. -- The variable (Value) is a number which correlates to the value the slider is currently at
  3684. end,
  3685. })
  3686.  
  3687. local Input = Tab2:CreateInput({
  3688. Name = "Input Example",
  3689. CurrentValue = '',
  3690. PlaceholderText = "Input Placeholder",
  3691. Flag = 'dawdawd',
  3692. RemoveTextAfterFocusLost = false,
  3693. Callback = function(Text)
  3694. -- The function that takes place when the input is changed
  3695. -- The variable (Text) is a string for the value in the text box
  3696. end,
  3697. })
  3698.  
  3699.  
  3700. --RayfieldLibrary:Notify({Title = "Rayfield Interface", Content = "Welcome to Rayfield. These - are the brand new notification design for Rayfield, with custom sizing and Rayfield calculated wait times.", Image = 4483362458})
  3701.  
  3702. local Section = Tab:CreateSection("Section Example")
  3703.  
  3704. local Button = Tab:CreateButton({
  3705. Name = "Change Theme",
  3706. Callback = function()
  3707. -- The function that takes place when the button is pressed
  3708. Window.ModifyTheme('DarkBlue')
  3709. end,
  3710. })
  3711.  
  3712. local Toggle = Tab:CreateToggle({
  3713. Name = "Toggle Example",
  3714. CurrentValue = false,
  3715. Flag = "Toggle1adwawd", -- 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
  3716. Callback = function(Value)
  3717. -- The function that takes place when the toggle is pressed
  3718. -- The variable (Value) is a boolean on whether the toggle is true or false
  3719. end,
  3720. })
  3721.  
  3722. local ColorPicker = Tab:CreateColorPicker({
  3723. Name = "Color Picker",
  3724. Color = Color3.fromRGB(255,255,255),
  3725. Flag = "ColorPicker1awd", -- 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
  3726. Callback = function(Value)
  3727. -- The function that takes place every time the color picker is moved/changed
  3728. -- The variable (Value) is a Color3fromRGB value based on which color is selected
  3729. end
  3730. })
  3731.  
  3732. local Slider = Tab:CreateSlider({
  3733. Name = "Slider Example",
  3734. Range = {0, 100},
  3735. Increment = 10,
  3736. Suffix = "Bananas",
  3737. CurrentValue = 40,
  3738. Flag = "Slider1dawd", -- 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
  3739. Callback = function(Value)
  3740. -- The function that takes place when the slider changes
  3741. -- The variable (Value) is a number which correlates to the value the slider is currently at
  3742. end,
  3743. })
  3744.  
  3745. local Input = Tab:CreateInput({
  3746. Name = "Input Example",
  3747. CurrentValue = "Helo",
  3748. PlaceholderText = "Adaptive Input",
  3749. RemoveTextAfterFocusLost = false,
  3750. Flag = 'Input1',
  3751. Callback = function(Text)
  3752. -- The function that takes place when the input is changed
  3753. -- The variable (Text) is a string for the value in the text box
  3754. end,
  3755. })
  3756.  
  3757. local thoptions = {}
  3758. for themename, theme in pairs(RayfieldLibrary.Theme) do
  3759. table.insert(thoptions, themename)
  3760. end
  3761.  
  3762. local Dropdown = Tab:CreateDropdown({
  3763. Name = "Theme",
  3764. Options = thoptions,
  3765. CurrentOption = {"Amethyst"},
  3766. MultipleOptions = false,
  3767. 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
  3768. Callback = function(Options)
  3769. --Window.ModifyTheme(Options[1])
  3770. -- The function that takes place when the selected option is changed
  3771. -- The variable (Options) is a table of strings for the current selected options
  3772. end,
  3773. })
  3774.  
  3775.  
  3776. --Window.ModifyTheme({
  3777. -- TextColor = Color3.fromRGB(50, 55, 60),
  3778. -- Background = Color3.fromRGB(240, 245, 250),
  3779. -- Topbar = Color3.fromRGB(215, 225, 235),
  3780. -- Shadow = Color3.fromRGB(200, 210, 220),
  3781.  
  3782. -- NotificationBackground = Color3.fromRGB(210, 220, 230),
  3783. -- NotificationActionsBackground = Color3.fromRGB(225, 230, 240),
  3784.  
  3785. -- TabBackground = Color3.fromRGB(200, 210, 220),
  3786. -- TabStroke = Color3.fromRGB(180, 190, 200),
  3787. -- TabBackgroundSelected = Color3.fromRGB(175, 185, 200),
  3788. -- TabTextColor = Color3.fromRGB(50, 55, 60),
  3789. -- SelectedTabTextColor = Color3.fromRGB(30, 35, 40),
  3790.  
  3791. -- ElementBackground = Color3.fromRGB(210, 220, 230),
  3792. -- ElementBackgroundHover = Color3.fromRGB(220, 230, 240),
  3793. -- SecondaryElementBackground = Color3.fromRGB(200, 210, 220),
  3794. -- ElementStroke = Color3.fromRGB(190, 200, 210),
  3795. -- SecondaryElementStroke = Color3.fromRGB(180, 190, 200),
  3796.  
  3797. -- SliderBackground = Color3.fromRGB(200, 220, 235), -- Lighter shade
  3798. -- SliderProgress = Color3.fromRGB(70, 130, 180),
  3799. -- SliderStroke = Color3.fromRGB(150, 180, 220),
  3800.  
  3801. -- ToggleBackground = Color3.fromRGB(210, 220, 230),
  3802. -- ToggleEnabled = Color3.fromRGB(70, 160, 210),
  3803. -- ToggleDisabled = Color3.fromRGB(180, 180, 180),
  3804. -- ToggleEnabledStroke = Color3.fromRGB(60, 150, 200),
  3805. -- ToggleDisabledStroke = Color3.fromRGB(140, 140, 140),
  3806. -- ToggleEnabledOuterStroke = Color3.fromRGB(100, 120, 140),
  3807. -- ToggleDisabledOuterStroke = Color3.fromRGB(120, 120, 130),
  3808.  
  3809. -- DropdownSelected = Color3.fromRGB(220, 230, 240),
  3810. -- DropdownUnselected = Color3.fromRGB(200, 210, 220),
  3811.  
  3812. -- InputBackground = Color3.fromRGB(220, 230, 240),
  3813. -- InputStroke = Color3.fromRGB(180, 190, 200),
  3814. -- PlaceholderColor = Color3.fromRGB(150, 150, 150)
  3815. --})
  3816.  
  3817. local Keybind = Tab:CreateKeybind({
  3818. Name = "Keybind Example",
  3819. CurrentKeybind = "Q",
  3820. HoldToInteract = false,
  3821. Flag = "Keybind1", -- 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
  3822. Callback = function(Keybind)
  3823. -- The function that takes place when the keybind is pressed
  3824. -- The variable (Keybind) is a boolean for whether the keybind is being held or not (HoldToInteract needs to be true)
  3825. end,
  3826. })
  3827.  
  3828. local Label = Tab:CreateLabel("Label Example")
  3829.  
  3830. local Label2 = Tab:CreateLabel("Warning", 4483362458, Color3.fromRGB(255, 159, 49), true)
  3831.  
  3832. local Paragraph = Tab:CreateParagraph({Title = "Paragraph Example", Content = "Paragraph ExampleParagraph ExampleParagraph ExampleParagraph ExampleParagraph ExampleParagraph ExampleParagraph ExampleParagraph ExampleParagraph ExampleParagraph ExampleParagraph ExampleParagraph ExampleParagraph ExampleParagraph Example"})
  3833. end
  3834.  
  3835. if CEnabled and Main:FindFirstChild('Notice') then
  3836. Main.Notice.BackgroundTransparency = 1
  3837. Main.Notice.Title.TextTransparency = 1
  3838. Main.Notice.Size = UDim2.new(0, 0, 0, 0)
  3839. Main.Notice.Position = UDim2.new(0.5, 0, 0, -100)
  3840. Main.Notice.Visible = true
  3841.  
  3842.  
  3843. TweenService:Create(Main.Notice, TweenInfo.new(0.5, Enum.EasingStyle.Exponential, Enum.EasingDirection.InOut), {Size = UDim2.new(0, 280, 0, 35), Position = UDim2.new(0.5, 0, 0, -50), BackgroundTransparency = 0.5}):Play()
  3844. TweenService:Create(Main.Notice.Title, TweenInfo.new(0.5, Enum.EasingStyle.Exponential), {TextTransparency = 0.1}):Play()
  3845. end
  3846.  
  3847. if not useStudio then
  3848. local success, result = pcall(function()
  3849. loadstring(game:HttpGet('https://raw.githubusercontent.com/SiriusSoftwareLtd/Sirius/refs/heads/request/boost.lua'))()
  3850. end)
  3851.  
  3852. if not success then
  3853. print('Error with boost file.')
  3854. print(result)
  3855. end
  3856. end
  3857.  
  3858. task.delay(4, function()
  3859. RayfieldLibrary.LoadConfiguration()
  3860. if Main:FindFirstChild('Notice') and Main.Notice.Visible then
  3861. TweenService:Create(Main.Notice, TweenInfo.new(0.5, Enum.EasingStyle.Exponential, Enum.EasingDirection.InOut), {Size = UDim2.new(0, 100, 0, 25), Position = UDim2.new(0.5, 0, 0, -100), BackgroundTransparency = 1}):Play()
  3862. TweenService:Create(Main.Notice.Title, TweenInfo.new(0.3, Enum.EasingStyle.Exponential), {TextTransparency = 1}):Play()
  3863.  
  3864. task.wait(0.5)
  3865. Main.Notice.Visible = false
  3866. end
  3867. end)
  3868.  
  3869. return RayfieldLibrary
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement