Upscalefanatic3

[RAW] AutoUpdate_Loader for Cash Grab Simulator

Jan 31st, 2018
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.85 KB | None | 0 0
  1. local Services = setmetatable({},{__index=function(s,i) return game:service(i) end});
  2.  
  3. local plr = Services.Players.LocalPlayer;
  4. local rem = Services.ReplicatedStorage.remotes.bindCustomer;
  5. local uis = Services.UserInputService;
  6. local dep = workspace.zones.depositZone;
  7. local enabled = true;
  8. local key = toggleKey or 'r';
  9.  
  10. uis.InputBegan:connect(function(data,gpe)
  11. if not gpe and data.UserInputType == Enum.UserInputType.Keyboard then
  12. local press = data.KeyCode.Name:lower();
  13. if key == press then
  14. enabled = not enabled;
  15. print('bot is now',enabled and 'enabled' or 'disabled');
  16. end
  17. end
  18. end)
  19.  
  20. local function hasMax(getMax)
  21. local a,b = plr.PlayerGui.screenGui.customerList.header.textLabel.Text:match('(%d+)/(%d+)');
  22. return getMax and b or (a == b);
  23. end
  24. local function backpackIsFull(leasure)
  25. if not plr.Character then return false end
  26. local display = plr.Character:FindFirstChild('backpackDisplay', true)
  27. if not display then return false end
  28. a,b = display.holder.textLabel.Text:match('(%d+)/(%d+)');
  29. return (a == b) or (tonumber(a) > tonumber(b)-(leasure or 0));
  30. end
  31.  
  32.  
  33. coroutine.resume(coroutine.create(function()
  34. while wait(1/15) do
  35. if enabled then
  36. if backpackIsFull(tonumber(hasMax(true))/10) then
  37. local cf = plr.Character.HumanoidRootPart.CFrame;
  38. plr.Character.HumanoidRootPart.CFrame = dep.CFrame;
  39. wait(1/20)
  40. plr.Character.HumanoidRootPart.CFrame = cf;
  41. end
  42. end
  43. end
  44. end))
  45.  
  46. while wait() do
  47. if enabled then
  48. if not hasMax() then
  49. for i,v in ipairs(workspace.customers:children()) do
  50. if v:FindFirstChild('properties') and v.properties:FindFirstChild('owner') and not v.properties.owner.Value and not hasMax() and (plr.Character.HumanoidRootPart.CFrame.p-v.HumanoidRootPart.CFrame.p).magnitude < 100 then
  51. rem:FireServer(v);
  52. wait(.5);
  53. end
  54. end
  55. end
  56. end
  57. end
Add Comment
Please, Sign In to add comment