Advertisement
AjareliVajkaci

RO-BOXING Mobile friendly autofarm gui

Nov 17th, 2024 (edited)
796
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.94 KB | None | 0 0
  1. --Made by Muscle_legends2021 [update: moved the toggle button to left cus you could not click on it while you were sparring.]
  2. local speedFarmToggle = false
  3. local weightFarmToggle = false
  4. local accuracyFarmToggle = false
  5. local uiVisible = true
  6. local player = game.Players.LocalPlayer
  7.  
  8. local function createGUI()
  9. -- Check if GUI already exists
  10. if player.PlayerGui:FindFirstChild("ToggleGui") then
  11. player.PlayerGui.ToggleGui:Destroy()
  12. end
  13.  
  14. -- Create ScreenGui
  15. local screenGui = Instance.new("ScreenGui")
  16. screenGui.Name = "ToggleGui"
  17. screenGui.ResetOnSpawn = false
  18. screenGui.Parent = player.PlayerGui
  19.  
  20. -- Function to style buttons
  21. local function styleButton(button)
  22. button.Font = Enum.Font.GothamBold
  23. button.TextSize = 24
  24. button.TextScaled = true
  25. button.TextWrapped = true
  26. end
  27.  
  28. -- SpeedFarm Button
  29. local speedFarmButton = Instance.new("TextButton")
  30. speedFarmButton.Size = UDim2.new(0, 250, 0, 50)
  31. speedFarmButton.Position = UDim2.new(0.58, 0, 0.5, -115)
  32. speedFarmButton.Text = "SpeedFarm: OFF"
  33. speedFarmButton.BackgroundColor3 = Color3.fromRGB(120, 120, 120)
  34. speedFarmButton.Visible = uiVisible
  35. speedFarmButton.Parent = screenGui
  36. styleButton(speedFarmButton)
  37.  
  38. -- WeightFarm Button
  39. local weightFarmButton = Instance.new("TextButton")
  40. weightFarmButton.Size = UDim2.new(0, 250, 0, 50)
  41. weightFarmButton.Position = UDim2.new(0.58, 0, 0.5, -50)
  42. weightFarmButton.Text = "WeightFarm: OFF"
  43. weightFarmButton.BackgroundColor3 = Color3.fromRGB(120, 120, 120)
  44. weightFarmButton.Visible = uiVisible
  45. weightFarmButton.Parent = screenGui
  46. styleButton(weightFarmButton)
  47.  
  48. -- AccuracyFarm Button
  49. local accuracyFarmButton = Instance.new("TextButton")
  50. accuracyFarmButton.Size = UDim2.new(0, 250, 0, 50)
  51. accuracyFarmButton.Position = UDim2.new(0.58, 0, 0.5, 15)
  52. accuracyFarmButton.Text = "AccuracyFarm: OFF"
  53. accuracyFarmButton.BackgroundColor3 = Color3.fromRGB(120, 120, 120)
  54. accuracyFarmButton.Visible = uiVisible
  55. accuracyFarmButton.Parent = screenGui
  56. styleButton(accuracyFarmButton)
  57.  
  58. -- Toggle Button
  59. local toggleUIVisibilityButton = Instance.new("TextButton")
  60. toggleUIVisibilityButton.Size = UDim2.new(0, 50, 0, 50)
  61. toggleUIVisibilityButton.Position = UDim2.new(0.02, 55, 0.5, -25) -- Move to the left and shift 55 pixels to the right
  62. toggleUIVisibilityButton.Text = "≡"
  63. toggleUIVisibilityButton.BackgroundColor3 = Color3.fromRGB(139, 0, 0)
  64. toggleUIVisibilityButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  65. toggleUIVisibilityButton.Parent = screenGui
  66. styleButton(toggleUIVisibilityButton)
  67.  
  68. -- Toggle SpeedFarm
  69. local function toggleSpeedFarm()
  70. speedFarmToggle = not speedFarmToggle
  71. speedFarmButton.Text = speedFarmToggle and "SpeedFarm: ON" or "SpeedFarm: OFF"
  72. speedFarmButton.BackgroundColor3 = speedFarmToggle and Color3.fromRGB(0, 255, 0) or Color3.fromRGB(120, 120, 120)
  73.  
  74. if speedFarmToggle then
  75. spawn(function()
  76. while speedFarmToggle do
  77. wait()
  78. local punchbag1 = workspace.Punch_Bag1
  79. local punchbag2 = workspace.Punch_Bag2
  80. local speedbag1 = workspace.Speed_Bag1
  81. local speedbag2 = workspace.Speed_Bag2
  82.  
  83. local using = 0
  84.  
  85. if punchbag1.In_Use.Value == false then
  86. player.Character.HumanoidRootPart.CFrame = punchbag1.Torso_Position.CFrame
  87. wait(0.75)
  88. game.ReplicatedStorage.Strength_Exercises["Punch_Bag1"]:FireServer()
  89. using = 1
  90. elseif punchbag2.In_Use.Value == false then
  91. player.Character.HumanoidRootPart.CFrame = punchbag2.Torso_Position.CFrame
  92. wait(0.75)
  93. game.ReplicatedStorage.Strength_Exercises["Punch_Bag2"]:FireServer()
  94. using = 2
  95. elseif speedbag1.In_Use.Value == false then
  96. player.Character.HumanoidRootPart.CFrame = speedbag1.Torso_Position.CFrame
  97. wait(0.75)
  98. game.ReplicatedStorage.Strength_Exercises["Speed_Bag1"]:FireServer()
  99. using = 3
  100. elseif speedbag2.In_Use.Value == false then
  101. player.Character.HumanoidRootPart.CFrame = speedbag2.Torso_Position.CFrame
  102. wait(0.75)
  103. game.ReplicatedStorage.Strength_Exercises["Speed_Bag1"]:FireServer()
  104. using = 4
  105. end
  106.  
  107. if using == 1 then repeat wait(0.1) until punchbag1.Player.Value ~= player.Name end
  108. if using == 2 then repeat wait(0.1) until punchbag2.Player.Value ~= player.Name end
  109. if using == 3 then repeat wait(0.1) until speedbag1.Player.Value ~= player.Name end
  110. if using == 4 then repeat wait(0.1) until speedbag2.Player.Value ~= player.Name end
  111.  
  112. using = 0
  113. end
  114. end)
  115. end
  116. end
  117.  
  118. -- Toggle WeightFarm
  119. local function toggleWeightFarm()
  120. weightFarmToggle = not weightFarmToggle
  121. weightFarmButton.Text = weightFarmToggle and "WeightFarm: ON" or "WeightFarm: OFF"
  122. weightFarmButton.BackgroundColor3 = weightFarmToggle and Color3.fromRGB(0, 255, 0) or Color3.fromRGB(120, 120, 120)
  123.  
  124. if weightFarmToggle then
  125. spawn(function()
  126. while weightFarmToggle do
  127. wait()
  128. local overhead1 = workspace.Overhead1
  129. local bicep1 = workspace.Bicep1
  130. local squat1 = workspace.Squat1
  131. local bench1 = workspace.Bench1
  132.  
  133. local using = 0
  134.  
  135. if overhead1.In_Use.Value == false then
  136. player.Character.HumanoidRootPart.CFrame = overhead1.Torso_Position.CFrame
  137. wait(0.75)
  138. game.ReplicatedStorage.Strength_Exercises["Overhead1"]:FireServer()
  139. using = 1
  140. elseif bicep1.In_Use.Value == false then
  141. player.Character.HumanoidRootPart.CFrame = bicep1.Torso_Position.CFrame
  142. wait(0.75)
  143. game.ReplicatedStorage.Strength_Exercises["Bicep1"]:FireServer()
  144. using = 2
  145. elseif squat1.In_Use.Value == false then
  146. player.Character.HumanoidRootPart.CFrame = squat1.Torso_Position.CFrame
  147. wait(0.75)
  148. game.ReplicatedStorage.Strength_Exercises["Squat1"]:FireServer()
  149. using = 3
  150. elseif bench1.In_Use.Value == false then
  151. player.Character.HumanoidRootPart.CFrame = bench1.Torso_Position.CFrame
  152. wait(0.75)
  153. game.ReplicatedStorage.Strength_Exercises["Bench1"]:FireServer()
  154. using = 4
  155. end
  156.  
  157. if using == 1 then repeat wait(0.1) until overhead1.Player.Value ~= player.Name end
  158. if using == 2 then repeat wait(0.1) until bicep1.Player.Value ~= player.Name end
  159. if using == 3 then repeat wait(0.1) until squat1.Player.Value ~= player.Name end
  160. if using == 4 then repeat wait(0.1) until bench1.Player.Value ~= player.Name end
  161.  
  162. using = 0
  163. end
  164. end)
  165. end
  166. end
  167.  
  168. -- Toggle AccuracyFarm
  169. local function toggleAccuracyFarm()
  170. accuracyFarmToggle = not accuracyFarmToggle
  171. accuracyFarmButton.Text = accuracyFarmToggle and "AccuracyFarm: ON" or "AccuracyFarm: OFF"
  172. accuracyFarmButton.BackgroundColor3 = accuracyFarmToggle and Color3.fromRGB(0, 255, 0) or Color3.fromRGB(120, 120, 120)
  173.  
  174. if accuracyFarmToggle then
  175. spawn(function()
  176. while accuracyFarmToggle do
  177. wait()
  178. local num = 1
  179.  
  180. for i = 1, 4 do
  181. local dummy = workspace["Dummy_Punch" .. i]
  182. if not dummy.In_Use.Value then
  183. num = i
  184. break
  185. end
  186. end
  187.  
  188. local dummy = workspace["Dummy_Punch" .. num]
  189. player.Character.HumanoidRootPart.CFrame = dummy.BlockedArea1.CFrame
  190. wait(0.75)
  191. game.ReplicatedStorage.Strength_Exercises["Dummy_Punch" .. num]:FireServer()wait(0.75)
  192.  
  193. repeat
  194. wait(0.1)
  195. local playerName = dummy.Player.Value
  196. local buttons = dummy.Buttons:GetChildren()
  197. for _, button in ipairs(buttons) do
  198. if button.Color == Color3.fromRGB(0, 255, 0) then
  199. fireclickdetector(button.ClickDetector)
  200. end
  201. end
  202. until dummy.Player.Value ~= player.Name
  203. end
  204. end)
  205. end
  206. end
  207.  
  208. -- Connect buttons to their functions
  209. speedFarmButton.MouseButton1Click:Connect(toggleSpeedFarm)
  210. weightFarmButton.MouseButton1Click:Connect(toggleWeightFarm)
  211. accuracyFarmButton.MouseButton1Click:Connect(toggleAccuracyFarm)
  212.  
  213. -- Toggle UI visibility
  214. toggleUIVisibilityButton.MouseButton1Click:Connect(function()
  215. uiVisible = not uiVisible
  216. speedFarmButton.Visible = uiVisible
  217. weightFarmButton.Visible = uiVisible
  218. accuracyFarmButton.Visible = uiVisible
  219. end)
  220. end
  221.  
  222. -- Create GUI
  223. createGUI()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement