forked from MirayXS/DarkHub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLiterallyFNF
78 lines (76 loc) · 4.78 KB
/
LiterallyFNF
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
74
75
76
77
78
Client = {
Toggles = {
AutoPlayer = false
}
}
local lib = loadstring(game:HttpGet("https://raw.githubusercontent.com/RandomAdamYT/DarkHub/master/NewUI"))();main = lib:Window();
MainW = main:Tab('AutoFarm')
MainW:Toggle('Auto Play',function(state)
Client.Toggles.AutoPlayer = state
end)
local IncomingArrows = game:GetService("Players").LocalPlayer.PlayerGui.FNF.LocalScript.Parent.Screen.UI.Arrows.IncomingArrows;
local getnearestarrow = getsenv(game:GetService("Players").LocalPlayer.PlayerGui.FNF.LocalScript).getnearestarrow
game:GetService('RunService').RenderStepped:Connect(function()
if Client.Toggles.AutoPlayer then
if getnearestarrow("Left", IncomingArrows:GetChildren(), IncomingArrows) ~= nil then
local Arrow = getnearestarrow("Left", IncomingArrows:GetChildren(), IncomingArrows):FindFirstChildWhichIsA("Frame")
if Arrow.Sus.Size.Y.Scale > 0 then
if IncomingArrows.Parent.Left.AbsolutePosition.Y - Arrow:FindFirstChild('Sus').End.AbsolutePosition.Y > -40 then
game:GetService('VirtualInputManager'):SendKeyEvent(false, Enum.KeyCode.A, false,nil)
else
game:GetService('VirtualInputManager'):SendKeyEvent(true, Enum.KeyCode.A, false,nil)
end
return
end
if IncomingArrows.Parent.Left.AbsolutePosition.Y - Arrow:FindFirstChildWhichIsA('ImageLabel').AbsolutePosition.Y > -5 then
game:GetService('VirtualInputManager'):SendKeyEvent(true, Enum.KeyCode.A, false,nil)
game:GetService('VirtualInputManager'):SendKeyEvent(false, Enum.KeyCode.A, false,nil)
end
end
if getnearestarrow("Up", IncomingArrows:GetChildren(), IncomingArrows) ~= nil then
local Arrow = getnearestarrow("Up", IncomingArrows:GetChildren(), IncomingArrows):FindFirstChildWhichIsA("Frame")
if Arrow.Sus.Size.Y.Scale > 0 then
if IncomingArrows.Parent.Up.AbsolutePosition.Y - Arrow:FindFirstChild('Sus').End.AbsolutePosition.Y > -40 then
game:GetService('VirtualInputManager'):SendKeyEvent(false, Enum.KeyCode.W, false,nil)
else
game:GetService('VirtualInputManager'):SendKeyEvent(true, Enum.KeyCode.W, false,nil)
end
return
end
if IncomingArrows.Parent.Up.AbsolutePosition.Y - Arrow:FindFirstChildWhichIsA('ImageLabel').AbsolutePosition.Y > -5 then
game:GetService('VirtualInputManager'):SendKeyEvent(true, Enum.KeyCode.W, false,nil)
game:GetService('VirtualInputManager'):SendKeyEvent(false, Enum.KeyCode.W, false,nil)
end
end
if getnearestarrow("Right", IncomingArrows:GetChildren(), IncomingArrows) ~= nil then
local Arrow = getnearestarrow("Right", IncomingArrows:GetChildren(), IncomingArrows):FindFirstChildWhichIsA("Frame")
if Arrow.Sus.Size.Y.Scale > 0 then
if IncomingArrows.Parent.Right.AbsolutePosition.Y - Arrow:FindFirstChild('Sus').End.AbsolutePosition.Y > -40 then
game:GetService('VirtualInputManager'):SendKeyEvent(false, Enum.KeyCode.D, false,nil)
else
game:GetService('VirtualInputManager'):SendKeyEvent(true, Enum.KeyCode.D, false,nil)
end
return
end
if IncomingArrows.Parent.Right.AbsolutePosition.Y - Arrow:FindFirstChildWhichIsA('ImageLabel').AbsolutePosition.Y > -5 then
game:GetService('VirtualInputManager'):SendKeyEvent(true, Enum.KeyCode.D, false,nil)
game:GetService('VirtualInputManager'):SendKeyEvent(false, Enum.KeyCode.D, false,nil)
end
end
if getnearestarrow("Down", IncomingArrows:GetChildren(), IncomingArrows) ~= nil then
local Arrow = getnearestarrow("Down", IncomingArrows:GetChildren(), IncomingArrows):FindFirstChildWhichIsA("Frame")
if Arrow.Sus.Size.Y.Scale > 0 then
if IncomingArrows.Parent.Down.AbsolutePosition.Y - Arrow:FindFirstChild('Sus').End.AbsolutePosition.Y > -40 then
game:GetService('VirtualInputManager'):SendKeyEvent(false, Enum.KeyCode.S, false,nil)
else
game:GetService('VirtualInputManager'):SendKeyEvent(true, Enum.KeyCode.S, false,nil)
end
return
end
if IncomingArrows.Parent.Down.AbsolutePosition.Y - Arrow:FindFirstChildWhichIsA('ImageLabel').AbsolutePosition.Y > -5 then
game:GetService('VirtualInputManager'):SendKeyEvent(true, Enum.KeyCode.S, false,nil)
game:GetService('VirtualInputManager'):SendKeyEvent(false, Enum.KeyCode.S, false,nil)
end
end
end
end)