Advertisement
roblox3008game

Untitled

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