Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[Credits to:
- -ustinjamesss i made the autosell works
- -Newton Hes the guy who made the script, i only fixed it and added autosell
- ]]
- -- Press Z to turn it off
- getgenv().loop = true
- local lp = game.Players.LocalPlayer
- local invspace = lp.playerStats.inventorySpace
- local inventory = lp.playerStats.inventory
- game:GetService("RunService").Stepped:Connect(function()
- local count = 0
- for _, item in pairs(inventory:GetChildren()) do
- if item:IsA("IntValue") then
- count = count + item.Value
- end
- end
- if count >= invspace.Value then
- local location = {
- location1 = Vector3.new(70.7053, 7.33033, -88.168)
- }
- local twee = game:GetService("TweenService")
- local tweeninfo = TweenInfo.new(1, Enum.EasingStyle.Linear)
- local lp = game.Players.LocalPlayer
- function teleport(v, speed)
- if lp.Character and
- lp.Character:FindFirstChild('HumanoidRootPart') then
- local cf = CFrame.new(v)
- local tweenTime = ((lp.Character.HumanoidRootPart.Position - cf.p).Magnitude) / speed
- local tweenInfo = TweenInfo.new(tweenTime, Enum.EasingStyle.Linear)
- local a = twee:Create(lp.Character.HumanoidRootPart, tweenInfo, {CFrame = cf})
- a:Play()
- a.Completed:Connect(function()
- local args = {
- [1] = {
- ["sock"] = {
- ["rarity"] = 0.3,
- ["category"] = "trash",
- ["itemType"] = "trash",
- ["weight"] = 1,
- ["value"] = 0.6,
- ["img"] = "rbxassetid://5684868683",
- ["grade"] = 2,
- ["name"] = "sock"
- },
- ["spring"] = {
- ["rarity"] = 0.1,
- ["category"] = "trash",
- ["itemType"] = "trash",
- ["weight"] = 1,
- ["value"] = 0.25,
- ["img"] = "rbxassetid://12025882634",
- ["grade"] = 2,
- ["name"] = "spring"
- },
- ["plank"] = {
- ["rarity"] = 0.2,
- ["category"] = "trash",
- ["itemType"] = "trash",
- ["weight"] = 1,
- ["value"] = 0.5,
- ["img"] = "rbxassetid://20944363",
- ["grade"] = 2,
- ["name"] = "plank"
- },
- ["battery"] = {
- ["rarity"] = 0.1,
- ["category"] = "trash",
- ["itemType"] = "trash",
- ["weight"] = 1,
- ["value"] = 0.8,
- ["img"] = "rbxassetid://10953918865",
- ["grade"] = 2,
- ["name"] = "battery"
- },
- ["foil"] = {
- ["rarity"] = 0.1,
- ["category"] = "trash",
- ["itemType"] = "trash",
- ["weight"] = 1,
- ["value"] = 0.2,
- ["img"] = "rbxassetid://147887823",
- ["grade"] = 1,
- ["name"] = "foil"
- },
- ["cd"] = {
- ["rarity"] = 0.24,
- ["category"] = "trash",
- ["itemType"] = "trash",
- ["weight"] = 1,
- ["value"] = 15,
- ["img"] = "rbxassetid://949160203",
- ["grade"] = 3,
- ["name"] = "cd"
- },
- ["gold"] = {
- ["rarity"] = 0.01,
- ["category"] = "trash",
- ["itemType"] = "trash",
- ["weight"] = 1,
- ["value"] = 100,
- ["img"] = "rbxassetid://5684864491",
- ["grade"] = 3,
- ["name"] = "gold doubloon"
- },
- ["rotten"] = {
- ["rarity"] = 0.1,
- ["category"] = "trash",
- ["itemType"] = "trash",
- ["weight"] = 1,
- ["value"] = 0.05,
- ["img"] = "rbxassetid://12025752984",
- ["grade"] = 2,
- ["name"] = "rotten food"
- },
- ["comic"] = {
- ["rarity"] = 0.2,
- ["category"] = "trash",
- ["itemType"] = "trash",
- ["weight"] = 1,
- ["value"] = 250,
- ["img"] = "rbxassetid://12207060371",
- ["grade"] = 4,
- ["name"] = "comic book"
- },
- ["tp"] = {
- ["rarity"] = 0.05,
- ["category"] = "trash",
- ["itemType"] = "trash",
- ["weight"] = 1,
- ["value"] = 1,
- ["img"] = "rbxassetid://6766522014",
- ["grade"] = 1,
- ["name"] = "toilet paper"
- },
- ["phone"] = {
- ["rarity"] = 0.4,
- ["category"] = "trash",
- ["itemType"] = "trash",
- ["weight"] = 1,
- ["value"] = 50,
- ["img"] = "rbxassetid://1519603285",
- ["grade"] = 4,
- ["name"] = "phone"
- },
- ["plastic"] = {
- ["rarity"] = 0.25,
- ["category"] = "trash",
- ["itemType"] = "trash",
- ["weight"] = 1,
- ["value"] = 0.04,
- ["img"] = "rbxassetid://5684862728",
- ["grade"] = 1,
- ["name"] = "plastic"
- },
- ["cardboard"] = {
- ["rarity"] = 0.15,
- ["category"] = "trash",
- ["itemType"] = "trash",
- ["weight"] = 1,
- ["value"] = 0.1,
- ["img"] = "rbxassetid://13390195",
- ["grade"] = 1,
- ["name"] = "cardboard"
- },
- ["bottle"] = {
- ["rarity"] = 0.1,
- ["category"] = "trash",
- ["itemType"] = "trash",
- ["weight"] = 1,
- ["value"] = 1,
- ["img"] = "rbxassetid://480355285",
- ["grade"] = 2,
- ["name"] = "bottle"
- },
- ["can"] = {
- ["rarity"] = 0.1,
- ["category"] = "trash",
- ["itemType"] = "trash",
- ["weight"] = 1,
- ["value"] = 0.07,
- ["img"] = "rbxassetid://6874536183",
- ["grade"] = 1,
- ["name"] = "empty can"
- },
- ["credit"] = {
- ["rarity"] = 0.4,
- ["category"] = "trash",
- ["itemType"] = "trash",
- ["weight"] = 1,
- ["value"] = 130,
- ["img"] = "rbxassetid://12207031909",
- ["grade"] = 4,
- ["name"] = "credit card"
- },
- ["shoe"] = {
- ["rarity"] = 0.4,
- ["category"] = "trash",
- ["itemType"] = "trash",
- ["weight"] = 1,
- ["value"] = 7.5,
- ["img"] = "rbxassetid://10912056890",
- ["grade"] = 3,
- ["name"] = "shoe"
- },
- ["card"] = {
- ["rarity"] = 0.05,
- ["category"] = "trash",
- ["itemType"] = "trash",
- ["weight"] = 1,
- ["value"] = 20,
- ["img"] = "rbxassetid://38154272",
- ["grade"] = 3,
- ["name"] = "trading card"
- },
- ["cloth"] = {
- ["rarity"] = 0.1,
- ["category"] = "trash",
- ["itemType"] = "trash",
- ["weight"] = 1,
- ["value"] = 0.15,
- ["img"] = "rbxassetid://9712134761",
- ["grade"] = 1,
- ["name"] = "torn cloth"
- },
- ["paper"] = {
- ["rarity"] = 0.25,
- ["category"] = "trash",
- ["itemType"] = "trash",
- ["weight"] = 1,
- ["value"] = 0.02,
- ["img"] = "rbxassetid://6835358763",
- ["grade"] = 1,
- ["name"] = "paper"
- },
- ["electronics"] = {
- ["rarity"] = 0.3,
- ["category"] = "trash",
- ["itemType"] = "trash",
- ["weight"] = 1,
- ["value"] = 9.6,
- ["img"] = "rbxassetid://547416328",
- ["grade"] = 3,
- ["name"] = "electronics"
- },
- ["nail"] = {
- ["rarity"] = 0.1,
- ["category"] = "trash",
- ["itemType"] = "trash",
- ["weight"] = 1,
- ["value"] = 0.3,
- ["img"] = "rbxassetid://11362540073",
- ["grade"] = 2,
- ["name"] = "nail"
- }
- },
- [2] = 1000000
- }
- game:GetService("ReplicatedStorage"):WaitForChild("SellTrash"):FireServer(unpack(args))
- end)
- end
- end
- teleport(location.location1, 40)
- end
- end)
- local folder = game:GetService("Workspace").hitboxes
- local lp = game.Players.LocalPlayer
- local TweenService = game:GetService("TweenService")
- local Character = lp.Character
- local UserInputService = game:GetService("UserInputService")
- UserInputService.InputBegan:Connect(function(inputObject)
- if inputObject.KeyCode == Enum.KeyCode.Z then
- getgenv().loop = not getgenv().loop
- end
- end)
- while true do
- task.wait()
- if getgenv().loop then
- pcall(function()
- Character:FindFirstChildWhichIsA("Tool"):Activate()
- for _, hitbox in pairs(folder:GetChildren()) do
- if hitbox:IsA("BasePart") and (hitbox.Name == "hitbox" or hitbox.Name == "2") then
- local destination = lp.Character.HumanoidRootPart.Position
- local tweenInfo = TweenInfo.new(0, Enum.EasingStyle.Linear)
- local tween = TweenService:Create(hitbox, tweenInfo, {CFrame = CFrame.new(destination)})
- tween:Play()
- end
- end
- end)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement