Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SCREENGUI ([GUI NAME]>LOCALSCRIPT). ALL OF THEM ARE LOCALSCRIPTS IN THE SCREENGUI. THESE SCRIPTS ARE LOCALSCRIPTS FOR EACH SCREENGUI
- -BRUSHINGMINIGAMEGUI
- -- StarterGui > BrushingMinigameGui > LocalScript
- -- MOBILE/PC/CONSOLE COMPATIBLE - Click/Tap to play
- print("๐ฎ LOADING BRUSHING MINIGAME SCRIPT...")
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- -- CONFIGURATION
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- local INDICATOR_SPEED = 0.01 -- Speed of movement (lower = faster)
- local GREEN_ZONE_SIZE = 0.2 -- Size of green zone
- local SUCCESS_ATTEMPTS = 3 -- Hits needed
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- -- SETUP
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- local Players = game:GetService("Players")
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local UserInputService = game:GetService("UserInputService")
- local ContextActionService = game:GetService("ContextActionService")
- local player = Players.LocalPlayer
- local gui = script.Parent
- -- Get UI elements
- local mainFrame = gui:FindFirstChild("MainFrame")
- if not mainFrame then
- warn("โ MainFrame missing!")
- return
- end
- local titleLabel = mainFrame:FindFirstChild("TitleLabel")
- local progressBar = mainFrame:FindFirstChild("ProgressBar")
- local barBackground = progressBar and progressBar:FindFirstChild("BarBackground")
- local greenZone = barBackground and barBackground:FindFirstChild("GreenZone")
- local indicator = barBackground and barBackground:FindFirstChild("Indicator")
- local clickButton = mainFrame:FindFirstChild("ClickButton")
- local feedbackLabel = mainFrame:FindFirstChild("FeedbackLabel")
- local attemptsLabel = mainFrame:FindFirstChild("AttemptsLabel")
- if not (indicator and greenZone and clickButton) then
- warn("โ Missing UI elements!")
- return
- end
- print("โ UI Elements loaded")
- -- Get events
- task.wait(1)
- local eventsFolder = ReplicatedStorage:FindFirstChild("SneakerEvents")
- if not eventsFolder then
- warn("โ SneakerEvents folder missing!")
- return
- end
- local brushingCompleteEvent = eventsFolder:FindFirstChild("BrushingComplete")
- local startBrushingEvent = eventsFolder:FindFirstChild("StartBrushing")
- if not (brushingCompleteEvent and startBrushingEvent) then
- warn("โ Events missing!")
- return
- end
- print("โ Events connected")
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- -- GAME STATE
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- local isPlaying = false
- local successfulHits = 0
- local indicatorPos = 0
- local direction = 1
- local animationRunning = false
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- -- FUNCTIONS
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- local function PositionGreenZone()
- local maxPos = 1 - GREEN_ZONE_SIZE
- local randomPos = math.random() * maxPos
- greenZone.Position = UDim2.new(randomPos, 0, 0, 0)
- greenZone.Size = UDim2.new(GREEN_ZONE_SIZE, 0, 1, 0)
- print("๐ข Green zone at:", math.floor(randomPos * 100) .. "%")
- end
- local function IsInGreenZone()
- local greenStart = greenZone.Position.X.Scale
- local greenEnd = greenStart + GREEN_ZONE_SIZE
- return indicatorPos >= greenStart and indicatorPos <= greenEnd
- end
- local function ShowFeedback(msg, success)
- feedbackLabel.Text = msg
- feedbackLabel.TextColor3 = success and Color3.fromRGB(0, 255, 0) or Color3.fromRGB(255, 0, 0)
- feedbackLabel.Visible = true
- task.delay(1, function()
- feedbackLabel.Visible = false
- end)
- end
- local function UpdateAttempts()
- attemptsLabel.Text = "Progress: " .. successfulHits .. "/" .. SUCCESS_ATTEMPTS
- end
- local function AnimateIndicator()
- animationRunning = true
- print("โถ๏ธ Animation started")
- task.spawn(function()
- while animationRunning and isPlaying do
- indicatorPos = indicatorPos + (INDICATOR_SPEED * direction)
- if indicatorPos >= 1 then
- indicatorPos = 1
- direction = -1
- elseif indicatorPos <= 0 then
- indicatorPos = 0
- direction = 1
- end
- indicator.Position = UDim2.new(indicatorPos, 0, 0, 0)
- task.wait()
- end
- end)
- end
- local function StopAnimation()
- animationRunning = false
- print("โน๏ธ Animation stopped")
- end
- local function OnClick()
- if not isPlaying then
- print("โ ๏ธ Not playing - click ignored")
- return
- end
- print("๐ฑ๏ธ Click at:", math.floor(indicatorPos * 100) .. "%")
- if IsInGreenZone() then
- -- SUCCESS!
- successfulHits = successfulHits + 1
- ShowFeedback("PERFECT! โ", true)
- UpdateAttempts()
- print("โ Hit " .. successfulHits .. "/" .. SUCCESS_ATTEMPTS)
- if successfulHits >= SUCCESS_ATTEMPTS then
- -- COMPLETE!
- print("๐ MINIGAME COMPLETE!")
- isPlaying = false
- StopAnimation()
- feedbackLabel.Text = "BRUSHING COMPLETE! ๐"
- feedbackLabel.TextColor3 = Color3.fromRGB(255, 215, 0)
- feedbackLabel.Visible = true
- brushingCompleteEvent:FireServer()
- task.wait(2)
- gui.Enabled = false
- mainFrame.Visible = false
- task.wait(0.5)
- successfulHits = 0
- indicatorPos = 0
- direction = 1
- feedbackLabel.Visible = false
- UpdateAttempts()
- else
- task.wait(0.5)
- PositionGreenZone()
- end
- else
- -- MISS
- ShowFeedback("Miss! Try Again", false)
- print("โ Missed")
- end
- end
- local function StartGame()
- print("\nโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ")
- print("โ ๐ฎ STARTING BRUSHING MINIGAME โ")
- print("โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ")
- isPlaying = false
- successfulHits = 0
- indicatorPos = 0
- direction = 1
- feedbackLabel.Visible = false
- animationRunning = false
- isPlaying = true
- gui.Enabled = true
- mainFrame.Visible = true
- PositionGreenZone()
- UpdateAttempts()
- AnimateIndicator()
- titleLabel.Text = "Click when indicator is in GREEN!"
- print("โ Ready to play!")
- print("โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ\n")
- end
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- -- INPUT HANDLING (MOUSE/TOUCH/GAMEPAD)
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- -- Mouse/Touch click
- clickButton.MouseButton1Click:Connect(OnClick)
- print("โ Click connected")
- -- Block SPACE key from jumping during minigame (only trigger ONCE on press)
- local spacePressed = false
- ContextActionService:BindAction(
- "BlockBrushingSpace",
- function(actionName, inputState, inputObject)
- if isPlaying then
- if inputState == Enum.UserInputState.Begin and not spacePressed then
- spacePressed = true
- OnClick()
- elseif inputState == Enum.UserInputState.End then
- spacePressed = false
- end
- return Enum.ContextActionResult.Sink -- Block the input
- end
- return Enum.ContextActionResult.Pass
- end,
- false,
- Enum.KeyCode.Space,
- Enum.KeyCode.Return
- )
- -- Gamepad support (A button on Xbox, Cross on PlayStation)
- ContextActionService:BindAction(
- "BrushingGamepadClick",
- function(actionName, inputState, inputObject)
- if inputState == Enum.UserInputState.Begin and isPlaying then
- OnClick()
- end
- return Enum.ContextActionResult.Sink
- end,
- false,
- Enum.KeyCode.ButtonA
- )
- print("โ Gamepad support enabled")
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- -- EVENT CONNECTIONS
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- startBrushingEvent.OnClientEvent:Connect(function()
- print("๐ก START BRUSHING EVENT RECEIVED")
- StartGame()
- end)
- print("โ Start event connected")
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- -- INIT
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- gui.Enabled = false
- mainFrame.Visible = false
- feedbackLabel.Visible = false
- UpdateAttempts()
- print("โ BRUSHING MINIGAME SCRIPT LOADED")
- print(" Speed:", INDICATOR_SPEED)
- print(" Zone Size:", GREEN_ZONE_SIZE * 100 .. "%")
- print(" Required Hits:", SUCCESS_ATTEMPTS)
- print("")
- -COMPLETIONPOPUPGUI
- -- StarterGui > CompletionPopupGui > LocalScript
- -- Shows reward when sneaker is completed
- print("๐ฐ Loading Completion Popup...")
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- -- SETUP
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- local Players = game:GetService("Players")
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local TweenService = game:GetService("TweenService")
- local player = Players.LocalPlayer
- local gui = script.Parent
- -- UI Elements
- local popupFrame = gui:WaitForChild("PopupFrame", 5)
- if not popupFrame then
- warn("โ PopupFrame missing!")
- return
- end
- local titleLabel = popupFrame:FindFirstChild("TitleLabel")
- local rarityLabel = popupFrame:FindFirstChild("RarityLabel")
- local rewardLabel = popupFrame:FindFirstChild("RewardLabel")
- local messageLabel = popupFrame:FindFirstChild("MessageLabel")
- if not (titleLabel and rarityLabel and rewardLabel) then
- warn("โ Missing UI elements!")
- return
- end
- print("โ UI Elements loaded")
- -- Get event
- local eventsFolder = ReplicatedStorage:WaitForChild("SneakerEvents", 10)
- if not eventsFolder then
- warn("โ SneakerEvents folder missing!")
- return
- end
- local completedEvent = eventsFolder:FindFirstChild("SneakerCompleted")
- if not completedEvent then
- -- Create it if it doesn't exist
- completedEvent = Instance.new("RemoteEvent")
- completedEvent.Name = "SneakerCompleted"
- completedEvent.Parent = eventsFolder
- end
- print("โ Event connected")
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- -- RARITY COLORS
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- local RARITY_COLORS = {
- Common = Color3.fromRGB(180, 180, 180),
- Rare = Color3.fromRGB(100, 150, 255),
- Epic = Color3.fromRGB(200, 100, 255),
- Legendary = Color3.fromRGB(255, 200, 50)
- }
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- -- FUNCTIONS
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- local function ShowPopup(rarity, reward)
- print("๐ Showing completion popup")
- print(" Rarity:", rarity)
- print(" Reward:", reward)
- -- Set content
- titleLabel.Text = "SNEAKER CLEANED!"
- rarityLabel.Text = rarity .. " Sneaker"
- rarityLabel.TextColor3 = RARITY_COLORS[rarity] or RARITY_COLORS.Common
- rewardLabel.Text = "+" .. reward .. " Coins"
- if messageLabel then
- local messages = {
- Common = "Good work!",
- Rare = "Nice job!",
- Epic = "Excellent work!",
- Legendary = "AMAZING! What a shine!"
- }
- messageLabel.Text = messages[rarity] or "Well done!"
- end
- -- Start hidden and scaled down
- popupFrame.Position = UDim2.new(0.5, 0, 0.5, 0)
- popupFrame.AnchorPoint = Vector2.new(0.5, 0.5)
- popupFrame.Size = UDim2.new(0, 0, 0, 0)
- popupFrame.Visible = true
- -- Animate in (scale up)
- local tweenIn = TweenService:Create(
- popupFrame,
- TweenInfo.new(0.4, Enum.EasingStyle.Back, Enum.EasingDirection.Out),
- {Size = UDim2.new(0.4, 0, 0.4, 0)}
- )
- tweenIn:Play()
- tweenIn.Completed:Wait()
- -- Hold for 3 seconds
- task.wait(3)
- -- Animate out (scale down and fade)
- local tweenOut = TweenService:Create(
- popupFrame,
- TweenInfo.new(0.3, Enum.EasingStyle.Quad, Enum.EasingDirection.In),
- {
- Size = UDim2.new(0, 0, 0, 0),
- BackgroundTransparency = 1
- }
- )
- -- Fade text too
- for _, child in ipairs(popupFrame:GetChildren()) do
- if child:IsA("TextLabel") then
- TweenService:Create(child, TweenInfo.new(0.3), {TextTransparency = 1}):Play()
- end
- end
- tweenOut:Play()
- tweenOut.Completed:Wait()
- -- Hide and reset
- popupFrame.Visible = false
- popupFrame.BackgroundTransparency = 0
- for _, child in ipairs(popupFrame:GetChildren()) do
- if child:IsA("TextLabel") then
- child.TextTransparency = 0
- end
- end
- print("โ Popup closed")
- end
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- -- EVENT CONNECTION
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- completedEvent.OnClientEvent:Connect(function(rarity, reward)
- ShowPopup(rarity, reward)
- end)
- print("โ Completion event connected")
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- -- INITIALIZATION
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- popupFrame.Visible = false
- wwwweprint("โ COMPLETION POPUP LOADED\n")
- -PACKAGINGMINIGAMEGUI
- -- StarterGui > PackagingMinigameGui > LocalScript
- -- MOBILE/PC/CONSOLE COMPATIBLE - On-screen buttons + keyboard support
- -- FIXED: GUI updates properly after each correct key press
- print("๐ฆ Loading Packaging Minigame...")
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- -- CONFIGURATION
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- local SEQUENCE_LENGTH = 5 -- Number of buttons to press
- local TIME_PER_BUTTON = 5 -- Seconds to press each button
- local BUTTON_KEYS = {"W", "A", "S", "D"} -- Available keys for PC
- -- Console button mapping (A=Q, B=W, X=E, Y=R)
- -- Change these to customize console controls
- local CONSOLE_BUTTON_KEYS = {
- Enum.KeyCode.ButtonA, -- Maps to Q
- Enum.KeyCode.ButtonB, -- Maps to W
- Enum.KeyCode.ButtonX, -- Maps to E
- Enum.KeyCode.ButtonY -- Maps to R
- }
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- -- SETUP
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- local Players = game:GetService("Players")
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local UserInputService = game:GetService("UserInputService")
- local ContextActionService = game:GetService("ContextActionService")
- local player = Players.LocalPlayer
- local gui = script.Parent
- -- UI Elements
- local mainFrame = gui:WaitForChild("MainFrame", 5)
- if not mainFrame then
- warn("โ MainFrame missing!")
- return
- end
- local titleLabel = mainFrame:FindFirstChild("TitleLabel")
- local sequenceFrame = mainFrame:FindFirstChild("SequenceFrame")
- local currentKeyLabel = mainFrame:FindFirstChild("CurrentKeyLabel")
- local timerLabel = mainFrame:FindFirstChild("TimerLabel")
- local progressLabel = mainFrame:FindFirstChild("ProgressLabel")
- local instructionLabel = mainFrame:FindFirstChild("InstructionLabel")
- local buttonsContainer = mainFrame:FindFirstChild("ButtonsContainer")
- if not (sequenceFrame and currentKeyLabel and timerLabel and progressLabel) then
- warn("โ Missing UI elements!")
- return
- end
- print("โ UI Elements loaded")
- -- Events
- local eventsFolder = ReplicatedStorage:WaitForChild("SneakerEvents", 10)
- if not eventsFolder then
- warn("โ SneakerEvents folder missing!")
- return
- end
- local packagingCompleteEvent = eventsFolder:WaitForChild("PackagingComplete", 5)
- local startPackagingEvent = eventsFolder:WaitForChild("StartPackaging", 5)
- if not (packagingCompleteEvent and startPackagingEvent) then
- warn("โ Events missing!")
- return
- end
- print("โ Events connected")
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- -- GAME STATE
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- local isPlaying = false
- local sequence = {}
- local currentStep = 1
- local timeRemaining = 0
- local timerRunning = false
- local onScreenButtons = {} -- Store button references
- local keyboardActionBound = false -- Track if keyboard action is bound
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- -- HELPER FUNCTIONS
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- local function IsOnMobile()
- return UserInputService:GetLastInputType() == Enum.UserInputType.Touch
- end
- local function BlockProximityPrompts(block)
- if block then
- ContextActionService:BindAction(
- "BlockPackagingInput",
- function(actionName, inputState, inputObject)
- return Enum.ContextActionResult.Sink
- end,
- false,
- Enum.KeyCode.E
- )
- print("๐ Blocked proximity prompt interactions")
- else
- ContextActionService:UnbindAction("BlockPackagingInput")
- print("๐ Unblocked proximity prompt interactions")
- end
- end
- local function UnbindKeyboardAction()
- if keyboardActionBound then
- ContextActionService:UnbindAction("PackagingKeyboardInput")
- keyboardActionBound = false
- print("๐ Unblocked movement keys (W/A/S/D)")
- end
- end
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- -- ON-SCREEN BUTTON CREATION (MOBILE ONLY)
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- local function CreateOnScreenButtons()
- -- Only show buttons on mobile
- if not IsOnMobile() then
- print("โน๏ธ PC/Console detected - skipping on-screen buttons")
- return
- end
- -- Create or get buttons container
- if not buttonsContainer then
- buttonsContainer = Instance.new("Frame")
- buttonsContainer.Name = "ButtonsContainer"
- buttonsContainer.Size = UDim2.new(1, 0, 0.25, 0)
- buttonsContainer.Position = UDim2.new(0, 0, 0.75, 0)
- buttonsContainer.BackgroundTransparency = 1
- buttonsContainer.Parent = mainFrame
- end
- -- Clear old buttons
- for _, btn in ipairs(buttonsContainer:GetChildren()) do
- if btn:IsA("TextButton") then
- btn:Destroy()
- end
- end
- -- Create buttons for each key
- local buttonWidth = 1 / #BUTTON_KEYS
- for i, key in ipairs(BUTTON_KEYS) do
- local button = Instance.new("TextButton")
- button.Name = "Key_" .. key
- button.Text = key
- button.Size = UDim2.new(buttonWidth - 0.02, 0, 0.8, 0)
- button.Position = UDim2.new((i - 1) * buttonWidth + 0.01, 0, 0.1, 0)
- button.BackgroundColor3 = Color3.fromRGB(0, 100, 200)
- button.TextColor3 = Color3.new(1, 1, 1)
- button.TextScaled = true
- button.Font = Enum.Font.GothamBold
- button.Parent = buttonsContainer
- -- Add corner effect
- local corner = Instance.new("UICorner")
- corner.CornerRadius = UDim.new(0, 8)
- corner.Parent = button
- -- Store reference
- onScreenButtons[key] = button
- -- Connect button press (will call OnKeyPress after it's defined)
- button.MouseButton1Click:Connect(function()
- if OnKeyPress then
- OnKeyPress(key)
- end
- end)
- end
- print("โ On-screen buttons created (Mobile only)")
- end
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- -- DISPLAY UPDATE FUNCTIONS (MOVED BEFORE OnKeyPress)
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- local function GenerateSequence()
- sequence = {}
- for i = 1, SEQUENCE_LENGTH do
- local randomKey = BUTTON_KEYS[math.random(1, #BUTTON_KEYS)]
- table.insert(sequence, randomKey)
- end
- print("๐ฏ Generated sequence:", table.concat(sequence, " โ "))
- return sequence
- end
- local function DisplaySequence()
- -- Clear old sequence
- for _, child in ipairs(sequenceFrame:GetChildren()) do
- if child:IsA("TextLabel") then
- child:Destroy()
- end
- end
- -- Create sequence display
- for i, key in ipairs(sequence) do
- local keyLabel = Instance.new("TextLabel")
- keyLabel.Size = UDim2.new(0.15, 0, 0.8, 0)
- keyLabel.Position = UDim2.new((i - 1) * 0.18 + 0.05, 0, 0.1, 0)
- keyLabel.Text = key
- keyLabel.TextScaled = true
- keyLabel.Font = Enum.Font.GothamBold
- keyLabel.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
- keyLabel.TextColor3 = Color3.new(1, 1, 1)
- keyLabel.BorderSizePixel = 2
- keyLabel.BorderColor3 = Color3.fromRGB(100, 100, 100)
- keyLabel.Parent = sequenceFrame
- -- Highlight current step
- if i == currentStep then
- keyLabel.BackgroundColor3 = Color3.fromRGB(0, 200, 100)
- keyLabel.BorderColor3 = Color3.fromRGB(0, 255, 150)
- elseif i < currentStep then
- keyLabel.BackgroundColor3 = Color3.fromRGB(100, 100, 100)
- keyLabel.TextTransparency = 0.5
- end
- end
- print("๐ Sequence display updated - Current step:", currentStep)
- end
- local function UpdateDisplay()
- if currentStep <= #sequence then
- currentKeyLabel.Text = "Press: " .. sequence[currentStep]
- currentKeyLabel.TextColor3 = Color3.fromRGB(255, 255, 0)
- end
- progressLabel.Text = string.format("Step %d / %d", currentStep, SEQUENCE_LENGTH)
- DisplaySequence()
- end
- local function UpdateButtonVisuals()
- -- Highlight the current expected button
- for key, button in pairs(onScreenButtons) do
- if key == sequence[currentStep] then
- button.BackgroundColor3 = Color3.fromRGB(255, 255, 0)
- else
- button.BackgroundColor3 = Color3.fromRGB(0, 100, 200)
- end
- end
- end
- local function StartTimer()
- timerRunning = true
- timeRemaining = TIME_PER_BUTTON
- task.spawn(function()
- while timerRunning and isPlaying and timeRemaining > 0 do
- timeRemaining = timeRemaining - (1/60)
- timerLabel.Text = string.format("Time: %.1fs", math.max(0, timeRemaining))
- -- Color based on time
- if timeRemaining < 0.5 then
- timerLabel.TextColor3 = Color3.fromRGB(255, 50, 50)
- elseif timeRemaining < 1 then
- timerLabel.TextColor3 = Color3.fromRGB(255, 200, 50)
- else
- timerLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- end
- task.wait()
- end
- -- Time ran out
- if isPlaying and timeRemaining <= 0 then
- print("โ Time ran out!")
- FailMinigame()
- end
- end)
- end
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- -- MINIGAME FUNCTIONS (DEFINED EARLY FOR CONTEXT ACTION SERVICE)
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- function OnKeyPress(key)
- if not isPlaying then return end
- if currentStep > #sequence then return end
- local expectedKey = sequence[currentStep]
- print("๐ Pressed:", key, "| Expected:", expectedKey)
- if key == expectedKey then
- -- CORRECT!
- print("โ Correct! Step", currentStep, "of", SEQUENCE_LENGTH)
- -- Flash button green
- if onScreenButtons[key] then
- onScreenButtons[key].BackgroundColor3 = Color3.fromRGB(0, 255, 0)
- task.delay(0.2, function()
- if onScreenButtons[key] then
- onScreenButtons[key].BackgroundColor3 = Color3.fromRGB(0, 100, 200)
- end
- end)
- end
- -- Flash label green
- currentKeyLabel.TextColor3 = Color3.fromRGB(0, 255, 0)
- task.delay(0.2, function()
- if currentKeyLabel then
- currentKeyLabel.TextColor3 = Color3.fromRGB(255, 255, 0)
- end
- end)
- currentStep = currentStep + 1
- print("๐ Current step is now:", currentStep)
- if currentStep > SEQUENCE_LENGTH then
- -- COMPLETE!
- print("๐ ALL STEPS COMPLETE!")
- CompleteMinigame()
- else
- -- Next step - UPDATE UI IMMEDIATELY
- task.wait(0.5)
- print("๐ Updating display for next step...")
- UpdateDisplay()
- UpdateButtonVisuals()
- StartTimer()
- end
- else
- -- WRONG!
- print("โ Wrong key!")
- -- Flash button red
- if onScreenButtons[key] then
- onScreenButtons[key].BackgroundColor3 = Color3.fromRGB(255, 0, 0)
- task.delay(0.2, function()
- if onScreenButtons[key] then
- onScreenButtons[key].BackgroundColor3 = Color3.fromRGB(0, 100, 200)
- end
- end)
- end
- -- Flash label red
- currentKeyLabel.TextColor3 = Color3.fromRGB(255, 0, 0)
- task.delay(0.2, function()
- if currentKeyLabel then
- currentKeyLabel.TextColor3 = Color3.fromRGB(255, 255, 0)
- end
- end)
- end
- end
- function CompleteMinigame()
- print("๐ Packaging complete!")
- isPlaying = false
- timerRunning = false
- UnbindKeyboardAction()
- BlockProximityPrompts(false)
- currentKeyLabel.Text = "PACKAGING COMPLETE! ๐"
- currentKeyLabel.TextColor3 = Color3.fromRGB(0, 255, 0)
- timerLabel.Text = "Success!"
- instructionLabel.Text = "Sneaker ready for delivery!"
- packagingCompleteEvent:FireServer()
- print(" โ Sent completion to server")
- task.wait(2)
- gui.Enabled = false
- mainFrame.Visible = false
- task.wait(0.5)
- ResetMinigame()
- end
- function FailMinigame()
- print("โ Failed packaging!")
- isPlaying = false
- timerRunning = false
- UnbindKeyboardAction()
- BlockProximityPrompts(false)
- currentKeyLabel.Text = "TIME'S UP!"
- currentKeyLabel.TextColor3 = Color3.fromRGB(255, 0, 0)
- timerLabel.Text = "Failed"
- instructionLabel.Text = "Try again!"
- task.wait(2)
- -- Restart
- StartMinigame()
- end
- function ResetMinigame()
- isPlaying = false
- sequence = {}
- currentStep = 1
- timeRemaining = 0
- timerRunning = false
- print(" ๐ Minigame reset")
- end
- function StartMinigame()
- print("\nโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ")
- print("โ ๐ฆ STARTING PACKAGING MINIGAME โ")
- print("โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ")
- ResetMinigame()
- isPlaying = true
- -- BIND KEYBOARD ACTION (This must happen BEFORE BindKeyboardAction function, so it works properly)
- if not keyboardActionBound then
- ContextActionService:BindAction(
- "PackagingKeyboardInput",
- function(actionName, inputState, inputObject)
- if not isPlaying then return end
- if inputState == Enum.UserInputState.Begin then
- for _, key in ipairs(BUTTON_KEYS) do
- if inputObject.KeyCode == Enum.KeyCode[key] then
- OnKeyPress(key)
- break
- end
- end
- end
- return Enum.ContextActionResult.Sink
- end,
- false,
- Enum.KeyCode.Q,
- Enum.KeyCode.W,
- Enum.KeyCode.E,
- Enum.KeyCode.R,
- Enum.KeyCode.A,
- Enum.KeyCode.S,
- Enum.KeyCode.D,
- Enum.KeyCode.F
- )
- keyboardActionBound = true
- print("๐ Blocked movement keys (W/A/S/D)")
- end
- BlockProximityPrompts(true)
- gui.Enabled = true
- mainFrame.Visible = true
- GenerateSequence()
- currentStep = 1
- CreateOnScreenButtons()
- UpdateDisplay()
- UpdateButtonVisuals()
- StartTimer()
- titleLabel.Text = "Package the Sneaker!"
- instructionLabel.Text = "Tap/Click the buttons in order before time runs out!"
- print("โ Ready to play!")
- print("โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ\n")
- end
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- -- INPUT HANDLING (GAMEPAD)
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- -- Gamepad support (face buttons) - CUSTOMIZABLE
- local gamepadButtons = {
- [Enum.KeyCode.ButtonA] = "Q", -- Press A to press Q
- [Enum.KeyCode.ButtonB] = "W", -- Press B to press W
- [Enum.KeyCode.ButtonX] = "E", -- Press X to press E
- [Enum.KeyCode.ButtonY] = "R", -- Press Y to press R
- }
- -- To customize console controls, change the mapping above:
- -- [Enum.KeyCode.ButtonA] = "Q" -- Press A to input Q
- -- [Enum.KeyCode.ButtonB] = "W" -- Press B to input W
- -- [Enum.KeyCode.ButtonX] = "E" -- Press X to input E
- -- [Enum.KeyCode.ButtonY] = "R" -- Press Y to input R
- -- You can also map them to different keys like:
- -- [Enum.KeyCode.ButtonA] = "1" -- Press A to input "1"
- -- [Enum.KeyCode.ButtonLB] = "Q" -- Press LB to input "Q"
- ContextActionService:BindAction(
- "PackagingGamepadInput",
- function(actionName, inputState, inputObject)
- if inputState == Enum.UserInputState.Begin and isPlaying then
- local key = gamepadButtons[inputObject.KeyCode]
- if key then
- OnKeyPress(key)
- end
- end
- return Enum.ContextActionResult.Sink
- end,
- false,
- Enum.KeyCode.ButtonA,
- Enum.KeyCode.ButtonB,
- Enum.KeyCode.ButtonX,
- Enum.KeyCode.ButtonY
- )
- print("โ All input methods connected (Mouse, Touch, Keyboard, Gamepad)")
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- -- EVENT CONNECTIONS
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- startPackagingEvent.OnClientEvent:Connect(function()
- print("๐ก START PACKAGING EVENT RECEIVED")
- StartMinigame()
- end)
- print("โ Start event connected")
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- -- INITIALIZATION
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- gui.Enabled = false
- mainFrame.Visible = false
- print("โ PACKAGING MINIGAME LOADED")
- print(" Sequence Length:", SEQUENCE_LENGTH)
- print(" Time Per Key:", TIME_PER_BUTTON, "seconds")
- print(" Available Keys:", table.concat(BUTTON_KEYS, ", "))
- print("")
- -RINSINGMINIGAMEGUI
- -- StarterGui > RinsingMinigameGui > LocalScript
- -- MOBILE/PC/CONSOLE COMPATIBLE - Hold button or press Space
- -- FIXED: Properly hides at startup, shows when called
- print("๐ฟ Loading Rinsing Minigame...")
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- -- CONFIGURATION
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- local SUCCESS_TIME = 5 -- Seconds to stay in zone
- local PRESSURE_SPEED = 0.010 -- How fast pressure changes
- local SAFE_ZONE_SIZE = 0.25 -- Size of safe zone (25% of bar)
- local PENALTY_TIME = 0.5 -- Time lost when outside zone
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- -- SETUP
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- local Players = game:GetService("Players")
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local UserInputService = game:GetService("UserInputService")
- local ContextActionService = game:GetService("ContextActionService")
- local player = Players.LocalPlayer
- local gui = script.Parent
- -- UI Elements
- local mainFrame = gui:WaitForChild("MainFrame", 5)
- if not mainFrame then
- warn("โ MainFrame missing!")
- return
- end
- local titleLabel = mainFrame:FindFirstChild("TitleLabel")
- local pressureBar = mainFrame:FindFirstChild("PressureBar")
- local barBackground = pressureBar and pressureBar:FindFirstChild("BarBackground")
- local safeZone = barBackground and barBackground:FindFirstChild("SafeZone")
- local indicator = barBackground and barBackground:FindFirstChild("Indicator")
- local controlButton = mainFrame:FindFirstChild("ControlButton")
- local timerLabel = mainFrame:FindFirstChild("TimerLabel")
- local instructionLabel = mainFrame:FindFirstChild("InstructionLabel")
- if not (indicator and safeZone and controlButton and timerLabel) then
- warn("โ Missing UI elements!")
- return
- end
- print("โ UI Elements loaded")
- -- Events
- local eventsFolder = ReplicatedStorage:WaitForChild("SneakerEvents", 10)
- if not eventsFolder then
- warn("โ SneakerEvents folder missing!")
- return
- end
- local rinsingCompleteEvent = eventsFolder:WaitForChild("RinsingComplete", 5)
- local startRinsingEvent = eventsFolder:WaitForChild("StartRinsing", 5)
- if not (rinsingCompleteEvent and startRinsingEvent) then
- warn("โ Events missing!")
- return
- end
- print("โ Events connected")
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- -- GAME STATE
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- local isPlaying = false
- local pressureLevel = 0.5 -- Start at middle
- local timeInZone = 0
- local isPressingButton = false
- local animationRunning = false
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- -- FUNCTIONS
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- local function IsInSafeZone()
- local safeStart = safeZone.Position.X.Scale
- local safeEnd = safeStart + SAFE_ZONE_SIZE
- return pressureLevel >= safeStart and pressureLevel <= safeEnd
- end
- local function UpdateTimer()
- local progress = math.floor((timeInZone / SUCCESS_TIME) * 100)
- timerLabel.Text = string.format("Time in Zone: %.1fs / %ds (%d%%)", timeInZone, SUCCESS_TIME, progress)
- -- Color based on progress
- if progress < 33 then
- timerLabel.TextColor3 = Color3.fromRGB(255, 100, 100) -- Red
- elseif progress < 66 then
- timerLabel.TextColor3 = Color3.fromRGB(255, 255, 100) -- Yellow
- else
- timerLabel.TextColor3 = Color3.fromRGB(100, 255, 100) -- Green
- end
- end
- local function PositionSafeZone()
- local maxPos = 1 - SAFE_ZONE_SIZE
- local randomPos = 0.3 + (math.random() * 0.4) -- Keep it somewhat centered
- safeZone.Position = UDim2.new(randomPos, 0, 0, 0)
- safeZone.Size = UDim2.new(SAFE_ZONE_SIZE, 0, 1, 0)
- print("๐ข Safe zone at:", math.floor(randomPos * 100) .. "%")
- end
- local function AnimatePressure()
- animationRunning = true
- print("โถ๏ธ Pressure simulation started")
- task.spawn(function()
- while animationRunning and isPlaying do
- -- Pressure naturally rises
- if isPressingButton then
- -- Pressing lowers pressure
- pressureLevel = pressureLevel - PRESSURE_SPEED * 1.5
- else
- -- Not pressing, pressure rises
- pressureLevel = pressureLevel + PRESSURE_SPEED
- end
- -- Clamp to 0-1 range
- pressureLevel = math.clamp(pressureLevel, 0, 1)
- -- Update visual
- indicator.Position = UDim2.new(pressureLevel, 0, 0, 0)
- -- Check if in zone
- if IsInSafeZone() then
- timeInZone = timeInZone + (1/60)
- -- Check win condition
- if timeInZone >= SUCCESS_TIME then
- CompleteMinigame()
- break
- end
- else
- -- Outside zone, lose time
- timeInZone = math.max(0, timeInZone - PENALTY_TIME * (1/60))
- end
- UpdateTimer()
- task.wait()
- end
- end)
- end
- local function StopAnimation()
- animationRunning = false
- print("โน๏ธ Pressure simulation stopped")
- end
- function CompleteMinigame()
- print("๐ Rinsing complete!")
- isPlaying = false
- StopAnimation()
- timerLabel.Text = "RINSING COMPLETE! ๐"
- timerLabel.TextColor3 = Color3.fromRGB(0, 255, 0)
- instructionLabel.Text = "Perfect! Sneaker is clean!"
- rinsingCompleteEvent:FireServer()
- print(" โ Sent completion to server")
- task.wait(2)
- gui.Enabled = false
- mainFrame.Visible = false
- task.wait(0.5)
- ResetMinigame()
- end
- function ResetMinigame()
- isPlaying = false
- pressureLevel = 0.5
- timeInZone = 0
- isPressingButton = false
- animationRunning = false
- indicator.Position = UDim2.new(0.5, 0, 0, 0)
- UpdateTimer()
- print(" ๐ Minigame reset")
- end
- function StartMinigame()
- print("\nโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ")
- print("โ ๐ฟ STARTING RINSING MINIGAME โ")
- print("โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ")
- ResetMinigame()
- isPlaying = true
- gui.Enabled = true
- mainFrame.Visible = true
- PositionSafeZone()
- UpdateTimer()
- AnimatePressure()
- titleLabel.Text = "Keep pressure in GREEN zone!"
- instructionLabel.Text = "Hold SPACE or click button to control pressure"
- print("โ Ready to play!")
- print("โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ\n")
- end
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- -- INPUT HANDLING (MOUSE/TOUCH/KEYBOARD/GAMEPAD)
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- -- Mouse button (PC)
- controlButton.MouseButton1Down:Connect(function()
- if isPlaying then
- isPressingButton = true
- controlButton.BackgroundColor3 = Color3.fromRGB(100, 200, 255)
- end
- end)
- controlButton.MouseButton1Up:Connect(function()
- isPressingButton = false
- controlButton.BackgroundColor3 = Color3.fromRGB(0, 150, 255)
- end)
- -- Keyboard support (SPACE and other keys) - BLOCKS JUMP
- ContextActionService:BindAction(
- "RinsingKeyboardControl",
- function(actionName, inputState, inputObject)
- if not isPlaying then return end
- if inputState == Enum.UserInputState.Begin then
- isPressingButton = true
- controlButton.BackgroundColor3 = Color3.fromRGB(100, 200, 255)
- elseif inputState == Enum.UserInputState.End then
- isPressingButton = false
- controlButton.BackgroundColor3 = Color3.fromRGB(0, 150, 255)
- end
- return Enum.ContextActionResult.Sink -- Block the input
- end,
- false,
- Enum.KeyCode.Space,
- Enum.KeyCode.E,
- Enum.KeyCode.Return
- )
- -- Gamepad support (hold trigger or button)
- ContextActionService:BindAction(
- "RinsingGamepadHold",
- function(actionName, inputState, inputObject)
- if not isPlaying then return end
- if inputState == Enum.UserInputState.Begin then
- isPressingButton = true
- controlButton.BackgroundColor3 = Color3.fromRGB(100, 200, 255)
- elseif inputState == Enum.UserInputState.End then
- isPressingButton = false
- controlButton.BackgroundColor3 = Color3.fromRGB(0, 150, 255)
- end
- return Enum.ContextActionResult.Sink
- end,
- false,
- Enum.KeyCode.ButtonR2, -- Right trigger (hold)
- Enum.KeyCode.ButtonA -- A button
- )
- print("โ All input methods connected (Mouse, Keyboard, Gamepad)")
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- -- EVENT CONNECTIONS
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- startRinsingEvent.OnClientEvent:Connect(function()
- print("๐ก START RINSING EVENT RECEIVED")
- StartMinigame()
- end)
- print("โ Start event connected")
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- -- INITIALIZATION
- --โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
- gui.Enabled = false
- mainFrame.Visible = false
- UpdateTimer()
- print("โ RINSING MINIGAME LOADED")
- print(" Success Time:", SUCCESS_TIME, "seconds")
- print(" Safe Zone:", SAFE_ZONE_SIZE * 100 .. "%")
- print("")
- -SNEAKERTRACKERGUI
- local Players = game:GetService("Players")
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local TweenService = game:GetService("TweenService")
- local player = Players.LocalPlayer
- local gui = script.Parent
- local mainFrame = gui:WaitForChild("MainFrame", 5)
- local rarityLabel = mainFrame and mainFrame:WaitForChild("RarityLabel", 5)
- local stageLabel = mainFrame and mainFrame:WaitForChild("StageLabel", 5)
- local progressBar = mainFrame and mainFrame:WaitForChild("ProgressBar", 5)
- local progressFill = progressBar and progressBar:WaitForChild("ProgressFill", 5)
- local percentLabel = mainFrame and mainFrame:WaitForChild("PercentLabel", 5)
- local noSneakerLabel = gui:WaitForChild("NoSneakerLabel", 5)
- if not (mainFrame and rarityLabel and stageLabel and progressBar and progressFill and percentLabel and noSneakerLabel) then
- warn("Tracker GUI elements missing!")
- return
- end
- local STAGES = {
- ["Received"] = {Text = "๐ Take to Brushing Station", Progress = 0, Color = Color3.fromRGB(150, 150, 150)},
- ["Brushing"] = {Text = "๐งน Brushing in Progress...", Progress = 20, Color = Color3.fromRGB(100, 150, 255)},
- ["BrushingDone"] = {Text = "โ Take to Rinsing Station", Progress = 25, Color = Color3.fromRGB(0, 200, 100)},
- ["Rinsing"] = {Text = "๐ง Rinsing in Progress...", Progress = 45, Color = Color3.fromRGB(100, 150, 255)},
- ["RinsingDone"] = {Text = "โ Take to Drying Station", Progress = 50, Color = Color3.fromRGB(0, 200, 100)},
- ["Drying"] = {Text = "๐จ Drying in Progress...", Progress = 70, Color = Color3.fromRGB(100, 150, 255)},
- ["DryingDone"] = {Text = "โ Take to Packaging Station", Progress = 75, Color = Color3.fromRGB(0, 200, 100)},
- ["Packaging"] = {Text = "๐ฆ Packaging in Progress...", Progress = 95, Color = Color3.fromRGB(100, 150, 255)},
- ["Completed"] = {Text = "๐ Sneaker Complete!", Progress = 100, Color = Color3.fromRGB(255, 215, 0)}
- }
- local RARITY_COLORS = {
- Common = Color3.fromRGB(180, 180, 180),
- Rare = Color3.fromRGB(100, 150, 255),
- Epic = Color3.fromRGB(200, 100, 255),
- Legendary = Color3.fromRGB(255, 200, 50)
- }
- local function UpdateProgress(stage, rarity)
- if not stage or stage == "" then
- mainFrame.Visible = false
- noSneakerLabel.Visible = true
- return
- end
- mainFrame.Visible = true
- noSneakerLabel.Visible = false
- local stageInfo = STAGES[stage]
- if not stageInfo then return end
- rarityLabel.Text = (rarity or "Common") .. " Sneaker"
- rarityLabel.TextColor3 = RARITY_COLORS[rarity] or RARITY_COLORS.Common
- stageLabel.Text = stageInfo.Text
- stageLabel.TextColor3 = stageInfo.Color
- local targetSize = UDim2.new(stageInfo.Progress / 100, 0, 1, 0)
- TweenService:Create(progressFill, TweenInfo.new(0.5), {Size = targetSize, BackgroundColor3 = stageInfo.Color}):Play()
- percentLabel.Text = stageInfo.Progress .. "%"
- if stage == "Completed" then
- task.wait(2)
- mainFrame.Visible = false
- noSneakerLabel.Visible = true
- end
- end
- local remoteEventsFolder = ReplicatedStorage:WaitForChild("SneakerEvents", 10)
- if remoteEventsFolder then
- local updateStageEvent = remoteEventsFolder:WaitForChild("UpdateStage", 5)
- if updateStageEvent then
- updateStageEvent.OnClientEvent:Connect(UpdateProgress)
- end
- end
- mainFrame.Visible = false
- noSneakerLabel.Visible = true
- print("โ Sneaker Tracker Loaded")
- LOCALSCRIPTS IN STARTERPLAYER>STARTERPLAYERSCRIPTS
- -INDEXCLIENT
- --[[
- INDEX CLIENT (LOCAL SCRIPT)
- Location: StarterPlayer/StarterPlayerScripts/IndexClient
- Purpose:
- - Displays Sneaker Index UI
- - Shows discovered/locked sneakers
- - Handles filtering by rarity
- - Updates when new sneakers are discovered
- --]]
- local Players = game:GetService("Players")
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local TweenService = game:GetService("TweenService")
- local player = Players.LocalPlayer
- local playerGui = player:WaitForChild("PlayerGui")
- -- ========================================
- -- WAIT FOR UI ELEMENTS
- -- ========================================
- local indexUI = playerGui:WaitForChild("IndexUI")
- local indexButton = indexUI:WaitForChild("IndexButton")
- local indexPanel = indexUI:WaitForChild("IndexPanel")
- local sneakerGrid = indexPanel:WaitForChild("SneakerGrid")
- local filterFrame = indexPanel:WaitForChild("FilterFrame")
- local progressText = indexPanel.Header:WaitForChild("ProgressText")
- -- Get template
- local Templates = ReplicatedStorage:WaitForChild("Templates")
- local sneakerTemplate = Templates:WaitForChild("SneakerTemplate")
- -- ========================================
- -- MODULES & REMOTES
- -- ========================================
- local Modules = ReplicatedStorage:WaitForChild("Modules")
- local SneakerData = require(Modules.SneakerData)
- local RemoteEvents = ReplicatedStorage:WaitForChild("RemoteEvents")
- local sneakerDiscovered = RemoteEvents:WaitForChild("SneakerDiscovered")
- -- ========================================
- -- STATE VARIABLES
- -- ========================================
- local discoveredSneakers = {} -- [sneakerId] = true
- local currentFilter = "All"
- local isPanelOpen = false
- -- ========================================
- -- TOGGLE INDEX PANEL
- -- ========================================
- local function togglePanel()
- isPanelOpen = not isPanelOpen
- if isPanelOpen then
- -- Open animation
- indexPanel.Visible = true
- indexPanel.Size = UDim2.new(0, 0, 0, 0)
- local tweenInfo = TweenInfo.new(
- 0.3,
- Enum.EasingStyle.Back,
- Enum.EasingDirection.Out
- )
- local tween = TweenService:Create(
- indexPanel,
- tweenInfo,
- {Size = UDim2.new(0, 900, 0, 600)}
- )
- tween:Play()
- else
- -- Close animation
- local tweenInfo = TweenInfo.new(
- 0.2,
- Enum.EasingStyle.Quad,
- Enum.EasingDirection.In
- )
- local tween = TweenService:Create(
- indexPanel,
- tweenInfo,
- {Size = UDim2.new(0, 0, 0, 0)}
- )
- tween:Play()
- tween.Completed:Wait()
- indexPanel.Visible = false
- end
- end
- -- ========================================
- -- UPDATE SNEAKER GRID
- -- ========================================
- local function updateSneakerGrid()
- -- Clear existing sneaker frames
- for _, child in pairs(sneakerGrid:GetChildren()) do
- if child:IsA("Frame") and child.Name ~= "UIGridLayout" then
- child:Destroy()
- end
- end
- -- Get sneakers based on current filter
- local sneakersToShow = {}
- if currentFilter == "All" then
- sneakersToShow = SneakerData.Sneakers
- else
- sneakersToShow = SneakerData:GetSneakersByRarity(currentFilter)
- end
- -- Create UI for each sneaker
- for _, sneaker in pairs(sneakersToShow) do
- local sneakerFrame = sneakerTemplate:Clone()
- sneakerFrame.Name = sneaker.Id
- sneakerFrame.Parent = sneakerGrid
- sneakerFrame.Visible = true
- local isUnlocked = discoveredSneakers[sneaker.Id] == true
- if isUnlocked then
- -- UNLOCKED SNEAKER
- sneakerFrame.SneakerName.Text = sneaker.Name
- sneakerFrame.Rarity.Text = sneaker.Rarity
- sneakerFrame.Value.Text = "๐ฐ "..sneaker.Value
- sneakerFrame.Value.Visible = true
- sneakerFrame.SneakerImage.Image = sneaker.ImageId
- sneakerFrame.SneakerImage.ImageTransparency = 0
- sneakerFrame.LockIcon.Visible = false
- local unlockedBadge = sneakerFrame:FindFirstChild("UnlockedBadge")
- if unlockedBadge then
- unlockedBadge.Visible = true
- end
- -- Set rarity color
- local rarityColor = SneakerData.RarityColors[sneaker.Rarity]
- sneakerFrame.BackgroundColor3 = rarityColor
- sneakerFrame.BorderColor3 = rarityColor
- else
- -- LOCKED SNEAKER
- sneakerFrame.SneakerName.Text = "???"
- sneakerFrame.Rarity.Text = sneaker.Rarity
- sneakerFrame.Value.Visible = false
- sneakerFrame.SneakerImage.ImageTransparency = 0.8
- sneakerFrame.LockIcon.Visible = true
- local unlockedBadge = sneakerFrame:FindFirstChild("UnlockedBadge")
- if unlockedBadge then
- unlockedBadge.Visible = false
- end
- sneakerFrame.BackgroundColor3 = Color3.fromRGB(40, 40, 40)
- sneakerFrame.BorderColor3 = Color3.fromRGB(70, 70, 70)
- end
- end
- -- Update progress text
- local totalSneakers = #SneakerData.Sneakers
- local unlockedCount = 0
- for _ in pairs(discoveredSneakers) do
- unlockedCount = unlockedCount + 1
- end
- progressText.Text = "Discovered: "..unlockedCount.."/"..totalSneakers
- end
- -- ========================================
- -- FILTER BUTTON HANDLERS
- -- ========================================
- local function setupFilterButtons()
- for _, button in pairs(filterFrame:GetChildren()) do
- if button:IsA("TextButton") then
- button.MouseButton1Click:Connect(function()
- -- Update current filter
- currentFilter = button.Name:gsub("Button", "")
- -- Update button visuals
- for _, btn in pairs(filterFrame:GetChildren()) do
- if btn:IsA("TextButton") then
- if btn == button then
- -- Selected button
- btn.BackgroundColor3 = Color3.fromRGB(85, 170, 255)
- btn.TextColor3 = Color3.fromRGB(255, 255, 255)
- else
- -- Unselected button
- btn.BackgroundColor3 = Color3.fromRGB(70, 70, 70)
- btn.TextColor3 = Color3.fromRGB(200, 200, 200)
- end
- end
- end
- -- Update display
- updateSneakerGrid()
- end)
- end
- end
- end
- -- ========================================
- -- RECEIVE SNEAKER DISCOVERIES
- -- ========================================
- sneakerDiscovered.OnClientEvent:Connect(function(data)
- if typeof(data) == "table" then
- -- Full index update
- discoveredSneakers = data
- print("Received full sneaker index")
- else
- -- Single sneaker discovered
- discoveredSneakers[data] = true
- print("Discovered sneaker:", data)
- end
- updateSneakerGrid()
- end)
- -- ========================================
- -- BUTTON CLICK HANDLERS
- -- ========================================
- indexButton.MouseButton1Click:Connect(togglePanel)
- -- Close button
- local closeButton = indexPanel.Header:FindFirstChild("CloseButton")
- if closeButton then
- closeButton.MouseButton1Click:Connect(togglePanel)
- end
- -- ========================================
- -- BUTTON HOVER EFFECTS
- -- ========================================
- indexButton.MouseEnter:Connect(function()
- TweenService:Create(
- indexButton,
- TweenInfo.new(0.2, Enum.EasingStyle.Quad),
- {Size = UDim2.new(0, 70, 0, 70)}
- ):Play()
- end)
- indexButton.MouseLeave:Connect(function()
- TweenService:Create(
- indexButton,
- TweenInfo.new(0.2, Enum.EasingStyle.Quad),
- {Size = UDim2.new(0, 60, 0, 60)}
- ):Play()
- end)
- -- ========================================
- -- INITIALIZATION
- -- ========================================
- -- Start with panel closed
- indexPanel.Visible = false
- indexPanel.Size = UDim2.new(0, 0, 0, 0)
- -- Setup filter buttons
- setupFilterButtons()
- -- Initial display
- updateSneakerGrid()
- print("โ Index Client initialized")
- -- Request full index from server
- task.wait(1)
- sneakerDiscovered:FireServer()
- -NOTIFICATIONCLIENT
- --[[
- NOTIFICATION CLIENT (FINAL FIX)
- Location: StarterPlayer/StarterPlayerScripts/NotificationClient
- FIX: Corrected notification positioning to be visible on screen
- --]]
- local Players = game:GetService("Players")
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local TweenService = game:GetService("TweenService")
- local player = Players.LocalPlayer
- print("๐ Notification Client starting...")
- -- ========================================
- -- WAIT FOR UI ELEMENTS WITH TIMEOUT
- -- ========================================
- local function WaitForChildSafe(parent, childName, timeout)
- local child = parent:WaitForChild(childName, timeout or 10)
- if not child then
- warn("โ Failed to find:", childName, "in", parent:GetFullName())
- end
- return child
- end
- local playerGui = player:WaitForChild("PlayerGui", 10)
- if not playerGui then
- warn("โ PlayerGui not found!")
- return
- end
- local notificationUI = WaitForChildSafe(playerGui, "NotificationUI")
- if not notificationUI then
- warn("โ NotificationUI not found in PlayerGui!")
- return
- end
- local notificationContainer = WaitForChildSafe(notificationUI, "NotificationContainer")
- if not notificationContainer then
- warn("โ NotificationContainer not found!")
- return
- end
- print("โ Found NotificationContainer")
- -- Get template from ReplicatedStorage
- local Templates = WaitForChildSafe(ReplicatedStorage, "Templates")
- if not Templates then
- warn("โ Templates folder not found!")
- return
- end
- local notificationTemplate = WaitForChildSafe(Templates, "NotificationTemplate")
- if not notificationTemplate then
- warn("โ NotificationTemplate not found!")
- return
- end
- print("โ Found NotificationTemplate")
- -- ========================================
- -- REMOTE EVENTS
- -- ========================================
- local RemoteEvents = WaitForChildSafe(ReplicatedStorage, "RemoteEvents")
- if not RemoteEvents then
- warn("โ RemoteEvents folder not found!")
- return
- end
- local showNotification = WaitForChildSafe(RemoteEvents, "ShowNotification")
- if not showNotification then
- warn("โ ShowNotification RemoteEvent not found!")
- return
- end
- print("โ Found ShowNotification RemoteEvent")
- -- ========================================
- -- STATE VARIABLES
- -- ========================================
- local activeNotifications = {}
- local MAX_NOTIFICATIONS = 5
- -- ========================================
- -- DISPLAY NOTIFICATION
- -- ========================================
- local function displayNotification(title, message, color)
- print("๐ฉ Displaying notification:", title, "-", message)
- -- Remove oldest notification if we're at max
- if #activeNotifications >= MAX_NOTIFICATIONS then
- local oldest = activeNotifications[1]
- if oldest and oldest.Parent then
- removeNotification(oldest, true)
- end
- end
- -- Create notification frame
- local notif = notificationTemplate:Clone()
- notif.Name = "Notification_" .. tick()
- notif.Parent = notificationContainer
- notif.Visible = true
- notif.BackgroundColor3 = color or Color3.fromRGB(85, 170, 255)
- -- Set content
- local titleLabel = notif:FindFirstChild("Title")
- local messageLabel = notif:FindFirstChild("Message")
- if titleLabel then
- titleLabel.Text = title
- print("โ Set title:", title)
- else
- warn("โ ๏ธ Title label not found in notification template")
- end
- if messageLabel then
- messageLabel.Text = message
- print("โ Set message:", message)
- else
- warn("โ ๏ธ Message label not found in notification template")
- end
- -- Add to active list
- table.insert(activeNotifications, notif)
- -- Calculate Y offset for stacking
- local yOffset = (#activeNotifications - 1) * 80
- -- Start position: OFF SCREEN to the right
- notif.Position = UDim2.new(1, 20, 0, yOffset + 10)
- print("๐ Starting position:", notif.Position)
- -- Target position: VISIBLE on screen (10 pixels from right edge)
- local targetPosition = UDim2.new(1, -370, 0, yOffset + 10)
- print("๐ฏ Target position:", targetPosition)
- -- Animate in (slide from right)
- local tweenInfo = TweenInfo.new(
- 0.3,
- Enum.EasingStyle.Back,
- Enum.EasingDirection.Out
- )
- local success, err = pcall(function()
- local tweenIn = TweenService:Create(
- notif,
- tweenInfo,
- {Position = targetPosition}
- )
- tweenIn:Play()
- end)
- if not success then
- warn("โ ๏ธ Error animating notification:", err)
- end
- print("โ Notification animated successfully")
- -- Auto-remove after 3 seconds
- task.delay(3, function()
- removeNotification(notif)
- end)
- -- Close button handler
- local closeButton = notif:FindFirstChild("CloseButton")
- if closeButton then
- closeButton.MouseButton1Click:Connect(function()
- print("๐๏ธ Close button clicked")
- removeNotification(notif)
- end)
- end
- print("โ Notification displayed successfully")
- end
- -- ========================================
- -- REMOVE NOTIFICATION
- -- ========================================
- function removeNotification(notif, instant)
- if not notif or not notif.Parent then return end
- print("๐๏ธ Removing notification:", notif.Name)
- if instant then
- -- Instant removal (no animation)
- for i, n in pairs(activeNotifications) do
- if n == notif then
- table.remove(activeNotifications, i)
- break
- end
- end
- notif:Destroy()
- repositionNotifications()
- return
- end
- -- Animate out
- local success, err = pcall(function()
- local tweenInfo = TweenInfo.new(
- 0.3,
- Enum.EasingStyle.Quad,
- Enum.EasingDirection.In
- )
- local tweenOut = TweenService:Create(
- notif,
- tweenInfo,
- {
- Position = UDim2.new(1, 20, notif.Position.Y.Scale, notif.Position.Y.Offset),
- BackgroundTransparency = 1
- }
- )
- -- Also fade text
- for _, child in pairs(notif:GetDescendants()) do
- if child:IsA("TextLabel") or child:IsA("TextButton") then
- TweenService:Create(
- child,
- tweenInfo,
- {TextTransparency = 1}
- ):Play()
- end
- end
- tweenOut:Play()
- tweenOut.Completed:Wait()
- end)
- if not success then
- warn("โ ๏ธ Error animating notification removal:", err)
- end
- -- Remove from list
- for i, n in pairs(activeNotifications) do
- if n == notif then
- table.remove(activeNotifications, i)
- break
- end
- end
- notif:Destroy()
- -- Reposition remaining notifications
- repositionNotifications()
- end
- -- ========================================
- -- REPOSITION ALL NOTIFICATIONS
- -- ========================================
- function repositionNotifications()
- for i, notif in pairs(activeNotifications) do
- local yOffset = (i - 1) * 80
- pcall(function()
- local tweenInfo = TweenInfo.new(
- 0.2,
- Enum.EasingStyle.Quad,
- Enum.EasingDirection.Out
- )
- TweenService:Create(
- notif,
- tweenInfo,
- {Position = UDim2.new(1, -370, 0, yOffset + 10)}
- ):Play()
- end)
- end
- end
- -- ========================================
- -- LISTEN FOR SERVER NOTIFICATIONS
- -- ========================================
- showNotification.OnClientEvent:Connect(function(title, message, color)
- print("๐ฌ Received notification from server:", title)
- local success, err = pcall(function()
- displayNotification(title, message, color)
- end)
- if not success then
- warn("โ Error displaying notification:", err)
- end
- end)
- -- ========================================
- -- INITIALIZATION
- -- ========================================
- print("โ Notification Client initialized")
- print("๐ Container position:", notificationContainer.Position)
- print("๐ Container size:", notificationContainer.Size)
- -- Test notification on startup (optional - remove after testing)
- task.wait(2)
- print("๐งช Sending test notification...")
- displayNotification("System Ready โ ", "Notifications are working!", Color3.fromRGB(85, 255, 127))
- -QUESTCLIENT
- --[[
- QUEST CLIENT (LOCAL SCRIPT)
- Location: StarterPlayer/StarterPlayerScripts/QuestClient
- Purpose:
- - Displays Quest UI to players
- - Handles opening/closing quest panel
- - Updates quest progress displays
- - Sends claim requests to server
- --]]
- local Players = game:GetService("Players")
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local TweenService = game:GetService("TweenService")
- local player = Players.LocalPlayer
- local playerGui = player:WaitForChild("PlayerGui")
- -- ========================================
- -- WAIT FOR UI ELEMENTS
- -- ========================================
- local questUI = playerGui:WaitForChild("QuestUI")
- local questButton = questUI:WaitForChild("QuestButton")
- local questPanel = questUI:WaitForChild("QuestPanel")
- local questContainer = questPanel:WaitForChild("QuestContainer")
- -- Get template from ReplicatedStorage
- local Templates = ReplicatedStorage:WaitForChild("Templates")
- local questTemplate = Templates:WaitForChild("QuestTemplate")
- -- ========================================
- -- REMOTE EVENTS
- -- ========================================
- local RemoteEvents = ReplicatedStorage:WaitForChild("RemoteEvents")
- local updateQuestProgress = RemoteEvents:WaitForChild("UpdateQuestProgress")
- local questCompleted = RemoteEvents:WaitForChild("QuestCompleted")
- local claimQuestReward = RemoteEvents:WaitForChild("ClaimQuestReward")
- -- ========================================
- -- STATE VARIABLES
- -- ========================================
- local currentQuests = {}
- local isPanelOpen = false
- -- ========================================
- -- TOGGLE QUEST PANEL
- -- ========================================
- local function togglePanel()
- isPanelOpen = not isPanelOpen
- if isPanelOpen then
- -- Open animation
- questPanel.Visible = true
- questPanel.Size = UDim2.new(0, 0, 0, 0)
- local tweenInfo = TweenInfo.new(
- 0.3,
- Enum.EasingStyle.Back,
- Enum.EasingDirection.Out
- )
- local tween = TweenService:Create(
- questPanel,
- tweenInfo,
- {Size = UDim2.new(0, 600, 0, 500)}
- )
- tween:Play()
- else
- -- Close animation
- local tweenInfo = TweenInfo.new(
- 0.2,
- Enum.EasingStyle.Quad,
- Enum.EasingDirection.In
- )
- local tween = TweenService:Create(
- questPanel,
- tweenInfo,
- {Size = UDim2.new(0, 0, 0, 0)}
- )
- tween:Play()
- tween.Completed:Wait()
- questPanel.Visible = false
- end
- end
- -- ========================================
- -- UPDATE QUEST DISPLAY
- -- ========================================
- local function updateQuestDisplay()
- -- Clear existing quest frames
- for _, child in pairs(questContainer:GetChildren()) do
- if child:IsA("Frame") and child.Name:match("^Quest_") then
- child:Destroy()
- end
- end
- -- Create UI for each quest
- for i, quest in pairs(currentQuests) do
- local questFrame = questTemplate:Clone()
- questFrame.Name = "Quest_"..i
- questFrame.Parent = questContainer
- questFrame.Visible = true
- -- Set quest information
- questFrame.Icon.Text = quest.Icon or "๐"
- questFrame.Description.Text = quest.Description
- questFrame.Progress.Text = quest.CurrentCount.."/"..quest.TargetCount
- questFrame.RewardLabel.Text = "๐ฐ +"..quest.Reward
- -- Update progress bar
- local progressPercent = math.clamp(quest.CurrentCount / quest.TargetCount, 0, 1)
- local progressBar = questFrame.ProgressBarBG.ProgressBarFill
- TweenService:Create(
- progressBar,
- TweenInfo.new(0.5, Enum.EasingStyle.Quad),
- {Size = UDim2.new(progressPercent, 0, 1, 0)}
- ):Play()
- -- Handle claim button
- local claimButton = questFrame.ClaimButton
- if quest.Completed then
- -- Quest is complete - allow claiming
- claimButton.BackgroundColor3 = Color3.fromRGB(85, 255, 127)
- claimButton.Text = "Claim Reward"
- claimButton.AutoButtonColor = true
- -- Add completed visual effect
- questFrame.BackgroundColor3 = Color3.fromRGB(40, 70, 40)
- questFrame.BorderSizePixel = 3
- questFrame.BorderColor3 = Color3.fromRGB(85, 255, 127)
- -- Claim button click handler
- claimButton.MouseButton1Click:Connect(function()
- claimButton.Text = "Claiming..."
- claimButton.AutoButtonColor = false
- claimQuestReward:FireServer(quest.Id)
- end)
- else
- -- Quest is in progress
- claimButton.BackgroundColor3 = Color3.fromRGB(100, 100, 100)
- claimButton.Text = "In Progress"
- claimButton.AutoButtonColor = false
- end
- end
- end
- -- ========================================
- -- RECEIVE QUEST UPDATES FROM SERVER
- -- ========================================
- updateQuestProgress.OnClientEvent:Connect(function(quests)
- currentQuests = quests
- updateQuestDisplay()
- print("Quest progress updated")
- end)
- -- ========================================
- -- QUEST COMPLETED NOTIFICATION
- -- ========================================
- questCompleted.OnClientEvent:Connect(function(quest)
- print("Quest completed:", quest.Description)
- -- Update local data
- for i, q in pairs(currentQuests) do
- if q.Id == quest.Id then
- currentQuests[i] = quest
- break
- end
- end
- updateQuestDisplay()
- -- Play completion sound (optional)
- -- Uncomment and add your sound ID
- --[[
- local sound = Instance.new("Sound")
- sound.SoundId = "rbxassetid://YOUR_SOUND_ID"
- sound.Volume = 0.5
- sound.Parent = script
- sound:Play()
- sound.Ended:Connect(function()
- sound:Destroy()
- end)
- --]]
- end)
- -- ========================================
- -- BUTTON CLICK HANDLER
- -- ========================================
- questButton.MouseButton1Click:Connect(togglePanel)
- -- Close button inside panel
- local closeButton = questPanel.Header:FindFirstChild("CloseButton")
- if closeButton then
- closeButton.MouseButton1Click:Connect(togglePanel)
- end
- -- ========================================
- -- BUTTON HOVER EFFECTS
- -- ========================================
- questButton.MouseEnter:Connect(function()
- TweenService:Create(
- questButton,
- TweenInfo.new(0.2, Enum.EasingStyle.Quad),
- {Size = UDim2.new(0, 70, 0, 70)}
- ):Play()
- end)
- questButton.MouseLeave:Connect(function()
- TweenService:Create(
- questButton,
- TweenInfo.new(0.2, Enum.EasingStyle.Quad),
- {Size = UDim2.new(0, 60, 0, 60)}
- ):Play()
- end)
- -- ========================================
- -- INITIALIZATION
- -- ========================================
- print("โ Quest Client initialized")
- -- Start with panel closed
- questPanel.Visible = false
- questPanel.Size = UDim2.new(0, 0, 0, 0)
Advertisement
Add Comment
Please, Sign In to add comment