Advertisement
ILovePotato

Untitled

Dec 15th, 2024
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.92 KB | None | 0 0
  1. -- Create a ScreenGui
  2. local screenGui = Instance.new("ScreenGui")
  3. screenGui.Parent = game.CoreGui -- Add to CoreGui to make it universal
  4.  
  5. -- Create a scrolling frame to hold all the buttons
  6. local scrollFrame = Instance.new("ScrollingFrame")
  7. scrollFrame.Name = "ButtonScrollFrame"
  8. scrollFrame.Parent = screenGui
  9. scrollFrame.Size = UDim2.new(0, 250, 0, 400) -- Size of the scrollable area
  10. scrollFrame.Position = UDim2.new(0.5, -125, 0.5, -200) -- Centered on the screen
  11. scrollFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30) -- Background color
  12. scrollFrame.ScrollBarThickness = 8 -- Thickness of the scroll bar
  13. scrollFrame.CanvasSize = UDim2.new(0, 0, 0, 0) -- Initially set the canvas size to be dynamic
  14. scrollFrame.ClipsDescendants = true -- Clips the buttons inside the frame
  15. scrollFrame.Visible = false -- Initially hide the scrollFrame
  16.  
  17. -- Add a Title at the top of the frame
  18. local titleLabel = Instance.new("TextLabel")
  19. titleLabel.Parent = scrollFrame
  20. titleLabel.Size = UDim2.new(1, 0, 0, 40) -- Full width, 40px height
  21. titleLabel.Position = UDim2.new(0, 0, 0, 0) -- Top of the frame
  22. titleLabel.BackgroundTransparency = 1 -- Transparent background
  23. titleLabel.Text = "Slap Battles | A Hub That Exist" -- Title text
  24. titleLabel.TextColor3 = Color3.fromRGB(255, 255, 255) -- White text
  25. titleLabel.Font = Enum.Font.GothamBold -- Bold, clean font
  26. titleLabel.TextSize = 18 -- Text size
  27. titleLabel.TextWrapped = true -- Wrap text if needed
  28. titleLabel.ZIndex = 2 -- Ensure it appears above other elements
  29.  
  30. -- Create a UIListLayout to arrange the buttons in a vertical layout
  31. local listLayout = Instance.new("UIListLayout")
  32. listLayout.Parent = scrollFrame
  33. listLayout.Padding = UDim.new(0, 10) -- Padding between buttons
  34. listLayout.FillDirection = Enum.FillDirection.Vertical -- Arrange vertically
  35. listLayout.SortOrder = Enum.SortOrder.LayoutOrder
  36.  
  37. -- Function to create a toggleable "Rhythm Spam" button
  38. local function createRhythmSpamButton()
  39. local rhythmButton = Instance.new("TextButton")
  40. rhythmButton.Parent = scrollFrame
  41. rhythmButton.Size = UDim2.new(0, 220, 0, 50) -- Button size
  42. rhythmButton.Text = "Rhythm Spam" -- Button text
  43. rhythmButton.BackgroundColor3 = Color3.fromRGB(30, 30, 30) -- Dark background
  44. rhythmButton.TextColor3 = Color3.fromRGB(255, 255, 255) -- White text
  45. rhythmButton.Font = Enum.Font.GothamBold -- Sleek font
  46. rhythmButton.TextSize = 18 -- Text size
  47. rhythmButton.BorderSizePixel = 0 -- Remove border
  48.  
  49. -- Add rounded corners
  50. local corner = Instance.new("UICorner")
  51. corner.CornerRadius = UDim.new(0, 12) -- Rounded edges
  52. corner.Parent = rhythmButton
  53.  
  54. -- Create the toggleable cube
  55. local cube = Instance.new("Frame")
  56. cube.Parent = rhythmButton
  57. cube.Size = UDim2.new(0, 20, 0, 20) -- Cube size
  58. cube.Position = UDim2.new(1, -30, 0.5, -10) -- Cube aligned to the right
  59. cube.BackgroundColor3 = Color3.fromRGB(128, 128, 128) -- Gray color by default
  60.  
  61. -- Add rounded corners to the cube
  62. local cubeCorner = Instance.new("UICorner")
  63. cubeCorner.CornerRadius = UDim.new(0, 5) -- Rounded edges for the cube
  64. cubeCorner.Parent = cube
  65.  
  66. -- Toggle state for the cube
  67. local isBlue = false
  68. rhythmButton.MouseButton1Click:Connect(function()
  69. if isBlue then
  70. cube.BackgroundColor3 = Color3.fromRGB(128, 128, 128) -- Change back to gray
  71. else
  72. cube.BackgroundColor3 = Color3.fromRGB(0, 170, 255) -- Change to blue
  73. end
  74. isBlue = not isBlue -- Toggle the state
  75. end)
  76. end
  77.  
  78. -- Function to create buttons dynamically from a table
  79. local function createButtons(buttonConfigs)
  80. for _, config in ipairs(buttonConfigs) do
  81. local button = Instance.new("TextButton")
  82. button.Name = config.name
  83. button.Parent = scrollFrame
  84. button.Size = UDim2.new(0, 220, 0, 50) -- Button dimensions
  85. button.Text = config.name -- Button text
  86. button.BackgroundColor3 = Color3.fromRGB(30, 30, 30) -- Dark background
  87. button.TextColor3 = Color3.fromRGB(255, 255, 255) -- White text
  88. button.Font = Enum.Font.GothamBold -- Sleek font
  89. button.TextSize = 18 -- Text size
  90. button.BorderSizePixel = 0 -- Remove border
  91.  
  92. -- Add rounded corners
  93. local corner = Instance.new("UICorner")
  94. corner.CornerRadius = UDim.new(0, 12) -- Rounded edges
  95. corner.Parent = button
  96.  
  97. -- Add a gradient
  98. local gradient = Instance.new("UIGradient")
  99. gradient.Color = ColorSequence.new{
  100. ColorSequenceKeypoint.new(0, Color3.fromRGB(0, 170, 255)), -- Blue
  101. ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 255, 127)) -- Green
  102. }
  103. gradient.Rotation = 45 -- Diagonal gradient
  104. gradient.Parent = button
  105.  
  106. -- Button hover effect
  107. button.MouseEnter:Connect(function()
  108. button:TweenSize(UDim2.new(0, 240, 0, 60), "Out", "Quad", 0.2, true) -- Grow on hover
  109. button.TextSize = 20
  110. end)
  111.  
  112. button.MouseLeave:Connect(function()
  113. button:TweenSize(UDim2.new(0, 220, 0, 50), "Out", "Quad", 0.2, true) -- Shrink back
  114. button.TextSize = 18
  115. end)
  116.  
  117. -- Attach the provided function to the button
  118. button.MouseButton1Click:Connect(function()
  119. if config.script then
  120. pcall(config.script) -- Safely execute the script
  121. else
  122. print(button.Name .. " clicked!") -- Default action
  123. end
  124. end)
  125. end
  126.  
  127. -- Update the canvas size of the ScrollingFrame to fit all buttons
  128. scrollFrame.CanvasSize = UDim2.new(0, 0, 0, listLayout.AbsoluteContentSize.Y + 10)
  129. end
  130.  
  131. -- Example configuration for buttons
  132. local buttonConfigs = {
  133. {name = "Free Titan", script = function() loadstring(game:HttpGet("https://pastebin.com/raw/qFehGGN1"))() end},
  134. {name = "Anti Ragdoll", script = function() loadstring(game:HttpGet("https://pastebin.com/raw/v88jxFue"))() end},
  135. {name = "Unlock All Gloves", script = function() loadstring(game:HttpGet("https://pastebin.com/raw/PAHTJTJM"))() end},
  136. {name = "Slap Aura", script = function() loadstring(game:HttpGet("https://raw.githubusercontent.com/Bilmemi/bestaura/main/semihu803"))() end},
  137. {name = "Anti Void", script = function() loadstring(game:HttpGet("https://pastebin.com/raw/3KQptdmK"))() end},
  138. {name = "Spam Defaut Ability", script = function() loadstring(game:HttpGet("https://pastebin.com/raw/NcV5NwaT"))() end},
  139. {name = "Troll gui", script = function() loadstring(game:HttpGet("https://pastebin.com/raw/hyn8AWH2"))() end},
  140. {name = "Fling All", script = function() loadstring(game:HttpGet("https://pastebin.com/raw/zqyDSUWX"))() end},
  141. {name = "Infinite Yield", script = function() loadstring(game:HttpGet('https://raw.githubusercontent.com/EdgeIY/infiniteyield/master/source'))() end},
  142. {name = "Nameless admin", script = function() loadstring(game:HttpGet('https://raw.githubusercontent.com/FilteringEnabled/NamelessAdmin/main/Source'))() end},
  143. }
  144.  
  145. -- Create buttons using the configuration table
  146. createButtons(buttonConfigs)
  147.  
  148. -- Add the "Rhythm Spam" button
  149. createRhythmSpamButton()
  150.  
  151. -- Create Open/Close button at the middle left
  152. local openCloseButton = Instance.new("TextButton")
  153. openCloseButton.Name = "OpenCloseButton"
  154. openCloseButton.Parent = screenGui
  155. openCloseButton.Size = UDim2.new(0, 200, 0, 50) -- Button dimensions
  156. openCloseButton.Position = UDim2.new(0, 10, 0.5, -25) -- Middle left
  157. openCloseButton.Text = "Slap Battles Hub"
  158. openCloseButton.BackgroundColor3 = Color3.fromRGB(30, 30, 30) -- Dark background
  159. openCloseButton.TextColor3 = Color3.fromRGB(255, 255, 255) -- White text
  160. openCloseButton.Font = Enum.Font.GothamBold -- Sleek font
  161. openCloseButton.TextSize = 18 -- Text size
  162. openCloseButton.BorderSizePixel = 0 -- Remove border
  163.  
  164. -- Add rounded corners to the Open/Close button
  165. local corner = Instance.new("UICorner")
  166. corner.CornerRadius = UDim.new(0, 12) -- Rounded edges
  167. corner.Parent = openCloseButton
  168.  
  169. -- Add gradient effect to Open/Close button
  170. local gradient = Instance.new("UIGradient")
  171. gradient.Color = ColorSequence.new{
  172. ColorSequenceKeypoint.new(0, Color3.fromRGB(0, 170, 255)), -- Blue
  173. ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 255, 127)) -- Green
  174. }
  175. gradient.Rotation = 45 -- Diagonal gradient
  176. gradient.Parent = openCloseButton
  177.  
  178. -- Add a function to toggle visibility and stylish open/close effects
  179. local guiOpen = false -- To track if the GUI is open or closed
  180.  
  181. openCloseButton.MouseButton1Click:Connect(function()
  182. if guiOpen then
  183. -- Closing Effect
  184. scrollFrame:TweenSize(UDim2.new(0, 250, 0, 0), "Out", "Quad", 0.5, true, function()
  185. scrollFrame.Visible = false
  186. end)
  187. guiOpen = false
  188. else
  189. -- Opening Effect
  190. scrollFrame.Visible = true
  191. scrollFrame:TweenSize(UDim2.new(0, 250, 0, 400), "Out", "Quad", 0.5, true)
  192. guiOpen = true
  193. end
  194. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement