1_F0

Bloxburg Small Autofarm

Jan 8th, 2022 (edited)
2,458
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.27 KB | None | 0 0
  1. --[[
  2. Bloxburg Script (Uh, good name right...?)
  3. Meme: https://sperg.club/uploads/elFYKuMqdp9kRljM.png
  4. ]]
  5.  
  6. -- Wait for game to load
  7.  
  8. repeat wait() until game:IsLoaded();
  9.  
  10. -- Define variables
  11.  
  12. local library = loadstring(game:HttpGet("https://raw.githubusercontent.com/LegoHacks/Utilities/main/UI.lua"))();
  13.  
  14. local workspace = game:GetService("Workspace");
  15. local replicatedStorage = game:GetService("ReplicatedStorage");
  16. local tweenService = game:GetService("TweenService");
  17. local players = game:GetService("Players");
  18. local client = players.LocalPlayer;
  19.  
  20. -- Main script
  21.  
  22. local stats = replicatedStorage.Stats[client.Name];
  23. local dataManager = require(replicatedStorage.Modules.DataManager);
  24. local jobManager = require(client.PlayerGui.MainGUI.Scripts.JobManager);
  25.  
  26. local function fireServer(data)
  27. local oldI = getfenv(dataManager.FireServer).i;
  28. getfenv(dataManager.FireServer).i = function() end; --> Get around their shit "security"
  29. dataManager:FireServer(data);
  30. getfenv(dataManager.FireServer).i = oldI; --> Restore original function
  31. end;
  32.  
  33. local function getOrder(customer)
  34. if (not customer or (customer and not customer:FindFirstChild("Order"))) then return end;
  35.  
  36. if (stats.Job.Value == "StylezHairdresser") then
  37. local style = customer.Order:WaitForChild("Style").Value;
  38. local colour = customer.Order:WaitForChild("Color").Value;
  39.  
  40. return {style, colour};
  41. elseif (stats.Job.Value == "BloxyBurgersCashier") then
  42. local burger = customer.Order:WaitForChild("Burger").Value;
  43. local fries = customer.Order:WaitForChild("Fries").Value;
  44. local cola = customer.Order:WaitForChild("Cola").Value;
  45.  
  46. return {burger, fries, cola};
  47. end;
  48. end;
  49.  
  50. local bloxburg = library:CreateWindow("Bloxburg");
  51.  
  52. bloxburg:AddToggle({
  53. text = "Stylez Hairdresser";
  54. flag = "hairdresser";
  55. callback = function(enabled)
  56. if (not enabled) then return end;
  57.  
  58. if (stats.Job.Value ~= "StylezHairdresser") then
  59. jobManager:GoToWork("StylezHairdresser"); --> TP to job
  60. end;
  61.  
  62. repeat wait() until stats.Job.Value == "StylezHairdresser";
  63. tweenService:Create(client.Character.HumanoidRootPart, TweenInfo.new(0.75, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), {CFrame = CFrame.new(868.464783, 13.6776829, 174.983795, -0.999945581, -6.58446098e-08, -0.0104347449, -6.6522297e-08, 1, 6.45977494e-08, 0.0104347449, 6.52883756e-08, -0.999945581)}):Play();
  64.  
  65. while library.flags.hairdresser do
  66. local workstations = workspace.Environment.Locations.StylezHairStudio.HairdresserWorkstations;
  67. for i, v in next, workstations:GetChildren() do
  68. if (v.Occupied.Value) then
  69. fireServer({
  70. Type = "FinishOrder";
  71. Workstation = v;
  72. Order = getOrder(v.Occupied.Value);
  73. });
  74. end;
  75. end;
  76. wait();
  77. end;
  78. end;
  79. });
  80.  
  81. bloxburg:AddToggle({
  82. text = "Bloxy Burgers Cashier";
  83. flag = "cashier";
  84. callback = function(enabled)
  85. if (not enabled) then return end;
  86.  
  87. if (stats.Job.Value ~= "BloxyBurgersCashier") then
  88. jobManager:GoToWork("BloxyBurgersCashier"); --> TP to job
  89. end;
  90.  
  91. repeat wait() until stats.Job.Value == "BloxyBurgersCashier";
  92. tweenService:Create(client.Character.HumanoidRootPart, TweenInfo.new(0.75, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), {CFrame = CFrame.new(825.076355, 13.6776829, 276.091309, 0.0133343497, -5.09454665e-08, -0.999910772, 7.34347916e-09, 1, -5.08520621e-08, 0.999910772, -6.66474698e-09, 0.0133343497)}):Play();
  93.  
  94. while library.flags.cashier do
  95. local workstations = workspace.Environment.Locations.BloxyBurgers.CashierWorkstations;
  96. for i, v in next, workstations:GetChildren() do
  97. if (v.Occupied.Value) then
  98. fireServer({
  99. Type = "FinishOrder";
  100. Workstation = v;
  101. Order = getOrder(v.Occupied.Value);
  102. });
  103. end;
  104. end;
  105. wait();
  106. end;
  107. end;
  108. });
  109.  
  110. -- Load library
  111.  
  112. library:Init();
Add Comment
Please, Sign In to add comment