--!strict --!optimize 2 --!native p=game.Players.LocalPlayer h=p.Character.HumanoidRootPart f=workspace.Map.Functional s=f.DigZone.SpawnedItems r=game:GetService("ReplicatedStorage"):WaitForChild("Events"):WaitForChild("GameEvent") v={"Common","Uncommon","Rare","Epic","Legendary"} function pickup(x) r:FireServer("PickupDigItem",x) end function pickupall() for i,v in ipairs(s:GetChildren())do for a,b in ipairs(v:GetChildren())do pcall(pickup,b:GetAttribute("UID")) end end end function get(x) local n=x:sub(1,1):upper()..x:sub(2):lower() local e=false for i,t in ipairs(v)do if t==n then e=true break end end if not e or not s:FindFirstChild(n)then return end for i,c in ipairs(s[n]:GetChildren())do pcall(pickup,c:GetAttribute("UID")) end end function sell() h.CFrame=CFrame.new(84.3216019,-6.86413288,-8.73450851,-0.11192131,0,0.993717074,0,1,0,-0.993717074,0,-0.11192131) task.wait(0.1) local t=f.SpawnedNPCs.Seller["Right Arm"].RightGripAttachment.BuyPrompt fireproximityprompt(t) fireproximityprompt(t) task.wait(0.1) h.CFrame=CFrame.new(-56.4173355,-7.15000248,58.1000633,-0.00767379161,3.44978268e-08,-0.999970555,7.1827607e-08,1,3.39476358e-08,0.999970555,-7.15649833e-08,-0.00767379161) end get("Common") task.wait(0.2) sell()