Advertisement
robloxscript111

[SALE] Thief Simulator

Feb 8th, 2023
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.99 KB | None | 0 0
  1. getgenv().Enabled = true -- // Set this to "false" to disable
  2.  
  3. local Player = game:GetService("Players").LocalPlayer
  4. local RunService = game:GetService("RunService")
  5.  
  6. local Menu = Player.PlayerGui.Menu
  7. local Currency = Menu.Currency
  8. local Inv = Currency.Inventory
  9. local Amount = Inv.Amount
  10.  
  11. local NPCFolder = Workspace.NPCs
  12.  
  13. local Sells = {} do
  14. for _, Obj in next, Workspace:GetDescendants() do
  15. if Obj.Name == "Sell" and Obj.Parent.Name == "Area" and Obj.Parent:IsA("Folder") then
  16. table.insert(Sells, Obj)
  17. end
  18. end
  19. end
  20.  
  21. local GetNearestSell = function()
  22. local Distance, Nearest = 9e9 do
  23. for _, Sell in next, Sells do
  24. local CurrentDistance = (Sell.Position - Player.Character.HumanoidRootPart.Position).Magnitude
  25.  
  26. if CurrentDistance < Distance then
  27. Distance = CurrentDistance
  28. Nearest = Sell
  29. end
  30. end
  31. end
  32.  
  33. return Nearest
  34. end
  35.  
  36. while getgenv().Enabled == true and task.wait(0.1) do
  37. local AmountSplit = string.split(Amount.Text, " / ")
  38. local CurrentAmount, TotalAmount = AmountSplit[1], AmountSplit[2]
  39.  
  40. if tonumber(CurrentAmount) < (tonumber(TotalAmount) - 1) then
  41. for _, NPC in next, NPCFolder:GetChildren() do
  42. if NPC:FindFirstChild("HumanoidRootPart") ~= nil then
  43. local RootPart = NPC.HumanoidRootPart
  44. local Prompt = RootPart:FindFirstChildWhichIsA("ProximityPrompt")
  45.  
  46. if Prompt ~= nil then
  47. Player.Character.HumanoidRootPart.CFrame = RootPart.CFrame * CFrame.new(0, 0, -2)
  48. fireproximityprompt(Prompt)
  49. end
  50. end
  51. end
  52. else
  53. local NearestSell = GetNearestSell()
  54.  
  55. firetouchinterest(NearestSell, Player.Character.HumanoidRootPart, 0)
  56. task.wait(0.1)
  57. firetouchinterest(NearestSell, Player.Character.HumanoidRootPart, 1)
  58. end
  59. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement