Advertisement
JxntScripts

Bubble Gum Simulator UI

Jan 22nd, 2020
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 48.45 KB | None | 0 0
  1. if syn then
  2. function GenerateString(x)
  3. finalrandomizedstring = ""
  4. local alotofletters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"
  5. local letterscramped = {}
  6. for i = 1,string.len(alotofletters) do
  7. table.insert(letterscramped,string.sub(alotofletters,i,i))
  8. end
  9.  
  10. local function CombineLetters()
  11. for q = 1,x do
  12. local randomletter = letterscramped[math.random(1,#letterscramped)]
  13. finalrandomizedstring = finalrandomizedstring..randomletter
  14. end
  15. end
  16. CombineLetters()
  17. return finalrandomizedstring
  18. end
  19. else print("hi")
  20. end
  21.  
  22. local lunar = {}
  23.  
  24. lunar.theme = { -- light
  25. main_container = Color3.fromRGB(249, 249, 255),
  26. separator_color = Color3.fromRGB(223, 219, 228),
  27.  
  28. text_color = Color3.fromRGB(96, 96, 96),
  29.  
  30. category_button_background = Color3.fromRGB(223, 219, 228),
  31. category_button_border = Color3.fromRGB(200, 196, 204),
  32.  
  33. checkbox_checked = Color3.fromRGB(114, 214, 112),
  34. checkbox_outer = Color3.fromRGB(198, 189, 202),
  35. checkbox_inner = Color3.fromRGB(249, 239, 255),
  36.  
  37. slider_color = Color3.fromRGB(114, 214, 112),
  38. slider_background = Color3.fromRGB(198, 188, 202),
  39. slider_text = Color3.fromRGB(112, 112, 112),
  40.  
  41. textbox_background = Color3.fromRGB(198, 189, 202),
  42. textbox_background_hover = Color3.fromRGB(215, 206, 227),
  43. textbox_text = Color3.fromRGB(112, 112, 112),
  44. textbox_text_hover = Color3.fromRGB(50, 50, 50),
  45. textbox_placeholder = Color3.fromRGB(178, 178, 178),
  46.  
  47. dropdown_background = Color3.fromRGB(198, 189, 202),
  48. dropdown_text = Color3.fromRGB(112, 112, 112),
  49. dropdown_text_hover = Color3.fromRGB(50, 50, 50),
  50. dropdown_scrollbar_color = Color3.fromRGB(198, 189, 202),
  51.  
  52. button_background = Color3.fromRGB(198, 189, 202),
  53. button_background_hover = Color3.fromRGB(215, 206, 227),
  54. button_background_down = Color3.fromRGB(178, 169, 182),
  55. }
  56. lunar.dark_theme = { -- dark
  57. main_container = Color3.fromRGB(32, 32, 33),
  58. separator_color = Color3.fromRGB(63, 63, 65),
  59.  
  60. text_color = Color3.fromRGB(206, 206, 206),
  61.  
  62. category_button_background = Color3.fromRGB(63, 62, 65),
  63. category_button_border = Color3.fromRGB(72, 71, 74),
  64.  
  65. checkbox_checked = Color3.fromRGB(132, 255, 130),
  66. checkbox_outer = Color3.fromRGB(84, 81, 86),
  67. checkbox_inner = Color3.fromRGB(132, 132, 136),
  68.  
  69. slider_color = Color3.fromRGB(177, 177, 177),
  70. slider_background = Color3.fromRGB(88, 84, 90),
  71. slider_text = Color3.fromRGB(177, 177, 177),
  72.  
  73. textbox_background = Color3.fromRGB(103, 103, 106),
  74. textbox_background_hover = Color3.fromRGB(137, 137, 141),
  75. textbox_text = Color3.fromRGB(195, 195, 195),
  76. textbox_text_hover = Color3.fromRGB(232, 232, 232),
  77. textbox_placeholder = Color3.fromRGB(135, 135, 138),
  78.  
  79. dropdown_background = Color3.fromRGB(88, 88, 91),
  80. dropdown_text = Color3.fromRGB(195, 195, 195),
  81. dropdown_text_hover = Color3.fromRGB(232, 232, 232),
  82. dropdown_scrollbar_color = Color3.fromRGB(118, 118, 121),
  83.  
  84. button_background = Color3.fromRGB(103, 103, 106),
  85. button_background_hover = Color3.fromRGB(137, 137, 141),
  86. button_background_down = Color3.fromRGB(70, 70, 81),
  87. }
  88.  
  89.  
  90. local mouse = game:GetService("Players").LocalPlayer:GetMouse()
  91.  
  92. function lunar:Create(class, properties)
  93. local object = Instance.new(class)
  94.  
  95. for prop, val in next, properties do
  96. if object[prop] and prop ~= "Parent" then
  97. object[prop] = val
  98. end
  99. end
  100.  
  101. return object
  102. end
  103.  
  104. function lunar:addShadow(object, transparency)
  105. local shadow = self:Create("ImageLabel", {
  106. Name = "Shadow",
  107. AnchorPoint = Vector2.new(0.5, 0.5),
  108. BackgroundTransparency = 1,
  109. Position = UDim2.new(0.5, 0, 0.5, 4),
  110. Size = UDim2.new(1, 6, 1, 6),
  111. Image = "rbxassetid://1316045217",
  112. ImageTransparency = transparency and true or 0.5,
  113. ImageColor3 = Color3.fromRGB(35, 35, 35),
  114. ScaleType = Enum.ScaleType.Slice,
  115. SliceCenter = Rect.new(10, 10, 118, 118)
  116. })
  117.  
  118. shadow.Parent = object
  119. end
  120.  
  121. function lunar.new(isdark)
  122. local lunarObject = {}
  123. local self2 = lunarObject
  124. local self = lunar
  125.  
  126. if game:GetService("CoreGui"):FindFirstChild("Lunar") then
  127. warn("lunar:", "instance already exists in coregui!")
  128.  
  129. return
  130. end
  131.  
  132. local theme = lunar.theme
  133.  
  134. if isdark == true then theme = lunar.dark_theme end
  135.  
  136. local toggled = true
  137. local typing = false
  138. local firstcat = false
  139.  
  140. local lunarData
  141. lunarData = {
  142. UpConnection = nil,
  143. ToggleKey = Enum.KeyCode.Home,
  144. }
  145.  
  146. self2.ChangeToggleKey = function(NewKey)
  147. lunarData.ToggleKey = NewKey
  148. if syn then
  149. self2.tip.Text = "Bubble Gum Simulator v1.0 | "..GenerateString(16)
  150. else
  151. self2.tip.Text = "Bubble Gum Simulator v1.0 | Support Edition"
  152. end
  153.  
  154. if lunarData.UpConnection then
  155. lunarData.UpConnection:Disconnect()
  156. end
  157.  
  158. lunarData.UpConnection = game:GetService("UserInputService").InputEnded:Connect(function(Input)
  159. if Input.KeyCode == lunarData.ToggleKey and not typing then
  160. toggled = not toggled
  161.  
  162. if toggled then
  163. self2.container:TweenPosition(UDim2.new(0.5, 0, 0.5, 0), "Out", "Sine", 0.5, true)
  164. else
  165. self2.container:TweenPosition(UDim2.new(0.5, 0, 1.5, 0), "Out", "Sine", 0.5, true)
  166. end
  167. end
  168. end)
  169. end
  170.  
  171. lunarData.UpConnection = game:GetService("UserInputService").InputEnded:Connect(function(Input)
  172. if Input.KeyCode == lunarData.ToggleKey and not typing then
  173. toggled = not toggled
  174.  
  175. if toggled then
  176. self2.container:TweenPosition(UDim2.new(0.5, 0, 0.5, 0), "Out", "Sine", 0.5, true)
  177. else
  178. self2.container:TweenPosition(UDim2.new(0.5, 0, 1.5, 0), "Out", "Sine", 0.5, true)
  179. end
  180. end
  181. end)
  182.  
  183. self2.userinterface = self:Create("ScreenGui", {
  184. Name = "nfkflburxaNwLHvJ4rwm",
  185. ZIndexBehavior = Enum.ZIndexBehavior.Global,
  186. ResetOnSpawn = false,
  187. })
  188.  
  189. self2.container = self:Create("Frame", {
  190. Draggable = true,
  191. Active = true,
  192. Name = "Container",
  193. AnchorPoint = Vector2.new(0.5, 0.5),
  194. BackgroundTransparency = 0,
  195. BackgroundColor3 = theme.main_container,
  196. BorderSizePixel = 0,
  197. Position = UDim2.new(0.5, 0, 0.5, 0),
  198. Size = UDim2.new(0, 700, 0, 400),
  199. ZIndex = 2
  200. })
  201.  
  202. self2.container.Draggable = true
  203. self2.container.Active = true
  204.  
  205. self2.sidebar = self:Create("Frame", {
  206. Name = "Sidebar",
  207. BackgroundColor3 = Color3.new(0.976471, 0.937255, 1),
  208. BackgroundTransparency = 1,
  209. BorderColor3 = Color3.new(0.745098, 0.713726, 0.760784),
  210. Size = UDim2.new(0, 120, 1, -30),
  211. Position = UDim2.new(0, 0, 0, 30),
  212. ZIndex = 2,
  213. })
  214.  
  215. self2.categories = self:Create("Frame", {
  216. Name = "Categories",
  217. BackgroundColor3 = Color3.new(0.976471, 0.937255, 1),
  218. ClipsDescendants = true,
  219. BackgroundTransparency = 1,
  220. BorderColor3 = Color3.new(0.745098, 0.713726, 0.760784),
  221. Size = UDim2.new(1, -120, 1, -30),
  222. AnchorPoint = Vector2.new(1, 0),
  223. Position = UDim2.new(1, 0, 0, 30),
  224. ZIndex = 2,
  225. })
  226. self2.categories.ClipsDescendants = true
  227.  
  228. self2.topbar = self:Create("Frame", {
  229. Name = "Topbar",
  230. ZIndex = 2,
  231. Size = UDim2.new(1,0,0,30),
  232. BackgroundTransparency = 2
  233. })
  234.  
  235. self2.tip = self:Create("TextLabel", {
  236. Name = "TopbarTip",
  237. ZIndex = 2,
  238. Size = UDim2.new(1, -30, 0, 30),
  239. Position = UDim2.new(0, 30, 0, 0),
  240. Text = "Press '".. string.sub(tostring(self.ToggleKey), 14) .."' to hide this menu",
  241. Font = Enum.Font.GothamSemibold,
  242. TextSize = 13,
  243. TextXAlignment = Enum.TextXAlignment.Left,
  244. BackgroundTransparency = 1,
  245. TextColor3 = theme.text_color,
  246. })
  247.  
  248. local separator = self:Create("Frame", {
  249. Name = "Separator",
  250. BackgroundColor3 = theme.separator_color,
  251. BorderSizePixel = 0,
  252. Position = UDim2.new(0, 118, 0, 30),
  253. Size = UDim2.new(0, 1, 1, -30),
  254. ZIndex = 6,
  255. })
  256. separator.Parent = self2.container
  257. separator = nil
  258.  
  259. local separator = self:Create("Frame", {
  260. Name = "Separator",
  261. BackgroundColor3 = theme.separator_color,
  262. BorderSizePixel = 0,
  263. Position = UDim2.new(0, 0, 0, 30),
  264. Size = UDim2.new(1, 0, 0, 1),
  265. ZIndex = 6,
  266. })
  267. separator.Parent = self2.container
  268. separator = nil
  269.  
  270. local uipagelayout = self:Create("UIPageLayout", {
  271. Padding = UDim.new(0, 10),
  272. FillDirection = Enum.FillDirection.Vertical,
  273. TweenTime = 0.7,
  274. EasingStyle = Enum.EasingStyle.Quad,
  275. EasingDirection = Enum.EasingDirection.InOut,
  276. SortOrder = Enum.SortOrder.LayoutOrder,
  277. })
  278. uipagelayout.Parent = self2.categories
  279. uipagelayout = nil
  280.  
  281. local uipadding = self:Create("UIPadding", {
  282. PaddingTop = UDim.new(0, 5),
  283. PaddingLeft = UDim.new(0, 2)
  284. })
  285. uipadding.Parent = self2.sidebar
  286. uipadding = nil
  287.  
  288. local uilistlayout = self:Create("UIListLayout", {
  289. SortOrder = Enum.SortOrder.LayoutOrder
  290. })
  291. uilistlayout.Parent = self2.sidebar
  292. uilistlayout = nil
  293.  
  294. function self2:Category(name)
  295. local category = {}
  296.  
  297. category.button = lunar:Create("TextButton", {
  298. Name = name,
  299. BackgroundColor3 = theme.category_button_background,
  300. BackgroundTransparency = 1,
  301. BorderMode = Enum.BorderMode.Inset,
  302. BorderColor3 = theme.category_button_border,
  303. Size = UDim2.new(1, -4, 0, 25),
  304. ZIndex = 2,
  305. AutoButtonColor = false,
  306. Font = Enum.Font.GothamSemibold,
  307. Text = name,
  308. TextColor3 = theme.text_color,
  309. TextSize = 14
  310. })
  311.  
  312. category.container = lunar:Create("ScrollingFrame", {
  313. Name = name,
  314. BackgroundTransparency = 1,
  315. BorderSizePixel = 0,
  316. Size = UDim2.new(1, 0, 1, 0),
  317. ZIndex = 2,
  318. CanvasSize = UDim2.new(0, 0, 0, 0)
  319. })
  320.  
  321. category.hider = lunar:Create("Frame", {
  322. Name = "Hider",
  323. BackgroundTransparency = 0,
  324. BorderSizePixel = 0,
  325. BackgroundColor3 = theme.main_container,
  326. Size = UDim2.new(1, 0, 1, 0),
  327. ZIndex = 5
  328. })
  329.  
  330. category.L = lunar:Create("Frame", {
  331. Name = "L",
  332. BackgroundColor3 = Color3.new(1, 1, 1),
  333. BackgroundTransparency = 1,
  334. Position = UDim2.new(0, 10, 0, 5),
  335. Size = UDim2.new(0.5, -20, 1, -5),
  336. ZIndex = 2
  337. })
  338.  
  339. category.R = lunar:Create("Frame", {
  340. Name = "R",
  341. AnchorPoint = Vector2.new(1, 0),
  342. BackgroundColor3 = Color3.new(1, 1, 1),
  343. BackgroundTransparency = 1,
  344. Position = UDim2.new(1, -10, 0, 5),
  345. Size = UDim2.new(0.5, -20, 1, -5),
  346. ZIndex = 2
  347. })
  348.  
  349. local uilistlayout = lunar:Create("UIListLayout", {
  350. SortOrder = Enum.SortOrder.LayoutOrder
  351. })
  352. uilistlayout.Parent = category.L
  353. uilistlayout = nil
  354.  
  355. local uilistlayout = lunar:Create("UIListLayout", {
  356. SortOrder = Enum.SortOrder.LayoutOrder
  357. })
  358. uilistlayout.Parent = category.R
  359. uilistlayout = nil
  360.  
  361. category.button.MouseEnter:Connect(function()
  362. game:GetService("TweenService"):Create(category.button, TweenInfo.new(0.2), {BackgroundTransparency = 0.5}):Play()
  363. end)
  364. category.button.MouseLeave:Connect(function()
  365. game:GetService("TweenService"):Create(category.button, TweenInfo.new(0.2), {BackgroundTransparency = 1}):Play()
  366. end)
  367. category.button.MouseButton1Down:Connect(function()
  368. for _, categoryf in next, self2.userinterface["Container"]["Categories"]:GetChildren() do
  369. if categoryf:IsA("ScrollingFrame") then
  370. if categoryf ~= category.container then
  371. game:GetService("TweenService"):Create(categoryf.Hider, TweenInfo.new(0.3), {BackgroundTransparency = 0}):Play()
  372. end
  373. end
  374. end
  375.  
  376. game:GetService("TweenService"):Create(category.button, TweenInfo.new(0.2), {BackgroundTransparency = 0.2}):Play()
  377. game:GetService("TweenService"):Create(category.hider, TweenInfo.new(0.3), {BackgroundTransparency = 1}):Play()
  378.  
  379. self2.categories["UIPageLayout"]:JumpTo(category.container)
  380. end)
  381. category.button.MouseButton1Up:Connect(function()
  382. game:GetService("TweenService"):Create(category.button, TweenInfo.new(0.2), {BackgroundTransparency = 1}):Play()
  383. end)
  384.  
  385. category.container.Parent = self2.categories
  386. category.button.Parent = self2.sidebar
  387. category.R.Parent = category.container
  388. category.L.Parent = category.container
  389. category.hider.Parent = category.container
  390.  
  391. local function calculateSector()
  392. local R = #category.R:GetChildren() - 1
  393. local L = #category.L:GetChildren() - 1
  394.  
  395. if L > R then
  396. return "R"
  397. else
  398. return "L"
  399. end
  400. end
  401.  
  402. function category:Sector(name)
  403. local sector = {}
  404.  
  405. sector.frame = lunar:Create("Frame", {
  406. Name = name,
  407. BackgroundColor3 = Color3.new(1, 1, 1),
  408. BackgroundTransparency = 1,
  409. Size = UDim2.new(1, 0, 0, 25),
  410. ZIndex = 2
  411. })
  412.  
  413. sector.container = lunar:Create("Frame", {
  414. Name = "Container",
  415. BackgroundColor3 = Color3.new(1, 1, 1),
  416. BackgroundTransparency = 1,
  417. Position = UDim2.new(0, 0, 0, 22),
  418. Size = UDim2.new(1, -5, 1, -30),
  419. ZIndex = 2
  420. })
  421.  
  422. sector.title = lunar:Create("TextLabel", {
  423. Name = "Title",
  424. Text = name,
  425. BackgroundColor3 = Color3.new(1, 1, 1),
  426. BackgroundTransparency = 1,
  427. Size = UDim2.new(1, -5, 0, 25),
  428. ZIndex = 2,
  429. Font = Enum.Font.GothamSemibold,
  430. TextColor3 = theme.text_color,
  431. TextSize = 14,
  432. TextXAlignment = Enum.TextXAlignment.Left,
  433. })
  434.  
  435. local uilistlayout = lunar:Create("UIListLayout", {
  436. SortOrder = Enum.SortOrder.LayoutOrder
  437. })
  438.  
  439. uilistlayout.Changed:Connect(function()
  440. sector.frame.Size = UDim2.new(1, 0, 0, sector.container["UIListLayout"].AbsoluteContentSize.Y + 25)
  441. sector.container.Size = UDim2.new(1, 0, 0, sector.container["UIListLayout"].AbsoluteContentSize.Y)
  442. end)
  443. uilistlayout.Parent = sector.container
  444. uilistlayout = nil
  445.  
  446. function sector:Cheat(kind, name, callback, data)
  447. local cheat = {}
  448. cheat.value = nil
  449.  
  450. cheat.frame = lunar:Create("Frame", {
  451. Name = name,
  452. BackgroundColor3 = Color3.new(1, 1, 1),
  453. BackgroundTransparency = 1,
  454. Size = UDim2.new(1, 0, 0, 25),
  455. ZIndex = 2,
  456. })
  457.  
  458. cheat.label = lunar:Create("TextLabel", {
  459. Name = "Title",
  460. BackgroundColor3 = Color3.new(1, 1, 1),
  461. BackgroundTransparency = 1,
  462. Size = UDim2.new(1, 0, 1, 0),
  463. ZIndex = 2,
  464. Font = Enum.Font.Gotham,
  465. TextColor3 = theme.text_color,
  466. TextSize = 13,
  467. Text = name,
  468. TextXAlignment = Enum.TextXAlignment.Left
  469. })
  470.  
  471. cheat.container = lunar:Create("Frame", {
  472. Name = "Container",
  473. AnchorPoint = Vector2.new(1, 0.5),
  474. BackgroundColor3 = Color3.new(1, 1, 1),
  475. BackgroundTransparency = 1,
  476. Position = UDim2.new(1, 0, 0.5, 0),
  477. Size = UDim2.new(0, 150, 0, 22),
  478. ZIndex = 2,
  479. })
  480.  
  481. if kind then
  482. if string.lower(kind) == "checkbox" then
  483. if data then
  484. if data.enabled then
  485. cheat.value = true
  486. end
  487. end
  488.  
  489. cheat.checkbox = lunar:Create("Frame", {
  490. Name = "Checkbox",
  491. AnchorPoint = Vector2.new(1, 0),
  492. BackgroundColor3 = Color3.new(1, 1, 1),
  493. BackgroundTransparency = 1,
  494. Position = UDim2.new(1, 0, 0, 0),
  495. Size = UDim2.new(0, 25, 0, 25),
  496. ZIndex = 2,
  497. })
  498.  
  499. cheat.outerbox = lunar:Create("ImageLabel", {
  500. Name = "Outer",
  501. AnchorPoint = Vector2.new(1, 0.5),
  502. BackgroundColor3 = Color3.new(1, 1, 1),
  503. BackgroundTransparency = 1,
  504. Position = UDim2.new(1, 0, 0.5, 0),
  505. Size = UDim2.new(0, 20, 0, 20),
  506. ZIndex = 2,
  507. Image = "rbxassetid://3570695787",
  508. ImageColor3 = theme.checkbox_outer,
  509. ScaleType = Enum.ScaleType.Slice,
  510. SliceCenter = Rect.new(100, 100, 100, 100),
  511. SliceScale = 0.06,
  512. })
  513.  
  514. cheat.checkboxbutton = lunar:Create("ImageButton", {
  515. AnchorPoint = Vector2.new(0.5, 0.5),
  516. Name = "CheckboxButton",
  517. BackgroundColor3 = Color3.new(1, 1, 1),
  518. BackgroundTransparency = 1,
  519. Position = UDim2.new(0.5, 0, 0.5, 0),
  520. Size = UDim2.new(0, 14, 0, 14),
  521. ZIndex = 2,
  522. Image = "rbxassetid://3570695787",
  523. ImageColor3 = theme.checkbox_inner,
  524. ScaleType = Enum.ScaleType.Slice,
  525. SliceCenter = Rect.new(100, 100, 100, 100),
  526. SliceScale = 0.04
  527. })
  528.  
  529. if data then
  530. if data.enabled then
  531. game:GetService("TweenService"):Create(cheat.outerbox, TweenInfo.new(0.2), {ImageColor3 = theme.checkbox_checked}):Play()
  532. game:GetService("TweenService"):Create(cheat.checkboxbutton, TweenInfo.new(0.2), {ImageColor3 = theme.checkbox_checked}):Play()
  533. end
  534. end
  535.  
  536. cheat.checkboxbutton.MouseEnter:Connect(function()
  537. local lightertheme = Color3.fromRGB((theme.checkbox_outer.R * 255) + 20, (theme.checkbox_outer.G * 255) + 20, (theme.checkbox_outer.B * 255) + 20)
  538. game:GetService("TweenService"):Create(cheat.outerbox, TweenInfo.new(0.2), {ImageColor3 = lightertheme}):Play()
  539. end)
  540. cheat.checkboxbutton.MouseLeave:Connect(function()
  541. if not cheat.value then
  542. game:GetService("TweenService"):Create(cheat.outerbox, TweenInfo.new(0.2), {ImageColor3 = theme.checkbox_outer}):Play()
  543. else
  544. game:GetService("TweenService"):Create(cheat.outerbox, TweenInfo.new(0.2), {ImageColor3 = theme.checkbox_checked}):Play()
  545. end
  546. end)
  547. cheat.checkboxbutton.MouseButton1Down:Connect(function()
  548. if cheat.value then
  549. game:GetService("TweenService"):Create(cheat.checkboxbutton, TweenInfo.new(0.2), {ImageColor3 = theme.checkbox_outer}):Play()
  550. else
  551. game:GetService("TweenService"):Create(cheat.checkboxbutton, TweenInfo.new(0.2), {ImageColor3 = theme.checkbox_checked}):Play()
  552. end
  553. end)
  554. cheat.checkboxbutton.MouseButton1Up:Connect(function()
  555. cheat.value = not cheat.value
  556.  
  557. if callback then
  558. local s, e = pcall(function()
  559. callback(cheat.value)
  560. end)
  561.  
  562. if not s then warn("error: ".. e) end
  563. end
  564.  
  565. if cheat.value then
  566. game:GetService("TweenService"):Create(cheat.outerbox, TweenInfo.new(0.2), {ImageColor3 = theme.checkbox_checked}):Play()
  567. else
  568. game:GetService("TweenService"):Create(cheat.outerbox, TweenInfo.new(0.2), {ImageColor3 = theme.checkbox_outer}):Play()
  569. game:GetService("TweenService"):Create(cheat.checkboxbutton, TweenInfo.new(0.2), {ImageColor3 = theme.checkbox_inner}):Play()
  570. end
  571. end)
  572.  
  573. cheat.checkboxbutton.Parent = cheat.outerbox
  574. cheat.outerbox.Parent = cheat.container
  575. elseif string.lower(kind) == "dropdown" then
  576. if data then
  577. if data.default then
  578. cheat.value = data.default
  579. elseif data.options then
  580. cheat.value = data.options[1]
  581. else
  582. cheat.value = "None"
  583. end
  584. end
  585.  
  586. cheat.dropped = false
  587.  
  588. cheat.dropdown = lunar:Create("ImageButton", {
  589. Name = "Dropdown",
  590. BackgroundColor3 = Color3.new(1, 1, 1),
  591. BackgroundTransparency = 1,
  592. Size = UDim2.new(1, 0, 1, 0),
  593. ZIndex = 2,
  594. Image = "rbxassetid://3570695787",
  595. ImageColor3 = theme.dropdown_background,
  596. ImageTransparency = 0.5,
  597. ScaleType = Enum.ScaleType.Slice,
  598. SliceCenter = Rect.new(100, 100, 100, 100),
  599. SliceScale = 0.02
  600. })
  601.  
  602. cheat.selected = lunar:Create("TextLabel", {
  603. Name = "Selected",
  604. BackgroundColor3 = Color3.new(1, 1, 1),
  605. BackgroundTransparency = 1,
  606. Position = UDim2.new(0, 10, 0, 0),
  607. Size = UDim2.new(1, -35, 1, 0),
  608. ZIndex = 2,
  609. Font = Enum.Font.Gotham,
  610. Text = tostring(cheat.value),
  611. TextColor3 = theme.dropdown_text,
  612. TextSize = 13,
  613. TextXAlignment = Enum.TextXAlignment.Left
  614. })
  615.  
  616. cheat.list = lunar:Create("ScrollingFrame", {
  617. Name = "List",
  618. BackgroundColor3 = theme.dropdown_background,
  619. BackgroundTransparency = 0.5,
  620. BorderSizePixel = 0,
  621. Position = UDim2.new(0, 0, 1, 0),
  622. Size = UDim2.new(1, 0, 0, 100),
  623. ZIndex = 3,
  624. BottomImage = "rbxassetid://967852042",
  625. MidImage = "rbxassetid://967852042",
  626. TopImage = "rbxassetid://967852042",
  627. ScrollBarThickness = 4,
  628. VerticalScrollBarInset = Enum.ScrollBarInset.None,
  629. ScrollBarImageColor3 = theme.dropdown_scrollbar_color
  630. })
  631.  
  632. local uilistlayout = lunar:Create("UIListLayout", {
  633. SortOrder = Enum.SortOrder.LayoutOrder,
  634. Padding = UDim.new(0, 2)
  635. })
  636. uilistlayout.Parent = cheat.list
  637. uilistlayout = nil
  638. local uipadding = lunar:Create("UIPadding", {
  639. PaddingLeft = UDim.new(0, 2)
  640. })
  641. uipadding.Parent = cheat.list
  642. uipadding = nil
  643.  
  644. for _, value in next, data.options do
  645. local button = lunar:Create("TextButton", {
  646. BackgroundColor3 = Color3.new(1, 1, 1),
  647. BackgroundTransparency = 1,
  648. Size = UDim2.new(1, 0, 0, 20),
  649. ZIndex = 3,
  650. Font = Enum.Font.Gotham,
  651. Text = value,
  652. TextColor3 = theme.dropdown_text,
  653. TextSize = 13
  654. })
  655.  
  656. button.Parent = cheat.list
  657.  
  658. button.MouseEnter:Connect(function()
  659. game:GetService("TweenService"):Create(button, TweenInfo.new(0.1), {TextColor3 = theme.dropdown_text_hover}):Play()
  660. end)
  661. button.MouseLeave:Connect(function()
  662. game:GetService("TweenService"):Create(button, TweenInfo.new(0.1), {TextColor3 = theme.dropdown_text}):Play()
  663. end)
  664. button.MouseButton1Click:Connect(function()
  665. if cheat.dropped then
  666. cheat.value = value
  667. cheat.selected.Text = value
  668.  
  669. cheat.fadelist()
  670.  
  671. if callback then
  672. local s, e = pcall(function()
  673. callback(cheat.value)
  674. end)
  675.  
  676. if not s then warn("error: ".. e) end
  677. end
  678. end
  679. end)
  680. end
  681.  
  682. game:GetService("TweenService"):Create(cheat.list, TweenInfo.new(0), {Size = UDim2.new(1, 0, 0, 0), Position = UDim2.new(0, 0, 1, 0), CanvasSize = UDim2.new(0, 0, 0, cheat.list["UIListLayout"].AbsoluteContentSize.Y), ScrollBarImageTransparency = 1, BackgroundTransparency = 1}):Play()
  683.  
  684. for _, button in next, cheat.list:GetChildren() do
  685. if button:IsA("TextButton") then
  686. game:GetService("TweenService"):Create(button, TweenInfo.new(0), {TextTransparency = 1}):Play()
  687. end
  688. end
  689.  
  690. function cheat.fadelist()
  691. cheat.dropped = not cheat.dropped
  692.  
  693. if cheat.dropped then
  694. for _, button in next, cheat.list:GetChildren() do
  695. if button:IsA("TextButton") then
  696. game:GetService("TweenService"):Create(button, TweenInfo.new(0.2), {TextTransparency = 0}):Play()
  697. end
  698. end
  699.  
  700. game:GetService("TweenService"):Create(cheat.list, TweenInfo.new(0.2), {Size = UDim2.new(1, 0, 0, math.clamp(cheat.list["UIListLayout"].AbsoluteContentSize.Y, 0, 150)), Position = UDim2.new(0, 0, 1, 0), ScrollBarImageTransparency = 0, BackgroundTransparency = 0.5}):Play()
  701. else
  702. for _, button in next, cheat.list:GetChildren() do
  703. if button:IsA("TextButton") then
  704. game:GetService("TweenService"):Create(button, TweenInfo.new(0.2), {TextTransparency = 1}):Play()
  705. end
  706. end
  707.  
  708. game:GetService("TweenService"):Create(cheat.list, TweenInfo.new(0.2), {Size = UDim2.new(1, 0, 0, 0), Position = UDim2.new(0, 0, 1, 0), ScrollBarImageTransparency = 1, BackgroundTransparency = 1}):Play()
  709. end
  710. end
  711.  
  712. cheat.dropdown.MouseEnter:Connect(function()
  713. game:GetService("TweenService"):Create(cheat.selected, TweenInfo.new(0.1), {TextColor3 = theme.dropdown_text_hover}):Play()
  714. end)
  715. cheat.dropdown.MouseLeave:Connect(function()
  716. game:GetService("TweenService"):Create(cheat.selected, TweenInfo.new(0.1), {TextColor3 = theme.dropdown_text}):Play()
  717. end)
  718. cheat.dropdown.MouseButton1Click:Connect(function()
  719. cheat.fadelist()
  720. end)
  721.  
  722. cheat.selected.Parent = cheat.dropdown
  723. cheat.dropdown.Parent = cheat.container
  724. cheat.list.Parent = cheat.container
  725. elseif string.lower(kind) == "textbox" then
  726. local placeholdertext = data and data.placeholder
  727.  
  728. cheat.background = lunar:Create("ImageLabel", {
  729. Name = "Background",
  730. BackgroundColor3 = Color3.new(1, 1, 1),
  731. BackgroundTransparency = 1,
  732. Size = UDim2.new(1, 0, 1, 0),
  733. ZIndex = 2,
  734. Image = "rbxassetid://3570695787",
  735. ImageColor3 = theme.textbox_background,
  736. ImageTransparency = 0.5,
  737. ScaleType = Enum.ScaleType.Slice,
  738. SliceCenter = Rect.new(100, 100, 100, 100),
  739. SliceScale = 0.02
  740. })
  741.  
  742. cheat.textbox = lunar:Create("TextBox", {
  743. Name = "Textbox",
  744. BackgroundColor3 = Color3.new(1, 1, 1),
  745. BackgroundTransparency = 1,
  746. Position = UDim2.new(0, 0, 0, 0),
  747. Size = UDim2.new(1, 0, 1, 0),
  748. ZIndex = 2,
  749. Font = Enum.Font.Gotham,
  750. Text = "",
  751. TextColor3 = theme.textbox_text,
  752. PlaceholderText = placeholdertext or "Value",
  753. TextSize = 13,
  754. TextXAlignment = Enum.TextXAlignment.Center
  755. })
  756.  
  757. cheat.background.MouseEnter:Connect(function()
  758. game:GetService("TweenService"):Create(cheat.textbox, TweenInfo.new(0.1), {TextColor3 = theme.textbox_text_hover}):Play()
  759. end)
  760. cheat.background.MouseLeave:Connect(function()
  761. game:GetService("TweenService"):Create(cheat.textbox, TweenInfo.new(0.1), {TextColor3 = theme.textbox_text}):Play()
  762. end)
  763. cheat.textbox.Focused:Connect(function()
  764. typing = true
  765.  
  766. game:GetService("TweenService"):Create(cheat.background, TweenInfo.new(0.2), {ImageColor3 = theme.textbox_background_hover}):Play()
  767. end)
  768. cheat.textbox.FocusLost:Connect(function()
  769. typing = false
  770.  
  771. game:GetService("TweenService"):Create(cheat.background, TweenInfo.new(0.2), {ImageColor3 = theme.textbox_background}):Play()
  772. game:GetService("TweenService"):Create(cheat.textbox, TweenInfo.new(0.1), {TextColor3 = theme.textbox_text}):Play()
  773.  
  774. cheat.value = cheat.textbox.Text
  775.  
  776. if callback then
  777. local s, e = pcall(function()
  778. callback(cheat.value)
  779. end)
  780.  
  781. if not s then warn("error: "..e) end
  782. end
  783. end)
  784.  
  785. cheat.background.Parent = cheat.container
  786. cheat.textbox.Parent = cheat.container
  787. elseif string.lower(kind) == "slider" then
  788. cheat.value = 0
  789.  
  790. local suffix = data.suffix or ""
  791. local minimum = data.min or 0
  792. local maximum = data.max or 1
  793.  
  794. local moveconnection
  795. local releaseconnection
  796.  
  797. cheat.sliderbar = lunar:Create("ImageButton", {
  798. Name = "Sliderbar",
  799. AnchorPoint = Vector2.new(1, 0.5),
  800. BackgroundColor3 = Color3.new(1, 1, 1),
  801. BackgroundTransparency = 1,
  802. Position = UDim2.new(1, 0, 0.5, 0),
  803. Size = UDim2.new(1, 0, 0, 6),
  804. ZIndex = 2,
  805. Image = "rbxassetid://3570695787",
  806. ImageColor3 = theme.slider_background,
  807. ImageTransparency = 0.5,
  808. ScaleType = Enum.ScaleType.Slice,
  809. SliceCenter = Rect.new(100, 100, 100, 100),
  810. SliceScale = 0.02,
  811. })
  812.  
  813. cheat.numbervalue = lunar:Create("TextLabel", {
  814. Name = "Value",
  815. AnchorPoint = Vector2.new(0, 0.5),
  816. BackgroundColor3 = Color3.new(1, 1, 1),
  817. BackgroundTransparency = 1,
  818. Position = UDim2.new(0.5, 5, 0.5, 0),
  819. Size = UDim2.new(1, 0, 0, 13),
  820. ZIndex = 2,
  821. Font = Enum.Font.Gotham,
  822. TextXAlignment = Enum.TextXAlignment.Left,
  823. Text = "",
  824. TextTransparency = 1,
  825. TextColor3 = theme.slider_text,
  826. TextSize = 13,
  827. })
  828.  
  829. cheat.visiframe = lunar:Create("ImageLabel", {
  830. Name = "Frame",
  831. BackgroundColor3 = Color3.new(1, 1, 1),
  832. BackgroundTransparency = 1,
  833. Size = UDim2.new(0.5, 0, 1, 0),
  834. ZIndex = 2,
  835. Image = "rbxassetid://3570695787",
  836. ImageColor3 = theme.slider_color,
  837. ScaleType = Enum.ScaleType.Slice,
  838. SliceCenter = Rect.new(100, 100, 100, 100),
  839. SliceScale = 0.02
  840. })
  841.  
  842. cheat.sliderbar.MouseButton1Down:Connect(function()
  843. local size = math.clamp(mouse.X - cheat.sliderbar.AbsolutePosition.X, 0, 150)
  844. local percent = size / 150
  845.  
  846. cheat.value = math.floor((minimum + (maximum - minimum) * percent) * 100) / 100
  847. cheat.numbervalue.Text = tostring(cheat.value) .. suffix
  848.  
  849. if callback then
  850. local s, e = pcall(function()
  851. callback(cheat.value)
  852. end)
  853.  
  854. if not s then warn("error: ".. e) end
  855. end
  856.  
  857. game:GetService("TweenService"):Create(cheat.visiframe, TweenInfo.new(0.1), {
  858. Size = UDim2.new(size / 150, 0, 1, 0),
  859. ImageColor3 = Color3.new(theme.slider_color.R, theme.slider_color.G - 0.1, theme.slider_color.B)
  860. }):Play()
  861.  
  862. game:GetService("TweenService"):Create(cheat.numbervalue, TweenInfo.new(0.1), {
  863. Position = UDim2.new(size / 150, 5, 0.5, 0),
  864. TextTransparency = 0
  865. }):Play()
  866.  
  867. moveconnection = mouse.Move:Connect(function()
  868. local size = math.clamp(mouse.X - cheat.sliderbar.AbsolutePosition.X, 0, 150)
  869. local percent = size / 150
  870.  
  871. cheat.value = math.floor((minimum + (maximum - minimum) * percent) * 100) / 100
  872. cheat.numbervalue.Text = tostring(cheat.value) .. suffix
  873.  
  874. if callback then
  875. local s, e = pcall(function()
  876. callback(cheat.value)
  877. end)
  878.  
  879. if not s then warn("error: ".. e) end
  880. end
  881.  
  882. game:GetService("TweenService"):Create(cheat.visiframe, TweenInfo.new(0.1), {
  883. Size = UDim2.new(size / 150, 0, 1, 0),
  884. ImageColor3 = Color3.new(theme.slider_color.R, theme.slider_color.G - 0.1, theme.slider_color.B)
  885. }):Play()
  886.  
  887. game:GetService("TweenService"):Create(cheat.numbervalue, TweenInfo.new(0.1), {
  888. Position = UDim2.new(size / 150, 5, 0.5, 0),
  889. TextTransparency = 0
  890. }):Play()
  891. end)
  892.  
  893. releaseconnection = game:GetService("UserInputService").InputEnded:Connect(function(Mouse)
  894. if Mouse.UserInputType == Enum.UserInputType.MouseButton1 then
  895.  
  896. game:GetService("TweenService"):Create(cheat.visiframe, TweenInfo.new(0.1), {
  897. ImageColor3 = theme.slider_color
  898. }):Play()
  899.  
  900. game:GetService("TweenService"):Create(cheat.numbervalue, TweenInfo.new(0.1), {
  901. TextTransparency = 1
  902. }):Play()
  903.  
  904. moveconnection:Disconnect()
  905. moveconnection = nil
  906. releaseconnection:Disconnect()
  907. releaseconnection = nil
  908. end
  909. end)
  910. end)
  911.  
  912. cheat.visiframe.Parent = cheat.sliderbar
  913. cheat.numbervalue.Parent = cheat.sliderbar
  914. cheat.sliderbar.Parent = cheat.container
  915. elseif string.lower(kind) == "button" then
  916. cheat.background = lunar:Create("ImageLabel", {
  917. Name = "Background",
  918. BackgroundColor3 = Color3.new(1, 1, 1),
  919. BackgroundTransparency = 1,
  920. Size = UDim2.new(1, 0, 1, 0),
  921. ZIndex = 2,
  922. Image = "rbxassetid://3570695787",
  923. ImageColor3 = theme.button_background,
  924. ImageTransparency = 0.5,
  925. ScaleType = Enum.ScaleType.Slice,
  926. SliceCenter = Rect.new(100, 100, 100, 100),
  927. SliceScale = 0.02
  928. })
  929.  
  930. cheat.button = lunar:Create("TextButton", {
  931. Name = "Button",
  932. BackgroundColor3 = Color3.new(1, 1, 1),
  933. BackgroundTransparency = 1,
  934. Position = UDim2.new(0, 0, 0, 0),
  935. Size = UDim2.new(1, 0, 1, 0),
  936. ZIndex = 2,
  937. Font = Enum.Font.Gotham,
  938. Text = name,
  939. TextColor3 = theme.textbox_text,
  940. TextSize = 13,
  941. TextXAlignment = Enum.TextXAlignment.Center
  942. })
  943.  
  944. cheat.button.MouseEnter:Connect(function()
  945. game:GetService("TweenService"):Create(cheat.background, TweenInfo.new(0.2), {ImageColor3 = theme.button_background_hover}):Play()
  946. end)
  947. cheat.button.MouseLeave:Connect(function()
  948. game:GetService("TweenService"):Create(cheat.background, TweenInfo.new(0.2), {ImageColor3 = theme.button_background}):Play()
  949. end)
  950. cheat.button.MouseButton1Down:Connect(function()
  951. game:GetService("TweenService"):Create(cheat.background, TweenInfo.new(0.2), {ImageColor3 = theme.button_background_down}):Play()
  952. end)
  953. cheat.button.MouseButton1Up:Connect(function()
  954. game:GetService("TweenService"):Create(cheat.background, TweenInfo.new(0.2), {ImageColor3 = theme.button_background}):Play()
  955.  
  956. if callback then
  957. local s, e = pcall(function()
  958. callback()
  959. end)
  960.  
  961. if not s then warn("error: ".. e) end
  962. end
  963. end)
  964.  
  965. cheat.background.Parent = cheat.container
  966. cheat.button.Parent = cheat.container
  967. end
  968. end
  969.  
  970. cheat.frame.Parent = sector.container
  971. cheat.label.Parent = cheat.frame
  972. cheat.container.Parent = cheat.frame
  973.  
  974. return cheat
  975. end
  976.  
  977. sector.frame.Parent = category[calculateSector()]
  978. sector.container.Parent = sector.frame
  979. sector.title.Parent = sector.frame
  980.  
  981. return sector
  982. end
  983.  
  984. return category
  985. end
  986.  
  987. self:addShadow(self2.container, 0)
  988.  
  989. self2.categories.ClipsDescendants = true
  990. self2.userinterface.Parent = game:GetService("CoreGui")
  991. self2.container.Parent = self2.userinterface
  992. self2.categories.Parent = self2.container
  993. self2.sidebar.Parent = self2.container
  994. self2.topbar.Parent = self2.container
  995. self2.tip.Parent = self2.topbar
  996.  
  997. return self2, lunarData
  998. end
  999.  
  1000. return lunar
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement