isMoons

awlekdawoedewka

May 15th, 2025
17
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.36 KB | None | 0 0
  1. local x2zuLibrary = loadstring(game:HttpGet("https://pastebin.com/raw/CbmyUAQb"))()
  2.  
  3. local Window = x2zuLibrary:CreateWindow({Title = "x2zu"})
  4. local Tab1 = Window:AddTab({Title = "General", Icon = "info"})
  5. local Tab2 = Window:AddTab({Title = "Notification", Icon = "bell"})
  6.  
  7. local Options = x2zuLibrary.Options
  8.  
  9. -- Tab 1 --
  10. do
  11. task.spawn(function()
  12. wait(.5)
  13. x2zuLibrary:Notify({
  14. Title = "Notification",
  15. Content = "This is a notification",
  16. Duration = 5 -- Set to nil to make the notification not disappear
  17. })
  18. wait(0.5)
  19. x2zuLibrary:Notify({
  20. Title = "Notification 2",
  21. Content = "This is a notification 2",
  22. SubContent = "btw i wont close, so click that X", -- Optional
  23. Duration = nil -- Set to nil to make the notification not disappear
  24. })
  25. end)
  26.  
  27.  
  28. local LeftSide = Tab1:AddSection({Title = "Left"})
  29. local RightSide = Tab1:AddSection({Title = "Right"})
  30.  
  31. LeftSide:AddParagraph({
  32. Title = "Create by x2zu",
  33. Content = "A tool to help users to grind without getting bored of it.\n\nFully automated."
  34. })
  35.  
  36. LeftSide:AddButton({
  37. Title = "Print 'HI'",
  38. Description = "Very important button", -- IGNORED
  39. Callback = function()
  40. print('HI')
  41. end
  42. })
  43.  
  44. local ToggleLeft = LeftSide:AddToggle("ToggleLeft", {Title = "Toggle", Default = true })
  45. local ToggleRight = RightSide:AddToggle("ToggleRight", {Title = "Toggle (Opposite Left)", Default = false})
  46.  
  47. ToggleLeft:OnChanged(function()
  48.  
  49. print("Toggle changed:", Options.ToggleLeft.Value)
  50. Options.ToggleRight:SetValue(not Options.ToggleLeft.Value)
  51. end)
  52.  
  53. ToggleRight:OnChanged(function()
  54. print("Toggle changed:", Options.ToggleRight.Value)
  55.  
  56. end)
  57.  
  58. local Slider = LeftSide:AddSlider("Slider", {
  59. Title = "Slider 1 - 10",
  60. Description = "This is a slider", -- IGNORED
  61. Default = 0,
  62. Min = 1,
  63. Max = 10,
  64. Rounding = 1,
  65. Callback = function(Value)
  66. print("Slider was changed:", Value)
  67. end
  68. })
  69.  
  70. Slider:OnChanged(function(Value)
  71. print("Slider changed:", Value)
  72. end)
  73.  
  74. Slider:SetValue(5)
  75.  
  76.  
  77. LeftSide:AddButton({
  78. Title = "Reset Slider to 1",
  79. Description = "Very important button", -- IGNORED
  80. Callback = function()
  81. Options.Slider:SetValue(1)
  82. end
  83. })
  84.  
  85. local Dropdown = RightSide:AddDropdown("Dropdown", {
  86. Title = "Dropdown",
  87. Values = {"one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen"},
  88. Multi = false,
  89. Default = "three",
  90. })
  91.  
  92. Dropdown:SetValue("four")
  93.  
  94. Dropdown:OnChanged(function(Value)
  95. print("Dropdown changed:", Value)
  96. end)
  97.  
  98. local MultiDropdown = RightSide:AddDropdown("Dropdown", {
  99. Title = "Dropdown",
  100. Values = {"one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen"},
  101. Multi = true,
  102. Default = {"eight", "nine", "ten"},
  103. })
  104.  
  105. MultiDropdown:OnChanged(function(Value)
  106. local Values = {}
  107. for Value, State in next, Value do
  108. table.insert(Values, Value)
  109. end
  110. print("Mutlidropdown changed:", table.concat(Values, ", "))
  111. end)
  112.  
  113. RightSide:AddButton({
  114. Title = "Reset MultiDD to 1,2,3",
  115. Description = "Very important button", -- IGNORED
  116. Callback = function()
  117. MultiDropdown:SetValue({
  118. one = true,
  119. two = true,
  120. three = true
  121. })
  122. end
  123. })
  124.  
  125. local ANInput = RightSide:AddInput("ANInput", {
  126. Title = "AlphaNumeric",
  127. Default = "Default",
  128. Placeholder = "Placeholder",
  129. Numeric = false, -- Only allows numbers
  130. Finished = false, -- Only calls callback when you press enter, not for OnChanged
  131. Callback = function(Value)
  132. print("Input changed:", Value)
  133. end
  134. })
  135.  
  136. ANInput:OnChanged(function()
  137. print("Input updated:", ANInput.Value)
  138. end)
  139.  
  140. RightSide:AddButton({
  141. Title = "Change AN Input to LOL",
  142. Description = "Very important button", -- IGNORED
  143. Callback = function()
  144. ANInput:SetValue("LOL")
  145. end
  146. })
  147.  
  148. local NInput = RightSide:AddInput("NInput", {
  149. Title = "Numeric",
  150. Default = "Default",
  151. Placeholder = "Placeholder",
  152. Numeric = true, -- Only allows numbers
  153. Finished = false, -- Only calls callback when you press enter, not for OnChanged
  154. Callback = function(Value)
  155. print("Input changed:", Value)
  156. end
  157. })
  158.  
  159. NInput:OnChanged(function()
  160. print("Input updated:", NInput.Value)
  161. end)
  162.  
  163. RightSide:AddButton({
  164. Title = "Change N Input to 1",
  165. Description = "Very important button", -- IGNORED
  166. Callback = function()
  167. NInput:SetValue("1")
  168. end
  169. })
  170.  
  171. end
  172. -- ----- --
  173.  
  174. -- Tab 2 --
  175. do
  176. local Notip = Tab2:AddSection({Title = "Notification Test"})
  177.  
  178. local Title
  179. local Content
  180. local EnableSubContent = false
  181. local SubContent
  182. local EnableDuration = true
  183. local Duration
  184.  
  185. local TitleInput = Notip:AddInput("TItle", {
  186. Title = "Title",
  187. Default = "Notification",
  188. Placeholder = "Title",
  189. Numeric = false, -- Only allows numbers
  190. Finished = true, -- Only calls callback when you press enter, not for OnChanged
  191. Callback = function(Value)
  192. Title = Value
  193. end
  194. })
  195. local ContentInput = Notip:AddInput("Content", {
  196. Title = "Content",
  197. Default = "Hello There :D",
  198. Placeholder = "Content",
  199. Numeric = false, -- Only allows numbers
  200. Finished = true, -- Only calls callback when you press enter, not for OnChanged
  201. Callback = function(Value)
  202. Content = Value
  203. end
  204. })
  205.  
  206. local AllowSubContent = Notip:AddToggle("AllowSubContent", {Title = "Enable SubContent", Default = EnableSubContent})
  207. AllowSubContent:OnChanged(function(state)
  208. EnableSubContent = state
  209. end)
  210.  
  211. local SubContentInput = Notip:AddInput("SubContent", {
  212. Title = "SubContent",
  213. Default = "I'm a SubContent :0",
  214. Placeholder = "Content",
  215. Numeric = false, -- Only allows numbers
  216. Finished = true, -- Only calls callback when you press enter, not for OnChanged
  217. Callback = function(Value)
  218. SubContent = Value
  219. end
  220. })
  221.  
  222. local AllowDuration = Notip:AddToggle("AllowDuration", {Title = "Enable Duration", Default = EnableDuration})
  223. AllowDuration:OnChanged(function(state)
  224. EnableDuration = state
  225. end)
  226.  
  227. local DurationSlider = Notip:AddSlider("DurationSlider", {
  228. Title = "Duration To Close",
  229. Description = "This is a slider",
  230. Default = 1,
  231. Min = 0,
  232. Max = 10,
  233. Rounding = 1,
  234. Callback = function(Value)
  235. Duration = Value
  236. end
  237. })
  238.  
  239. Notip:AddButton({Title = "Send Notification",
  240. Callback = function()
  241. if EnableSubContent and EnableDuration then
  242. print("Sending With SubContent + Duration")
  243. x2zuLibrary:Notify({
  244. Title = Title,
  245. Content = Content,
  246. SubContent = SubContent,
  247. Duration = Duration
  248. })
  249. elseif EnableSubContent then
  250. print("Sending With SubContent")
  251. x2zuLibrary:Notify({
  252. Title = Title,
  253. Content = Content,
  254. SubContent = SubContent,
  255. Duration = nil
  256. })
  257. elseif EnableDuration then
  258. print("Sending With Duration")
  259. x2zuLibrary:Notify({
  260. Title = Title,
  261. Content = Content,
  262. Duration = Duration
  263. })
  264. else
  265. print("Sending")
  266. x2zuLibrary:Notify({
  267. Title = Title,
  268. Content = Content,
  269. Duration = nil
  270. })
  271. end
  272. end,
  273. })
  274.  
  275.  
  276. end
  277.  
  278. -- NOTES --
  279. local Notes = Tab2:AddSection({Title = "Note"})
  280. Notes:AddParagraph({
  281. Title = "Duration",
  282. Content = "Disabling Duration will make notification last forever until you close it.\n\nSame goes by enabling it, it will last as you set the duration."
  283. })
  284. -- ----- --
Advertisement
Add Comment
Please, Sign In to add comment