-
Notifications
You must be signed in to change notification settings - Fork 0
/
Hub
73 lines (62 loc) · 1.9 KB
/
Hub
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
-- Orion Hub
local OrionLib = loadstring(game:HttpGet(('https://raw.githubusercontent.com/shlexware/Orion/main/source')))()
local Window = OrionLib:MakeWindow({Name = "@Pv3Moddz Hub", HidePremium = false, SaveConfig = false, ConfigFolder = "ScriptTest"})
-- Tween Teleport
local Tween = game:GetService('TweenService')
local TweenInfo = TweenInfo.new(1,Enum.EasingStyle.Linear)
-- Player Location
local lp = game.Players.LocalPlayer
-- variants
_AutoFarm = false
-- Get Mob
local function GetMob()
local dist, mob = math.huge
local hpr = lp.Character.HumanoidRootPart
for i,v in pairs(workspace.SpawnedEnemies:GetChildren()) do
if v:IsA('Model') and v:FindFirstChild('HumanoidRootPart') then
local mag = (hpr.Position - v.HumanoidRootPart.Position).magnitude
if mag < 100 and mag < dist then
dist = mag
mob = v
end
end
end
return mob
end
-- functions
function AutoFarm()
while _AutoFarm == true do
local hpr = lp.Character.HumanoidRootPart
local MobL = GetMob()
if MobL and MobL:FindFirstChild('HumanoidRootPart') then
hpr.CFrame = MobL.HumanoidRootPart.CFrame + Vector3.new(0, 5, 0)
end
wait()
end
end
function TweenTP(CFrameV)
if lp.Character and lp.Character:FindFirstChild('HumanoidRootPart') then
local hrp = lp.Character.HumanoidRootPart
local tween = Tween:Create(hrp,TweenInfo,{CFrame=CFrameV})
tween:Play()
--tween.Completed:Wait(1.0)
end
end
-- Tabs Hub
local Tab = Window:MakeTab({
Name = "Menu Hub",
Icon = "rbxassetid://4483345998",
PremiumOnly = false
})
local Section = Tab:AddSection({
Name = "SETTINGS"
})
Tab:AddToggle({
Name = "Auto Farm",
Default = false,
Callback = function(Value)
_AutoFarm = Value
AutoFarm()
end
})
OrionLib:Init()