コンテンツへスキップ
動作中

item spawner, free

CLclarkdevlinorg0 閲覧数Murder Mystery 22026年7月26日
共有
item spawner, free

スクリプトコード

Lua
local player = game.Players.LocalPlayer
local TweenService = game:GetService("TweenService")
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")

local COLORS = {
    BG          = Color3.fromRGB(10, 8, 18),
    Panel       = Color3.fromRGB(16, 12, 28),
    Card        = Color3.fromRGB(26, 18, 44),
    CardHover   = Color3.fromRGB(42, 30, 68),
    CardSel     = Color3.fromRGB(55, 38, 88),
    Purple      = Color3.fromRGB(168, 120, 255),
    PurpleBrt   = Color3.fromRGB(210, 180, 255),
    PurpleDark  = Color3.fromRGB(110, 72, 195),
    PurpleDeep  = Color3.fromRGB(80, 44, 160),
    PurpleMid   = Color3.fromRGB(140, 90, 230),
    Success     = Color3.fromRGB(100, 220, 160),
    Error       = Color3.fromRGB(255, 80, 100),
    Text        = Color3.fromRGB(240, 230, 255),
    TextSub     = Color3.fromRGB(170, 145, 210),
    TextDim     = Color3.fromRGB(100, 80, 140),
    Border      = Color3.fromRGB(80, 55, 130),
}

local function tween(obj, t, props, style, dir)
    style = style or Enum.EasingStyle.Quart
    dir   = dir   or Enum.EasingDirection.Out
    return TweenService:Create(obj, TweenInfo.new(t, style, dir), props)
end

local outerGlow

local function makeDraggable(handle, frame)
    local dragging, dragStart, startPos = false, nil, nil
    handle.InputBegan:Connect(function(inp)
        if inp.UserInputType == Enum.UserInputType.MouseButton1 or inp.UserInputType == Enum.UserInputType.Touch then
            dragging = true; dragStart = inp.Position; startPos = frame.Position
            inp.Changed:Connect(function()
                if inp.UserInputState == Enum.UserInputState.End then dragging = false end
            end)
        end
    end)
    UserInputService.InputChanged:Connect(function(inp)
        if dragging and (inp.UserInputType == Enum.UserInputType.MouseMovement or inp.UserInputType == Enum.UserInputType.Touch) then
            local d = inp.Position - dragStart
            local newX = startPos.X.Offset + d.X
            local newY = startPos.Y.Offset + d.Y
            frame.Position = UDim2.new(startPos.X.Scale, newX, startPos.Y.Scale, newY)
            if outerGlow then
                outerGlow.Position = UDim2.new(startPos.X.Scale, newX - 24, startPos.Y.Scale, newY - 24)
            end
        end
    end)
end

local function addRipple(button)
    button.MouseButton1Click:Connect(function()
        local ripple = Instance.new("Frame")
        ripple.Size = UDim2.new(0, 0, 0, 0)
        ripple.Position = UDim2.new(0.5, 0, 0.5, 0)
        ripple.AnchorPoint = Vector2.new(0.5, 0.5)
        ripple.BackgroundColor3 = Color3.fromRGB(200, 160, 255)
        ripple.BackgroundTransparency = 0.65
        ripple.ZIndex = button.ZIndex + 1
        ripple.Parent = button
        Instance.new("UICorner", ripple).CornerRadius = UDim.new(1, 0)
        tween(ripple, 0.55, {Size = UDim2.new(2.5, 0, 2.5, 0), BackgroundTransparency = 1}, Enum.EasingStyle.Quad):Play()
        game:GetService("Debris"):AddItem(ripple, 0.6)
    end)
end

local loaderGui = Instance.new("ScreenGui")
loaderGui.Name = "MM2Loader"
loaderGui.ResetOnSpawn = false
loaderGui.IgnoreGuiInset = true
loaderGui.DisplayOrder = 9999
loaderGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
loaderGui.Parent = player:WaitForChild("PlayerGui")

local loaderFrame = Instance.new("Frame")
loaderFrame.Size = UDim2.new(1, 0, 1, 0)
loaderFrame.Position = UDim2.new(0, 0, 0, 0)
loaderFrame.BackgroundColor3 = Color3.fromRGB(6, 4, 14)
loaderFrame.BorderSizePixel = 0
loaderFrame.ZIndex = 1
loaderFrame.Parent = loaderGui

local gridLines = Instance.new("Frame")
gridLines.Size = UDim2.new(1, 0, 1, 0)
gridLines.BackgroundTransparency = 1
gridLines.ZIndex = 2
gridLines.Parent = loaderFrame

for col = 0, 16 do
    local line = Instance.new("Frame")
    line.Size = UDim2.new(0, 1, 1, 0)
    line.Position = UDim2.new(col / 16, 0, 0, 0)
    line.BackgroundColor3 = Color3.fromRGB(120, 80, 200)
    line.BackgroundTransparency = 0.88
    line.BorderSizePixel = 0
    line.ZIndex = 2
    line.Parent = gridLines
end
for row = 0, 12 do
    local line = Instance.new("Frame")
    line.Size = UDim2.new(1, 0, 0, 1)
    line.Position = UDim2.new(0, 0, row / 12, 0)
    line.BackgroundColor3 = Color3.fromRGB(120, 80, 200)
    line.BackgroundTransparency = 0.88
    line.BorderSizePixel = 0
    line.ZIndex = 2
    line.Parent = gridLines
end

local bgGlow1 = Instance.new("Frame")
bgGlow1.Size = UDim2.new(0, 600, 0, 600)
bgGlow1.Position = UDim2.new(0.5, -300, 0.5, -300)
bgGlow1.BackgroundColor3 = Color3.fromRGB(140, 80, 255)
bgGlow1.BackgroundTransparency = 0.93
bgGlow1.BorderSizePixel = 0
bgGlow1.ZIndex = 2
bgGlow1.Parent = loaderFrame
Instance.new("UICorner", bgGlow1).CornerRadius = UDim.new(1, 0)

local bgGlow2 = Instance.new("Frame")
bgGlow2.Size = UDim2.new(0, 300, 0, 300)
bgGlow2.Position = UDim2.new(0.25, -150, 0.7, -150)
bgGlow2.BackgroundColor3 = Color3.fromRGB(100, 40, 200)
bgGlow2.BackgroundTransparency = 0.95
bgGlow2.BorderSizePixel = 0
bgGlow2.ZIndex = 2
bgGlow2.Parent = loaderFrame
Instance.new("UICorner", bgGlow2).CornerRadius = UDim.new(1, 0)

local loaderCenter = Instance.new("Frame")
loaderCenter.Size = UDim2.new(0, 340, 0, 270)
loaderCenter.Position = UDim2.new(0.5, -170, 0.5, -135)
loaderCenter.BackgroundColor3 = Color3.fromRGB(14, 10, 28)
loaderCenter.BorderSizePixel = 0
loaderCenter.ZIndex = 3
loaderCenter.Parent = loaderFrame
Instance.new("UICorner", loaderCenter).CornerRadius = UDim.new(0, 22)
local loaderStroke = Instance.new("UIStroke", loaderCenter)
loaderStroke.Color = Color3.fromRGB(160, 110, 255)
loaderStroke.Thickness = 1.5
loaderStroke.Transparency = 0.25

local loaderTopLine = Instance.new("Frame")
loaderTopLine.Size = UDim2.new(0.6, 0, 0, 2)
loaderTopLine.Position = UDim2.new(0.2, 0, 0, 0)
loaderTopLine.BackgroundColor3 = Color3.fromRGB(180, 130, 255)
loaderTopLine.BorderSizePixel = 0
loaderTopLine.ZIndex = 4
loaderTopLine.Parent = loaderCenter
Instance.new("UICorner", loaderTopLine).CornerRadius = UDim.new(0, 2)
local loaderLineGrad = Instance.new("UIGradient", loaderTopLine)
loaderLineGrad.Color = ColorSequence.new({
    ColorSequenceKeypoint.new(0, Color3.fromRGB(80, 40, 180)),
    ColorSequenceKeypoint.new(0.5, Color3.fromRGB(200, 150, 255)),
    ColorSequenceKeypoint.new(1, Color3.fromRGB(80, 40, 180)),
})

local cardGlow = Instance.new("Frame")
cardGlow.Size = UDim2.new(0, 390, 0, 320)
cardGlow.Position = UDim2.new(0.5, -195, 0.5, -160)
cardGlow.BackgroundColor3 = Color3.fromRGB(140, 80, 255)
cardGlow.BackgroundTransparency = 0.9
cardGlow.BorderSizePixel = 0
cardGlow.ZIndex = 2
cardGlow.Parent = loaderFrame
Instance.new("UICorner", cardGlow).CornerRadius = UDim.new(0, 30)

local loaderIconBG = Instance.new("Frame")
loaderIconBG.Size = UDim2.new(0, 80, 0, 80)
loaderIconBG.Position = UDim2.new(0.5, -40, 0, 28)
loaderIconBG.BackgroundColor3 = Color3.fromRGB(120, 70, 220)
loaderIconBG.BackgroundTransparency = 0
loaderIconBG.BorderSizePixel = 0
loaderIconBG.ZIndex = 4
loaderIconBG.Parent = loaderCenter
Instance.new("UICorner", loaderIconBG).CornerRadius = UDim.new(0, 20)
local loaderIconStroke = Instance.new("UIStroke", loaderIconBG)
loaderIconStroke.Color = Color3.fromRGB(200, 160, 255)
loaderIconStroke.Thickness = 2
loaderIconStroke.Transparency = 0.2
local iconGrad = Instance.new("UIGradient", loaderIconBG)
iconGrad.Color = ColorSequence.new({
    ColorSequenceKeypoint.new(0, Color3.fromRGB(200, 150, 255)),
    ColorSequenceKeypoint.new(1, Color3.fromRGB(80, 40, 180)),
})
iconGrad.Rotation = 135

local loaderIconLabel = Instance.new("TextLabel")
loaderIconLabel.Size = UDim2.new(1, 0, 1, 0)
loaderIconLabel.BackgroundTransparency = 1
loaderIconLabel.Text = "MM2"
loaderIconLabel.TextColor3 = Color3.fromRGB(240, 220, 255)
loaderIconLabel.Font = Enum.Font.GothamBold
loaderIconLabel.TextSize = 22
loaderIconLabel.ZIndex = 5
loaderIconLabel.Parent = loaderIconBG

local loaderTitle = Instance.new("TextLabel")
loaderTitle.Size = UDim2.new(1, -20, 0, 30)
loaderTitle.Position = UDim2.new(0, 10, 0, 122)
loaderTitle.BackgroundTransparency = 1
loaderTitle.Text = "ITEM SPAWNER"
loaderTitle.TextColor3 = Color3.fromRGB(230, 210, 255)
loaderTitle.Font = Enum.Font.GothamBold
loaderTitle.TextSize = 23
loaderTitle.ZIndex = 4
loaderTitle.Parent = loaderCenter

local loaderSub = Instance.new("TextLabel")
loaderSub.Size = UDim2.new(1, -20, 0, 18)
loaderSub.Position = UDim2.new(0, 10, 0, 154)
loaderSub.BackgroundTransparency = 1
loaderSub.Text = "Murder Mystery 2"
loaderSub.TextColor3 = COLORS.TextDim
loaderSub.Font = Enum.Font.Gotham
loaderSub.TextSize = 12
loaderSub.ZIndex = 4
loaderSub.Parent = loaderCenter

local loaderTrackBG = Instance.new("Frame")
loaderTrackBG.Size = UDim2.new(1, -44, 0, 6)
loaderTrackBG.Position = UDim2.new(0, 22, 0, 198)
loaderTrackBG.BackgroundColor3 = Color3.fromRGB(30, 20, 55)
loaderTrackBG.BorderSizePixel = 0
loaderTrackBG.ZIndex = 4
loaderTrackBG.Parent = loaderCenter
Instance.new("UICorner", loaderTrackBG).CornerRadius = UDim.new(1, 0)

local loaderFill = Instance.new("Frame")
loaderFill.Size = UDim2.new(0, 0, 1, 0)
loaderFill.BackgroundColor3 = Color3.fromRGB(160, 100, 255)
loaderFill.BorderSizePixel = 0
loaderFill.ZIndex = 5
loaderFill.Parent = loaderTrackBG
Instance.new("UICorner", loaderFill).CornerRadius = UDim.new(1, 0)
local fillGrad = Instance.new("UIGradient", loaderFill)
fillGrad.Color = ColorSequence.new({
    ColorSequenceKeypoint.new(0, Color3.fromRGB(180, 130, 255)),
    ColorSequenceKeypoint.new(1, Color3.fromRGB(120, 60, 220)),
})

local glider = Instance.new("Frame")
glider.Size = UDim2.new(0, 12, 0, 12)
glider.AnchorPoint = Vector2.new(0.5, 0.5)
glider.Position = UDim2.new(1, 0, 0.5, 0)
glider.BackgroundColor3 = Color3.fromRGB(220, 190, 255)
glider.BorderSizePixel = 0
glider.ZIndex = 6
glider.Parent = loaderFill
Instance.new("UICorner", glider).CornerRadius = UDim.new(1, 0)

local loaderStatus = Instance.new("TextLabel")
loaderStatus.Size = UDim2.new(1, -80, 0, 16)
loaderStatus.Position = UDim2.new(0, 22, 0, 220)
loaderStatus.BackgroundTransparency = 1
loaderStatus.Text = "Initializing..."
loaderStatus.TextColor3 = COLORS.TextDim
loaderStatus.Font = Enum.Font.Gotham
loaderStatus.TextSize = 11
loaderStatus.TextXAlignment = Enum.TextXAlignment.Left
loaderStatus.ZIndex = 4
loaderStatus.Parent = loaderCenter

local loaderPct = Instance.new("TextLabel")
loaderPct.Size = UDim2.new(0, 55, 0, 16)
loaderPct.Position = UDim2.new(1, -68, 0, 220)
loaderPct.BackgroundTransparency = 1
loaderPct.Text = "0%"
loaderPct.TextColor3 = Color3.fromRGB(190, 150, 255)
loaderPct.Font = Enum.Font.GothamBold
loaderPct.TextSize = 11
loaderPct.TextXAlignment = Enum.TextXAlignment.Right
loaderPct.ZIndex = 4
loaderPct.Parent = loaderCenter

task.spawn(function()
    while loaderGui.Parent and loaderFrame.Visible do
        tween(loaderIconBG, 1.1, {BackgroundTransparency = 0}, Enum.EasingStyle.Sine):Play()
        task.wait(1.1)
        tween(loaderIconBG, 1.1, {BackgroundTransparency = 0.2}, Enum.EasingStyle.Sine):Play()
        task.wait(1.1)
    end
end)
task.spawn(function()
    while loaderGui.Parent and loaderFrame.Visible do
        iconGrad.Rotation = (iconGrad.Rotation + 1.2) % 360
        task.wait(0.03)
    end
end)
task.spawn(function()
    local t = 0
    while loaderGui.Parent and loaderFrame.Visible do
        t += 0.04
        bgGlow1.BackgroundTransparency = 0.93 + math.sin(t * 0.8) * 0.03
        bgGlow2.BackgroundTransparency = 0.95 + math.cos(t * 1.1) * 0.02
        cardGlow.BackgroundTransparency = 0.90 + math.sin(t * 1.3) * 0.04
        task.wait(0.05)
    end
end)

local screenGui = Instance.new("ScreenGui")
screenGui.Name = "MM2Spawner"
screenGui.ResetOnSpawn = false
screenGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
screenGui.DisplayOrder = 100
screenGui.Parent = player:WaitForChild("PlayerGui")

outerGlow = Instance.new("Frame")
outerGlow.Size = UDim2.new(0, 416, 0, 546)
outerGlow.Position = UDim2.new(0.5, -208, 0.5, -273)
outerGlow.BackgroundColor3 = Color3.fromRGB(140, 80, 255)
outerGlow.BackgroundTransparency = 0.88
outerGlow.BorderSizePixel = 0
outerGlow.ZIndex = 1
outerGlow.Visible = false
outerGlow.Parent = screenGui
Instance.new("UICorner", outerGlow).CornerRadius = UDim.new(0, 30)

local mainFrame = Instance.new("Frame")
mainFrame.Size = UDim2.new(0, 370, 0, 498)
mainFrame.Position = UDim2.new(0.5, -185, 0.5, -249)
mainFrame.BackgroundColor3 = COLORS.BG
mainFrame.BorderSizePixel = 0
mainFrame.ClipsDescendants = true
mainFrame.Visible = false
mainFrame.ZIndex = 2
mainFrame.Parent = screenGui
Instance.new("UICorner", mainFrame).CornerRadius = UDim.new(0, 20)

local mainBorder = Instance.new("UIStroke", mainFrame)
mainBorder.Color = Color3.fromRGB(140, 90, 230)
mainBorder.Thickness = 1.5
mainBorder.Transparency = 0.35

local function makeOrb(parent, x, y, size, color, transp)
    local orb = Instance.new("Frame")
    orb.Size = UDim2.new(0, size, 0, size)
    orb.Position = UDim2.new(0, x, 0, y)
    orb.BackgroundColor3 = color
    orb.BackgroundTransparency = transp
    orb.BorderSizePixel = 0
    orb.ZIndex = 2
    orb.Parent = parent
    Instance.new("UICorner", orb).CornerRadius = UDim.new(1, 0)
    return orb
end
local orb1 = makeOrb(mainFrame, -80, -80, 220, Color3.fromRGB(120, 60, 220), 0.92)
local orb2 = makeOrb(mainFrame, 230, 330, 160, Color3.fromRGB(80, 30, 180), 0.93)
local orb3 = makeOrb(mainFrame, 300, -60, 120, Color3.fromRGB(160, 80, 255), 0.95)
local orb4 = makeOrb(mainFrame, 100, 400, 100, Color3.fromRGB(100, 50, 200), 0.96)

local header = Instance.new("Frame")
header.Size = UDim2.new(1, 0, 0, 76)
header.BackgroundColor3 = Color3.fromRGB(16, 10, 32)
header.BorderSizePixel = 0
header.ZIndex = 5
header.Parent = mainFrame
Instance.new("UICorner", header).CornerRadius = UDim.new(0, 20)

local headerGrad = Instance.new("UIGradient", header)
headerGrad.Color = ColorSequence.new({
    ColorSequenceKeypoint.new(0, Color3.fromRGB(28, 18, 52)),
    ColorSequenceKeypoint.new(1, Color3.fromRGB(12, 8, 24)),
})

local headerFix = Instance.new("Frame")
headerFix.Size = UDim2.new(1, 0, 0, 20)
headerFix.Position = UDim2.new(0, 0, 1, -20)
headerFix.BackgroundColor3 = Color3.fromRGB(14, 10, 28)
headerFix.BorderSizePixel = 0
headerFix.ZIndex = 5
headerFix.Parent = header

local topAccent = Instance.new("Frame")
topAccent.Size = UDim2.new(0.55, 0, 0, 2)
topAccent.Position = UDim2.new(0, 16, 0, 0)
topAccent.BackgroundColor3 = Color3.fromRGB(160, 100, 255)
topAccent.BorderSizePixel = 0
topAccent.ZIndex = 6
topAccent.Parent = header
Instance.new("UICorner", topAccent).CornerRadius = UDim.new(0, 2)
local topAccentGrad = Instance.new("UIGradient", topAccent)
topAccentGrad.Color = ColorSequence.new({
    ColorSequenceKeypoint.new(0, Color3.fromRGB(120, 60, 220)),
    ColorSequenceKeypoint.new(0.45, Color3.fromRGB(200, 150, 255)),
    ColorSequenceKeypoint.new(1, Color3.fromRGB(10, 8, 18)),
})

local iconBox = Instance.new("Frame")
iconBox.Size = UDim2.new(0, 46, 0, 46)
iconBox.Position = UDim2.new(0, 15, 0.5, -23)
iconBox.BackgroundColor3 = Color3.fromRGB(110, 60, 210)
iconBox.BorderSizePixel = 0
iconBox.ZIndex = 6
iconBox.Parent = header
Instance.new("UICorner", iconBox).CornerRadius = UDim.new(0, 12)
local iconBoxGrad = Instance.new("UIGradient", iconBox)
iconBoxGrad.Color = ColorSequence.new({
    ColorSequenceKeypoint.new(0, Color3.fromRGB(190, 140, 255)),
    ColorSequenceKeypoint.new(1, Color3.fromRGB(80, 36, 170)),
})
iconBoxGrad.Rotation = 135
local iconBoxStroke = Instance.new("UIStroke", iconBox)
iconBoxStroke.Color = Color3.fromRGB(180, 130, 255)
iconBoxStroke.Thickness = 1.5
iconBoxStroke.Transparency = 0.3

local iconLabel = Instance.new("TextLabel")
iconLabel.Size = UDim2.new(1, 0, 1, 0)
iconLabel.BackgroundTransparency = 1
iconLabel.Text = "MM2"
iconLabel.TextColor3 = Color3.fromRGB(240, 220, 255)
iconLabel.Font = Enum.Font.GothamBold
iconLabel.TextSize = 13
iconLabel.ZIndex = 7
iconLabel.Parent = iconBox

local title = Instance.new("TextLabel")
title.Size = UDim2.new(0, 220, 0, 26)
title.Position = UDim2.new(0, 72, 0, 13)
title.BackgroundTransparency = 1
title.Text = "ITEM SPAWNER"
title.TextColor3 = Color3.fromRGB(235, 215, 255)
title.Font = Enum.Font.GothamBold
title.TextSize = 18
title.TextXAlignment = Enum.TextXAlignment.Left
title.ZIndex = 6
title.Parent = header

local subtitle = Instance.new("TextLabel")
subtitle.Size = UDim2.new(0, 220, 0, 16)
subtitle.Position = UDim2.new(0, 72, 0, 41)
subtitle.BackgroundTransparency = 1
subtitle.Text = "Murder Mystery 2"
subtitle.TextColor3 = COLORS.TextSub
subtitle.Font = Enum.Font.Gotham
subtitle.TextSize = 12
subtitle.TextXAlignment = Enum.TextXAlignment.Left
subtitle.ZIndex = 6
subtitle.Parent = header

local credits = Instance.new("TextLabel")
credits.Size = UDim2.new(0, 220, 0, 13)
credits.Position = UDim2.new(0, 72, 0, 58)
credits.BackgroundTransparency = 1
credits.Text = "made by 60d8 on discord"
credits.TextColor3 = Color3.fromRGB(150, 110, 210)
credits.Font = Enum.Font.GothamBold
credits.TextSize = 9
credits.TextXAlignment = Enum.TextXAlignment.Left
credits.ZIndex = 7
credits.Parent = header

local closeBtn = Instance.new("TextButton")
closeBtn.Size = UDim2.new(0, 32, 0, 32)
closeBtn.Position = UDim2.new(1, -46, 0.5, -16)
closeBtn.BackgroundColor3 = Color3.fromRGB(100, 20, 40)
closeBtn.BackgroundTransparency = 0.15
closeBtn.Text = "X"
closeBtn.TextColor3 = Color3.fromRGB(255, 130, 150)
closeBtn.Font = Enum.Font.GothamBold
closeBtn.TextSize = 13
closeBtn.BorderSizePixel = 0
closeBtn.AutoButtonColor = false
closeBtn.ZIndex = 7
closeBtn.Parent = header
Instance.new("UICorner", closeBtn).CornerRadius = UDim.new(0, 9)
local closeBtnStroke = Instance.new("UIStroke", closeBtn)
closeBtnStroke.Color = COLORS.Error
closeBtnStroke.Thickness = 1
closeBtnStroke.Transparency = 0.5

closeBtn.MouseEnter:Connect(function()
    tween(closeBtn, 0.15, {BackgroundTransparency = 0, TextColor3 = Color3.fromRGB(255, 180, 190)}):Play()
    tween(closeBtnStroke, 0.15, {Transparency = 0}):Play()
end)
closeBtn.MouseLeave:Connect(function()
    tween(closeBtn, 0.15, {BackgroundTransparency = 0.15, TextColor3 = Color3.fromRGB(255, 130, 150)}):Play()
    tween(closeBtnStroke, 0.15, {Transparency = 0.5}):Play()
end)
addRipple(closeBtn)
makeDraggable(header, mainFrame)

local searchOuter = Instance.new("Frame")
searchOuter.Size = UDim2.new(1, -28, 0, 44)
searchOuter.Position = UDim2.new(0, 14, 0, 88)
searchOuter.BackgroundColor3 = Color3.fromRGB(130, 80, 220)
searchOuter.BackgroundTransparency = 0.82
searchOuter.BorderSizePixel = 0
searchOuter.ZIndex = 4
searchOuter.Parent = mainFrame
Instance.new("UICorner", searchOuter).CornerRadius = UDim.new(0, 13)
local searchOuterStroke = Instance.new("UIStroke", searchOuter)
searchOuterStroke.Color = Color3.fromRGB(130, 80, 210)
searchOuterStroke.Thickness = 1
searchOuterStroke.Transparency = 0.55

local searchInner = Instance.new("Frame")
searchInner.Size = UDim2.new(1, -2, 1, -2)
searchInner.Position = UDim2.new(0, 1, 0, 1)
searchInner.BackgroundColor3 = Color3.fromRGB(22, 15, 40)
searchInner.BorderSizePixel = 0
searchInner.ZIndex = 4
searchInner.Parent = searchOuter
Instance.new("UICorner", searchInner).CornerRadius = UDim.new(0, 12)

local searchIconLbl = Instance.new("TextLabel")
searchIconLbl.Size = UDim2.new(0, 36, 1, 0)
searchIconLbl.Position = UDim2.new(0, 2, 0, 0)
searchIconLbl.BackgroundTransparency = 1
searchIconLbl.Text = ""
searchIconLbl.TextColor3 = COLORS.TextDim
searchIconLbl.Font = Enum.Font.GothamBold
searchIconLbl.TextSize = 13
searchIconLbl.ZIndex = 5
searchIconLbl.Parent = searchInner

local searchBox = Instance.new("TextBox")
searchBox.Size = UDim2.new(1, -42, 1, 0)
searchBox.Position = UDim2.new(0, 36, 0, 0)
searchBox.BackgroundTransparency = 1
searchBox.Text = ""
searchBox.PlaceholderText = "Search weapons..."
searchBox.PlaceholderColor3 = COLORS.TextDim
searchBox.TextColor3 = COLORS.Text
searchBox.Font = Enum.Font.Gotham
searchBox.TextSize = 13
searchBox.TextXAlignment = Enum.TextXAlignment.Left
searchBox.ClearTextOnFocus = false
searchBox.ZIndex = 5
searchBox.Parent = searchInner

searchBox.Focused:Connect(function()
    tween(searchOuter, 0.2, {BackgroundTransparency = 0.6}):Play()
    tween(searchOuterStroke, 0.2, {Transparency = 0.2}):Play()
    tween(searchIconLbl, 0.2, {TextColor3 = Color3.fromRGB(190, 150, 255)}):Play()
end)
searchBox.FocusLost:Connect(function()
    tween(searchOuter, 0.2, {BackgroundTransparency = 0.82}):Play()
    tween(searchOuterStroke, 0.2, {Transparency = 0.55}):Play()
    tween(searchIconLbl, 0.2, {TextColor3 = COLORS.TextDim}):Play()
end)

local countLabel = Instance.new("TextLabel")
countLabel.Size = UDim2.new(1, -28, 0, 18)
countLabel.Position = UDim2.new(0, 14, 0, 140)
countLabel.BackgroundTransparency = 1
countLabel.Text = "All items"
countLabel.TextColor3 = COLORS.TextDim
countLabel.Font = Enum.Font.Gotham
countLabel.TextSize = 11
countLabel.TextXAlignment = Enum.TextXAlignment.Left
countLabel.ZIndex = 4
countLabel.Parent = mainFrame

local scrollFrame = Instance.new("ScrollingFrame")
scrollFrame.Size = UDim2.new(1, -28, 0, 218)
scrollFrame.Position = UDim2.new(0, 14, 0, 160)
scrollFrame.BackgroundColor3 = Color3.fromRGB(14, 10, 28)
scrollFrame.BorderSizePixel = 0
scrollFrame.ScrollBarThickness = 3
scrollFrame.ScrollBarImageColor3 = Color3.fromRGB(140, 90, 220)
scrollFrame.CanvasSize = UDim2.new(0, 0, 0, 0)
scrollFrame.ClipsDescendants = true
scrollFrame.ZIndex = 4
scrollFrame.Parent = mainFrame
Instance.new("UICorner", scrollFrame).CornerRadius = UDim.new(0, 14)
local scrollStroke = Instance.new("UIStroke", scrollFrame)
scrollStroke.Color = Color3.fromRGB(80, 50, 130)
scrollStroke.Thickness = 1
scrollStroke.Transparency = 0.5

local listLayout = Instance.new("UIListLayout", scrollFrame)
listLayout.Padding = UDim.new(0, 4)
listLayout.SortOrder = Enum.SortOrder.LayoutOrder

local listPad = Instance.new("UIPadding", scrollFrame)
listPad.PaddingTop    = UDim.new(0, 6)
listPad.PaddingBottom = UDim.new(0, 6)
listPad.PaddingLeft   = UDim.new(0, 6)
listPad.PaddingRight  = UDim.new(0, 10)

local spawnBtn = Instance.new("TextButton")
spawnBtn.Size = UDim2.new(1, -28, 0, 44)
spawnBtn.Position = UDim2.new(0, 14, 0, 388)
spawnBtn.BackgroundColor3 = Color3.fromRGB(120, 70, 220)
spawnBtn.Text = ""
spawnBtn.AutoButtonColor = false
spawnBtn.BorderSizePixel = 0
spawnBtn.ClipsDescendants = true
spawnBtn.ZIndex = 5
spawnBtn.Parent = mainFrame
Instance.new("UICorner", spawnBtn).CornerRadius = UDim.new(0, 14)
local spawnGrad = Instance.new("UIGradient", spawnBtn)
spawnGrad.Color = ColorSequence.new({
    ColorSequenceKeypoint.new(0, Color3.fromRGB(200, 150, 255)),
    ColorSequenceKeypoint.new(1, Color3.fromRGB(90, 40, 190)),
})
spawnGrad.Rotation = 135
local spawnBtnStroke = Instance.new("UIStroke", spawnBtn)
spawnBtnStroke.Color = Color3.fromRGB(200, 160, 255)
spawnBtnStroke.Thickness = 1.5
spawnBtnStroke.Transparency = 0.35

local shimmer = Instance.new("Frame")
shimmer.Size = UDim2.new(0.3, 0, 2, 0)
shimmer.Position = UDim2.new(-0.5, 0, -0.5, 0)
shimmer.BackgroundColor3 = Color3.fromRGB(220, 200, 255)
shimmer.BackgroundTransparency = 0.78
shimmer.Rotation = 20
shimmer.BorderSizePixel = 0
shimmer.ZIndex = 6
shimmer.Parent = spawnBtn

local spawnTextLbl = Instance.new("TextLabel")
spawnTextLbl.Size = UDim2.new(0, 130, 1, 0)
spawnTextLbl.Position = UDim2.new(0.5, -24, 0, 0)
spawnTextLbl.BackgroundTransparency = 1
spawnTextLbl.Text = "SPAWN ITEMS"
spawnTextLbl.TextColor3 = Color3.fromRGB(240, 220, 255)
spawnTextLbl.Font = Enum.Font.GothamBold
spawnTextLbl.TextSize = 14
spawnTextLbl.TextXAlignment = Enum.TextXAlignment.Left
spawnTextLbl.ZIndex = 7
spawnTextLbl.Parent = spawnBtn

addRipple(spawnBtn)

task.spawn(function()
    while screenGui.Parent do
        tween(shimmer, 0, {Position = UDim2.new(-0.5, 0, -0.5, 0)}):Play()
        task.wait(3.2)
        tween(shimmer, 0.65, {Position = UDim2.new(1.4, 0, -0.5, 0)}, Enum.EasingStyle.Quad):Play()
        task.wait(0.7)
    end
end)

spawnBtn.MouseEnter:Connect(function()
    tween(spawnBtn, 0.2, {Size = UDim2.new(1, -24, 0, 46), Position = UDim2.new(0, 12, 0, 387)}):Play()
    tween(spawnGrad, 0.2, {Rotation = 115}):Play()
    tween(spawnBtnStroke, 0.2, {Transparency = 0}):Play()
end)
spawnBtn.MouseLeave:Connect(function()
    tween(spawnBtn, 0.2, {Size = UDim2.new(1, -28, 0, 44), Position = UDim2.new(0, 14, 0, 388)}):Play()
    tween(spawnGrad, 0.2, {Rotation = 135}):Play()
    tween(spawnBtnStroke, 0.2, {Transparency = 0.35}):Play()
end)

local progressBG = Instance.new("Frame")
progressBG.Size = UDim2.new(1, -28, 0, 44)
progressBG.Position = UDim2.new(0, 14, 0, 388)
progressBG.BackgroundColor3 = Color3.fromRGB(20, 14, 38)
progressBG.BorderSizePixel = 0
progressBG.Visible = false
progressBG.ZIndex = 5
progressBG.Parent = mainFrame
Instance.new("UICorner", progressBG).CornerRadius = UDim.new(0, 14)
local progStroke = Instance.new("UIStroke", progressBG)
progStroke.Color = COLORS.Border
progStroke.Thickness = 1
progStroke.Transparency = 0.4

local progressLabel = Instance.new("TextLabel")
progressLabel.Size = UDim2.new(1, -16, 0, 20)
progressLabel.Position = UDim2.new(0, 12, 0, 4)
progressLabel.BackgroundTransparency = 1
progressLabel.Text = "Spawning..."
progressLabel.TextColor3 = COLORS.Text
progressLabel.Font = Enum.Font.Gotham
progressLabel.TextSize = 12
progressLabel.TextXAlignment = Enum.TextXAlignment.Left
progressLabel.ZIndex = 6
progressLabel.Parent = progressBG

local progressTrack = Instance.new("Frame")
progressTrack.Size = UDim2.new(1, -24, 0, 6)
progressTrack.Position = UDim2.new(0, 12, 0, 30)
progressTrack.BackgroundColor3 = Color3.fromRGB(30, 20, 55)
progressTrack.BorderSizePixel = 0
progressTrack.ZIndex = 6
progressTrack.Parent = progressBG
Instance.new("UICorner", progressTrack).CornerRadius = UDim.new(1, 0)

local progressFill = Instance.new("Frame")
progressFill.Size = UDim2.new(0, 0, 1, 0)
progressFill.BackgroundColor3 = Color3.fromRGB(150, 90, 240)
progressFill.BorderSizePixel = 0
progressFill.ZIndex = 7
progressFill.Parent = progressTrack
Instance.new("UICorner", progressFill).CornerRadius = UDim.new(1, 0)
local progFillGrad = Instance.new("UIGradient", progressFill)
progFillGrad.Color = ColorSequence.new({
    ColorSequenceKeypoint.new(0, Color3.fromRGB(200, 160, 255)),
    ColorSequenceKeypoint.new(1, Color3.fromRGB(100, 50, 210)),
})

local toast = Instance.new("Frame")
toast.Size = UDim2.new(0, 270, 0, 46)
toast.Position = UDim2.new(0.5, -135, 1, 10)
toast.BackgroundColor3 = Color3.fromRGB(16, 10, 34)
toast.BorderSizePixel = 0
toast.ZIndex = 50
toast.Parent = screenGui
Instance.new("UICorner", toast).CornerRadius = UDim.new(0, 13)
local toastStroke = Instance.new("UIStroke", toast)
toastStroke.Color = Color3.fromRGB(150, 100, 240)
toastStroke.Thickness = 1.5
toastStroke.Transparency = 0.2

local toastAccent = Instance.new("Frame")
toastAccent.Size = UDim2.new(0, 3, 0.7, 0)
toastAccent.Position = UDim2.new(0, 0, 0.15, 0)
toastAccent.BackgroundColor3 = Color3.fromRGB(170, 120, 255)
toastAccent.BorderSizePixel = 0
toastAccent.ZIndex = 51
toastAccent.Parent = toast
Instance.new("UICorner", toastAccent).CornerRadius = UDim.new(0, 2)

local toastText = Instance.new("TextLabel")
toastText.Size = UDim2.new(1, -22, 1, 0)
toastText.Position = UDim2.new(0, 16, 0, 0)
toastText.BackgroundTransparency = 1
toastText.Text = "Item added!"
toastText.TextColor3 = COLORS.Text
toastText.Font = Enum.Font.GothamBold
toastText.TextSize = 13
toastText.TextXAlignment = Enum.TextXAlignment.Left
toastText.ZIndex = 51
toastText.Parent = toast

local function showToast(msg, isError)
    toastText.Text = msg
    local col = isError and COLORS.Error or Color3.fromRGB(160, 110, 255)
    toastStroke.Color = col
    toastAccent.BackgroundColor3 = col
    tween(toast, 0.4, {Position = UDim2.new(0.5, -135, 1, -62)}, Enum.EasingStyle.Back):Play()
    task.delay(2.4, function()
        tween(toast, 0.3, {Position = UDim2.new(0.5, -135, 1, 10)}):Play()
    end)
end

local items = {}
local m_Sync = require(game:GetService("ReplicatedStorage"):WaitForChild("Database"):WaitForChild("Sync"))
for weaponID, weaponData in pairs(m_Sync.Weapons) do
    if weaponData.Rarity ~= "Unique" then
        table.insert(items, {
            original = weaponID,
            custom = weaponData.ItemName or weaponID
        })
    end
end
table.sort(items, function(a, b) return a.custom < b.custom end)

local function getItemTypeInfo(name)
    if name:find("Chroma") then
        return "CHR", Color3.fromRGB(210, 170, 255), Color3.fromRGB(60, 30, 100)
    end
    local lower = name:lower()
    if lower:find("gun") or lower:find("cannon") or lower:find("scope") or lower:find("shot") then
        return "GUN", Color3.fromRGB(140, 200, 255), Color3.fromRGB(20, 50, 90)
    end
    return "KNF", Color3.fromRGB(160, 240, 190), Color3.fromRGB(20, 60, 40)
end
local selectedItems = {}   
local itemButtons  = {}    

local function setItemSelected(item, selected)
    local data = itemButtons[item]
    if not data then return end
    local row = data.row
    local label = data.label
    local indicator = data.indicator
    local selTag = data.selTag
    local selStroke = data.selStroke
    local selTagText = data.selTagText
    local stroke = data.stroke

    if selected then
        tween(row, 0.2, {BackgroundColor3 = Color3.fromRGB(50, 28, 88)}):Play()
        tween(stroke, 0.2, {Transparency = 0.45}):Play()
        tween(label, 0.2, {TextColor3 = Color3.fromRGB(230, 210, 255)}):Play()
        tween(indicator, 0.2, {BackgroundTransparency = 0}):Play()
        tween(selTag, 0.2, {BackgroundTransparency = 0.65}):Play()
        tween(selStroke, 0.2, {Transparency = 0.2}):Play()
        tween(selTagText, 0.2, {TextTransparency = 0}):Play()
    else
        tween(row, 0.2, {BackgroundColor3 = Color3.fromRGB(24, 16, 44)}):Play()
        tween(stroke, 0.2, {Transparency = 1}):Play()
        tween(label, 0.2, {TextColor3 = COLORS.TextSub}):Play()
        tween(indicator, 0.2, {BackgroundTransparency = 1}):Play()
        tween(selTag, 0.2, {BackgroundTransparency = 1}):Play()
        tween(selStroke, 0.2, {Transparency = 1}):Play()
        tween(selTagText, 0.2, {TextTransparency = 1}):Play()
    end
end

for i, item in ipairs(items) do
    local row = Instance.new("TextButton")
    row.Size = UDim2.new(1, 0, 0, 38)
    row.BackgroundColor3 = Color3.fromRGB(24, 16, 44)
    row.Text = ""
    row.AutoButtonColor = false
    row.BorderSizePixel = 0
    row.LayoutOrder = i
    row.ClipsDescendants = true
    row.ZIndex = 5
    row.Parent = scrollFrame
    Instance.new("UICorner", row).CornerRadius = UDim.new(0, 9)

    local rowStroke = Instance.new("UIStroke", row)
    rowStroke.Color = Color3.fromRGB(130, 80, 210)
    rowStroke.Thickness = 1
    rowStroke.Transparency = 1

    local indicator = Instance.new("Frame")
    indicator.Size = UDim2.new(0, 3, 0.6, 0)
    indicator.Position = UDim2.new(0, 0, 0.2, 0)
    indicator.BackgroundColor3 = Color3.fromRGB(170, 120, 255)
    indicator.BackgroundTransparency = 1
    indicator.BorderSizePixel = 0
    indicator.ZIndex = 6
    indicator.Parent = row
    Instance.new("UICorner", indicator).CornerRadius = UDim.new(0, 2)

    local typeLabel, typeColor, typeBG = getItemTypeInfo(item.custom)

    local badge = Instance.new("TextLabel")
    badge.Size = UDim2.new(0, 34, 0, 20)
    badge.Position = UDim2.new(0, 8, 0.5, -10)
    badge.BackgroundColor3 = typeBG
    badge.BackgroundTransparency = 0.1
    badge.Text = typeLabel
    badge.TextColor3 = typeColor
    badge.Font = Enum.Font.GothamBold
    badge.TextSize = 9
    badge.ZIndex = 6
    badge.Parent = row
    Instance.new("UICorner", badge).CornerRadius = UDim.new(0, 5)
    local badgeStroke = Instance.new("UIStroke", badge)
    badgeStroke.Color = typeColor
    badgeStroke.Thickness = 1
    badgeStroke.Transparency = 0.55

    local label = Instance.new("TextLabel")
    label.Size = UDim2.new(1, -130, 1, 0)
    label.Position = UDim2.new(0, 50, 0, 0)
    label.BackgroundTransparency = 1
    label.Text = item.custom
    label.TextColor3 = COLORS.TextSub
    label.Font = Enum.Font.Gotham
    label.TextSize = 13
    label.TextXAlignment = Enum.TextXAlignment.Left
    label.ZIndex = 6
    label.Parent = row

    local selTag = Instance.new("Frame")
    selTag.Size = UDim2.new(0, 64, 0, 22)
    selTag.Position = UDim2.new(1, -70, 0.5, -11)
    selTag.BackgroundColor3 = Color3.fromRGB(110, 60, 200)
    selTag.BackgroundTransparency = 1
    selTag.BorderSizePixel = 0
    selTag.ZIndex = 6
    selTag.Parent = row
    Instance.new("UICorner", selTag).CornerRadius = UDim.new(0, 6)
    local selTagStroke = Instance.new("UIStroke", selTag)
    selTagStroke.Color = Color3.fromRGB(180, 130, 255)
    selTagStroke.Thickness = 1
    selTagStroke.Transparency = 1

    local selTagText = Instance.new("TextLabel")
    selTagText.Size = UDim2.new(1, 0, 1, 0)
    selTagText.BackgroundTransparency = 1
    selTagText.Text = "ACTIVE"
    selTagText.TextColor3 = Color3.fromRGB(210, 175, 255)
    selTagText.Font = Enum.Font.GothamBold
    selTagText.TextSize = 9
    selTagText.TextTransparency = 1
    selTagText.ZIndex = 7
    selTagText.Parent = selTag

    local data = {
        row = row,
        label = label,
        badge = badge,
        indicator = indicator,
        selTag = selTag,
        selStroke = selTagStroke,
        selTagText = selTagText,
        stroke = rowStroke,
        item = item
    }
    itemButtons[item] = data
    table.insert(itemButtons, data)

    row.MouseEnter:Connect(function()
        if not table.find(selectedItems, item) then
            tween(row, 0.14, {BackgroundColor3 = Color3.fromRGB(38, 24, 64)}):Play()
            tween(label, 0.14, {TextColor3 = Color3.fromRGB(220, 200, 255)}):Play()
            tween(indicator, 0.14, {BackgroundTransparency = 0.5}):Play()
        end
    end)
    row.MouseLeave:Connect(function()
        if not table.find(selectedItems, item) then
            tween(row, 0.14, {BackgroundColor3 = Color3.fromRGB(24, 16, 44)}):Play()
            tween(label, 0.14, {TextColor3 = COLORS.TextSub}):Play()
            tween(indicator, 0.14, {BackgroundTransparency = 1}):Play()
        end
    end)

    row.MouseButton1Click:Connect(function()
        local idx = table.find(selectedItems, item)
        if idx then
            table.remove(selectedItems, idx)
            setItemSelected(item, false)
        else
            table.insert(selectedItems, item)
            setItemSelected(item, true)
        end
        updateCountLabel()
    end)

    setItemSelected(item, false)
end

local function updateCountLabel()
    local total = #items
    local sel = #selectedItems
    if sel == 0 then
        countLabel.Text = "All items    " .. total .. " total"
    else
        countLabel.Text = sel .. " item" .. (sel > 1 and "s" or "") .. " selected    " .. total .. " total"
    end
end

scrollFrame.CanvasSize = UDim2.new(0, 0, 0, #items * 42 + 12)

local function filterItems(text)
    text = text:lower()
    local visible = 0
    for _, data in ipairs(itemButtons) do
        local show = text == "" or data.item.custom:lower():find(text, 1, true)
        data.row.Visible = show
        if show then
            visible += 1
            data.row.LayoutOrder = visible
        end
    end
    scrollFrame.CanvasSize = UDim2.new(0, 0, 0, visible * 42 + 12)
    countLabel.Text = visible == #items
        and ("All items    " .. #items .. " total")
        or  (visible .. " of " .. #items .. " found")
end

searchBox:GetPropertyChangedSignal("Text"):Connect(function()
    filterItems(searchBox.Text)
end)

local sliderFrame = Instance.new("Frame")
sliderFrame.Size = UDim2.new(1, -28, 0, 30)
sliderFrame.Position = UDim2.new(0, 14, 0, 440)
sliderFrame.BackgroundTransparency = 1
sliderFrame.ZIndex = 5
sliderFrame.Parent = mainFrame

local qtyLabel = Instance.new("TextLabel")
qtyLabel.Size = UDim2.new(0, 36, 1, 0)
qtyLabel.BackgroundTransparency = 1
qtyLabel.Text = "Qty:"
qtyLabel.TextColor3 = COLORS.TextDim
qtyLabel.Font = Enum.Font.Gotham
qtyLabel.TextSize = 13
qtyLabel.TextXAlignment = Enum.TextXAlignment.Left
qtyLabel.ZIndex = 5
qtyLabel.Parent = sliderFrame

local qtyValue = Instance.new("TextLabel")
qtyValue.Size = UDim2.new(0, 30, 1, 0)
qtyValue.Position = UDim2.new(1, -30, 0, 0)
qtyValue.BackgroundTransparency = 1
qtyValue.Text = "1"
qtyValue.TextColor3 = COLORS.Text
qtyValue.Font = Enum.Font.GothamBold
qtyValue.TextSize = 13
qtyValue.TextXAlignment = Enum.TextXAlignment.Right
qtyValue.ZIndex = 5
qtyValue.Parent = sliderFrame

local sliderTrack = Instance.new("Frame")
sliderTrack.Size = UDim2.new(1, -80, 0, 4)
sliderTrack.Position = UDim2.new(0, 40, 0.5, -2)
sliderTrack.BackgroundColor3 = Color3.fromRGB(40, 30, 60)
sliderTrack.BorderSizePixel = 0
sliderTrack.ZIndex = 5
sliderTrack.Parent = sliderFrame
Instance.new("UICorner", sliderTrack).CornerRadius = UDim.new(1, 0)

local sliderFill = Instance.new("Frame")
sliderFill.Size = UDim2.new(0, 0, 1, 0)
sliderFill.BackgroundColor3 = Color3.fromRGB(150, 90, 240)
sliderFill.BorderSizePixel = 0
sliderFill.ZIndex = 6
sliderFill.Parent = sliderTrack
Instance.new("UICorner", sliderFill).CornerRadius = UDim.new(1, 0)

local sliderThumb = Instance.new("Frame")
sliderThumb.Size = UDim2.new(0, 16, 0, 16)
sliderThumb.Position = UDim2.new(0, -8, 0.5, -8)
sliderThumb.BackgroundColor3 = Color3.fromRGB(200, 160, 255)
sliderThumb.BorderSizePixel = 0
sliderThumb.ZIndex = 7
sliderThumb.Parent = sliderTrack
Instance.new("UICorner", sliderThumb).CornerRadius = UDim.new(1, 0)

local currentQuantity = 1
local isDragging = false

local function setQuantityFromRatio(ratio)
    ratio = math.clamp(ratio, 0, 1)
    local val = math.floor(ratio * 29) + 1
    currentQuantity = val
    qtyValue.Text = tostring(val)
    local fillSize = (val - 1) / 29
    sliderFill.Size = UDim2.new(fillSize, 0, 1, 0)
    sliderThumb.Position = UDim2.new(fillSize, -8, 0.5, -8)
end

setQuantityFromRatio(0)

sliderThumb.InputBegan:Connect(function(inp)
    if inp.UserInputType == Enum.UserInputType.MouseButton1 or inp.UserInputType == Enum.UserInputType.Touch then
        isDragging = true
    end
end)
sliderThumb.InputEnded:Connect(function(inp)
    if inp.UserInputType == Enum.UserInputType.MouseButton1 or inp.UserInputType == Enum.UserInputType.Touch then
        isDragging = false
    end
end)

sliderTrack.InputBegan:Connect(function(inp)
    if inp.UserInputType == Enum.UserInputType.MouseButton1 or inp.UserInputType == Enum.UserInputType.Touch then
        local pos = inp.Position.X - sliderTrack.AbsolutePosition.X
        local ratio = math.clamp(pos / sliderTrack.AbsoluteSize.X, 0, 1)
        setQuantityFromRatio(ratio)
    end
end)

UserInputService.InputChanged:Connect(function(inp)
    if isDragging and (inp.UserInputType == Enum.UserInputType.MouseMovement or inp.UserInputType == Enum.UserInputType.Touch) then
        local trackPos = sliderTrack.AbsolutePosition
        local trackSize = sliderTrack.AbsoluteSize
        local pos = inp.Position.X - trackPos.X
        local ratio = math.clamp(pos / trackSize.X, 0, 1)
        setQuantityFromRatio(ratio)
    end
end)

local function spawnItemByName(name, quantity)
    local PlayerData = require(game:GetService("ReplicatedStorage").Modules.ProfileData)
    local PlayerWeapons = PlayerData.Weapons
    local originalName = name
    for _, item in ipairs(items) do
        if item.custom == name then originalName = item.original; break end
    end
    if not PlayerWeapons.Owned[originalName] then
        PlayerWeapons.Owned[originalName] = quantity
    else
        PlayerWeapons.Owned[originalName] += quantity
    end
    PlayerData.Weapons = PlayerWeapons
    local Remotes = game:GetService("ReplicatedStorage"):FindFirstChild("Remotes")
    if Remotes then
        local inv = Remotes:FindFirstChild("Inventory")
        if inv then
            local ce = inv:FindFirstChild("ChangeInventoryItem")
            if ce then pcall(function() ce:FireServer(originalName, "Add", quantity) end) end
            local dc = inv:FindFirstChild("InventoryDataChanged")
            if dc then pcall(function() dc:Fire() end) end
        end
    end
end

local function showProgressForItems(selectedList, qty)
    spawnBtn.Visible = false
    progressBG.Visible = true
    local totalSteps = #selectedList * qty
    if totalSteps == 0 then
        progressBG.Visible = false
        spawnBtn.Visible = true
        return
    end
    local step = 0
    local startTime = tick()
    local totalTime = math.min(totalSteps * 0.3, 4)

    for _, item in ipairs(selectedList) do
        for i = 1, qty do
            spawnItemByName(item.custom, 1) 
            step += 1
            local p = step / totalSteps
            progressLabel.Text = "Adding: " .. item.custom .. " (" .. step .. "/" .. totalSteps .. ")"
            tween(progressFill, 0.08, {Size = UDim2.new(p, 0, 1, 0)}):Play()
            task.wait(0.05)
        end
    end

    tween(progressFill, 0.2, {Size = UDim2.new(1,0,1,0), BackgroundColor3 = Color3.fromRGB(180, 140, 255)}):Play()
    progressLabel.Text = "Done! "
    task.wait(0.9)
    progressFill.BackgroundColor3 = Color3.fromRGB(150, 90, 240)
    progressFill.Size = UDim2.new(0,0,1,0)
    progressBG.Visible = false
    spawnBtn.Visible = true
end

spawnBtn.MouseButton1Click:Connect(function()
    if #selectedItems == 0 then
        local orig = searchOuter.Position
        for i = 1, 4 do
            tween(searchOuter, 0.05, {Position = UDim2.new(orig.X.Scale, orig.X.Offset+8, orig.Y.Scale, orig.Y.Offset)}):Play()
            task.wait(0.055)
            tween(searchOuter, 0.05, {Position = UDim2.new(orig.X.Scale, orig.X.Offset-8, orig.Y.Scale, orig.Y.Offset)}):Play()
            task.wait(0.055)
        end
        tween(searchOuter, 0.05, {Position = orig}):Play()
        showToast("Select at least one item!", true)
        return
    end

    local qty = currentQuantity
    local totalItems = #selectedItems * qty
    if totalItems > 30 then
        showToast("Too many items total (max 30)", true)
        return
    end

    spawnBtn.Visible = false
    progressBG.Visible = true
    progressFill.Size = UDim2.new(0,0,1,0)
    progressLabel.Text = "Starting..."
    task.wait(0.1)

    task.spawn(function()
        local step = 0
        local totalSteps = totalItems
        for _, item in ipairs(selectedItems) do
            for i = 1, qty do
                spawnItemByName(item.custom, 1)
                step += 1
                local p = step / totalSteps
                progressLabel.Text = "Adding: " .. item.custom .. " (" .. step .. "/" .. totalSteps .. ")"
                tween(progressFill, 0.08, {Size = UDim2.new(p, 0, 1, 0)}):Play()
                task.wait(0.05)
            end
        end

        tween(progressFill, 0.2, {Size = UDim2.new(1,0,1,0), BackgroundColor3 = Color3.fromRGB(180, 140, 255)}):Play()
        progressLabel.Text = "Done! "
        task.wait(0.9)
        progressFill.BackgroundColor3 = Color3.fromRGB(150, 90, 240)
        progressFill.Size = UDim2.new(0,0,1,0)
        progressBG.Visible = false
        spawnBtn.Visible = true
        showToast("Spawned " .. totalItems .. " item" .. (totalItems > 1 and "s" or ""))
    end)
end)

local isOpen = false

local function openGUI()
    isOpen = true
    mainFrame.Visible = true
    outerGlow.Visible = true
    mainFrame.Size = UDim2.new(0, 370, 0, 0)
    mainFrame.Position = UDim2.new(0.5, -185, 0.5, 0)
    outerGlow.BackgroundTransparency = 1
    tween(mainFrame, 0.5, {Size = UDim2.new(0,370,0,498), Position = UDim2.new(0.5,-185,0.5,-249)}, Enum.EasingStyle.Back):Play()
    tween(outerGlow, 0.6, {BackgroundTransparency = 0.88}):Play()
end

local function closeGUI()
    isOpen = false
    tween(mainFrame, 0.3, {Size = UDim2.new(0,370,0,0), Position = UDim2.new(0.5,-185,0.5,0)}, Enum.EasingStyle.Back, Enum.EasingDirection.In):Play()
    tween(outerGlow, 0.3, {BackgroundTransparency = 1}):Play()
    task.delay(0.35, function()
        mainFrame.Visible = false
        outerGlow.Visible = false
    end)
end

closeBtn.MouseButton1Click:Connect(closeGUI)

local toggleBtn = Instance.new("TextButton")
toggleBtn.Size = UDim2.new(0, 50, 0, 50)
toggleBtn.Position = UDim2.new(1, -62, 1, -62)
toggleBtn.BackgroundColor3 = Color3.fromRGB(110, 60, 210)
toggleBtn.Text = "MM2"
toggleBtn.TextColor3 = Color3.fromRGB(230, 210, 255)
toggleBtn.Font = Enum.Font.GothamBold
toggleBtn.TextSize = 11
toggleBtn.BorderSizePixel = 0
toggleBtn.AutoButtonColor = false
toggleBtn.ZIndex = 10
toggleBtn.Parent = screenGui
Instance.new("UICorner", toggleBtn).CornerRadius = UDim.new(0, 14)
local toggleGrad = Instance.new("UIGradient", toggleBtn)
toggleGrad.Color = ColorSequence.new({
    ColorSequenceKeypoint.new(0, Color3.fromRGB(195, 150, 255)),
    ColorSequenceKeypoint.new(1, Color3.fromRGB(80, 35, 180)),
})
toggleGrad.Rotation = 135
local toggleStroke = Instance.new("UIStroke", toggleBtn)
toggleStroke.Color = Color3.fromRGB(180, 130, 255)
toggleStroke.Thickness = 1.5
toggleStroke.Transparency = 0.3

toggleBtn.MouseEnter:Connect(function()
    tween(toggleBtn, 0.15, {Size = UDim2.new(0,54,0,54), Position = UDim2.new(1,-64,1,-64)}):Play()
    tween(toggleGrad, 0.15, {Rotation = 115}):Play()
end)
toggleBtn.MouseLeave:Connect(function()
    tween(toggleBtn, 0.15, {Size = UDim2.new(0,50,0,50), Position = UDim2.new(1,-62,1,-62)}):Play()
    tween(toggleGrad, 0.15, {Rotation = 135}):Play()
end)
toggleBtn.MouseButton1Click:Connect(function()
    if isOpen then closeGUI() else openGUI() end
end)

task.spawn(function()
    local t = 0
    while screenGui.Parent do
        t += 0.03
        orb1.BackgroundTransparency = 0.92 + math.sin(t * 0.7) * 0.04
        orb2.BackgroundTransparency = 0.93 + math.cos(t * 0.55) * 0.04
        orb3.BackgroundTransparency = 0.95 + math.sin(t * 1.0) * 0.03
        orb4.BackgroundTransparency = 0.96 + math.cos(t * 1.3) * 0.02
        if outerGlow.Visible then
            outerGlow.BackgroundTransparency = 0.88 + math.sin(t * 1.2) * 0.04
        end
        iconBoxGrad.Rotation = (iconBoxGrad.Rotation + 0.35) % 360
        task.wait(0.04)
    end
end)

task.spawn(function()
    while screenGui.Parent do
        tween(topAccent, 1.5, {Size = UDim2.new(0.7, 0, 0, 2)}, Enum.EasingStyle.Sine):Play()
        task.wait(1.5)
        tween(topAccent, 1.5, {Size = UDim2.new(0.35, 0, 0, 2)}, Enum.EasingStyle.Sine):Play()
        task.wait(1.5)
    end
end)

updateCountLabel()
filterItems("")

local loadingSteps = {
    {text = "Loading modules...",          pct = 15},
    {text = "Connecting to server...",     pct = 32},
    {text = "Fetching item list...",       pct = 55},
    {text = "Building interface...",       pct = 74},
    {text = "Applying purple theme...",    pct = 90},
    {text = "Ready!",                      pct = 100},
}

task.spawn(function()
    task.wait(0.15)
    for stepIdx, step in ipairs(loadingSteps) do
        local startPct = stepIdx == 1 and 0 or loadingSteps[stepIdx-1].pct
        local endPct   = step.pct
        local duration = stepIdx == #loadingSteps and 0.35 or 0.52
        loaderStatus.Text = step.text
        local t0 = tick()
        while tick() - t0 < duration do
            local p = (tick() - t0) / duration
            p = p * p * (3 - 2 * p)
            local cur = startPct + (endPct - startPct) * p
            tween(loaderFill, 0.06, {Size = UDim2.new(cur/100, 0, 1, 0)}):Play()
            loaderPct.Text = math.floor(cur) .. "%"
            task.wait(0.04)
        end
        tween(loaderFill, 0.08, {Size = UDim2.new(endPct/100, 0, 1, 0)}):Play()
        loaderPct.Text = endPct .. "%"
        if stepIdx < #loadingSteps then task.wait(0.15) end
    end
    task.wait(0.3)
    tween(loaderFill, 0.12, {BackgroundColor3 = Color3.fromRGB(200, 160, 255)}):Play()
    task.wait(0.18)
    tween(loaderCenter, 0.35, {
        Size = UDim2.new(0, 340, 0, 0),
        Position = UDim2.new(0.5, -170, 0.5, 0),
    }, Enum.EasingStyle.Back, Enum.EasingDirection.In):Play()
    tween(cardGlow, 0.35, {BackgroundTransparency = 1}):Play()
    tween(bgGlow1,  0.35, {BackgroundTransparency = 1}):Play()
    tween(bgGlow2,  0.35, {BackgroundTransparency = 1}):Play()
    task.wait(0.38)
    tween(loaderFrame, 0.3, {BackgroundTransparency = 1}):Play()
    for _, child in pairs(loaderFrame:GetDescendants()) do
        if child:IsA("Frame") or child:IsA("TextLabel") then
            pcall(function()
                tween(child, 0.2, {BackgroundTransparency = 1, TextTransparency = 1}):Play()
            end)
        end
    end
    task.wait(0.32)
    loaderGui.Enabled = false
    openGUI()
end)

説明

weapon spawner, non equippable, client sided

コメント (0)

会話に参加するにはログインしてください

  • 最初のコメントを投稿しましょう。

よくある質問

item spawner, freeスクリプトはどう使いますか?
上のスクリプトコードをコピーし、Robloxエグゼキューターを開いて貼り付け、ゲーム中に実行を押してください。スクリプトが実行されると、機能が即座に有効になります。
item spawner, freeスクリプトは無料ですか?
はい。このスクリプトは無料でコピー&使用できます。キーシステムを使用している場合は、リンクから無料でキーを取得してください。
item spawner, freeスクリプトの使用は安全ですか?
ソースコード全体がこのページに表示されるので、実行前に内容を正確に確認できます。信頼できるエグゼキューターを使用し、スクリプトの使用はRobloxの利用規約に違反するため、自己責任で使用してください。
item spawner, freeに対応するエグゼキューターは?
このスクリプトはほとんどの人気Robloxエグゼキューターで動作します。お使いのデバイス向けの信頼できる無料または有料エグゼキューターを見つけるには、エグゼキューターページをご覧ください。
item spawner, free | BloxScripter