Advertisement
Guest User

enc

a guest
Jun 17th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.28 KB | None | 0 0
  1.  
  2. local remote = nil
  3. local orderInc = 0
  4. local workstationTable = {}
  5.  
  6.  
  7. function setupMetatable()
  8. warn("Setting up the AntiBan.")
  9.  
  10.  
  11. local metatable = getrawmetatable(game)
  12. local backupNamecall = metatable.__namecall
  13.  
  14.  
  15. local setreadonly = make_writeable or setreadonly
  16. setreadonly(metatable, false)
  17.  
  18.  
  19. metatable.__namecall = function(...)
  20. local args = {...}
  21. if(args[#args] == "FireServer") then
  22. if(args[2] and type(args[2]) == "table" and args[2]["Order"] and not workstationTable[args[2]["Workstation"]]) then
  23. warn("[!] Remote and Workstation have been found.")
  24. remote = args[1]
  25.  
  26. doWork(args[2]["Workstation"])
  27. end
  28. end
  29. return backupNamecall(...)
  30. end
  31. end
  32.  
  33.  
  34. function getOrder(workstation)
  35. local orderValue = workstation.Occupied.Value:WaitForChild("Order")
  36.  
  37. return {
  38. orderValue.Style.Value,
  39. orderValue.Color.Value
  40. }
  41. end
  42.  
  43. warn("Welcome to Blocksburg AutoFarm.")
  44. warn("By JasonP#1205")
  45. warn("Go to work at the Hairdresser job.")
  46. warn("Complete 1-3 Orders (can be wrong).")
  47. warn("Then it should auto finish Order.")
  48. warn("This makes up to 600k per hour depending on your level.")
  49. setupMetatable()
  50.  
  51. function doWork(workstation)
  52. local workEvent = nil
  53. local inUseEvent = nil
  54. workstationTable[workstation] = true
  55.  
  56. workEvent = workstation.Occupied.Changed:Connect(function(value)
  57. if(value == nil) then return end
  58.  
  59. local order = getOrder(workstation)
  60. remote:FireServer({
  61. Type = "FinishHair",
  62. Workstation = workstation,
  63. Order = order
  64. })
  65.  
  66. orderInc = orderInc + 1
  67. local date = os.date("*t", now)
  68. warn("Finished Order => " .. orderInc .. " => " .. date["hour"] .. ":" .. date["min"])
  69. end)
  70.  
  71. inUseEvent = workstation.InUse.Changed:Connect(function(value)
  72. if(value ~= game:GetService("Players").LocalPlayer and workEvent ~= nil) then
  73. warn("Did you change your workstation? Please wait while we Restart the script.")
  74. workstationTable = {}
  75. workEvent:Disconnect()
  76. inUseEvent:Disconnect()
  77. end
  78. end)
  79. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement