DontDoItIDareU

Casino Tycoon Auto Farm

Sep 25th, 2018
537
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.07 KB | None | 0 0
  1. --[[
  2. -----------------------------
  3. Default Controls:
  4.  
  5. f3 to toggle Autofarm money
  6.  
  7. -----------------------------
  8. Settings
  9. --]]
  10. Key1 = "F3" --Default is f3
  11.  
  12. Key2 = "F4" --Default is f4
  13.  
  14. NonUIS = false -- set to true if you are using Non-UIS
  15.  
  16. if NonUIS == true then
  17. _G.on = 1 --if you are using non-uis, set this to 0 to turn off mob farm
  18. _G.on2 = 1 --if you are using non-uis, set this to 0 to turn off money farm
  19. end
  20. --[[
  21.  
  22. You can not use certain special characters so I would keep it to the function keys and normal keys
  23.  
  24. E.g. F1, F2, F3, J, K, L, 1, 2, 3, LeftAlt, Space
  25.  
  26. -----------------------------
  27. Game:
  28. https://www.roblox.com/games/2030764761/Casino-Tycoon-ALPHA-REBIRTHS
  29. -----------------------------
  30. Description:
  31. This will autofarm for money, basically this will autocollect the items you have
  32.  
  33. The more upgraded and more things you have, the quicker the money
  34. -----------------------------
  35. Credit:
  36. Original: @Verm brianops16
  37. -----------------------------
  38. --]]
  39.  
  40. plr = game:GetService('Players').LocalPlayer
  41.  
  42. function code()
  43. for i,v in pairs(game.Workspace.CasinosFolder:GetChildren()) do
  44. local owner = v:FindFirstChild("Owner",true)
  45. if owner.Value == plr and _G.on == 1 then
  46. local casino = owner.Parent
  47. for b,item in pairs(casino.CasinoArea.Items:GetChildren()) do
  48. if _G.on == 1 and item ~= nil then
  49. local index = item:FindFirstChild("PlacedIndex",true)
  50. local A_1 = item.Name
  51. local A_2 = index.Value
  52. local Event = game:GetService("ReplicatedStorage").Events.CasinoItemReveneu
  53. Event:FireServer(A_1, A_2)
  54. end
  55. end
  56. end
  57. end
  58. end
  59. function code2()
  60. -- Script goes here
  61. end
  62.  
  63. ----
  64.  
  65. if NonUIS == false then
  66. local UIS = game:GetService("UserInputService")
  67. UIS.InputBegan:connect(function(Input)
  68. local KeyCode = Input.KeyCode
  69. if KeyCode == Enum.KeyCode[Key1] then
  70. if _G.on == 1 then
  71. _G.on = 0
  72. else
  73. _G.on = 1
  74. game:GetService('RunService').Stepped:wait()
  75. while _G.on == 1 do
  76. game:GetService('RunService').Stepped:wait()
  77. local good,bad = pcall(code)
  78. if good and _G.on == 1 then
  79. code()
  80. else
  81. game:GetService('RunService').Stepped:wait()
  82. end
  83. end
  84. end
  85. elseif KeyCode == Enum.KeyCode[Key2] then
  86. if _G.on2 == 1 then
  87. _G.on2 = 0
  88. else
  89. _G.on2 = 1
  90. wait(Interval)
  91. while _G.on2 == 1 do
  92. wait(Interval)
  93. local good,bad = pcall(code2)
  94. if good and _G.on2 == 1 then
  95. code2()
  96. else
  97. wait(Interval)
  98. end
  99. end
  100. end
  101. end
  102. end)
  103. else
  104. while _G.on == 1 do
  105. game:GetService('RunService').Stepped:wait()
  106. local good,bad = pcall(code)
  107. if good and _G.on == 1 then
  108. code()
  109. code2()
  110. else
  111. game:GetService('RunService').Stepped:wait()
  112. end
  113. end
  114. end
  115. --Description and controls at the top
Advertisement
Add Comment
Please, Sign In to add comment