Repository navigation
Expand file tree
/
Copy pathmain.lua
More file actions
7459 lines (6168 loc) · 257 KB
/
Copy pathmain.lua
File metadata and controls
7459 lines (6168 loc) · 257 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
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
-- ============================================================
-- Elite Automation Framework v2.1 - Standalone Universal Bundle
-- Optimized for Grand Piece Online (GPO)
-- Compatible with: Xeno, Delta, Codex, Fluxus, Hydrogen, Arceus X
-- GitHub: https://github.com/blackxzin/script
--
-- Execute with:
-- loadstring(game:HttpGet("https://raw.githubusercontent.com/blackxzin/script/main/loader.lua"))()
--
-- GERADO por tools/bundle.py — nao edite direto, edite src/
-- e rode: python3 tools/bundle.py
-- ============================================================
-- Previne execucao duplicada
local __shared = _G
if type(getgenv) == "function" then
local __ok, __env = pcall(getgenv)
if __ok and type(__env) == "table" then __shared = __env end
end
if __shared._EliteAutomationLoaded or __shared._EliteAutomationBooting then
warn("[EliteAutomation] Script ja esta em execucao!")
return
end
__shared._EliteAutomationBooting = true
-- NOTA: sem hook em game.HttpGet. Hook global quebra chamadas internas
-- do Roblox/GPO (kick/disconnect) e e detectavel pelo anticheat.
local executor = "Unknown"
local __identityOk, __identity = pcall(function()
if type(identifyexecutor) == "function" then return identifyexecutor() end
if type(getexecutorname) == "function" then return getexecutorname() end
return "Unknown"
end)
if __identityOk and __identity then executor = tostring(__identity) end
print("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━")
print(" [EliteAutomation v2.1] GPO Hub")
print(" Executor detectado: " .. tostring(executor))
print("━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━")
local __modules = {}
local __cache = {}
local function __register(name, fn)
__modules[name] = fn
end
-- Require customizado que suporta tanto strings quanto referencias de Instancias
local function customRequire(target)
local name = nil
if type(target) == "string" then
name = target
elseif typeof and typeof(target) == "Instance" then
local path = {}
local cur = target
while cur and cur ~= game do
table.insert(path, 1, cur.Name)
cur = cur.Parent
end
name = table.concat(path, ".")
local eaIdx = string.find(name, "EliteAutomation")
if eaIdx then
name = string.sub(name, eaIdx)
end
end
if name and __modules[name] then
if __cache[name] == nil then
__cache[name] = __modules[name](customRequire)
end
return __cache[name]
end
error("[EliteAutomation] Modulo nao registrado no bundle: " .. tostring(name or target))
end
-- ────────────────────────────────────────────────────────────
-- Module: EliteAutomation.Core.Logger
-- ────────────────────────────────────────────────────────────
__register("EliteAutomation.Core.Logger", function(customRequire)
-- ============================================================
-- Elite Automation Framework :: Core.Logger
-- Logging centralizado com níveis, cores e timestamps.
-- ============================================================
local Logger = {}
local LOG_LEVELS = {
DEBUG = { priority = 0, tag = "[DEBUG]", color = "\27[36m" }, -- Ciano
INFO = { priority = 1, tag = "[INFO] ", color = "\27[32m" }, -- Verde
WARN = { priority = 2, tag = "[WARN] ", color = "\27[33m" }, -- Amarelo
ERROR = { priority = 3, tag = "[ERROR]", color = "\27[31m" }, -- Vermelho
SUCCESS = { priority = 4, tag = "[OK] ", color = "\27[35m" }, -- Magenta
}
local RESET = "\27[0m"
local MIN_LEVEL = LOG_LEVELS.DEBUG.priority
local function timestamp()
return os.date("%H:%M:%S")
end
local function log(level, ...)
if level.priority < MIN_LEVEL then return end
local parts = {...}
local msg = table.concat(parts, " ")
print(string.format(
"%s%s %s [%s] %s%s",
level.color,
level.tag,
timestamp(),
"EliteAuto",
msg,
RESET
))
end
function Logger.Debug(...) log(LOG_LEVELS.DEBUG, ...) end
function Logger.Info(...) log(LOG_LEVELS.INFO, ...) end
function Logger.Warn(...) log(LOG_LEVELS.WARN, ...) end
function Logger.Error(...) log(LOG_LEVELS.ERROR, ...) end
function Logger.Success(...) log(LOG_LEVELS.SUCCESS, ...) end
function Logger.SetMinLevel(levelName)
local lvl = LOG_LEVELS[levelName]
if lvl then
MIN_LEVEL = lvl.priority
end
end
return Logger
end)
-- ────────────────────────────────────────────────────────────
-- Module: EliteAutomation.Core.TaskManager
-- ────────────────────────────────────────────────────────────
__register("EliteAutomation.Core.TaskManager", function(customRequire)
-- ============================================================
-- Elite Automation Framework :: Core.TaskManager
-- Gerencia o ciclo de vida de tarefas (start/stop/toggle).
-- Cada tarefa pode ter um thread interno de loop.
-- ============================================================
local TaskManager = {}
TaskManager.__index = TaskManager
function TaskManager.new()
local self = setmetatable({}, TaskManager)
self.Tasks = {} -- [name] = { Enabled, Start, Stop, Thread }
return self
end
--[[
Registra uma tarefa.
name : identificador único
start : função a chamar ao habilitar
stop : função a chamar ao desabilitar
]]
function TaskManager:Register(name, startFn, stopFn)
self.Tasks[name] = {
Enabled = false,
Start = startFn,
Stop = stopFn,
Thread = nil,
}
end
function TaskManager:SetEnabled(name, enabled)
local t = self.Tasks[name]
if not t then
warn("[TaskManager] Tarefa não registrada:", name)
return
end
if enabled and not t.Enabled then
t.Enabled = true
-- Executa em thread separada para não bloquear
t.Thread = task.spawn(function()
local ok, err = pcall(t.Start)
if not ok then
t.Enabled = false
t.Thread = nil
warn("[TaskManager] Erro ao iniciar '" .. name .. "':", err)
end
end)
elseif not enabled and t.Enabled then
t.Enabled = false
local ok, err = pcall(t.Stop)
if not ok then
warn("[TaskManager] Erro ao parar '" .. name .. "':", err)
end
-- Cancela thread se ainda estiver rodando
if t.Thread then
task.cancel(t.Thread)
t.Thread = nil
end
end
end
function TaskManager:Toggle(name)
local t = self.Tasks[name]
if t then
self:SetEnabled(name, not t.Enabled)
end
end
function TaskManager:IsEnabled(name)
local t = self.Tasks[name]
return t ~= nil and t.Enabled
end
-- Para todas as tarefas registradas
function TaskManager:StopAll()
for name, t in pairs(self.Tasks) do
if t.Enabled then
self:SetEnabled(name, false)
end
end
end
return TaskManager
end)
-- ────────────────────────────────────────────────────────────
-- Module: EliteAutomation.Core.StateMachine
-- ────────────────────────────────────────────────────────────
__register("EliteAutomation.Core.StateMachine", function(customRequire)
-- ============================================================
-- Elite Automation Framework :: Core.StateMachine
-- Máquina de estados finitos com listeners e histórico.
-- ============================================================
local StateMachine = {}
StateMachine.__index = StateMachine
--[[
Estados válidos do agente:
"Idle" - Aguardando próxima ação
"Combat" - Em combate ativo
"Moving" - Deslocando até alvo
"Farming" - Coletando item/fruta
"Fleeing" - Fugindo de perigo
"Waiting" - Aguardando cooldown (boss de tempo)
]]
function StateMachine.new(initialState)
local self = setmetatable({}, StateMachine)
self.State = initialState
self.PrevState = nil
self.Transitions = {}
self.Listeners = { OnEnter = {}, OnLeave = {} }
self.History = {}
return self
end
function StateMachine:AddTransition(fromState, toState, condition)
self.Transitions[fromState] = self.Transitions[fromState] or {}
table.insert(self.Transitions[fromState], {
To = toState,
Condition = condition,
})
end
-- Registra callback ao ENTRAR em um estado
function StateMachine:OnEnter(state, callback)
self.Listeners.OnEnter[state] = callback
end
-- Registra callback ao SAIR de um estado
function StateMachine:OnLeave(state, callback)
self.Listeners.OnLeave[state] = callback
end
-- Força transição direta sem checar condições (uso interno controlado)
function StateMachine:ForceTransition(toState, ...)
local prevState = self.State
if self.Listeners.OnLeave[prevState] then
self.Listeners.OnLeave[prevState](...)
end
table.insert(self.History, prevState)
if #self.History > 10 then table.remove(self.History, 1) end
self.PrevState = prevState
self.State = toState
if self.Listeners.OnEnter[toState] then
self.Listeners.OnEnter[toState](...)
end
end
-- Avalia as condições registradas e faz transição automaticamente
function StateMachine:Update(...)
local rules = self.Transitions[self.State]
if not rules then return end
for _, rule in ipairs(rules) do
if rule.Condition(...) then
self:ForceTransition(rule.To, ...)
return
end
end
end
function StateMachine:Get()
return self.State
end
function StateMachine:Is(state)
return self.State == state
end
function StateMachine:WasIn(state)
return self.PrevState == state
end
return StateMachine
end)
-- ────────────────────────────────────────────────────────────
-- Module: EliteAutomation.Core.PriorityManager
-- ────────────────────────────────────────────────────────────
__register("EliteAutomation.Core.PriorityManager", function(customRequire)
-- ============================================================
-- Elite Automation Framework :: Core.PriorityManager
-- Gerencia prioridade de tarefas concorrentes.
-- Mais alto = mais prioritário. Apenas 1 tarefa ativa por vez.
-- ============================================================
local PriorityManager = {}
PriorityManager.__index = PriorityManager
function PriorityManager.new()
local self = setmetatable({}, PriorityManager)
self.ActiveTask = nil -- nome da tarefa atualmente ativa
self.Tasks = {} -- [name] = { priority, onActivate, onDeactivate }
return self
end
--[[
Registra uma tarefa com prioridade.
priority : número (maior = mais importante)
onActivate : função chamada quando esta tarefa se torna ativa
onDeactivate : função chamada quando perde o controle
]]
function PriorityManager:Register(name, priority, onActivate, onDeactivate)
self.Tasks[name] = {
Priority = priority,
OnActivate = onActivate,
OnDeactivate = onDeactivate,
Active = false,
}
end
-- Pede para ativar uma tarefa; só ativa se tiver prioridade suficiente.
function PriorityManager:Request(name)
local requestedTask = self.Tasks[name]
if not requestedTask then return false end
-- Sem tarefa ativa → ativa imediatamente
if not self.ActiveTask then
self.ActiveTask = name
requestedTask.Active = true
requestedTask.OnActivate()
return true
end
-- Compara com tarefa atual
local currentTask = self.Tasks[self.ActiveTask]
if requestedTask.Priority > currentTask.Priority then
-- Preempta a tarefa atual
currentTask.Active = false
currentTask.OnDeactivate()
self.ActiveTask = name
requestedTask.Active = true
requestedTask.OnActivate()
return true
end
return false -- sem prioridade suficiente
end
-- Libera a tarefa; deixa o sistema escolher a próxima mais prioritária ativa.
function PriorityManager:Release(name)
local task = self.Tasks[name]
if not task or not task.Active then return end
task.Active = false
task.OnDeactivate()
if self.ActiveTask == name then
self.ActiveTask = nil
end
end
function PriorityManager:GetActive()
return self.ActiveTask
end
function PriorityManager:IsActive(name)
local task = self.Tasks[name]
return task ~= nil and task.Active
end
return PriorityManager
end)
-- ────────────────────────────────────────────────────────────
-- Module: EliteAutomation.Core.PerformanceManager
-- ────────────────────────────────────────────────────────────
__register("EliteAutomation.Core.PerformanceManager", function(customRequire)
-- ============================================================
-- Elite Automation Framework :: Core.PerformanceManager
-- Otimizador de memória, connection pooling e cleanup.
-- ============================================================
local RunService = game:GetService("RunService")
local PerformanceManager = {}
PerformanceManager.__index = PerformanceManager
function PerformanceManager.new()
local self = setmetatable({}, PerformanceManager)
self._connections = {} -- pool de RBXScriptConnection
self._tweens = {} -- pool de Tweens ativos
self._timers = {} -- pool de threads
self._lastCleanup = os.clock()
self.CleanupInterval = 30 -- segundos
return self
end
-- ─── Connection pooling ──────────────────────────────────────
function PerformanceManager:Track(name, connection)
if not self._connections[name] then
self._connections[name] = {}
end
table.insert(self._connections[name], connection)
return connection
end
function PerformanceManager:Disconnect(name)
local conns = self._connections[name]
if not conns then return end
for _, conn in ipairs(conns) do
if conn and conn.Connected then
conn:Disconnect()
end
end
self._connections[name] = nil
end
function PerformanceManager:DisconnectAll()
for name in pairs(self._connections) do
self:Disconnect(name)
end
end
-- ─── Tween pooling ───────────────────────────────────────────
function PerformanceManager:TrackTween(tween)
table.insert(self._tweens, tween)
tween.Completed:Connect(function()
for i, t in ipairs(self._tweens) do
if t == tween then
table.remove(self._tweens, i)
break
end
end
end)
return tween
end
function PerformanceManager:CancelAllTweens()
for _, tween in ipairs(self._tweens) do
if tween.PlaybackState == Enum.PlaybackState.Playing then
tween:Cancel()
end
end
self._tweens = {}
end
-- ─── Timer/Thread pooling ────────────────────────────────────
function PerformanceManager:TrackTimer(name, thread)
if self._timers[name] then
task.cancel(self._timers[name])
end
self._timers[name] = thread
return thread
end
function PerformanceManager:CancelTimer(name)
local t = self._timers[name]
if t then
task.cancel(t)
self._timers[name] = nil
end
end
function PerformanceManager:CancelAllTimers()
for name, thread in pairs(self._timers) do
task.cancel(thread)
end
self._timers = {}
end
-- ─── Debounce helper ─────────────────────────────────────────
function PerformanceManager:Debounce(name, delay, func)
self:CancelTimer(name)
local thread = task.delay(delay, func)
self:TrackTimer(name, thread)
end
-- ─── Throttle helper ─────────────────────────────────────────
function PerformanceManager:Throttle(name, interval)
local lastRun = self["_throttle_" .. name] or 0
local now = os.clock()
if (now - lastRun) >= interval then
self["_throttle_" .. name] = now
return true
end
return false
end
-- ─── Auto-cleanup periódico ──────────────────────────────────
function PerformanceManager:AutoCleanup()
local now = os.clock()
if (now - self._lastCleanup) < self.CleanupInterval then
return
end
self._lastCleanup = now
-- Remove connections mortas
for name, conns in pairs(self._connections) do
local alive = {}
for _, conn in ipairs(conns) do
if conn and conn.Connected then
table.insert(alive, conn)
end
end
self._connections[name] = alive
end
-- Coleta lixo se memória > 500MB
local stats = game:GetService("Stats")
local memMB = stats:GetTotalMemoryUsageMb()
if memMB > 500 then
collectgarbage("collect")
end
end
-- ─── Força cleanup total ─────────────────────────────────────
function PerformanceManager:Cleanup()
self:DisconnectAll()
self:CancelAllTweens()
self:CancelAllTimers()
collectgarbage("collect")
end
return PerformanceManager
end)
-- ────────────────────────────────────────────────────────────
-- Module: EliteAutomation.Config.Settings
-- ────────────────────────────────────────────────────────────
__register("EliteAutomation.Config.Settings", function(customRequire)
-- ============================================================
-- Elite Automation Framework :: Config.Settings
-- Configurações Globais e Parâmetros de Engenharia (GPO)
-- ============================================================
return {
-- ─── [1] GERAIS (Sistema e Debug) ───────────────────────
General = {
GameName = "Grand Piece Online",
AntiDetectionMode = true, -- Ativa jitter, delay humano e desvios de trajetória
AutoReconnect = true, -- Tenta reconectar em caso de queda de conexão
DebugLogs = false, -- Ativa logs detalhados no console para desenvolvedores
Version = "2.1", -- Versão do Framework
},
-- ─── [2] MOVIMENTAÇÃO (SmartFlight & Anti-Mar) ──────────
Movement = {
-- Velocidades Base
DefaultSpeed = 52, -- Velocidade padrão de voo (studs/s)
MaxSafeSpeed = 60, -- Limite máximo para evitar detecção de velocidade
MinSafeSpeed = 35, -- Velocidade mínima para manobras de fuga
-- Jitter (Humanização de Movimento)
SpeedJitterMin = -6, -- Variação negativa de velocidade
SpeedJitterMax = 6, -- Variação positiva de velocidade
-- Altitude e Segurança de Mar
HoverOffset = 25, -- Altitude padrão acima do solo/objeto
SeaFloorOffset = 35, -- Altitude de segurança acima do nível do mar (Anti-Afogamento)
SeaLevel = 0, -- Coordenada Y da superfície do mar
-- Estética de Movimento (Tweening)
TweenStyle = Enum.EasingStyle.Sine,
TweenDirection = Enum.EasingDirection.InOut,
DefaultDuration = 2.5, -- Tempo base para transições de posição
-- Verificação de Segurança
SafetyCheckRate = 0.1, -- Frequência de checagem de altitude (segundos)
MaxAltitude = 500, -- Limite de altura para evitar detecção de voo infinito
},
-- ─── [3] COMBATE (CombatController & Advanced) ──────────
Combat = {
-- Ciclo de Ataque
UpdateInterval = 0.1, -- Frequência do loop de combate (Hz)
AttackRange = 18, -- Distância máxima de engajamento (Melee/Armas)
AttackIntervalMin = 0.40, -- Intervalo mínimo entre ataques (M1)
AttackIntervalMax = 0.75, -- Intervalo máximo entre ataques (M1)
-- Gestão de Risco
MaxRetries = 5, -- Tentativas de re-engajamento antes de desistir
FleeHealthPct = 0.20, -- Porcentagem de HP para iniciar protocolo de fuga
StaminaThreshold = 0.15, -- Stamina mínima para manter ataques (evita Guard Break)
-- Modo Ranged (Kite/Armas)
RangedMin = 32, -- Distância mínima de combate à distância
RangedMax = 60, -- Distância máxima de combate à distância
-- Haki e Defesa
AutoBusoHaki = false, -- Ativação explícita de Haki do Armamento
AutoKenHaki = false, -- Ativação explícita de Haki da Observação
AutoGrip = false, -- Execução explícita de alvos nocauteados ('B')
-- Combos e Skills
UseCombo = true, -- Ativa cadeias de combos pré-configuradas
BlockWindow = 0.15, -- Janela de tempo para Perfect Block (segundos)
},
-- ─── [4] SELEÇÃO DE ALVO (TargetSelector) ───────────────
TargetSelector = {
PreferLowHealth = true, -- Prioriza alvos com menor HP para finalização
MinTargetHealth = 10, -- Ignora alvos com HP abaixo disso (evita desperdício)
BlacklistNPCs = { -- Lista de IDs/Nomes para ignorar
"Dummy", "Trainer", "Shopkeeper", "Shipwright",
"Sailor", "Civilian", "Quest Giver", "Merchant"
},
},
-- ─── [5] BOSSES & SEA EVENTS ───────────────────────────
BossManager = {
ScanInterval = 2.0, -- Frequência de varredura de bosses no mapa
AttackRadius = 90, -- Raio de detecção de bosses ativos
-- Configurações de Sea Events (Kraken, Sea Beast, etc)
SeaEventSettings = {
SafeAltitude = 40, -- Altitude de segurança sobre o mar
DiveProtection = true, -- Ativa modo de voo estrito para evitar afogamento
DetectionRadius = 10000, -- Raio de detecção de eventos oceânicos
},
-- Base de Dados de Bosses (Timers e Localizações)
TimedBosses = {
-- Exemplo de estrutura para os bosses de ilha
BanditBoss = { Name = "Bandit Boss", Location = Vector3.new(1050, 18, 1220), Cooldown = 300, Reward = 2000 },
-- ... (outros bosses carregados dinamicamente)
},
RaidBosses = {
-- Configurações de Raids (Moria, Baal, etc)
Moria = { Name = "Moria", PhaseCount = 2, WaveCount = 5, RewardPeli = 75000 },
}
},
-- ─── [6] SISTEMAS DE FARM (Fruit, Item, Merchant) ───────
FruitTracker = {
ScanInterval = 1.5, -- Frequência de scan de frutas
AutoCollect = true, -- Voo automático até a fruta
MinRarity = "Common", -- Common, Rare, Legendary, Mythical
NotifyOnDetect = true, -- Notificações visuais na UI
CollectRadius = 5, -- Distância para coleta automática
},
ItemFarm = {
ScanInterval = 1.8,
ItemTags = { "Chest", "Peli", "Drop", "Gold", "Silver" }, -- Tags de itens
},
MerchantTracker = {
ScanInterval = 2.0, -- Frequência de scan do mercador
NotifyOnSpawn = true, -- Alerta visual imediato
KnownIslands = { -- Coordenadas de referência para o mapa
["Desert Kingdom"] = Vector3.new(-1200, 20, -3000),
["Sandora"] = Vector3.new(-1150, 15, 1400),
},
},
-- ─── [7] LAW & FACTORY (Especializado) ──────────────────
LawFactoryFarm = {
Factory = {
Location = Vector3.new(450, 120, -180),
CoreHoverHeight = 14, -- Altitude sobre o Core (anti-ácido)
WaitHeight = 200, -- Altitude de espera
},
Law = {
Location = Vector3.new(-4716, 28, 1263),
CombatHeight = 12, -- Altitude de combate (anti-Tact)
ShamblesThreshold = 25, -- Distância de correção de teleporte
AutoStartRaid = true,
UseCyborgSkills = true, -- Ativa rotação de skills da Cyborg
},
},
-- ─── [8] UI & NOTIFICAÇÕES ─────────────────────────────
Notifications = {
Duration = 5, -- Tempo de exibição das mensagens
MaxVisible = 4, -- Limite de notificações simultâneas
SlideInTime = 0.3, -- Animação de entrada
SlideOutTime = 0.25, -- Animação de saída
},
-- ─── [9] PERFORMANCE & MEMÓRIA ─────────────────────────
Performance = {
CleanupInterval = 30, -- Segundos entre limpezas de memória
MaxMemoryUsage = 500, -- MB para disparar coletor de lixo (GC)
UpdateRate = 0.1, -- Taxa de atualização do sistema de controle
}
}
end)
-- ────────────────────────────────────────────────────────────
-- Module: EliteAutomation.UI.Theme
-- ────────────────────────────────────────────────────────────
__register("EliteAutomation.UI.Theme", function(customRequire)
-- ============================================================
-- Elite Automation Framework :: UI.Theme
-- Sistema de temas com glassmorphism, gradientes e animações.
-- ============================================================
local Theme = {}
-- ─── Temas disponíveis ────────────────────────────────────────
Theme.Presets = {
Dark = {
Name = "Dark Elite",
BG = Color3.fromRGB(10, 10, 20),
BGGradient = {Color3.fromRGB(15, 15, 30), Color3.fromRGB(8, 8, 18)},
Header = Color3.fromRGB(15, 15, 30),
Surface = Color3.fromRGB(20, 20, 38),
Border = Color3.fromRGB(50, 50, 90),
Accent = Color3.fromRGB(100, 130, 255),
AccentGlow = Color3.fromRGB(80, 110, 230),
AccentOff = Color3.fromRGB(55, 55, 90),
Text = Color3.fromRGB(230, 230, 255),
TextSub = Color3.fromRGB(130, 130, 180),
Success = Color3.fromRGB(80, 220, 130),
Danger = Color3.fromRGB(255, 80, 100),
Warning = Color3.fromRGB(255, 200, 80),
TabInactive = Color3.fromRGB(35, 35, 62),
TabActive = Color3.fromRGB(100, 130, 255),
Blur = true,
BlurSize = 12,
},
Neon = {
Name = "Neon Cyber",
BG = Color3.fromRGB(8, 8, 18),
BGGradient = {Color3.fromRGB(15, 5, 25), Color3.fromRGB(5, 15, 35)},
Header = Color3.fromRGB(12, 8, 25),
Surface = Color3.fromRGB(18, 12, 32),
Border = Color3.fromRGB(120, 60, 200),
Accent = Color3.fromRGB(200, 60, 255),
AccentGlow = Color3.fromRGB(180, 40, 240),
AccentOff = Color3.fromRGB(60, 30, 80),
Text = Color3.fromRGB(240, 240, 255),
TextSub = Color3.fromRGB(160, 120, 200),
Success = Color3.fromRGB(100, 255, 150),
Danger = Color3.fromRGB(255, 60, 120),
Warning = Color3.fromRGB(255, 180, 60),
TabInactive = Color3.fromRGB(40, 20, 60),
TabActive = Color3.fromRGB(200, 60, 255),
Blur = true,
BlurSize = 16,
},
Minimal = {
Name = "Minimal",
BG = Color3.fromRGB(18, 18, 18),
BGGradient = {Color3.fromRGB(20, 20, 20), Color3.fromRGB(15, 15, 15)},
Header = Color3.fromRGB(22, 22, 22),
Surface = Color3.fromRGB(25, 25, 25),
Border = Color3.fromRGB(60, 60, 60),
Accent = Color3.fromRGB(120, 120, 255),
AccentGlow = Color3.fromRGB(100, 100, 235),
AccentOff = Color3.fromRGB(60, 60, 80),
Text = Color3.fromRGB(240, 240, 240),
TextSub = Color3.fromRGB(140, 140, 140),
Success = Color3.fromRGB(100, 200, 120),
Danger = Color3.fromRGB(240, 80, 80),
Warning = Color3.fromRGB(240, 180, 60),
TabInactive = Color3.fromRGB(40, 40, 40),
TabActive = Color3.fromRGB(120, 120, 255),
Blur = false,
BlurSize = 0,
},
}
Theme.Current = Theme.Presets.Dark
-- ─── Aplica gradiente em frame ────────────────────────────────
function Theme.ApplyGradient(frame, color1, color2, rotation)
rotation = rotation or 90
local gradient = frame:FindFirstChildOfClass("UIGradient")
if not gradient then
gradient = Instance.new("UIGradient")
gradient.Parent = frame
end
gradient.Color = ColorSequence.new({
ColorSequenceKeypoint.new(0, color1),
ColorSequenceKeypoint.new(1, color2),
})
gradient.Rotation = rotation
return gradient
end
-- ─── Adiciona blur backdrop (glassmorphism) ───────────────────
function Theme.ApplyBlur(frame, size)
size = size or Theme.Current.BlurSize
if not Theme.Current.Blur then return end
-- Usa BackgroundTransparency + Stroke para simular glass
frame.BackgroundTransparency = 0.15
local stroke = frame:FindFirstChildOfClass("UIStroke")
if not stroke then
stroke = Instance.new("UIStroke")
stroke.Parent = frame
end
stroke.Color = Color3.fromRGB(255, 255, 255)
stroke.Thickness = 1
stroke.Transparency = 0.85
-- Efeito de brilho interno
local glow = frame:FindFirstChild("GlowEffect")
if not glow then
glow = Instance.new("ImageLabel")
glow.Name = "GlowEffect"
glow.Size = UDim2.new(1, 0, 1, 0)
glow.BackgroundTransparency = 1
glow.Image = "rbxasset://textures/ui/GuiImagePlaceholder.png"
glow.ImageTransparency = 0.92
glow.ImageColor3 = Theme.Current.Accent
glow.ZIndex = frame.ZIndex - 1
glow.Parent = frame
end
end
-- ─── Corner helper ───────────────────────────────────────────
function Theme.Corner(radius, parent)
local c = parent:FindFirstChildOfClass("UICorner")
if not c then
c = Instance.new("UICorner")
c.Parent = parent
end
c.CornerRadius = UDim.new(0, radius)
return c
end
-- ─── Stroke helper ───────────────────────────────────────────
function Theme.Stroke(color, thick, parent, transparency)
local s = parent:FindFirstChildOfClass("UIStroke")
if not s then
s = Instance.new("UIStroke")
s.Parent = parent
end
s.Color = color
s.Thickness = thick
s.Transparency = transparency or 0
return s
end
-- ─── Muda tema globalmente ───────────────────────────────────
function Theme.SetTheme(presetName)
local preset = Theme.Presets[presetName]
if preset then
Theme.Current = preset
return true
end
return false
end
return Theme
end)
-- ────────────────────────────────────────────────────────────
-- Module: EliteAutomation.UI.MainUI
-- ────────────────────────────────────────────────────────────
__register("EliteAutomation.UI.MainUI", function(customRequire)
-- ============================================================
-- Elite Automation Framework :: UI.MainUI
-- Painel principal da interface de usuário.
-- Design escuro com glassmorphism, drag-to-move e abas.
-- ============================================================
local TweenService = game:GetService("TweenService")
local UserInputService = game:GetService("UserInputService")
local Players = game:GetService("Players")
local MainUI = {}
MainUI.__index = MainUI
-- ─── Paleta ───────────────────────────────────────────────────
local C = {
BG = Color3.fromRGB(10, 10, 20),
Header = Color3.fromRGB(15, 15, 30),
Surface = Color3.fromRGB(20, 20, 38),
Border = Color3.fromRGB(50, 50, 90),
Accent = Color3.fromRGB(100, 130, 255),
AccentGlow = Color3.fromRGB(80, 110, 230),
Text = Color3.fromRGB(230, 230, 255),
TextSub = Color3.fromRGB(130, 130, 180),
TabInactive = Color3.fromRGB(35, 35, 62),
TabActive = Color3.fromRGB(100, 130, 255),
}
local PANEL_W = 340
local PANEL_H = 440
local TAB_H = 32
local HEADER_H = 50
-- ─── Cria UICorner ────────────────────────────────────────────
local function corner(r, p)
local c = Instance.new("UICorner")
c.CornerRadius = UDim.new(0, r)
c.Parent = p
end
-- ─── Cria UIStroke ────────────────────────────────────────────
local function stroke(color, thick, p)
local s = Instance.new("UIStroke")
s.Color = color
s.Thickness = thick
s.Parent = p
end
-- ─── Implementa drag-to-move ─────────────────────────────────
local function makeDraggable(frame, handle)
local dragging = false
local dragStart = nil
local startPos = nil
handle.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1
or input.UserInputType == Enum.UserInputType.Touch then
dragging = true
dragStart = input.Position
startPos = frame.Position
end
end)
handle.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton1
or input.UserInputType == Enum.UserInputType.Touch then
dragging = false
end
end)
UserInputService.InputChanged:Connect(function(input)
if dragging and (
input.UserInputType == Enum.UserInputType.MouseMovement
or input.UserInputType == Enum.UserInputType.Touch
) then
local delta = input.Position - dragStart
frame.Position = UDim2.new(
startPos.X.Scale,
startPos.X.Offset + delta.X,
startPos.Y.Scale,
startPos.Y.Offset + delta.Y