local a=game:GetService("Players")local b=game:GetService("UserInputService")local c=game:GetService("TweenService")local d=game:GetService("RunService")local e=a.LocalPlayer;local f=e:WaitForChild("PlayerGui")local g=1;local h=10;local i=false;local j=nil;local k=0;local l=false;local m=0;local n=0;local o=""local p=game:GetService("ReplicatedStorage")local q=p:WaitForChild("CargoInfo")local r=q:WaitForChild("BricklandiaCargoTrader")local s=r:WaitForChild("Sell")local t={{name="potions",value=s:WaitForChild("potions")},{name="lumber",value=s:WaitForChild("lumber")},{name="gunpowder",value=s:WaitForChild("gunpowder")},{name="gold",value=s:WaitForChild("gold")},{name="fish",value=s:WaitForChild("fish")},{name="coal",value=s:WaitForChild("coal")}}local function u()local v=-math.huge;local w=t[1].name;for x,y in ipairs(t)do local z=y.value.Value;if z>v then v=z;w=y.name end end;return w end;local A=Instance.new("ScreenGui")A.Name="ObsidianAutoShopGUI"A.ResetOnSpawn=false;A.ZIndexBehavior=Enum.ZIndexBehavior.Sibling;A.Parent=f;local B=Instance.new("Frame")B.Name="MainFrame"B.Size=UDim2.new(0,320,0,150)B.Position=UDim2.new(0.5,-160,0.5,-75)B.BackgroundTransparency=1;B.Parent=A;local C=Instance.new("Frame")C.Name="Background"C.Size=UDim2.new(1,0,1,0)C.Position=UDim2.new(0,0,0,0)C.BackgroundColor3=Color3.fromRGB(20,20,30)C.BackgroundTransparency=0.15;C.BorderSizePixel=0;C.Parent=B;local D=Instance.new("UICorner")D.CornerRadius=UDim.new(0,16)D.Parent=C;local E=Instance.new("Frame")E.Name="FrostOverlay"E.Size=UDim2.new(1,0,1,0)E.Position=UDim2.new(0,0,0,0)E.BackgroundColor3=Color3.fromRGB(40,40,60)E.BackgroundTransparency=0.7;E.BorderSizePixel=0;E.Parent=C;local F=Instance.new("UICorner")F.CornerRadius=UDim.new(0,16)F.Parent=E;local G=Instance.new("UIStroke")G.Color=Color3.fromRGB(100,100,140)G.Thickness=1;G.Transparency=0.3;G.Parent=C;local H=Instance.new("TextLabel")H.Name="Title"H.Size=UDim2.new(1,-20,0,30)H.Position=UDim2.new(0,10,0,10)H.BackgroundTransparency=1;H.Text="Auto Shop"H.TextColor3=Color3.fromRGB(220,220,255)H.TextSize=18;H.TextXAlignment=Enum.TextXAlignment.Left;H.Font=Enum.Font.GothamBold;H.Parent=B;local I=Instance.new("TextButton")I.Name="CloseButton"I.Size=UDim2.new(0,24,0,24)I.Position=UDim2.new(1,-30,0,8)I.BackgroundColor3=Color3.fromRGB(220,60,60)I.BorderSizePixel=0;I.Text="×"I.TextColor3=Color3.fromRGB(255,255,255)I.TextSize=18;I.Font=Enum.Font.GothamBold;I.Parent=B;local J=Instance.new("UICorner")J.CornerRadius=UDim.new(0,6)J.Parent=I;local K=Instance.new("Frame")K.Name="StatusIndicator"K.Size=UDim2.new(0,8,0,8)K.Position=UDim2.new(1,-60,0,21)K.BackgroundColor3=Color3.fromRGB(220,60,60)K.BorderSizePixel=0;K.Parent=B;local L=Instance.new("UICorner")L.CornerRadius=UDim.new(1,0)L.Parent=K;local M=Instance.new("TextButton")M.Name="ToggleButton"M.Size=UDim2.new(0,280,0,40)M.Position=UDim2.new(0,20,0,60)M.BackgroundColor3=Color3.fromRGB(60,60,80)M.BorderSizePixel=0;M.Text="Start Auto Shop"M.TextColor3=Color3.fromRGB(255,255,255)M.TextSize=16;M.Font=Enum.Font.Gotham;M.Parent=B;local N=Instance.new("UICorner")N.CornerRadius=UDim.new(0,8)N.Parent=M;local O=Instance.new("UIGradient")O.Color=ColorSequence.new{ColorSequenceKeypoint.new(0,Color3.fromRGB(80,80,100)),ColorSequenceKeypoint.new(1,Color3.fromRGB(60,60,80))}O.Rotation=90;O.Parent=M;local P=Instance.new("TextLabel")P.Name="StatusText"P.Size=UDim2.new(1,-20,0,20)P.Position=UDim2.new(0,10,0,40)P.BackgroundTransparency=1;P.Text="Status: Inactive"P.TextColor3=Color3.fromRGB(180,180,200)P.TextSize=12;P.TextXAlignment=Enum.TextXAlignment.Left;P.Font=Enum.Font.Gotham;P.Parent=B;local Q=false;local R=nil;local S=nil;local function T(U)local V=U.Position-R;B.Position=UDim2.new(S.X.Scale,S.X.Offset+V.X,S.Y.Scale,S.Y.Offset+V.Y)end;H.InputBegan:Connect(function(U)if U.UserInputType==Enum.UserInputType.MouseButton1 or U.UserInputType==Enum.UserInputType.Touch then Q=true;R=U.Position;S=B.Position;U.Changed:Connect(function()if U.UserInputState==Enum.UserInputState.End then Q=false end end)end end)b.InputChanged:Connect(function(U)if Q and(U.UserInputType==Enum.UserInputType.MouseMovement or U.UserInputType==Enum.UserInputType.Touch)then T(U)end end)local function W()local X=e:FindFirstChild("Backpack")local Y=e.Character;local Z=false;if X then Z=X:FindFirstChild(o)~=nil end;if not Z and Y then local _=Y:FindFirstChildOfClass("Tool")if _ and _.Name==o then Z=true end end;return Z end;spawn(function()while true do local a0=W()if a0 and not l then l=true;m=0 elseif not a0 and l then l=false;m=0;o=""elseif l then m=m+1 end;task.wait(1)end end)local function a1(a2)local a3,a4=pcall(function()local a5={a2,false,true}game:GetService("ReplicatedStorage"):WaitForChild("Packages"):WaitForChild("Knit"):WaitForChild("Services"):WaitForChild("ShopService"):WaitForChild("RF"):WaitForChild("Shop"):InvokeServer(unpack(a5))end)if not a3 then warn("[AutoShop Error] Failed to send FIRST remote (buy "..a2 .."):",a4)end end;local function a6(a2)local a3,a4=pcall(function()local a5={a2,false,false}game:GetService("ReplicatedStorage"):WaitForChild("Packages"):WaitForChild("Knit"):WaitForChild("Services"):WaitForChild("ShopService"):WaitForChild("RF"):WaitForChild("Shop"):InvokeServer(unpack(a5))end)if not a3 then warn("[AutoShop Error] Failed to send SECOND remote (sell "..a2 .."):",a4)end end;local function a7()i=not i;if i then M.Text="Stop Auto Shop"M.BackgroundColor3=Color3.fromRGB(220,60,60)K.BackgroundColor3=Color3.fromRGB(60,220,60)P.Text="Status: Active - Monitoring inventory"spawn(function()while i do local a8=g;print("[AutoShop Status] Checking... hasItem="..tostring(l)..", timeInInventory="..tostring(m)..", target="..o)if l then if m>=h then P.Text="Status: Selling "..o.." ("..m.."s in inventory)"print("[AutoShop Status] SELL CONDITION MET. Attempting to sell "..o.."...")local Y=e.Character;local a9=Y and Y:FindFirstChildOfClass("Humanoid")local aa=nil;if a9 then local ab=Y:FindFirstChildOfClass("Tool")if ab then aa=ab.Name end end;a6(o)if aa and a9 then task.wait(0.1)local X=e:FindFirstChild("Backpack")if X then local ac=X:FindFirstChild(aa)if ac then a9:EquipTool(ac)end end end else P.Text="Status: Waiting to sell "..o.." ("..m.."/"..h.."s)"end else o=u()P.Text="Status: Buying "..o;print("[AutoShop Status] BUY CONDITION MET. Highest item: "..o..". Attempting to buy...")a1(o)end;if a8>0 then task.wait(a8)else task.wait()end end;if not i then P.Text="Status: Inactive"o=""print("[AutoShop Status] Loop stopped.")end end)local ad=c:Create(M,TweenInfo.new(0.2),{BackgroundColor3=Color3.fromRGB(200,40,40)})ad:Play()else M.Text="Start Auto Shop"M.BackgroundColor3=Color3.fromRGB(60,60,80)K.BackgroundColor3=Color3.fromRGB(220,60,60)P.Text="Status: Inactive"local ad=c:Create(M,TweenInfo.new(0.2),{BackgroundColor3=Color3.fromRGB(80,80,100)})ad:Play()end end;M.MouseButton1Click:Connect(a7)local function ae(U,af)if af then return end;local ag=M.AbsolutePosition;local ah=M.AbsoluteSize;local ai=U.Position;if ai.X>=ag.X and ai.X<=ag.X+ah.X and ai.Y>=ag.Y and ai.Y<=ag.Y+ah.Y then a7()end;local aj=I.AbsolutePosition;local ak=I.AbsoluteSize;if ai.X>=aj.X and ai.X<=aj.X+ak.X and ai.Y>=aj.Y and ai.Y<=aj.Y+ak.Y then if i then i=false end;local al=c:Create(B,TweenInfo.new(0.3,Enum.EasingStyle.Back,Enum.EasingDirection.In),{Size=UDim2.new(0,0,0,0),Position=UDim2.new(0.5,0,0.5,0)})al:Play()al.Completed:Connect(function()A:Destroy()end)end end;b.TouchTap:Connect(ae)I.MouseButton1Click:Connect(function()if i then i=false end;local al=c:Create(B,TweenInfo.new(0.3,Enum.EasingStyle.Back,Enum.EasingDirection.In),{Size=UDim2.new(0,0,0,0),Position=UDim2.new(0.5,0,0.5,0)})al:Play()al.Completed:Connect(function()A:Destroy()end)end)B.Size=UDim2.new(0,0,0,0)local am=c:Create(B,TweenInfo.new(0.5,Enum.EasingStyle.Back,Enum.EasingDirection.Out),{Size=UDim2.new(0,320,0,150)})am:Play()spawn(function()while A.Parent do local an=c:Create(G,TweenInfo.new(2,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut),{Transparency=0.1})an:Play()an.Completed:Wait()local ao=c:Create(G,TweenInfo.new(2,Enum.EasingStyle.Sine,Enum.EasingDirection.InOut),{Transparency=0.5})ao:Play()ao.Completed:Wait()end end)