joefromsansnite

DBFR Auto Farm & Tp

Sep 20th, 2021
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 18.64 KB | None | 0 0
  1. -- Gui
  2. local DBFRAutoFarmAndTeleportGui = Instance.new("ScreenGui")
  3. local BackgroundFrame = Instance.new("Frame")
  4. local TitleFrame = Instance.new("Frame")
  5. local ExploitTitleText = Instance.new("TextLabel")
  6. local CreditsFrame = Instance.new("Frame")
  7. local CreditsText = Instance.new("TextLabel")
  8. local MainFramesList = Instance.new("Frame")
  9. local MainFrame1 = Instance.new("Frame")
  10. local ScrollingFrame = Instance.new("ScrollingFrame")
  11. local UIGridLayout = Instance.new("UIGridLayout")
  12. local StartButton = Instance.new("TextButton")
  13. local MainFrame2 = Instance.new("Frame")
  14. local ScrollingFrame2 = Instance.new("ScrollingFrame")
  15. local UIGridLayout_2 = Instance.new("UIGridLayout")
  16. local TeleportButton = Instance.new("TextButton")
  17. local SelectedText = Instance.new("TextLabel")
  18. local MainFrame3 = Instance.new("Frame")
  19. local InfiniteHealthFrame = Instance.new("Frame")
  20. local InfiniteHealthButton = Instance.new("TextButton")
  21. local UICorner = Instance.new("UICorner")
  22. local UICorner_2 = Instance.new("UICorner")
  23. local Text1 = Instance.new("TextLabel")
  24. local MainFrame0 = Instance.new("Frame")
  25. local SideButtons = Instance.new("ScrollingFrame")
  26. local ListButton1 = Instance.new("TextButton")
  27. local ListButton2 = Instance.new("TextButton")
  28. local ListButton3 = Instance.new("TextButton")
  29. local UIGridLayout_3 = Instance.new("UIGridLayout")
  30. local ExitButton = Instance.new("TextButton")
  31. local MinimizeButton = Instance.new("TextButton")
  32.  
  33. DBFRAutoFarmAndTeleportGui.Name = "DBFRAutoFarmAndTeleportGui"
  34. DBFRAutoFarmAndTeleportGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  35. DBFRAutoFarmAndTeleportGui.ZIndexBehavior = Enum.ZIndexBehavior.Sibling
  36.  
  37. BackgroundFrame.Name = "BackgroundFrame"
  38. BackgroundFrame.Parent = DBFRAutoFarmAndTeleportGui
  39. BackgroundFrame.BackgroundColor3 = Color3.fromRGB(60, 60, 60)
  40. BackgroundFrame.BorderSizePixel = 0
  41. BackgroundFrame.Position = UDim2.new(0.213541672, 0, 0.22632423, 0)
  42. BackgroundFrame.Size = UDim2.new(0, 549, 0, 355)
  43. BackgroundFrame.Active = true
  44. BackgroundFrame.Draggable = true
  45.  
  46. TitleFrame.Name = "TitleFrame"
  47. TitleFrame.Parent = BackgroundFrame
  48. TitleFrame.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
  49. TitleFrame.BorderSizePixel = 0
  50. TitleFrame.Position = UDim2.new(0.000426912564, 0, -0.00205683778, 0)
  51. TitleFrame.Size = UDim2.new(0, 549, 0, 55)
  52.  
  53. ExploitTitleText.Name = "ExploitTitleText"
  54. ExploitTitleText.Parent = TitleFrame
  55. ExploitTitleText.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  56. ExploitTitleText.BackgroundTransparency = 1.000
  57. ExploitTitleText.BorderSizePixel = 0
  58. ExploitTitleText.Size = UDim2.new(0, 440, 0, 55)
  59. ExploitTitleText.Font = Enum.Font.Arial
  60. ExploitTitleText.Text = "DBFR Exploit Gui"
  61. ExploitTitleText.TextColor3 = Color3.fromRGB(255, 255, 255)
  62. ExploitTitleText.TextScaled = true
  63. ExploitTitleText.TextSize = 30.000
  64. ExploitTitleText.TextWrapped = true
  65.  
  66. CreditsFrame.Name = "CreditsFrame"
  67. CreditsFrame.Parent = BackgroundFrame
  68. CreditsFrame.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
  69. CreditsFrame.BorderSizePixel = 0
  70. CreditsFrame.Position = UDim2.new(0.256999999, 0, 0.897183061, 0)
  71. CreditsFrame.Size = UDim2.new(0, 408, 0, 36)
  72.  
  73. CreditsText.Name = "CreditsText"
  74. CreditsText.Parent = CreditsFrame
  75. CreditsText.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  76. CreditsText.BackgroundTransparency = 1.000
  77. CreditsText.BorderSizePixel = 0
  78. CreditsText.Position = UDim2.new(0.631187618, 0, -0.000804477255, 0)
  79. CreditsText.Size = UDim2.new(0, 150, 0, 37)
  80. CreditsText.Font = Enum.Font.Arial
  81. CreditsText.Text = "By: ImposterSussy111"
  82. CreditsText.TextColor3 = Color3.fromRGB(255, 255, 255)
  83. CreditsText.TextSize = 14.000
  84. CreditsText.TextWrapped = true
  85.  
  86. MainFramesList.Name = "MainFramesList"
  87. MainFramesList.Parent = BackgroundFrame
  88. MainFramesList.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  89. MainFramesList.BackgroundTransparency = 1.000
  90. MainFramesList.Position = UDim2.new(0.255009115, 0, 0.152112678, 0)
  91. MainFramesList.Size = UDim2.new(0, 408, 0, 264)
  92.  
  93. MainFrame1.Name = "MainFrame1"
  94. MainFrame1.Parent = MainFramesList
  95. MainFrame1.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  96. MainFrame1.BackgroundTransparency = 1.000
  97. MainFrame1.BorderSizePixel = 0
  98. MainFrame1.Position = UDim2.new(-0.000522345304, 0, 0.000597521663, 0)
  99. MainFrame1.Size = UDim2.new(0, 407, 0, 264)
  100. MainFrame1.Visible = false
  101.  
  102. ScrollingFrame.Parent = MainFrame1
  103. ScrollingFrame.Active = true
  104. ScrollingFrame.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
  105. ScrollingFrame.BorderSizePixel = 0
  106. ScrollingFrame.Position = UDim2.new(0.233415231, 0, 0.0681818202, 0)
  107. ScrollingFrame.Size = UDim2.new(0, 220, 0, 136)
  108. ScrollingFrame.CanvasSize = UDim2.new(0, 0, 10, 0)
  109.  
  110. UIGridLayout.Parent = ScrollingFrame
  111. UIGridLayout.SortOrder = Enum.SortOrder.LayoutOrder
  112. UIGridLayout.CellSize = UDim2.new(0, 205, 0, 50)
  113.  
  114. StartButton.Name = "StartButton"
  115. StartButton.Parent = MainFrame1
  116. StartButton.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
  117. StartButton.Position = UDim2.new(0.257985264, 0, 0.670454562, 0)
  118. StartButton.Size = UDim2.new(0, 200, 0, 50)
  119. StartButton.Font = Enum.Font.Arial
  120. StartButton.Text = "Start"
  121. StartButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  122. StartButton.TextSize = 25.000
  123.  
  124. MainFrame2.Name = "MainFrame2"
  125. MainFrame2.Parent = MainFramesList
  126. MainFrame2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  127. MainFrame2.BackgroundTransparency = 1.000
  128. MainFrame2.BorderSizePixel = 0
  129. MainFrame2.Position = UDim2.new(-0.000522345304, 0, 0.000597521663, 0)
  130. MainFrame2.Size = UDim2.new(0, 407, 0, 264)
  131. MainFrame2.Visible = false
  132.  
  133. ScrollingFrame2.Name = "ScrollingFrame2"
  134. ScrollingFrame2.Parent = MainFrame2
  135. ScrollingFrame2.Active = true
  136. ScrollingFrame2.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
  137. ScrollingFrame2.BorderSizePixel = 0
  138. ScrollingFrame2.Position = UDim2.new(0.233415231, 0, 0.0265151523, 0)
  139. ScrollingFrame2.Size = UDim2.new(0, 220, 0, 136)
  140. ScrollingFrame2.CanvasSize = UDim2.new(0, 0, 10, 0)
  141.  
  142. UIGridLayout_2.Parent = ScrollingFrame2
  143. UIGridLayout_2.SortOrder = Enum.SortOrder.LayoutOrder
  144. UIGridLayout_2.CellSize = UDim2.new(0, 205, 0, 50)
  145.  
  146. TeleportButton.Name = "TeleportButton"
  147. TeleportButton.Parent = MainFrame2
  148. TeleportButton.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
  149. TeleportButton.Position = UDim2.new(0.257985264, 0, 0.772727311, 0)
  150. TeleportButton.Size = UDim2.new(0, 200, 0, 50)
  151. TeleportButton.Font = Enum.Font.Arial
  152. TeleportButton.Text = "Teleport"
  153. TeleportButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  154. TeleportButton.TextSize = 25.000
  155.  
  156. SelectedText.Name = "SelectedText"
  157. SelectedText.Parent = MainFrame2
  158. SelectedText.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  159. SelectedText.BackgroundTransparency = 1.000
  160. SelectedText.Position = UDim2.new(0.257985264, 0, 0.537878811, 0)
  161. SelectedText.Size = UDim2.new(0, 200, 0, 50)
  162. SelectedText.Font = Enum.Font.Arial
  163. SelectedText.LineHeight = 1.100
  164. SelectedText.Text = "Selected:"
  165. SelectedText.TextColor3 = Color3.fromRGB(255, 255, 255)
  166. SelectedText.TextSize = 20.000
  167.  
  168. MainFrame3.Name = "MainFrame3"
  169. MainFrame3.Parent = MainFramesList
  170. MainFrame3.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  171. MainFrame3.BackgroundTransparency = 1.000
  172. MainFrame3.BorderSizePixel = 0
  173. MainFrame3.Position = UDim2.new(-0.000522345304, 0, 0.000597521663, 0)
  174. MainFrame3.Size = UDim2.new(0, 407, 0, 264)
  175. MainFrame3.Visible = false
  176.  
  177. InfiniteHealthFrame.Name = "InfiniteHealthFrame"
  178. InfiniteHealthFrame.Parent = MainFrame3
  179. InfiniteHealthFrame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
  180. InfiniteHealthFrame.Position = UDim2.new(0.208257198, 0, 0.132322341, 0)
  181. InfiniteHealthFrame.Size = UDim2.new(0, 54, 0, 27)
  182.  
  183. InfiniteHealthButton.Name = "InfiniteHealthButton"
  184. InfiniteHealthButton.Parent = InfiniteHealthFrame
  185. InfiniteHealthButton.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
  186. InfiniteHealthButton.Size = UDim2.new(0, 27, 0, 27)
  187. InfiniteHealthButton.Font = Enum.Font.SourceSans
  188. InfiniteHealthButton.Text = ""
  189. InfiniteHealthButton.TextColor3 = Color3.fromRGB(0, 0, 0)
  190. InfiniteHealthButton.TextSize = 14.000
  191.  
  192. UICorner.CornerRadius = UDim.new(8, 0)
  193. UICorner.Parent = InfiniteHealthButton
  194.  
  195. UICorner_2.CornerRadius = UDim.new(8, 0)
  196. UICorner_2.Parent = InfiniteHealthFrame
  197.  
  198. Text1.Name = "Text1"
  199. Text1.Parent = MainFrame3
  200. Text1.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  201. Text1.BackgroundTransparency = 1.000
  202. Text1.Position = UDim2.new(0.339066356, 0, 0.0871212184, 0)
  203. Text1.Size = UDim2.new(0, 137, 0, 50)
  204. Text1.Font = Enum.Font.Arial
  205. Text1.Text = "Infinite Health"
  206. Text1.TextColor3 = Color3.fromRGB(255, 255, 255)
  207. Text1.TextSize = 20.000
  208.  
  209. MainFrame0.Name = "MainFrame0"
  210. MainFrame0.Parent = MainFramesList
  211. MainFrame0.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  212. MainFrame0.Size = UDim2.new(0, 100, 0, 100)
  213. MainFrame0.Visible = false
  214.  
  215. SideButtons.Name = "SideButtons"
  216. SideButtons.Parent = BackgroundFrame
  217. SideButtons.Active = true
  218. SideButtons.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
  219. SideButtons.BorderSizePixel = 0
  220. SideButtons.Position = UDim2.new(0, 0, 0.152112678, 0)
  221. SideButtons.Size = UDim2.new(0, 141, 0, 301)
  222. SideButtons.CanvasSize = UDim2.new(0, 0, 5, 0)
  223.  
  224. ListButton1.Name = "ListButton1"
  225. ListButton1.Parent = SideButtons
  226. ListButton1.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
  227. ListButton1.BorderSizePixel = 0
  228. ListButton1.Size = UDim2.new(0, 141, 0, 50)
  229. ListButton1.Font = Enum.Font.Arial
  230. ListButton1.Text = "Auto Farm"
  231. ListButton1.TextColor3 = Color3.fromRGB(255, 255, 255)
  232. ListButton1.TextSize = 14.000
  233.  
  234. ListButton2.Name = "ListButton2"
  235. ListButton2.Parent = SideButtons
  236. ListButton2.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
  237. ListButton2.BorderSizePixel = 0
  238. ListButton2.Position = UDim2.new(0, 0, 0.0338028185, 0)
  239. ListButton2.Size = UDim2.new(0, 141, 0, 50)
  240. ListButton2.Font = Enum.Font.Arial
  241. ListButton2.Text = "Teleport"
  242. ListButton2.TextColor3 = Color3.fromRGB(255, 255, 255)
  243. ListButton2.TextSize = 14.000
  244.  
  245. ListButton3.Name = "ListButton3"
  246. ListButton3.Parent = SideButtons
  247. ListButton3.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
  248. ListButton3.BorderSizePixel = 0
  249. ListButton3.Position = UDim2.new(0, 0, 0.0338028185, 0)
  250. ListButton3.Size = UDim2.new(0, 141, 0, 50)
  251. ListButton3.Font = Enum.Font.Arial
  252. ListButton3.Text = "Gravity Chamber Exploits"
  253. ListButton3.TextColor3 = Color3.fromRGB(255, 255, 255)
  254. ListButton3.TextSize = 14.000
  255. ListButton3.TextWrapped = true
  256.  
  257. UIGridLayout_3.Parent = SideButtons
  258. UIGridLayout_3.SortOrder = Enum.SortOrder.LayoutOrder
  259. UIGridLayout_3.CellSize = UDim2.new(0, 141, 0, 50)
  260.  
  261. ExitButton.Name = "ExitButton"
  262. ExitButton.Parent = BackgroundFrame
  263. ExitButton.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
  264. ExitButton.BorderSizePixel = 0
  265. ExitButton.Position = UDim2.new(0.899817824, 0, 0, 0)
  266. ExitButton.Size = UDim2.new(0, 54, 0, 54)
  267. ExitButton.Font = Enum.Font.Arial
  268. ExitButton.Text = "X"
  269. ExitButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  270. ExitButton.TextScaled = true
  271. ExitButton.TextSize = 14.000
  272. ExitButton.TextWrapped = true
  273.  
  274. MinimizeButton.Name = "MinimizeButton"
  275. MinimizeButton.Parent = BackgroundFrame
  276. MinimizeButton.BackgroundColor3 = Color3.fromRGB(25, 25, 25)
  277. MinimizeButton.BorderSizePixel = 0
  278. MinimizeButton.Position = UDim2.new(0.801999986, 0, 0, 0)
  279. MinimizeButton.Size = UDim2.new(0, 54, 0, 54)
  280. MinimizeButton.Font = Enum.Font.Arial
  281. MinimizeButton.Text = "-"
  282. MinimizeButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  283. MinimizeButton.TextScaled = true
  284. MinimizeButton.TextSize = 100.000
  285. MinimizeButton.TextWrapped = true
  286.  
  287.  
  288. -- Variables
  289. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  290. local TeleportService = game:GetService("TeleportService")
  291. local TweenService = game:GetService("TweenService")
  292.  
  293. local remotes = ReplicatedStorage.Remotes
  294. local player = game.Players.LocalPlayer
  295. local character = player.Character
  296. local humanoidRootPart = character.HumanoidRootPart
  297. local humanoid = character.Humanoid
  298.  
  299. local plrMaxHealth, plrHealth = humanoid.MaxHealth, humanoid.Health
  300. local yOffset = 0.0175
  301. local visible = true
  302. local hitSpeed = 0
  303. local hits = 10
  304.  
  305. local gameIds = {
  306.     [1] = 5798060869, -- Gravity Chamber
  307.     [2] = 4263492467, -- Other World
  308.     [3] = 298400657, -- Earth
  309.     [4] = 0
  310. }
  311.  
  312. local texts = {
  313.     [1] = "Gravity Chamber",
  314.     [2] = "Other World",
  315.     [3] = "Earth",
  316.     [4] = "Hyperbolic Time Chamber"
  317. }
  318.  
  319. local tpButtons = {}
  320.  
  321. local buttons = SideButtons:GetChildren()
  322. local frames = MainFramesList:GetChildren()
  323.  
  324. _G.autoFarm = false
  325. _G.mobToFarm = ""
  326.  
  327. _G.gcInfiniteHealth = false
  328.  
  329. _G.gameId = 0
  330.  
  331.  
  332. -- Functions
  333. function switchButton(bool, button)
  334.     info = TweenInfo.new(
  335.         0.5,
  336.         Enum.EasingStyle.Sine,
  337.         Enum.EasingDirection.Out,
  338.         0,
  339.         false,
  340.         0
  341.     )
  342.  
  343.     if bool then
  344.         local properties = {
  345.             Position = UDim2.new(0.5,0,0,0),
  346.             BackgroundColor3 = Color3.fromRGB(0,255,0)
  347.         }
  348.        
  349.         local tween = TweenService:Create(button, info, properties)
  350.         tween:Play()
  351.     else
  352.         local properties = {
  353.             Position = UDim2.new(0,0,0,0),
  354.             BackgroundColor3 = Color3.fromRGB(255,0,0)
  355.         }
  356.  
  357.         local tween = TweenService:Create(button, info, properties)
  358.         tween:Play()
  359.     end
  360. end
  361.  
  362. function getMobs() -- Returns array of mobs in game
  363.     local list = {}
  364.     for i, mob in pairs(workspace:GetChildren()) do
  365.         if mob:FindFirstChild("Humanoid") and not game.Players:FindFirstChild(mob.Name) then
  366.             table.insert(list,mob.Name)
  367.         end
  368.     end
  369.     return list
  370. end
  371.  
  372. function createButtons() -- Create buttons
  373.     for i = 0, #getMobs()-1 do
  374.         local button = Instance.new("TextButton", ScrollingFrame)
  375.         button.Name = getMobs()[i+1].."Button"
  376.         button.Text = getMobs()[i+1]
  377.         button.BackgroundColor3 = Color3.fromRGB(80, 80, 80)
  378.         button.TextColor3 = Color3.fromRGB(255, 255, 255)
  379.         button.TextScaled = true
  380.         button.Font = Enum.Font.Arial
  381.     end
  382. end
  383.  
  384. function createTpButtons()
  385.     for i = 0, #texts-1 do
  386.         local button = Instance.new("TextButton", ScrollingFrame2)
  387.         button.Name = texts[i+1].."Button"
  388.         button.Text = texts[i+1]
  389.         button.BackgroundColor3 = Color3.fromRGB(80, 80, 80)
  390.         button.TextColor3 = Color3.fromRGB(255, 255, 255)
  391.         button.TextScaled = true
  392.         button.Font = Enum.Font.Arial
  393.         table.insert(tpButtons, button)
  394.     end
  395. end
  396.  
  397. function tpButtonsClicked()
  398.     for i, button in pairs(tpButtons) do
  399.         button.MouseButton1Click:Connect(function()
  400.             _G.gameId = gameIds[i]
  401.             SelectedText.Text = "Selected: "..texts[i]
  402.         end)
  403.     end
  404. end
  405.  
  406. function farm() -- Farm Function
  407.     for _, mob in pairs(workspace:GetChildren()) do
  408.         if mob:FindFirstChild("Humanoid") and mob.Humanoid.Health > 0 then
  409.             if mob.Name == _G.mobToFarm then
  410.                 while true do
  411.                     if _G.autoFarm == false or mob.Humanoid.Health <= 0 then
  412.                         break
  413.                     end
  414.                     humanoidRootPart.CFrame = mob.HumanoidRootPart.CFrame - mob.HumanoidRootPart.CFrame.LookVector*5
  415.                    
  416.                     local args = {
  417.                         ["HitTime"] = hitSpeed,
  418.                         ["Type"] = "Normal",
  419.                         ["HitEffect"] = game.ReplicatedStorage.Resources.OtherEffects.NormalHitEffect2,
  420.                         ["VictimCFrame"] = mob.HumanoidRootPart.CFrame,
  421.                         ["HurtAnimation"] = game.ReplicatedStorage.Resources.Animations.HurtAnimations.Hurt1,
  422.                         ["Velocity"] = Vector3.new(1,1,1),
  423.                         ["Sound"] = game.ReplicatedStorage.Resources.Sounds.Combat.NormalPunching,
  424.                         ["Damage"] = 1
  425.                     }
  426.                     remotes.Damage4:InvokeServer(mob,args)
  427.                 end
  428.                 wait()
  429.             end
  430.         end
  431.     end
  432. end
  433.  
  434. function sideButtonsClicked()
  435.     for i, button in pairs(buttons) do
  436.         if button:IsA("TextButton") then
  437.             button.MouseButton1Down:Connect(function()
  438.                 for i,v in pairs(frames) do
  439.                     if v:IsA("Frame") then
  440.                         v.Visible = false
  441.                     end
  442.                 end
  443.                 frames[i].Visible = true
  444.             end)
  445.         end
  446.     end
  447. end
  448.  
  449. function infiniteHealthButtonClicked()
  450.     _G.gcInfiniteHealth = not _G.gcInfiniteHealth
  451.     switchButton(_G.gcInfiniteHealth, InfiniteHealthButton)
  452.  
  453.     local plrNewHealth = _G.gcInfiniteHealth and math.huge or plrHealth
  454.  
  455.     if game.PlaceId == gameIds[1] then
  456.         humanoid.MaxHealth = plrNewHealth
  457.         humanoid.Health = plrNewHealth
  458.     else
  459.         print("only works in gc")
  460.     end
  461. end
  462.  
  463. function exitButtonClicked()
  464.     _G.autoFarm = false
  465.     DBFRAutoFarmAndTeleportGui:Destroy()
  466. end
  467.  
  468. function minimizeButtonClicked()
  469.     visible = not visible
  470.     for _, ui in pairs(DBFRAutoFarmAndTeleportGui:GetDescendants()) do
  471.         if ui ~= BackgroundFrame then
  472.             if not ui:IsA("UICorner") then
  473.                 if not ui:IsA("UIGridLayout") then
  474.                     ui.Visible = visible
  475.                 end
  476.             end
  477.         else
  478.             if visible then
  479.                 ui.BackgroundTransparency = 0
  480.                 MinimizeButton.Text = "-"
  481.             else
  482.                 ui.BackgroundTransparency = 1
  483.                 MinimizeButton.Text = "+"
  484.             end
  485.         end
  486.  
  487.         if ui == ExitButton or ui == MinimizeButton then
  488.             ui.Visible = true
  489.         end
  490.     end
  491.  
  492.     for _, frame in pairs(frames) do
  493.         frame.Visible = false
  494.     end
  495. end
  496.  
  497. function startButtonClicked()
  498.     _G.autoFarm = not _G.autoFarm
  499.     if _G.autoFarm == false then
  500.         StartButton.Text = "Start"
  501.     else
  502.         StartButton.Text = "Stop"
  503.     end
  504. end
  505.  
  506. function teleportButtonClicked()
  507.     TeleportService:Teleport(_G.gameId, player)
  508.     print("teleporting "..player.Name)
  509. end
  510.  
  511. spawn(function() -- Mob Buttons On Click
  512.     while wait() do
  513.         for _, button in pairs(ScrollingFrame:GetChildren()) do
  514.             if button:IsA("TextButton") then
  515.                 button.MouseButton1Down:Connect(function()
  516.                     _G.mobToFarm = button.Text
  517.                 end)
  518.             end
  519.         end
  520.     end
  521. end)
  522.  
  523. for i = 1, hits do -- Auto Farm
  524.     spawn(function()
  525.         while wait() do
  526.             if _G.autoFarm then
  527.                 farm()
  528.             end
  529.         end
  530.     end)
  531. end
  532.  
  533.  
  534. -- Call Functions
  535. createButtons()
  536. createTpButtons()
  537. tpButtonsClicked()
  538. sideButtonsClicked()
  539. StartButton.MouseButton1Down:Connect(startButtonClicked)
  540. ExitButton.MouseButton1Down:Connect(exitButtonClicked)
  541. MinimizeButton.MouseButton1Down:Connect(minimizeButtonClicked)
  542. InfiniteHealthButton.MouseButton1Down:Connect(infiniteHealthButtonClicked)
  543. TeleportButton.MouseButton1Down:Connect(teleportButtonClicked)
Add Comment
Please, Sign In to add comment