Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local players = game:GetService("Players");
- local player = players.LocalPlayer;
- local remote = game.ReplicatedStorage.RemoteEvent;
- local questsM = game.ReplicatedStorage.Modules.Quests;
- local Tween = game:GetService'TweenService';
- local spawns = workspace.Spawns;
- local questParts = workspace.QuestParts;
- local target = "Criminal"; --name mob(tên quái)
- local spawnsT = {};
- local quests = {};
- for i, v in next, require(questsM) do
- quests[v.Target] = i;
- end;
- for i, v in next, spawns:GetChildren() do
- if v.Name == target then
- table.insert(spawnsT, v);
- end;
- end;
- spawn(function()
- while wait() do
- remote:FireServer("Punch", "Right");
- end
- end)
- _G.autofarm = true
- while _G.autofarm do
- wait()
- if player.Character then
- for i, spawn in next, spawnsT do
- local npc = spawn:FindFirstChild(target);
- if npc then
- repeat wait(1)
- local char;
- if player.Character then
- char = player.Character;
- end
- if char and char:WaitForChild("HumanoidRootPart") and npc then
- Tween:Create(char.HumanoidRootPart, TweenInfo.new(1), {CFrame = npc.HumanoidRootPart.CFrame * CFrame.new(0, 0, 2)}):Play();
- end
- local questId = quests[target];
- if not player.PlayerGui.ScreenGui:WaitForChild("QuestBackground").Visible and questId then
- Tween:Create(char.HumanoidRootPart, TweenInfo.new(1), {CFrame = questParts["QuestPart"..questId].CFrame}):Play();
- wait(1);
- remote:FireServer("GetQuest", questId);
- end
- until not npc.Parent or npc.Humanoid.Health <= 0
- end;
- end;
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement