Advertisement
sdasdw

Untitled

Oct 9th, 2021
15
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.27 KB | None | 0 0
  1. if game.PlaceId == 7484251959 then
  2. repeat wait() until game:IsLoaded();
  3. wait(1000000000000000000000000000000000000000000000);
  4.  
  5. local lp = game:service"Players".LocalPlayer;
  6. local rs = game:service"ReplicatedStorage";
  7. local ws = workspace;
  8. local run_s = game:service"RunService";
  9. local ts = game:service"TweenService";
  10.  
  11. local old; old = hookmetamethod(game, "__namecall", function(self, ...)
  12. if not checkcaller() and getnamecallmethod() == "Kick" then
  13. return;
  14. end
  15. return old(self, ...);
  16. end);
  17. wait(1);
  18. --lp:Kick("Script is patched");
  19.  
  20. repeat wait() until lp.Character
  21.  
  22. getgenv().item_farm = true;
  23.  
  24. local PlaceID = game.PlaceId
  25. local AllIDs = {}
  26. local foundAnything = ""
  27. local actualHour = os.date("!*t").hour
  28. local Deleted = false
  29. local File = pcall(function()
  30. AllIDs = game:GetService('HttpService'):JSONDecode(readfile("NotSameServers.json"))
  31. end)
  32. if not File then
  33. table.insert(AllIDs, actualHour)
  34. writefile("NotSameServers.json", game:GetService('HttpService'):JSONEncode(AllIDs))
  35. end
  36. function TPReturner()
  37. local Site;
  38. if foundAnything == "" then
  39. Site = game.HttpService:JSONDecode(game:HttpGet('https://games.roblox.com/v1/games/' .. PlaceID .. '/servers/Public?sortOrder=Asc&limit=100'))
  40. else
  41. Site = game.HttpService:JSONDecode(game:HttpGet('https://games.roblox.com/v1/games/' .. PlaceID .. '/servers/Public?sortOrder=Asc&limit=100&cursor=' .. foundAnything))
  42. end
  43. local ID = ""
  44. if Site.nextPageCursor and Site.nextPageCursor ~= "null" and Site.nextPageCursor ~= nil then
  45. foundAnything = Site.nextPageCursor
  46. end
  47. local num = 0;
  48. for i,v in pairs(Site.data) do
  49. local Possible = true
  50. ID = tostring(v.id)
  51. if tonumber(v.maxPlayers) > tonumber(v.playing) then
  52. for _,Existing in pairs(AllIDs) do
  53. if num ~= 0 then
  54. if ID == tostring(Existing) then
  55. Possible = false
  56. end
  57. else
  58. if tonumber(actualHour) ~= tonumber(Existing) then
  59. local delFile = pcall(function()
  60. delfile("NotSameServers.json")
  61. AllIDs = {}
  62. table.insert(AllIDs, actualHour)
  63. end)
  64. end
  65. end
  66. num = num + 1
  67. end
  68. if Possible == true then
  69. table.insert(AllIDs, ID)
  70. wait()
  71. pcall(function()
  72. writefile("NotSameServers.json", game:GetService('HttpService'):JSONEncode(AllIDs))
  73. wait()
  74. game:GetService("TeleportService"):TeleportToPlaceInstance(PlaceID, ID, game.Players.LocalPlayer)
  75. end)
  76. wait(1);
  77. end
  78. end
  79. end
  80. end
  81.  
  82. function Teleport()
  83. while wait() do
  84. pcall(function()
  85. TPReturner()
  86. if foundAnything ~= "" then
  87. TPReturner()
  88. return true;
  89. end
  90. end)
  91. end
  92. end
  93.  
  94. local instance_names = {"Torso", "Head", "Right Arm", "Left Arm", "Left Leg", "Right Leg"};
  95. coroutine.wrap(function()
  96. local a = lp.Character.Humanoid:Clone();
  97. a.Parent = lp.Character;
  98. lp.Character.Humanoid:Destroy();
  99. ---[[
  100. run_s.RenderStepped:Connect(function()
  101. if item_farm and lp.Character and lp.Character:FindFirstChild("Humanoid") then
  102. lp.Character.Humanoid:ChangeState(11);
  103. end
  104. end);
  105. ---]]
  106. while wait() do
  107. if hide_character and lp and lp.Character then
  108. for i,v in pairs(lp.Character:GetChildren()) do
  109. if v:IsA("Part") and table.find(instance_names, v.Name) then
  110. v:Destroy();
  111. end
  112. end
  113. end
  114. end
  115. end)();
  116.  
  117. wait(1);
  118. --[[
  119. local function get_tbl_size(tbl)
  120. local size = 0;
  121. for i,v in pairs(tbl) do
  122. size = size + 1;
  123. end
  124. return size;
  125. end
  126.  
  127. local function get_closest_item()
  128. local temp = nil;
  129.  
  130. for i,v in pairs(ws.Drops.Active:GetChildren()) do
  131. if not table.find(item_blacklist, v.Name) and v:FindFirstChildOfClass("ProximityPrompt", true) then
  132. local a = v:FindFirstChildOfClass("ProximityPrompt", true);
  133. local b = v:FindFirstChildOfClass("Part") or v:FindFirstChildOfClass("MeshPart") or v:FindFirstChildOfClass("Handle") or v;
  134. if b and a then
  135. temp = v;
  136. break;
  137. end
  138. end
  139. end
  140.  
  141. for i,v in pairs(ws.Drops.Active:GetChildren()) do
  142. if not table.find(item_blacklist, v.Name) and v:FindFirstChildOfClass("ProximityPrompt", true) then
  143. local a = v:FindFirstChildOfClass("ProximityPrompt", true);
  144. local b = v:FindFirstChildOfClass("Part") or v:FindFirstChildOfClass("MeshPart") or v:FindFirstChildOfClass("Handle") or v;
  145. if b and a then
  146. local aaa = temp:FindFirstChildOfClass("Part") or temp:FindFirstChildOfClass("MeshPart") or temp:FindFirstChildOfClass("Handle") or temp;
  147. if (b.Position - lp.Character.PrimaryPart.Position).magnitude < (aaa.Position - lp.Character.PrimaryPart.Position).magnitude then
  148. temp = v;
  149. end
  150. end
  151. end
  152. end
  153.  
  154. print(temp);
  155. return temp;
  156. end
  157.  
  158. pcall(function()
  159. for i,v in pairs(ws.Drops.Active:GetChildren()) do
  160. --if lp.Character and lp.Character.PrimaryPart then
  161. local closest = nil;
  162. repeat wait()
  163. closest = get_closest_item();
  164. until closest;
  165.  
  166. local part = closest:FindFirstChildOfClass("Part") or closest:FindFirstChildOfClass("MeshPart") or closest:FindFirstChildOfClass("Handle") or closest;
  167. local pp = closest:FindFirstChildOfClass("ProximityPrompt", true);
  168. local dist = (part.Position - lp.Character.PrimaryPart.Position).magnitude;
  169. if dist <= dist_before_tp then
  170. lp.Character.PrimaryPart.CFrame = part.CFrame;
  171. else
  172. local time = dist / speed;
  173. local tween_info = TweenInfo.new(time, Enum.EasingStyle.Quad, Enum.EasingDirection.Out, 0, false, 0);
  174. local tween = ts:Create(lp.Character.PrimaryPart, tween_info, {CFrame = part.CFrame});
  175. tween:Play();
  176. repeat wait() until (part.Position - lp.Character.PrimaryPart.Position).magnitude <= dist_before_tp;
  177. tween:Cancel();
  178. lp.Character.PrimaryPart.CFrame = part.CFrame;
  179. end
  180. wait(.25);
  181. local count = 0;
  182. repeat wait()
  183. fireproximityprompt(pp);
  184. count = count + 1;
  185. until not pp or not pp:IsDescendantOf(game) or count >= 10;
  186. wait(.25);
  187. --end
  188. end
  189. end)
  190. --]]
  191. pcall(function()
  192. for i,v in pairs(ws.Drops.Active:GetChildren()) do
  193. if not table.find(item_blacklist, v.Name) and v:FindFirstChildOfClass("ProximityPrompt", true) then
  194. local a = v:FindFirstChildOfClass("ProximityPrompt", true);
  195. local b = v:FindFirstChildOfClass("Part", true) or v:FindFirstChildOfClass("MeshPart", true) or v:FindFirstChildOfClass("Handle", true) or v;
  196. if b and a then
  197. lp.Character.PrimaryPart.CFrame = b.CFrame;
  198. wait(.25);
  199. local count = 0;
  200. repeat wait()
  201. fireproximityprompt(a);
  202. count = count + 1;
  203. until not a or not a:IsDescendantOf(game) or count >= 10;
  204. wait(.25);
  205. end
  206. end
  207. end
  208. end)
  209. wait(1);
  210. Teleport();
  211. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement