-- Wait Game Loaded pcall(function() local Selection = workspace:FindFirstChild("Model"):FindFirstChild("Selection") if game:GetService('Players').LocalPlayer.Team == nil and Selection then repeat task.wait() until #Selection:GetChildren() > 0 end end) local LoadedScriptStartTime = tick() local _env = getgenv() local _wait = task.wait -- GetService local Players = game:GetService('Players') local TweenService = game:GetService('TweenService') local ReplicatedStorage = game:GetService('ReplicatedStorage') local RunService = game:GetService('RunService') local VirtualInputManager = game:GetService('VirtualInputManager') local VirtualUser = game:GetService('VirtualUser') -- Player local Player = Players.LocalPlayer local PlayerGui = Player:WaitForChild('PlayerGui') -- MiscPath local TargetRemote = ReplicatedStorage:WaitForChild("BridgeNet2"):WaitForChild("dataRemoteEvent") local QuestPath = ReplicatedStorage:WaitForChild('Modules'):WaitForChild('Client'):WaitForChild('TalkNpc'):WaitForChild('Quests') local QuestRemotes = ReplicatedStorage:WaitForChild('Network') local RagdollPath = workspace:WaitForChild('IncludeToGame'):WaitForChild('Ragdoll') local MobsFolder = workspace:WaitForChild('AI/Player') local Model = workspace:FindFirstChild('Model') -- Anti-AFK Player.Idled:Connect(function() VirtualUser:CaptureController() VirtualUser:ClickButton2(Vector2.new()) end) -- Loaded Quest Data local Loaded, Funcs = {},{} do Loaded.Quest = {} Funcs.GetPlayerLevel = function(self) return Player.Data.Level.Value or 0 end Funcs.GetBestQuest = function(self) for _, Quest in ipairs(Loaded.Quest) do if Quest.LevelRequired <= Funcs.GetPlayerLevel() then return Quest end end end for _, v in next, QuestPath:GetChildren() do local Quest = v:FindFirstChild('Quest') if v.Name:match('QuestGiver') and Quest and Quest:IsA('ModuleScript') then local Success, MQuest = pcall(require, Quest) if Success and MQuest then table.insert(Loaded.Quest, { GiverName = MQuest.GiverName or v.Name, QuestInfo = MQuest.QuestInfo, Target = MQuest.Target, LevelRequired = MQuest.LevelRequired or 0 }) end end end table.sort(Loaded.Quest, function(a,b) return a.LevelRequired > b.LevelRequired end) end --===================================== -- Config --===================================== do _env.SaveSettingPath = Player.UserId -- Direction _env.Distance = 6 _env.Angles = 90 -- TweenProperty _env.TweenSpeed = 1000 _env.WarpDistance = 100 -- Ui library theme list _env.Theme = { 'Light', 'Dark', 'Purple', 'Green', 'Orange', 'Pink', 'Blue', 'Red', 'Neon' } end --===================================== -- Helpers function --===================================== function Error(msg) local info = debug.getinfo(2) local line = info and info.currentline or "Unknown" local source = info and info.source or "Unknown" print("[error] Line: " .. line .. " | Source: " .. source .. " | Message: " .. tostring(msg)) end function GetRootPart() local Character = Player.Character or Player.CharacterAdded:Wait() local HumanoidRootPart = Character:WaitForChild('HumanoidRootPart',5) return HumanoidRootPart end local function EnableNoclip(state) if state then if noclipLoop then return end noclipLoop = RunService.Stepped:Connect(function() local char = Player.Character local hrp = char and char:FindFirstChild('HumanoidRootPart') local hum = char and char:FindFirstChild('Humanoid') if char and hrp and hum then for _, part in ipairs(char:GetDescendants()) do if part:IsA("BasePart") and part.CanCollide then part.CanCollide = false end end if hum.MoveDirection.Magnitude > 0 then hrp.AssemblyAngularVelocity = Vector3.new(0, 0, 0) else hrp.AssemblyLinearVelocity = Vector3.new(0, 0, 0) hrp.AssemblyAngularVelocity = Vector3.new(0, 0, 0) end end end) else if noclipLoop then noclipLoop:Disconnect() noclipLoop = nil end end end function SelectTeam(TeamName) local Selection = Model:WaitForChild('Selection', 9e4) local TeamPart = Selection:WaitForChild(TeamName, 5) if TeamPart and TeamPart:FindFirstChild("ClickDetector") then _wait(0.5) print('Select Team '..TeamName) fireclickdetector(TeamPart.ClickDetector) end end --===================================== -- Quest Function --===================================== function IsQuest() return PlayerGui.HUD:FindFirstChild('Quest') end function RemoveQuest() if _env.QuestRemote then _env.QuestRemote:FireServer('RemoveQuest') _wait(.5) else local Quest = PlayerGui:FindFirstChild('Quest', 3) if Quest then local Close = Quest:WaitForChild('Close', 3) firesignal(Close.MouseButton1Click) _wait(.5) end end end function IsValidQuest(QuestInfo) local Quest = PlayerGui:FindFirstChild('Quest', 3) if Quest then local CurrentQuestInfo = Quest.QuestInfo.Text return CurrentQuestInfo == QuestInfo end end function TakeQuest(GiverName) local args = { "RequestQuest", ReplicatedStorage.Modules.Client.TalkNpc.Quests[GiverName].Quest } Tweento(workspace.TalkNpc.QuestGiver[GiverName].HumanoidRootPart.CFrame * CFrame.new(0, 0, 3) * CFrame.Angles(0, math.rad(180), 0)) if _env.QuestRemote then _env.QuestRemote:FireServer(unpack(args)) return end local Remotes = ReplicatedStorage.Network:GetChildren() for _, v in ipairs(Remotes) do if v:IsA("RemoteEvent") then v:FireServer(unpack(args)) print("BruteForce Remote " .. v.Name) _wait(0.5) if IsQuest() then _env.QuestRemote = v print("Found Remote " .. v.Name) return end end end end --===================================== -- Player Action --===================================== function PlayerClick() VirtualInputManager:SendMouseButtonEvent(0, 0, 0, true, game, 1) _wait(0.05) VirtualInputManager:SendMouseButtonEvent(0, 0, 0, false, game, 1) end function GetAttackRemote() if not _env.SavedArgs and not _env.AttackRemote then local mt = getrawmetatable(game) local old = mt.__namecall setreadonly(mt, false) mt.__namecall = newcclosure(function(self, ...) local args = {...} local method = getnamecallmethod() if self == TargetRemote and method == 'FireServer' and not _env.SavedArgs then if args[1] and args[1][1] and args[1][1][1] == 'NormalAttack' then _env.SavedArgs = args _env.AttackRemote = self print("Captured Args!") end end return old(self, ...) end) setreadonly(mt, true) print("Trigger click") _wait(.5) PlayerClick() local timeout = 0 repeat _wait(0.1); timeout = timeout + 0.1 until _env.SavedArgs or timeout > 5 end return _env.SavedArgs, _env.AttackRemote end function NormalAttack() local args, remote = GetAttackRemote() if args and remote then remote:FireServer(unpack(args)) end end function IsEquipWeapon() local HUD = PlayerGui:WaitForChild('HUD', 3) if not HUD then return false end return HUD.Container.Skills.Visible end function EquipWeapon() VirtualInputManager:SendKeyEvent(true, Enum.KeyCode.E, false, game) _wait() VirtualInputManager:SendKeyEvent(false, Enum.KeyCode.E, false, game) _wait(.5) end function Tweento(targetCFrame) local character = Player.Character or Player.CharacterAdded:Wait() local hrp = character:FindFirstChild("HumanoidRootPart") if not hrp then return end local warpDistance = _env.WarpDistance local speed = _env.TweenSpeed local minTweenTime = 0.1 local startPos = hrp.Position local endPos = targetCFrame.Position local distance = (endPos - startPos).Magnitude if distance <= warpDistance then hrp.CFrame = targetCFrame return end local direction = (endPos - startPos).Unit local preWarpPos = endPos - direction * warpDistance local preWarpCFrame = CFrame.new(preWarpPos, endPos) local tweenDistance = (preWarpPos - startPos).Magnitude local timeToTravel = math.max(tweenDistance / speed, minTweenTime) local tweenInfo = TweenInfo.new(timeToTravel, Enum.EasingStyle.Linear) local tween = TweenService:Create(hrp, tweenInfo, {CFrame = preWarpCFrame}) tween:Play() tween.Completed:Wait() hrp.CFrame = targetCFrame end --===================================== -- Kill Monster --===================================== -- Eat Monster By Name function EatMonster(name) _wait(.5) local RootPart = GetRootPart() for _, Mob in next,workspace.IncludeToGame.Ragdoll:GetChildren() do if Mob.PrimaryPart and Mob.Name == name then local Distance = (Mob.PrimaryPart.Position - RootPart.Position).Magnitude if Distance <= 40 then local ClickHitbox = Mob:FindFirstChild("ClickHitbox") local ClickDetector = ClickHitbox:FindFirstChildWhichIsA("ClickDetector") if ClickHitbox and ClickDetector then Mob.PrimaryPart.CFrame = RootPart.CFrame _wait(.3) fireclickdetector(ClickDetector) print("Eating: "..Mob.Name) _wait(2.5) end end end end end -- Get Close Distance Monster By Name function GetCloseMonster(name) local RootPart = GetRootPart() local CloseMonster = nil local BestDistance = math.huge for _, v in MobsFolder:GetChildren() do local MobsHumanoid = v:FindFirstChild("Humanoid") if v.Name == name and MobsHumanoid and MobsHumanoid.Health > 0 then local MobRootPart = v:FindFirstChild("HumanoidRootPart") or v.PrimaryPart if MobRootPart then local Distance = (RootPart.Position - MobRootPart.Position).Magnitude if Distance < BestDistance then BestDistance = Distance CloseMonster = v end end end end if CloseMonster and BestDistance then print("Found Close Monster: "..CloseMonster.Name.."|"..math.floor(BestDistance).." Stud") end return CloseMonster end -- Kill Monster By Name function KillMonster(name) local CloseMonster = GetCloseMonster(name) if not CloseMonster then return end local MobsHumanoid = CloseMonster:FindFirstChild("Humanoid") local MobsRootPart = CloseMonster:FindFirstChild("HumanoidRootPart") if not MobsRootPart and MobsHumanoid then return end while MobsHumanoid.Health > 0 and CloseMonster.Parent do -- Equip a weapon if none is equipped if not IsEquipWeapon() then EquipWeapon() end Tweento(MobsRootPart.CFrame * CFrame.new(0,-_env.Distance,-3) * CFrame.Angles(math.rad(_env.Angles),0,0)) local RootPart = GetRootPart() RootPart.AssemblyLinearVelocity = Vector3.zero RootPart.AssemblyAngularVelocity = Vector3.zero NormalAttack() _wait() end if _env.AutoEat then EatMonster(name) end end --===================================== -- FarmFunc --===================================== _env.FarmFuncs = { {"AutoFarmLevel", (function() while _env.AutoFarmLevel and _wait() do local BestQuest = Funcs:GetBestQuest() if BestQuest then if not IsQuest() then local GiverName = BestQuest.GiverName TakeQuest(GiverName) print("TakeQuest: "..GiverName) _wait(.5) else if not IsValidQuest(BestQuest.QuestInfo) then RemoveQuest() print("Reject Current Quest") return end for _, MonsterName in ipairs(BestQuest.Target) do -- if not found monster spawn wait until monster spawn -- ignore wait Athelie and Human respawn if not MobsFolder:FindFirstChild(MonsterName) then if not (MonsterName == 'Athlete' or MonsterName == 'Human') then local starttime = tick() repeat _wait() until MobsFolder:FindFirstChild(MonsterName) local endtime = starttime - tick() print("Wait: "..MonsterName.." Respawn " .. string.format("%.2f", -endtime) .. 'S') end end KillMonster(MonsterName) end end end end end)} } --===================================== -- Main Loop --===================================== if not _env.LoadedFarmFunc then _env.LoadedFarmFunc = true task.spawn(function() while _wait() do if not _env.LoadedData then repeat _wait() until _env.LoadedData end for _, func in ipairs(_env.FarmFuncs) do if _env[func[1]] then local s, r = xpcall(func[2],Error) if s and r then break end end end end end) end --===================================== -- Create Windows --===================================== local Library = loadstring(game:HttpGet("https://raw.githubusercontent.com/arsyny1x/replica-mac-ui/refs/heads/main/main.lua"))() local Window = Library.CreateWindow({ Title = "MacHub V2", Folder = "MacHub V2", AutoSaveSetting = true, Size = UDim2.fromOffset(650, 450), Position = UDim2.fromScale(0.5, 0.5), AnchorPoint = Vector2.new(0.5, 0.5), Theme = _env.Theme, -- Light, Dark, Purple ToggleKey = Enum.KeyCode.RightControl }) --===================================== -- Profile Tab --===================================== local ProfileTab = Window:CreateProfileTab({ Title = "Roblox ID", }) ProfileTab:Radio({ Title = "Select Team", Flag = "Select Team", Default = "GHOUL", Options = {"GHOUL", "CCG",}, Callback = function(v) _env.SelectTeam = v end }) ProfileTab:Toggle({ Title = "Auto Select Team", Flag = "Auto Select Team", Icon = "lucide:mouse-pointer-click", Callback = function(v) _env.AutoSelectTeam = v end }) -- Icon = "lucide:a-arrow-up" or Icon = "Solar:4-k-bold" -- Programmatically set value -- MyToggle:Set(true) --===================================== -- Main Tab --===================================== local MainTab = Window:CreateTab({ Title = "General", Icon = "lucide:menu" }) MainTab:SelectTab() local console = MainTab:Console({ Height = 100 }) local oldPrint oldPrint = hookfunction(print, function(...) oldPrint(...) local timeText = os.date("%H:%M:%S") local parts = {} for i, v in ipairs({...}) do parts[i] = tostring(v) end local message = table.concat(parts, " ") console:Log(timeText .. " " .. message, Color3.fromRGB(150, 150, 150)) end) -- Auto Farm Level Toggle local AutoFarmLevel = MainTab:Toggle({ Title = "Auto Farm Level", Flag = "Auto Farm Level", Icon = "lucide:arrow-big-up", }) AutoFarmLevel:OnChanged(function(v) EnableNoclip(v) _env.AutoFarmLevel = v end) -- Auto Eat Toggle local AutoEat = MainTab:Toggle({ Title = "Auto Eat", Flag = "Auto Eat", Icon = "lucide:utensils", }) AutoEat:OnChanged(function(v) _env['AutoEat'] = v end) --===================================== -- Setting Tab --===================================== local Setting = Window:CreateTab({ Title = "Setting", Icon = "lucide:cog" }) Setting:Slider({ Title = "Tween Speed", Flag = "TweenSpeed", Icon = "lucide:chevrons-up", Min = 50, Max = 1000, Default = _env.TweenSpeed, Callback = function(v) _env['TweenSpeed'] = v end }) Setting:Slider({ Title = "Warp Distance", Flag = "Warp Distance", Icon = "lucide:zap", Min = 10, Max = 200, Default = _env.WarpDistance, Callback = function(v) _env['WarpDistance'] = v end }) Setting:Section({ Title = "Direction Setting", Subtitle = "Adjust Attack Distance and Angle" }) Setting:Slider({ Title = "Distance", Flag = "Distance", Icon = "lucide:ruler", Min = 0, Max = 20, Default = _env.Distance, Callback = function(v) _env['Distance'] = v end }) Setting:Slider({ Title = "Angles", Flag = "Angles", Icon = "lucide:rotate-cw", Min = 0, Max = 180, Default = _env.Angles, Callback = function(v) _env['Angles'] = v end }) Setting:Section({ Title = "Set Theme", }) Setting:Dropdown({ Title = "Select Theme", Flag = "Select Theme", Icon = "lucide:palette", Values = _env.Theme, Value = "Light", Callback = function(v) Window:SetTheme(v) end }) --===================================== -- Load Config --===================================== local LoadedScriptEndTime = LoadedScriptStartTime - tick() print(string.format("Loaded Script In %.6fs",-LoadedScriptEndTime)) xpcall(function() local LoadedConfigStartTime = tick() task.spawn(function() Window:LoadConfig(_env.SaveSettingPath) end) local LoadedConfigEndTime = LoadedConfigStartTime - tick() print(string.format("Loaded Config In %.6fs",-LoadedConfigEndTime)) end,Error) while not Player:FindFirstChild("Data") do if _env.AutoSelectTeam then pcall(function() SelectTeam(_env.SelectTeam) end) end _wait(1) end repeat _wait() until not PlayerGui:FindFirstChild("Temp") task.delay(1,function() end) _env.LoadedData = true print("Data loaded")