Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Create a ScreenGui
- local screenGui = Instance.new("ScreenGui")
- screenGui.Parent = game.CoreGui -- Add to CoreGui to make it universal
- -- Create a scrolling frame to hold all the buttons
- local scrollFrame = Instance.new("ScrollingFrame")
- scrollFrame.Name = "ButtonScrollFrame"
- scrollFrame.Parent = screenGui
- scrollFrame.Size = UDim2.new(0, 250, 0, 400) -- Size of the scrollable area
- scrollFrame.Position = UDim2.new(0.5, -125, 0.5, -200) -- Centered on the screen
- scrollFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30) -- Background color
- scrollFrame.ScrollBarThickness = 8 -- Thickness of the scroll bar
- scrollFrame.CanvasSize = UDim2.new(0, 0, 0, 0) -- Initially set the canvas size to be dynamic
- scrollFrame.ClipsDescendants = true -- Clips the buttons inside the frame
- scrollFrame.Visible = false -- Initially hide the scrollFrame
- -- Add a Title at the top of the frame
- local titleLabel = Instance.new("TextLabel")
- titleLabel.Parent = scrollFrame
- titleLabel.Size = UDim2.new(1, 0, 0, 40) -- Full width, 40px height
- titleLabel.Position = UDim2.new(0, 0, 0, 0) -- Top of the frame
- titleLabel.BackgroundTransparency = 1 -- Transparent background
- titleLabel.Text = "Slap Battles | A Hub That Exist" -- Title text
- titleLabel.TextColor3 = Color3.fromRGB(255, 255, 255) -- White text
- titleLabel.Font = Enum.Font.GothamBold -- Bold, clean font
- titleLabel.TextSize = 18 -- Text size
- titleLabel.TextWrapped = true -- Wrap text if needed
- titleLabel.ZIndex = 2 -- Ensure it appears above other elements
- -- Create a UIListLayout to arrange the buttons in a vertical layout
- local listLayout = Instance.new("UIListLayout")
- listLayout.Parent = scrollFrame
- listLayout.Padding = UDim.new(0, 10) -- Padding between buttons
- listLayout.FillDirection = Enum.FillDirection.Vertical -- Arrange vertically
- listLayout.SortOrder = Enum.SortOrder.LayoutOrder
- -- Function to create a toggleable "Rhythm Spam" button
- local function createRhythmSpamButton()
- local rhythmButton = Instance.new("TextButton")
- rhythmButton.Parent = scrollFrame
- rhythmButton.Size = UDim2.new(0, 220, 0, 50) -- Button size
- rhythmButton.Text = "Rhythm Spam" -- Button text
- rhythmButton.BackgroundColor3 = Color3.fromRGB(30, 30, 30) -- Dark background
- rhythmButton.TextColor3 = Color3.fromRGB(255, 255, 255) -- White text
- rhythmButton.Font = Enum.Font.GothamBold -- Sleek font
- rhythmButton.TextSize = 18 -- Text size
- rhythmButton.BorderSizePixel = 0 -- Remove border
- -- Add rounded corners
- local corner = Instance.new("UICorner")
- corner.CornerRadius = UDim.new(0, 12) -- Rounded edges
- corner.Parent = rhythmButton
- -- Create the toggleable cube
- local cube = Instance.new("Frame")
- cube.Parent = rhythmButton
- cube.Size = UDim2.new(0, 20, 0, 20) -- Cube size
- cube.Position = UDim2.new(1, -30, 0.5, -10) -- Cube aligned to the right
- cube.BackgroundColor3 = Color3.fromRGB(128, 128, 128) -- Gray color by default
- -- Add rounded corners to the cube
- local cubeCorner = Instance.new("UICorner")
- cubeCorner.CornerRadius = UDim.new(0, 5) -- Rounded edges for the cube
- cubeCorner.Parent = cube
- -- Toggle state for the cube
- local isBlue = false
- rhythmButton.MouseButton1Click:Connect(function()
- if isBlue then
- cube.BackgroundColor3 = Color3.fromRGB(128, 128, 128) -- Change back to gray
- else
- cube.BackgroundColor3 = Color3.fromRGB(0, 170, 255) -- Change to blue
- end
- isBlue = not isBlue -- Toggle the state
- end)
- end
- -- Function to create buttons dynamically from a table
- local function createButtons(buttonConfigs)
- for _, config in ipairs(buttonConfigs) do
- local button = Instance.new("TextButton")
- button.Name = config.name
- button.Parent = scrollFrame
- button.Size = UDim2.new(0, 220, 0, 50) -- Button dimensions
- button.Text = config.name -- Button text
- button.BackgroundColor3 = Color3.fromRGB(30, 30, 30) -- Dark background
- button.TextColor3 = Color3.fromRGB(255, 255, 255) -- White text
- button.Font = Enum.Font.GothamBold -- Sleek font
- button.TextSize = 18 -- Text size
- button.BorderSizePixel = 0 -- Remove border
- -- Add rounded corners
- local corner = Instance.new("UICorner")
- corner.CornerRadius = UDim.new(0, 12) -- Rounded edges
- corner.Parent = button
- -- Add a gradient
- local gradient = Instance.new("UIGradient")
- gradient.Color = ColorSequence.new{
- ColorSequenceKeypoint.new(0, Color3.fromRGB(0, 170, 255)), -- Blue
- ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 255, 127)) -- Green
- }
- gradient.Rotation = 45 -- Diagonal gradient
- gradient.Parent = button
- -- Button hover effect
- button.MouseEnter:Connect(function()
- button:TweenSize(UDim2.new(0, 240, 0, 60), "Out", "Quad", 0.2, true) -- Grow on hover
- button.TextSize = 20
- end)
- button.MouseLeave:Connect(function()
- button:TweenSize(UDim2.new(0, 220, 0, 50), "Out", "Quad", 0.2, true) -- Shrink back
- button.TextSize = 18
- end)
- -- Attach the provided function to the button
- button.MouseButton1Click:Connect(function()
- if config.script then
- pcall(config.script) -- Safely execute the script
- else
- print(button.Name .. " clicked!") -- Default action
- end
- end)
- end
- -- Update the canvas size of the ScrollingFrame to fit all buttons
- scrollFrame.CanvasSize = UDim2.new(0, 0, 0, listLayout.AbsoluteContentSize.Y + 10)
- end
- -- Example configuration for buttons
- local buttonConfigs = {
- {name = "Free Titan", script = function() loadstring(game:HttpGet("https://pastebin.com/raw/qFehGGN1"))() end},
- {name = "Anti Ragdoll", script = function() loadstring(game:HttpGet("https://pastebin.com/raw/v88jxFue"))() end},
- {name = "Unlock All Gloves", script = function() loadstring(game:HttpGet("https://pastebin.com/raw/PAHTJTJM"))() end},
- {name = "Slap Aura", script = function() loadstring(game:HttpGet("https://raw.githubusercontent.com/Bilmemi/bestaura/main/semihu803"))() end},
- {name = "Anti Void", script = function() loadstring(game:HttpGet("https://pastebin.com/raw/3KQptdmK"))() end},
- {name = "Spam Defaut Ability", script = function() loadstring(game:HttpGet("https://pastebin.com/raw/NcV5NwaT"))() end},
- {name = "Troll gui", script = function() loadstring(game:HttpGet("https://pastebin.com/raw/hyn8AWH2"))() end},
- {name = "Fling All", script = function() loadstring(game:HttpGet("https://pastebin.com/raw/zqyDSUWX"))() end},
- {name = "Infinite Yield", script = function() loadstring(game:HttpGet('https://raw.githubusercontent.com/EdgeIY/infiniteyield/master/source'))() end},
- {name = "Nameless admin", script = function() loadstring(game:HttpGet('https://raw.githubusercontent.com/FilteringEnabled/NamelessAdmin/main/Source'))() end},
- }
- -- Create buttons using the configuration table
- createButtons(buttonConfigs)
- -- Add the "Rhythm Spam" button
- createRhythmSpamButton()
- -- Create Open/Close button at the middle left
- local openCloseButton = Instance.new("TextButton")
- openCloseButton.Name = "OpenCloseButton"
- openCloseButton.Parent = screenGui
- openCloseButton.Size = UDim2.new(0, 200, 0, 50) -- Button dimensions
- openCloseButton.Position = UDim2.new(0, 10, 0.5, -25) -- Middle left
- openCloseButton.Text = "Slap Battles Hub"
- openCloseButton.BackgroundColor3 = Color3.fromRGB(30, 30, 30) -- Dark background
- openCloseButton.TextColor3 = Color3.fromRGB(255, 255, 255) -- White text
- openCloseButton.Font = Enum.Font.GothamBold -- Sleek font
- openCloseButton.TextSize = 18 -- Text size
- openCloseButton.BorderSizePixel = 0 -- Remove border
- -- Add rounded corners to the Open/Close button
- local corner = Instance.new("UICorner")
- corner.CornerRadius = UDim.new(0, 12) -- Rounded edges
- corner.Parent = openCloseButton
- -- Add gradient effect to Open/Close button
- local gradient = Instance.new("UIGradient")
- gradient.Color = ColorSequence.new{
- ColorSequenceKeypoint.new(0, Color3.fromRGB(0, 170, 255)), -- Blue
- ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 255, 127)) -- Green
- }
- gradient.Rotation = 45 -- Diagonal gradient
- gradient.Parent = openCloseButton
- -- Add a function to toggle visibility and stylish open/close effects
- local guiOpen = false -- To track if the GUI is open or closed
- openCloseButton.MouseButton1Click:Connect(function()
- if guiOpen then
- -- Closing Effect
- scrollFrame:TweenSize(UDim2.new(0, 250, 0, 0), "Out", "Quad", 0.5, true, function()
- scrollFrame.Visible = false
- end)
- guiOpen = false
- else
- -- Opening Effect
- scrollFrame.Visible = true
- scrollFrame:TweenSize(UDim2.new(0, 250, 0, 400), "Out", "Quad", 0.5, true)
- guiOpen = true
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement