Advertisement
Guest User

OPCashGrabSimulatorAutoCustomer

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