Advertisement
MayWeEnjoy

Modern GUI made by pyst

Nov 4th, 2024 (edited)
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.36 KB | None | 0 0
  1. local player = game.Players.LocalPlayer
  2. local screenGui = Instance.new("ScreenGui", player:WaitForChild("PlayerGui"))
  3. screenGui.Name = "MainGUI"
  4.  
  5. -- Main Frame
  6. local mainFrame = Instance.new("Frame", screenGui)
  7. mainFrame.AnchorPoint = Vector2.new(0.5, 0.5)
  8. mainFrame.Position = UDim2.new(0.5, 0, 0.5, 0)
  9. mainFrame.Size = UDim2.new(0, 400, 0, 300)
  10. mainFrame.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
  11. mainFrame.BorderSizePixel = 0
  12. mainFrame.Visible = true
  13. mainFrame.Active = true
  14. mainFrame.Draggable = true
  15.  
  16. -- Rounded corners
  17. local mainCorner = Instance.new("UICorner", mainFrame)
  18. mainCorner.CornerRadius = UDim.new(0, 10)
  19.  
  20. -- Title
  21. local titleLabel = Instance.new("TextLabel", mainFrame)
  22. titleLabel.Text = "Executor GUI"
  23. titleLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
  24. titleLabel.Font = Enum.Font.GothamBold
  25. titleLabel.TextSize = 18
  26. titleLabel.Position = UDim2.new(0, 10, 0, 10)
  27. titleLabel.BackgroundTransparency = 1
  28. titleLabel.Size = UDim2.new(0, 200, 0, 25)
  29.  
  30. -- Close and Minimize Buttons
  31. local closeButton = Instance.new("TextButton", mainFrame)
  32. closeButton.Text = "X"
  33. closeButton.TextColor3 = Color3.fromRGB(200, 50, 50)
  34. closeButton.Font = Enum.Font.GothamBold
  35. closeButton.TextSize = 16
  36. closeButton.Size = UDim2.new(0, 25, 0, 25)
  37. closeButton.Position = UDim2.new(1, -30, 0, 5)
  38. closeButton.BackgroundTransparency = 1
  39.  
  40. local minimizeButton = Instance.new("TextButton", mainFrame)
  41. minimizeButton.Text = "_"
  42. minimizeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  43. minimizeButton.Font = Enum.Font.GothamBold
  44. minimizeButton.TextSize = 16
  45. minimizeButton.Size = UDim2.new(0, 25, 0, 25)
  46. minimizeButton.Position = UDim2.new(1, -60, 0, 5)
  47. minimizeButton.BackgroundTransparency = 1
  48.  
  49. -- Tab Buttons
  50. local tabFrame = Instance.new("Frame", mainFrame)
  51. tabFrame.Position = UDim2.new(0, 10, 0, 50)
  52. tabFrame.Size = UDim2.new(0, 100, 1, -60)
  53. tabFrame.BackgroundTransparency = 1
  54.  
  55. local tabs = {
  56. {Name = "Main", Buttons = {"Garou Bring", "Random"}},
  57. {Name = "Other", Buttons = {"Another GUI", "idk"}},
  58. {Name = "Settings", Buttons = {}},
  59. {Name = "Credits", Buttons = {}}
  60. }
  61.  
  62. local currentContentFrame
  63.  
  64. local function showNotification()
  65. local guiColor = Color3.fromRGB(45, 45, 45)
  66. local textColor = Color3.fromRGB(255, 255, 255)
  67. local closeColor = Color3.fromRGB(200, 50, 50)
  68.  
  69. local notificationGui = Instance.new("ScreenGui", player:WaitForChild("PlayerGui"))
  70. notificationGui.Name = "NotificationGUI"
  71.  
  72. local notificationFrame = Instance.new("Frame", notificationGui)
  73. notificationFrame.AnchorPoint = Vector2.new(1, 1)
  74. notificationFrame.Position = UDim2.new(1, -20, 1, -20)
  75. notificationFrame.Size = UDim2.new(0, 200, 0, 50)
  76. notificationFrame.BackgroundColor3 = guiColor
  77. notificationFrame.BorderSizePixel = 0
  78.  
  79. local cornerRadius = Instance.new("UICorner", notificationFrame)
  80. cornerRadius.CornerRadius = UDim.new(0, 10)
  81.  
  82. local loadedText = Instance.new("TextLabel", notificationFrame)
  83. loadedText.Text = "Action Executed"
  84. loadedText.TextColor3 = textColor
  85. loadedText.Font = Enum.Font.GothamBold
  86. loadedText.TextSize = 18
  87. loadedText.Size = UDim2.new(1, -30, 1, 0)
  88. loadedText.BackgroundTransparency = 1
  89.  
  90. local closeButton = Instance.new("TextButton", notificationFrame)
  91. closeButton.Text = "X"
  92. closeButton.TextColor3 = closeColor
  93. closeButton.Font = Enum.Font.GothamBold
  94. closeButton.TextSize = 14
  95. closeButton.Size = UDim2.new(0, 25, 0, 25)
  96. closeButton.Position = UDim2.new(1, -25, 0, 0)
  97. closeButton.BackgroundTransparency = 1
  98.  
  99. local function fadeOutAndSlide()
  100. for i = 0, 1, 0.05 do
  101. notificationFrame.Position = UDim2.new(1, -20 + (100 * i), 1, -20)
  102. notificationFrame.BackgroundTransparency = i
  103. loadedText.TextTransparency = i
  104. closeButton.TextTransparency = i
  105. wait(0.05)
  106. end
  107. notificationGui:Destroy()
  108. end
  109.  
  110. closeButton.MouseButton1Click:Connect(fadeOutAndSlide)
  111. wait(5)
  112. fadeOutAndSlide()
  113. end
  114.  
  115. local function switchTab(tabIndex)
  116. if currentContentFrame then
  117. currentContentFrame.Visible = false
  118. end
  119.  
  120. if not tabs[tabIndex].ContentFrame then
  121. local contentFrame = Instance.new("ScrollingFrame", mainFrame)
  122. contentFrame.Size = UDim2.new(1, -120, 1, -60)
  123. contentFrame.Position = UDim2.new(0, 120, 0, 50)
  124. contentFrame.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
  125. contentFrame.BorderSizePixel = 0
  126. contentFrame.Visible = true
  127. contentFrame.CanvasSize = UDim2.new(0, 0, 1.5, 0)
  128.  
  129. local contentCorner = Instance.new("UICorner", contentFrame)
  130. contentCorner.CornerRadius = UDim.new(0, 10)
  131.  
  132. tabs[tabIndex].ContentFrame = contentFrame
  133.  
  134. for i, buttonName in ipairs(tabs[tabIndex].Buttons) do
  135. local button = Instance.new("TextButton", contentFrame)
  136. button.Text = buttonName
  137. button.TextColor3 = Color3.fromRGB(255, 255, 255)
  138. button.Font = Enum.Font.GothamBold
  139. button.TextSize = 14
  140. button.Size = UDim2.new(1, -20, 0, 40)
  141. button.Position = UDim2.new(0, 10, 0, (i - 1) * 50)
  142. button.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
  143. button.BorderSizePixel = 0
  144.  
  145. local buttonCorner = Instance.new("UICorner", button)
  146. buttonCorner.CornerRadius = UDim.new(0, 10)
  147.  
  148. button.MouseButton1Click:Connect(function()
  149. print(buttonName)
  150. showNotification()
  151. end)
  152. end
  153. end
  154.  
  155. tabs[tabIndex].ContentFrame.Visible = true
  156. currentContentFrame = tabs[tabIndex].ContentFrame
  157. end
  158.  
  159. local isMinimized = false
  160.  
  161. minimizeButton.MouseButton1Click:Connect(function()
  162. if not isMinimized then
  163. mainFrame.Size = UDim2.new(0, 400, 0, 60)
  164. tabFrame.Visible = false
  165. if currentContentFrame then
  166. currentContentFrame.Visible = false
  167. end
  168. else
  169. mainFrame.Size = UDim2.new(0, 400, 0, 300)
  170. tabFrame.Visible = true
  171. if currentContentFrame then
  172. currentContentFrame.Visible = true
  173. end
  174. end
  175. isMinimized = not isMinimized
  176. end)
  177.  
  178. closeButton.MouseButton1Click:Connect(function()
  179. screenGui:Destroy()
  180. end)
  181.  
  182. for i, tab in ipairs(tabs) do
  183. local tabButton = Instance.new("TextButton", tabFrame)
  184. tabButton.Text = tab.Name
  185. tabButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  186. tabButton.Font = Enum.Font.GothamBold
  187. tabButton.TextSize = 14
  188. tabButton.Size = UDim2.new(1, 0, 0, 40)
  189. tabButton.Position = UDim2.new(0, 0, 0, (i - 1) * 50)
  190. tabButton.BackgroundColor3 = Color3.fromRGB(50, 50, 50)
  191. tabButton.BorderSizePixel = 0
  192.  
  193. local tabCorner = Instance.new("UICorner", tabButton)
  194. tabCorner.CornerRadius = UDim.new(0, 10)
  195.  
  196. tabButton.MouseButton1Click:Connect(function()
  197. switchTab(i)
  198. end)
  199. end
  200.  
  201. -- Color options for Settings tab
  202. local colors = {
  203. {Name = "Default", Color = Color3.fromRGB(40, 40, 40)},
  204. {Name = "Blue", Color = Color3.fromRGB(0, 122, 204)},
  205. {Name = "Green", Color = Color3.fromRGB(0, 204, 153)},
  206. {Name = "Red", Color = Color3.fromRGB(204, 0, 0)},
  207. {Name = "Purple", Color = Color3.fromRGB(153, 0, 204)},
  208. }
  209.  
  210. local function changeGuiColor(color)
  211. mainFrame.BackgroundColor3 = color
  212. for _, tab in ipairs(tabFrame:GetChildren()) do
  213. if tab:IsA("TextButton") then
  214. tab.BackgroundColor3 = color
  215. end
  216. end
  217. end
  218.  
  219. -- Add options to Settings tab
  220. local function setupSettingsTab()
  221. local contentFrame = tabs[3].ContentFrame
  222.  
  223. -- Title for color change section
  224. local colorTitle = Instance.new("TextLabel", contentFrame)
  225. colorTitle.Text = "Change GUI Color:"
  226. colorTitle.TextColor3 = Color3.fromRGB(255, 255, 255)
  227. colorTitle.Font = Enum.Font.GothamBold
  228. colorTitle.TextSize = 16
  229. colorTitle.Position = UDim2.new(0, 10, 0, 10)
  230. colorTitle.Size = UDim2.new(1, -20, 0, 30)
  231. colorTitle.BackgroundTransparency = 1
  232.  
  233. -- Create buttons for each color option
  234. for i, colorOption in ipairs(colors) do
  235. local colorButton = Instance.new("TextButton", contentFrame)
  236. colorButton.Text = colorOption.Name
  237. colorButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  238. colorButton.Font = Enum.Font.GothamBold
  239. colorButton.TextSize = 14
  240. colorButton.Size = UDim2.new(1, -20, 0, 30)
  241. colorButton.Position = UDim2.new(0, 10, 0, 50 + (i - 1) * 40)
  242. colorButton.BackgroundColor3 = colorOption.Color
  243. colorButton.BorderSizePixel = 0
  244.  
  245. local buttonCorner = Instance.new("UICorner", colorButton)
  246. buttonCorner.CornerRadius = UDim.new(0, 10)
  247.  
  248. colorButton.MouseButton1Click:Connect(function()
  249. changeGuiColor(colorOption.Color)
  250. showNotification()
  251. end)
  252. end
  253.  
  254. -- Toggle GUI shape (rounded or rectangular)
  255. local shapeButton = Instance.new("TextButton", contentFrame)
  256. shapeButton.Text = "Toggle GUI Shape"
  257. shapeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  258. shapeButton.Font = Enum.Font.GothamBold
  259. shapeButton.TextSize = 14
  260. shapeButton.Size = UDim2.new(1, -20, 0, 30)
  261. shapeButton.Position = UDim2.new(0, 10, 0, 50 + #colors * 40)
  262. shapeButton.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
  263. shapeButton.BorderSizePixel = 0
  264.  
  265. local shapeCorner = Instance.new("UICorner", shapeButton)
  266. shapeCorner.CornerRadius = UDim.new(0, 10)
  267.  
  268. local isRounded = true
  269. shapeButton.MouseButton1Click:Connect(function()
  270. isRounded = not isRounded
  271. mainCorner.CornerRadius = isRounded and UDim.new(0, 10) or UDim.new(0, 0)
  272. showNotification()
  273. end)
  274. end
  275.  
  276. -- Credits tab setup
  277. local function setupCreditsTab()
  278. local contentFrame = tabs[4].ContentFrame
  279.  
  280. -- Title for credits
  281. local creditsTitle = Instance.new("TextLabel", contentFrame)
  282. creditsTitle.Text = "Credits"
  283. creditsTitle.TextColor3 = Color3.fromRGB(255, 255, 255)
  284. creditsTitle.Font = Enum.Font.GothamBold
  285. creditsTitle.TextSize = 16
  286. creditsTitle.Position = UDim2.new(0, 10, 0, 10)
  287. creditsTitle.Size = UDim2.new(1, -20, 0, 30)
  288. creditsTitle.BackgroundTransparency = 1
  289.  
  290. -- Placeholder for credit names
  291. local creditText = Instance.new("TextLabel", contentFrame)
  292. creditText.Text = "Your Credits Here"
  293. creditText.TextColor3 = Color3.fromRGB(255, 255, 255)
  294. creditText.Font = Enum.Font.Gotham
  295. creditText.TextSize = 14
  296. creditText.Position = UDim2.new(0, 10, 0, 50)
  297. creditText.Size = UDim2.new(1, -20, 0, 150)
  298. creditText.TextWrapped = true
  299. creditText.BackgroundTransparency = 1
  300. end
  301.  
  302. -- Setup for each tab's content frame
  303. for i, tab in ipairs(tabs) do
  304. local contentFrame = Instance.new("ScrollingFrame", mainFrame)
  305. contentFrame.Size = UDim2.new(1, -120, 1, -60)
  306. contentFrame.Position = UDim2.new(0, 120, 0, 50)
  307. contentFrame.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
  308. contentFrame.BorderSizePixel = 0
  309. contentFrame.Visible = false
  310. contentFrame.CanvasSize = UDim2.new(0, 0, 1.5, 0)
  311.  
  312. local contentCorner = Instance.new("UICorner", contentFrame)
  313. contentCorner.CornerRadius = UDim.new(0, 10)
  314.  
  315. tabs[i].ContentFrame = contentFrame
  316.  
  317. if tab.Name == "Settings" then
  318. setupSettingsTab()
  319. elseif tab.Name == "Credits" then
  320. setupCreditsTab()
  321. else
  322. for j, buttonName in ipairs(tab.Buttons) do
  323. local button = Instance.new("TextButton", contentFrame)
  324. button.Text = buttonName
  325. button.TextColor3 = Color3.fromRGB(255, 255, 255)
  326. button.Font = Enum.Font.GothamBold
  327. button.TextSize = 14
  328. button.Size = UDim2.new(1, -20, 0, 40)
  329. button.Position = UDim2.new(0, 10, 0, (j - 1) * 50)
  330. button.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
  331. button.BorderSizePixel = 0
  332.  
  333. local buttonCorner = Instance.new("UICorner", button)
  334. buttonCorner.CornerRadius = UDim.new(0, 10)
  335.  
  336. button.MouseButton1Click:Connect(function()
  337. print(buttonName)
  338. showNotification()
  339. end)
  340. end
  341. end
  342. end
  343.  
  344. -- Ensure the first tab is visible by default
  345. switchTab(1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement