local quest_boy = game:GetService("Workspace").DialogNPCs["grown up boy"].HumanoidRootPart local Player = game:GetService('Players').LocalPlayer local Character = Player.Character local offset = 0 local function move_to(Instance) local Player = game.Players.LocalPlayer local Character = Player.Character Character:MoveTo(Instance.Position) end local function has_quest() local mission = game:GetService("Players").LocalPlayer.PlayerGui:FindFirstChild('Quest') if mission then --print(tostring(mission.quest.Value):find('fiends'),tonumber(mission.max.Value) < 3 ) if tostring(mission.quest.Value):find('fiends') and tonumber(mission.progress.Value) < 3 then return true elseif tonumber(mission.progress.Value) >= 3 then local repeat_mission = game:GetService("Players").LocalPlayer.PlayerGui.Quest:FindFirstChild('Completed') if repeat_mission then wait(1) local repeat_mission_ap = game:GetService("Players").LocalPlayer.PlayerGui.Quest.Completed.Yes.AbsolutePosition mousemoveabs(repeat_mission_ap.X+500+offset,repeat_mission_ap.Y+500) offset = offset + 2 mouse1click() end if tostring(mission.quest.Value):find('Kill fiends') and tonumber(mission.max.Value) < 3 then return true end else return false end end end local function accept_quest() local pos,onscreen = game.workspace.Camera:WorldToViewportPoint(quest_boy.Position) local dialog = game:GetService("Players").LocalPlayer.PlayerGui:FindFirstChild('dialogGUI') if onscreen and not dialog then print('Pressing key') keypress(0x45) wait() keyrelease(0x45) elseif onscreen and dialog then wait(1) local dialog_ap = game:GetService("Players").LocalPlayer.PlayerGui.dialogGUI.f.sf.option.text.AbsolutePosition mousemoveabs(dialog_ap.X+500+offset,dialog_ap.Y+500) offset = offset + 2 mouse1click() end end local function closest_npc() local npcs_folder = game:GetService("Workspace").Living local largest = math.huge for i,v in pairs(npcs_folder:GetChildren())do if v.Name:find('Fiend') and v:FindFirstChild('HumanoidRootPart') and v:FindFirstChild('Humanoid').Health > 0 then local magnitude = (Character.HumanoidRootPart.Position - v.HumanoidRootPart.Position).magnitude if magnitude < largest then return v end end end end local function start_killing() local Player = game:GetService('Players').LocalPlayer local Character = Player.Character local current_npc = closest_npc() repeat wait(0.25) until Player and Character and Character:FindFirstChild('HumanoidRootPart') and current_npc local magnitude = (Character.HumanoidRootPart.Position - current_npc.HumanoidRootPart.Position).magnitude if magnitude > 30 then move_to(closest_npc():FindFirstChild('HumanoidRootPart')) else Character.HumanoidRootPart.Anchored = true Character.HumanoidRootPart.CFrame = closest_npc():FindFirstChild('HumanoidRootPart').CFrame - closest_npc():FindFirstChild('HumanoidRootPart').CFrame.lookVector * 8 Character.HumanoidRootPart.Anchored = false game:GetService("ReplicatedStorage").events.remote:FireServer("NormalAttack"); end end _G.toggle = true while _G.toggle do local quest_boy = game:GetService("Workspace").DialogNPCs["grown up boy"].HumanoidRootPart local Player = game:GetService('Players').LocalPlayer local Character = Player.Character repeat wait(0.25) until Player and Character and Character:FindFirstChild('HumanoidRootPart') local magnitude = (quest_boy.Position - Character.HumanoidRootPart.Position).magnitude if magnitude > 10 and not has_quest() then move_to(quest_boy) workspace.CurrentCamera.CFrame = CFrame.new(workspace.CurrentCamera.CFrame.Position,quest_boy.Position) elseif Character and magnitude <= 10 and not has_quest() then accept_quest() elseif Character and has_quest() then offset = 0 repeat wait() start_killing() until not has_quest() end wait(0.75) end Character.HumanoidRootPart.Anchored = false