Repository navigation
Expand file tree
/
Copy pathmain.lua
More file actions
251 lines (221 loc) · 11.1 KB
/
Copy pathmain.lua
File metadata and controls
251 lines (221 loc) · 11.1 KB
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
local Fluent = loadstring(game:HttpGet("https://github.com/dawid-scripts/Fluent/releases/latest/download/main.lua"))()
local SaveManager = loadstring(game:HttpGet("https://raw.githubusercontent.com/dawid-scripts/Fluent/master/Addons/SaveManager.lua"))()
local InterfaceManager = loadstring(game:HttpGet("https://raw.githubusercontent.com/dawid-scripts/Fluent/master/Addons/InterfaceManager.lua"))()
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local Camera = workspace.CurrentCamera
local LocalPlayer = Players.LocalPlayer
local UIS = game:GetService("UserInputService")
local AIMBOT = false
local ESP_BOX = false
local ESP_NAME = false
local ESP_LINE = false
local ESP_DISTANCE = false
local FOV_ON = false
local WALL_CHECK = false
local TEAM_CHECK = true
local TARGET_PART = "Head"
local TEAM_COLOR = Color3.fromRGB(0, 255, 0)
local ENEMY_COLOR = Color3.fromRGB(255, 0, 0)
local FOV_RADIUS = 120
local AIM_SMOOTHNESS = 0.25
local FOV = Drawing.new("Circle")
FOV.Visible = false
FOV.Radius = FOV_RADIUS
FOV.Thickness = 2
FOV.NumSides = 100
FOV.Filled = false
FOV.Color = Color3.fromRGB(255, 255, 255)
local Window = Fluent:CreateWindow({
Title = "Cynalez Hub",
SubTitle = "v1.0 - by dorpew",
TabWidth = 160,
Size = UDim2.fromOffset(580, 460),
Acrylic = false,
Theme = "Dark",
MinimizeKey = Enum.KeyCode.RightControl
})
local MobileGui = Instance.new("ScreenGui")
local ToggleButton = Instance.new("ImageButton")
local UICorner = Instance.new("UICorner")
MobileGui.Name = "Cynalez"
MobileGui.Parent = game:GetService("CoreGui")
MobileGui.ResetOnSpawn = false
ToggleButton.Name = "MainButton"
ToggleButton.Parent = MobileGui
ToggleButton.BackgroundColor3 = Color3.fromRGB(35, 35, 35)
ToggleButton.Position = UDim2.new(0.12, 0, 0.15, 0)
ToggleButton.Size = UDim2.new(0, 55, 0, 55)
ToggleButton.Image = "rbxassetid://76132619594102"
ToggleButton.Active = true
UICorner.CornerRadius = UDim.new(0, 12)
UICorner.Parent = ToggleButton
local dragging, dragStart, startPos
ToggleButton.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
dragging = true
dragStart = input.Position
startPos = ToggleButton.Position
end
end)
UIS.InputChanged:Connect(function(input)
if dragging and (input.UserInputType == Enum.UserInputType.MouseMovement or input.UserInputType == Enum.UserInputType.Touch) then
local delta = input.Position - dragStart
ToggleButton.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + delta.X, startPos.Y.Scale, startPos.Y.Offset + delta.Y)
end
end)
ToggleButton.InputEnded:Connect(function(input) dragging = false end)
ToggleButton.MouseButton1Click:Connect(function() Window:Minimize() end)
local function IsAlive(plr)
return plr and plr.Character and plr.Character:FindFirstChild("Humanoid") and plr.Character.Humanoid.Health > 0
end
local function IsVisible(targetPart)
if not WALL_CHECK then return true end
local origin = Camera.CFrame.Position
local destination = targetPart.Position
local direction = (destination - origin)
local raycastParams = RaycastParams.new()
raycastParams.FilterDescendantsInstances = {LocalPlayer.Character, targetPart.Parent}
raycastParams.FilterType = Enum.RaycastFilterType.Exclude
raycastParams.IgnoreWater = true
local result = workspace:Raycast(origin, direction, raycastParams)
return result == nil
end
local function GetClosestTarget()
local closest, dist = nil, FOV_RADIUS
for _, plr in ipairs(Players:GetPlayers()) do
if plr ~= LocalPlayer and IsAlive(plr) then
if TEAM_CHECK and plr.Team == LocalPlayer.Team then continue end
local char = plr.Character
local target = char:FindFirstChild(TARGET_PART)
if target then
local pos, vis = Camera:WorldToViewportPoint(target.Position)
if vis then
local mag = (Vector2.new(pos.X, pos.Y) - Vector2.new(Camera.ViewportSize.X/2, Camera.ViewportSize.Y/2)).Magnitude
if mag < dist then
if IsVisible(target) then
dist = mag
closest = target
end
end
end
end
end
end
return closest
end
local ESP_Objects = {}
local function CreateESP(plr)
if plr == LocalPlayer then return end
local obj = { Box = Drawing.new("Square"), Name = Drawing.new("Text"), Dist = Drawing.new("Text"), Line = Drawing.new("Line") }
obj.Box.Thickness = 1.5; obj.Box.Filled = false
obj.Name.Size = 13; obj.Name.Center = true; obj.Name.Outline = true
obj.Dist.Size = 12; obj.Dist.Center = true; obj.Dist.Outline = true
obj.Line.Thickness = 1
ESP_Objects[plr] = obj
end
for _,p in ipairs(Players:GetPlayers()) do CreateESP(p) end
Players.PlayerAdded:Connect(CreateESP)
local Tabs = {
Aimbot = Window:AddTab({ Title = "Aimbot", Icon = "target" }),
Visuals = Window:AddTab({ Title = "Visuals", Icon = "eye" }),
Info = Window:AddTab({ Title = "Information", Icon = "info" }),
Settings = Window:AddTab({ Title = "Settings", Icon = "settings" })
}
local Options = Fluent.Options
local tAimbot = Tabs.Aimbot:AddToggle("AimActive", {Title = "Enable Aimbot", Default = false})
tAimbot:OnChanged(function() AIMBOT = Options.AimActive.Value end)
local tFov = Tabs.Aimbot:AddToggle("FovVisible", {Title = "Show FOV", Default = false})
tFov:OnChanged(function() FOV_ON = Options.FovVisible.Value FOV.Visible = FOV_ON end)
local tWall = Tabs.Aimbot:AddToggle("WallCheck", {Title = "Wall Check", Default = false})
tWall:OnChanged(function() WALL_CHECK = Options.WallCheck.Value end)
local tTeam = Tabs.Aimbot:AddToggle("TeamCheck", {Title = "Ignore Team", Default = true})
tTeam:OnChanged(function() TEAM_CHECK = Options.TeamCheck.Value end)
local dPart = Tabs.Aimbot:AddDropdown("TargetPart", { Title = "Target Part", Values = {"Head", "UpperTorso", "HumanoidRootPart"}, Default = "Head", Callback = function(v) TARGET_PART = v end})
local sFov = Tabs.Aimbot:AddSlider("FovRadius", { Title = "FOV Radius", Min = 10, Max = 800, Default = 120, Rounding = 0, Callback = function(v) FOV_RADIUS = v FOV.Radius = v end})
local sSmooth = Tabs.Aimbot:AddSlider("Smoothness", { Title = "Smoothness", Min = 1, Max = 100, Default = 25, Rounding = 0, Callback = function(v) AIM_SMOOTHNESS = v/100 end})
local tBox = Tabs.Visuals:AddToggle("EspBox", {Title = "ESP Box", Default = false})
tBox:OnChanged(function() ESP_BOX = Options.EspBox.Value end)
local tName = Tabs.Visuals:AddToggle("EspName", {Title = "ESP Name", Default = false})
tName:OnChanged(function() ESP_NAME = Options.EspName.Value end)
local tLine = Tabs.Visuals:AddToggle("EspLine", {Title = "ESP Line", Default = false})
tLine:OnChanged(function() ESP_LINE = Options.EspLine.Value end)
local tDist = Tabs.Visuals:AddToggle("EspDist", {Title = "ESP Distance", Default = false})
tDist:OnChanged(function() ESP_DISTANCE = Options.EspDist.Value end)
Tabs.Visuals:AddColorpicker("TeamColor", { Title = "Team Color", Default = Color3.fromRGB(0, 255, 0), Callback = function(v) TEAM_COLOR = v end})
Tabs.Visuals:AddColorpicker("EnemyColor", { Title = "Enemy Color", Default = Color3.fromRGB(255, 0, 0), Callback = function(v) ENEMY_COLOR = v end})
local InfoParagraph = Tabs.Info:AddParagraph({
Title = "Cynalez Hub",
Content = "Developed by: dorpew\nVersion: 3.2 Stable\n\nGitHub: https://github.com/dorpew\nRepository: https://github.com/dorpew/cynalez"
})
local function UpdateLanguage(lang)
if lang == "Portuguese" then
tAimbot:SetTitle("Ativar Aimbot")
tFov:SetTitle("Exibir FOV")
tWall:SetTitle("Verificar Paredes")
tTeam:SetTitle("Ignorar Time")
dPart:SetTitle("Parte Alvo")
sFov:SetTitle("Raio do FOV")
sSmooth:SetTitle("Suavidade")
tBox:SetTitle("ESP Caixa")
tName:SetTitle("ESP Nome")
tLine:SetTitle("ESP Linha")
tDist:SetTitle("ESP Distância")
InfoParagraph:SetTitle("Cynalez Hub")
InfoParagraph:SetDesc("Desenvolvido por: dorpew\nVersão: 3.2 Stable\n\nGitHub: https://github.com/dorpew\nRepositório: https://github.com/dorpew/cynalez")
else
tAimbot:SetTitle("Enable Aimbot")
tFov:SetTitle("Show FOV")
tWall:SetTitle("Wall Check")
tTeam:SetTitle("Ignore Team")
dPart:SetTitle("Target Part")
sFov:SetTitle("FOV Radius")
sSmooth:SetTitle("Smoothness")
tBox:SetTitle("ESP Box")
tName:SetTitle("ESP Name")
tLine:SetTitle("ESP Line")
tDist:SetTitle("ESP Distance")
InfoParagraph:SetTitle("Cynalez Hub")
InfoParagraph:SetDesc("Developed by: dorpew\nVersion: 3.2 Stable\n\nGitHub: https://github.com/dorpew\nRepository: https://github.com/dorpew/cynalez")
end
end
Tabs.Settings:AddDropdown("Language", {
Title = "Language",
Values = {"English", "Portuguese"},
Default = "English",
Callback = function(v)
UpdateLanguage(v)
end
})
RunService.RenderStepped:Connect(function()
FOV.Position = Vector2.new(Camera.ViewportSize.X/2, Camera.ViewportSize.Y/2)
if AIMBOT then
local t = GetClosestTarget()
if t then Camera.CFrame = Camera.CFrame:Lerp(CFrame.new(Camera.CFrame.Position, t.Position), AIM_SMOOTHNESS) end
end
for plr, esp in pairs(ESP_Objects) do
if IsAlive(plr) and plr.Character:FindFirstChild("HumanoidRootPart") then
local hrp = plr.Character.HumanoidRootPart
local pos, vis = Camera:WorldToViewportPoint(hrp.Position)
if vis then
local clr = (plr.Team == LocalPlayer.Team) and TEAM_COLOR or ENEMY_COLOR
local dist = (Camera.CFrame.Position - hrp.Position).Magnitude
local sz = math.clamp(1200/dist, 22, 110)
esp.Box.Visible = ESP_BOX; if ESP_BOX then esp.Box.Size = Vector2.new(sz/1.8, sz) esp.Box.Position = Vector2.new(pos.X, pos.Y) - Vector2.new(sz/3.6, sz/2) esp.Box.Color = clr end
esp.Name.Visible = ESP_NAME; if ESP_NAME then esp.Name.Text = plr.Name esp.Name.Position = Vector2.new(pos.X, pos.Y - sz/2 - 14) esp.Name.Color = clr end
esp.Dist.Visible = ESP_DISTANCE; if ESP_DISTANCE then esp.Dist.Text = math.floor(dist).."m" esp.Dist.Position = Vector2.new(pos.X, pos.Y + sz/2 + 2) esp.Dist.Color = clr end
esp.Line.Visible = ESP_LINE; if ESP_LINE then esp.Line.From = Vector2.new(Camera.ViewportSize.X/2, Camera.ViewportSize.Y) esp.Line.To = Vector2.new(pos.X, pos.Y) esp.Line.Color = clr end
else for _,v in pairs(esp) do v.Visible = false end end
else for _,v in pairs(esp) do v.Visible = false end end
end
end)
SaveManager:SetLibrary(Fluent)
InterfaceManager:SetLibrary(Fluent)
SaveManager:IgnoreThemeSettings()
SaveManager:SetIgnoreIndexes({})
InterfaceManager:SetFolder("CynalezHub")
SaveManager:SetFolder("CynalezHub/configs")
InterfaceManager:BuildInterfaceSection(Tabs.Settings)
SaveManager:BuildConfigSection(Tabs.Settings)
Window:SelectTab(1)
SaveManager:LoadAutoloadConfig()