Advertisement
ustinjamesss

liveinabackalley

Jan 31st, 2023
1,696
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.00 KB | None | 0 0
  1. --[[Credits to:
  2. -ustinjamesss i made the autosell works
  3. -Newton Hes the guy who made the script, i only fixed it and added autosell
  4. ]]
  5.  
  6. -- Press Z to turn it off
  7.  
  8. getgenv().loop = true
  9.  
  10. local lp = game.Players.LocalPlayer
  11. local invspace = lp.playerStats.inventorySpace
  12. local inventory = lp.playerStats.inventory
  13.  
  14. game:GetService("RunService").Stepped:Connect(function()
  15. local count = 0
  16. for _, item in pairs(inventory:GetChildren()) do
  17. if item:IsA("IntValue") then
  18. count = count + item.Value
  19. end
  20. end
  21. if count >= invspace.Value then
  22. local location = {
  23. location1 = Vector3.new(70.7053, 7.33033, -88.168)
  24. }
  25. local twee = game:GetService("TweenService")
  26. local tweeninfo = TweenInfo.new(1, Enum.EasingStyle.Linear)
  27.  
  28. local lp = game.Players.LocalPlayer
  29.  
  30. function teleport(v, speed)
  31. if lp.Character and
  32. lp.Character:FindFirstChild('HumanoidRootPart') then
  33. local cf = CFrame.new(v)
  34. local tweenTime = ((lp.Character.HumanoidRootPart.Position - cf.p).Magnitude) / speed
  35. local tweenInfo = TweenInfo.new(tweenTime, Enum.EasingStyle.Linear)
  36. local a = twee:Create(lp.Character.HumanoidRootPart, tweenInfo, {CFrame = cf})
  37. a:Play()
  38. a.Completed:Connect(function()
  39. local args = {
  40. [1] = {
  41. ["sock"] = {
  42. ["rarity"] = 0.3,
  43. ["category"] = "trash",
  44. ["itemType"] = "trash",
  45. ["weight"] = 1,
  46. ["value"] = 0.6,
  47. ["img"] = "rbxassetid://5684868683",
  48. ["grade"] = 2,
  49. ["name"] = "sock"
  50. },
  51. ["spring"] = {
  52. ["rarity"] = 0.1,
  53. ["category"] = "trash",
  54. ["itemType"] = "trash",
  55. ["weight"] = 1,
  56. ["value"] = 0.25,
  57. ["img"] = "rbxassetid://12025882634",
  58. ["grade"] = 2,
  59. ["name"] = "spring"
  60. },
  61. ["plank"] = {
  62. ["rarity"] = 0.2,
  63. ["category"] = "trash",
  64. ["itemType"] = "trash",
  65. ["weight"] = 1,
  66. ["value"] = 0.5,
  67. ["img"] = "rbxassetid://20944363",
  68. ["grade"] = 2,
  69. ["name"] = "plank"
  70. },
  71. ["battery"] = {
  72. ["rarity"] = 0.1,
  73. ["category"] = "trash",
  74. ["itemType"] = "trash",
  75. ["weight"] = 1,
  76. ["value"] = 0.8,
  77. ["img"] = "rbxassetid://10953918865",
  78. ["grade"] = 2,
  79. ["name"] = "battery"
  80. },
  81. ["foil"] = {
  82. ["rarity"] = 0.1,
  83. ["category"] = "trash",
  84. ["itemType"] = "trash",
  85. ["weight"] = 1,
  86. ["value"] = 0.2,
  87. ["img"] = "rbxassetid://147887823",
  88. ["grade"] = 1,
  89. ["name"] = "foil"
  90. },
  91. ["cd"] = {
  92. ["rarity"] = 0.24,
  93. ["category"] = "trash",
  94. ["itemType"] = "trash",
  95. ["weight"] = 1,
  96. ["value"] = 15,
  97. ["img"] = "rbxassetid://949160203",
  98. ["grade"] = 3,
  99. ["name"] = "cd"
  100. },
  101. ["gold"] = {
  102. ["rarity"] = 0.01,
  103. ["category"] = "trash",
  104. ["itemType"] = "trash",
  105. ["weight"] = 1,
  106. ["value"] = 100,
  107. ["img"] = "rbxassetid://5684864491",
  108. ["grade"] = 3,
  109. ["name"] = "gold doubloon"
  110. },
  111. ["rotten"] = {
  112. ["rarity"] = 0.1,
  113. ["category"] = "trash",
  114. ["itemType"] = "trash",
  115. ["weight"] = 1,
  116. ["value"] = 0.05,
  117. ["img"] = "rbxassetid://12025752984",
  118. ["grade"] = 2,
  119. ["name"] = "rotten food"
  120. },
  121. ["comic"] = {
  122. ["rarity"] = 0.2,
  123. ["category"] = "trash",
  124. ["itemType"] = "trash",
  125. ["weight"] = 1,
  126. ["value"] = 250,
  127. ["img"] = "rbxassetid://12207060371",
  128. ["grade"] = 4,
  129. ["name"] = "comic book"
  130. },
  131. ["tp"] = {
  132. ["rarity"] = 0.05,
  133. ["category"] = "trash",
  134. ["itemType"] = "trash",
  135. ["weight"] = 1,
  136. ["value"] = 1,
  137. ["img"] = "rbxassetid://6766522014",
  138. ["grade"] = 1,
  139. ["name"] = "toilet paper"
  140. },
  141. ["phone"] = {
  142. ["rarity"] = 0.4,
  143. ["category"] = "trash",
  144. ["itemType"] = "trash",
  145. ["weight"] = 1,
  146. ["value"] = 50,
  147. ["img"] = "rbxassetid://1519603285",
  148. ["grade"] = 4,
  149. ["name"] = "phone"
  150. },
  151. ["plastic"] = {
  152. ["rarity"] = 0.25,
  153. ["category"] = "trash",
  154. ["itemType"] = "trash",
  155. ["weight"] = 1,
  156. ["value"] = 0.04,
  157. ["img"] = "rbxassetid://5684862728",
  158. ["grade"] = 1,
  159. ["name"] = "plastic"
  160. },
  161. ["cardboard"] = {
  162. ["rarity"] = 0.15,
  163. ["category"] = "trash",
  164. ["itemType"] = "trash",
  165. ["weight"] = 1,
  166. ["value"] = 0.1,
  167. ["img"] = "rbxassetid://13390195",
  168. ["grade"] = 1,
  169. ["name"] = "cardboard"
  170. },
  171. ["bottle"] = {
  172. ["rarity"] = 0.1,
  173. ["category"] = "trash",
  174. ["itemType"] = "trash",
  175. ["weight"] = 1,
  176. ["value"] = 1,
  177. ["img"] = "rbxassetid://480355285",
  178. ["grade"] = 2,
  179. ["name"] = "bottle"
  180. },
  181. ["can"] = {
  182. ["rarity"] = 0.1,
  183. ["category"] = "trash",
  184. ["itemType"] = "trash",
  185. ["weight"] = 1,
  186. ["value"] = 0.07,
  187. ["img"] = "rbxassetid://6874536183",
  188. ["grade"] = 1,
  189. ["name"] = "empty can"
  190. },
  191. ["credit"] = {
  192. ["rarity"] = 0.4,
  193. ["category"] = "trash",
  194. ["itemType"] = "trash",
  195. ["weight"] = 1,
  196. ["value"] = 130,
  197. ["img"] = "rbxassetid://12207031909",
  198. ["grade"] = 4,
  199. ["name"] = "credit card"
  200. },
  201. ["shoe"] = {
  202. ["rarity"] = 0.4,
  203. ["category"] = "trash",
  204. ["itemType"] = "trash",
  205. ["weight"] = 1,
  206. ["value"] = 7.5,
  207. ["img"] = "rbxassetid://10912056890",
  208. ["grade"] = 3,
  209. ["name"] = "shoe"
  210. },
  211. ["card"] = {
  212. ["rarity"] = 0.05,
  213. ["category"] = "trash",
  214. ["itemType"] = "trash",
  215. ["weight"] = 1,
  216. ["value"] = 20,
  217. ["img"] = "rbxassetid://38154272",
  218. ["grade"] = 3,
  219. ["name"] = "trading card"
  220. },
  221. ["cloth"] = {
  222. ["rarity"] = 0.1,
  223. ["category"] = "trash",
  224. ["itemType"] = "trash",
  225. ["weight"] = 1,
  226. ["value"] = 0.15,
  227. ["img"] = "rbxassetid://9712134761",
  228. ["grade"] = 1,
  229. ["name"] = "torn cloth"
  230. },
  231. ["paper"] = {
  232. ["rarity"] = 0.25,
  233. ["category"] = "trash",
  234. ["itemType"] = "trash",
  235. ["weight"] = 1,
  236. ["value"] = 0.02,
  237. ["img"] = "rbxassetid://6835358763",
  238. ["grade"] = 1,
  239. ["name"] = "paper"
  240. },
  241. ["electronics"] = {
  242. ["rarity"] = 0.3,
  243. ["category"] = "trash",
  244. ["itemType"] = "trash",
  245. ["weight"] = 1,
  246. ["value"] = 9.6,
  247. ["img"] = "rbxassetid://547416328",
  248. ["grade"] = 3,
  249. ["name"] = "electronics"
  250. },
  251. ["nail"] = {
  252. ["rarity"] = 0.1,
  253. ["category"] = "trash",
  254. ["itemType"] = "trash",
  255. ["weight"] = 1,
  256. ["value"] = 0.3,
  257. ["img"] = "rbxassetid://11362540073",
  258. ["grade"] = 2,
  259. ["name"] = "nail"
  260. }
  261. },
  262. [2] = 1000000
  263. }
  264.  
  265. game:GetService("ReplicatedStorage"):WaitForChild("SellTrash"):FireServer(unpack(args))
  266.  
  267. end)
  268. end
  269. end
  270.  
  271. teleport(location.location1, 40)
  272.  
  273. end
  274. end)
  275.  
  276. local folder = game:GetService("Workspace").hitboxes
  277. local lp = game.Players.LocalPlayer
  278. local TweenService = game:GetService("TweenService")
  279. local Character = lp.Character
  280.  
  281. local UserInputService = game:GetService("UserInputService")
  282.  
  283. UserInputService.InputBegan:Connect(function(inputObject)
  284. if inputObject.KeyCode == Enum.KeyCode.Z then
  285. getgenv().loop = not getgenv().loop
  286. end
  287. end)
  288.  
  289. while true do
  290. task.wait()
  291. if getgenv().loop then
  292. pcall(function()
  293. Character:FindFirstChildWhichIsA("Tool"):Activate()
  294. for _, hitbox in pairs(folder:GetChildren()) do
  295. if hitbox:IsA("BasePart") and (hitbox.Name == "hitbox" or hitbox.Name == "2") then
  296. local destination = lp.Character.HumanoidRootPart.Position
  297. local tweenInfo = TweenInfo.new(0, Enum.EasingStyle.Linear)
  298. local tween = TweenService:Create(hitbox, tweenInfo, {CFrame = CFrame.new(destination)})
  299. tween:Play()
  300. end
  301. end
  302. end)
  303. end
  304. end
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement