Advertisement
LeviTheOtaku

Yuno Gasai SBO2 GUI Fixed by me, Leaked by smgoro

Nov 25th, 2017
2,908
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.57 KB | None | 0 0
  1. local YunosSBO2GUIFixedbyLeviTheOtakuLeakedbysmgoro = Instance.new("ScreenGui")
  2. local MainFrame = Instance.new("Frame")
  3. local AutoFarm = Instance.new("TextButton")
  4. local AutoBuy = Instance.new("TextButton")
  5. local ItemAmount = Instance.new("TextBox")
  6. local ItemName = Instance.new("TextBox")
  7. local MobName = Instance.new("TextBox")
  8.  
  9. YunosSBO2GUIFixedbyLeviTheOtakuLeakedbysmgoro.Name = "Yuno's SBO2 GUI - Fixed by LeviTheOtaku - Leaked by smgoro"
  10. YunosSBO2GUIFixedbyLeviTheOtakuLeakedbysmgoro.Parent = game.CoreGui
  11.  
  12. MainFrame.Name = "MainFrame"
  13. MainFrame.Parent = YunosSBO2GUIFixedbyLeviTheOtakuLeakedbysmgoro
  14. MainFrame.Active = true
  15. MainFrame.BackgroundColor3 = Color3.new(1, 1, 1)
  16. MainFrame.Draggable = true
  17. MainFrame.Position = UDim2.new(0.796473145, 0, 0.880195618, 0)
  18. MainFrame.Size = UDim2.new(0, 256, 0, 80)
  19.  
  20. AutoFarm.Name = "AutoFarm"
  21. AutoFarm.Parent = MainFrame
  22. AutoFarm.BackgroundColor3 = Color3.new(1, 1, 1)
  23. AutoFarm.Position = UDim2.new(0.515625, 0, 0.550000012, 0)
  24. AutoFarm.Size = UDim2.new(0.484375, 0, 0.449999988, 0)
  25. AutoFarm.Font = Enum.Font.SourceSans
  26. AutoFarm.FontSize = Enum.FontSize.Size14
  27. AutoFarm.Text = "AutoFarm"
  28. AutoFarm.TextScaled = true
  29. AutoFarm.TextSize = 14
  30. AutoFarm.TextWrapped = true
  31.  
  32. AutoBuy.Name = "AutoBuy"
  33. AutoBuy.Parent = MainFrame
  34. AutoBuy.BackgroundColor3 = Color3.new(1, 1, 1)
  35. AutoBuy.Position = UDim2.new(0.800000012, 0, 0, 0)
  36. AutoBuy.Size = UDim2.new(0.200000003, 0, 0.449999988, 0)
  37. AutoBuy.Font = Enum.Font.SourceSans
  38. AutoBuy.FontSize = Enum.FontSize.Size14
  39. AutoBuy.Text = "AutoBuy"
  40. AutoBuy.TextSize = 14
  41. AutoBuy.TextWrapped = true
  42.  
  43. ItemAmount.Name = "ItemAmount"
  44. ItemAmount.Parent = MainFrame
  45. ItemAmount.BackgroundColor3 = Color3.new(1, 1, 1)
  46. ItemAmount.Position = UDim2.new(0.513671875, 0, 1.49011612e-08, 0)
  47. ItemAmount.Size = UDim2.new(0.200000003, 0, 0.449999988, 0)
  48. ItemAmount.Font = Enum.Font.SourceSans
  49. ItemAmount.FontSize = Enum.FontSize.Size14
  50. ItemAmount.Text = "Item Amount"
  51. ItemAmount.TextScaled = true
  52. ItemAmount.TextSize = 14
  53. ItemAmount.TextWrapped = true
  54.  
  55. ItemName.Name = "ItemName"
  56. ItemName.Parent = MainFrame
  57. ItemName.BackgroundColor3 = Color3.new(1, 1, 1)
  58. ItemName.Size = UDim2.new(0.449999988, 0, 0.449999988, 0)
  59. ItemName.Font = Enum.Font.SourceSans
  60. ItemName.FontSize = Enum.FontSize.Size14
  61. ItemName.Text = "Item Name"
  62. ItemName.TextScaled = true
  63. ItemName.TextSize = 14
  64. ItemName.TextWrapped = true
  65.  
  66. MobName.Name = "MobName"
  67. MobName.Parent = MainFrame
  68. MobName.BackgroundColor3 = Color3.new(1, 1, 1)
  69. MobName.Position = UDim2.new(0, 0, 0.550000012, 0)
  70. MobName.Size = UDim2.new(0.449999988, 0, 0.449999988, 0)
  71. MobName.Font = Enum.Font.SourceSans
  72. MobName.FontSize = Enum.FontSize.Size14
  73. MobName.Text = "Mob Name"
  74. MobName.TextScaled = true
  75. MobName.TextSize = 14
  76. MobName.TextWrapped = true
  77.  
  78. local pageNumber = 1
  79. local farming = false
  80. local autobuying = false
  81.  
  82. local function farm()
  83.     local bossname = MobName.Text
  84.     local function safetyCheck()
  85.         for _,v in pairs(workspace.Mobs:GetChildren()) do
  86.             if not v:FindFirstChild("HumanoidRootPart") then
  87.                 v:Destroy()
  88.             end
  89.         end
  90.     end safetyCheck()
  91.     function _G.getCombatKey()
  92.         do
  93.             if #_G.cKeys > 0 then
  94.                  newKey = _G.cKeys[#_G.cKeys]
  95.                 table.remove(_G.cKeys, #_G.cKeys)
  96.                 if #_G.cKeys < 15 then
  97.                     spawn(refillCKeys)
  98.                 end
  99.                 return newKey
  100.             end
  101.             return -1
  102.         end
  103.     end
  104.  
  105.     function refillCKeys()
  106.         repeat
  107.             wait()
  108.         until _G.rpcKey
  109.         newKey = nil
  110.         if #_G.cKeys > 0 then
  111.             newKey = _G.cKeys[#_G.cKeys]
  112.             table.remove(_G.cKeys, #_G.cKeys)
  113.         else
  114.             newKey = "00"
  115.         end
  116.         local new = game.ReplicatedStorage.Function:InvokeServer("Combat", _G.rpcKey, {"RefillKeys", newKey})
  117.         for i,v in ipairs(new) do
  118.             table.insert(_G.cKeys, v)
  119.         end
  120.     end
  121.  
  122.     _G.bossSpawned = false
  123.     workspace.Mobs.ChildAdded:connect(function(boss)
  124.         if boss.Name == bossname then
  125.             _G.bossSpawned = true
  126.         end
  127.     end)
  128.     game:GetService'RunService'.RenderStepped:connect(function()
  129.        if game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character.Parent then
  130.           if not game.Players.LocalPlayer.Character:FindFirstChild("IgnoreTeleport") then
  131.              local ff = Instance.new("IntValue", game.Players.LocalPlayer.Character)
  132.              ff.Name = "IgnoreTeleport"
  133.           end
  134.        end
  135.     end)
  136.     while wait() do
  137.         for _,v in pairs(workspace.Mobs:GetChildren()) do
  138.             if _G.bossSpawned == false then
  139.                 while wait(0.1) do
  140.                     if v:FindFirstChild("HumanoidRootPart") and v:FindFirstChild("Entity").Health.Value > 0 then
  141.                         if game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart") and v:FindFirstChild("HumanoidRootPart") then
  142.                             local oldHealth = v.Entity.Health.Value
  143.                             game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart").CFrame = CFrame.new(v.HumanoidRootPart.Position + Vector3.new(0,20,0))
  144.                             game.ReplicatedStorage.Event:FireServer("Combat", _G.rpcKey, {"Attack", nil, v, _G.getCombatKey()})
  145.                         else
  146.                             break
  147.                         end
  148.                     else
  149.                         break
  150.                     end
  151.                 end
  152.                 v:Destroy()
  153.             else
  154.                 local boss = workspace.Mobs[bossname]
  155.                 while wait(0.1) do
  156.                     if boss:FindFirstChild("Entity") and boss.Entity.Health.Value > 1 then
  157.                         if workspace:FindFirstChild(game.Players.LocalPlayer.Name) and game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart") and boss:FindFirstChild("HumanoidRootPart") then
  158.                             local oldHealth = boss.Entity.Health.Value
  159.                             workspace:FindFirstChild(game.Players.LocalPlayer.Name):FindFirstChild("HumanoidRootPart").CFrame = CFrame.new(boss.HumanoidRootPart.Position + Vector3.new(0,20,0))
  160.                             game.ReplicatedStorage.Event:FireServer("Combat", _G.rpcKey, {"Attack", nil, boss, _G.getCombatKey()})
  161.                         else
  162.                             break
  163.                         end
  164.                     else
  165.                         break
  166.                     end
  167.                 end
  168.                 _G.bossSpawned = false
  169.                 boss:Destroy()
  170.             end
  171.         end
  172.     end
  173. end
  174. local function autoBuy(item, amount, shop)
  175.     for _,v in pairs(workspace:GetChildren()) do
  176.         if v.Name == "Model" then
  177.             if v.Name == "Beginner Shop Clerk" then
  178.                 local shop = v.Head.ShopDialog.Shop
  179.             end
  180.         end
  181.     end
  182.     if shop and shop:FindFirstChild(item) then
  183.         print("AutoBuy is purchasing "..item.. " "..amount.." times")
  184.         for i=1,amount, 1 do
  185.             wait(0.1)
  186.             game.ReplicatedStorage.Function:InvokeServer("Shop", {"BuyItem", shop, shop:FindFirstChild(item)})
  187.         end
  188.     else
  189.     end
  190.     autobuying = false
  191. end
  192. AutoFarm.MouseButton1Click:connect(function()
  193.     if not farming then
  194.         farming = true
  195.         farm()
  196.     else
  197.     end
  198. end)
  199. AutoBuy.MouseButton1Click:connect(function()
  200.     if not autobuying then
  201.         autobuying = true
  202.         autoBuy(ItemName.Text, ItemAmount.Text, nil)
  203.     else
  204.     end
  205. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement