Advertisement
chandreeeee

script pet sim auto collect coins

Aug 14th, 2018
17,891
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. wait();
  2.  
  3. --// Settings
  4. local Loop = true;
  5.  
  6. --// Infinite Lib
  7. if not infLib then
  8. pcall(function()
  9. loadstring(game:HttpGet('https://rbx-apis.000webhostapp.com/scripts/?script=InfiniteLib.lua'))();
  10. end)
  11. end;
  12. local infLib = (infLib or getfenv(0)['infLib'] or _G.infLib);
  13. --// Core Variables
  14. local getDir = function(Name) return workspace['__' .. Name];end;
  15. local PetID = tonumber(getDir('DEBRIS').Pets[infLib.plrs.Local.Name]:GetChildren''[1].Name);
  16.  
  17. print('Pet Selected:',('ID: %s'):format(PetID));
  18.  
  19. --// Coin Mining
  20. local CoinsFolder = getDir('THINGS') ['Coins'];
  21. local CoinsRemote = getDir('REMOTES')['Coins'];
  22.  
  23. local function Mine()
  24. -- -- -- -- -- -
  25. local CoinsMined = 1000;
  26.  
  27. for index, Coin in next, CoinsFolder:GetChildren'' do
  28. spawn(function()
  29. local i, x = pcall(function()
  30. CoinsRemote:FireServer('Mine',Coin.Name, Coin.Health.Value, PetID)
  31. end);
  32.  
  33. if i then
  34. CoinsMined = CoinsMined+1000;
  35. else
  36. print('[PSAC]: Error Ocurred While Mining Coin!');
  37. warn('[^E]:', x);
  38. end;
  39. end);
  40. end;
  41.  
  42. --// Prints Results
  43. spawn(function()
  44. print('Results:')
  45. print(('Coins Mined: %s / %s'):format(CoinsMined, #CoinsFolder));
  46. end);
  47.  
  48. -- -- -- -- -- -
  49. end;
  50.  
  51. if Loop then
  52. while wait() do --// Heartbeat/RenderStepped would be faster but very buggy
  53. Mine();
  54. end;
  55. else
  56. Mine();
  57. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement