Advertisement
CaliberMag

Untitled

Feb 23rd, 2021
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.17 KB | None | 0 0
  1. local Player = game:GetService("Players").LocalPlayer
  2. local RunService = game:GetService("RunService")
  3. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  4.  
  5. local positions = {
  6. Vector3.new(-1972, 209, 62);
  7. Vector3.new(-920, 437, 1732);
  8. Vector3.new(-1293, 352, 1182);
  9. Vector3.new(113, -22, 1070);
  10. Vector3.new(-144, 98, 69);
  11. Vector3.new(1821, 254, 1761);
  12. Vector3.new(827, 165, 921);
  13. Vector3.new(-1129, 248, 593);
  14. Vector3.new(-1291, 316, -683);
  15. Vector3.new(1903, 352, 386);
  16. Vector3.new(560, 335, 1637);
  17. Vector3.new(1585, 233, 332);
  18. Vector3.new(1753, 465, 2062);
  19. Vector3.new(661, 432, 654);
  20. Vector3.new(-399, 162, 788);
  21. Vector3.new(1399, 224, -344);
  22. Vector3.new(630, 486, 1499);
  23. Vector3.new(-1522, 155,770);
  24. Vector3.new(1253, 174, -1238);
  25. Vector3.new(1366, 376, -651);
  26. Vector3.new(15, -80, -957);
  27. Vector3.new(1252, 32, -465);
  28. Vector3.new(228, 322, -1549);
  29. Vector3.new(754, -160, -539);
  30. Vector3.new(624, -153, -629);
  31. Vector3.new(858, -209, -501);
  32. Vector3.new(1406, 68, 289);
  33. Vector3.new(-1861, 66, 1843);
  34. Vector3.new(-212, 267, 1665);
  35. Vector3.new(-1781, 517, 1701);
  36. Vector3.new(-1517, 95, -126);
  37. Vector3.new(-104, 103, 121);
  38. Vector3.new(-1124, 117, -1148);
  39. Vector3.new(-1803, 125, -1821);
  40. Vector3.new(324, 227, -1602);
  41. Vector3.new(1684, 173, -1762);
  42. Vector3.new(1622, 131, -301);
  43. Vector3.new(-7, -2, 1246);
  44. }
  45.  
  46. local function Load()
  47. for Int, Pos in ipairs(positions) do
  48. if Player.Character and Pos ~= nil then
  49. for Num = 1, 4 do
  50. Player.Character:MoveTo(Pos)
  51. wait()
  52. end
  53. Pos = nil
  54. end
  55. if Pos ~= nil then
  56. return false
  57. end
  58. end
  59. return true
  60. end
  61.  
  62. local function AliveCheck(Object)
  63. local Properties = Object:FindFirstChild("Properties")
  64. if Properties then
  65. local Alive = Properties:FindFirstChild("Alive")
  66. if Alive then
  67. if Alive.Value ~= false then
  68. return true
  69. end
  70. end
  71. end
  72. end
  73.  
  74. repeat
  75. local needsLoading = Load()
  76. until needsLoading ~= false
  77.  
  78. function Match(Material)
  79. local PrimaryPart = Material.PrimaryPart
  80. if PrimaryPart then
  81. local RenderStep
  82. RenderStep = RunService.RenderStepped:Connect(function()
  83. Player.Character.HumanoidRootPart.CFrame = PrimaryPart.CFrame + (PrimaryPart.CFrame.LookVector * -2 + PrimaryPart.CFrame.UpVector * 5)
  84. ReplicatedStorage.Resources.Data.Events.Traffic.ItemInteraction:InvokeServer("Interaction", Material)
  85. end)
  86.  
  87. delay(2, function()
  88. if RenderStep then
  89. RenderStep:Disconnect()
  90. ReplicatedStorage.Resources.Data.Events.Traffic.StopResource:FireServer()
  91. end
  92. end)
  93. wait(3)
  94. keypress(0x45)
  95.  
  96. repeat wait() ReplicatedStorage.Resources.Data.Events.Traffic.Gear:InvokeServer("Action", Vector3.new(0, 0, 0)) until AliveCheck(Material) ~= true
  97. warn("Finished collecting " ..Material.Name.. " finding new material..")
  98. end
  99. end
  100.  
  101. while wait() do
  102. for _, Material in pairs(workspace.Resources:GetDescendants()) do
  103. if Material:IsA("Model") and not table.find(_G.blacklist, Material.Name) then
  104. if AliveCheck(Material) then
  105. Match(Material)
  106. end
  107. end
  108. end
  109. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement