Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local YunosSBO2GUIFixedbyLeviTheOtakuLeakedbysmgoro = Instance.new("ScreenGui")
- local MainFrame = Instance.new("Frame")
- local AutoFarm = Instance.new("TextButton")
- local AutoBuy = Instance.new("TextButton")
- local ItemAmount = Instance.new("TextBox")
- local ItemName = Instance.new("TextBox")
- local MobName = Instance.new("TextBox")
- YunosSBO2GUIFixedbyLeviTheOtakuLeakedbysmgoro.Name = "Yuno's SBO2 GUI - Fixed by LeviTheOtaku - Leaked by smgoro"
- YunosSBO2GUIFixedbyLeviTheOtakuLeakedbysmgoro.Parent = game.CoreGui
- MainFrame.Name = "MainFrame"
- MainFrame.Parent = YunosSBO2GUIFixedbyLeviTheOtakuLeakedbysmgoro
- MainFrame.Active = true
- MainFrame.BackgroundColor3 = Color3.new(1, 1, 1)
- MainFrame.Draggable = true
- MainFrame.Position = UDim2.new(0.796473145, 0, 0.880195618, 0)
- MainFrame.Size = UDim2.new(0, 256, 0, 80)
- AutoFarm.Name = "AutoFarm"
- AutoFarm.Parent = MainFrame
- AutoFarm.BackgroundColor3 = Color3.new(1, 1, 1)
- AutoFarm.Position = UDim2.new(0.515625, 0, 0.550000012, 0)
- AutoFarm.Size = UDim2.new(0.484375, 0, 0.449999988, 0)
- AutoFarm.Font = Enum.Font.SourceSans
- AutoFarm.FontSize = Enum.FontSize.Size14
- AutoFarm.Text = "AutoFarm"
- AutoFarm.TextScaled = true
- AutoFarm.TextSize = 14
- AutoFarm.TextWrapped = true
- AutoBuy.Name = "AutoBuy"
- AutoBuy.Parent = MainFrame
- AutoBuy.BackgroundColor3 = Color3.new(1, 1, 1)
- AutoBuy.Position = UDim2.new(0.800000012, 0, 0, 0)
- AutoBuy.Size = UDim2.new(0.200000003, 0, 0.449999988, 0)
- AutoBuy.Font = Enum.Font.SourceSans
- AutoBuy.FontSize = Enum.FontSize.Size14
- AutoBuy.Text = "AutoBuy"
- AutoBuy.TextSize = 14
- AutoBuy.TextWrapped = true
- ItemAmount.Name = "ItemAmount"
- ItemAmount.Parent = MainFrame
- ItemAmount.BackgroundColor3 = Color3.new(1, 1, 1)
- ItemAmount.Position = UDim2.new(0.513671875, 0, 1.49011612e-08, 0)
- ItemAmount.Size = UDim2.new(0.200000003, 0, 0.449999988, 0)
- ItemAmount.Font = Enum.Font.SourceSans
- ItemAmount.FontSize = Enum.FontSize.Size14
- ItemAmount.Text = "Item Amount"
- ItemAmount.TextScaled = true
- ItemAmount.TextSize = 14
- ItemAmount.TextWrapped = true
- ItemName.Name = "ItemName"
- ItemName.Parent = MainFrame
- ItemName.BackgroundColor3 = Color3.new(1, 1, 1)
- ItemName.Size = UDim2.new(0.449999988, 0, 0.449999988, 0)
- ItemName.Font = Enum.Font.SourceSans
- ItemName.FontSize = Enum.FontSize.Size14
- ItemName.Text = "Item Name"
- ItemName.TextScaled = true
- ItemName.TextSize = 14
- ItemName.TextWrapped = true
- MobName.Name = "MobName"
- MobName.Parent = MainFrame
- MobName.BackgroundColor3 = Color3.new(1, 1, 1)
- MobName.Position = UDim2.new(0, 0, 0.550000012, 0)
- MobName.Size = UDim2.new(0.449999988, 0, 0.449999988, 0)
- MobName.Font = Enum.Font.SourceSans
- MobName.FontSize = Enum.FontSize.Size14
- MobName.Text = "Mob Name"
- MobName.TextScaled = true
- MobName.TextSize = 14
- MobName.TextWrapped = true
- local pageNumber = 1
- local farming = false
- local autobuying = false
- local function farm()
- local bossname = MobName.Text
- local function safetyCheck()
- for _,v in pairs(workspace.Mobs:GetChildren()) do
- if not v:FindFirstChild("HumanoidRootPart") then
- v:Destroy()
- end
- end
- end safetyCheck()
- function _G.getCombatKey()
- do
- if #_G.cKeys > 0 then
- newKey = _G.cKeys[#_G.cKeys]
- table.remove(_G.cKeys, #_G.cKeys)
- if #_G.cKeys < 15 then
- spawn(refillCKeys)
- end
- return newKey
- end
- return -1
- end
- end
- function refillCKeys()
- repeat
- wait()
- until _G.rpcKey
- newKey = nil
- if #_G.cKeys > 0 then
- newKey = _G.cKeys[#_G.cKeys]
- table.remove(_G.cKeys, #_G.cKeys)
- else
- newKey = "00"
- end
- local new = game.ReplicatedStorage.Function:InvokeServer("Combat", _G.rpcKey, {"RefillKeys", newKey})
- for i,v in ipairs(new) do
- table.insert(_G.cKeys, v)
- end
- end
- _G.bossSpawned = false
- workspace.Mobs.ChildAdded:connect(function(boss)
- if boss.Name == bossname then
- _G.bossSpawned = true
- end
- end)
- game:GetService'RunService'.RenderStepped:connect(function()
- if game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character.Parent then
- if not game.Players.LocalPlayer.Character:FindFirstChild("IgnoreTeleport") then
- local ff = Instance.new("IntValue", game.Players.LocalPlayer.Character)
- ff.Name = "IgnoreTeleport"
- end
- end
- end)
- while wait() do
- for _,v in pairs(workspace.Mobs:GetChildren()) do
- if _G.bossSpawned == false then
- while wait(0.1) do
- if v:FindFirstChild("HumanoidRootPart") and v:FindFirstChild("Entity").Health.Value > 0 then
- if game.Players.LocalPlayer.Character and game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart") and v:FindFirstChild("HumanoidRootPart") then
- local oldHealth = v.Entity.Health.Value
- game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart").CFrame = CFrame.new(v.HumanoidRootPart.Position + Vector3.new(0,20,0))
- game.ReplicatedStorage.Event:FireServer("Combat", _G.rpcKey, {"Attack", nil, v, _G.getCombatKey()})
- else
- break
- end
- else
- break
- end
- end
- v:Destroy()
- else
- local boss = workspace.Mobs[bossname]
- while wait(0.1) do
- if boss:FindFirstChild("Entity") and boss.Entity.Health.Value > 1 then
- if workspace:FindFirstChild(game.Players.LocalPlayer.Name) and game.Players.LocalPlayer.Character:FindFirstChild("HumanoidRootPart") and boss:FindFirstChild("HumanoidRootPart") then
- local oldHealth = boss.Entity.Health.Value
- workspace:FindFirstChild(game.Players.LocalPlayer.Name):FindFirstChild("HumanoidRootPart").CFrame = CFrame.new(boss.HumanoidRootPart.Position + Vector3.new(0,20,0))
- game.ReplicatedStorage.Event:FireServer("Combat", _G.rpcKey, {"Attack", nil, boss, _G.getCombatKey()})
- else
- break
- end
- else
- break
- end
- end
- _G.bossSpawned = false
- boss:Destroy()
- end
- end
- end
- end
- local function autoBuy(item, amount, shop)
- for _,v in pairs(workspace:GetChildren()) do
- if v.Name == "Model" then
- if v.Name == "Beginner Shop Clerk" then
- local shop = v.Head.ShopDialog.Shop
- end
- end
- end
- if shop and shop:FindFirstChild(item) then
- print("AutoBuy is purchasing "..item.. " "..amount.." times")
- for i=1,amount, 1 do
- wait(0.1)
- game.ReplicatedStorage.Function:InvokeServer("Shop", {"BuyItem", shop, shop:FindFirstChild(item)})
- end
- else
- end
- autobuying = false
- end
- AutoFarm.MouseButton1Click:connect(function()
- if not farming then
- farming = true
- farm()
- else
- end
- end)
- AutoBuy.MouseButton1Click:connect(function()
- if not autobuying then
- autobuying = true
- autoBuy(ItemName.Text, ItemAmount.Text, nil)
- else
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement