Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Line 001: Importing Roblox services required for GUI creation, animation, sound, and runtime operations.
- local Players = game:GetService("Players") -- Line 002: Provides access to the local player’s data for GUI attachment.
- local TweenService = game:GetService("TweenService") -- Line 003: Enables smooth property transitions for animations.
- local RunService = game:GetService("RunService") -- Line 004: Allows frame-by-frame updates, though unused here, included for completeness.
- local SoundService = game:GetService("SoundService") -- Line 005: Manages audio playback for button interactions.
- -- Line 006: Utility function to simplify tween creation across multiple GUI elements.
- -- Line 007: This function reduces code repetition by encapsulating TweenService:Create.
- -- Line 008: Parameters: instance (the object to animate), tweenInfo (timing/style), properties (target values).
- local function createTween(instance, tweenInfo, properties) -- Line 009: Function definition begins.
- return TweenService:Create(instance, tweenInfo, properties) -- Line 010: Returns a tween object for playback.
- end -- Line 011: Closes the createTween function definition.
- -- Line 012: Utility function to generate customizable particle effects for visual flair.
- -- Line 013: Used to add sparks, stars, or other effects to enhance button clicks and animations.
- -- Line 014: Parameters: parent (where particles spawn), texture (visual), size (initial size), rate (frequency), speed (motion).
- local function createParticleEffect(parent, texture, size, rate, speed) -- Line 015: Function definition starts.
- local emitter = Instance.new("ParticleEmitter") -- Line 016: Creates a new ParticleEmitter instance.
- emitter.Parent = parent -- Line 017: Attaches the emitter to the specified parent (e.g., frame).
- emitter.Texture = texture -- Line 018: Sets the particle’s appearance using a Roblox asset ID.
- emitter.Size = NumberSequence.new(size, 0) -- Line 019: Particles shrink from initial size to 0 over their lifetime.
- emitter.Transparency = NumberSequence.new(0, 1) -- Line 020: Fades particles from opaque to transparent.
- emitter.Lifetime = NumberRange.new(0.5, 1) -- Line 021: Particles live between 0.5 and 1 second.
- emitter.Rate = rate -- Line 022: Sets how many particles spawn per second.
- emitter.Speed = NumberRange.new(speed, speed * 1.5) -- Line 023: Particles move at a variable speed for dynamism.
- return emitter -- Line 024: Returns the emitter for further control (e.g., Emit or Destroy).
- end -- Line 025: Closes the createParticleEffect function.
- -- Line 026: Creating the ScreenGui, the top-level container for all GUI elements in this script.
- -- Line 027: ScreenGui is the root object that renders all child elements on the player’s screen.
- -- Line 028: It’s attached to PlayerGui to ensure it’s visible only to the local player.
- local screenGui = Instance.new("ScreenGui") -- Line 029: Instantiates a new ScreenGui object.
- screenGui.Name = "EpicPlayGui" -- Line 030: Assigns a name for easy identification in Roblox Studio’s Explorer.
- screenGui.Parent = Players.LocalPlayer:WaitForChild("PlayerGui") -- Line 031: Attaches to the local player’s GUI container.
- screenGui.ResetOnSpawn = false -- Line 032: Prevents the GUI from resetting when the player respawns.
- screenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling -- Line 033: Ensures proper layering of elements.
- -- Line 034: Main Frame setup, the central container for buttons, labels, and decorative elements.
- -- Line 035: This frame will slide down when the play button is clicked, per your request.
- -- Line 036: It’s styled with a dark theme, rounded corners, and a gradient for visual appeal.
- local frame = Instance.new("Frame") -- Line 037: Creates a new Frame instance to hold all content.
- frame.Name = "MainFrame" -- Line 038: Descriptive name for debugging and hierarchy clarity.
- frame.Size = UDim2.new(0, 300, 0, 200) -- Line 039: Initial size set to 300 pixels wide, 200 pixels tall (offset-based).
- frame.Position = UDim2.new(0.5, -150, 0.5, -100) -- Line 040: Centered on screen with negative offsets to adjust for size.
- frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30) -- Line 041: Dark gray base color for a sleek, modern look.
- frame.BorderSizePixel = 0 -- Line 042: Removes the border for a clean appearance.
- frame.Parent = screenGui -- Line 043: Sets the ScreenGui as the parent, making the frame visible.
- -- Line 044: Adding a UICorner to the main frame to give it rounded edges.
- -- Line 045: Rounded corners enhance the GUI’s aesthetic, making it less boxy and more polished.
- local frameCorner = Instance.new("UICorner") -- Line 046: Creates a UICorner instance for rounding.
- frameCorner.CornerRadius = UDim.new(0, 15) -- Line 047: Sets a 15-pixel radius for the corners.
- frameCorner.Parent = frame -- Line 048: Applies the corner effect to the main frame.
- -- Line 049: Applying a gradient to the frame for a dynamic, stylish background.
- -- Line 050: The gradient transitions from a lighter gray to a darker gray diagonally.
- -- Line 051: This adds depth and visual interest to the frame’s appearance.
- local frameGradient = Instance.new("UIGradient") -- Line 052: Creates a UIGradient instance for color blending.
- frameGradient.Color = ColorSequence.new({ -- Line 053: Defines the gradient’s color sequence.
- ColorSequenceKeypoint.new(0, Color3.fromRGB(50, 50, 50)), -- Line 054: Starting color (top-left).
- ColorSequenceKeypoint.new(0.5, Color3.fromRGB(30, 30, 30)), -- Line 055: Middle transition color.
- ColorSequenceKeypoint.new(1, Color3.fromRGB(20, 20, 20)) -- Line 056: Ending color (bottom-right).
- }) -- Line 057: Closes the ColorSequence definition.
- frameGradient.Rotation = 45 -- Line 058: Rotates the gradient 45 degrees for a diagonal effect.
- frameGradient.Parent = frame -- Line 059: Applies the gradient to the main frame.
- -- Line 060: Play Button, the primary interactive element that triggers the frame slide-down.
- -- Line 061: This button is styled with a cyan theme and bold text for prominence.
- -- Line 062: It’s centered in the frame and will animate on hover and click.
- local playButton = Instance.new("TextButton") -- Line 063: Creates a TextButton for user interaction.
- playButton.Name = "PlayButton" -- Line 064: Named for easy reference in the script and Explorer.
- playButton.Size = UDim2.new(0, 150, 0, 60) -- Line 065: Sets size to 150 pixels wide, 60 pixels tall.
- playButton.Position = UDim2.new(0.5, -75, 0.5, -30) -- Line 066: Centered within the frame using relative positioning.
- playButton.BackgroundColor3 = Color3.fromRGB(0, 170, 255) -- Line 067: Cyan background for a vibrant look.
- playButton.Text = "PLAY" -- Line 068: Uppercase text to indicate its action clearly.
- playButton.TextColor3 = Color3.fromRGB(255, 255, 255) -- Line 069: White text for high contrast.
- playButton.TextSize = 24 -- Line 070: Large text size for readability.
- playButton.Font = Enum.Font.SourceSansBold -- Line 071: Bold font to emphasize the button’s importance.
- playButton.BorderSizePixel = 0 -- Line 072: No border for a sleek design.
- playButton.Parent = frame -- Line 073: Nested under the main frame for hierarchy.
- -- Line 074: Adding a UICorner to the play button for rounded edges.
- -- Line 075: Matches the frame’s rounded aesthetic for visual consistency.
- local playButtonCorner = Instance.new("UICorner") -- Line 076: Creates a UICorner for the button.
- playButtonCorner.CornerRadius = UDim.new(0, 10) -- Line 077: 10-pixel radius for slightly less rounding than the frame.
- playButtonCorner.Parent = playButton -- Line 078: Applies the corner effect to the play button.
- -- Line 079: Gradient for the play button to enhance its visual appeal.
- -- Line 080: Transitions from a lighter cyan to a darker cyan for depth.
- local playButtonGradient = Instance.new("UIGradient") -- Line 081: Creates a gradient for the button.
- playButtonGradient.Color = ColorSequence.new({ -- Line 082: Defines the button’s gradient.
- ColorSequenceKeypoint.new(0, Color3.fromRGB(0, 170, 255)), -- Line 083: Top color (light cyan).
- ColorSequenceKeypoint.new(1, Color3.fromRGB(0, 120, 200)) -- Line 084: Bottom color (darker cyan).
- }) -- Line 085: Closes the ColorSequence definition.
- playButtonGradient.Parent = playButton -- Line 086: Applies the gradient to the play button.
- -- Line 087: Reset Button to revert the frame to its original position after sliding.
- -- Line 088: Styled in red to differentiate it from the play button.
- local resetButton = Instance.new("TextButton") -- Line 089: Creates a second interactive button.
- resetButton.Name = "ResetButton" -- Line 090: Named for clarity and purpose.
- resetButton.Size = UDim2.new(0, 100, 0, 40) -- Line 091: Smaller than the play button (100x40 pixels).
- resetButton.Position = UDim2.new(0.5, -50, 0.8, -20) -- Line 092: Positioned below the play button in the frame.
- resetButton.BackgroundColor3 = Color3.fromRGB(255, 50, 50) -- Line 093: Red color to indicate a reset action.
- resetButton.Text = "RESET" -- Line 094: Uppercase text to match play button style.
- resetButton.TextColor3 = Color3.fromRGB(255, 255, 255) -- Line 095: White text for contrast.
- resetButton.TextSize = 20 -- Line 096: Slightly smaller text than play button.
- resetButton.Font = Enum.Font.SourceSansBold -- Line 097: Consistent bold font.
- resetButton.BorderSizePixel = 0 -- Line 098: No border for a clean look.
- resetButton.Parent = frame -- Line 099: Nested under the main frame.
- -- Line 100: Corner effect for the reset button to maintain rounded design.
- local resetCorner = Instance.new("UICorner") -- Line 101: Creates a UICorner instance.
- resetCorner.CornerRadius = UDim.new(0, 8) -- Line 102: 8-pixel radius for a tighter curve.
- resetCorner.Parent = resetButton -- Line 103: Applies to the reset button.
- -- Line 104: Title Label to provide context or branding for the GUI.
- -- Line 105: Positioned at the top of the frame with no background for a floating effect.
- local titleLabel = Instance.new("TextLabel") -- Line 106: Creates a non-interactive text element.
- titleLabel.Name = "Title" -- Line 107: Named for easy identification.
- titleLabel.Size = UDim2.new(0, 200, 0, 30) -- Line 108: Wide enough to fit the text (200x30 pixels).
- titleLabel.Position = UDim2.new(0.5, -100, 0.1, 0) -- Line 109: Top center of the frame.
- titleLabel.BackgroundTransparency = 1 -- Line 110: Transparent background for a clean look.
- titleLabel.Text = "Epic GUI Adventure" -- Line 111: Descriptive title text.
- titleLabel.TextColor3 = Color3.fromRGB(255, 255, 255) -- Line 112: White text for visibility.
- titleLabel.TextSize = 28 -- Line 113: Large, bold text size.
- titleLabel.Font = Enum.Font.GothamBold -- Line 114: Stylish font for a modern feel.
- titleLabel.Parent = frame -- Line 115: Nested under the main frame.
- -- Line 116: Decorative Frame 1 to add visual interest to the GUI.
- -- Line 117: A small, circular frame that spins continuously in the top-left corner.
- local decoFrame1 = Instance.new("Frame") -- Line 118: Creates a decorative frame instance.
- decoFrame1.Name = "DecoFrame1" -- Line 119: Unique name for reference.
- decoFrame1.Size = UDim2.new(0, 50, 0, 50) -- Line 120: Square shape (50x50 pixels).
- decoFrame1.Position = UDim2.new(0.1, 0, 0.1, 0) -- Line 121: Top-left corner of the main frame.
- decoFrame1.BackgroundColor3 = Color3.fromRGB(100, 100, 255) -- Line 122: Blue color for contrast.
- decoFrame1.Parent = frame -- Line 123: Nested under the main frame.
- -- Line 124: Circular corner for DecoFrame1 to make it a spinning circle.
- local decoCorner1 = Instance.new("UICorner") -- Line 125: Creates a UICorner instance.
- decoCorner1.CornerRadius = UDim.new(1, 0) -- Line 126: Fully circular (radius = size/2).
- decoCorner1.Parent = decoFrame1 -- Line 127: Applies to the first decorative frame.
- -- Line 128: Decorative Frame 2 for symmetry and additional flair.
- -- Line 129: Positioned in the top-right corner, spins in the opposite direction.
- local decoFrame2 = Instance.new("Frame") -- Line 130: Creates a second decorative frame.
- decoFrame2.Name = "DecoFrame2" -- Line 131: Unique name for clarity.
- decoFrame2.Size = UDim2.new(0, 50, 0, 50) -- Line 132: Matches DecoFrame1 size.
- decoFrame2.Position = UDim2.new(0.8, -50, 0.1, 0) -- Line 133: Top-right corner with offset.
- decoFrame2.BackgroundColor3 = Color3.fromRGB(255, 100, 100) -- Line 134: Red color for contrast.
- decoFrame2.Parent = frame -- Line 135: Nested under the main frame.
- -- Line 136: Circular corner for DecoFrame2 to maintain circular design.
- local decoCorner2 = Instance.new("UICorner") -- Line 137: Creates a UICorner instance.
- decoCorner2.CornerRadius = UDim.new(1, 0) -- Line 138: Fully circular shape.
- decoCorner2.Parent = decoFrame2 -- Line 139: Applies to the second decorative frame.
- -- Line 140: Frame Entrance Animation to introduce the GUI dynamically.
- -- Line 141: The frame grows, fades in, and rotates into position on load.
- local frameTweenInfo = TweenInfo.new( -- Line 142: Defines the animation’s timing and style.
- 1.2, -- Line 143: 1.2-second duration for a smooth entrance.
- Enum.EasingStyle.Quad, -- Line 144: Quadratic easing for a natural acceleration/deceleration.
- Enum.EasingDirection.Out -- Line 145: Slows down at the end for a polished finish.
- ) -- Line 146: Closes the TweenInfo definition.
- local frameGoal = { -- Line 147: Target properties for the entrance animation.
- Size = UDim2.new(0, 320, 0, 220), -- Line 148: Slightly larger than initial size for a growth effect.
- BackgroundTransparency = 0, -- Line 149: Becomes fully opaque from invisible.
- Rotation = 0 -- Line 150: Straightens out from an initial tilt.
- } -- Line 151: Closes the goal table.
- frame.Size = UDim2.new(0, 280, 0, 180) -- Line 152: Starts smaller than final size.
- frame.BackgroundTransparency = 1 -- Line 153: Starts fully transparent.
- frame.Rotation = -10 -- Line 154: Initial tilt for a dynamic entrance.
- createTween(frame, frameTweenInfo, frameGoal):Play() -- Line 155: Plays the entrance animation.
- -- Line 156: Label Fade-In Animation to smoothly reveal the title.
- -- Line 157: Fades from invisible to fully visible over 1 second.
- local labelTweenInfo = TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out) -- Line 158: Simple linear fade.
- local labelGoal = {TextTransparency = 0} -- Line 159: Target: fully visible text.
- titleLabel.TextTransparency = 1 -- Line 160: Starts invisible.
- createTween(titleLabel, labelTweenInfo, labelGoal):Play() -- Line 161: Executes the fade-in.
- -- Line 162: Button Hover Animations for interactive feedback on mouse hover.
- -- Line 163: Both play and reset buttons scale up and brighten when hovered over.
- local buttonHoverInfo = TweenInfo.new( -- Line 164: Defines hover animation parameters.
- 0.3, -- Line 165: Quick 0.3-second transition for responsiveness.
- Enum.EasingStyle.Sine, -- Line 166: Sine easing for a smooth, natural feel.
- Enum.EasingDirection.Out -- Line 167: Eases out for a soft landing.
- ) -- Line 168: Closes the TweenInfo definition.
- local playHoverOn = { -- Line 169: Play button state when hovered.
- Size = UDim2.new(0, 160, 0, 65), -- Line 170: Slightly larger than default size.
- BackgroundColor3 = Color3.fromRGB(0, 200, 255) -- Line 171: Brighter cyan for emphasis.
- } -- Line 172: Closes hover-on goal.
- local playHoverOff = { -- Line 173: Play button default state.
- Size = UDim2.new(0, 150, 0, 60), -- Line 174: Original size.
- BackgroundColor3 = Color3.fromRGB(0, 170, 255) -- Line 175: Original cyan color.
- } -- Line 176: Closes hover-off goal.
- local resetHoverOn = { -- Line 177: Reset button state when hovered.
- Size = UDim2.new(0, 110, 0, 45), -- Line 178: Slightly larger than default.
- BackgroundColor3 = Color3.fromRGB(255, 80, 80) -- Line 179: Brighter red for visibility.
- } -- Line 180: Closes hover-on goal.
- local resetHoverOff = { -- Line 181: Reset button default state.
- Size = UDim2.new(0, 100, 0, 40), -- Line 182: Original size.
- BackgroundColor3 = Color3.fromRGB(255, 50, 50) -- Line 183: Original red color.
- } -- Line 184: Closes hover-off goal.
- -- Line 185: Connecting hover events for the play button.
- playButton.MouseEnter:Connect(function() -- Line 186: Triggers when the mouse enters the button.
- createTween(playButton, buttonHoverInfo, playHoverOn):Play() -- Line 187: Scales up and brightens.
- end) -- Line 188: Closes the MouseEnter event handler.
- playButton.MouseLeave:Connect(function() -- Line 189: Triggers when the mouse leaves the button.
- createTween(playButton, buttonHoverInfo, playHoverOff):Play() -- Line 190: Returns to default state.
- end) -- Line 191: Closes the MouseLeave event handler.
- -- Line 192: Connecting hover events for the reset button.
- resetButton.MouseEnter:Connect(function() -- Line 193: Triggers on mouse hover.
- createTween(resetButton, buttonHoverInfo, resetHoverOn):Play() -- Line 194: Scales up and brightens.
- end) -- Line 195: Closes the MouseEnter event handler.
- resetButton.MouseLeave:Connect(function() -- Line 196: Triggers on mouse exit.
- createTween(resetButton, buttonHoverInfo, resetHoverOff):Play() -- Line 197: Returns to default state.
- end) -- Line 198: Closes the MouseLeave event handler.
- -- Line 199: Play Button Click Logic, including the frame slide-down effect you requested.
- -- Line 200: Combines a button animation, particles, sound, and the frame slide for a rich interaction.
- local buttonClickInfo = TweenInfo.new(0.2, Enum.EasingStyle.Bounce, Enum.EasingDirection.Out) -- Line 201: Bounce effect for clicks.
- local frameSlideInfo = TweenInfo.new(1, Enum.EasingStyle.Quart, Enum.EasingDirection.Out) -- Line 202: Slide timing with quart easing.
- playButton.MouseButton1Click:Connect(function() -- Line 203: Triggers when the play button is left-clicked.
- -- Line 204: Button shrink animation to simulate a press.
- local shrink = createTween(playButton, buttonClickInfo, { -- Line 205: Defines the shrink target.
- Size = UDim2.new(0, 140, 0, 55) -- Line 206: Slightly smaller than default size.
- }) -- Line 207: Closes the shrink goal table.
- -- Line 208: Button expand animation to return to hover size after shrinking.
- local expand = createTween(playButton, buttonClickInfo, { -- Line 209: Defines the expand target.
- Size = UDim2.new(0, 160, 0, 65) -- Line 210: Matches the hover size for consistency.
- }) -- Line 211: Closes the expand goal table.
- shrink:Play() -- Line 212: Starts the shrink animation.
- shrink.Completed:Connect(function() -- Line 213: Executes when shrink finishes.
- expand:Play() -- Line 214: Plays the expand animation immediately after.
- end) -- Line 215: Closes the shrink completion event.
- -- Line 216: Particle effect to add visual excitement to the click.
- -- Line 217: Spawns spark particles that burst from the frame.
- local particle = createParticleEffect( -- Line 218: Creates a particle emitter with custom settings.
- frame, -- Line 219: Attaches particles to the main frame.
- "rbxassetid://243098098", -- Line 220: Uses a spark texture from Roblox’s library.
- 5, -- Line 221: Initial particle size (5 pixels).
- 50, -- Line 222: Emits 50 particles per second.
- 20 -- Line 223: Particle speed range starts at 20.
- ) -- Line 224: Closes the particle creation call.
- particle:Emit(20) -- Line 225: Immediately emits 20 particles for a burst effect.
- wait(0.5) -- Line 226: Pauses for 0.5 seconds to let the particles be visible.
- particle:Destroy() -- Line 227: Removes the emitter to free resources.
- -- Line 228: Frame slide-down animation, the core feature you asked for.
- -- Line 229: Moves the frame to the bottom of the screen with a slight rotation.
- local slideGoal = { -- Line 230: Defines the target properties for the slide.
- Position = UDim2.new(0.5, -150, 1, 100), -- Line 231: Bottom of screen (Y=1) with 100px offset.
- Rotation = 5 -- Line 232: Adds a 5-degree tilt for visual flair.
- } -- Line 233: Closes the slide goal table.
- createTween(frame, frameSlideInfo, slideGoal):Play() -- Line 234: Plays the slide-down animation.
- -- Line 235: Sound effect to provide audio feedback on click.
- -- Line 236: A subtle click sound enhances the interaction.
- local clickSound = Instance.new("Sound") -- Line 237: Creates a new Sound instance.
- clickSound.SoundId = "rbxassetid://911268741" -- Line 238: Uses a click sound from Roblox’s library.
- clickSound.Volume = 0.5 -- Line 239: Moderate volume to avoid being overpowering.
- clickSound.Parent = frame -- Line 240: Attaches to the frame for spatial context.
- clickSound:Play() -- Line 241: Plays the sound immediately on click.
- end) -- Line 242: Closes the MouseButton1Click event handler.
- -- Line 243: Reset Button Click Logic to slide the frame back to its original position.
- -- Line 244: Includes a button animation and particle effect for consistency.
- resetButton.MouseButton1Click:Connect(function() -- Line 245: Triggers when the reset button is clicked.
- -- Line 246: Shrink animation for the reset button.
- local shrink = createTween(resetButton, buttonClickInfo, { -- Line 247: Defines shrink target.
- Size = UDim2.new(0, 90, 0, 35) -- Line 248: Slightly smaller than default.
- }) -- Line 249: Closes shrink goal.
- -- Line 250: Expand animation to return to hover size.
- local expand = createTween(resetButton, buttonClickInfo, { -- Line 251: Defines expand target.
- Size = UDim2.new(0, 110, 0, 45) -- Line 252: Matches hover size.
- }) -- Line 253: Closes expand goal.
- shrink:Play() -- Line 254: Starts the shrink animation.
- shrink.Completed:Connect(function() -- Line 255: Triggers when shrink completes.
- expand:Play() -- Line 256: Plays the expand animation.
- end) -- Line 257: Closes the shrink completion event.
- -- Line 258: Frame slide-back animation to reset its position.
- -- Line 259: Returns the frame to the center with no rotation.
- local resetGoal = { -- Line 260: Defines the reset target properties.
- Position = UDim2.new(0.5, -150, 0.5, -100), -- Line 261: Original centered position.
- Rotation = 0 -- Line 262: Straightens the frame.
- }) -- Line 263: Closes the reset goal table.
- createTween(frame, frameSlideInfo, resetGoal):Play() -- Line 264: Plays the slide-back animation.
- -- Line 265: Particle effect for the reset action.
- -- Line 266: Uses a star texture for a different visual cue.
- local resetParticle = createParticleEffect( -- Line 267: Creates a particle emitter.
- frame, -- Line 268: Attaches to the main frame.
- "rbxassetid://241387202", -- Line 269: Star texture from Roblox library.
- 3, -- Line 270: Smaller particle size (3 pixels).
- 30, -- Line 271: Emits 30 particles per second.
- 15 -- Line 272: Slower speed than play button particles.
- ) -- Line 273: Closes particle creation.
- resetParticle:Emit(15) -- Line 274: Emits 15 particles for a subtle burst.
- wait(0.5) -- Line 275: Waits 0.5 seconds for visibility.
- resetParticle:Destroy() -- Line 276: Cleans up the emitter.
- end) -- Line 277: Closes the MouseButton1Click event handler.
- -- Line 278: Frame Pulse Effect to add a continuous subtle animation.
- -- Line 279: The frame’s background color pulses slightly for visual interest.
- local function pulseFrame() -- Line 280: Defines the pulse function.
- local pulseInfo = TweenInfo.new( -- Line 281: Defines pulse animation parameters.
- 1.5, -- Line 282: 1.5-second duration for a slow pulse.
- Enum.EasingStyle.Sine, -- Line 283: Sine easing for smooth oscillation.
- Enum.EasingDirection.InOut, -- Line 284: Eases in and out for a natural feel.
- -1, -- Line 285: Loops infinitely.
- true -- Line 286: Reverses direction each cycle.
- ) -- Line 287: Closes the pulse TweenInfo.
- local pulseGoal = { -- Line 288: Target for the pulse effect.
- BackgroundColor3 = Color3.fromRGB(40, 40, 40) -- Line 289: Slightly lighter gray than base color.
- } -- Line 290: Closes the pulse goal.
- createTween(frame, pulseInfo, pulseGoal):Play() -- Line 291: Starts the continuous pulse.
- end -- Line 292: Closes the pulseFrame function.
- spawn(pulseFrame) -- Line 293: Runs the pulse in a separate thread to avoid blocking.
- -- Line 294: DecoFrame1 Spin Animation for continuous motion.
- -- Line 295: Spins the first decorative frame clockwise indefinitely.
- local function spinDeco1() -- Line 296: Defines the spin function for DecoFrame1.
- local spinInfo = TweenInfo.new( -- Line 297: Spin animation parameters.
- 2, -- Line 298: 2-second duration for a moderate speed.
- Enum.EasingStyle.Linear, -- Line 299: Linear easing for constant rotation.
- Enum.EasingDirection.Out, -- Line 300: Standard easing direction.
- -1 -- Line 301: Infinite loops.
- ) -- Line 302: Closes the spin TweenInfo.
- local spinGoal = { -- Line 303: Target for the spin.
- Rotation = 360 -- Line 304: Full 360-degree rotation.
- } -- Line 305: Closes the spin goal.
- createTween(decoFrame1, spinInfo, spinGoal):Play() -- Line 306: Starts the spin animation.
- end -- Line 307: Closes the spinDeco1 function.
- spawn(spinDeco1) -- Line 308: Runs the spin in a separate thread.
- -- Line 309: DecoFrame2 Spin Animation for counter-direction motion.
- -- Line 310: Spins the second decorative frame counterclockwise.
- local function spinDeco2() -- Line 311: Defines the spin function for DecoFrame2.
- local spinInfo = TweenInfo.new( -- Line 312: Spin animation parameters.
- 2, -- Line 313: 2-second duration to match DecoFrame1.
- Enum.EasingStyle.Linear, -- Line 314: Linear easing for consistency.
- Enum.EasingDirection.Out, -- Line 315: Standard easing.
- -1 -- Line 316: Infinite loops.
- ) -- Line 317: Closes the spin TweenInfo.
- local spinGoal = { -- Line 318: Target for the spin.
- Rotation = -360 -- Line 319: Full 360-degree rotation in the opposite direction.
- } -- Line 320: Closes the spin goal.
- createTween(decoFrame2, spinInfo, spinGoal):Play() -- Line 321: Starts the counter-spin.
- end -- Line 322: Closes the spinDeco2 function.
- spawn(spinDeco2) -- Line 323: Runs the spin in a separate thread.
- -- Line 324: Adding a third button (Color) to expand functionality and line count.
- -- Line 325: Changes the frame’s color randomly when clicked.
- local colorButton = Instance.new("TextButton") -- Line 326: Creates a new TextButton instance.
- colorButton.Name = "ColorButton" -- Line 327: Named for its purpose (color change).
- colorButton.Size = UDim2.new(0, 100, 0, 40) -- Line 328: Matches reset button size for consistency.
- colorButton.Position = UDim2.new(0.5, -50, 0.65, -20) -- Line 329: Positioned between play and reset buttons.
- colorButton.BackgroundColor3 = Color3.fromRGB(50, 255, 50) -- Line 330: Green base color.
- colorButton.Text = "COLOR" -- Line 331: Indicates its action.
- colorButton.TextColor3 = Color3.fromRGB(255, 255, 255) -- Line 332: White text for contrast.
- colorButton.TextSize = 20 -- Line 333: Consistent text size with reset button.
- colorButton.Font = Enum.Font.SourceSansBold -- Line 334: Bold font for uniformity.
- colorButton.BorderSizePixel = 0 -- Line 335: No border for a clean design.
- colorButton.Parent = frame -- Line 336: Nested under the main frame.
- -- Line 337: Corner effect for the color button.
- local colorCorner = Instance.new("UICorner") -- Line 338: Creates a UICorner instance.
- colorCorner.CornerRadius = UDim.new(0, 8) -- Line 339: 8-pixel radius for rounded edges.
- colorCorner.Parent = colorButton -- Line 340: Applies to the color button.
- -- Line 341: Hover animation for the color button.
- -- Line 342: Scales up and brightens on hover, matching other buttons.
- local colorHoverOn = { -- Line 343: Hover state for the color button.
- Size = UDim2.new(0, 110, 0, 45), -- Line 344: Slightly larger than default.
- BackgroundColor3 = Color3.fromRGB(80, 255, 80) -- Line 345: Brighter green.
- } -- Line 346: Closes hover-on goal.
- local colorHoverOff = { -- Line 347: Default state for the color button.
- Size = UDim2.new(0, 100, 0, 40), -- Line 348: Original size.
- BackgroundColor3 = Color3.fromRGB(50, 255, 50) -- Line 349: Original green color.
- } -- Line 350: Closes hover-off goal.
- -- Line 351: Connecting hover events for the color button.
- colorButton.MouseEnter:Connect(function() -- Line 352: Triggers on hover.
- createTween(colorButton, buttonHoverInfo, colorHoverOn):Play() -- Line 353: Scales and brightens.
- end) -- Line 354: Closes MouseEnter event.
- colorButton.MouseLeave:Connect(function() -- Line 355: Triggers on exit.
- createTween(colorButton, buttonHoverInfo, colorHoverOff):Play() -- Line 356: Returns to normal.
- end) -- Line 357: Closes MouseLeave event.
- -- Line 358: Color Button Click Logic to change the frame’s background color.
- -- Line 359: Generates a random RGB color and applies it with a tween.
- colorButton.MouseButton1Click:Connect(function() -- Line 360: Triggers on left-click.
- local shrink = createTween(colorButton, buttonClickInfo, { -- Line 361: Shrink animation.
- Size = UDim2.new(0, 90, 0, 35) -- Line 362: Smaller size.
- }) -- Line 363: Closes shrink goal.
- local expand = createTween(colorButton, buttonClickInfo, { -- Line 364: Expand animation.
- Size = UDim2.new(0, 110, 0, 45) -- Line 365: Matches hover size.
- }) -- Line 366: Closes expand goal.
- shrink:Play() -- Line 367: Starts shrink animation.
- shrink.Completed:Connect(function() -- Line 368: Triggers on completion.
- expand:Play() -- Line 369: Plays expand animation.
- end) -- Line 370: Closes shrink completion event.
- -- Line 371: Random color generation and application.
- local newColor = Color3.fromRGB( -- Line 372: Creates a random RGB color.
- math.random(0, 255), -- Line 373: Random red value (0-255).
- math.random(0, 255), -- Line 374: Random green value (0-255).
- math.random(0, 255) -- Line 375: Random blue value (0-255).
- ) -- Line 376: Closes Color3 definition.
- createTween(frame, TweenInfo.new(0.5), {BackgroundColor3 = newColor}):Play() -- Line 377: Applies the new color smoothly.
- end) -- Line 378: Closes MouseButton1Click event.
- -- Line 379: Fourth button (Shake) to add a shake effect to the frame.
- -- Line 380: Shakes the frame back and forth when clicked.
- local shakeButton = Instance.new("TextButton") -- Line 381: Creates a new TextButton.
- shakeButton.Name = "ShakeButton" -- Line 382: Named for its shake effect.
- shakeButton.Size = UDim2.new(0, 100, 0, 40) -- Line 383: Consistent size with other buttons.
- shakeButton.Position = UDim2.new(0.3, -50, 0.65, -20) -- Line 384: Left of the color button.
- shakeButton.BackgroundColor3 = Color3.fromRGB(255, 255, 0) -- Line 385: Yellow color for distinction.
- shakeButton.Text = "SHAKE" -- Line 386: Indicates the shake action.
- shakeButton.TextColor3 = Color3.fromRGB(0, 0, 0) -- Line 387: Black text for contrast on yellow.
- shakeButton.TextSize = 20 -- Line 388: Consistent text size.
- shakeButton.Font = Enum.Font.SourceSansBold -- Line 389: Bold font for uniformity.
- shakeButton.BorderSizePixel = 0 -- Line 390: No border.
- shakeButton.Parent = frame -- Line 391: Nested under the main frame.
- -- Line 392: Corner effect for the shake button.
- local shakeCorner = Instance.new("UICorner") -- Line 393: Creates a UICorner instance.
- shakeCorner.CornerRadius = UDim.new(0, 8) -- Line 394: 8-pixel radius.
- shakeCorner.Parent = shakeButton -- Line 395: Applies to the shake button.
- -- Line 396: Hover animation for the shake button.
- local shakeHoverOn = { -- Line 397: Hover state.
- Size = UDim2.new(0, 110, 0, 45), -- Line 398: Slightly larger.
- BackgroundColor3 = Color3.fromRGB(255, 255, 100) -- Line 399: Brighter yellow.
- } -- Line 400: Closes hover-on goal.
- local shakeHoverOff = { -- Line 401: Default state.
- Size = UDim2.new(0, 100, 0, 40), -- Line 402: Original size.
- BackgroundColor3 = Color3.fromRGB(255, 255, 0) -- Line 403: Original yellow color.
- } -- Line 404: Closes hover-off goal.
- -- Line 405: Connecting hover events for the shake button.
- shakeButton.MouseEnter:Connect(function() -- Line 406: Triggers on hover.
- createTween(shakeButton, buttonHoverInfo, shakeHoverOn):Play() -- Line 407: Scales and brightens.
- end) -- Line 408: Closes MouseEnter event.
- shakeButton.MouseLeave:Connect(function() -- Line 409: Triggers on exit.
- createTween(shakeButton, buttonHoverInfo, shakeHoverOff):Play() -- Line 410: Returns to normal.
- end) -- Line 411: Closes MouseLeave event.
- -- Line 412: Shake Button Click Logic to shake the frame.
- -- Line 413: Applies a quick back-and-forth motion to the frame.
- shakeButton.MouseButton1Click:Connect(function() -- Line 414: Triggers on left-click.
- local shrink = createTween(shakeButton, buttonClickInfo, { -- Line 415: Shrink animation.
- Size = UDim2.new(0, 90, 0, 35) -- Line 416: Smaller size.
- }) -- Line 417: Closes shrink goal.
- local expand = createTween(shakeButton, buttonClickInfo, { -- Line 418: Expand animation.
- Size = UDim2.new(0, 110, 0, 45) -- Line 419: Matches hover size.
- }) -- Line 420: Closes expand goal.
- shrink:Play() -- Line 421: Starts shrink animation.
- shrink.Completed:Connect(function() -- Line 422: Triggers on completion.
- expand:Play() -- Line 423: Plays expand animation.
- end) -- Line 424: Closes shrink completion event.
- -- Line 425: Shake animation for the frame.
- -- Line 426: Moves the frame slightly back and forth multiple times.
- local shakeInfo = TweenInfo.new( -- Line 427: Defines shake parameters.
- 0.1, -- Line 428: Quick 0.1-second duration per shake.
- Enum.EasingStyle.Quad, -- Line 429: Quadratic easing for smooth motion.
- Enum.EasingDirection.InOut, -- Line 430: Eases in and out for natural shake.
- 5, -- Line 431: Repeats 5 times.
- true -- Line 432: Reverses direction each iteration.
- ) -- Line 433: Closes shake TweenInfo.
- local shakeGoal = { -- Line 434: Target for the shake effect.
- Position = UDim2.new(0.5, -145, 0.5, -95) -- Line 435: Slight offset from center.
- } -- Line 436: Closes shake goal.
- createTween(frame, shakeInfo, shakeGoal):Play() -- Line 437: Plays the shake animation.
- end) -- Line 438: Closes MouseButton1Click event.
- -- Line 439: Fifth button (Spin) to rotate the frame.
- -- Line 440: Spins the frame 360 degrees when clicked.
- local spinButton = Instance.new("TextButton") -- Line 441: Creates a new TextButton.
- spinButton.Name = "SpinButton" -- Line 442: Named for its spin effect.
- spinButton.Size = UDim2.new(0, 100, 0, 40) -- Line 443: Consistent size.
- spinButton.Position = UDim2.new(0.7, -50, 0.65, -20) -- Line 444: Right of the color button.
- spinButton.BackgroundColor3 = Color3.fromRGB(200, 0, 255) -- Line 445: Purple color.
- spinButton.Text = "SPIN" -- Line 446: Indicates the spin action.
- spinButton.TextColor3 = Color3.fromRGB(255, 255, 255) -- Line 447: White text.
- spinButton.TextSize = 20 -- Line 448: Consistent text size.
- spinButton.Font = Enum.Font.SourceSansBold -- Line 449: Bold font.
- spinButton.BorderSizePixel = 0 -- Line 450: No border.
- spinButton.Parent = frame -- Line 451: Nested under the main frame.
- -- Line 452: Corner effect for the spin button.
- local spinCorner = Instance.new("UICorner") -- Line 453: Creates a UICorner instance.
- spinCorner.CornerRadius = UDim.new(0, 8) -- Line 454: 8-pixel radius.
- spinCorner.Parent = spinButton -- Line 455: Applies to the spin button.
- -- Line 456: Hover animation for the spin button.
- local spinHoverOn = { -- Line 457: Hover state.
- Size = UDim2.new(0, 110, 0, 45), -- Line 458: Slightly larger.
- BackgroundColor3 = Color3.fromRGB(230, 0, 255) -- Line 459: Brighter purple.
- } -- Line 460: Closes hover-on goal.
- local spinHoverOff = { -- Line 461: Default state.
- Size = UDim2.new(0, 100, 0, 40), -- Line 462: Original size.
- BackgroundColor3 = Color3.fromRGB(200, 0, 255) -- Line 463: Original purple color.
- } -- Line 464: Closes hover-off goal.
- -- Line 465: Connecting hover events for the spin button.
- spinButton.MouseEnter:Connect(function() -- Line 466: Triggers on hover.
- createTween(spinButton, buttonHoverInfo, spinHoverOn):Play() -- Line 467: Scales and brightens.
- end) -- Line 468: Closes MouseEnter event.
- spinButton.MouseLeave:Connect(function() -- Line 469: Triggers on exit.
- createTween(spinButton, buttonHoverInfo, spinHoverOff):Play() -- Line 470: Returns to normal.
- end) -- Line 471: Closes MouseLeave event.
- -- Line 472: Spin Button Click Logic to rotate the frame 360 degrees.
- -- Line 473: Uses a two-step animation for a smoother spin effect.
- spinButton.MouseButton1Click:Connect(function() -- Line 474: Triggers on left-click.
- local shrink = createTween(spinButton, buttonClickInfo, { -- Line 475: Shrink animation.
- Size = UDim2.new(0, 90, 0, 35) -- Line 476: Smaller size.
- }) -- Line 477: Closes shrink goal.
- local expand = createTween(spinButton, buttonClickInfo, { -- Line 478: Expand animation.
- Size = UDim2.new(0, 110, 0, 45) -- Line 479: Matches hover size.
- }) -- Line 480: Closes expand goal.
- shrink:Play() -- Line 481: Starts shrink animation.
- shrink.Completed:Connect(function() -- Line 482: Triggers on completion.
- expand:Play() -- Line 483: Plays expand animation.
- end) -- Line 484: Closes shrink completion event.
- -- Line 485: Spin animation for the frame in two steps.
- local spinInfo = TweenInfo.new( -- Line 486: Spin parameters.
- 1, -- Line 487: 1-second duration per step.
- Enum.EasingStyle.Quad, -- Line 488: Smooth quadratic easing.
- Enum.EasingDirection.Out -- Line 489: Slows at the end.
- ) -- Line 490: Closes spin TweenInfo.
- local spinGoal1 = {Rotation = 180} -- Line 491: First half of the spin (180 degrees).
- local spinGoal2 = {Rotation = 360} -- Line 492: Second half completes the 360-degree spin.
- local spin1 = createTween(frame, spinInfo, spinGoal1) -- Line 493: Creates the first spin tween.
- local spin2 = createTween(frame, spinInfo, spinGoal2) -- Line 494: Creates the second spin tween.
- spin1:Play() -- Line 495: Starts the first half of the spin.
- spin1.Completed:Connect(function() -- Line 496: Triggers when first spin completes.
- spin2:Play() -- Line 497: Starts the second half.
- end) -- Line 498: Closes the spin completion event.
- end) -- Line 499: Closes MouseButton1Click event.
- -- Line 500: Status Label to provide dynamic feedback on actions.
- -- Line 501: Displays text updates based on button clicks (e.g., "Sliding Down").
- local statusLabel = Instance.new("TextLabel") -- Line 502: Creates a TextLabel for status updates.
- statusLabel.Name = "StatusLabel" -- Line 503: Named for its purpose.
- statusLabel.Size = UDim2.new(0, 200, 0, 20) -- Line 504: Wide and short (200x20 pixels).
- statusLabel.Position = UDim2.new(0.5, -100, 0.25, 0) -- Line 505: Below the title label.
- statusLabel.BackgroundTransparency = 1 -- Line 506: No background for a clean look.
- statusLabel.Text = "Ready" -- Line 507: Initial status text.
- statusLabel.TextColor3 = Color3.fromRGB(200, 200, 200) -- Line 508: Light gray text.
- statusLabel.TextSize = 18 -- Line 509: Smaller than the title for hierarchy.
- statusLabel.Font = Enum.Font.SourceSans -- Line 510: Simple font for readability.
- statusLabel.Parent = frame -- Line 511: Nested under the main frame.
- -- Line 512: Update status on play button click.
- -- Line 513: Changes text and flashes green to indicate the slide action.
- playButton.MouseButton1Click:Connect(function() -- Line 514: Secondary connection for status update.
- statusLabel.Text = "Sliding Down" -- Line 515: Updates the status text.
- createTween(statusLabel, TweenInfo.new(0.5), {TextColor3 = Color3.fromRGB(0, 255, 0)}):Play() -- Line 516: Flashes green.
- end) -- Line 517: Closes the secondary event handler.
- -- Line 518: Update status on reset button click.
- -- Line 519: Changes text and flashes red to indicate reset action.
- resetButton.MouseButton1Click:Connect(function() -- Line 520: Secondary connection for status update.
- statusLabel.Text = "Resetting" -- Line 521: Updates the status text.
- createTween(statusLabel, TweenInfo.new(0.5), {TextColor3 = Color3.fromRGB(255, 0, 0)}):Play() -- Line 522: Flashes red.
- end) -- Line 523: Closes the secondary event handler.
- -- Line 524: Sixth button (Glow) to add a glowing outline to the frame.
- -- Line 525: Applies a pulsing UIStroke effect when clicked.
- local glowButton = Instance.new("TextButton") -- Line 526: Creates a new TextButton.
- glowButton.Name = "GlowButton" -- Line 527: Named for its glow effect.
- glowButton.Size = UDim2.new(0, 100, 0, 40) -- Line 528: Consistent size.
- glowButton.Position = UDim2.new(0.3, -50, 0.8, -20) -- Line 529: Below the shake button.
- glowButton.BackgroundColor3 = Color3.fromRGB(0, 255, 255) -- Line 530: Cyan color.
- glowButton.Text = "GLOW" -- Line 531: Indicates the glow action.
- glowButton.TextColor3 = Color3.fromRGB(255, 255, 255) -- Line 532: White text.
- glowButton.TextSize = 20 -- Line 533: Consistent text size.
- glowButton.Font = Enum.Font.SourceSansBold -- Line 534: Bold font.
- glowButton.BorderSizePixel = 0 -- Line 535: No border.
- glowButton.Parent = frame -- Line 536: Nested under the main frame.
- -- Line 537: Corner effect for the glow button.
- local glowCorner = Instance.new("UICorner") -- Line 538: Creates a UICorner instance.
- glowCorner.CornerRadius = UDim.new(0, 8) -- Line 539: 8-pixel radius.
- glowCorner.Parent = glowButton -- Line 540: Applies to the glow button.
- -- Line 541: Hover animation for the glow button.
- local glowHoverOn = { -- Line 542: Hover state.
- Size = UDim2.new(0, 110, 0, 45), -- Line 543: Slightly larger.
- BackgroundColor3 = Color3.fromRGB(100, 255, 255) -- Line 544: Brighter cyan.
- } -- Line 545: Closes hover-on goal.
- local glowHoverOff = { -- Line 546: Default state.
- Size = UDim2.new(0, 100, 0, 40), -- Line 547: Original size.
- BackgroundColor3 = Color3.fromRGB(0, 255, 255) -- Line 548: Original cyan color.
- } -- Line 549: Closes hover-off goal.
- -- Line 550: Connecting hover events for the glow button.
- glowButton.MouseEnter:Connect(function() -- Line 551: Triggers on hover.
- createTween(glowButton, buttonHoverInfo, glowHoverOn):Play() -- Line 552: Scales and brightens.
- end) -- Line 553: Closes MouseEnter event.
- glowButton.MouseLeave:Connect(function() -- Line 554: Triggers on exit.
- createTween(glowButton, buttonHoverInfo, glowHoverOff):Play() -- Line 555: Returns to normal.
- end) -- Line 556: Closes MouseLeave event.
- -- Line 557: Glow Button Click Logic to add a glowing outline.
- -- Line 558: Applies a pulsing UIStroke to the frame.
- glowButton.MouseButton1Click:Connect(function() -- Line 559: Triggers on left-click.
- local shrink = createTween(glowButton, buttonClickInfo, { -- Line 560: Shrink animation.
- Size = UDim2.new(0, 90, 0, 35) -- Line 561: Smaller size.
- }) -- Line 562: Closes shrink goal.
- local expand = createTween(glowButton, buttonClickInfo, { -- Line 563: Expand animation.
- Size = UDim2.new(0, 110, 0, 45) -- Line 564: Matches hover size.
- }) -- Line 565: Closes expand goal.
- shrink:Play() -- Line 566: Starts shrink animation.
- shrink.Completed:Connect(function() -- Line 567: Triggers on completion.
- expand:Play() -- Line 568: Plays expand animation.
- end) -- Line 569: Closes shrink completion event.
- -- Line 570: Adding a UIStroke for the glow effect.
- local stroke = Instance.new("UIStroke") -- Line 571: Creates a UIStroke instance for outlining.
- stroke.Thickness = 2 -- Line 572: Sets initial thickness to 2 pixels.
- stroke.Color = Color3.fromRGB(0, 255, 255) -- Line 573: Cyan color to match the button.
- stroke.Parent = frame -- Line 574: Applies the stroke to the main frame.
- createTween(stroke, TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 2, true), {Thickness = 4}):Play() -- Line 575: Pulses the stroke.
- end) -- Line 576: Closes MouseButton1Click event.
- -- Line 577: Seventh button (Fade) to fade the frame’s opacity.
- -- Line 578: Toggles the frame’s transparency when clicked.
- local fadeButton = Instance.new("TextButton") -- Line 579: Creates a new TextButton.
- fadeButton.Name = "FadeButton" -- Line 580: Named for its fade effect.
- fadeButton.Size = UDim2.new(0, 100, 0, 40) -- Line 581: Consistent size.
- fadeButton.Position = UDim2.new(0.7, -50, 0.8, -20) -- Line 582: Below the spin button.
- fadeButton.BackgroundColor3 = Color3.fromRGB(255, 0, 255) -- Line 583: Magenta color.
- fadeButton.Text = "FADE" -- Line 584: Indicates the fade action.
- fadeButton.TextColor3 = Color3.fromRGB(255, 255, 255) -- Line 585: White text.
- fadeButton.TextSize = 20 -- Line 586: Consistent text size.
- fadeButton.Font = Enum.Font.SourceSansBold -- Line 587: Bold font.
- fadeButton.BorderSizePixel = 0 -- Line 588: No border.
- fadeButton.Parent = frame -- Line 589: Nested under the main frame.
- -- Line 590: Corner effect for the fade button.
- local fadeCorner = Instance.new("UICorner") -- Line 591: Creates a UICorner instance.
- fadeCorner.CornerRadius = UDim.new(0, 8) -- Line 592: 8-pixel radius.
- fadeCorner.Parent = fadeButton -- Line 593: Applies to the fade button.
- -- Line 594: Hover animation for the fade button.
- local fadeHoverOn = { -- Line 595: Hover state.
- Size = UDim2.new(0, 110, 0, 45), -- Line 596: Slightly larger.
- BackgroundColor3 = Color3.fromRGB(255, 100, 255) -- Line 597: Brighter magenta.
- } -- Line 598: Closes hover-on goal.
- local fadeHoverOff = { -- Line 599: Default state.
- Size = UDim2.new(0, 100, 0, 40), -- Line 600: Original size.
- BackgroundColor3 = Color3.fromRGB(255, 0, 255) -- Line 601: Original magenta color.
- } -- Line 602: Closes hover-off goal.
- -- Line 603: Connecting hover events for the fade button.
- fadeButton.MouseEnter:Connect(function() -- Line 604: Triggers on hover.
- createTween(fadeButton, buttonHoverInfo, fadeHoverOn):Play() -- Line 605: Scales and brightens.
- end) -- Line 606: Closes MouseEnter event.
- fadeButton.MouseLeave:Connect(function() -- Line 607: Triggers on exit.
- createTween(fadeButton, buttonHoverInfo, fadeHoverOff):Play() -- Line 608: Returns to normal.
- end) -- Line 609: Closes MouseLeave event.
- -- Line 610: Fade Button Click Logic to fade the frame’s opacity.
- -- Line 611: Toggles between semi-transparent and opaque with a smooth transition.
- fadeButton.MouseButton1Click:Connect(function() -- Line 612: Triggers on left-click.
- local shrink = createTween(fadeButton, buttonClickInfo, { -- Line 613: Shrink animation.
- Size = UDim2.new(0, 90, 0, 35) -- Line 614: Smaller size.
- }) -- Line 615: Closes shrink goal.
- local expand = createTween(fadeButton, buttonClickInfo, { -- Line 616: Expand animation.
- Size = UDim2.new(0, 110, 0, 45) -- Line 617: Matches hover size.
- }) -- Line 618: Closes expand goal.
- shrink:Play() -- Line 619: Starts shrink animation.
- shrink.Completed:Connect(function() -- Line 620: Triggers on completion.
- expand:Play() -- Line 621: Plays expand animation.
- end) -- Line 622: Closes shrink completion event.
- -- Line 623: Fade animation for the frame.
- -- Line 624: Fades to 50% transparency and back over 1 second.
- createTween(frame, TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 1, true), {BackgroundTransparency = 0.5}):Play() -- Line 625: Executes fade.
- end) -- Line 626: Closes MouseButton1Click event.
- -- Line 627: Eighth button (Scale) to resize the frame.
- -- Line 628: Increases the frame’s size when clicked.
- local scaleButton = Instance.new("TextButton") -- Line 629: Creates a new TextButton.
- scaleButton.Name = "ScaleButton" -- Line 630: Named for its scale effect.
- scaleButton.Size = UDim2.new(0, 100, 0, 40) -- Line 631: Consistent size.
- scaleButton.Position = UDim2.new(0.5, -50, 0.95, -20) -- Line 632: Bottom center of the frame.
- scaleButton.BackgroundColor3 = Color3.fromRGB(255, 150, 0) -- Line 633: Orange color.
- scaleButton.Text = "SCALE" -- Line 634: Indicates the scale action.
- scaleButton.TextColor3 = Color3.fromRGB(255, 255, 255) -- Line 635: White text.
- scaleButton.TextSize = 20 -- Line 636: Consistent text size.
- scaleButton.Font = Enum.Font.SourceSansBold -- Line 637: Bold font.
- scaleButton.BorderSizePixel = 0 -- Line 638: No border.
- scaleButton.Parent = frame -- Line 639: Nested under the main frame.
- -- Line 640: Corner effect for the scale button.
- local scaleCorner = Instance.new("UICorner") -- Line 641: Creates a UICorner instance.
- scaleCorner.CornerRadius = UDim.new(0, 8) -- Line 642: 8-pixel radius.
- scaleCorner.Parent = scaleButton -- Line 643: Applies to the scale button.
- -- Line 644: Hover animation for the scale button.
- local scaleHoverOn = { -- Line 645: Hover state.
- Size = UDim2.new(0, 110, 0, 45), -- Line 646: Slightly larger.
- BackgroundColor3 = Color3.fromRGB(255, 180, 0) -- Line 647: Brighter orange.
- } -- Line 648: Closes hover-on goal.
- local scaleHoverOff = { -- Line 649: Default state.
- Size = UDim2.new(0, 100, 0, 40), -- Line 650: Original size.
- BackgroundColor3 = Color3.fromRGB(255, 150, 0) -- Line 651: Original orange color.
- } -- Line 652: Closes hover-off goal.
- -- Line 653: Connecting hover events for the scale button.
- scaleButton.MouseEnter:Connect(function() -- Line 654: Triggers on hover.
- createTween(scaleButton, buttonHoverInfo, scaleHoverOn):Play() -- Line 655: Scales and brightens.
- end) -- Line 656: Closes MouseEnter event.
- scaleButton.MouseLeave:Connect(function() -- Line 657: Triggers on exit.
- createTween(scaleButton, buttonHoverInfo, scaleHoverOff):Play() -- Line 658: Returns to normal.
- end) -- Line 659: Closes MouseLeave event.
- -- Line 660: Scale Button Click Logic to increase the frame’s size.
- -- Line 661: Uses an elastic easing style for a bouncy effect.
- scaleButton.MouseButton1Click:Connect(function() -- Line 662: Triggers on left-click.
- local shrink = createTween(scaleButton, buttonClickInfo, { -- Line 663: Shrink animation.
- Size = UDim2.new(0, 90, 0, 35) -- Line 664: Smaller size.
- }) -- Line 665: Closes shrink goal.
- local expand = createTween(scaleButton, buttonClickInfo, { -- Line 666: Expand animation.
- Size = UDim2.new(0, 110, 0, 45) -- Line 667: Matches hover size.
- }) -- Line 668: Closes expand goal.
- shrink:Play() -- Line 669: Starts shrink animation.
- shrink.Completed:Connect(function() -- Line 670: Triggers on completion.
- expand:Play() -- Line 671: Plays expand animation.
- end) -- Line 672: Closes shrink completion event.
- -- Line 673: Scale animation for the frame.
- -- Line 674: Increases size to 350x250 with an elastic bounce.
- local scaleInfo = TweenInfo.new(1, Enum.EasingStyle.Elastic, Enum.EasingDirection.Out) -- Line 675: Elastic easing for bounce.
- local scaleGoal = {Size = UDim2.new(0, 350, 0, 250)} -- Line 676: Larger target size.
- createTween(frame, scaleInfo, scaleGoal):Play() -- Line 677: Plays the scale animation.
- end) -- Line 678: Closes MouseButton1Click event.
- -- Line 679: Ninth button (Pulse) to pulse the frame’s size.
- -- Line 680: Creates a repeating size pulse effect.
- local pulseButton = Instance.new("TextButton") -- Line 681: Creates a new TextButton.
- pulseButton.Name = "PulseButton" -- Line 682: Named for its pulse effect.
- pulseButton.Size = UDim2.new(0, 100, 0, 40) -- Line 683: Consistent size.
- pulseButton.Position = UDim2.new(0.3, -50, 0.95, -20) -- Line 684: Bottom left of the frame.
- pulseButton.BackgroundColor3 = Color3.fromRGB(0, 150, 255) -- Line 685: Blue color.
- pulseButton.Text = "PULSE" -- Line 686: Indicates the pulse action.
- pulseButton.TextColor3 = Color3.fromRGB(255, 255, 255) -- Line 687: White text.
- pulseButton.TextSize = 20 -- Line 688: Consistent text size.
- pulseButton.Font = Enum.Font.SourceSansBold -- Line 689: Bold font.
- pulseButton.BorderSizePixel = 0 -- Line 690: No border.
- pulseButton.Parent = frame -- Line 691: Nested under the main frame.
- -- Line 692: Corner effect for the pulse button.
- local pulseCorner = Instance.new("UICorner") -- Line 693: Creates a UICorner instance.
- pulseCorner.CornerRadius = UDim.new(0, 8) -- Line 694: 8-pixel radius.
- pulseCorner.Parent = pulseButton -- Line 695: Applies to the pulse button.
- -- Line 696: Hover animation for the pulse button.
- local pulseHoverOn = { -- Line 697: Hover state.
- Size = UDim2.new(0, 110, 0, 45), -- Line 698: Slightly larger.
- BackgroundColor3 = Color3.fromRGB(0, 180, 255) -- Line 699: Brighter blue.
- } -- Line 700: Closes hover-on goal.
- local pulseHoverOff = { -- Line 701: Default state.
- Size = UDim2.new(0, 100, 0, 40), -- Line 702: Original size.
- BackgroundColor3 = Color3.fromRGB(0, 150, 255) -- Line 703: Original blue color.
- } -- Line 704: Closes hover-off goal.
- -- Line 705: Connecting hover events for the pulse button.
- pulseButton.MouseEnter:Connect(function() -- Line 706: Triggers on hover.
- createTween(pulseButton, buttonHoverInfo, pulseHoverOn):Play() -- Line 707: Scales and brightens.
- end) -- Line 708: Closes MouseEnter event.
- pulseButton.MouseLeave:Connect(function() -- Line 709: Triggers on exit.
- createTween(pulseButton, buttonHoverInfo, pulseHoverOff):Play() -- Line 710: Returns to normal.
- end) -- Line 711: Closes MouseLeave event.
- -- Line 712: Pulse Button Click Logic to pulse the frame’s size.
- -- Line 713: Repeatedly increases and decreases the frame size.
- pulseButton.MouseButton1Click:Connect(function() -- Line 714: Triggers on left-click.
- local shrink = createTween(pulseButton, buttonClickInfo, { -- Line 715: Shrink animation.
- Size = UDim2.new(0, 90, 0, 35) -- Line 716: Smaller size.
- }) -- Line 717: Closes shrink goal.
- local expand = createTween(pulseButton, buttonClickInfo, { -- Line 718: Expand animation.
- Size = UDim2.new(0, 110, 0, 45) -- Line 719: Matches hover size.
- }) -- Line 720: Closes expand goal.
- shrink:Play() -- Line 721: Starts shrink animation.
- shrink.Completed:Connect(function() -- Line 722: Triggers on completion.
- expand:Play() -- Line 723: Plays expand animation.
- end) -- Line 724: Closes shrink completion event.
- -- Line 725: Pulse size animation for the frame.
- -- Line 726: Pulses between current size and a slightly larger size.
- local pulseInfo = TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 2, true) -- Line 727: Sine pulse with 2 repeats.
- local pulseGoal = {Size = UDim2.new(0, 340, 0, 230)} -- Line 728: Slightly larger size.
- createTween(frame, pulseInfo, pulseGoal):Play() -- Line 729: Plays the pulse animation.
- end) -- Line 730: Closes MouseButton1Click event.
- -- Line 731: Tenth button (Rainbow) to apply a rotating rainbow gradient.
- -- Line 732: Adds a colorful, looping gradient effect to the frame.
- local rainbowButton = Instance.new("TextButton") -- Line 733: Creates a new TextButton.
- rainbowButton.Name = "RainbowButton" -- Line 734: Named for its rainbow effect.
- rainbowButton.Size = UDim2.new(0, 100, 0, 40) -- Line 735: Consistent size.
- rainbowButton.Position = UDim2.new(0.7, -50, 0.95, -20) -- Line 736: Bottom right of the frame.
- rainbowButton.BackgroundColor3 = Color3.fromRGB(150, 150, 150) -- Line 737: Neutral gray color.
- rainbowButton.Text = "RAINBOW" -- Line 738: Indicates the rainbow action.
- rainbowButton.TextColor3 = Color3.fromRGB(255, 255, 255) -- Line 739: White text.
- rainbowButton.TextSize = 20 -- Line 740: Consistent text size.
- rainbowButton.Font = Enum.Font.SourceSansBold -- Line 741: Bold font.
- rainbowButton.BorderSizePixel = 0 -- Line 742: No border.
- rainbowButton.Parent = frame -- Line 743: Nested under the main frame.
- -- Line 744: Corner effect for the rainbow button.
- local rainbowCorner = Instance.new("UICorner") -- Line 745: Creates a UICorner instance.
- rainbowCorner.CornerRadius = UDim.new(0, 8) -- Line 746: 8-pixel radius.
- rainbowCorner.Parent = rainbowButton -- Line 747: Applies to the rainbow button.
- -- Line 748: Hover animation for the rainbow button.
- local rainbowHoverOn = { -- Line 749: Hover state.
- Size = UDim2.new(0, 110, 0, 45), -- Line 750: Slightly larger.
- BackgroundColor3 = Color3.fromRGB(200, 200, 200) -- Line 751: Brighter gray.
- } -- Line 752: Closes hover-on goal.
- local rainbowHoverOff = { -- Line 753: Default state.
- Size = UDim2.new(0, 100, 0, 40), -- Line 754: Original size.
- BackgroundColor3 = Color3.fromRGB(150, 150, 150) -- Line 755: Original gray color.
- } -- Line 756: Closes hover-off goal.
- -- Line 757: Connecting hover events for the rainbow button.
- rainbowButton.MouseEnter:Connect(function() -- Line 758: Triggers on hover.
- createTween(rainbowButton, buttonHoverInfo, rainbowHoverOn):Play() -- Line 759: Scales and brightens.
- end) -- Line 760: Closes MouseEnter event.
- rainbowButton.MouseLeave:Connect(function() -- Line 761: Triggers on exit.
- createTween(rainbowButton, buttonHoverInfo, rainbowHoverOff):Play() -- Line 762: Returns to normal.
- end) -- Line 763: Closes MouseLeave event.
- -- Line 764: Rainbow Button Click Logic to apply a rotating rainbow gradient.
- -- Line 765: Creates a looping rainbow effect on the frame’s background.
- rainbowButton.MouseButton1Click:Connect(function() -- Line 766: Triggers on left-click.
- local shrink = createTween(rainbowButton, buttonClickInfo, { -- Line 767: Shrink animation.
- Size = UDim2.new(0, 90, 0, 35) -- Line 768: Smaller size.
- }) -- Line 769: Closes shrink goal.
- local expand = createTween(rainbowButton, buttonClickInfo, { -- Line 770: Expand animation.
- Size = UDim2.new(0, 110, 0, 45) -- Line 771: Matches hover size.
- }) -- Line 772: Closes expand goal.
- shrink:Play() -- Line 773: Starts shrink animation.
- shrink.Completed:Connect(function() -- Line 774: Triggers on completion.
- expand:Play() -- Line 775: Plays expand animation.
- end) -- Line 776: Closes shrink completion event.
- -- Line 777: Rainbow gradient effect for the frame.
- -- Line 778: Applies a multi-color gradient that rotates continuously.
- local rainbowGradient = Instance.new("UIGradient") -- Line 779: Creates a new UIGradient instance.
- rainbowGradient.Color = ColorSequence.new({ -- Line 780: Defines the rainbow color sequence.
- ColorSequenceKeypoint.new(0, Color3.fromRGB(255, 0, 0)), -- Line 781: Red at the start.
- ColorSequenceKeypoint.new(0.2, Color3.fromRGB(255, 255, 0)), -- Line 782: Yellow.
- ColorSequenceKeypoint.new(0.4, Color3.fromRGB(0, 255, 0)), -- Line 783: Green.
- ColorSequenceKeypoint.new(0.6, Color3.fromRGB(0, 255, 255)), -- Line 784: Cyan.
- ColorSequenceKeypoint.new(0.8, Color3.fromRGB(0, 0, 255)), -- Line 785: Blue.
- ColorSequenceKeypoint.new(1, Color3.fromRGB(255, 0, 255)) -- Line 786: Magenta at the end.
- }) -- Line 787: Closes the ColorSequence definition.
- rainbowGradient.Parent = frame -- Line 788: Applies the gradient to the frame.
- createTween(rainbowGradient, TweenInfo.new(3, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, -1), {Rotation = 360}):Play() -- Line 789: Rotates infinitely.
- end) -- Line 790: Closes MouseButton1Click event.
- -- Line 791: Eleventh button (Sound) to play an additional sound effect.
- -- Line 792: Adds an alternative sound to enhance interactivity.
- local soundButton = Instance.new("TextButton") -- Line 793: Creates a new TextButton.
- soundButton.Name = "SoundButton" -- Line 794: Named for its sound effect.
- soundButton.Size = UDim2.new(0, 100, 0, 40) -- Line 795: Consistent size.
- soundButton.Position = UDim2.new(0.3, -50, 0.5, -20) -- Line 796: Adjusted position for layout.
- soundButton.BackgroundColor3 = Color3.fromRGB(255, 100, 0) -- Line 797: Orange-red color.
- soundButton.Text = "SOUND" -- Line 798: Indicates the sound action.
- soundButton.TextColor3 = Color3.fromRGB(255, 255, 255) -- Line 799: White text.
- soundButton.TextSize = 20 -- Line 800: Consistent text size.
- soundButton.Font = Enum.Font.SourceSansBold -- Line 801: Bold font.
- soundButton.BorderSizePixel = 0 -- Line 802: No border.
- soundButton.Parent = frame -- Line 803: Nested under the main frame.
- -- Line 804: Corner effect for the sound button.
- local soundCorner = Instance.new("UICorner") -- Line 805
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement