Advertisement
NukeVsCity

horrible library

Jun 27th, 2023
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 124.71 KB | None | 0 0
  1. --[
  2. [ Rayfield Interface Suite by Sirius shlex |  Designing +  Programming iRay |  Programming ]] local Release =  "Beta 7R" local NotificationDuration =  6.5 local RayfieldFolder =  "Rayfield" local ConfigurationFolder =  RayfieldFolder."/Configurations" local ConfigurationExtension =  ".json" local RayfieldLibrary =  {
  3.      Flags =  {},
  4.      Theme =  {
  5.          Default =  {
  6.              TextFont =  "Default",
  7.              -- Default will use the various font faces used across Rayfield TextColor =  Color3.fromRGB(240,  240,  240),
  8.              Background =  Color3.fromRGB(25,  25,  25),
  9.              Topbar =  Color3.fromRGB(34,  34,  34),
  10.              Shadow =  Color3.fromRGB(20,  20,  20),
  11.              NotificationBackground =  Color3.fromRGB(20,  20,  20),
  12.              NotificationActionsBackground =  Color3.fromRGB(230,  230,  230),
  13.              TabBackground =  Color3.fromRGB(80,  80,  80),
  14.              TabStroke =  Color3.fromRGB(85,  85,  85),
  15.              TabBackgroundSelected =  Color3.fromRGB(210,  210,  210),
  16.              TabTextColor =  Color3.fromRGB(240,  240,  240),
  17.              SelectedTabTextColor =  Color3.fromRGB(50,  50,  50),
  18.              ElementBackground =  Color3.fromRGB(35,  35,  35),
  19.              ElementBackgroundHover =  Color3.fromRGB(40,  40,  40),
  20.              SecondaryElementBackground =  Color3.fromRGB(25,  25,  25),
  21.              -- For labels and paragraphs ElementStroke =  Color3.fromRGB(50,  50,  50),
  22.              SecondaryElementStroke =  Color3.fromRGB(40,  40,  40),
  23.              -- For labels and paragraphs SliderBackground =  Color3.fromRGB(43,  105,  159),
  24.              SliderProgress =  Color3.fromRGB(43,  105,  159),
  25.              SliderStroke =  Color3.fromRGB(48,  119,  177),
  26.              ToggleBackground =  Color3.fromRGB(30,  30,  30),
  27.              ToggleEnabled =  Color3.fromRGB(0,  146,  214),
  28.              ToggleDisabled =  Color3.fromRGB(100,  100,  100),
  29.              ToggleEnabledStroke =  Color3.fromRGB(0,  170,  255),
  30.              ToggleDisabledStroke =  Color3.fromRGB(125,  125,  125),
  31.              ToggleEnabledOuterStroke =  Color3.fromRGB(100,  100,  100),
  32.              ToggleDisabledOuterStroke =  Color3.fromRGB(65,  65,  65),
  33.              InputBackground =  Color3.fromRGB(30,  30,  30),
  34.              InputStroke =  Color3.fromRGB(65,  65,  65),
  35.              PlaceholderColor =  Color3.fromRGB(178,  178,  178)
  36.         },
  37.          Light =  {
  38.              TextFont =  "Gotham",
  39.              -- Default will use the various font faces used across Rayfield TextColor =  Color3.fromRGB(50,  50,  50),
  40.              -- i need to make all text 240,
  41.              240,
  42.              240 and base gray on transparency not color to do this Background =  Color3.fromRGB(255,  255,  255),
  43.              Topbar =  Color3.fromRGB(217,  217,  217),
  44.              Shadow =  Color3.fromRGB(223,  223,  223),
  45.              NotificationBackground =  Color3.fromRGB(20,  20,  20),
  46.              NotificationActionsBackground =  Color3.fromRGB(230,  230,  230),
  47.              TabBackground =  Color3.fromRGB(220,  220,  220),
  48.              TabStroke =  Color3.fromRGB(112,  112,  112),
  49.              TabBackgroundSelected =  Color3.fromRGB(0,  142,  208),
  50.              TabTextColor =  Color3.fromRGB(240,  240,  240),
  51.              SelectedTabTextColor =  Color3.fromRGB(50,  50,  50),
  52.              ElementBackground =  Color3.fromRGB(198,  198,  198),
  53.              ElementBackgroundHover =  Color3.fromRGB(230,  230,  230),
  54.              SecondaryElementBackground =  Color3.fromRGB(136,  136,  136),
  55.              -- For labels and paragraphs ElementStroke =  Color3.fromRGB(180,  199,  97),
  56.              SecondaryElementStroke =  Color3.fromRGB(40,  40,  40),
  57.              -- For labels and paragraphs SliderBackground =  Color3.fromRGB(31,  159,  71),
  58.              SliderProgress =  Color3.fromRGB(31,  159,  71),
  59.              SliderStroke =  Color3.fromRGB(42,  216,  94),
  60.              ToggleBackground =  Color3.fromRGB(170,  203,  60),
  61.              ToggleEnabled =  Color3.fromRGB(32,  214,  29),
  62.              ToggleDisabled =  Color3.fromRGB(100,  22,  23),
  63.              ToggleEnabledStroke =  Color3.fromRGB(17,  255,  0),
  64.              ToggleDisabledStroke =  Color3.fromRGB(65,  8,  8),
  65.              ToggleEnabledOuterStroke =  Color3.fromRGB(0,  170,  0),
  66.              ToggleDisabledOuterStroke =  Color3.fromRGB(170,  0,  0),
  67.              InputBackground =  Color3.fromRGB(31,  159,  71),
  68.              InputStroke =  Color3.fromRGB(19,  65,  31),
  69.              PlaceholderColor =  Color3.fromRGB(178,  178,  178)
  70.         }
  71.     },
  72.      DropdownIcons =  {}
  73. } -- Services local UserInputService =  game: GetService("UserInputService") local TweenService =  game: GetService("TweenService") local HttpService =  game: GetService("HttpService") local RunService =  game: GetService("RunService") local Players =  game: GetService("Players") local CoreGui =  game: GetService("CoreGui") -- Interface Management local Rayfield =  game: GetObjects("rbxassetid://12673095331")
  74. [1] --
  75. if gethui then -- Rayfield.Parent =  gethui() -- elseif syn.protect_gui then -- syn.protect_gui(Rayfield) -- Rayfield.Parent =  CoreGui -- elseif CoreGui: FindFirstChild("RobloxGui") then -- Rayfield.Parent =  CoreGui: FindFirstChild("RobloxGui") --
  76. else -- Rayfield.Parent =  CoreGui -- end Rayfield.Parent =  CoreGui
  77. if gethui then
  78. for _,
  79.  Interface in  ipairs(gethui() : GetChildren()) do
  80. if Interface.Name ==  Rayfield.Name and Interface ~ =  Rayfield then Interface.Enabled =  false Interface.Name =  "Rayfield-Old" end end
  81. else
  82. for _,
  83.  Interface in  ipairs(CoreGui: GetChildren()) do
  84. if Interface.Name ==  Rayfield.Name and Interface ~ =  Rayfield then Interface.Enabled =  false Interface.Name =  "Rayfield-Old" end end end -- Object Variables local Camera =  workspace.CurrentCamera local Main =  Rayfield.Main local Topbar =  Main.Topbar local Elements =  Main.Elements local LoadingFrame =  Main.LoadingFrame local TabList =  Main.TabList Rayfield.DisplayOrder =  100 LoadingFrame.Version.Text =  Release -- Variables local request =  (syn and syn.request) or (http and http.request) or http_request local CFileName =  nil local CEnabled =  false local Minimised =  false local Hidden =  false local Debounce =  false local Notifications =  Rayfield.Notifications local SelectedTheme =  RayfieldLibrary.Theme.Default function ChangeTheme(ThemeName) SelectedTheme =  RayfieldLibrary.Theme[ThemeName]
  85. for _,
  86.  obj in  ipairs(Rayfield: GetDescendants()) do
  87. if obj.ClassName ==  "TextLabel" or obj.ClassName ==  "TextBox" or obj.ClassName ==  "TextButton" then
  88. if SelectedTheme.TextFont ~ =  "Default" then obj.TextColor3 =  SelectedTheme.TextColor obj.Font =  SelectedTheme.TextFont end end end Rayfield.Main.BackgroundColor3 =  SelectedTheme.Background Rayfield.Main.Topbar.BackgroundColor3 =  SelectedTheme.Topbar Rayfield.Main.Topbar.CornerRepair.BackgroundColor3 =  SelectedTheme.Topbar Rayfield.Main.Shadow.Image.ImageColor3 =  SelectedTheme.Shadow Rayfield.Main.Topbar.ChangeSize.ImageColor3 =  SelectedTheme.TextColor Rayfield.Main.Topbar.Hide.ImageColor3 =  SelectedTheme.TextColor Rayfield.Main.Topbar.Theme.ImageColor3 =  SelectedTheme.TextColor
  89. for _,
  90.  TabPage in  ipairs(Elements: GetChildren()) do
  91. for _,
  92.  Element in  ipairs(TabPage: GetChildren()) do
  93. if Element.ClassName ==  "Frame" and Element.Name ~ =  "Placeholder" and Element.Name ~ =  "SectionSpacing" and Element.Name ~ =  "SectionTitle" then Element.BackgroundColor3 =  SelectedTheme.ElementBackground Element.UIStroke.Color =  SelectedTheme.ElementStroke end end end end local function AddDraggingFunctionality(DragPoint,  Main) pcall(function() local Dragging,  DragInput,  MousePos,  FramePos =  false DragPoint.InputBegan: Connect(function(Input)
  94. if Input.UserInputType ==  Enum.UserInputType.MouseButton1 then Dragging =  true MousePos =  Input.Position FramePos =  Main.Position Input.Changed: Connect(function()
  95. if Input.UserInputState ==  Enum.UserInputState.End then Dragging =  false end end) end end) DragPoint.InputChanged: Connect(function(Input)
  96. if Input.UserInputType ==  Enum.UserInputType.MouseMovement then DragInput =  Input end end) UserInputService.InputChanged: Connect(function(Input)
  97. if Input ==  DragInput and Dragging then local Delta =  Input.Position -  MousePos TweenService: Create(Main,  TweenInfo.new(0.45,  Enum.EasingStyle.Quint,  Enum.EasingDirection.Out),  {
  98.     Position =  UDim2.new(FramePos.X.Scale, FramePos.X.Offset +  Delta.X,  FramePos.Y.Scale,  FramePos.Y.Offset +  Delta.Y)
  99. }) : Play() end end) end) end local function PackColor(Color)
  100. return {
  101.     R =  Color.R *  255,
  102.      G =  Color.G *  255,
  103.      B =  Color.B *  255
  104. } end local function UnpackColor(Color)
  105. return Color3.fromRGB(Color.R,  Color.G,  Color.B) end local function LoadConfiguration(Configuration) local Data =  HttpService: JSONDecode(Configuration) table.foreach(Data,  function(FlagName,  FlagValue)
  106. if RayfieldLibrary.Flags[FlagName] then spawn(function()
  107. if RayfieldLibrary.Flags[FlagName].Type ==  "ColorPicker" then RayfieldLibrary.Flags[FlagName] : Set(UnpackColor(FlagValue))
  108. else
  109. if RayfieldLibrary.Flags[FlagName].CurrentValue or RayfieldLibrary.Flags[FlagName].CurrentKeybind or RayfieldLibrary.Flags[FlagName].CurrentOption or RayfieldLibrary.Flags[FlagName].Color ~ =  FlagValue then RayfieldLibrary.Flags[FlagName] : Set(FlagValue) end end end)
  110. else RayfieldLibrary: Notify({
  111.     Title =  "Flag Error",
  112.      Content =  "Rayfield was unable to find '".FlagName. "'' in the current script"
  113. }) end end) end local function SaveConfiguration()
  114. if not CEnabled then
  115. return end local Data =  {}
  116. for i,
  117. v in  pairs(RayfieldLibrary.Flags) do
  118. if v.Type ==  "ColorPicker" then Data[i] =  PackColor(v.Color)
  119. else Data[i] =  v.CurrentValue or v.CurrentKeybind or v.CurrentOption or v.Color end end writefile(ConfigurationFolder . "/" . CFileName . ConfigurationExtension,  tostring(HttpService: JSONEncode(Data))) end local neon =  (function() -- Open sourced neon module local module =  {} do local function IsNotNaN(x)
  120. return x ==  x end local continued =  IsNotNaN(Camera: ScreenPointToRay(0, 0).Origin.x)
  121. while not continued do RunService.RenderStepped: wait() continued =  IsNotNaN(Camera: ScreenPointToRay(0, 0).Origin.x) end end local RootParent =  Camera
  122. if getgenv().SecureMode ==  nil then RootParent =  Camera
  123. else
  124. if not getgenv().SecureMode then RootParent =  Camera
  125. else RootParent =  nil end end local binds =  {} local root =  Instance.new('Folder',  RootParent) root.Name =  'neon' local GenUid;
  126.  do local id =  0 function GenUid() id =  id +  1
  127. return 'neon::'.tostring(id) end end local DrawQuad;
  128.  do local acos,  max,  pi,  sqrt =  math.acos,  math.max,  math.pi,  math.sqrt local sz =  0.2 function DrawTriangle(v1,  v2,  v3,  p0,  p1) local s1 =  (v1 -  v2).magnitude local s2 =  (v2 -  v3).magnitude local s3 =  (v3 -  v1).magnitude local smax =  max(s1,  s2,  s3) local A,  B,  C
  129. if s1 ==  smax then A,  B,  C =  v1,  v2,  v3 elseif s2 ==  smax then A,  B,  C =  v2,  v3,  v1 elseif s3 ==  smax then A,  B,  C =  v3,  v1,  v2 end local para =  ( (B - A).x * (C - A).x +  (B - A).y * (C - A).y +  (B - A).z * (C - A).z ) /  (A - B).magnitude local perp =  sqrt(
  130. (C - A).magnitude ^ 2 -  para * para) local dif_para =  (A -  B).magnitude -  para local st =  CFrame.new(B,  A) local za =  CFrame.Angles(pi / 2, 0, 0) local cf0 =  st local Top_Look =  (cf0 *  za).lookVector local Mid_Point =  A +  CFrame.new(A,  B).LookVector *  para local Needed_Look =  CFrame.new(Mid_Point,  C).LookVector local dot =  Top_Look.x * Needed_Look.x +  Top_Look.y * Needed_Look.y +  Top_Look.z * Needed_Look.z local ac =  CFrame.Angles(0,  0,  acos(dot)) cf0 =  cf0 *  ac
  131. if (
  132. (cf0 *  za).lookVector -  Needed_Look).magnitude >  0.01 then cf0 =  cf0 *  CFrame.Angles(0,  0,  - 2 * acos(dot)) end cf0 =  cf0 *  CFrame.new(0,  perp / 2,  - (dif_para +  para / 2)) local cf1 =  st *  ac *  CFrame.Angles(0,  pi,  0)
  133. if (
  134. (cf1 *  za).lookVector -  Needed_Look).magnitude >  0.01 then cf1 =  cf1 *  CFrame.Angles(0,  0,  2 * acos(dot)) end cf1 =  cf1 *  CFrame.new(0,  perp / 2,  dif_para / 2)
  135. if not p0 then p0 =  Instance.new('Part') p0.FormFactor =  'Custom' p0.TopSurface =  0 p0.BottomSurface =  0 p0.Anchored =  true p0.CanCollide =  false p0.Material =  'Glass' p0.Size =  Vector3.new(sz,  sz,  sz) local mesh =  Instance.new('SpecialMesh',  p0) mesh.MeshType =  2 mesh.Name =  'WedgeMesh' end p0.WedgeMesh.Scale =  Vector3.new(0,  perp / sz,  para / sz) p0.CFrame =  cf0
  136. if not p1 then p1 =  p0: clone() end p1.WedgeMesh.Scale =  Vector3.new(0,  perp / sz,  dif_para / sz) p1.CFrame =  cf1
  137. return p0,  p1 end function DrawQuad(v1,  v2,  v3,  v4,  parts) parts[1],  parts[2] =  DrawTriangle(v1,  v2,  v3,  parts[1],  parts[2]) parts[3],  parts[4] =  DrawTriangle(v3,  v2,  v4,  parts[3],  parts[4]) end end function module: BindFrame(frame,  properties)
  138. if RootParent ==  nil then
  139. return end
  140. if binds[frame] then
  141. return binds[frame].parts end local uid =  GenUid() local parts =  {} local f =  Instance.new('Folder',  root) f.Name =  frame.Name local parents =  {} do local function add(child)
  142. if child: IsA 'GuiObject' then parents[#parents +  1] =  child add(child.Parent) end end add(frame) end local function UpdateOrientation(fetchProps) local zIndex =  1 -  0.05 * frame.ZIndex local tl,  br =  frame.AbsolutePosition,  frame.AbsolutePosition +  frame.AbsoluteSize local tr,  bl =  Vector2.new(br.x,  tl.y),  Vector2.new(tl.x,  br.y) do local rot =  0;
  143.  
  144. for _,  v in  ipairs(parents) do rot =  rot +  v.Rotation end
  145. if rot ~ =  0 and rot % 180 ~ =  0 then local mid =  tl: lerp(br,  0.5) local s,  c =  math.sin(math.rad(rot)),  math.cos(math.rad(rot)) local vec =  tl tl =  Vector2.new(c * (tl.x -  mid.x) -  s * (tl.y -  mid.y),  s * (tl.x -  mid.x) +  c * (tl.y -  mid.y)) +  mid tr =  Vector2.new(c * (tr.x -  mid.x) -  s * (tr.y -  mid.y),  s * (tr.x -  mid.x) +  c * (tr.y -  mid.y)) +  mid bl =  Vector2.new(c * (bl.x -  mid.x) -  s * (bl.y -  mid.y),  s * (bl.x -  mid.x) +  c * (bl.y -  mid.y)) +  mid br =  Vector2.new(c * (br.x -  mid.x) -  s * (br.y -  mid.y),  s * (br.x -  mid.x) +  c * (br.y -  mid.y)) +  mid end end DrawQuad( Camera: ScreenPointToRay(tl.x,  tl.y,  zIndex).Origin,  Camera: ScreenPointToRay(tr.x,  tr.y,  zIndex).Origin,  Camera: ScreenPointToRay(bl.x,  bl.y,  zIndex).Origin,  Camera: ScreenPointToRay(br.x,  br.y,  zIndex).Origin,  parts )
  146. if fetchProps then
  147. for _,  pt in  pairs(parts) do pt.Parent =  f end
  148. for propName,  propValue in  pairs(properties) do
  149. for _,  pt in  pairs(parts) do pt[propName] =  propValue end end end end UpdateOrientation(true) RunService: BindToRenderStep(uid,  2000,  UpdateOrientation) binds[frame] =  {
  150.      uid =  uid;
  151.      parts =  parts;
  152.  
  153. }
  154. return binds[frame].parts end function module: Modify(frame,  properties) local parts =  module: GetBoundParts(frame)
  155. if parts then
  156. for propName,  propValue in  pairs(properties) do
  157. for _,  pt in  pairs(parts) do pt[propName] =  propValue end end end end function module: UnbindFrame(frame)
  158. if RootParent ==  nil then
  159. return end local cb =  binds[frame]
  160. if cb then RunService: UnbindFromRenderStep(cb.uid)
  161. for _,  v in  pairs(cb.parts) do v: Destroy() end binds[frame] =  nil end end function module: HasBinding(frame)
  162. return binds[frame] ~ =  nil end function module: GetBoundParts(frame)
  163. return binds[frame] and binds[frame].parts end
  164. return module end)
  165. () function RayfieldLibrary: Notify(NotificationSettings) spawn(function() local ActionCompleted =  true local Notification =  Notifications.Template: Clone() Notification.Parent =  Notifications Notification.Name =  NotificationSettings.Title or "Unknown Title" Notification.Visible =  true local blurlight =  nil
  166. if not getgenv().SecureMode then blurlight =  Instance.new("DepthOfFieldEffect", game: GetService("Lighting")) blurlight.Enabled =  true blurlight.FarIntensity =  0 blurlight.FocusDistance =  51.6 blurlight.InFocusRadius =  50 blurlight.NearIntensity =  1 game: GetService("Debris") : AddItem(script, 0) end Notification.Actions.Template.Visible =  false
  167. if NotificationSettings.Actions then
  168. for _,  Action in  pairs(NotificationSettings.Actions) do ActionCompleted =  false local NewAction =  Notification.Actions.Template: Clone() NewAction.BackgroundColor3 =  SelectedTheme.NotificationActionsBackground
  169. if SelectedTheme ~ =  RayfieldLibrary.Theme.Default then NewAction.TextColor3 =  SelectedTheme.TextColor end NewAction.Name =  Action.Name NewAction.Visible =  true NewAction.Parent =  Notification.Actions NewAction.Text =  Action.Name NewAction.BackgroundTransparency =  1 NewAction.TextTransparency =  1 NewAction.Size =  UDim2.new(0,  NewAction.TextBounds.X +  27,  0,  36) NewAction.MouseButton1Click: Connect(function() local Success,  Response =  pcall(Action.Callback)
  170. if not Success then print("Rayfield | Action: ".Action.Name." Callback Error " .tostring(Response)) end ActionCompleted =  true end) end end Notification.BackgroundColor3 =  SelectedTheme.Background Notification.Title.Text =  NotificationSettings.Title or "Unknown" Notification.Title.TextTransparency =  1 Notification.Title.TextColor3 =  SelectedTheme.TextColor Notification.Description.Text =  NotificationSettings.Content or "Unknown" Notification.Description.TextTransparency =  1 Notification.Description.TextColor3 =  SelectedTheme.TextColor Notification.Icon.ImageColor3 =  SelectedTheme.TextColor
  171. if NotificationSettings.Image then Notification.Icon.Image =  "rbxassetid://".tostring(NotificationSettings.Image)
  172. else Notification.Icon.Image =  "rbxassetid://3944680095" end Notification.Icon.ImageTransparency =  1 Notification.Parent =  Notifications Notification.Size =  UDim2.new(0,  260,  0,  80) Notification.BackgroundTransparency =  1 TweenService: Create(Notification,  TweenInfo.new(0.7,  Enum.EasingStyle.Quint),  {
  173.     Size =  UDim2.new(0,  295,  0,  91)
  174. }) : Play() TweenService: Create(Notification,  TweenInfo.new(0.7,  Enum.EasingStyle.Quint),  {
  175.     BackgroundTransparency =  0.1
  176. }) : Play() Notification: TweenPosition(UDim2.new(0.5, 0, 0.915, 0), 'Out', 'Quint', 0.8, true) wait(0.3) TweenService: Create(Notification.Icon,  TweenInfo.new(0.6,  Enum.EasingStyle.Quint),  {
  177.     ImageTransparency =  0
  178. }) : Play() TweenService: Create(Notification.Title,  TweenInfo.new(0.7,  Enum.EasingStyle.Quint),  {
  179.     TextTransparency =  0
  180. }) : Play() TweenService: Create(Notification.Description,  TweenInfo.new(0.6,  Enum.EasingStyle.Quint),  {
  181.     TextTransparency =  0.2
  182. }) : Play() wait(0.2) -- Requires Graphics Level 8 - 10
  183. if getgenv().SecureMode ==  nil then TweenService: Create(Notification,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  184.     BackgroundTransparency =  0.4
  185. }) : Play()
  186. else
  187. if not getgenv().SecureMode then TweenService: Create(Notification,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  188.     BackgroundTransparency =  0.4
  189. }) : Play()
  190. else TweenService: Create(Notification,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  191.     BackgroundTransparency =  0
  192. }) : Play() end end
  193. if Rayfield.Name ==  "Rayfield" then neon: BindFrame(Notification.BlurModule,  {
  194.      Transparency =  0.98;
  195.      BrickColor =  BrickColor.new("Institutional white");
  196.  
  197. }) end
  198. if not NotificationSettings.Actions then wait(NotificationSettings.Duration or NotificationDuration -  0.5)
  199. else wait(0.8) TweenService: Create(Notification,  TweenInfo.new(0.7,  Enum.EasingStyle.Quint),  {
  200.     Size =  UDim2.new(0,  295,  0,  132)
  201. }) : Play() wait(0.3)
  202. for _,  Action in  ipairs(Notification.Actions: GetChildren()) do
  203. if Action.ClassName ==  "TextButton" and Action.Name ~ =  "Template" then TweenService: Create(Action,  TweenInfo.new(0.5,  Enum.EasingStyle.Quint),  {
  204.     BackgroundTransparency =  0.2
  205. }) : Play() TweenService: Create(Action,  TweenInfo.new(0.6,  Enum.EasingStyle.Quint),  {
  206.     TextTransparency =  0
  207. }) : Play() wait(0.05) end end end repeat wait(0.001) until ActionCompleted
  208. for _,  Action in  ipairs(Notification.Actions: GetChildren()) do
  209. if Action.ClassName ==  "TextButton" and Action.Name ~ =  "Template" then TweenService: Create(Action,  TweenInfo.new(0.5,  Enum.EasingStyle.Quint),  {
  210.     BackgroundTransparency =  1
  211. }) : Play() TweenService: Create(Action,  TweenInfo.new(0.6,  Enum.EasingStyle.Quint),  {
  212.     TextTransparency =  1
  213. }) : Play() end end TweenService: Create(Notification.Title,  TweenInfo.new(0.6,  Enum.EasingStyle.Quint),  {
  214.     Position =  UDim2.new(0.47,  0, 0.234,  0)
  215. }) : Play() TweenService: Create(Notification.Description,  TweenInfo.new(0.8,  Enum.EasingStyle.Quint),  {
  216.     Position =  UDim2.new(0.528,  0, 0.637,  0)
  217. }) : Play() TweenService: Create(Notification,  TweenInfo.new(0.6,  Enum.EasingStyle.Quint),  {
  218.     Size =  UDim2.new(0,  280,  0,  83)
  219. }) : Play() TweenService: Create(Notification.Icon,  TweenInfo.new(0.4,  Enum.EasingStyle.Quint),  {
  220.     ImageTransparency =  1
  221. }) : Play() TweenService: Create(Notification,  TweenInfo.new(0.8,  Enum.EasingStyle.Quint),  {
  222.     BackgroundTransparency =  0.6
  223. }) : Play() wait(0.3) TweenService: Create(Notification.Title,  TweenInfo.new(0.6,  Enum.EasingStyle.Quint),  {
  224.     TextTransparency =  0.4
  225. }) : Play() TweenService: Create(Notification.Description,  TweenInfo.new(0.6,  Enum.EasingStyle.Quint),  {
  226.     TextTransparency =  0.5
  227. }) : Play() wait(0.4) TweenService: Create(Notification,  TweenInfo.new(0.9,  Enum.EasingStyle.Quint),  {
  228.     Size =  UDim2.new(0,  260,  0,  0)
  229. }) : Play() TweenService: Create(Notification,  TweenInfo.new(0.8,  Enum.EasingStyle.Quint),  {
  230.     BackgroundTransparency =  1
  231. }) : Play() TweenService: Create(Notification.Title,  TweenInfo.new(0.6,  Enum.EasingStyle.Quint),  {
  232.     TextTransparency =  1
  233. }) : Play() TweenService: Create(Notification.Description,  TweenInfo.new(0.6,  Enum.EasingStyle.Quint),  {
  234.     TextTransparency =  1
  235. }) : Play() wait(0.2)
  236. if not getgenv().SecureMode then neon: UnbindFrame(Notification.BlurModule) blurlight: Destroy() end wait(0.9) Notification: Destroy() end) end function Hide() Debounce =  true RayfieldLibrary: Notify({
  237.     Title =  "Interface Hidden",
  238.      Content =  "The interface has been hidden, you can unhide the interface by tapping RightShift",
  239.      Duration =  7
  240. }) TweenService: Create(Main,  TweenInfo.new(0.5,  Enum.EasingStyle.Quint),  {
  241.     Size =  UDim2.new(0,  470,  0,  400)
  242. }) : Play() TweenService: Create(Main.Topbar,  TweenInfo.new(0.5,  Enum.EasingStyle.Quint),  {
  243.     Size =  UDim2.new(0,  470,  0,  45)
  244. }) : Play() TweenService: Create(Main,  TweenInfo.new(0.5,  Enum.EasingStyle.Quint),  {
  245.     BackgroundTransparency =  1
  246. }) : Play() TweenService: Create(Main.Topbar,  TweenInfo.new(0.5,  Enum.EasingStyle.Quint),  {
  247.     BackgroundTransparency =  1
  248. }) : Play() TweenService: Create(Main.Topbar.Divider,  TweenInfo.new(0.5,  Enum.EasingStyle.Quint),  {
  249.     BackgroundTransparency =  1
  250. }) : Play() TweenService: Create(Main.Topbar.CornerRepair,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  251.     BackgroundTransparency =  1
  252. }) : Play() TweenService: Create(Main.Topbar.Title,  TweenInfo.new(0.5,  Enum.EasingStyle.Quint),  {
  253.     TextTransparency =  1
  254. }) : Play() TweenService: Create(Main.Shadow.Image,  TweenInfo.new(0.5,  Enum.EasingStyle.Quint),  {
  255.     ImageTransparency =  1
  256. }) : Play() TweenService: Create(Topbar.UIStroke,  TweenInfo.new(0.5,  Enum.EasingStyle.Quint),  {
  257.     Transparency =  1
  258. }) : Play()
  259. for _,
  260.  TopbarButton in  ipairs(Topbar: GetChildren()) do
  261. if TopbarButton.ClassName ==  "ImageButton" then TweenService: Create(TopbarButton,  TweenInfo.new(0.5,  Enum.EasingStyle.Quint),  {
  262.     ImageTransparency =  1
  263. }) : Play() end end
  264. for _,
  265.  tabbtn in  ipairs(TabList: GetChildren()) do
  266. if tabbtn.ClassName ==  "Frame" and tabbtn.Name ~ =  "Placeholder" then TweenService: Create(tabbtn,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  267.     BackgroundTransparency =  1
  268. }) : Play() TweenService: Create(tabbtn.Title,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  269.     TextTransparency =  1
  270. }) : Play() TweenService: Create(tabbtn.Image,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  271.     ImageTransparency =  1
  272. }) : Play() TweenService: Create(tabbtn.Shadow,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  273.     ImageTransparency =  1
  274. }) : Play() TweenService: Create(tabbtn.UIStroke,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  275.     Transparency =  1
  276. }) : Play() end end
  277. for _,
  278.  tab in  ipairs(Elements: GetChildren()) do
  279. if tab.Name ~ =  "Template" and tab.ClassName ==  "ScrollingFrame" and tab.Name ~ =  "Placeholder" then
  280. for _,
  281.  element in  ipairs(tab: GetChildren()) do
  282. if element.ClassName ==  "Frame" then
  283. if element.Name ~ =  "SectionSpacing" and element.Name ~ =  "Placeholder" then
  284. if element.Name ==  "SectionTitle" then TweenService: Create(element.Title,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  285.     TextTransparency =  1
  286. }) : Play()
  287. else TweenService: Create(element,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  288.     BackgroundTransparency =  1
  289. }) : Play() TweenService: Create(element.UIStroke,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  290.     Transparency =  1
  291. }) : Play() TweenService: Create(element.Title,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  292.     TextTransparency =  1
  293. }) : Play() end
  294. for _,
  295.  child in  ipairs(element: GetChildren()) do
  296. if child.ClassName ==  "Frame" or child.ClassName ==  "TextLabel" or child.ClassName ==  "TextBox" or child.ClassName ==  "ImageButton" or (child.ClassName ==  "ImageLabel" and table.find(RayfieldLibrary.DropdownIcons,  child)) then child.Visible =  false end end end end end end end wait(0.5) Main.Visible =  false Debounce =  false end function Unhide() Debounce =  true Main.Position =  UDim2.new(0.5,  0,  0.5,  0) Main.Visible =  true TweenService: Create(Main,  TweenInfo.new(0.5,  Enum.EasingStyle.Quint),  {
  297.     Size =  UDim2.new(0,  500,  0,  475)
  298. }) : Play() TweenService: Create(Main.Topbar,  TweenInfo.new(0.5,  Enum.EasingStyle.Quint),  {
  299.     Size =  UDim2.new(0,  500,  0,  45)
  300. }) : Play() TweenService: Create(Main.Shadow.Image,  TweenInfo.new(0.7,  Enum.EasingStyle.Quint),  {
  301.     ImageTransparency =  0.4
  302. }) : Play() TweenService: Create(Main,  TweenInfo.new(0.5,  Enum.EasingStyle.Quint),  {
  303.     BackgroundTransparency =  0
  304. }) : Play() TweenService: Create(Main.Topbar,  TweenInfo.new(0.5,  Enum.EasingStyle.Quint),  {
  305.     BackgroundTransparency =  0
  306. }) : Play() TweenService: Create(Main.Topbar.Divider,  TweenInfo.new(0.5,  Enum.EasingStyle.Quint),  {
  307.     BackgroundTransparency =  0
  308. }) : Play() TweenService: Create(Main.Topbar.CornerRepair,  TweenInfo.new(0.5,  Enum.EasingStyle.Quint),  {
  309.     BackgroundTransparency =  0
  310. }) : Play() TweenService: Create(Main.Topbar.Title,  TweenInfo.new(0.5,  Enum.EasingStyle.Quint),  {
  311.     TextTransparency =  0
  312. }) : Play()
  313. if Minimised then spawn(Maximise) end
  314. for _,
  315.  TopbarButton in  ipairs(Topbar: GetChildren()) do
  316. if TopbarButton.ClassName ==  "ImageButton" then TweenService: Create(TopbarButton,  TweenInfo.new(0.7,  Enum.EasingStyle.Quint),  {
  317.     ImageTransparency =  0.8
  318. }) : Play() end end
  319. for _,
  320.  tabbtn in  ipairs(TabList: GetChildren()) do
  321. if tabbtn.ClassName ==  "Frame" and tabbtn.Name ~ =  "Placeholder" then
  322. if tostring(Elements.UIPageLayout.CurrentPage) ==  tabbtn.Title.Text then TweenService: Create(tabbtn,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  323.     BackgroundTransparency =  0
  324. }) : Play() TweenService: Create(tabbtn.Title,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  325.     TextTransparency =  0
  326. }) : Play() TweenService: Create(tabbtn.Shadow,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  327.     ImageTransparency =  0.9
  328. }) : Play() TweenService: Create(tabbtn.Image,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  329.     ImageTransparency =  0
  330. }) : Play() TweenService: Create(tabbtn.UIStroke,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  331.     Transparency =  1
  332. }) : Play()
  333. else TweenService: Create(tabbtn,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  334.     BackgroundTransparency =  0.7
  335. }) : Play() TweenService: Create(tabbtn.Image,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  336.     ImageTransparency =  0.2
  337. }) : Play() TweenService: Create(tabbtn.Shadow,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  338.     ImageTransparency =  0.7
  339. }) : Play() TweenService: Create(tabbtn.Title,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  340.     TextTransparency =  0.2
  341. }) : Play() TweenService: Create(tabbtn.UIStroke,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  342.     Transparency =  0
  343. }) : Play() end end end
  344. for _,
  345.  tab in  ipairs(Elements: GetChildren()) do
  346. if tab.Name ~ =  "Template" and tab.ClassName ==  "ScrollingFrame" and tab.Name ~ =  "Placeholder" then
  347. for _,
  348.  element in  ipairs(tab: GetChildren()) do
  349. if element.ClassName ==  "Frame" then
  350. if element.Name ~ =  "SectionSpacing" and element.Name ~ =  "Placeholder" then
  351. if element.Name ==  "SectionTitle" then TweenService: Create(element.Title,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  352.     TextTransparency =  0
  353. }) : Play()
  354. else TweenService: Create(element,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  355.     BackgroundTransparency =  0
  356. }) : Play() TweenService: Create(element.UIStroke,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  357.     Transparency =  0
  358. }) : Play() TweenService: Create(element.Title,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  359.     TextTransparency =  0
  360. }) : Play() end
  361. for _,
  362.  child in  ipairs(element: GetChildren()) do
  363. if child.ClassName ==  "Frame" or child.ClassName ==  "TextLabel" or child.ClassName ==  "TextBox" or child.ClassName ==  "ImageButton" or (child.ClassName ==  "ImageLabel" and table.find(RayfieldLibrary.DropdownIcons,  child)) then child.Visible =  true end end end end end end end wait(0.5) Minimised =  false Debounce =  false end function Maximise() Debounce =  true Topbar.ChangeSize.Image =  "rbxassetid://".10137941941 TweenService: Create(Topbar.UIStroke,  TweenInfo.new(0.5,  Enum.EasingStyle.Quint),  {
  364.     Transparency =  1
  365. }) : Play() TweenService: Create(Main.Shadow.Image,  TweenInfo.new(0.5,  Enum.EasingStyle.Quint),  {
  366.     ImageTransparency =  0.4
  367. }) : Play() TweenService: Create(Topbar.CornerRepair,  TweenInfo.new(0.5,  Enum.EasingStyle.Quint),  {
  368.     BackgroundTransparency =  0
  369. }) : Play() TweenService: Create(Topbar.Divider,  TweenInfo.new(0.5,  Enum.EasingStyle.Quint),  {
  370.     BackgroundTransparency =  0
  371. }) : Play() TweenService: Create(Main,  TweenInfo.new(0.5,  Enum.EasingStyle.Quint),  {
  372.     Size =  UDim2.new(0,  500,  0,  475)
  373. }) : Play() TweenService: Create(Topbar,  TweenInfo.new(0.5,  Enum.EasingStyle.Quint),  {
  374.     Size =  UDim2.new(0,  500,  0,  45)
  375. }) : Play() TabList.Visible =  true wait(0.2) Elements.Visible =  true
  376. for _,
  377.  tab in  ipairs(Elements: GetChildren()) do
  378. if tab.Name ~ =  "Template" and tab.ClassName ==  "ScrollingFrame" and tab.Name ~ =  "Placeholder" then
  379. for _,
  380.  element in  ipairs(tab: GetChildren()) do
  381. if element.ClassName ==  "Frame" then
  382. if element.Name ~ =  "SectionSpacing" and element.Name ~ =  "Placeholder" then
  383. if element.Name ==  "SectionTitle" then TweenService: Create(element.Title,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  384.     TextTransparency =  0
  385. }) : Play()
  386. else TweenService: Create(element,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  387.     BackgroundTransparency =  0
  388. }) : Play() TweenService: Create(element.UIStroke,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  389.     Transparency =  0
  390. }) : Play() TweenService: Create(element.Title,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  391.     TextTransparency =  0
  392. }) : Play() end
  393. for _,
  394.  child in  ipairs(element: GetChildren()) do
  395. if child.ClassName ==  "Frame" or child.ClassName ==  "TextLabel" or child.ClassName ==  "TextBox" or child.ClassName ==  "ImageButton" or (child.ClassName ==  "ImageLabel" and table.find(RayfieldLibrary.DropdownIcons,  child)) then child.Visible =  true end end end end end end end wait(0.1)
  396. for _,
  397.  tabbtn in  ipairs(TabList: GetChildren()) do
  398. if tabbtn.ClassName ==  "Frame" and tabbtn.Name ~ =  "Placeholder" then
  399. if tostring(Elements.UIPageLayout.CurrentPage) ==  tabbtn.Title.Text then TweenService: Create(tabbtn,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  400.     BackgroundTransparency =  0
  401. }) : Play() TweenService: Create(tabbtn.Image,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  402.     ImageTransparency =  0
  403. }) : Play() TweenService: Create(tabbtn.Title,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  404.     TextTransparency =  0
  405. }) : Play() TweenService: Create(tabbtn.UIStroke,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  406.     Transparency =  1
  407. }) : Play() TweenService: Create(tabbtn.Shadow,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  408.     ImageTransparency =  0.9
  409. }) : Play()
  410. else TweenService: Create(tabbtn,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  411.     BackgroundTransparency =  0.7
  412. }) : Play() TweenService: Create(tabbtn.Shadow,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  413.     ImageTransparency =  0.7
  414. }) : Play() TweenService: Create(tabbtn.Image,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  415.     ImageTransparency =  0.2
  416. }) : Play() TweenService: Create(tabbtn.Title,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  417.     TextTransparency =  0.2
  418. }) : Play() TweenService: Create(tabbtn.UIStroke,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  419.     Transparency =  0
  420. }) : Play() end end end wait(0.5) Debounce =  false end function Minimise() Debounce =  true Topbar.ChangeSize.Image =  "rbxassetid://".11036884234
  421. for _,
  422.  tabbtn in  ipairs(TabList: GetChildren()) do
  423. if tabbtn.ClassName ==  "Frame" and tabbtn.Name ~ =  "Placeholder" then TweenService: Create(tabbtn,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  424.     BackgroundTransparency =  1
  425. }) : Play() TweenService: Create(tabbtn.Image,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  426.     ImageTransparency =  1
  427. }) : Play() TweenService: Create(tabbtn.Title,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  428.     TextTransparency =  1
  429. }) : Play() TweenService: Create(tabbtn.Shadow,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  430.     ImageTransparency =  1
  431. }) : Play() TweenService: Create(tabbtn.UIStroke,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  432.     Transparency =  1
  433. }) : Play() end end
  434. for _,
  435.  tab in  ipairs(Elements: GetChildren()) do
  436. if tab.Name ~ =  "Template" and tab.ClassName ==  "ScrollingFrame" and tab.Name ~ =  "Placeholder" then
  437. for _,
  438.  element in  ipairs(tab: GetChildren()) do
  439. if element.ClassName ==  "Frame" then
  440. if element.Name ~ =  "SectionSpacing" and element.Name ~ =  "Placeholder" then
  441. if element.Name ==  "SectionTitle" then TweenService: Create(element.Title,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  442.     TextTransparency =  1
  443. }) : Play()
  444. else TweenService: Create(element,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  445.     BackgroundTransparency =  1
  446. }) : Play() TweenService: Create(element.UIStroke,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  447.     Transparency =  1
  448. }) : Play() TweenService: Create(element.Title,  TweenInfo.new(0.3,  Enum.EasingStyle.Quint),  {
  449.     TextTransparency =  1
  450. }) : Play() end
  451. for _,
  452.  child in  ipairs(element: GetChildren()) do
  453. if child.ClassName ==  "Frame" or child.ClassName ==  "TextLabel" or child.ClassName ==  "TextBox" or child.ClassName ==  "ImageButton" or child.ClassName ==  "ImageLabel" then child.Visible =  false end end end end end end end TweenService: Create(Topbar.UIStroke,  TweenInfo.new(0.5,  Enum.EasingStyle.Quint),  {
  454.     Transparency =  0
  455. }) : Play() TweenService: Create(Main.Shadow.Image,  TweenInfo.new(0.5,  Enum.EasingStyle.Quint),  {
  456.     ImageTransparency =  1
  457. }) : Play() TweenService: Create(Topbar.CornerRepair,  TweenInfo.new(0.5,  Enum.EasingStyle.Quint),  {
  458.     BackgroundTransparency =  1
  459. }) : Play() TweenService: Create(Topbar.Divider,  TweenInfo.new(0.5,  Enum.EasingStyle.Quint),  {
  460.     BackgroundTransparency =  1
  461. }) : Play() TweenService: Create(Main,  TweenInfo.new(0.5,  Enum.EasingStyle.Quint),  {
  462.     Size =  UDim2.new(0,  495,  0,  45)
  463. }) : Play() TweenService: Create(Topbar,  TweenInfo.new(0.5,  Enum.EasingStyle.Quint),  {
  464.     Size =  UDim2.new(0,  495,  0,  45)
  465. }) : Play() wait(0.3) Elements.Visible =  false TabList.Visible =  false wait(0.2) Debounce =  false end function RayfieldLibrary: CreateWindow(Settings) local Passthrough =  false Topbar.Title.Text =  Settings.Name Main.Size =  UDim2.new(0,  286,  0,  260) Main.Visible =  true Main.BackgroundTransparency =  1 LoadingFrame.Title.TextTransparency =  1 LoadingFrame.Thumbnail.ImageTransparency =  1 LoadingFrame.Shadow.ImageTransparency =  1 Main.Shadow.Image.ImageTransparency =  1 LoadingFrame.Version.TextTransparency =  1 LoadingFrame.Title.Text =  Settings.LoadingTitle or "Rayfield Interface Suite" LoadingFrame.Version.Text =  ("Version ".Settings.Version) or "Version N/A" LoadingFrame.Thumbnail.Image =  "rbxassetid://".Settings.Image Topbar.Visible =  false Elements.Visible =  false LoadingFrame.Visible =  true pcall(function()
  466. if not Settings.ConfigurationSaving.FileName then Settings.ConfigurationSaving.FileName =  tostring(game.PlaceId) end
  467. if not isfolder(RayfieldFolder."/"."Configuration Folders") then end
  468. if Settings.ConfigurationSaving.Enabled ==  nil then Settings.ConfigurationSaving.Enabled =  false end CFileName =  Settings.ConfigurationSaving.FileName ConfigurationFolder =  Settings.ConfigurationSaving.FolderName or ConfigurationFolder CEnabled =  Settings.ConfigurationSaving.Enabled
  469. if Settings.ConfigurationSaving.Enabled then
  470. if not isfolder(ConfigurationFolder) then makefolder(ConfigurationFolder) end end end) AddDraggingFunctionality(Topbar, Main)
  471. for _,
  472.  TabButton in  ipairs(TabList: GetChildren()) do
  473. if TabButton.ClassName ==  "Frame" and TabButton.Name ~ =  "Placeholder" then TabButton.BackgroundTransparency =  1 TabButton.Title.TextTransparency =  1 TabButton.Shadow.ImageTransparency =  1 TabButton.Image.ImageTransparency =  1 TabButton.UIStroke.Transparency =  1 end end
  474. if Settings.Discord then
  475. if not isfolder(RayfieldFolder."/Discord Invites") then makefolder(RayfieldFolder."/Discord Invites") end
  476. if not isfile(RayfieldFolder."/Discord Invites"."/".Settings.Discord.Invite.ConfigurationExtension) then
  477. if request then request({
  478.      Url =  'http://127.0.0.1:6463/rpc?v=1',
  479.      Method =  'POST',
  480.      Headers =  {
  481.          ['Content-Type'] =  'application/json',
  482.          Origin =  'https://discord.com'
  483.     },
  484.      Body =  HttpService : JSONEncode({
  485.          cmd =  'INVITE_BROWSER',
  486.          nonce =  HttpService: GenerateGUID(false),
  487.          args =  {
  488.             code =  Settings.Discord.Invite
  489.         }
  490.     })
  491. }) end
  492. if Settings.Discord.RememberJoins then -- We do logic this way so
  493. if the developer changes this setting,
  494.  the user still won 't be prompted, only new users writefile(RayfieldFolder.."/Discord Invites".."/"..Settings.Discord.Invite..ConfigurationExtension,"Rayfield RememberJoins is true for this invite, this invite will not ask you to join again") end else end end if Settings.KeySystem then if not Settings.KeySettings then Passthrough = true return end if not isfolder(RayfieldFolder.."/Key System") then makefolder(RayfieldFolder.."/Key System") end if Settings.KeySettings.GrabKeyFromSite then local Success, Response = pcall(function() Settings.KeySettings.Key = game:HttpGet(Settings.KeySettings.Key) end) if not Success then print("Rayfield | "..Settings.KeySettings.Key.." Error " ..tostring(Response)) end end if not Settings.KeySettings.FileName then Settings.KeySettings.FileName = "No file name specified" end if isfile(RayfieldFolder.."/Key System".."/"..Settings.KeySettings.FileName..ConfigurationExtension) then if readfile(RayfieldFolder.."/Key System".."/"..Settings.KeySettings.FileName..ConfigurationExtension) == Settings.KeySettings.Key then Passthrough = true end end if not Passthrough then local AttemptsRemaining = math.random(2,6) Rayfield.Enabled = false local KeyUI = game:GetObjects("rbxassetid://11380036235")[1] if gethui then KeyUI.Parent = gethui() elseif syn.protect_gui then syn.protect_gui(Rayfield) KeyUI.Parent = CoreGui else KeyUI.Parent = CoreGui end if gethui then for _, Interface in ipairs(gethui():GetChildren()) do if Interface.Name == KeyUI.Name and Interface ~= KeyUI then Interface.Enabled = false Interface.Name = "KeyUI-Old" end end else for _, Interface in ipairs(CoreGui:GetChildren()) do if Interface.Name == KeyUI.Name and Interface ~= KeyUI then Interface.Enabled = false Interface.Name = "KeyUI-Old" end end end local KeyMain = KeyUI.Main KeyMain.Title.Text = Settings.KeySettings.Title or Settings.Name KeyMain.Subtitle.Text = Settings.KeySettings.Subtitle or "Key System" KeyMain.NoteMessage.Text = Settings.KeySettings.Note or "No instructions" KeyMain.Size = UDim2.new(0, 467, 0, 175) KeyMain.BackgroundTransparency = 1 KeyMain.Shadow.Image.ImageTransparency = 1 KeyMain.Title.TextTransparency = 1 KeyMain.Subtitle.TextTransparency = 1 KeyMain.KeyNote.TextTransparency = 1 KeyMain.Input.BackgroundTransparency = 1 KeyMain.Input.UIStroke.Transparency = 1 KeyMain.Input.InputBox.TextTransparency = 1 KeyMain.NoteTitle.TextTransparency = 1 KeyMain.NoteMessage.TextTransparency = 1 KeyMain.Hide.ImageTransparency = 1 TweenService:Create(KeyMain, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundTransparency = 0}):Play() TweenService:Create(KeyMain, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Size = UDim2.new(0, 500, 0, 187)}):Play() TweenService:Create(KeyMain.Shadow.Image, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {ImageTransparency = 0.5}):Play() wait(0.05) TweenService:Create(KeyMain.Title, TweenInfo.new(0.4, Enum.EasingStyle.Quint), {TextTransparency = 0}):Play() TweenService:Create(KeyMain.Subtitle, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {TextTransparency = 0}):Play() wait(0.05) TweenService:Create(KeyMain.KeyNote, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {TextTransparency = 0}):Play() TweenService:Create(KeyMain.Input, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {BackgroundTransparency = 0}):Play() TweenService:Create(KeyMain.Input.UIStroke, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {Transparency = 0}):Play() TweenService:Create(KeyMain.Input.InputBox, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {TextTransparency = 0}):Play() wait(0.05) TweenService:Create(KeyMain.NoteTitle, TweenInfo.new(0.4, Enum.EasingStyle.Quint), {TextTransparency = 0}):Play() TweenService:Create(KeyMain.NoteMessage, TweenInfo.new(0.4, Enum.EasingStyle.Quint), {TextTransparency = 0}):Play() wait(0.15) TweenService:Create(KeyMain.Hide, TweenInfo.new(0.4, Enum.EasingStyle.Quint), {ImageTransparency = 0.3}):Play() KeyUI.Main.Input.InputBox.FocusLost:Connect(function() if KeyMain.Input.InputBox.Text == Settings.KeySettings.Key then TweenService:Create(KeyMain, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundTransparency = 1}):Play() TweenService:Create(KeyMain, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Size = UDim2.new(0, 467, 0, 175)}):Play() TweenService:Create(KeyMain.Shadow.Image, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {ImageTransparency = 1}):Play() TweenService:Create(KeyMain.Title, TweenInfo.new(0.4, Enum.EasingStyle.Quint), {TextTransparency = 1}):Play() TweenService:Create(KeyMain.Subtitle, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {TextTransparency = 1}):Play() TweenService:Create(KeyMain.KeyNote, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {TextTransparency = 1}):Play() TweenService:Create(KeyMain.Input, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {BackgroundTransparency = 1}):Play() TweenService:Create(KeyMain.Input.UIStroke, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {Transparency = 1}):Play() TweenService:Create(KeyMain.Input.InputBox, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {TextTransparency = 1}):Play() TweenService:Create(KeyMain.NoteTitle, TweenInfo.new(0.4, Enum.EasingStyle.Quint), {TextTransparency = 1}):Play() TweenService:Create(KeyMain.NoteMessage, TweenInfo.new(0.4, Enum.EasingStyle.Quint), {TextTransparency = 1}):Play() TweenService:Create(KeyMain.Hide, TweenInfo.new(0.4, Enum.EasingStyle.Quint), {ImageTransparency = 1}):Play() wait(0.51) Passthrough = true if Settings.KeySettings.SaveKey then if writefile then writefile(RayfieldFolder.."/Key System".."/"..Settings.KeySettings.FileName..ConfigurationExtension, Settings.KeySettings.Key) end RayfieldLibrary:Notify({Title = "Key System", Content = "The key for this script has been saved successfully"}) end else if AttemptsRemaining == 0 then TweenService:Create(KeyMain, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundTransparency = 1}):Play() TweenService:Create(KeyMain, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Size = UDim2.new(0, 467, 0, 175)}):Play() TweenService:Create(KeyMain.Shadow.Image, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {ImageTransparency = 1}):Play() TweenService:Create(KeyMain.Title, TweenInfo.new(0.4, Enum.EasingStyle.Quint), {TextTransparency = 1}):Play() TweenService:Create(KeyMain.Subtitle, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {TextTransparency = 1}):Play() TweenService:Create(KeyMain.KeyNote, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {TextTransparency = 1}):Play() TweenService:Create(KeyMain.Input, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {BackgroundTransparency = 1}):Play() TweenService:Create(KeyMain.Input.UIStroke, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {Transparency = 1}):Play() TweenService:Create(KeyMain.Input.InputBox, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {TextTransparency = 1}):Play() TweenService:Create(KeyMain.NoteTitle, TweenInfo.new(0.4, Enum.EasingStyle.Quint), {TextTransparency = 1}):Play() TweenService:Create(KeyMain.NoteMessage, TweenInfo.new(0.4, Enum.EasingStyle.Quint), {TextTransparency = 1}):Play() TweenService:Create(KeyMain.Hide, TweenInfo.new(0.4, Enum.EasingStyle.Quint), {ImageTransparency = 1}):Play() wait(0.45) game.Players.LocalPlayer:Kick("No Attempts Remaining") game:Shutdown() end KeyMain.Input.InputBox.Text = "" AttemptsRemaining = AttemptsRemaining - 1 TweenService:Create(KeyMain, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Size = UDim2.new(0, 467, 0, 175)}):Play() TweenService:Create(KeyMain, TweenInfo.new(0.4, Enum.EasingStyle.Elastic), {Position = UDim2.new(0.495,0,0.5,0)}):Play() wait(0.1) TweenService:Create(KeyMain, TweenInfo.new(0.4, Enum.EasingStyle.Elastic), {Position = UDim2.new(0.505,0,0.5,0)}):Play() wait(0.1) TweenService:Create(KeyMain, TweenInfo.new(0.4, Enum.EasingStyle.Quint), {Position = UDim2.new(0.5,0,0.5,0)}):Play() TweenService:Create(KeyMain, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Size = UDim2.new(0, 500, 0, 187)}):Play() end end) KeyMain.Hide.MouseButton1Click:Connect(function() TweenService:Create(KeyMain, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundTransparency = 1}):Play() TweenService:Create(KeyMain, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Size = UDim2.new(0, 467, 0, 175)}):Play() TweenService:Create(KeyMain.Shadow.Image, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {ImageTransparency = 1}):Play() TweenService:Create(KeyMain.Title, TweenInfo.new(0.4, Enum.EasingStyle.Quint), {TextTransparency = 1}):Play() TweenService:Create(KeyMain.Subtitle, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {TextTransparency = 1}):Play() TweenService:Create(KeyMain.KeyNote, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {TextTransparency = 1}):Play() TweenService:Create(KeyMain.Input, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {BackgroundTransparency = 1}):Play() TweenService:Create(KeyMain.Input.UIStroke, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {Transparency = 1}):Play() TweenService:Create(KeyMain.Input.InputBox, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {TextTransparency = 1}):Play() TweenService:Create(KeyMain.NoteTitle, TweenInfo.new(0.4, Enum.EasingStyle.Quint), {TextTransparency = 1}):Play() TweenService:Create(KeyMain.NoteMessage, TweenInfo.new(0.4, Enum.EasingStyle.Quint), {TextTransparency = 1}):Play() TweenService:Create(KeyMain.Hide, TweenInfo.new(0.4, Enum.EasingStyle.Quint), {ImageTransparency = 1}):Play() wait(0.51) RayfieldLibrary:Destroy() KeyUI:Destroy() end) else Passthrough = true end end if Settings.KeySystem then repeat wait() until Passthrough end Notifications.Template.Visible = false Notifications.Visible = true Rayfield.Enabled = true wait(0.5) TweenService:Create(Main, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {BackgroundTransparency = 0}):Play() TweenService:Create(Main.Shadow.Image, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {ImageTransparency = 0.55}):Play() wait(0.1) TweenService:Create(LoadingFrame.Title, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {TextTransparency = 0}):Play() wait(0.05) TweenService:Create(LoadingFrame.Thumbnail, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {ImageTransparency = 0}):Play() TweenService:Create(LoadingFrame.Shadow, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {ImageTransparency = 0}):Play() wait(0.05) TweenService:Create(LoadingFrame.Version, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {TextTransparency = 0}):Play() Elements.Template.LayoutOrder = 100000 Elements.Template.Visible = false Elements.UIPageLayout.FillDirection = Enum.FillDirection.Horizontal TabList.Template.Visible = false -- Tab local FirstTab = false local Window = {} function Window:CreateTab(Name,Image) local SDone = false local TabButton = TabList.Template:Clone() TabButton.Name = Name TabButton.Title.Text = Name TabButton.Parent = TabList TabButton.Title.TextWrapped = false TabButton.Size = UDim2.new(0, TabButton.Title.TextBounds.X + 30, 0, 30) if Image then TabButton.Title.AnchorPoint = Vector2.new(0, 0.5) TabButton.Title.Position = UDim2.new(0, 37, 0.5, 0) TabButton.Image.Image = "rbxassetid://"..Image TabButton.Image.Visible = true TabButton.Title.TextXAlignment = Enum.TextXAlignment.Left TabButton.Size = UDim2.new(0, TabButton.Title.TextBounds.X + 46, 0, 30) TabButton.Image.ImageColor3 = Color3.fromRGB(255,255,255) end TabButton.BackgroundTransparency = 1 TabButton.Title.TextTransparency = 1 TabButton.Shadow.ImageTransparency = 1 TabButton.Image.ImageTransparency = 1 TabButton.UIStroke.Transparency = 1 TabButton.Visible = true -- Create Elements Page local TabPage = Elements.Template:Clone() TabPage.Name = Name TabPage.Visible = true TabPage.LayoutOrder = #Elements:GetChildren() for _, TemplateElement in ipairs(TabPage:GetChildren()) do if TemplateElement.ClassName == "Frame" and TemplateElement.Name ~= "Placeholder" then TemplateElement:Destroy() end end TabPage.Parent = Elements if not FirstTab then Elements.UIPageLayout.Animated = false Elements.UIPageLayout:JumpTo(TabPage) Elements.UIPageLayout.Animated = true end if SelectedTheme ~= RayfieldLibrary.Theme.Default then TabButton.Shadow.Visible = false end TabButton.UIStroke.Color = SelectedTheme.TabStroke -- Animate wait(0.1) if FirstTab then TabButton.BackgroundColor3 = SelectedTheme.TabBackground TabButton.Title.TextColor3 = SelectedTheme.TabTextColor TweenService:Create(TabButton, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {BackgroundTransparency = 0.7}):Play() TweenService:Create(TabButton.Title, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {TextTransparency = 0.2}):Play() TweenService:Create(TabButton.Image, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {ImageTransparency = 0}):Play() TweenService:Create(TabButton.UIStroke, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {Transparency = 0}):Play() TweenService:Create(TabButton.Shadow, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {ImageTransparency = 0.7}):Play() else FirstTab = Name TabButton.BackgroundColor3 = SelectedTheme.TabBackgroundSelected TabButton.Title.TextColor3 = SelectedTheme.SelectedTabTextColor TweenService:Create(TabButton.Shadow, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {ImageTransparency = 0.9}):Play() TweenService:Create(TabButton.Image, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {ImageTransparency = 0}):Play() TweenService:Create(TabButton, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {BackgroundTransparency = 0}):Play() TweenService:Create(TabButton.Title, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {TextTransparency = 0}):Play() end TabButton.Interact.MouseButton1Click:Connect(function() if Minimised then return end TweenService:Create(TabButton, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {BackgroundTransparency = 0}):Play() TweenService:Create(TabButton.UIStroke, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {Transparency = 1}):Play() TweenService:Create(TabButton.Title, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {TextTransparency = 0}):Play() TweenService:Create(TabButton.Image, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {ImageTransparency = 0}):Play() TweenService:Create(TabButton, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.TabBackgroundSelected}):Play() TweenService:Create(TabButton.Title, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {TextColor3 = SelectedTheme.SelectedTabTextColor}):Play() TweenService:Create(TabButton.Shadow, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {ImageTransparency = 0.9}):Play() for _, OtherTabButton in ipairs(TabList:GetChildren()) do if OtherTabButton.Name ~= "Template" and OtherTabButton.ClassName == "Frame" and OtherTabButton ~= TabButton and OtherTabButton.Name ~= "Placeholder" then TweenService:Create(OtherTabButton, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.TabBackground}):Play() TweenService:Create(OtherTabButton.Title, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {TextColor3 = SelectedTheme.TabTextColor}):Play() TweenService:Create(OtherTabButton, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {BackgroundTransparency = 0.7}):Play() TweenService:Create(OtherTabButton.Title, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {TextTransparency = 0.2}):Play() TweenService:Create(OtherTabButton.Image, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {ImageTransparency = 0}):Play() TweenService:Create(OtherTabButton.Shadow, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {ImageTransparency = 0.7}):Play() TweenService:Create(OtherTabButton.UIStroke, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {Transparency = 0}):Play() end end if Elements.UIPageLayout.CurrentPage ~= TabPage then TweenService:Create(Elements, TweenInfo.new(1, Enum.EasingStyle.Quint), {Size = UDim2.new(0, 460,0, 330)}):Play() Elements.UIPageLayout:JumpTo(TabPage) wait(0.2) TweenService:Create(Elements, TweenInfo.new(0.8, Enum.EasingStyle.Quint), {Size = UDim2.new(0, 475,0, 366)}):Play() end end) local Tab = {} -- Button function Tab:CreateButton(ButtonSettings) local ButtonValue = {} local Button = Elements.Template.Button:Clone() Button.Name = ButtonSettings.Name Button.Title.Text = ButtonSettings.Name Button.Visible = true Button.Parent = TabPage Button.BackgroundTransparency = 1 Button.UIStroke.Transparency = 1 Button.Title.TextTransparency = 1 TweenService:Create(Button, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {BackgroundTransparency = 0}):Play() TweenService:Create(Button.UIStroke, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {Transparency = 0}):Play() TweenService:Create(Button.Title, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {TextTransparency = 0}):Play() Button.Interact.MouseButton1Click:Connect(function() local Success, Response = pcall(ButtonSettings.Callback) if not Success then TweenService:Create(Button, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = Color3.fromRGB(85, 0, 0)}):Play() TweenService:Create(Button.ElementIndicator, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {TextTransparency = 1}):Play() TweenService:Create(Button.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Transparency = 1}):Play() Button.Title.Text = "Callback Error" print("Rayfield | "..ButtonSettings.Name.." Callback Error " ..tostring(Response)) wait(0.5) Button.Title.Text = ButtonSettings.Name TweenService:Create(Button, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play() TweenService:Create(Button.ElementIndicator, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {TextTransparency = 0.9}):Play() TweenService:Create(Button.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Transparency = 0}):Play() else SaveConfiguration() TweenService:Create(Button, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play() TweenService:Create(Button.ElementIndicator, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {TextTransparency = 1}):Play() TweenService:Create(Button.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Transparency = 1}):Play() wait(0.2) TweenService:Create(Button, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play() TweenService:Create(Button.ElementIndicator, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {TextTransparency = 0.9}):Play() TweenService:Create(Button.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Transparency = 0}):Play() end end) Button.MouseEnter:Connect(function() TweenService:Create(Button, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play() TweenService:Create(Button.ElementIndicator, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {TextTransparency = 0.7}):Play() end) Button.MouseLeave:Connect(function() TweenService:Create(Button, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play() TweenService:Create(Button.ElementIndicator, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {TextTransparency = 0.9}):Play() end) function ButtonValue:Set(NewButton) Button.Title.Text = NewButton Button.Name = NewButton end return ButtonValue end -- ColorPicker function Tab:CreateColorPicker(ColorPickerSettings) -- by Throit ColorPickerSettings.Type = "ColorPicker" local ColorPicker = Elements.Template.ColorPicker:Clone() local Background = ColorPicker.CPBackground local Display = Background.Display local Main = Background.MainCP local Slider = ColorPicker.ColorSlider ColorPicker.ClipsDescendants = true ColorPicker.Name = ColorPickerSettings.Name ColorPicker.Title.Text = ColorPickerSettings.Name ColorPicker.Visible = true ColorPicker.Parent = TabPage ColorPicker.Size = UDim2.new(1, -10, 0.028, 35) Background.Size = UDim2.new(0, 39, 0, 22) Display.BackgroundTransparency = 0 Main.MainPoint.ImageTransparency = 1 ColorPicker.Interact.Size = UDim2.new(1, 0, 1, 0) ColorPicker.Interact.Position = UDim2.new(0.5, 0, 0.5, 0) ColorPicker.RGB.Position = UDim2.new(0, 17, 0, 70) ColorPicker.HexInput.Position = UDim2.new(0, 17, 0, 90) Main.ImageTransparency = 1 Background.BackgroundTransparency = 1 local opened = false local mouse = game.Players.LocalPlayer:GetMouse() Main.Image = "http://www.roblox.com/asset/?id=11415645739" local mainDragging = false local sliderDragging = false ColorPicker.Interact.MouseButton1Down:Connect(function() if not opened then opened = true TweenService:Create(ColorPicker, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Size = UDim2.new(1, -10, 0.224, 40)}):Play() TweenService:Create(Background, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Size = UDim2.new(0, 173, 0, 86)}):Play() TweenService:Create(Display, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundTransparency = 1}):Play() TweenService:Create(ColorPicker.Interact, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Position = UDim2.new(0.289, 0, 0.5, 0)}):Play() TweenService:Create(ColorPicker.RGB, TweenInfo.new(0.8, Enum.EasingStyle.Quint), {Position = UDim2.new(0, 17, 0, 40)}):Play() TweenService:Create(ColorPicker.HexInput, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {Position = UDim2.new(0, 17, 0, 73)}):Play() TweenService:Create(ColorPicker.Interact, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Size = UDim2.new(0.574, 0, 1, 0)}):Play() TweenService:Create(Main.MainPoint, TweenInfo.new(0.2, Enum.EasingStyle.Quint), {ImageTransparency = 0}):Play() TweenService:Create(Main, TweenInfo.new(0.2, Enum.EasingStyle.Quint), {ImageTransparency = 0.1}):Play() TweenService:Create(Background, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundTransparency = 0}):Play() else opened = false TweenService:Create(ColorPicker, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Size = UDim2.new(1, -10, 0.028, 35)}):Play() TweenService:Create(Background, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Size = UDim2.new(0, 39, 0, 22)}):Play() TweenService:Create(ColorPicker.Interact, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Size = UDim2.new(1, 0, 1, 0)}):Play() TweenService:Create(ColorPicker.Interact, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Position = UDim2.new(0.5, 0, 0.5, 0)}):Play() TweenService:Create(ColorPicker.RGB, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Position = UDim2.new(0, 17, 0, 70)}):Play() TweenService:Create(ColorPicker.HexInput, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {Position = UDim2.new(0, 17, 0, 90)}):Play() TweenService:Create(Display, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundTransparency = 0}):Play() TweenService:Create(Main.MainPoint, TweenInfo.new(0.2, Enum.EasingStyle.Quint), {ImageTransparency = 1}):Play() TweenService:Create(Main, TweenInfo.new(0.2, Enum.EasingStyle.Quint), {ImageTransparency = 1}):Play() TweenService:Create(Background, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundTransparency = 1}):Play() end end) game:GetService("UserInputService").InputEnded:Connect(function(input, gameProcessed) if input.UserInputType == Enum.UserInputType.MouseButton1 then mainDragging = false sliderDragging = false end end) Main.MouseButton1Down:Connect(function() if opened then mainDragging = true end end) Main.MainPoint.MouseButton1Down:Connect(function() if opened then mainDragging = true end end) Slider.MouseButton1Down:Connect(function() sliderDragging = true end) Slider.SliderPoint.MouseButton1Down:Connect(function() sliderDragging = true end) local h,s,v = ColorPickerSettings.Color:ToHSV() local color = Color3.fromHSV(h,s,v) local hex = string.format("#%02X%02X%02X",color.R*0xFF,color.G*0xFF,color.B*0xFF) ColorPicker.HexInput.InputBox.Text = hex local function setDisplay() --Main Main.MainPoint.Position = UDim2.new(s,-Main.MainPoint.AbsoluteSize.X/2,1-v,-Main.MainPoint.AbsoluteSize.Y/2) Main.MainPoint.ImageColor3 = Color3.fromHSV(h,s,v) Background.BackgroundColor3 = Color3.fromHSV(h,1,1) Display.BackgroundColor3 = Color3.fromHSV(h,s,v) --Slider local x = h * Slider.AbsoluteSize.X Slider.SliderPoint.Position = UDim2.new(0,x-Slider.SliderPoint.AbsoluteSize.X/2,0.5,0) Slider.SliderPoint.ImageColor3 = Color3.fromHSV(h,1,1) local color = Color3.fromHSV(h,s,v) 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) ColorPicker.RGB.RInput.InputBox.Text = tostring(r) ColorPicker.RGB.GInput.InputBox.Text = tostring(g) ColorPicker.RGB.BInput.InputBox.Text = tostring(b) hex = string.format("#%02X%02X%02X",color.R*0xFF,color.G*0xFF,color.B*0xFF) ColorPicker.HexInput.InputBox.Text = hex end setDisplay() ColorPicker.HexInput.InputBox.FocusLost:Connect(function() if not pcall(function() local r, g, b = string.match(ColorPicker.HexInput.InputBox.Text, "^#?(%w%w)(%w%w)(%w%w)$") local rgbColor = Color3.fromRGB(tonumber(r, 16),tonumber(g, 16), tonumber(b, 16)) h,s,v = rgbColor:ToHSV() hex = ColorPicker.HexInput.InputBox.Text setDisplay() ColorPickerSettings.Color = rgbColor end) then ColorPicker.HexInput.InputBox.Text = hex end pcall(function()ColorPickerSettings.Callback(Color3.fromHSV(h,s,v))end) local r,g,b = math.floor((h*255)+0.5),math.floor((s*255)+0.5),math.floor((v*255)+0.5) ColorPickerSettings.Color = Color3.fromRGB(r,g,b) SaveConfiguration() end) --RGB local function rgbBoxes(box,toChange) local value = tonumber(box.Text) local color = Color3.fromHSV(h,s,v) 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) local save if toChange == "R" then save = oldR;oldR = value elseif toChange == "G" then save = oldG;oldG = value else save = oldB;oldB = value end if value then value = math.clamp(value,0,255) h,s,v = Color3.fromRGB(oldR,oldG,oldB):ToHSV() setDisplay() else box.Text = tostring(save) end local r,g,b = math.floor((h*255)+0.5),math.floor((s*255)+0.5),math.floor((v*255)+0.5) ColorPickerSettings.Color = Color3.fromRGB(r,g,b) SaveConfiguration() end ColorPicker.RGB.RInput.InputBox.FocusLost:connect(function() rgbBoxes(ColorPicker.RGB.RInput.InputBox,"R") pcall(function()ColorPickerSettings.Callback(Color3.fromHSV(h,s,v))end) end) ColorPicker.RGB.GInput.InputBox.FocusLost:connect(function() rgbBoxes(ColorPicker.RGB.GInput.InputBox,"G") pcall(function()ColorPickerSettings.Callback(Color3.fromHSV(h,s,v))end) end) ColorPicker.RGB.BInput.InputBox.FocusLost:connect(function() rgbBoxes(ColorPicker.RGB.BInput.InputBox,"B") pcall(function()ColorPickerSettings.Callback(Color3.fromHSV(h,s,v))end) end) game:GetService("RunService").RenderStepped:connect(function() if mainDragging then local localX = math.clamp(mouse.X-Main.AbsolutePosition.X,0,Main.AbsoluteSize.X) local localY = math.clamp(mouse.Y-Main.AbsolutePosition.Y,0,Main.AbsoluteSize.Y) Main.MainPoint.Position = UDim2.new(0,localX-Main.MainPoint.AbsoluteSize.X/2,0,localY-Main.MainPoint.AbsoluteSize.Y/2) s = localX / Main.AbsoluteSize.X v = 1 - (localY / Main.AbsoluteSize.Y) Display.BackgroundColor3 = Color3.fromHSV(h,s,v) Main.MainPoint.ImageColor3 = Color3.fromHSV(h,s,v) Background.BackgroundColor3 = Color3.fromHSV(h,1,1) local color = Color3.fromHSV(h,s,v) 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) ColorPicker.RGB.RInput.InputBox.Text = tostring(r) ColorPicker.RGB.GInput.InputBox.Text = tostring(g) ColorPicker.RGB.BInput.InputBox.Text = tostring(b) ColorPicker.HexInput.InputBox.Text = string.format("#%02X%02X%02X",color.R*0xFF,color.G*0xFF,color.B*0xFF) pcall(function()ColorPickerSettings.Callback(Color3.fromHSV(h,s,v))end) ColorPickerSettings.Color = Color3.fromRGB(r,g,b) SaveConfiguration() end if sliderDragging then local localX = math.clamp(mouse.X-Slider.AbsolutePosition.X,0,Slider.AbsoluteSize.X) h = localX / Slider.AbsoluteSize.X Display.BackgroundColor3 = Color3.fromHSV(h,s,v) Slider.SliderPoint.Position = UDim2.new(0,localX-Slider.SliderPoint.AbsoluteSize.X/2,0.5,0) Slider.SliderPoint.ImageColor3 = Color3.fromHSV(h,1,1) Background.BackgroundColor3 = Color3.fromHSV(h,1,1) Main.MainPoint.ImageColor3 = Color3.fromHSV(h,s,v) local color = Color3.fromHSV(h,s,v) 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) ColorPicker.RGB.RInput.InputBox.Text = tostring(r) ColorPicker.RGB.GInput.InputBox.Text = tostring(g) ColorPicker.RGB.BInput.InputBox.Text = tostring(b) ColorPicker.HexInput.InputBox.Text = string.format("#%02X%02X%02X",color.R*0xFF,color.G*0xFF,color.B*0xFF) pcall(function()ColorPickerSettings.Callback(Color3.fromHSV(h,s,v))end) ColorPickerSettings.Color = Color3.fromRGB(r,g,b) SaveConfiguration() end end) if Settings.ConfigurationSaving then if Settings.ConfigurationSaving.Enabled and ColorPickerSettings.Flag then RayfieldLibrary.Flags[ColorPickerSettings.Flag] = ColorPickerSettings end end function ColorPickerSettings:Set(RGBColor) ColorPickerSettings.Color = RGBColor h,s,v = ColorPickerSettings.Color:ToHSV() color = Color3.fromHSV(h,s,v) setDisplay() end return ColorPickerSettings end -- Section function Tab:CreateSection(SectionName) local SectionValue = {} if SDone then local SectionSpace = Elements.Template.SectionSpacing:Clone() SectionSpace.Visible = true SectionSpace.Parent = TabPage end local Section = Elements.Template.SectionTitle:Clone() Section.Title.Text = SectionName Section.Visible = true Section.Parent = TabPage Section.Title.TextTransparency = 1 TweenService:Create(Section.Title, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {TextTransparency = 0}):Play() function SectionValue:Set(NewSection) Section.Title.Text = NewSection end SDone = true return SectionValue end -- Label function Tab:CreateLabel(LabelText) local LabelValue = {} local Label = Elements.Template.Label:Clone() Label.Title.Text = LabelText Label.Visible = true Label.Parent = TabPage Label.BackgroundTransparency = 1 Label.UIStroke.Transparency = 1 Label.Title.TextTransparency = 1 Label.BackgroundColor3 = SelectedTheme.SecondaryElementBackground Label.UIStroke.Color = SelectedTheme.SecondaryElementStroke TweenService:Create(Label, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {BackgroundTransparency = 0}):Play() TweenService:Create(Label.UIStroke, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {Transparency = 0}):Play() TweenService:Create(Label.Title, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {TextTransparency = 0}):Play() function LabelValue:Set(NewLabel) Label.Title.Text = NewLabel end return LabelValue end -- Paragraph function Tab:CreateParagraph(ParagraphSettings) local ParagraphValue = {} local Paragraph = Elements.Template.Paragraph:Clone() Paragraph.Title.Text = ParagraphSettings.Title Paragraph.Content.Text = ParagraphSettings.Content Paragraph.Visible = true Paragraph.Parent = TabPage Paragraph.Content.Size = UDim2.new(0, 438, 0, Paragraph.Content.TextBounds.Y) Paragraph.Content.Position = UDim2.new(1, -10, 0.575,0 ) Paragraph.Size = UDim2.new(1, -10, 0, Paragraph.Content.TextBounds.Y + 40) Paragraph.BackgroundTransparency = 1 Paragraph.UIStroke.Transparency = 1 Paragraph.Title.TextTransparency = 1 Paragraph.Content.TextTransparency = 1 Paragraph.BackgroundColor3 = SelectedTheme.SecondaryElementBackground Paragraph.UIStroke.Color = SelectedTheme.SecondaryElementStroke TweenService:Create(Paragraph, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {BackgroundTransparency = 0}):Play() TweenService:Create(Paragraph.UIStroke, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {Transparency = 0}):Play() TweenService:Create(Paragraph.Title, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {TextTransparency = 0}):Play() TweenService:Create(Paragraph.Content, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {TextTransparency = 0}):Play() function ParagraphValue:Set(NewParagraphSettings) Paragraph.Title.Text = NewParagraphSettings.Title Paragraph.Content.Text = NewParagraphSettings.Content end return ParagraphValue end -- Input function Tab:CreateInput(InputSettings) local Input = Elements.Template.Input:Clone() Input.Name = InputSettings.Name Input.Title.Text = InputSettings.Name Input.Visible = true Input.Parent = TabPage Input.BackgroundTransparency = 1 Input.UIStroke.Transparency = 1 Input.Title.TextTransparency = 1 Input.InputFrame.BackgroundColor3 = SelectedTheme.InputBackground Input.InputFrame.UIStroke.Color = SelectedTheme.InputStroke TweenService:Create(Input, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {BackgroundTransparency = 0}):Play() TweenService:Create(Input.UIStroke, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {Transparency = 0}):Play() TweenService:Create(Input.Title, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {TextTransparency = 0}):Play() Input.InputFrame.InputBox.PlaceholderText = InputSettings.PlaceholderText Input.InputFrame.Size = UDim2.new(0, Input.InputFrame.InputBox.TextBounds.X + 24, 0, 30) Input.InputFrame.InputBox.FocusLost:Connect(function() local Success, Response = pcall(function() InputSettings.Callback(Input.InputFrame.InputBox.Text) end) if not Success then TweenService:Create(Input, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = Color3.fromRGB(85, 0, 0)}):Play() TweenService:Create(Input.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Transparency = 1}):Play() Input.Title.Text = "Callback Error" print("Rayfield | "..InputSettings.Name.." Callback Error " ..tostring(Response)) wait(0.5) Input.Title.Text = InputSettings.Name TweenService:Create(Input, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play() TweenService:Create(Input.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Transparency = 0}):Play() end if InputSettings.RemoveTextAfterFocusLost then Input.InputFrame.InputBox.Text = "" end SaveConfiguration() end) Input.MouseEnter:Connect(function() TweenService:Create(Input, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play() end) Input.MouseLeave:Connect(function() TweenService:Create(Input, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play() end) Input.InputFrame.InputBox:GetPropertyChangedSignal("Text"):Connect(function() TweenService:Create(Input.InputFrame, TweenInfo.new(0.55, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {Size = UDim2.new(0, Input.InputFrame.InputBox.TextBounds.X + 24, 0, 30)}):Play() end) end -- Dropdown function Tab:CreateDropdown(DropdownSettings) local Dropdown = Elements.Template.Dropdown:Clone() if string.find(DropdownSettings.Name,"closed") then Dropdown.Name = "Dropdown" else Dropdown.Name = DropdownSettings.Name end Dropdown.Title.Text = DropdownSettings.Name if DropdownSettings.Icon ~= nil then table.insert(RayfieldLibrary.DropdownIcons, Dropdown.Icon) Dropdown.Title.Position = UDim2.fromOffset(152,21) Dropdown.Icon.Visible = true Dropdown.Icon.Image = DropdownSettings.Icon end Dropdown.Visible = true Dropdown.Parent = TabPage Dropdown.List.Visible = false if DropdownSettings.Multi then Dropdown.Selected.Text = table.concat(DropdownSettings.CurrentOption, ", ") else Dropdown.Selected.Text = DropdownSettings.CurrentOption end Dropdown.BackgroundTransparency = 1 Dropdown.UIStroke.Transparency = 1 Dropdown.Title.TextTransparency = 1 Dropdown.Icon.ImageTransparency = 1 Dropdown.Size = UDim2.new(1, -10, 0, 45) TweenService:Create(Dropdown, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {BackgroundTransparency = 0}):Play() TweenService:Create(Dropdown.UIStroke, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {Transparency = 0}):Play() TweenService:Create(Dropdown.Title, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {TextTransparency = 0}):Play() TweenService:Create(Dropdown.Icon, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {ImageTransparency = 0}):Play() for _, ununusedoption in ipairs(Dropdown.List:GetChildren()) do if ununusedoption.ClassName == "Frame" and ununusedoption.Name ~= "Placeholder" and ununusedoption.Name ~= "Search" then ununusedoption:Destroy() end end Dropdown.Toggle.Rotation = 180 Dropdown.Interact.MouseButton1Click:Connect(function() TweenService:Create(Dropdown, TweenInfo.new(0.4, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play() TweenService:Create(Dropdown.UIStroke, TweenInfo.new(0.4, Enum.EasingStyle.Quint), {Transparency = 1}):Play() wait(0.1) TweenService:Create(Dropdown, TweenInfo.new(0.4, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play() TweenService:Create(Dropdown.UIStroke, TweenInfo.new(0.4, Enum.EasingStyle.Quint), {Transparency = 0}):Play() if Debounce then return end if Dropdown.List.Visible then Debounce = true TweenService:Create(Dropdown, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {Size = UDim2.new(1, -10, 0, 45)}):Play() for _, DropdownOpt in ipairs(Dropdown.List:GetChildren()) do if DropdownOpt.ClassName == "Frame" and DropdownOpt.Name ~= "Placeholder" then TweenService:Create(DropdownOpt, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {BackgroundTransparency = 1}):Play() TweenService:Create(DropdownOpt.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {Transparency = 1}):Play() if DropdownOpt:FindFirstChild("Title") then TweenService:Create(DropdownOpt.Title, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {TextTransparency = 1}):Play() else TweenService:Create(DropdownOpt.Search, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {TextTransparency = 1}):Play() end if DropdownOpt:FindFirstChild("Icon") then TweenService:Create(DropdownOpt.Icon, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {ImageTransparency = 1}):Play() end end end TweenService:Create(Dropdown.List, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {ScrollBarImageTransparency = 1}):Play() TweenService:Create(Dropdown.Toggle, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {Rotation = 180}):Play() wait(0.35) Dropdown.List.Visible = false Debounce = false else TweenService:Create(Dropdown, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {Size = UDim2.new(1, -10,0.353, 180)}):Play() Dropdown.List.Visible = true TweenService:Create(Dropdown.List, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {ScrollBarImageTransparency = 0.7}):Play() TweenService:Create(Dropdown.Toggle, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {Rotation = 0}):Play() for _, DropdownOpt in ipairs(Dropdown.List:GetChildren()) do if DropdownOpt.ClassName == "Frame" and DropdownOpt.Name ~= "Placeholder" then TweenService:Create(DropdownOpt, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {BackgroundTransparency = 0}):Play() TweenService:Create(DropdownOpt.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {Transparency = 0}):Play() if DropdownOpt:FindFirstChild("Title") then TweenService:Create(DropdownOpt.Title, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {TextTransparency = 0}):Play() else TweenService:Create(DropdownOpt.Search, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {TextTransparency = 0}):Play() end if DropdownOpt:FindFirstChild("Icon") then TweenService:Create(DropdownOpt.Icon, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {ImageTransparency = 0}):Play() end end end end end) Dropdown.MouseEnter:Connect(function() if not Dropdown.List.Visible then TweenService:Create(Dropdown, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play() end end) Dropdown.MouseLeave:Connect(function() TweenService:Create(Dropdown, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play() end) for _, Option in ipairs(DropdownSettings.Options) do local DropdownOption = Elements.Template.Dropdown.List.Template:Clone() DropdownOption.Name = Option DropdownOption.Title.Text = Option DropdownOption.Parent = Dropdown.List DropdownOption.Visible = true if (DropdownSettings.Multi and table.find(DropdownSettings.CurrentOption, Option)) or (not DropdownSettings.Multi and DropdownSettings.CurrentOption == Option) then DropdownOption.BackgroundColor3 = Color3.fromRGB(40, 40, 40) end DropdownOption.BackgroundTransparency = 1 DropdownOption.UIStroke.Transparency = 1 DropdownOption.Title.TextTransparency = 1 DropdownOption.Interact.ZIndex = 50 DropdownOption.Interact.MouseButton1Click:Connect(function() if (DropdownSettings.Multi and not table.find(DropdownSettings.CurrentOption, Option)) or (not DropdownSettings.Multi and DropdownSettings.CurrentOption ~= Option) then if DropdownSettings.Multi then table.insert(DropdownSettings.CurrentOption, Option) Dropdown.Selected.Text = table.concat(DropdownSettings.CurrentOption, ", ") else DropdownSettings.CurrentOption = Option Dropdown.Selected.Text = DropdownSettings.CurrentOption end local Success, Response = pcall(function() DropdownSettings.Callback(DropdownSettings.CurrentOption) end) if not Success then TweenService:Create(Dropdown, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = Color3.fromRGB(85, 0, 0)}):Play() TweenService:Create(Dropdown.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Transparency = 1}):Play() Dropdown.Title.Text = "Callback Error" print("Rayfield | "..DropdownSettings.Name.." Callback Error " ..tostring(Response)) wait(0.5) Dropdown.Title.Text = DropdownSettings.Name TweenService:Create(Dropdown, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play() TweenService:Create(Dropdown.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Transparency = 0}):Play() end for _, droption in ipairs(Dropdown.List:GetChildren()) do if droption.ClassName == "Frame" and droption.Name ~= "Placeholder" then TweenService:Create(droption, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {BackgroundColor3 = Color3.fromRGB(30, 30, 30)}):Play() end end TweenService:Create(DropdownOption.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {Transparency = 1}):Play() TweenService:Create(DropdownOption, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {BackgroundColor3 = Color3.fromRGB(40, 40, 40)}):Play() -- Debounce = true -- wait(0.2) -- TweenService:Create(DropdownOption.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {Transparency = 0}):Play() -- wait(0.1) -- TweenService:Create(Dropdown, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {Size = UDim2.new(1, -10, 0, 45)}):Play() -- for _, DropdownOpt in ipairs(Dropdown.List:GetChildren()) do -- if DropdownOpt.ClassName == "Frame" and DropdownOpt.Name ~= "Placeholder" then -- TweenService:Create(DropdownOpt, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {BackgroundTransparency = 1}):Play() -- TweenService:Create(DropdownOpt.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {Transparency = 1}):Play() -- TweenService:Create(DropdownOpt.Title, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {TextTransparency = 1}):Play() -- end -- end -- TweenService:Create(Dropdown.List, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {ScrollBarImageTransparency = 1}):Play() -- TweenService:Create(Dropdown.Toggle, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {Rotation = 180}):Play() -- wait(0.35) -- Dropdown.List.Visible = false -- Debounce = false SaveConfiguration() else if DropdownSettings.Multi then for i2,v2 in pairs(DropdownSettings.CurrentOption) do if v2 == Option then table.remove(DropdownSettings.CurrentOption, i2) end end if #DropdownSettings.CurrentOption > 0 then Dropdown.Selected.Text = table.concat(DropdownSettings.CurrentOption, ", ") else Dropdown.Selected.Text = "None" end else DropdownSettings.CurrentOption = nil Dropdown.Selected.Text = "None" end local Success, Response = pcall(function() DropdownSettings.Callback(DropdownSettings.CurrentOption) end) if not Success then TweenService:Create(Dropdown, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = Color3.fromRGB(85, 0, 0)}):Play() TweenService:Create(Dropdown.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Transparency = 1}):Play() Dropdown.Title.Text = "Callback Error" print("Rayfield | "..DropdownSettings.Name.." Callback Error " ..tostring(Response)) wait(0.5) Dropdown.Title.Text = DropdownSettings.Name TweenService:Create(Dropdown, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play() TweenService:Create(Dropdown.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Transparency = 0}):Play() end for _, droption in ipairs(Dropdown.List:GetChildren()) do if droption.ClassName == "Frame" and droption.Name ~= "Placeholder" and droption.Name ~= "Search" then TweenService:Create(droption, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {BackgroundColor3 = Color3.fromRGB(30, 30, 30)}):Play() end end TweenService:Create(DropdownOption.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {Transparency = 1}):Play() TweenService:Create(DropdownOption, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {BackgroundColor3 = Color3.fromRGB(40, 40, 40)}):Play() end end) end Dropdown.List.Search.Search.Changed:Connect(function() if Dropdown.List.Search.Search.Text == "" then for i,v in pairs(Dropdown.List:GetChildren()) do if v:IsA("Frame") and v.Name ~= "Search" and v.Name ~= "Placeholder" then v.Visible = true end end elseif Dropdown.List.Search.Search.Text ~= "" then for i,v in pairs(Dropdown.List:GetChildren()) do if v:IsA("Frame") and v.Name ~= "Search" and v.Name ~= "Placeholder" then if not string.find(v.Title.Text:lower(), Dropdown.List.Search.Search.Text:lower()) then v.Visible = false end end end end end) function DropdownSettings:Set(NewOption) if DropdownSettings.Multi then Dropdown.Selected.Text = table.concat(NewOption, ", ") else Dropdown.Selected.Text = NewOption end DropdownSettings.CurrentOption = NewOption local Success, Response = pcall(function() DropdownSettings.Callback(NewOption) end) if not Success then TweenService:Create(Dropdown, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = Color3.fromRGB(85, 0, 0)}):Play() TweenService:Create(Dropdown.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Transparency = 1}):Play() Dropdown.Title.Text = "Callback Error" print("Rayfield | "..DropdownSettings.Name.." Callback Error " ..tostring(Response)) wait(0.5) Dropdown.Title.Text = DropdownSettings.Name TweenService:Create(Dropdown, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play() TweenService:Create(Dropdown.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Transparency = 0}):Play() end for _, droption in ipairs(Dropdown.List:GetChildren()) do if (DropdownSettings.Multi and not table.find(NewOption, droption.Name)) or (not DropdownSettings.Multi and droption.Name ~= NewOption) then if droption.ClassName == "Frame" and droption.Name ~= "Placeholder" and droption.Name ~= "Search" then droption.BackgroundColor3 = Color3.fromRGB(30, 30, 30) end else droption.BackgroundColor3 = Color3.fromRGB(40, 40, 40) end end end function DropdownSettings:UpdateOptions(NewOptions) TweenService:Create(Dropdown, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {Size = UDim2.new(1, -10, 0, 45)}):Play() for _, DropdownOpt in ipairs(Dropdown.List:GetChildren()) do if DropdownOpt.ClassName == "Frame" and DropdownOpt.Name ~= "Placeholder" then TweenService:Create(DropdownOpt, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {BackgroundTransparency = 1}):Play() TweenService:Create(DropdownOpt.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {Transparency = 1}):Play() if DropdownOpt:FindFirstChild("Title") then TweenService:Create(DropdownOpt.Title, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {TextTransparency = 1}):Play() else TweenService:Create(DropdownOpt.Search, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {TextTransparency = 1}):Play() end if DropdownOpt:FindFirstChild("Icon") then TweenService:Create(DropdownOpt.Icon, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {ImageTransparency = 1}):Play() end end end TweenService:Create(Dropdown.List, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {ScrollBarImageTransparency = 1}):Play() TweenService:Create(Dropdown.Toggle, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {Rotation = 180}):Play() wait(0.35) Dropdown.List.Visible = false DropdownSettings.Options = NewOptions if DropdownSettings.Multi then DropdownSettings.CurrentOption = {} Dropdown.Selected.Text = table.concat(DropdownSettings.CurrentOption, ", ") else DropdownSettings.CurrentOption = "" Dropdown.Selected.Text = DropdownSettings.CurrentOption end for i,v in ipairs(Dropdown.List:GetChildren()) do if v.ClassName == "Frame" and v.Name ~= "Placeholder" and v.Name ~= "Search" then v:Destroy() end end for _, Option in ipairs(DropdownSettings.Options) do local DropdownOption = Elements.Template.Dropdown.List.Template:Clone() DropdownOption.Name = Option DropdownOption.Title.Text = Option DropdownOption.Parent = Dropdown.List DropdownOption.Visible = true if (DropdownSettings.Multi and table.find(DropdownSettings.CurrentOption, Option)) or (not DropdownSettings.Multi and DropdownSettings.CurrentOption == Option) then DropdownOption.BackgroundColor3 = Color3.fromRGB(40, 40, 40) end DropdownOption.BackgroundTransparency = 1 DropdownOption.UIStroke.Transparency = 1 DropdownOption.Title.TextTransparency = 1 DropdownOption.Interact.ZIndex = 50 DropdownOption.Interact.MouseButton1Click:Connect(function() if (DropdownSettings.Multi and not table.find(DropdownSettings.CurrentOption, Option)) or (not DropdownSettings.Multi and DropdownSettings.CurrentOption ~= Option) then if DropdownSettings.Multi then table.insert(DropdownSettings.CurrentOption, Option) Dropdown.Selected.Text = table.concat(DropdownSettings.CurrentOption, ", ") else DropdownSettings.CurrentOption = Option Dropdown.Selected.Text = DropdownSettings.CurrentOption end local Success, Response = pcall(function() DropdownSettings.Callback(DropdownSettings.CurrentOption) end) if not Success then TweenService:Create(Dropdown, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = Color3.fromRGB(85, 0, 0)}):Play() TweenService:Create(Dropdown.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Transparency = 1}):Play() Dropdown.Title.Text = "Callback Error" print("Rayfield | "..DropdownSettings.Name.." Callback Error " ..tostring(Response)) wait(0.5) Dropdown.Title.Text = DropdownSettings.Name TweenService:Create(Dropdown, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play() TweenService:Create(Dropdown.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Transparency = 0}):Play() end for _, droption in ipairs(Dropdown.List:GetChildren()) do if droption.ClassName == "Frame" and droption.Name ~= "Placeholder" then TweenService:Create(droption, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {BackgroundColor3 = Color3.fromRGB(30, 30, 30)}):Play() end end TweenService:Create(DropdownOption.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {Transparency = 1}):Play() TweenService:Create(DropdownOption, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {BackgroundColor3 = Color3.fromRGB(40, 40, 40)}):Play() -- Debounce = true -- wait(0.2) -- TweenService:Create(DropdownOption.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {Transparency = 0}):Play() -- wait(0.1) -- TweenService:Create(Dropdown, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {Size = UDim2.new(1, -10, 0, 45)}):Play() -- for _, DropdownOpt in ipairs(Dropdown.List:GetChildren()) do -- if DropdownOpt.ClassName == "Frame" and DropdownOpt.Name ~= "Placeholder" then -- TweenService:Create(DropdownOpt, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {BackgroundTransparency = 1}):Play() -- TweenService:Create(DropdownOpt.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {Transparency = 1}):Play() -- TweenService:Create(DropdownOpt.Title, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {TextTransparency = 1}):Play() -- end -- end -- TweenService:Create(Dropdown.List, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {ScrollBarImageTransparency = 1}):Play() -- TweenService:Create(Dropdown.Toggle, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {Rotation = 180}):Play() -- wait(0.35) -- Dropdown.List.Visible = false -- Debounce = false SaveConfiguration() else if DropdownSettings.Multi then for i2,v2 in pairs(DropdownSettings.CurrentOption) do if v2 == Option then table.remove(DropdownSettings.CurrentOption, i2) end end if #DropdownSettings.CurrentOption > 0 then Dropdown.Selected.Text = table.concat(DropdownSettings.CurrentOption, ", ") else Dropdown.Selected.Text = "None" end else DropdownSettings.CurrentOption = nil Dropdown.Selected.Text = "None" end local Success, Response = pcall(function() DropdownSettings.Callback(DropdownSettings.CurrentOption) end) if not Success then TweenService:Create(Dropdown, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = Color3.fromRGB(85, 0, 0)}):Play() TweenService:Create(Dropdown.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Transparency = 1}):Play() Dropdown.Title.Text = "Callback Error" print("Rayfield | "..DropdownSettings.Name.." Callback Error " ..tostring(Response)) wait(0.5) Dropdown.Title.Text = DropdownSettings.Name TweenService:Create(Dropdown, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play() TweenService:Create(Dropdown.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Transparency = 0}):Play() end for _, droption in ipairs(Dropdown.List:GetChildren()) do if droption.ClassName == "Frame" and droption.Name ~= "Placeholder" and droption.Name ~= "Search" then TweenService:Create(droption, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {BackgroundColor3 = Color3.fromRGB(30, 30, 30)}):Play() end end TweenService:Create(DropdownOption.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {Transparency = 1}):Play() TweenService:Create(DropdownOption, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {BackgroundColor3 = Color3.fromRGB(40, 40, 40)}):Play() end end) end end if Settings.ConfigurationSaving then if Settings.ConfigurationSaving.Enabled and DropdownSettings.Flag then RayfieldLibrary.Flags[DropdownSettings.Flag] = DropdownSettings end end return DropdownSettings end -- List function Tab:CreateList(ListSettings) local NewRules = {} local ListClone = Elements.Template.List:Clone() if string.find(ListSettings.Name,"closed") then ListClone.Name = "ListClone" else ListClone.Name = ListSettings.Name end ListClone.Title.Text = ListSettings.Name if ListSettings.Icon ~= nil then table.insert(RayfieldLibrary.DropdownIcons, ListClone.Icon) ListClone.Title.Position = UDim2.fromOffset(152,21) ListClone.Icon.Visible = true ListClone.Icon.Image = ListSettings.Icon end ListClone.Visible = true ListClone.Parent = TabPage ListClone.Rules.Visible = false ListClone.Total.Text = #ListSettings.Rules.." Rules" ListClone.BackgroundTransparency = 1 ListClone.UIStroke.Transparency = 1 ListClone.Title.TextTransparency = 1 ListClone.Icon.ImageTransparency = 1 ListClone.Size = UDim2.new(1, -10, 0, 45) TweenService:Create(ListClone, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {BackgroundTransparency = 0}):Play() TweenService:Create(ListClone.UIStroke, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {Transparency = 0}):Play() TweenService:Create(ListClone.Title, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {TextTransparency = 0}):Play() TweenService:Create(ListClone.Icon, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {ImageTransparency = 0}):Play() for _, ununusedoption in ipairs(ListClone.Rules:GetChildren()) do if ununusedoption.ClassName == "Frame" and ununusedoption.Name ~= "Placeholder" and ununusedoption.Name ~= "Search" then ununusedoption:Destroy() end end ListClone.Toggle.Rotation = 180 ListClone.Interact.MouseButton1Click:Connect(function() TweenService:Create(ListClone, TweenInfo.new(0.4, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play() TweenService:Create(ListClone.UIStroke, TweenInfo.new(0.4, Enum.EasingStyle.Quint), {Transparency = 1}):Play() wait(0.1) TweenService:Create(ListClone, TweenInfo.new(0.4, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play() TweenService:Create(ListClone.UIStroke, TweenInfo.new(0.4, Enum.EasingStyle.Quint), {Transparency = 0}):Play() if Debounce then return end if ListClone.Rules.Visible then Debounce = true TweenService:Create(ListClone, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {Size = UDim2.new(1, -10, 0, 45)}):Play() for _, DropdownOpt in ipairs(ListClone.Rules:GetChildren()) do if DropdownOpt.ClassName == "Frame" and DropdownOpt.Name ~= "Placeholder" then TweenService:Create(DropdownOpt, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {BackgroundTransparency = 1}):Play() TweenService:Create(DropdownOpt.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {Transparency = 1}):Play() if DropdownOpt:FindFirstChild("Title") then TweenService:Create(DropdownOpt.Title, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {TextTransparency = 1}):Play() else TweenService:Create(DropdownOpt.Search, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {TextTransparency = 1}):Play() end if DropdownOpt:FindFirstChild("Icon") then TweenService:Create(DropdownOpt.Icon, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {ImageTransparency = 1}):Play() else TweenService:Create(DropdownOpt:FindFirstChild("Remove"), TweenInfo.new(0.3, Enum.EasingStyle.Quint), {ImageTransparency = 1}):Play() end end end TweenService:Create(ListClone.Rules, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {ScrollBarImageTransparency = 1}):Play() TweenService:Create(ListClone.Toggle, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {Rotation = 180}):Play() wait(0.35) ListClone.Rules.Visible = false Debounce = false else TweenService:Create(ListClone, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {Size = UDim2.new(1, -10,0.353, 180)}):Play() ListClone.Rules.Visible = true TweenService:Create(ListClone.Rules, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {ScrollBarImageTransparency = 0.7}):Play() TweenService:Create(ListClone.Toggle, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {Rotation = 0}):Play() for _, DropdownOpt in ipairs(ListClone.Rules:GetChildren()) do if DropdownOpt.ClassName == "Frame" and DropdownOpt.Name ~= "Placeholder" then TweenService:Create(DropdownOpt, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {BackgroundTransparency = 0}):Play() TweenService:Create(DropdownOpt.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {Transparency = 0}):Play() if DropdownOpt:FindFirstChild("Title") then TweenService:Create(DropdownOpt.Title, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {TextTransparency = 0}):Play() else TweenService:Create(DropdownOpt.Search, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {TextTransparency = 0}):Play() end if DropdownOpt:FindFirstChild("Icon") then TweenService:Create(DropdownOpt.Icon, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {ImageTransparency = 0}):Play() else TweenService:Create(DropdownOpt:FindFirstChild("Remove"), TweenInfo.new(0.3, Enum.EasingStyle.Quint), {ImageTransparency = 0.8}):Play() end end end end end) ListClone.MouseEnter:Connect(function() if not ListClone.Rules.Visible then TweenService:Create(ListClone, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play() end end) ListClone.MouseLeave:Connect(function() TweenService:Create(ListClone, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play() end) for i, Rule in ipairs(ListSettings.Rules) do local DropdownOption = Elements.Template.List.Rules.Template:Clone() DropdownOption.Name = i DropdownOption.Title.Text = Rule DropdownOption.Parent = ListClone.Rules DropdownOption.Visible = true DropdownOption.BackgroundTransparency = 1 DropdownOption.UIStroke.Transparency = 1 DropdownOption.Title.TextTransparency = 1 DropdownOption:FindFirstChild("Remove").ImageTransparency = 0.8 DropdownOption:FindFirstChild("Remove").MouseButton1Click:Connect(function() NewRules = {} for i2,v2 in pairs(ListSettings.Rules) do if Rule ~= v2 then table.insert(NewRules, v2) end end ListSettings.Rules = NewRules ListClone.Total.Text = #NewRules.." Rules" local Success, Response = pcall(function() ListSettings.Callback(ListSettings.Rules) end) if not Success then TweenService:Create(ListClone, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = Color3.fromRGB(85, 0, 0)}):Play() TweenService:Create(ListClone.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Transparency = 1}):Play() ListClone.Title.Text = "Callback Error" print("Rayfield | "..ListSettings.Name.." Callback Error " ..tostring(Response)) wait(0.5) ListClone.Title.Text = ListSettings.Name TweenService:Create(ListClone, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play() TweenService:Create(ListClone.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Transparency = 0}):Play() end DropdownOption:Destroy() SaveConfiguration() end) end ListClone.Rules.Search.Search.Changed:Connect(function() if ListClone.Rules.Search.Search.Text == "" then for i,v in pairs(ListClone.Rules:GetChildren()) do if v:IsA("Frame") and v.Name ~= "Search" and v.Name ~= "Placeholder" then v.Visible = true end end elseif ListClone.Rules.Search.Search.Text ~= "" then for i,v in pairs(ListClone.Rules:GetChildren()) do if v:IsA("Frame") and v.Name ~= "Search" and v.Name ~= "Placeholder" then if not string.find(v.Title.Text:lower(), ListClone.Rules.Search.Search.Text:lower()) then v.Visible = false end end end end end) function ListSettings:UpdateRules(RulesReplacement) TweenService:Create(ListClone, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {Size = UDim2.new(1, -10, 0, 45)}):Play() for _, DropdownOpt in ipairs(ListClone.Rules:GetChildren()) do if DropdownOpt.ClassName == "Frame" and DropdownOpt.Name ~= "Placeholder" then TweenService:Create(DropdownOpt, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {BackgroundTransparency = 1}):Play() TweenService:Create(DropdownOpt.UIStroke, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {Transparency = 1}):Play() if DropdownOpt:FindFirstChild("Title") then TweenService:Create(DropdownOpt.Title, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {TextTransparency = 1}):Play() else TweenService:Create(DropdownOpt.Search, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {TextTransparency = 1}):Play() end if DropdownOpt:FindFirstChild("Icon") then TweenService:Create(DropdownOpt.Icon, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {ImageTransparency = 1}):Play() else TweenService:Create(DropdownOpt:FindFirstChild("Remove"), TweenInfo.new(0.3, Enum.EasingStyle.Quint), {ImageTransparency = 1}):Play() end end end TweenService:Create(ListClone.Rules, TweenInfo.new(0.3, Enum.EasingStyle.Quint), {ScrollBarImageTransparency = 1}):Play() TweenService:Create(ListClone.Toggle, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {Rotation = 180}):Play() wait(0.35) ListClone.Rules.Visible = false ListSettings.Rules = RulesReplacement ListClone.Total.Text = #ListSettings.Rules.." Rules" for i,v in ipairs(ListClone.Rules:GetChildren()) do if v.ClassName == "Frame" and v.Name ~= "Placeholder" and v.Name ~= "Search" then v:Destroy() end end for i, Rule in ipairs(ListSettings.Rules) do local DropdownOption = Elements.Template.List.Rules.Template:Clone() DropdownOption.Name = i DropdownOption.Title.Text = Rule DropdownOption.Parent = ListClone.Rules DropdownOption.Visible = true DropdownOption.BackgroundTransparency = 1 DropdownOption.UIStroke.Transparency = 1 DropdownOption.Title.TextTransparency = 1 DropdownOption:FindFirstChild("Remove").ImageTransparency = 0.8 DropdownOption:FindFirstChild("Remove").MouseButton1Click:Connect(function() NewRules = {} for i2,v2 in pairs(ListSettings.Rules) do if Rule ~= v2 then table.insert(NewRules, v2) end end ListSettings.Rules = NewRules ListClone.Total.Text = #NewRules.." Rules" local Success, Response = pcall(function() ListSettings.Callback(ListSettings.Rules) end) if not Success then TweenService:Create(ListClone, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = Color3.fromRGB(85, 0, 0)}):Play() TweenService:Create(ListClone.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Transparency = 1}):Play() ListClone.Title.Text = "Callback Error" print("Rayfield | "..ListSettings.Name.." Callback Error " ..tostring(Response)) wait(0.5) ListClone.Title.Text = ListSettings.Name TweenService:Create(ListClone, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play() TweenService:Create(ListClone.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Transparency = 0}):Play() end DropdownOption:Destroy() SaveConfiguration() end) end end if Settings.ConfigurationSaving then if Settings.ConfigurationSaving.Enabled and ListSettings.Flag then RayfieldLibrary.Flags[ListSettings.Flag] = ListSettings end end return ListSettings end -- Keybind function Tab:CreateKeybind(KeybindSettings) local CheckingForKey = false local Keybind = Elements.Template.Keybind:Clone() Keybind.Name = KeybindSettings.Name Keybind.Title.Text = KeybindSettings.Name Keybind.Visible = true Keybind.Parent = TabPage Keybind.BackgroundTransparency = 1 Keybind.UIStroke.Transparency = 1 Keybind.Title.TextTransparency = 1 Keybind.KeybindFrame.BackgroundColor3 = SelectedTheme.InputBackground Keybind.KeybindFrame.UIStroke.Color = SelectedTheme.InputStroke TweenService:Create(Keybind, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {BackgroundTransparency = 0}):Play() TweenService:Create(Keybind.UIStroke, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {Transparency = 0}):Play() TweenService:Create(Keybind.Title, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {TextTransparency = 0}):Play() Keybind.KeybindFrame.KeybindBox.Text = KeybindSettings.CurrentKeybind Keybind.KeybindFrame.Size = UDim2.new(0, Keybind.KeybindFrame.KeybindBox.TextBounds.X + 24, 0, 30) Keybind.KeybindFrame.KeybindBox.Focused:Connect(function() CheckingForKey = true Keybind.KeybindFrame.KeybindBox.Text = "" end) Keybind.KeybindFrame.KeybindBox.FocusLost:Connect(function() CheckingForKey = false if Keybind.KeybindFrame.KeybindBox.Text == nil or "" then Keybind.KeybindFrame.KeybindBox.Text = KeybindSettings.CurrentKeybind SaveConfiguration() end end) Keybind.MouseEnter:Connect(function() TweenService:Create(Keybind, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play() end) Keybind.MouseLeave:Connect(function() TweenService:Create(Keybind, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play() end) UserInputService.InputBegan:Connect(function(input, processed) if CheckingForKey then if input.KeyCode ~= Enum.KeyCode.Unknown and input.KeyCode ~= Enum.KeyCode.RightShift then local SplitMessage = string.split(tostring(input.KeyCode), ".") local NewKeyNoEnum = SplitMessage[3] Keybind.KeybindFrame.KeybindBox.Text = tostring(NewKeyNoEnum) KeybindSettings.CurrentKeybind = tostring(NewKeyNoEnum) Keybind.KeybindFrame.KeybindBox:ReleaseFocus() SaveConfiguration() end elseif KeybindSettings.CurrentKeybind ~= nil and (input.KeyCode == Enum.KeyCode[KeybindSettings.CurrentKeybind] and not processed) then -- Test local Held = true local Connection Connection = input.Changed:Connect(function(prop) if prop == "UserInputState" then Connection:Disconnect() Held = false end end) if not KeybindSettings.HoldToInteract then local Success, Response = pcall(KeybindSettings.Callback) if not Success then TweenService:Create(Keybind, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = Color3.fromRGB(85, 0, 0)}):Play() TweenService:Create(Keybind.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Transparency = 1}):Play() Keybind.Title.Text = "Callback Error" print("Rayfield | "..KeybindSettings.Name.." Callback Error " ..tostring(Response)) wait(0.5) Keybind.Title.Text = KeybindSettings.Name TweenService:Create(Keybind, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play() TweenService:Create(Keybind.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Transparency = 0}):Play() end else wait(0.25) if Held then local Loop; Loop = RunService.Stepped:Connect(function() if not Held then KeybindSettings.Callback(false) -- maybe pcall this Loop:Disconnect() else KeybindSettings.Callback(true) -- maybe pcall this end end) end end end end) Keybind.KeybindFrame.KeybindBox:GetPropertyChangedSignal("Text"):Connect(function() TweenService:Create(Keybind.KeybindFrame, TweenInfo.new(0.55, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {Size = UDim2.new(0, Keybind.KeybindFrame.KeybindBox.TextBounds.X + 24, 0, 30)}):Play() end) function KeybindSettings:Set(NewKeybind) Keybind.KeybindFrame.KeybindBox.Text = tostring(NewKeybind) KeybindSettings.CurrentKeybind = tostring(NewKeybind) Keybind.KeybindFrame.KeybindBox:ReleaseFocus() SaveConfiguration() end if Settings.ConfigurationSaving then if Settings.ConfigurationSaving.Enabled and KeybindSettings.Flag then RayfieldLibrary.Flags[KeybindSettings.Flag] = KeybindSettings end end return KeybindSettings end -- Toggle function Tab:CreateToggle(ToggleSettings) local ToggleValue = {} local Toggle = Elements.Template.Toggle:Clone() Toggle.Name = ToggleSettings.Name Toggle.Title.Text = ToggleSettings.Name Toggle.Visible = true Toggle.Parent = TabPage Toggle.BackgroundTransparency = 1 Toggle.UIStroke.Transparency = 1 Toggle.Title.TextTransparency = 1 Toggle.Switch.BackgroundColor3 = SelectedTheme.ToggleBackground if SelectedTheme ~= RayfieldLibrary.Theme.Default then Toggle.Switch.Shadow.Visible = false end TweenService:Create(Toggle, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {BackgroundTransparency = 0}):Play() TweenService:Create(Toggle.UIStroke, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {Transparency = 0}):Play() TweenService:Create(Toggle.Title, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {TextTransparency = 0}):Play() if not ToggleSettings.CurrentValue then Toggle.Switch.Indicator.Position = UDim2.new(1, -40, 0.5, 0) Toggle.Switch.Indicator.UIStroke.Color = SelectedTheme.ToggleDisabledStroke Toggle.Switch.Indicator.BackgroundColor3 = SelectedTheme.ToggleDisabled Toggle.Switch.UIStroke.Color = SelectedTheme.ToggleDisabledOuterStroke else Toggle.Switch.Indicator.Position = UDim2.new(1, -20, 0.5, 0) Toggle.Switch.Indicator.UIStroke.Color = SelectedTheme.ToggleEnabledStroke Toggle.Switch.Indicator.BackgroundColor3 = SelectedTheme.ToggleEnabled Toggle.Switch.UIStroke.Color = SelectedTheme.ToggleEnabledOuterStroke end Toggle.MouseEnter:Connect(function() TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play() end) Toggle.MouseLeave:Connect(function() TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play() end) local Success, Response = pcall(function() ToggleSettings.Callback(ToggleSettings.CurrentValue) end) Toggle.Interact.MouseButton1Click:Connect(function() if ToggleSettings.CurrentValue then ToggleSettings.CurrentValue = false TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play() TweenService:Create(Toggle.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Transparency = 1}):Play() TweenService:Create(Toggle.Switch.Indicator, TweenInfo.new(0.45, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Position = UDim2.new(1, -40, 0.5, 0)}):Play() TweenService:Create(Toggle.Switch.Indicator, TweenInfo.new(0.4, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Size = UDim2.new(0,12,0,12)}):Play() TweenService:Create(Toggle.Switch.Indicator.UIStroke, TweenInfo.new(0.55, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {Color = SelectedTheme.ToggleDisabledStroke}):Play() TweenService:Create(Toggle.Switch.Indicator, TweenInfo.new(0.8, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundColor3 = SelectedTheme.ToggleDisabled}):Play() TweenService:Create(Toggle.Switch.UIStroke, TweenInfo.new(0.55, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {Color = SelectedTheme.ToggleDisabledOuterStroke}):Play() wait(0.05) TweenService:Create(Toggle.Switch.Indicator, TweenInfo.new(0.4, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Size = UDim2.new(0,17,0,17)}):Play() wait(0.15) TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play() TweenService:Create(Toggle.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Transparency = 0}):Play() else ToggleSettings.CurrentValue = true TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play() TweenService:Create(Toggle.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Transparency = 1}):Play() TweenService:Create(Toggle.Switch.Indicator, TweenInfo.new(0.5, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Position = UDim2.new(1, -20, 0.5, 0)}):Play() TweenService:Create(Toggle.Switch.Indicator, TweenInfo.new(0.4, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Size = UDim2.new(0,12,0,12)}):Play() TweenService:Create(Toggle.Switch.Indicator.UIStroke, TweenInfo.new(0.55, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {Color = SelectedTheme.ToggleEnabledStroke}):Play() TweenService:Create(Toggle.Switch.Indicator, TweenInfo.new(0.8, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundColor3 = SelectedTheme.ToggleEnabled}):Play() TweenService:Create(Toggle.Switch.UIStroke, TweenInfo.new(0.55, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {Color = SelectedTheme.ToggleEnabledOuterStroke}):Play() wait(0.05) TweenService:Create(Toggle.Switch.Indicator, TweenInfo.new(0.45, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Size = UDim2.new(0,17,0,17)}):Play() wait(0.15) TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play() TweenService:Create(Toggle.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Transparency = 0}):Play() end local Success, Response = pcall(function() ToggleSettings.Callback(ToggleSettings.CurrentValue) end) if not Success then TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = Color3.fromRGB(85, 0, 0)}):Play() TweenService:Create(Toggle.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Transparency = 1}):Play() Toggle.Title.Text = "Callback Error" print("Rayfield | "..ToggleSettings.Name.." Callback Error " ..tostring(Response)) wait(0.5) Toggle.Title.Text = ToggleSettings.Name TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play() TweenService:Create(Toggle.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Transparency = 0}):Play() end SaveConfiguration() end) function ToggleSettings:Set(NewToggleValue) if NewToggleValue then ToggleSettings.CurrentValue = true TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play() TweenService:Create(Toggle.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Transparency = 1}):Play() TweenService:Create(Toggle.Switch.Indicator, TweenInfo.new(0.5, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Position = UDim2.new(1, -20, 0.5, 0)}):Play() TweenService:Create(Toggle.Switch.Indicator, TweenInfo.new(0.4, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Size = UDim2.new(0,12,0,12)}):Play() TweenService:Create(Toggle.Switch.Indicator.UIStroke, TweenInfo.new(0.55, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {Color = SelectedTheme.ToggleEnabledStroke}):Play() TweenService:Create(Toggle.Switch.Indicator, TweenInfo.new(0.8, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundColor3 = SelectedTheme.ToggleEnabled}):Play() TweenService:Create(Toggle.Switch.UIStroke, TweenInfo.new(0.55, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {Color = Color3.fromRGB(100,100,100)}):Play() wait(0.05) TweenService:Create(Toggle.Switch.Indicator, TweenInfo.new(0.45, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Size = UDim2.new(0,17,0,17)}):Play() wait(0.15) TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play() TweenService:Create(Toggle.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Transparency = 0}):Play() else ToggleSettings.CurrentValue = false TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play() TweenService:Create(Toggle.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Transparency = 1}):Play() TweenService:Create(Toggle.Switch.Indicator, TweenInfo.new(0.45, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Position = UDim2.new(1, -40, 0.5, 0)}):Play() TweenService:Create(Toggle.Switch.Indicator, TweenInfo.new(0.4, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Size = UDim2.new(0,12,0,12)}):Play() TweenService:Create(Toggle.Switch.Indicator.UIStroke, TweenInfo.new(0.55, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {Color = SelectedTheme.ToggleDisabledStroke}):Play() TweenService:Create(Toggle.Switch.Indicator, TweenInfo.new(0.8, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {BackgroundColor3 = SelectedTheme.ToggleDisabled}):Play() TweenService:Create(Toggle.Switch.UIStroke, TweenInfo.new(0.55, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {Color = Color3.fromRGB(65,65,65)}):Play() wait(0.05) TweenService:Create(Toggle.Switch.Indicator, TweenInfo.new(0.4, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Size = UDim2.new(0,17,0,17)}):Play() wait(0.15) TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play() TweenService:Create(Toggle.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Transparency = 0}):Play() end local Success, Response = pcall(function() ToggleSettings.Callback(ToggleSettings.CurrentValue) end) if not Success then TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = Color3.fromRGB(85, 0, 0)}):Play() TweenService:Create(Toggle.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Transparency = 1}):Play() Toggle.Title.Text = "Callback Error" print("Rayfield | "..ToggleSettings.Name.." Callback Error " ..tostring(Response)) wait(0.5) Toggle.Title.Text = ToggleSettings.Name TweenService:Create(Toggle, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play() TweenService:Create(Toggle.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Transparency = 0}):Play() end SaveConfiguration() end if Settings.ConfigurationSaving then if Settings.ConfigurationSaving.Enabled and ToggleSettings.Flag then RayfieldLibrary.Flags[ToggleSettings.Flag] = ToggleSettings end end return ToggleSettings end -- Slider function Tab:CreateSlider(SliderSettings) local Dragging = false local Slider = Elements.Template.Slider:Clone() Slider.Name = SliderSettings.Name Slider.Title.Text = SliderSettings.Name Slider.Visible = true Slider.Parent = TabPage Slider.BackgroundTransparency = 1 Slider.UIStroke.Transparency = 1 Slider.Title.TextTransparency = 1 if SelectedTheme ~= RayfieldLibrary.Theme.Default then Slider.Main.Shadow.Visible = false end Slider.Main.BackgroundColor3 = SelectedTheme.SliderBackground Slider.Main.UIStroke.Color = SelectedTheme.SliderStroke Slider.Main.Progress.BackgroundColor3 = SelectedTheme.SliderProgress TweenService:Create(Slider, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {BackgroundTransparency = 0}):Play() TweenService:Create(Slider.UIStroke, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {Transparency = 0}):Play() TweenService:Create(Slider.Title, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {TextTransparency = 0}):Play() 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) if not SliderSettings.Suffix then Slider.Main.Information.Text = tostring(SliderSettings.CurrentValue) else Slider.Main.Information.Text = tostring(SliderSettings.CurrentValue) .. " " .. SliderSettings.Suffix end Slider.MouseEnter:Connect(function() TweenService:Create(Slider, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackgroundHover}):Play() end) Slider.MouseLeave:Connect(function() TweenService:Create(Slider, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play() end) Slider.Main.Interact.InputBegan:Connect(function(Input) if Input.UserInputType == Enum.UserInputType.MouseButton1 then Dragging = true end end) Slider.Main.Interact.InputEnded:Connect(function(Input) if Input.UserInputType == Enum.UserInputType.MouseButton1 then Dragging = false end end) Slider.Main.Interact.MouseButton1Down:Connect(function(X) local Current = Slider.Main.Progress.AbsolutePosition.X + Slider.Main.Progress.AbsoluteSize.X local Start = Current local Location = X local Loop; Loop = RunService.Stepped:Connect(function() if Dragging then Location = UserInputService:GetMouseLocation().X Current = Current + 0.025 * (Location - Start) if Location < Slider.Main.AbsolutePosition.X then Location = Slider.Main.AbsolutePosition.X elseif Location > Slider.Main.AbsolutePosition.X + Slider.Main.AbsoluteSize.X then Location = Slider.Main.AbsolutePosition.X + Slider.Main.AbsoluteSize.X end if Current < Slider.Main.AbsolutePosition.X + 5 then Current = Slider.Main.AbsolutePosition.X + 5 elseif Current > Slider.Main.AbsolutePosition.X + Slider.Main.AbsoluteSize.X then Current = Slider.Main.AbsolutePosition.X + Slider.Main.AbsoluteSize.X end if Current <= Location and (Location - Start) < 0 then Start = Location elseif Current >= Location and (Location - Start) > 0 then Start = Location end TweenService:Create(Slider.Main.Progress, TweenInfo.new(0.45, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {Size = UDim2.new(0, Current - Slider.Main.AbsolutePosition.X, 1, 0)}):Play() local NewValue = SliderSettings.Range[1] + (Location - Slider.Main.AbsolutePosition.X) / Slider.Main.AbsoluteSize.X * (SliderSettings.Range[2] - SliderSettings.Range[1]) NewValue = math.floor(NewValue / SliderSettings.Increment + 0.5) * (SliderSettings.Increment * 10000000) / 10000000 if not SliderSettings.Suffix then Slider.Main.Information.Text = tostring(NewValue) else Slider.Main.Information.Text = tostring(NewValue) .. " " .. SliderSettings.Suffix end if SliderSettings.CurrentValue ~= NewValue then local Success, Response = pcall(function() SliderSettings.Callback(NewValue) end) if not Success then TweenService:Create(Slider, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = Color3.fromRGB(85, 0, 0)}):Play() TweenService:Create(Slider.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Transparency = 1}):Play() Slider.Title.Text = "Callback Error" print("Rayfield | "..SliderSettings.Name.." Callback Error " ..tostring(Response)) wait(0.5) Slider.Title.Text = SliderSettings.Name TweenService:Create(Slider, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play() TweenService:Create(Slider.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Transparency = 0}):Play() end SliderSettings.CurrentValue = NewValue SaveConfiguration() end else TweenService:Create(Slider.Main.Progress, TweenInfo.new(0.3, Enum.EasingStyle.Quint, Enum.EasingDirection.Out), {Size = UDim2.new(0, Location - Slider.Main.AbsolutePosition.X > 5 and Location - Slider.Main.AbsolutePosition.X or 5, 1, 0)}):Play() Loop:Disconnect() end end) end) function SliderSettings:Set(NewVal) TweenService:Create(Slider.Main.Progress, TweenInfo.new(0.45, Enum.EasingStyle.Quint, 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() Slider.Main.Information.Text = tostring(NewVal) .. " " .. SliderSettings.Suffix local Success, Response = pcall(function() SliderSettings.Callback(NewVal) end) if not Success then TweenService:Create(Slider, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = Color3.fromRGB(85, 0, 0)}):Play() TweenService:Create(Slider.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Transparency = 1}):Play() Slider.Title.Text = "Callback Error" print("Rayfield | "..SliderSettings.Name.." Callback Error " ..tostring(Response)) wait(0.5) Slider.Title.Text = SliderSettings.Name TweenService:Create(Slider, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {BackgroundColor3 = SelectedTheme.ElementBackground}):Play() TweenService:Create(Slider.UIStroke, TweenInfo.new(0.6, Enum.EasingStyle.Quint), {Transparency = 0}):Play() end SliderSettings.CurrentValue = NewVal SaveConfiguration() end if Settings.ConfigurationSaving then if Settings.ConfigurationSaving.Enabled and SliderSettings.Flag then RayfieldLibrary.Flags[SliderSettings.Flag] = SliderSettings end end return SliderSettings end return Tab end Elements.Visible = true wait(1.2) TweenService:Create(LoadingFrame.Title, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {TextTransparency = 1}):Play() TweenService:Create(LoadingFrame.Thumbnail, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {ImageTransparency = 1}):Play() TweenService:Create(LoadingFrame.Shadow, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {ImageTransparency = 1}):Play() TweenService:Create(LoadingFrame.Version, TweenInfo.new(0.5, Enum.EasingStyle.Quint), {TextTransparency = 1}):Play() wait(0.2) TweenService:Create(Main, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {Size = UDim2.new(0, 500, 0, 475)}):Play() TweenService:Create(Main.Shadow.Image, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {ImageTransparency = 0.4}):Play() Topbar.BackgroundTransparency = 1 Topbar.Divider.Size = UDim2.new(0, 0, 0, 1) Topbar.CornerRepair.BackgroundTransparency = 1 Topbar.Title.TextTransparency = 1 Topbar.Theme.ImageTransparency = 1 Topbar.ChangeSize.ImageTransparency = 1 Topbar.Hide.ImageTransparency = 1 wait(0.8) Topbar.Visible = true TweenService:Create(Topbar, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {BackgroundTransparency = 0}):Play() TweenService:Create(Topbar.CornerRepair, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {BackgroundTransparency = 0}):Play() wait(0.1) TweenService:Create(Topbar.Divider, TweenInfo.new(1, Enum.EasingStyle.Quint), {Size = UDim2.new(1, 0, 0, 1)}):Play() wait(0.1) TweenService:Create(Topbar.Title, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {TextTransparency = 0}):Play() wait(0.1) TweenService:Create(Topbar.Theme, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {ImageTransparency = 0.8}):Play() wait(0.1) TweenService:Create(Topbar.ChangeSize, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {ImageTransparency = 0.8}):Play() wait(0.1) TweenService:Create(Topbar.Hide, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {ImageTransparency = 0.8}):Play() wait(0.3) return Window end function RayfieldLibrary:Destroy() Rayfield:Destroy() end Topbar.ChangeSize.MouseButton1Click:Connect(function() if Debounce then return end if Minimised then Minimised = false Maximise() else Minimised = true Minimise() end end) Topbar.Hide.MouseButton1Click:Connect(function() if Debounce then return end if Hidden then Hidden = false Minimised = false Unhide() else Hidden = true Hide() end end) UserInputService.InputBegan:Connect(function(input, processed) if (input.KeyCode == Enum.KeyCode.RightShift and not processed) then if Debounce then return end if Hidden then Hidden = false Unhide() else Hidden = true Hide() end end end) for _, TopbarButton in ipairs(Topbar:GetChildren()) do if TopbarButton.ClassName == "ImageButton" then TopbarButton.MouseEnter:Connect(function() TweenService:Create(TopbarButton, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {ImageTransparency = 0}):Play() end) TopbarButton.MouseLeave:Connect(function() TweenService:Create(TopbarButton, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {ImageTransparency = 0.8}):Play() end) TopbarButton.MouseButton1Click:Connect(function() TweenService:Create(TopbarButton, TweenInfo.new(0.7, Enum.EasingStyle.Quint), {ImageTransparency = 0.8}):Play() end) end end function RayfieldLibrary:LoadConfiguration() if CEnabled then pcall(function() if isfile(ConfigurationFolder .. "/" .. CFileName .. ConfigurationExtension) then LoadConfiguration(readfile(ConfigurationFolder .. "/" .. CFileName .. ConfigurationExtension)) RayfieldLibrary:Notify({Title = "Configuration Loaded", Content = "The configuration file for this script has been loaded from a previous session"}) end end) end end return RayfieldLibrary
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement