local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") local UserInputService = game:GetService("UserInputService") local player = Players.LocalPlayer local playerGui = player:WaitForChild("PlayerGui") local character = player.Character or player.CharacterAdded:Wait() local humanoidRoot = character:WaitForChild("HumanoidRootPart") local sellPosition = Vector3.new(1019.995361328125, 245, -65.16690063476562) local screenGui = Instance.new("ScreenGui") screenGui.Name = "SellInventory" screenGui.ResetOnSpawn = false screenGui.Parent = playerGui local frame = Instance.new("Frame") frame.Size = UDim2.new(0, 170, 0, 60) frame.Position = UDim2.new(0.5, -85, 0.5, -30) frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30) frame.BackgroundTransparency = 0.2 frame.Active = true frame.Parent = screenGui local dragBar = Instance.new("Frame") dragBar.Size = UDim2.new(1, 0, 0, 20) dragBar.Position = UDim2.new(0, 0, 0, 0) dragBar.BackgroundColor3 = Color3.fromRGB(20, 20, 20) dragBar.Active = true dragBar.Parent = frame local dragLabel = Instance.new("TextLabel") dragLabel.Size = UDim2.new(1, 0, 1, 0) dragLabel.Position = UDim2.new(0, 0, 0, 0) dragLabel.Text = "═══" dragLabel.BackgroundTransparency = 1 dragLabel.TextColor3 = Color3.new(0.7, 0.7, 0.7) dragLabel.Font = Enum.Font.SourceSans dragLabel.TextSize = 14 dragLabel.Parent = dragBar local sellButton = Instance.new("TextButton") sellButton.Size = UDim2.new(1, 0, 1, -20) sellButton.Position = UDim2.new(0, 0, 0, 20) sellButton.Text = "Sell" sellButton.BackgroundColor3 = Color3.fromRGB(0, 170, 0) sellButton.TextColor3 = Color3.new(1, 1, 1) sellButton.Font = Enum.Font.SourceSansBold sellButton.TextSize = 24 sellButton.Parent = frame sellButton.MouseButton1Click:Connect(function() local originalPosition = humanoidRoot.Position pcall(function() humanoidRoot.CFrame = CFrame.new(sellPosition) task.wait(0.5) ReplicatedStorage:WaitForChild("Ml", 9e9):WaitForChild("SellInventory", 9e9):FireServer() task.wait(0.5) humanoidRoot.CFrame = CFrame.new(originalPosition) end) end) local dragging = false local dragStart = nil local startPos = nil local function updateDrag(input) if not dragging then return end local delta = input.Position - dragStart frame.Position = UDim2.new( startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y ) end dragBar.InputBegan:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = true dragStart = input.Position startPos = frame.Position end end) UserInputService.InputChanged:Connect(function(input) if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then updateDrag(input) end end) UserInputService.InputEnded:Connect(function(input) if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then dragging = false end end) local function setupTouchDragging() local touchConnection local moveConnection dragBar.TouchTap:Connect(function() end) dragBar.TouchPan:Connect(function(touchPositions, totalTranslation, velocity, state) if state == Enum.UserInputState.Begin then dragging = true startPos = frame.Position elseif state == Enum.UserInputState.Change and dragging then frame.Position = UDim2.new( startPos.X.Scale, startPos.X.Offset + totalTranslation.X, startPos.Y.Scale, startPos.Y.Offset + totalTranslation.Y ) elseif state == Enum.UserInputState.End then dragging = false end end) end if UserInputService.TouchEnabled then setupTouchDragging() end