Jelasion

Untitled

May 15th, 2020
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 29.15 KB | None | 0 0
  1. local KeylimeLibrary = {}
  2. local xThing = 0
  3. local yThing = 0.044822257
  4.  
  5. local TweenService = game:GetService("TweenService")
  6. local RunService = game:GetService("RunService")
  7. local UserInputService = game:GetService("UserInputService")
  8. local Players = game:GetService("Players")
  9. local LocalPlayer = Players.LocalPlayer
  10. local Mouse = LocalPlayer:GetMouse()
  11.  
  12. local function CreateBaseObject(Class)
  13. if Class == "Button" then
  14. local Button = Instance.new("TextButton")
  15. local Roundify = Instance.new("ImageLabel")
  16.  
  17. Button.Name = Class
  18. Button.BackgroundColor3 = Color3.fromRGB(74, 74, 74)
  19. Button.BackgroundTransparency = 1.000
  20. Button.BorderSizePixel = 0
  21. Button.Position = UDim2.new(0, 0, 0.129380047, 0)
  22. Button.Size = UDim2.new(1, 0, 0, 30)
  23. Button.ZIndex = 2
  24. Button.Font = Enum.Font.GothamSemibold
  25. Button.TextColor3 = Color3.fromRGB(255, 255, 255)
  26. Button.TextSize = 14.000
  27.  
  28. Roundify.Name = "Roundify"
  29. Roundify.Parent = Button
  30. Roundify.Active = true
  31. Roundify.AnchorPoint = Vector2.new(0.5, 0.5)
  32. Roundify.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  33. Roundify.BackgroundTransparency = 1.000
  34. Roundify.Position = UDim2.new(0.5, 0, 0.5, 0)
  35. Roundify.Selectable = true
  36. Roundify.Size = UDim2.new(1, 0, 1, 0)
  37. Roundify.Image = "rbxassetid://3570695787"
  38. Roundify.ImageColor3 = Color3.fromRGB(74, 74, 74)
  39. Roundify.ScaleType = Enum.ScaleType.Slice
  40. Roundify.SliceCenter = Rect.new(100, 100, 100, 100)
  41. Roundify.SliceScale = 0.060
  42.  
  43. return Button
  44. elseif Class == "TextBox" then
  45. local TextBox = Instance.new("TextBox")
  46. local Roundify = Instance.new("ImageLabel")
  47.  
  48. TextBox.BackgroundColor3 = Color3.fromRGB(74, 74, 74)
  49. TextBox.BackgroundTransparency = 1.000
  50. TextBox.BorderSizePixel = 0
  51. TextBox.Size = UDim2.new(1, 0, 0, 30)
  52. TextBox.ZIndex = 2
  53. TextBox.Font = Enum.Font.GothamSemibold
  54. TextBox.PlaceholderText = "Text"
  55. TextBox.Text = ""
  56. TextBox.TextColor3 = Color3.fromRGB(255, 255, 255)
  57. TextBox.TextSize = 14.000
  58.  
  59. Roundify.Name = "Roundify"
  60. Roundify.Parent = TextBox
  61. Roundify.Active = true
  62. Roundify.AnchorPoint = Vector2.new(0.5, 0.5)
  63. Roundify.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  64. Roundify.BackgroundTransparency = 1.000
  65. Roundify.Position = UDim2.new(0.5, 0, 0.5, 0)
  66. Roundify.Selectable = true
  67. Roundify.Size = UDim2.new(1, 0, 1, 0)
  68. Roundify.Image = "rbxassetid://3570695787"
  69. Roundify.ImageColor3 = Color3.fromRGB(74, 74, 74)
  70. Roundify.ScaleType = Enum.ScaleType.Slice
  71. Roundify.SliceCenter = Rect.new(100, 100, 100, 100)
  72. Roundify.SliceScale = 0.060
  73.  
  74. return TextBox
  75. elseif Class == "Toggle" then
  76. local Toggle = Instance.new("TextButton")
  77. local Title = Instance.new("TextLabel")
  78. local Frame = Instance.new("ImageLabel")
  79. local Checkmark = Instance.new("TextLabel")
  80.  
  81. Toggle.Name = "Toggle"
  82. Toggle.BackgroundColor3 = Color3.fromRGB(74, 74, 74)
  83. Toggle.BackgroundTransparency = 1.000
  84. Toggle.BorderSizePixel = 0
  85. Toggle.Position = UDim2.new(0, 0, 0.129380047, 0)
  86. Toggle.Size = UDim2.new(1, 0, 0, 30)
  87. Toggle.ZIndex = 2
  88. Toggle.Font = Enum.Font.GothamSemibold
  89. Toggle.Text = ""
  90. Toggle.TextColor3 = Color3.fromRGB(255, 255, 255)
  91. Toggle.TextSize = 14.000
  92.  
  93. Title.Name = "Title"
  94. Title.Parent = Toggle
  95. Title.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  96. Title.BackgroundTransparency = 1.000
  97. Title.Position = UDim2.new(0, 8, 0, 0)
  98. Title.Size = UDim2.new(1, -38, 1, 0)
  99. Title.Font = Enum.Font.GothamSemibold
  100. Title.Text = "Toggle"
  101. Title.TextColor3 = Color3.fromRGB(255, 255, 255)
  102. Title.TextSize = 14.000
  103. Title.TextXAlignment = Enum.TextXAlignment.Left
  104.  
  105. Frame.Name = "Frame"
  106. Frame.Parent = Toggle
  107. Frame.AnchorPoint = Vector2.new(1, 0)
  108. Frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  109. Frame.BackgroundTransparency = 1.000
  110. Frame.Position = UDim2.new(1, 0, 0, 0)
  111. Frame.Size = UDim2.new(0, 30, 0, 30)
  112. Frame.Image = "rbxassetid://3570695787"
  113. Frame.ImageColor3 = Color3.fromRGB(74, 74, 74)
  114. Frame.ScaleType = Enum.ScaleType.Slice
  115. Frame.SliceCenter = Rect.new(100, 100, 100, 100)
  116. Frame.SliceScale = 0.060
  117.  
  118. Checkmark.Name = "Checkmark"
  119. Checkmark.Parent = Frame
  120. Checkmark.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  121. Checkmark.BackgroundTransparency = 1.000
  122. Checkmark.Size = UDim2.new(1, 0, 1, 0)
  123. Checkmark.Visible = true
  124. Checkmark.Font = Enum.Font.GothamSemibold
  125. Checkmark.Text = "✓"
  126. Checkmark.TextColor3 = Color3.fromRGB(33, 181, 33)
  127. Checkmark.TextSize = 18.000
  128. Checkmark.ZIndex = 2
  129.  
  130. return Toggle
  131. elseif Class == "Slider" then
  132. local Slider = Instance.new("TextButton")
  133. local Title = Instance.new("TextLabel")
  134. local SliderHolder = Instance.new("ImageLabel")
  135. local Value = Instance.new("TextLabel")
  136. local SliderBar = Instance.new("ImageLabel")
  137.  
  138. Slider.Name = "Slider"
  139. Slider.BackgroundColor3 = Color3.fromRGB(74, 74, 74)
  140. Slider.BackgroundTransparency = 1.000
  141. Slider.BorderSizePixel = 0
  142. Slider.Position = UDim2.new(0, 0, 0.129380047, 0)
  143. Slider.Size = UDim2.new(1, 0, 0, 30)
  144. Slider.ZIndex = 2
  145. Slider.Font = Enum.Font.GothamSemibold
  146. Slider.Text = ""
  147. Slider.TextColor3 = Color3.fromRGB(255, 255, 255)
  148. Slider.TextSize = 14.000
  149.  
  150. Title.Name = "Title"
  151. Title.Parent = Slider
  152. Title.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  153. Title.BackgroundTransparency = 1.000
  154. Title.Position = UDim2.new(0, 8, 0, 0)
  155. Title.Size = UDim2.new(0.5, -8, 1, 0)
  156. Title.Font = Enum.Font.GothamSemibold
  157. Title.Text = "Slider"
  158. Title.TextColor3 = Color3.fromRGB(255, 255, 255)
  159. Title.TextSize = 14.000
  160. Title.TextXAlignment = Enum.TextXAlignment.Left
  161.  
  162. SliderHolder.Name = "SliderHolder"
  163. SliderHolder.Parent = Slider
  164. SliderHolder.AnchorPoint = Vector2.new(1, 0)
  165. SliderHolder.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  166. SliderHolder.BackgroundTransparency = 1.000
  167. SliderHolder.Position = UDim2.new(1, 0, 0, 0)
  168. SliderHolder.Size = UDim2.new(0.5, 0, 0, 30)
  169. SliderHolder.Image = "rbxassetid://3570695787"
  170. SliderHolder.ImageColor3 = Color3.fromRGB(74, 74, 74)
  171. SliderHolder.ScaleType = Enum.ScaleType.Slice
  172. SliderHolder.SliceCenter = Rect.new(100, 100, 100, 100)
  173. SliderHolder.SliceScale = 0.060
  174.  
  175. Value.Name = "Value"
  176. Value.Parent = SliderHolder
  177. Value.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  178. Value.BackgroundTransparency = 1.000
  179. Value.Size = UDim2.new(1, 0, 1, 0)
  180. Value.ZIndex = 3
  181. Value.Font = Enum.Font.Gotham
  182. Value.Text = "50"
  183. Value.TextColor3 = Color3.fromRGB(255, 255, 255)
  184. Value.TextSize = 14.000
  185.  
  186. SliderBar.Name = "SliderBar"
  187. SliderBar.Parent = SliderHolder
  188. SliderBar.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  189. SliderBar.BackgroundTransparency = 1.000
  190. SliderBar.Size = UDim2.new(0.5, 0, 1, 0)
  191. SliderBar.Image = "rbxassetid://3570695787"
  192. SliderBar.ImageColor3 = Color3.fromRGB(74, 74, 74)
  193. SliderBar.ScaleType = Enum.ScaleType.Slice
  194. SliderBar.SliceCenter = Rect.new(100, 100, 100, 100)
  195. SliderBar.SliceScale = 0.060
  196.  
  197. return Slider
  198. elseif Class == "Dropdown" then
  199. local Dropdown = Instance.new("TextButton")
  200. local Title = Instance.new("TextLabel")
  201. local DropdownHolder = Instance.new("ImageLabel")
  202. local Value = Instance.new("TextLabel")
  203. local Minimize = Instance.new("ImageButton")
  204. local DropdownOptions = Instance.new("ImageLabel")
  205. local Content = Instance.new("ScrollingFrame")
  206. local UIListLayout = Instance.new("UIListLayout")
  207. local Button = Instance.new("TextButton")
  208.  
  209. Dropdown.Name = "Dropdown"
  210. Dropdown.BackgroundColor3 = Color3.fromRGB(74, 74, 74)
  211. Dropdown.BackgroundTransparency = 1.000
  212. Dropdown.BorderSizePixel = 0
  213. Dropdown.Position = UDim2.new(0, 0, 0.129380047, 0)
  214. Dropdown.Size = UDim2.new(1, 0, 0, 30)
  215. Dropdown.ZIndex = 5
  216. Dropdown.Font = Enum.Font.GothamSemibold
  217. Dropdown.Text = ""
  218. Dropdown.TextColor3 = Color3.fromRGB(255, 255, 255)
  219. Dropdown.TextSize = 14.000
  220.  
  221. Title.Name = "Title"
  222. Title.Parent = Dropdown
  223. Title.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  224. Title.BackgroundTransparency = 1.000
  225. Title.Position = UDim2.new(0, 8, 0, 0)
  226. Title.Size = UDim2.new(0.5, -8, 1, 0)
  227. Title.Font = Enum.Font.GothamSemibold
  228. Title.Text = "Dropdown"
  229. Title.TextColor3 = Color3.fromRGB(255, 255, 255)
  230. Title.TextSize = 14.000
  231. Title.TextXAlignment = Enum.TextXAlignment.Left
  232. Title.ZIndex = 4
  233.  
  234. DropdownHolder.Name = "DropdownHolder"
  235. DropdownHolder.Parent = Dropdown
  236. DropdownHolder.AnchorPoint = Vector2.new(1, 0)
  237. DropdownHolder.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  238. DropdownHolder.BackgroundTransparency = 1.000
  239. DropdownHolder.Position = UDim2.new(1, 0, 0, 0)
  240. DropdownHolder.Size = UDim2.new(0.5, 0, 0, 30)
  241. DropdownHolder.Image = "rbxassetid://3570695787"
  242. DropdownHolder.ImageColor3 = Color3.fromRGB(74, 74, 74)
  243. DropdownHolder.ScaleType = Enum.ScaleType.Slice
  244. DropdownHolder.SliceCenter = Rect.new(100, 100, 100, 100)
  245. DropdownHolder.SliceScale = 0.060
  246. DropdownHolder.ZIndex = 4
  247.  
  248. Value.Name = "Value"
  249. Value.Parent = DropdownHolder
  250. Value.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  251. Value.BackgroundTransparency = 1.000
  252. Value.Position = UDim2.new(0, 3, 0, 0)
  253. Value.Size = UDim2.new(1, -30, 1, 0)
  254. Value.Font = Enum.Font.Gotham
  255. Value.Text = "Button"
  256. Value.TextColor3 = Color3.fromRGB(255, 255, 255)
  257. Value.TextSize = 14.000
  258. Value.ZIndex = 6
  259.  
  260. Minimize.Name = "Minimize"
  261. Minimize.Parent = DropdownHolder
  262. Minimize.AnchorPoint = Vector2.new(1, 0)
  263. Minimize.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  264. Minimize.BackgroundTransparency = 1.000
  265. Minimize.Position = UDim2.new(1, -3, 0, 3)
  266. Minimize.Size = UDim2.new(0, 24, 0, 24)
  267. Minimize.Image = "rbxassetid://4954699658"
  268. Minimize.ZIndex = 6
  269.  
  270. DropdownOptions.Name = "DropdownOptions"
  271. DropdownOptions.Parent = DropdownHolder
  272. DropdownOptions.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  273. DropdownOptions.BackgroundTransparency = 1.000
  274. DropdownOptions.Size = UDim2.new(1, 0, 0, 30)
  275. DropdownOptions.Image = "rbxassetid://3570695787"
  276. DropdownOptions.ImageColor3 = Color3.fromRGB(74, 74, 74)
  277. DropdownOptions.ScaleType = Enum.ScaleType.Slice
  278. DropdownOptions.SliceCenter = Rect.new(100, 100, 100, 100)
  279. DropdownOptions.SliceScale = 0.060
  280. DropdownOptions.ClipsDescendants = true
  281. DropdownOptions.ZIndex = 4
  282.  
  283. Content.Name = "Content"
  284. Content.Parent = DropdownOptions
  285. Content.Active = true
  286. Content.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  287. Content.BackgroundTransparency = 1.000
  288. Content.BorderSizePixel = 0
  289. Content.Position = UDim2.new(0, 0, 0, 30)
  290. Content.Size = UDim2.new(1, 0, 1, -30)
  291. Content.BottomImage = "rbxassetid://6347925"
  292. Content.CanvasSize = UDim2.new(0, 0, 0, 0)
  293. Content.MidImage = "rbxassetid://6347925"
  294. Content.ScrollBarThickness = 3
  295. Content.TopImage = "rbxassetid://6347925"
  296. Content.ZIndex = 4
  297.  
  298. UIListLayout.Parent = Content
  299. UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  300.  
  301. return Dropdown
  302. elseif Class == "DropdownOption" then
  303. local Button = Instance.new("TextButton")
  304.  
  305. Button.Name = "Button"
  306. Button.BackgroundColor3 = Color3.fromRGB(74, 74, 74)
  307. Button.BackgroundTransparency = 1.000
  308. Button.BorderSizePixel = 0
  309. Button.Position = UDim2.new(0, 0, 0.129380047, 0)
  310. Button.Size = UDim2.new(1, 0, 0, 20)
  311. Button.ZIndex = 5
  312. Button.Font = Enum.Font.Gotham
  313. Button.TextColor3 = Color3.fromRGB(215, 215, 215)
  314. Button.TextSize = 14.000
  315.  
  316. return Button
  317. elseif Class == "Window" then
  318. xThing = xThing + 0.125
  319. if xThing > 0.625 then
  320. xThing = 0.125
  321. yThing = yThing + 0.35
  322. end
  323. local Keylime = Instance.new("ScreenGui")
  324. local MainFrame = Instance.new("ImageLabel")
  325. local Decor = Instance.new("Folder")
  326. local Line = Instance.new("ImageLabel")
  327. local Logo = Instance.new("TextLabel")
  328. local Minimize = Instance.new("ImageButton")
  329. local Content = Instance.new("ScrollingFrame")
  330. local UIListLayout = Instance.new("UIListLayout")
  331. local UIPadding = Instance.new("UIPadding")
  332.  
  333. Keylime.Name = "Keylime"
  334. Keylime.ResetOnSpawn = false
  335.  
  336. if RunService:IsStudio() then
  337. Keylime.Parent = Players.LocalPlayer:WaitForChild("PlayerGui")
  338. else
  339. Keylime.Parent = game:GetService("CoreGui")
  340. end
  341.  
  342. MainFrame.Name = "MainFrame"
  343. MainFrame.Parent = Keylime
  344. MainFrame.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
  345. MainFrame.BackgroundTransparency = 1.000
  346. MainFrame.BorderColor3 = Color3.fromRGB(27, 42, 53)
  347. MainFrame.Position = UDim2.new(xThing, 0, yThing, 0)
  348. MainFrame.Size = UDim2.new(0, 200, 0, 375)
  349. MainFrame.Image = "rbxassetid://3570695787"
  350. MainFrame.ImageColor3 = Color3.fromRGB(35, 35, 35)
  351. MainFrame.ScaleType = Enum.ScaleType.Slice
  352. MainFrame.SliceCenter = Rect.new(100, 100, 100, 100)
  353. MainFrame.SliceScale = 0.120
  354.  
  355. Decor.Name = "Decor"
  356. Decor.Parent = MainFrame
  357.  
  358. Line.Name = "Line"
  359. Line.Parent = Decor
  360. Line.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  361. Line.BorderSizePixel = 0
  362. Line.Position = UDim2.new(0, 0, 0, 30)
  363. Line.Size = UDim2.new(1, 0, 0, 7)
  364. Line.Image = "rbxassetid://2790390993"
  365. Line.ImageColor3 = Color3.fromRGB(33, 181, 33)
  366.  
  367. Logo.Name = "Title"
  368. Logo.Parent = Decor
  369. Logo.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  370. Logo.BackgroundTransparency = 1.000
  371. Logo.BorderSizePixel = 0
  372. Logo.Size = UDim2.new(1, 0, 0, 30)
  373. Logo.Font = Enum.Font.GothamSemibold
  374. Logo.Text = "Keylime Hub"
  375. Logo.TextColor3 = Color3.fromRGB(226, 226, 226)
  376. Logo.TextSize = 14.000
  377.  
  378. Minimize.Name = "Minimize"
  379. Minimize.Parent = MainFrame
  380. Minimize.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  381. Minimize.BackgroundTransparency = 1.000
  382. Minimize.Position = UDim2.new(0, 3, 0, 3)
  383. Minimize.Size = UDim2.new(0, 24, 0, 24)
  384. Minimize.Image = "rbxassetid://4954699658"
  385.  
  386. Content.Name = "Content"
  387. Content.Parent = MainFrame
  388. Content.Active = true
  389. Content.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  390. Content.BackgroundTransparency = 1.000
  391. Content.BorderSizePixel = 0
  392. Content.Position = UDim2.new(0, 0, 0, 37)
  393. Content.Size = UDim2.new(1, 0, 1, -37)
  394. Content.BottomImage = "rbxassetid://6347925"
  395. Content.CanvasSize = UDim2.new(0, 0, 0, 0)
  396. Content.MidImage = "rbxassetid://6347925"
  397. Content.ScrollBarThickness = 3
  398. Content.TopImage = "rbxassetid://6347925"
  399. Content.VerticalScrollBarInset = Enum.ScrollBarInset.None
  400.  
  401. UIListLayout.Parent = Content
  402. UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
  403. UIListLayout.Padding = UDim.new(0, 4)
  404.  
  405. UIPadding.Parent = Content
  406. UIPadding.PaddingLeft = UDim.new(0, 4)
  407. UIPadding.PaddingRight = UDim.new(0, 4)
  408. UIPadding.PaddingTop = UDim.new(0, 4)
  409.  
  410. return Keylime
  411. end
  412. end
  413.  
  414. local function AnimateButton(Object, LinkedObject)
  415. local BaseColor
  416. local Image = false
  417.  
  418. if not LinkedObject then
  419. if Object:IsA("ImageButton") then
  420. BaseColor = Object.ImageColor3
  421. Image = true
  422. else
  423. BaseColor = Object.BackgroundColor3
  424. end
  425.  
  426. Object.MouseEnter:Connect(function()
  427. if Image then
  428. TweenService:Create(Object, TweenInfo.new(0.2), {
  429. ImageColor3 = Color3.new(BaseColor.R * 1.1, BaseColor.G * 1.1, BaseColor.B * 1.1)
  430. }):Play()
  431. else
  432. TweenService:Create(Object, TweenInfo.new(0.2), {
  433. BackgroundColor3 = Color3.new(BaseColor.R * 1.1, BaseColor.G * 1.1, BaseColor.B * 1.1)
  434. }):Play()
  435. end
  436. end)
  437.  
  438. Object.MouseLeave:Connect(function()
  439. if Image then
  440. TweenService:Create(Object, TweenInfo.new(0.2), {
  441. ImageColor3 = BaseColor
  442. }):Play()
  443. else
  444. TweenService:Create(Object, TweenInfo.new(0.2), {
  445. BackgroundColor3 = BaseColor
  446. }):Play()
  447. end
  448. end)
  449.  
  450. Object.MouseButton1Down:Connect(function()
  451. if Image then
  452. TweenService:Create(Object, TweenInfo.new(0.2), {
  453. ImageColor3 = Color3.new(BaseColor.R * 0.8, BaseColor.G * 0.8, BaseColor.B * 0.8)
  454. }):Play()
  455. else
  456. TweenService:Create(Object, TweenInfo.new(0.2), {
  457. BackgroundColor3 = Color3.new(BaseColor.R * 0.8, BaseColor.G * 0.8, BaseColor.B * 0.8)
  458. }):Play()
  459. end
  460. end)
  461.  
  462. Object.MouseButton1Up:Connect(function()
  463. if Image then
  464. TweenService:Create(Object, TweenInfo.new(0.2), {
  465. ImageColor3 = BaseColor
  466. }):Play()
  467. else
  468. TweenService:Create(Object, TweenInfo.new(0.2), {
  469. BackgroundColor3 = BaseColor
  470. }):Play()
  471. end
  472. end)
  473. elseif Object:IsA("TextBox") then
  474. if LinkedObject:IsA("ImageButton") or LinkedObject:IsA("ImageLabel") then
  475. BaseColor = LinkedObject.ImageColor3
  476. Image = true
  477. else
  478. BaseColor = LinkedObject.BackgroundColor3
  479. end
  480.  
  481. local Focused = false
  482.  
  483. Object.MouseEnter:Connect(function()
  484. if not Focused then
  485. if Image then
  486. TweenService:Create(LinkedObject, TweenInfo.new(0.2), {
  487. ImageColor3 = Color3.new(BaseColor.R * 1.1, BaseColor.G * 1.1, BaseColor.B * 1.1)
  488. }):Play()
  489. else
  490. TweenService:Create(LinkedObject, TweenInfo.new(0.2), {
  491. BackgroundColor3 = Color3.new(BaseColor.R * 1.1, BaseColor.G * 1.1, BaseColor.B * 1.1)
  492. }):Play()
  493. end
  494. end
  495. end)
  496.  
  497. Object.MouseLeave:Connect(function()
  498. if Focused then
  499. if Image then
  500. TweenService:Create(LinkedObject, TweenInfo.new(0.2), {
  501. ImageColor3 = BaseColor
  502. }):Play()
  503. else
  504. TweenService:Create(LinkedObject, TweenInfo.new(0.2), {
  505. BackgroundColor3 = BaseColor
  506. }):Play()
  507. end
  508. end
  509. end)
  510.  
  511. Object.Focused:Connect(function()
  512. Focused = true
  513.  
  514. if Image then
  515. TweenService:Create(LinkedObject, TweenInfo.new(0.2), {
  516. ImageColor3 = Color3.new(BaseColor.R * 0.8, BaseColor.G * 0.8, BaseColor.B * 0.8)
  517. }):Play()
  518. else
  519. TweenService:Create(LinkedObject, TweenInfo.new(0.2), {
  520. BackgroundColor3 = Color3.new(BaseColor.R * 0.8, BaseColor.G * 0.8, BaseColor.B * 0.8)
  521. }):Play()
  522. end
  523. end)
  524.  
  525. Object.FocusLost:Connect(function()
  526. Focused = false
  527.  
  528. if Image then
  529. TweenService:Create(LinkedObject, TweenInfo.new(0.2), {
  530. ImageColor3 = BaseColor
  531. }):Play()
  532. else
  533. TweenService:Create(LinkedObject, TweenInfo.new(0.2), {
  534. BackgroundColor3 = BaseColor
  535. }):Play()
  536. end
  537. end)
  538. else
  539. if LinkedObject:IsA("ImageButton") or LinkedObject:IsA("ImageLabel") then
  540. BaseColor = LinkedObject.ImageColor3
  541. Image = true
  542. else
  543. BaseColor = LinkedObject.BackgroundColor3
  544. end
  545.  
  546. Object.MouseEnter:Connect(function()
  547. if Image then
  548. TweenService:Create(LinkedObject, TweenInfo.new(0.2), {
  549. ImageColor3 = Color3.new(BaseColor.R * 1.1, BaseColor.G * 1.1, BaseColor.B * 1.1)
  550. }):Play()
  551. else
  552. TweenService:Create(LinkedObject, TweenInfo.new(0.2), {
  553. BackgroundColor3 = Color3.new(BaseColor.R * 1.1, BaseColor.G * 1.1, BaseColor.B * 1.1)
  554. }):Play()
  555. end
  556. end)
  557.  
  558. Object.MouseLeave:Connect(function()
  559. if Image then
  560. TweenService:Create(LinkedObject, TweenInfo.new(0.2), {
  561. ImageColor3 = BaseColor
  562. }):Play()
  563. else
  564. TweenService:Create(LinkedObject, TweenInfo.new(0.2), {
  565. BackgroundColor3 = BaseColor
  566. }):Play()
  567. end
  568. end)
  569.  
  570. Object.MouseButton1Down:Connect(function()
  571. if Image then
  572. TweenService:Create(LinkedObject, TweenInfo.new(0.2), {
  573. ImageColor3 = Color3.new(BaseColor.R * 0.8, BaseColor.G * 0.8, BaseColor.B * 0.8)
  574. }):Play()
  575. else
  576. TweenService:Create(LinkedObject, TweenInfo.new(0.2), {
  577. BackgroundColor3 = Color3.new(BaseColor.R * 0.8, BaseColor.G * 0.8, BaseColor.B * 0.8)
  578. }):Play()
  579. end
  580. end)
  581.  
  582. Object.MouseButton1Up:Connect(function()
  583. if Image then
  584. TweenService:Create(LinkedObject, TweenInfo.new(0.2), {
  585. ImageColor3 = BaseColor
  586. }):Play()
  587. else
  588. TweenService:Create(LinkedObject, TweenInfo.new(0.2), {
  589. BackgroundColor3 = BaseColor
  590. }):Play()
  591. end
  592. end)
  593. end
  594. end
  595.  
  596. function KeylimeLibrary.new(Title)
  597. if not Title then Title = "Keylime Hub" end
  598.  
  599. local Keylime = {}
  600.  
  601. Keylime.Frame = CreateBaseObject("Window")
  602. Keylime.Opened = true
  603.  
  604. local KeylimeMainFrame = Keylime.Frame.MainFrame
  605. local CanDrag = false
  606. local Dragging = false
  607. local MouseOffset
  608.  
  609. AnimateButton(KeylimeMainFrame.Minimize)
  610. KeylimeMainFrame.Decor.Title.Text = Title
  611. KeylimeMainFrame.ClipsDescendants = true
  612.  
  613. KeylimeMainFrame.Minimize.MouseButton1Down:Connect(function()
  614. Keylime.Opened = not Keylime.Opened
  615.  
  616. if Keylime.Opened then
  617. KeylimeMainFrame:TweenSize(UDim2.new(0, 200, 0, math.clamp(KeylimeMainFrame.Content.UIListLayout.AbsoluteContentSize.Y + 45, 0, 350)), "Out", "Sine", 0.3, true)
  618. TweenService:Create(KeylimeMainFrame.Minimize, TweenInfo.new(0.3), {Rotation = 0}):Play()
  619. else
  620. KeylimeMainFrame:TweenSize(UDim2.new(0, 200, 0, 37), "Out", "Sine", 0.3, true)
  621. TweenService:Create(KeylimeMainFrame.Minimize, TweenInfo.new(0.3), {Rotation = 180}):Play()
  622. end
  623. end)
  624.  
  625. KeylimeMainFrame.Decor.Title.MouseEnter:Connect(function()
  626. CanDrag = true
  627. end)
  628.  
  629. KeylimeMainFrame.Decor.Title.MouseLeave:Connect(function()
  630. CanDrag = false
  631. end)
  632.  
  633. local function DragLoop()
  634. while MouseOffset and Dragging do
  635. wait()
  636. KeylimeMainFrame:TweenPosition(UDim2.new(0, Mouse.X - MouseOffset.X, 0, Mouse.Y - MouseOffset.Y), "Out", "Sine", 0.1, true)
  637. end
  638.  
  639. KeylimeMainFrame:TweenPosition(UDim2.new(0, Mouse.X - MouseOffset.X, 0, Mouse.Y - MouseOffset.Y), "Out", "Sine", 0.1, true)
  640. MouseOffset = nil
  641. end
  642.  
  643. UserInputService.InputBegan:Connect(function(Input)
  644. if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  645. if CanDrag then
  646. MouseOffset = {X = Mouse.X - KeylimeMainFrame.AbsolutePosition.X, Y = Mouse.Y - KeylimeMainFrame.AbsolutePosition.Y}
  647. Dragging = true
  648. DragLoop()
  649. end
  650. end
  651. end)
  652.  
  653. UserInputService.InputEnded:Connect(function(Input)
  654. if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  655. if Dragging then
  656. Dragging = false
  657. end
  658. end
  659. end)
  660.  
  661. KeylimeMainFrame.Content.UIListLayout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function()
  662. KeylimeMainFrame.Size = UDim2.new(0, 200, 0, math.clamp(KeylimeMainFrame.Content.UIListLayout.AbsoluteContentSize.Y + 45, 0, 350))
  663. KeylimeMainFrame.Content.CanvasSize = UDim2.new(0, 0, 0, KeylimeMainFrame.Content.UIListLayout.AbsoluteContentSize.Y + 4)
  664. end)
  665.  
  666. function Keylime:Create(Class, Title, Callback, Metadata)
  667. if string.lower(Class) == "button" then
  668. local Button = CreateBaseObject("Button")
  669.  
  670. AnimateButton(Button, Button.Roundify)
  671. Button.Text = Title or "Button"
  672. Button.Parent = KeylimeMainFrame.Content
  673.  
  674. if Callback then
  675. Button.MouseButton1Click:Connect(function()
  676. pcall(Callback)
  677. end)
  678. end
  679. elseif string.lower(Class) == "toggle" then
  680. local Data = {}
  681.  
  682. Data.Value = false
  683.  
  684. if Metadata and Metadata.Default then
  685. Data.Value = Metadata.Default
  686. end
  687.  
  688. local Toggle = CreateBaseObject("Toggle")
  689.  
  690. AnimateButton(Toggle, Toggle.Frame)
  691. Toggle.Frame.Checkmark.TextTransparency = Data.Value and 0 or 1
  692. Toggle.Title.Text = Title or "Toggle"
  693. Toggle.Parent = KeylimeMainFrame.Content
  694.  
  695. Toggle.MouseButton1Click:Connect(function()
  696. Data.Value = not Data.Value
  697. TweenService:Create(Toggle.Frame.Checkmark, TweenInfo.new(0.2), {TextTransparency = Data.Value and 0 or 1}):Play()
  698.  
  699. if Callback then
  700. pcall(Callback, Data.Value)
  701. end
  702. end)
  703. elseif string.lower(Class) == "slider" then
  704. local Data = {}
  705.  
  706. Data.Value = 0
  707. Data.MinValue = 0
  708. Data.MaxValue = 1
  709.  
  710. if Metadata then
  711. if Metadata.Default then
  712. Data.Value = Metadata.Default
  713. end
  714.  
  715. if Metadata.MinValue then
  716. Data.MinValue = Metadata.MinValue
  717. end
  718.  
  719. if Metadata.MaxValue then
  720. Data.MaxValue = Metadata.MaxValue
  721. end
  722. end
  723.  
  724. local Slider = CreateBaseObject("Slider")
  725.  
  726. AnimateButton(Slider, Slider.SliderHolder)
  727. Slider.Title.Text = Title or "Slider"
  728. Slider.SliderHolder.Value.Text = math.clamp(Data.Value, Data.MinValue, Data.MaxValue)
  729. Slider.SliderHolder.SliderBar.Size = UDim2.new(math.clamp(Data.Value / Data.MaxValue, 0, 1), 0, 1, 0)
  730. Slider.Parent = KeylimeMainFrame.Content
  731.  
  732. local CurrentAnchor
  733. local Break = false
  734.  
  735. local function MouseLoop()
  736. local Difference = 0
  737.  
  738. while CurrentAnchor do
  739. wait()
  740. if Break == true then Break = false break end
  741. Difference = (Mouse.X - CurrentAnchor) / Slider.SliderHolder.AbsoluteSize.X
  742. Slider.SliderHolder.Value.Text = math.floor(math.clamp(Data.Value + (Difference * Slider.SliderHolder.AbsoluteSize.X), Data.MinValue, Data.MaxValue))
  743. Slider.SliderHolder.SliderBar.Size = UDim2.new((math.clamp((Data.Value + (Difference * Slider.SliderHolder.AbsoluteSize.X)) / Data.MaxValue, 0, 1)), 0, 1, 0)
  744. end
  745.  
  746. Data.Value = math.clamp(Data.Value + (Difference * Slider.SliderHolder.AbsoluteSize.X), Data.MinValue, Data.MaxValue)
  747. end
  748.  
  749. Slider.MouseButton1Down:Connect(function()
  750. Break = false
  751. CurrentAnchor = Mouse.X
  752. MouseLoop()
  753. end)
  754.  
  755. UserInputService.InputEnded:Connect(function(Input)
  756. if Input.UserInputType == Enum.UserInputType.MouseButton1 then
  757. if not Break and CurrentAnchor then
  758. CurrentAnchor = nil
  759. Break = true
  760.  
  761. if Callback then
  762. wait() wait()
  763. pcall(Callback, Data.Value)
  764. end
  765. end
  766. end
  767. end)
  768.  
  769. Mouse.Button1Up:Connect(function()
  770. if not Break and CurrentAnchor then
  771. CurrentAnchor = nil
  772. Break = true
  773.  
  774. if Callback then
  775. wait() wait()
  776. pcall(Callback, Data.Value)
  777. end
  778. end
  779. end)
  780. elseif string.lower(Class) == "textbox" then
  781. local Data = {}
  782.  
  783. Data.Value = ""
  784.  
  785. if Metadata then
  786. if Metadata.Default then
  787. Data.Value = Metadata.Default
  788. end
  789. end
  790.  
  791. local TextBox = CreateBaseObject("TextBox")
  792.  
  793. AnimateButton(TextBox, TextBox.Roundify)
  794. TextBox.PlaceholderText = Title
  795. TextBox.Text = Data.Value
  796. TextBox.Parent = KeylimeMainFrame.Content
  797.  
  798. TextBox.FocusLost:Connect(function()
  799. Data.Value = TextBox.Text
  800. pcall(Callback, Data.Value)
  801. end)
  802. elseif string.lower(Class) == "dropdown" then
  803. local Data = {}
  804.  
  805. Data.Value = ""
  806. Data.Options = {}
  807.  
  808. if Metadata then
  809. if Metadata.Default then
  810. Data.Value = Metadata.Default
  811. end
  812.  
  813. if Metadata.Options and type(Metadata.Options) == "table" then
  814. Data.Options = Metadata.Options
  815. end
  816. end
  817.  
  818. local Dropped = false
  819. local Dropdown = CreateBaseObject("Dropdown")
  820.  
  821. AnimateButton(Dropdown, Dropdown.DropdownHolder.DropdownOptions)
  822.  
  823. Dropdown.Title.Text = Title
  824. Dropdown.DropdownHolder.Value.Text = Data.Value
  825.  
  826. local function AnimateDropdown(Status)
  827. if Status then
  828. local DropdownOptions = Dropdown.DropdownHolder.DropdownOptions
  829.  
  830. TweenService:Create(Dropdown.DropdownHolder.Minimize, TweenInfo.new(0.3), {Rotation = 180}):Play()
  831. DropdownOptions:TweenSize(UDim2.new(1,0,0,math.clamp(DropdownOptions.Content.UIListLayout.AbsoluteContentSize.Y + 30, 0, 150)), "Out", "Sine", 0.15, true)
  832. else
  833. local DropdownOptions = Dropdown.DropdownHolder.DropdownOptions
  834.  
  835. TweenService:Create(Dropdown.DropdownHolder.Minimize, TweenInfo.new(0.3), {Rotation = 0}):Play()
  836. DropdownOptions:TweenSize(UDim2.new(1,0,0,math.clamp(30, 0, 150)), "Out", "Sine", 0.15, true)
  837. end
  838. end
  839.  
  840. for _, Option in next, Data.Options do
  841. local DropdownOption = CreateBaseObject("DropdownOption")
  842.  
  843. DropdownOption.Text = tostring(Option)
  844. DropdownOption.Parent = Dropdown.DropdownHolder.DropdownOptions.Content
  845.  
  846. local BaseColor = DropdownOption.TextColor3
  847.  
  848. DropdownOption.MouseEnter:Connect(function()
  849. TweenService:Create(DropdownOption, TweenInfo.new(0.2), {
  850. TextColor3 = Color3.new(BaseColor.R * 1.1, BaseColor.G * 1.1, BaseColor.B * 1.1)
  851. }):Play()
  852. end)
  853.  
  854. DropdownOption.MouseLeave:Connect(function()
  855. TweenService:Create(DropdownOption, TweenInfo.new(0.2), {
  856. TextColor3 = BaseColor
  857. }):Play()
  858. end)
  859.  
  860. DropdownOption.MouseButton1Down:Connect(function()
  861. TweenService:Create(DropdownOption, TweenInfo.new(0.2), {
  862. TextColor3 = Color3.new(BaseColor.R * 0.8, BaseColor.G * 0.8, BaseColor.B * 0.8)
  863. }):Play()
  864. end)
  865.  
  866. DropdownOption.MouseButton1Up:Connect(function()
  867. TweenService:Create(DropdownOption, TweenInfo.new(0.2), {
  868. TextColor3 = BaseColor
  869. }):Play()
  870. end)
  871.  
  872. DropdownOption.MouseButton1Click:Connect(function()
  873. if Dropped then
  874. Dropped = false
  875. Data.Value = Option
  876. Dropdown.DropdownHolder.Value.Text = Data.Value
  877. AnimateDropdown(false)
  878.  
  879. if Callback then
  880. pcall(Callback, Data.Value)
  881. end
  882. end
  883. end)
  884.  
  885. Dropdown.DropdownHolder.DropdownOptions.Content.CanvasSize = UDim2.new(0, 0, 0, Dropdown.DropdownHolder.DropdownOptions.Content.UIListLayout.AbsoluteContentSize.Y)
  886. end
  887.  
  888. Dropdown.MouseButton1Click:Connect(function()
  889. Dropped = not Dropped
  890. AnimateDropdown(Dropped)
  891. end)
  892. Dropdown.DropdownHolder.Minimize.MouseButton1Click:Connect(function()
  893. Dropped = not Dropped
  894. AnimateDropdown(Dropped)
  895. end)
  896.  
  897. Dropdown.Parent = KeylimeMainFrame.Content
  898. end
  899. end
  900.  
  901. return Keylime
  902. end
  903.  
  904. return KeylimeLibrary
Add Comment
Please, Sign In to add comment