Grinding out wave after wave gets old fast, so dropping a Dragon Tower Defense script into the mix makes the whole lobby a lot easier to manage. You get to skip the boring repetitive clicking and just watch your squad do the work.
You summon dragons, evolve them, and defend against waves of monsters across six different difficulties. With fifty dragons to collect, talents to unlock, and trading with other players, you will spend plenty of time building the best team possible.
If you want to grab some free boosts before your next round, use the code FROSTFANG to get started right now.
Dragon Tower Defense Script – Cactus Hub
-- Cactus Hub | Dragon Tower Defense
local folder = "DragonTD_Macros"
local destination = folder .. "/Hub.lua"
assert(type(writefile) == "function" and type(readfile) == "function" and type(isfile) == "function" and type(isfolder) == "function" and type(makefolder) == "function", "[Cactus Hub] Auto Execute needs an executor with file access")
if not isfolder(folder) then
makefolder(folder)
end
local hubSource = [========[-- Cactus Hub | Dragon Tower Defense
do
local _lvbcgvqxyhnsj=""
local I1II1I1Ill1Il=identifyexecutor or getexecutorname
if type(I1II1I1Ill1Il)=="function" then
local _d_gti_gju,_0xd7c8d2=pcall(I1II1I1Ill1Il)
if _d_gti_gju and type(_0xd7c8d2)=="string" then
_lvbcgvqxyhnsj=_0xd7c8d2:lower()
end
end
local _nlfrioefqftdd=_lvbcgvqxyhnsj:match("%f[%a]xeno%f[%A]") or _lvbcgvqxyhnsj:match("%f[%a]solara%f[%A]")
if _nlfrioefqftdd then
print("[CACTUS HUB] Unsupported executor") pcall(function()
local _0xdcaf82=game:GetService("Players")
local _IIl1lIlI1I1I=game:GetService("TweenService")
local _0x30f70596=_0xdcaf82.LocalPlayer
local _fepmfqsd=_0x30f70596:WaitForChild("PlayerGui")
local I1I11llII11l="CactusHubExecutorNoticePreview"
local _II1I11l11I=_fepmfqsd:FindFirstChild(I1I11llII11l)
if _II1I11l11I then
_II1I11l11I:Destroy()
end
local _0xf732ce14=Instance.new("ScreenGui") _0xf732ce14.Name=I1I11llII11l _0xf732ce14.ResetOnSpawn=false _0xf732ce14.IgnoreGuiInset=true _0xf732ce14.DisplayOrder=10000 _0xf732ce14.ZIndexBehavior=Enum.ZIndexBehavior.Sibling _0xf732ce14.Parent=_fepmfqsd
local function _0x44c65(_qyvcwwd,_ugvgrehbtgn,ll11l1II1l)
local ll1l1IIII=Instance.new(_qyvcwwd)
for _ucchstsfskir,_1111Ill in pairs(_ugvgrehbtgn) do
ll1l1IIII[_ucchstsfskir]=_1111Ill
end
ll1l1IIII.Parent=ll11l1II1l
return ll1l1IIII
end
local l1Il1I1l=_0x44c65("Frame",{Size=UDim2.fromScale(1,1),BackgroundColor3=Color3.fromRGB(7,16,10),BackgroundTransparency=0.3,BorderSizePixel=0},_0xf732ce14)
local _iomzxottphwg=workspace.CurrentCamera
local _ndzijbkjiifl=_iomzxottphwg and _iomzxottphwg.ViewportSize or Vector2.new(800,600)
local _rvpy_re=_0x44c65("Frame",{AnchorPoint=Vector2.new(0.5,0.5),Position=UDim2.fromScale(0.5,0.5),Size=UDim2.fromOffset(440,360),BackgroundColor3=Color3.fromRGB(18,18,18),BorderSizePixel=0},l1Il1I1l) _0x44c65("UICorner",{CornerRadius=UDim.new(0,22)},_rvpy_re) _0x44c65("UIGradient",{Color=ColorSequence.new(Color3.fromRGB(26,26,26),Color3.fromRGB(10,10,10)),Rotation=65},_rvpy_re) _0x44c65("UIStroke",{Color=Color3.fromRGB(95,215,120),Thickness=1,Transparency=0.5},_rvpy_re)
local _lptjvpjgwzyc=_0x44c65("UIScale",{Scale=1},_rvpy_re)
local function _lII1111()
local _jedukkzfm=_iomzxottphwg and _iomzxottphwg.ViewportSize or _ndzijbkjiifl
return math.min(1,(_jedukkzfm.X - 32)/440,(_jedukkzfm.Y - 32)/360)
end
local function _plwkhqtsrp(_1II1IlIlI1l1,_0x7f6859,_0x2f3aa1a,_I1IIlI1I11II,_IIlIl1I1llI,_or_atjidznler,_0xf38526,IIlIll1I1I,_diehdqzy,_0xeb766)
return _0x44c65("TextLabel",{BackgroundTransparency=1,Position=UDim2.fromOffset(_0x2f3aa1a,_I1IIlI1I11II),Size=UDim2.fromOffset(_IIlIl1I1llI,_or_atjidznler),Text=_0x7f6859,TextColor3=IIlIll1I1I,TextSize=_0xf38526,Font=_diehdqzy or Enum.Font.Gotham,TextWrapped=true,TextXAlignment=_0xeb766 or Enum.TextXAlignment.Center},_1II1IlIlI1l1)
end
_plwkhqtsrp(_rvpy_re,"Cactus Hub",28,21,220,22,12,Color3.fromRGB(188,242,202),Enum.Font.GothamBold,Enum.TextXAlignment.Left)
local _yv_pnsmi=_0x44c65("Frame",{Position=UDim2.fromOffset(319,23),Size=UDim2.fromOffset(93,21),BackgroundColor3=Color3.fromRGB(32,97,49),BorderSizePixel=0},_rvpy_re) _0x44c65("UICorner",{CornerRadius=UDim.new(1,0)},_yv_pnsmi) _plwkhqtsrp(_yv_pnsmi,"UNSUPPORTED",0,0,93,21,9,Color3.fromRGB(199,244,208),Enum.Font.GothamBold)
local _xbqdqfzzhuodk=_0x44c65("Frame",{Position=UDim2.fromOffset(28,58),Size=UDim2.fromOffset(384,1),BackgroundColor3=Color3.fromRGB(86,200,114),BackgroundTransparency=0.82,BorderSizePixel=0},_rvpy_re)
local _0x32e381c=_0x44c65("Frame",{AnchorPoint=Vector2.new(0.5,0),Position=UDim2.new(0.5,0,0,81),Size=UDim2.fromOffset(68,68),BackgroundColor3=Color3.fromRGB(48,142,79),BackgroundTransparency=0.94,BorderSizePixel=0},_rvpy_re) _0x44c65("UICorner",{CornerRadius=UDim.new(1,0)},_0x32e381c)
local _0xec03=_0x44c65("Frame",{Position=UDim2.fromOffset(8,8),Size=UDim2.fromOffset(52,52),BackgroundColor3=Color3.fromRGB(17,17,17),BorderSizePixel=0},_0x32e381c) _0x44c65("UICorner",{CornerRadius=UDim.new(0,17)},_0xec03) _0x44c65("UIStroke",{Color=Color3.fromRGB(99,209,129),Transparency=0.15,Thickness=1.4},_0xec03) _plwkhqtsrp(_0xec03,"🌵",0,0,52,52,24,Color3.fromRGB(216,255,225),Enum.Font.GothamBold) _plwkhqtsrp(_rvpy_re,"Xeno and Solara are not supported",24,169,392,32,19,Color3.fromRGB(240,255,244),Enum.Font.GothamBold) _plwkhqtsrp(_rvpy_re,"Please use a different executor.",24,202,392,31,18,Color3.fromRGB(181,235,195),Enum.Font.GothamBold) _plwkhqtsrp(_rvpy_re,"Thank you for understanding.",24,246,392,22,14,Color3.fromRGB(162,203,174))
local Il1lIIll1lI1=_0x44c65("TextButton",{Position=UDim2.fromOffset(28,291),Size=UDim2.fromOffset(384,43),BackgroundColor3=Color3.new(1,1,1),BorderSizePixel=0,Text="",TextSize=14,TextColor3=Color3.fromRGB(255,255,255),Font=Enum.Font.GothamBold,AutoButtonColor=true},_rvpy_re) _0x44c65("UICorner",{CornerRadius=UDim.new(0,12)},Il1lIIll1lI1) _0x44c65("UIGradient",{Color=ColorSequence.new(Color3.fromRGB(60,167,89),Color3.fromRGB(33,111,56)),Rotation=15},Il1lIIll1lI1)
local _pxpjvspyk=_plwkhqtsrp(Il1lIIll1lI1,"Got it",0,0,384,43,14,Color3.fromRGB(255,255,255),Enum.Font.GothamBold) _pxpjvspyk.ZIndex=Il1lIIll1lI1.ZIndex+1 _pxpjvspyk.Active=false
local _pz_bqbhq=false Il1lIIll1lI1.Activated:Connect(function()
if _pz_bqbhq then
return
end
_pz_bqbhq=true _IIl1lIlI1I1I:Create(_lptjvpjgwzyc,TweenInfo.new(0.13),{Scale=_lII1111()*0.94}):Play() _IIl1lIlI1I1I:Create(l1Il1I1l,TweenInfo.new(0.13),{BackgroundTransparency=1}):Play() task.delay(0.14,function() _0xf732ce14:Destroy()
end
)
end
)
local _tgokkp_iva
if _iomzxottphwg then
_tgokkp_iva=_iomzxottphwg:GetPropertyChangedSignal("ViewportSize"):Connect(function() _lptjvpjgwzyc.Scale=_lII1111()
end
) _0xf732ce14.Destroying:Connect(function() _tgokkp_iva:Disconnect()
end
)
end
_lptjvpjgwzyc.Scale=_lII1111()*0.94 _IIl1lIlI1I1I:Create(_lptjvpjgwzyc,TweenInfo.new(0.25,Enum.EasingStyle.Quart,Enum.EasingDirection.Out),{Scale=_lII1111()}):Play()
end
)
return
end
end
if not game:IsLoaded() then
game.Loaded:Wait()
end
if game.GameId~=10771908014 then
return
end
local hubBranding={OpenButton="Cactus Hub",ToggleHint="Cactus Hub | RightShift to toggle"} do
local function brandHash(_juslao_iae)
if type(_juslao_iae)~="string" then
return nil
end
local _xrocuqg=0
for _xbdtdbmq_ju=1,#_juslao_iae do
_xrocuqg=(_xrocuqg*131+string.byte(_juslao_iae,_xbdtdbmq_ju))%10000019
end
return _xrocuqg
end
local function brandingMatches(_tpxcfjoit)
if brandHash(hubBranding.OpenButton)~=8805354 or brandHash(hubBranding.ToggleHint)~=6979526 then
return false
end
return not _tpxcfjoit or type(_tpxcfjoit.OpenButton)=="table" and brandHash(_tpxcfjoit.OpenButton.Title)==8805354 and brandHash(_tpxcfjoit.Title)==3911130
end
function hubBranding.Assert(_adcudznkbc)
if brandingMatches(_adcudznkbc) then
return true
end
hubBranding.Stopped=true
if hubBranding.Cleanup then
pcall(hubBranding.Cleanup)
end
if hubBranding.Window then
pcall(function() hubBranding.Window:Destroy()
end
)
end
error("Cactus Hub branding validation failed",0)
end
function hubBranding.Check(_0x80658f4d) hubBranding.Assert(_0x80658f4d) hubBranding.Options=_0x80658f4d
return _0x80658f4d
end
function hubBranding.Bind(_0x6bb7,II1lII11l,_0xa48c887,_0x057e) hubBranding.Window=_0x6bb7 hubBranding.Cleanup=_0xa48c887 hubBranding.Assert(hubBranding.Options)
if _0x057e and type(_0x057e.Notify)=="function" then
pcall(function() _0x057e:Notify({Title="Cactus Hub",Content=hubBranding.ToggleHint,Duration=3})
end
)
end
task.spawn(function()
while not hubBranding.Stopped and II1lII11l() do
hubBranding.Assert(hubBranding.Options) task.wait(1)
end
end
)
return _0x6bb7
end
hubBranding.Assert()
end
if not game:IsLoaded() then
game.Loaded:Wait()
end
if game.PlaceId~=103076556916764 and game.PlaceId~=90749532382026 then
return
end
local executorEnvironment=getgenv()
if executorEnvironment.DragonTDHub then
local I1ll1lII1lIII=executorEnvironment.DragonTDHub
if I1ll1lII1lIII.Destroy then
pcall(I1ll1lII1lIII.Destroy)
end
I1ll1lII1lIII.Running=false I1ll1lII1lIII.Playing=false I1ll1lII1lIII.Recording=false
for _szsbtix,_1lll1l1Ill in ipairs(I1ll1lII1lIII.Connections or {}) do
pcall(_1lll1l1Ill.Disconnect,_1lll1l1Ill)
end
end
local l11lllll=game:GetService("Players")
local localPlayer=l11lllll.LocalPlayer
while not localPlayer do
task.wait() localPlayer=l11lllll.LocalPlayer
end
local _fwxrf_y_sp,_xrdj_vtwj=game:GetService("ReplicatedStorage"),game:GetService("Workspace")
local _lI1lI1III1I1l,lIIIIllll11I1=game:GetService("HttpService"),game:GetService("TeleportService")
local hubState={Running=true,Folder="DragonTD_Macros",LobbyId=103076556916764,MatchId=90749532382026,Connections={},Settings={},Actions={},Existing={},Handles={},RecordHandles={},Next={},Widgets={},Jobs={},Head=1,Serial=0,Round=1,Status="Ready",Internal=setmetatable({},{__mode="k"}),Matches=0,FPS={},Hidden={}} executorEnvironment.DragonTDHub=hubState
local hubSettings={MoveAround=false,BlackScreen=false,Mode="Standard",AutoRelic=false,Players="1",Map="Sunny Meadow",AutoJoin=false,JoinDelay=1,Amount="1",SummonDelay=2,AutoSummon=false,AutoReady=false,AutoSkip=false,StopSkipAt="",SkipDelay=1,Speed="2",AutoSpeed=false,SpeedDelay=1,AutoSell=false,SellAtWave=20,SellDelay=1,EndAction="None",EndDelay=1,Profile="",NewProfile="",PlaybackMode="Hybrid",AutoPlayback=false,AutoExecute=true,AutoRejoin=true,HideName=false,HideUser=false,FPSBoost=false,AntiAFK=true,WebhookURL="",WebhookEnabled=false,WebhookMatchEnd=true} hubState.Settings=hubSettings function hubState.Path(_ezooltz,_0x120fce)
for lIIll1I1I1l in _0x120fce:gmatch("[^/]+") do
_ezooltz=_ezooltz and _ezooltz:FindFirstChild(lIIll1I1I1l)
end
return _ezooltz
end
function hubState.PG(_11l1II11l1)
return hubState.Path(localPlayer:FindFirstChildOfClass("PlayerGui"),_11l1II11l1)
end
function hubState.Text(_vdlbxkbywenow)
if not _vdlbxkbywenow then
return ""
end
local _zbhksmzev,_0x81a78=pcall(function()
return _vdlbxkbywenow.Text
end
)
return _zbhksmzev and tostring(_0x81a78) or ""
end
function hubState.Visible(_lI1l1Il1)
if not _lI1l1Il1 then
return false
end
while _lI1l1Il1 do
if _lI1l1Il1:IsA("GuiObject") and not _lI1l1Il1.Visible or _lI1l1Il1:IsA("LayerCollector") and not _lI1l1Il1.Enabled then
return false
end
_lI1l1Il1=_lI1l1Il1.Parent
end
return true
end
function hubState.Connect(_kppwndjfusz,_1IIl1Ill)
local _tfp_irp_=_kppwndjfusz:Connect(function(...)
if hubState.Running then
return _1IIl1Ill(...)
end
end
) hubState.Connections[#hubState.Connections+1]=_tfp_irp_
return _tfp_irp_
end
function hubState.Due(lI11l1l1I,_0x6ee02)
if os.clock()<(hubState.Next[lI11l1l1I] or 0) then
return false
end
hubState.Next[lI11l1l1I]=os.clock()+_0x6ee02
return true
end
function hubState.Notify(_oqhsbswhres) hubState.Status=tostring(_oqhsbswhres)
if hubState.UI then
pcall(function() hubState.UI:Notify({Title="Dragon Tower Defense",Content=tostring(_oqhsbswhres),Duration=4})
end
)
end
end
function hubState.Remote(_yguhqzxincff)
return hubState.Path(_fwxrf_y_sp,"Remotes/" .. _yguhqzxincff)
end
function hubState.Call(I1lll11I1I,...)
local _l1ll1lIl=hubState.Remote(I1lll11I1I)
if not _l1ll1lIl then
return false,"Remote unavailable: " .. I1lll11I1I
end
local _l11l1ll1llII=coroutine.running() hubState.Internal[_l11l1ll1llII]=(hubState.Internal[_l11l1ll1llII] or 0)+1
local _p_unvkv
if _l1ll1lIl:IsA("RemoteFunction") then
_p_unvkv=table.pack(pcall(_l1ll1lIl.InvokeServer,_l1ll1lIl,...))
elseif _l1ll1lIl:IsA("RemoteEvent") then
_p_unvkv=table.pack(pcall(_l1ll1lIl.FireServer,_l1ll1lIl,...))
else
_p_unvkv={n=2,false,"Invalid remote"}
end
hubState.Internal[_l11l1ll1llII]=hubState.Internal[_l11l1ll1llII] - 1
if hubState.Internal[_l11l1ll1llII]==0 then
hubState.Internal[_l11l1ll1llII]=nil
end
return table.unpack(_p_unvkv,1,_p_unvkv.n)
end
function hubState.Own(_0xf9f2a2e5)
return typeof(_0xf9f2a2e5)=="Instance" and _0xf9f2a2e5:IsA("Model") and _0xf9f2a2e5.Parent~=nil and _0xf9f2a2e5.Parent==_xrdj_vtwj:FindFirstChild("Dragons") and tonumber(_0xf9f2a2e5:GetAttribute("Owner"))==localPlayer.UserId
end
function hubState.Troops()
local I111IlI1=_xrdj_vtwj:FindFirstChild("Dragons")
local _s_kpm__n={}
if I111IlI1 then
for _0x6da6,_0x5882243 in ipairs(I111IlI1:GetChildren()) do
if hubState.Own(_0x5882243) then
_s_kpm__n[#_s_kpm__n+1]=_0x5882243
end
end
end
return _s_kpm__n
end
function hubState.Level(_0x152737b3)
return tonumber(_0x152737b3:GetAttribute("Level"))
end
function hubState.Describe(l1III1Ill1I)
local I1I1111II=l1III1Ill1I:GetAttribute("Spot")
local _0x9eeff441=l1III1Ill1I:GetAttribute("DragonId")
if typeof(I1I1111II)~="Vector3" or type(_0x9eeff441)~="string" then
return nil
end
return {Name=_0x9eeff441,Position={I1I1111II.X,I1I1111II.Y,I1I1111II.Z}}
end
function hubState.FindDragon(_0x95afa,_0x702cf,_0x85691,_bmicpigvlhs)
local lllllIllI1II=Vector3.new(table.unpack(_0x95afa.Position))
local _hbxabjebjosxn
for _falqfoo,_plzgwhnfgiymr in ipairs(hubState.Troops()) do
local _mzppbsdccnivm=_plzgwhnfgiymr:GetAttribute("Spot")
if not (_0x702cf and _0x702cf[_plzgwhnfgiymr]) and _plzgwhnfgiymr:GetAttribute("DragonId")==_0x95afa.Name and typeof(_mzppbsdccnivm)=="Vector3" and (_mzppbsdccnivm - lllllIllI1II).Magnitude<.25 and (not _0x85691 or hubState.Level(_plzgwhnfgiymr)==_0x85691) and (not _bmicpigvlhs or _plzgwhnfgiymr:GetAttribute("Born")==_bmicpigvlhs) then
if _hbxabjebjosxn then
return nil
end
_hbxabjebjosxn=_plzgwhnfgiymr
end
end
return _hbxabjebjosxn
end
function hubState.Evolution(_0x9a18,_wzx_owqaxft,_rdkomxh_l,_kzvuseqarvv)
if hubState.Own(_0x9a18) and hubState.Level(_0x9a18)==_rdkomxh_l then
return _0x9a18
end
if hubState.Own(_0x9a18) then
return nil
end
return hubState.FindDragon(_wzx_owqaxft,_kzvuseqarvv,_rdkomxh_l,"evolve")
end
function hubState.Wait(_0x5fa9,_rjhaelb,_0xf3d0)
local _l1lI1Il=os.clock()+_rjhaelb
repeat
if not hubState.Running or _0xf3d0 and (not hubState.Playing or hubState.Serial~=_0xf3d0) then
return false
end
if _0x5fa9() then
return true
end
task.wait(.03)
until
os.clock()>_l1lI1Il
return false
end
function hubState.ExactNumber(_wtwoxgecuvvi)
if type(_wtwoxgecuvvi)=="number" then
if _wtwoxgecuvvi==_wtwoxgecuvvi and _wtwoxgecuvvi>=0 and _wtwoxgecuvvi<math.huge then
return _wtwoxgecuvvi
end
return nil
end
local _piamyatzqezjr=tostring(_wtwoxgecuvvi or ""):gsub("<[^>]+>",""):gsub(",",""):gsub("%$",""):match("^%s*(.-)%s*$")
if not _piamyatzqezjr:match("^%d+%.?%d*$") then
return nil
end
return tonumber(_piamyatzqezjr)
end
function hubState.Shared(I1ll11l11I) hubState.Modules=hubState.Modules or {}
if hubState.Modules[I1ll11l11I] then
return hubState.Modules[I1ll11l11I]
end
local _oosxpdd_myy=hubState.Path(_fwxrf_y_sp,"Shared/" .. I1ll11l11I)
if _oosxpdd_myy then
local _1lIl1Ill1ll,_0x048b1917=pcall(require,_oosxpdd_myy)
if _1lIl1Ill1ll and type(_0x048b1917)=="table" then
hubState.Modules[I1ll11l11I]=_0x048b1917
return _0x048b1917
end
end
end
function hubState.Price(_0xf65fec2,IIIIIl1l1IIll)
local _0x86afaa88,_0x4452=hubState.Shared("Relics"),hubState.Shared("Talents")
if _0x86afaa88 and _0x4452 then
local l1lIlIll1lI1l,_yojimwru=pcall(function()
return _0x86afaa88.cost(_0xf65fec2,IIIIIl1l1IIll,_0x4452.of(_0x4452.fromPlayerCached(localPlayer),_0xf65fec2))
end
)
if l1lIlIll1lI1l then
return hubState.ExactNumber(_yojimwru)
end
return nil
end
local _lI11lIII111=hubState.Shared("GameConfig")
local lI1l1l1I1=_lI11lIII111 and _lI11lIII111.DRAGONS and _lI11lIII111.DRAGONS[_0xf65fec2]
return lI1l1l1I1 and lI1l1l1I1.levels and lI1l1l1I1.levels[IIIIIl1l1IIll] and hubState.ExactNumber(lI1l1l1I1.levels[IIIIIl1l1IIll].cost)
end
function hubState.Currency(_0xd310)
local _0x08b60b9=hubState.ExactNumber(localPlayer:GetAttribute(_0xd310))
if _0x08b60b9~=nil then
return _0x08b60b9
end
local _0x7ee0dfa1=hubState.Path(localPlayer,"leaderstats/" .. _0xd310)
return _0x7ee0dfa1 and _0x7ee0dfa1:IsA("IntValue") and _0x7ee0dfa1.Value or nil
end
function hubState.StartVisible()
local I1lIlIIlIIl=_fwxrf_y_sp:FindFirstChild("Match")
local _l1l1I1ll1ll1=I1lIlIIlIIl and I1lIlIIlIIl:GetAttribute("State")
if _l1l1I1ll1ll1 then
return _l1l1I1ll1ll1=="Waiting"
end
return hubState.Visible(hubState.PG("MatchHUD/Start"))
end
function hubState.ReadState() hubState.Cash=hubState.Currency("Cash")
local _mgldphwtpd=_fwxrf_y_sp:FindFirstChild("Match")
local lIlI1111IlII1=tonumber(_mgldphwtpd and _mgldphwtpd:GetAttribute("Wave")) or tonumber(hubState.Text(hubState.PG("MatchHUD/Top/Wave/TextLabel")):match("[Ww]ave%s+(%d+)")) or 0
local _0xae59e3=os.clock()
local lI1l1I11=tonumber(_mgldphwtpd and _mgldphwtpd:GetAttribute("Speed")) or tonumber(hubState.Text(hubState.PG("MatchHUD/Top/Speed/Label")):match("([%d.]+)x"))
local _0x639ecb=_mgldphwtpd and _mgldphwtpd:GetAttribute("State") hubState.Paused=_mgldphwtpd and ((_mgldphwtpd:GetAttribute("RelicPick") or "")~="" or _0x639ecb=="RelicPick") or false
if hubState.Active and not hubState.Ended and not hubState.Paused then
hubState.Clock=hubState.Clock+math.max(0,_0xae59e3 - (hubState.ClockAt or _0xae59e3))*(hubState.LiveSpeed or lI1l1I11 or 1)
end
if lIlI1111IlII1~=hubState.Wave then
hubState.WaveAt=hubState.Clock
end
hubState.Wave,hubState.ClockAt,hubState.LiveSpeed=lIlI1111IlII1,_0xae59e3,lI1l1I11
end
hubState.Clock,hubState.WaveAt=0,0 function hubState.Clean(_0x01976)
return tostring(_0x01976 or ""):gsub("[%c<>:\"/\\|?*]",""):gsub("^%s+",""):gsub("[%s%.]+$",""):sub(1,64)
end
function hubState.ProfilePath(_0x1b857c)
local _0xb284c83=hubState.Clean(_0x1b857c)
if _0xb284c83=="" then
return nil
end
return hubState.Folder .. "/" .. _0xb284c83 .. ".json"
end
hubState.FS=type(isfile)=="function" and type(readfile)=="function" and type(writefile)=="function" and type(isfolder)=="function" and type(makefolder)=="function" hubState.ConfigPath=hubState.Folder .. "/Settings/" .. localPlayer.Name .. ".json"
if hubState.FS then
for IlI1l1l1111I11,II1l1l11I1I1 in ipairs({hubState.Folder,hubState.Folder .. "/Settings"}) do
if not isfolder(II1l1l11I1I1) then
makefolder(II1l1l11I1I1)
end
end
if isfile(hubState.ConfigPath) then
local _0x4ee398e1,_0x729abc=pcall(function()
return _lI1lI1III1I1l:JSONDecode(readfile(hubState.ConfigPath))
end
)
if _0x4ee398e1 and type(_0x729abc)=="table" then
for _0x1b40,_yfimuwjxuepdg in pairs(hubSettings) do
if type(_0x729abc[_0x1b40])==type(_yfimuwjxuepdg) then
hubSettings[_0x1b40]=_0x729abc[_0x1b40]
end
end
end
end
end
for _11III1Il,_0x5944 in ipairs({"JoinDelay","SummonDelay","SpeedDelay","SkipDelay","SellDelay","EndDelay"}) do
hubSettings[_0x5944]=math.clamp(tonumber(hubSettings[_0x5944]) or 1,.1,30)
end
hubSettings.SellAtWave=math.clamp(tonumber(hubSettings.SellAtWave) or 20,1,10000)
if not table.find({"Money","Time","Hybrid"},hubSettings.PlaybackMode) then
hubSettings.PlaybackMode="Hybrid"
end
if not table.find({"None","Replay","Return"},hubSettings.EndAction) then
hubSettings.EndAction="None"
end
function hubState.SaveConfig()
if hubState.FS then
pcall(function() writefile(hubState.ConfigPath,_lI1lI1III1I1l:JSONEncode(hubSettings))
end
)
end
end
function hubState.QueueSave()
if hubState.Saving then
return
end
hubState.Saving=true task.delay(.3,function() hubState.Saving=false
if hubState.Running then
hubState.SaveConfig()
end
end
)
end
function hubState.ValidMacro(_0x63549d)
if type(_0x63549d)~="table" or _0x63549d.Game~="Dragon Tower Defense" or type(_0x63549d.Actions)~="table" or #_0x63549d.Actions>50000 then
return false,"Invalid Dragon Tower Defense macro"
end
local function _1I1IlIllI(lIlII1Ill)
return type(lIlII1Ill)=="number" and lIlII1Ill==lIlII1Ill and math.abs(lIlII1Ill)<math.huge
end
local function _lII1lll(_wqgeugkihvqqw)
if type(_wqgeugkihvqqw)~="table" or type(_wqgeugkihvqqw.Name)~="string" or #_wqgeugkihvqqw.Name>150 or type(_wqgeugkihvqqw.Position)~="table" or #_wqgeugkihvqqw.Position~=3 then
return false
end
for _0xdca68,_njgkispwws in ipairs(_wqgeugkihvqqw.Position) do
if not _1I1IlIllI(_njgkispwws) then
return false
end
end
return _wqgeugkihvqqw.Name~=""
end
for _lIIIlII1,_flfe_ewv in ipairs(_0x63549d.Actions) do
if type(_flfe_ewv)~="table" or not table.find({"Place","Upgrade","Sell","Target","Skip"},_flfe_ewv.Kind) or not _1I1IlIllI(_flfe_ewv.Time) or _flfe_ewv.Time<0 then
return false,"Invalid action"
end
if _flfe_ewv.Cost~=nil and (not _1I1IlIllI(_flfe_ewv.Cost) or _flfe_ewv.Cost<0) then
return false,"Invalid cost"
end
if _flfe_ewv.Kind~="Skip" and type(_flfe_ewv.Handle)~="string" then
return false,"Invalid handle"
end
if _flfe_ewv.Kind=="Place" and not _lII1lll(_flfe_ewv.Troop) then
return false,"Invalid placement"
end
if _flfe_ewv.WaveTime~=nil and (not _1I1IlIllI(_flfe_ewv.WaveTime) or _flfe_ewv.WaveTime<0 or not _1I1IlIllI(_flfe_ewv.Wave) or _flfe_ewv.Wave<0 or _flfe_ewv.Wave%1~=0) then
return false,"Invalid wave timing"
end
if _flfe_ewv.Kind=="Upgrade" and (not _1I1IlIllI(_flfe_ewv.Level) or _flfe_ewv.Level<2 or _flfe_ewv.Level%1~=0) then
return false,"Invalid level"
end
if _flfe_ewv.Kind=="Target" and (type(_flfe_ewv.Value)~="string" or #_flfe_ewv.Value>40) then
return false,"Invalid targeting"
end
end
if _0x63549d.Existing~=nil and type(_0x63549d.Existing)~="table" then
return false,"Invalid existing towers"
end
for Il11l11lIl1,lII1lIl1 in pairs(_0x63549d.Existing or {}) do
if type(Il11l11lIl1)~="string" or not _lII1lll(lII1lIl1) then
return false,"Invalid existing tower"
end
end
return true
end
function hubState.SaveMacro()
if not hubState.FS or not hubState.ProfilePath(hubSettings.Profile) then
return false,"File APIs or name missing"
end
local _0xc5a780={Schema=1,Game="Dragon Tower Defense",Name=hubSettings.Profile,Actions=hubState.Actions,Existing=hubState.Existing,Map=hubState.RecordMap}
local _gwkwgn_lxsjb,_0x7f40=hubState.ValidMacro(_0xc5a780)
if not _gwkwgn_lxsjb then
return false,_0x7f40
end
return pcall(function()
local _0x6f4e3c6=hubState.ProfilePath(hubSettings.Profile)
local _eevkwtilxb=_lI1lI1III1I1l:JSONEncode(_0xc5a780) writefile(_0x6f4e3c6 .. ".pending",_eevkwtilxb) assert(readfile(_0x6f4e3c6 .. ".pending")==_eevkwtilxb,"Verification failed")
if isfile(_0x6f4e3c6) then
writefile(_0x6f4e3c6 .. ".bak",readfile(_0x6f4e3c6))
end
writefile(_0x6f4e3c6,_eevkwtilxb) assert(readfile(_0x6f4e3c6)==_eevkwtilxb,"Verification failed")
if type(delfile)=="function" then
delfile(_0x6f4e3c6 .. ".pending")
end
end
)
end
function hubState.ListMacros()
local _hhcplkdts_ts={}
if hubState.FS and type(listfiles)=="function" then
for _IlII111I111I1,I11l1lIII in ipairs(listfiles(hubState.Folder)) do
local lI1I1IlIl1l=I11l1lIII:match("([^/\\]+)%.json$")
if lI1I1IlIl1l then
_hhcplkdts_ts[#_hhcplkdts_ts+1]=lI1I1IlIl1l
end
end
end
table.sort(_hhcplkdts_ts)
return _hhcplkdts_ts
end
function hubState.LoadMacro(_pcnnmasel)
if hubState.Recording or hubState.Playing then
return false,"Stop macro first"
end
local _0xd243cc7b=hubState.ProfilePath(_pcnnmasel)
if not hubState.FS or not _0xd243cc7b or not isfile(_0xd243cc7b) then
return false,"Macro not found"
end
local _0x45b0027,lIII1lll1=pcall(function()
return _lI1lI1III1I1l:JSONDecode(readfile(_0xd243cc7b))
end
)
if not _0x45b0027 then
return false,"Invalid JSON"
end
local II111IlIIIlII1,IllllI111lIlIl=hubState.ValidMacro(lIII1lll1)
if not II111IlIIIlII1 then
return false,IllllI111lIlIl
end
hubState.Actions,hubState.Existing,hubSettings.Profile=lIII1lll1.Actions,lIII1lll1.Existing or {},hubState.Clean(_pcnnmasel) hubState.RecordMap=lIII1lll1.Map hubState.QueueSave()
return true
end
function hubState.DragonSnapshot()
local IIl11I11={}
for _vltkhjn,_lIIlI1II11 in ipairs(hubState.Troops()) do
IIl11I11[_lIIlI1II11]=true
end
return IIl11I11
end
function hubState.BindCash()
local _1Ill1II1Il11I=localPlayer:GetAttribute("Cash")~=nil
local _0x89c8799=_1Ill1II1Il11I and localPlayer or hubState.Path(localPlayer,"leaderstats/Cash")
if _0x89c8799==hubState.CashObject and _1Ill1II1Il11I==hubState.CashAttribute then
return
end
if hubState.CashConnection then
hubState.CashConnection:Disconnect() hubState.CashConnection=nil
end
hubState.CashObject,hubState.CashAttribute=_0x89c8799,_1Ill1II1Il11I hubState.CashDebitVersion=(hubState.CashDebitVersion or 0)+1 hubState.Debits={}
if not _0x89c8799 then
return
end
local _I1I111I1ll1=hubState.Currency("Cash")
local _0x6d2dc857=_1Ill1II1Il11I and localPlayer:GetAttributeChangedSignal("Cash") or _0x89c8799.Changed hubState.CashConnection=hubState.Connect(_0x6d2dc857,function()
local _jzfmoqcfqozs=hubState.Currency("Cash")
if _jzfmoqcfqozs and _I1I111I1ll1 and _jzfmoqcfqozs<_I1I111I1ll1 then
local _0x1821=hubState.Debits _0x1821[#_0x1821+1]={At=os.clock(),Cost=_I1I111I1ll1 - _jzfmoqcfqozs}
while #_0x1821>64 do
table.remove(_0x1821,1)
end
end
_I1I111I1ll1=_jzfmoqcfqozs
end
)
end
function hubState.BeginRecord(llIII111,_0xa493c)
if not hubState.Recording or hubState.Closing or hubState.Internal[coroutine.running()] then
return
end
hubState.ReadState()
local _nplfnhfydf={Name=llIII111,Args=_0xa493c,Time=hubState.Clock,Wave=hubState.Wave,WaveTime=math.max(0,hubState.Clock - hubState.WaveAt),Token=hubState.RecordToken}
if llIII111=="PlaceDragon" then
if type(_0xa493c[1])~="string" or typeof(_0xa493c[2])~="Vector3" then
return
end
local _1II1lI11ll1=_0xa493c[2] _nplfnhfydf.Desc={Name=_0xa493c[1],Position={_1II1lI11ll1.X,_1II1lI11ll1.Y,_1II1lI11ll1.Z}} _nplfnhfydf.Before=hubState.DragonSnapshot()
elseif llIII111~="VoteSkip" then
local _qutywkqfzxnx=_0xa493c[1]
if not hubState.Own(_qutywkqfzxnx) then
return
end
_nplfnhfydf.Dragon,_nplfnhfydf.Desc,_nplfnhfydf.Level=_qutywkqfzxnx,hubState.Describe(_qutywkqfzxnx),hubState.Level(_qutywkqfzxnx)
if not _nplfnhfydf.Desc or not _nplfnhfydf.Level then
return
end
if llIII111=="UpgradeDragon" then
_nplfnhfydf.Before=hubState.DragonSnapshot()
end
end
if _nplfnhfydf.Before then
hubState.BindCash() _nplfnhfydf.Sent,_nplfnhfydf.CashVersion=os.clock(),hubState.CashDebitVersion _nplfnhfydf.Price=hubState.Price(_nplfnhfydf.Desc.Name,llIII111=="PlaceDragon" and 1 or _nplfnhfydf.Level+1)
end
hubState.Jobs[#hubState.Jobs+1]=_nplfnhfydf
return _nplfnhfydf
end
function hubState.EndRecord(_xiuwolgepnw,l1l1lI11IllIll) _xiuwolgepnw.Result,_xiuwolgepnw.Returned,_xiuwolgepnw.Done=l1l1lI11IllIll,os.clock(),true
end
function hubState.RecordHandle(_0x298c18b,_0x8961f,_naiqhjiajbxh)
local _0x41a92cc=hubState.RecordHandles[_0x298c18b]
if _0x41a92cc then
return _0x41a92cc
end
hubState.HandleSerial=hubState.HandleSerial+1 _0x41a92cc="T" .. hubState.HandleSerial hubState.RecordHandles[_0x298c18b]=_0x41a92cc
if not _naiqhjiajbxh then
hubState.Existing[_0x41a92cc]=_0x8961f
end
return _0x41a92cc
end
function hubState.RecordCost(_adxwguv)
if _adxwguv.CashVersion~=hubState.CashDebitVersion then
return nil
end
local _etgnwlk_ytu=_adxwguv.Returned+.18
for l1lll1I1lI=hubState.Head+1,#hubState.Jobs do
local _mfkrshf_yn=hubState.Jobs[l1lll1I1lI]
if _mfkrshf_yn.Sent then
if _mfkrshf_yn.Sent<=_adxwguv.Returned then
return nil
end
_etgnwlk_ytu=math.min(_etgnwlk_ytu,_mfkrshf_yn.Sent)
break
end
end
local _0x874ceaca
for I1ll1Il1Il1Il,_ddpnhxrpe_ in ipairs(hubState.Debits) do
if _ddpnhxrpe_.At>=_adxwguv.Sent and _ddpnhxrpe_.At<_etgnwlk_ytu and not _ddpnhxrpe_.Used then
if _0x874ceaca then
return nil
end
_0x874ceaca=_ddpnhxrpe_
end
end
if _0x874ceaca then
_0x874ceaca.Used=true
return _0x874ceaca.Cost
end
end
function hubState.RecordJob(_o_kkddzz)
if not hubState.Recording or hubState.RecordToken~=_o_kkddzz.Token then
return
end
if not _o_kkddzz.Result[1] or _o_kkddzz.Name~="VoteSkip" and _o_kkddzz.Result[2]~=true then
return
end
local function _hbeuqlc()
return hubState.Recording and hubState.RecordToken==_o_kkddzz.Token
end
local _llIIl1lIIIl={Time=_o_kkddzz.Time,Wave=_o_kkddzz.Wave,WaveTime=_o_kkddzz.WaveTime}
if _o_kkddzz.Name=="VoteSkip" then
_llIIl1lIIIl.Kind="Skip"
elseif _o_kkddzz.Name=="PlaceDragon" then
local _0xccc400fc hubState.Wait(function() _0xccc400fc=hubState.FindDragon(_o_kkddzz.Desc,_o_kkddzz.Before,1,"place")
return _0xccc400fc~=nil or not _hbeuqlc()
end
,2)
if not _0xccc400fc then
hubState.RecordFault="Placement receipt missing"
return
end
_llIIl1lIIIl.Kind,_llIIl1lIIIl.Troop,_llIIl1lIIIl.Handle="Place",_o_kkddzz.Desc,hubState.RecordHandle(_0xccc400fc,_o_kkddzz.Desc,true)
elseif _o_kkddzz.Name=="UpgradeDragon" then
local _mjfuwemlntlyn hubState.Wait(function() _mjfuwemlntlyn=hubState.Evolution(_o_kkddzz.Dragon,_o_kkddzz.Desc,_o_kkddzz.Level+1,_o_kkddzz.Before)
return _mjfuwemlntlyn~=nil or not _hbeuqlc()
end
,2)
if not _mjfuwemlntlyn then
hubState.RecordFault="Upgrade receipt missing"
return
end
_llIIl1lIIIl.Kind,_llIIl1lIIIl.Level,_llIIl1lIIIl.Handle="Upgrade",_o_kkddzz.Level+1,hubState.RecordHandle(_o_kkddzz.Dragon,_o_kkddzz.Desc,false) hubState.RecordHandles[_mjfuwemlntlyn]=_llIIl1lIIIl.Handle
elseif _o_kkddzz.Name=="SellDragon" then
_llIIl1lIIIl.Kind,_llIIl1lIIIl.Handle="Sell",hubState.RecordHandle(_o_kkddzz.Dragon,_o_kkddzz.Desc,false)
elseif _o_kkddzz.Name=="SetTarget" then
if not table.find({"First","Last","Closest","Strongest","Weakest","Random"},_o_kkddzz.Args[2]) then
return
end
_llIIl1lIIIl.Kind,_llIIl1lIIIl.Value,_llIIl1lIIIl.Handle="Target",_o_kkddzz.Args[2],hubState.RecordHandle(_o_kkddzz.Dragon,_o_kkddzz.Desc,false)
end
if _o_kkddzz.Sent then
local _zugjruqgd=_o_kkddzz.Returned+.18 - os.clock()
if _zugjruqgd>0 then
task.wait(_zugjruqgd)
end
_llIIl1lIIIl.Cost=_o_kkddzz.Price or hubState.RecordCost(_o_kkddzz)
if not _llIIl1lIIIl.Cost then
hubState.RecordFault="Price unconfirmed for " .. _o_kkddzz.Desc.Name
end
end
if _hbeuqlc() then
hubState.Actions[#hubState.Actions+1]=_llIIl1lIIIl
end
end
function hubState.WaitForFunds(I11I1lII1l1I,_0xd7202fe)
if type(I11I1lII1l1I)~="number" then
return false,"Price unavailable. Record this action again."
end
local _0xe08eb=hubState.Wait(function()
local _bdidtktyarzj=hubState.Currency("Cash")
if hubState.Ended then
return true
end
if _bdidtktyarzj and _bdidtktyarzj>=I11I1lII1l1I and not hubState.Paused then
return true
end
hubState.Status="Waiting for cash: " .. tostring(_bdidtktyarzj or "?") .. " / " .. I11I1lII1l1I
return false
end
,600,_0xd7202fe)
return _0xe08eb and not hubState.Ended,"Funds wait stopped"
end
function hubState.DoAction(_zbsdqwjiu,_0x298f)
if _zbsdqwjiu.Kind=="Skip" then
if hubState.Wave>(_zbsdqwjiu.Wave or 0) or hubSettings.AutoSkip then
return true
end
return hubState.Call("VoteSkip")
end
if _zbsdqwjiu.Kind=="Place" then
local l1lI1lIIll1111=hubState.DragonSnapshot()
local _0x63607=false
local _0x8679,_0xd18da19=hubState.RetryPlacement({Alive=function()
return hubState.Running and hubState.Playing and hubState.Serial==_0x298f and not hubState.Ended
end
,Cash=function()
return hubState.Currency("Cash")
end
,Gate=function()
return hubState.WaitForFunds(hubState.Price(_zbsdqwjiu.Troop.Name,1) or _zbsdqwjiu.Cost,_0x298f)
end
,Observe=function()
return hubState.FindDragon(_zbsdqwjiu.Troop,l1lI1lIIll1111,1,"place")
end
,Changed=function()
if _0x63607 then
return "accepted"
end
for _tls_tlpx,_tqtcmbprxri in ipairs(hubState.Troops()) do
if not l1lI1lIIll1111[_tqtcmbprxri] and _tqtcmbprxri:GetAttribute("Born")=="place" and _tqtcmbprxri:GetAttribute("DragonId")==_zbsdqwjiu.Troop.Name then
return true
end
end
end
,Status=function(_fklnxbcelp) hubState.Status="Placement retry " .. _fklnxbcelp .. "/5"
end
,Send=function() hubState.Status="Placing " .. _zbsdqwjiu.Troop.Name
local _ewgdbkactdodd,I11l11lI1I1Il,IIl1l1l1I1111I=hubState.Call("PlaceDragon",_zbsdqwjiu.Troop.Name,Vector3.new(table.unpack(_zbsdqwjiu.Troop.Position))) _0x63607=I11l11lI1I1Il==true
return _ewgdbkactdodd,IIl1l1l1I1111I or I11l11lI1I1Il
end
})
if not _0x8679 then
return false,_0xd18da19
end
hubState.Handles[_zbsdqwjiu.Handle]=_0xd18da19
return true
end
local IIllll11llIIl1=hubState.Handles[_zbsdqwjiu.Handle]
if not hubState.Own(IIllll11llIIl1) and hubState.Existing[_zbsdqwjiu.Handle] then
IIllll11llIIl1=hubState.FindDragon(hubState.Existing[_zbsdqwjiu.Handle]) hubState.Handles[_zbsdqwjiu.Handle]=IIllll11llIIl1
end
if not hubState.Own(IIllll11llIIl1) then
return false,"Missing dragon: " .. _zbsdqwjiu.Handle
end
if _zbsdqwjiu.Kind=="Upgrade" then
local _0x980e3f=hubState.Level(IIllll11llIIl1)
if _0x980e3f==_zbsdqwjiu.Level then
return true
end
if _0x980e3f~=_zbsdqwjiu.Level - 1 then
return false,"Unexpected dragon level"
end
local II1IllIl=hubState.Describe(IIllll11llIIl1)
if not II1IllIl then
return false,"Dragon position unavailable"
end
local II11l1I1l,_mvdeowcl_ftcr=hubState.WaitForFunds(hubState.Price(II1IllIl.Name,_zbsdqwjiu.Level) or _zbsdqwjiu.Cost,_0x298f)
if not II11l1I1l then
return false,_mvdeowcl_ftcr
end
local _0x2ed88=hubState.DragonSnapshot() hubState.Status="Upgrading " .. II1IllIl.Name
local _0xbe32,I1lll1lllIl1I,_0x8a1b6f=hubState.Call("UpgradeDragon",IIllll11llIIl1)
if not _0xbe32 or I1lll1lllIl1I~=true then
return false,tostring(_0x8a1b6f or I1lll1lllIl1I)
end
local Il111llI1l hubState.Wait(function() Il111llI1l=hubState.Evolution(IIllll11llIIl1,II1IllIl,_zbsdqwjiu.Level,_0x2ed88)
return Il111llI1l~=nil
end
,2,_0x298f)
if not Il111llI1l then
return false,"Upgrade receipt missing"
end
hubState.Handles[_zbsdqwjiu.Handle]=Il111llI1l
return true
end
if _zbsdqwjiu.Kind=="Sell" then
local lIlIIl11I111,_fyizshkvvzc,_brvkhpnlt=hubState.Call("SellDragon",IIllll11llIIl1)
if not lIlIIl11I111 or _fyizshkvvzc~=true then
return false,tostring(_brvkhpnlt or _fyizshkvvzc)
end
return hubState.Wait(function()
return not hubState.Own(IIllll11llIIl1)
end
,2,_0x298f),"Sell receipt missing"
end
if _zbsdqwjiu.Kind=="Target" then
if IIllll11llIIl1:GetAttribute("Target")==_zbsdqwjiu.Value then
return true
end
local _cvpjyqoqiqbra,_jmsomwbm,_0xf009406=hubState.Call("SetTarget",IIllll11llIIl1,_zbsdqwjiu.Value)
if not _cvpjyqoqiqbra or _jmsomwbm~=true then
return false,tostring(_0xf009406 or _jmsomwbm)
end
return hubState.Wait(function()
return hubState.Own(IIllll11llIIl1) and IIllll11llIIl1:GetAttribute("Target")==_zbsdqwjiu.Value
end
,2,_0x298f),"Target receipt missing"
end
return false,"Unsupported action"
end
function hubState.InstallRouter()
if game.PlaceId~=hubState.MatchId then
return
end
local Il11lIllll1I=executorEnvironment.__DragonTDRouter
if Il11lIllll1I then
Il11lIllll1I.Hub=hubState hubState.Router=Il11lIllll1I Il11lIllll1I.Targets={}
for _0xdd923,_II1I11l1 in ipairs({"PlaceDragon","UpgradeDragon","SellDragon","SetTarget","VoteSkip"}) do
local I1lIl1IIIl1II=hubState.Remote(_II1I11l1)
if I1lIl1IIIl1II then
Il11lIllll1I.Targets[I1lIl1IIIl1II]=_II1I11l1
end
end
return
end
local _0x872ac8b=hubState.Remote("PlaceDragon")
local _chiqkirzrwos=hubState.Remote("VoteSkip")
if not _0x872ac8b or not _chiqkirzrwos or type(hookmetamethod)~="function" or type(getnamecallmethod)~="function" then
return
end
local __hd_sgxov_d={Hub=hubState,Busy=setmetatable({},{__mode="k"}),Targets={},Invoke=_0x872ac8b.InvokeServer,Fire=_chiqkirzrwos.FireServer}
for IllllIlIl1,_0xc47017c in ipairs({"PlaceDragon","UpgradeDragon","SellDragon","SetTarget","VoteSkip"}) do
local _1Il1I11llI1l1=hubState.Remote(_0xc47017c)
if _1Il1I11llI1l1 then
__hd_sgxov_d.Targets[_1Il1I11llI1l1]=_0xc47017c
end
end
local function _nhyudjmyoikd(l1I11Il11,self,...)
local _0x2357533=__hd_sgxov_d.Hub
local _llI1l1l=coroutine.running()
local _0x808ec1b3=__hd_sgxov_d.Targets[self]
if not _0x2357533 or not _0x2357533.Running or not _0x2357533.Recording or not _0x808ec1b3 or __hd_sgxov_d.Busy[_llI1l1l] or _0x2357533.Internal[_llI1l1l] or type(checkcaller)=="function" and checkcaller() then
return l1I11Il11(self,...)
end
__hd_sgxov_d.Busy[_llI1l1l]=true
local _blsncsoxufz,_rhbzertlzdb=pcall(_0x2357533.BeginRecord,_0x808ec1b3,table.pack(...))
local _jrjrxbxtcg=table.pack(pcall(l1I11Il11,self,...))
if _blsncsoxufz and _rhbzertlzdb then
local _emunuuxyzl,_lIII1l1=pcall(_0x2357533.EndRecord,_rhbzertlzdb,_jrjrxbxtcg)
if not _emunuuxyzl then
_rhbzertlzdb.Done=true _0x2357533.RecordFault=tostring(_lIII1l1)
end
end
__hd_sgxov_d.Busy[_llI1l1l]=nil
if not _jrjrxbxtcg[1] then
error(_jrjrxbxtcg[2],0)
end
return table.unpack(_jrjrxbxtcg,2,_jrjrxbxtcg.n)
end
local _0x0dfadf7=type(newcclosure)=="function" and newcclosure or function(lllIlI1I)
return lllIlI1I
end
local _0x031b3d0
local _l11lIl1I1I1Il=pcall(function() _0x031b3d0=hookmetamethod(game,"__namecall",_0x0dfadf7(function(self,...)
local _isrcfqrmgdfph=getnamecallmethod()
if __hd_sgxov_d.Targets[self] and (_isrcfqrmgdfph=="InvokeServer" or _isrcfqrmgdfph=="FireServer") then
return _nhyudjmyoikd(_isrcfqrmgdfph=="InvokeServer" and __hd_sgxov_d.Invoke or __hd_sgxov_d.Fire,self,...)
end
return _0x031b3d0(self,...)
end
))
end
)
if type(hookfunction)=="function" then
for _ruzus_uhbj,_cspwvrzrevpn in ipairs({__hd_sgxov_d.Invoke,__hd_sgxov_d.Fire}) do
local llI1IllI
local _111I1ll1IIIlI=pcall(function() llI1IllI=hookfunction(_cspwvrzrevpn,_0x0dfadf7(function(self,...)
return _nhyudjmyoikd(llI1IllI,self,...)
end
))
end
)
if _111I1ll1IIIlI then
__hd_sgxov_d.Direct=true
end
end
end
if _l11lIl1I1I1Il or __hd_sgxov_d.Direct then
executorEnvironment.__DragonTDRouter=__hd_sgxov_d hubState.Router=__hd_sgxov_d
end
end
function hubState.StartRecord()
if hubState.Playing or hubState.Closing or hubState.Recording or hubState.RecordBusy then
return false,"Stop macro first"
end
if game.PlaceId~=hubState.MatchId or hubState.Ended then
return false,"Enter a match first"
end
if not hubState.ProfilePath(hubSettings.Profile) then
return false,"Create a macro first"
end
if not hubState.Router then
hubState.InstallRouter()
end
if not hubState.Router then
return false,"Recorder hooks unavailable"
end
hubState.Actions,hubState.Existing,hubState.RecordHandles,hubState.Jobs,hubState.Head={},{},{},{},1 hubState.HandleSerial=0 hubState.RecordToken={} hubState.ReadState() hubState.Recording=true hubState.RecordFault=nil hubState.RecordMap=hubState.MatchMap() hubState.Status="Recording"
return true
end
function hubState.StopRecord(_1l1l1lI1II1l)
if not hubState.Recording or hubState.Closing then
return
end
hubState.Closing=true
local __gvtcjjs=os.clock()+6
while hubState.Running and (hubState.RecordBusy or hubState.Head<=#hubState.Jobs) and os.clock()<__gvtcjjs do
task.wait(.03)
end
if hubState.Head<=#hubState.Jobs then
hubState.RecordFault="Some actions were still unconfirmed"
end
hubState.Recording=false hubState.Closing=false
if _1l1l1lI1II1l then
local _llI1l1lI11Ill,_l11II1IIl1Ill=hubState.SaveMacro() hubState.Notify(_llI1l1lI11Ill and "Macro saved" or _l11II1IIl1Ill)
else
hubState.Status="Stopped"
end
end
function hubState.StopPlayback() hubState.Playing=false hubState.Serial=hubState.Serial+1 hubState.Status="Stopped"
end
function hubState.RetryPlacement(_esfxismqiqca)
local IIIIl11I1Il1="Placement unconfirmed after 5 attempts"
for _cusawic=1,5 do
if not _esfxismqiqca.Alive() then
return false,"Playback cancelled"
end
local _z_mfhtfe,_0x38270ff0=_esfxismqiqca.Observe()
if _z_mfhtfe then
return true,_z_mfhtfe
end
if _0x38270ff0 then
return false,_0x38270ff0
end
if _esfxismqiqca.Gate then
local _0x1f3a29d,_1lll1II=_esfxismqiqca.Gate()
if not _0x1f3a29d then
return false,_1lll1II
end
end
if not _esfxismqiqca.Alive() then
return false,"Playback cancelled"
end
_z_mfhtfe,_0x38270ff0=_esfxismqiqca.Observe()
if _z_mfhtfe then
return true,_z_mfhtfe
end
if _0x38270ff0 then
return false,_0x38270ff0
end
local IIlI1lI1IlI1II=_esfxismqiqca.Cash and _esfxismqiqca.Cash()
local _clmrwkjse=os.clock()
local llIlll1IIIl1,_tmcylumr_=_esfxismqiqca.Send(_cusawic) IIIIl11I1Il1=tostring(_tmcylumr_ or IIIIl11I1Il1)
local l1Ill1lIl11=tostring(_tmcylumr_ or ""):lower()
if l1Ill1lIl11:find("unsupported",1,true) or l1Ill1lIl11:find("invalid unit",1,true) or l1Ill1lIl11:find("not equipped",1,true) then
return false,tostring(_tmcylumr_)
end
repeat
if not _esfxismqiqca.Alive() then
return false,"Playback cancelled"
end
_z_mfhtfe,_0x38270ff0=_esfxismqiqca.Observe()
if _z_mfhtfe then
return true,_z_mfhtfe
end
if _0x38270ff0 then
return false,_0x38270ff0
end
if os.clock()>=_clmrwkjse+2 then
break
end
task.wait(math.min(.03,math.max(.001,_clmrwkjse+2 - os.clock())))
until
false _z_mfhtfe,_0x38270ff0=_esfxismqiqca.Observe()
if _z_mfhtfe then
return true,_z_mfhtfe
end
if _0x38270ff0 then
return false,_0x38270ff0
end
if not llIlll1IIIl1 then
return false,"Placement transport uncertain: " .. IIIIl11I1Il1
end
local _lIIlIlI1lII=_esfxismqiqca.Cash and _esfxismqiqca.Cash()
if type(IIlI1lI1IlI1II)=="number" and type(_lIIlIlI1lII)=="number" and _lIIlIlI1lII<IIlI1lI1IlI1II then
return false,"Placement changed cash; confirmation missing, no duplicate resend"
end
local IIlI111l=_esfxismqiqca.Changed and _esfxismqiqca.Changed()
if IIlI111l=="accepted" then
local lIIlII11I=os.clock()+6
repeat
if not _esfxismqiqca.Alive() then
return false,"Playback cancelled"
end
_z_mfhtfe,_0x38270ff0=_esfxismqiqca.Observe()
if _z_mfhtfe then
return true,_z_mfhtfe
end
if _0x38270ff0 then
return false,_0x38270ff0
end
task.wait(.03)
until
os.clock()>=lIIlII11I
return false,"Placement accepted but replication unconfirmed; no duplicate resend"
end
if IIlI111l then
return false,"New placement state is ambiguous; no duplicate resend"
end
if _esfxismqiqca.Status then
_esfxismqiqca.Status(_cusawic)
end
end
return false,"Placement unconfirmed after 5 attempts: " .. IIIIl11I1Il1
end
function hubState.StartPlayback()
if hubState.Recording or hubState.Playing or hubState.Closing or #hubState.Actions==0 then
return false,"Select a macro and stop recording"
end
if game.PlaceId~=hubState.MatchId or hubState.Ended then
return false,"Enter a match first"
end
if not hubState.Active then
return false,"Wait for the match to start"
end
hubState.Playing=true hubState.Serial=hubState.Serial+1
local _beyvhkvk=hubState.Serial hubState.Handles={} hubState.ReadState() hubState.Status="Playback" task.spawn(function()
local _III1llII11,_0xe9b46=pcall(function()
for I1ll1I11ll1l1,IIIl11lIl in ipairs(hubState.Actions) do
if not hubState.Playing or hubState.Serial~=_beyvhkvk or hubState.Ended then
return
end
hubState.PlaybackIndex=I1ll1I11ll1l1
if hubSettings.PlaybackMode~="Money" then
local function _brbvoql()
if hubState.Ended then
return true
end
if hubSettings.PlaybackMode=="Hybrid" and IIIl11lIl.WaveTime and IIIl11lIl.Wave>0 then
return hubState.Wave>IIIl11lIl.Wave or hubState.Wave==IIIl11lIl.Wave and hubState.Clock - hubState.WaveAt>=IIIl11lIl.WaveTime
end
return hubState.Clock>=IIIl11lIl.Time
end
if not hubState.Wait(_brbvoql,900,_beyvhkvk) then
if hubState.Serial==_beyvhkvk then
error("Action " .. I1ll1I11ll1l1 .. ": timing wait expired",0)
end
return
end
if hubState.Ended then
return
end
end
local _0xf6903d4f,_pwrgqxelpwdd=hubState.DoAction(IIIl11lIl,_beyvhkvk)
if not _0xf6903d4f then
error("Action " .. I1ll1I11ll1l1 .. ": " .. tostring(_pwrgqxelpwdd),0)
end
end
end
)
if hubState.Serial==_beyvhkvk then
hubState.Playing=false hubState.Status=_III1llII11 and "Playback complete" or tostring(_0xe9b46)
end
end
)
return true
end
function hubState.QueueTeleport()
if not hubSettings.AutoExecute or not hubState.FS or executorEnvironment.__DragonTDQueued then
return
end
local _skjeiac_l=queue_on_teleport or queueonteleport or syn and syn.queue_on_teleport
if type(_skjeiac_l)~="function" then
return
end
local _0x2b8b57=string.format("if game.PlaceId==103076556916764 or game.PlaceId==90749532382026 then\n local ok,cfg=pcall(function()return game:GetService(\"HttpService\"):JSONDecode(readfile(%q))end)\n if (not ok or cfg.AutoExecute~=false)and isfile(\"DragonTD_Macros/Hub.lua\")then local run=loadstring(readfile(\"DragonTD_Macros/Hub.lua\"));if run then run()end end\n end",hubState.ConfigPath)
local _0xdf63a2=pcall(_skjeiac_l,_0x2b8b57)
if _0xdf63a2 then
executorEnvironment.__DragonTDQueued=true
end
end
function hubState.RejoinStep()
if hubState.Recovery and hubState.Recovery.Busy() then
return
end
if not hubSettings.AutoRejoin or not hubState.Running or not hubState.Due("RejoinCheck",1) then
return
end
local _0x7fa8649=hubState.Disconnected
if not _0x7fa8649 then
local _0xefe1d5f=game:GetService("CoreGui")
local _zizqabjqut=_0xefe1d5f:FindFirstChild("RobloxPromptGui")
local Il1ll11ll1ll1=_zizqabjqut and _zizqabjqut:FindFirstChild("ErrorPrompt",true)
if hubState.Visible(Il1ll11ll1ll1) then
for _0xe0c0899f,_0xfd6b178 in ipairs(Il1ll11ll1ll1:GetDescendants()) do
local _0x5a0b13e8=hubState.Text(_0xfd6b178):lower()
if _0x5a0b13e8:find("disconnect",1,true) or _0x5a0b13e8:find("connection",1,true) or _0x5a0b13e8:find("kicked",1,true) or _0x5a0b13e8:match("error%s*code%s*:%s*%d+") then
_0x7fa8649=true
break
end
end
end
end
if not _0x7fa8649 or hubState.RejoinAt and os.clock() - hubState.RejoinAt<30 or not hubState.Due("RejoinAttempt",10) then
return
end
hubState.RejoinAt=os.clock() hubState.SaveConfig() hubState.QueueTeleport()
local _idmgsfyqojle,_0xd41a87=pcall(lIIIIllll11I1.Teleport,lIIIIllll11I1,hubState.LobbyId,localPlayer)
if not _idmgsfyqojle then
hubState.RejoinAt=nil hubState.LastError="Auto Rejoin: " .. tostring(_0xd41a87)
end
end
function hubState.SendWebhook(l11I1III)
if not hubSettings.WebhookEnabled or hubSettings.WebhookURL=="" or not l11I1III and not hubSettings.WebhookMatchEnd then
return false,"Webhook disabled"
end
local llIIl11l1I1=request or http_request or syn and syn.request or fluxus and fluxus.request
if type(llIIl11l1I1)~="function" then
return false,"HTTP unavailable"
end
if not hubSettings.WebhookURL:match("^https://discord%.com/api/webhooks/") and not hubSettings.WebhookURL:match("^https://discordapp%.com/api/webhooks/") then
return false,"Invalid webhook URL"
end
local _0x410bdd1={username="Cactus Hub",allowed_mentions={parse={}},embeds={hubState.BuildMatchEmbed(l11I1III)}}
local III11IIll1I11l,_hjdszhtqdai=pcall(llIIl11l1I1,{Url=hubSettings.WebhookURL,Method="POST",Headers={["Content-Type"]="application/json"},Body=_lI1lI1III1I1l:JSONEncode(_0x410bdd1)})
local _pjtpt_yd=III11IIll1I11l and type(_hjdszhtqdai)=="table" and tonumber(_hjdszhtqdai.StatusCode or _hjdszhtqdai.Status)
return III11IIll1I11l and _pjtpt_yd and _pjtpt_yd>=200 and _pjtpt_yd<300 or false,III11IIll1I11l and "HTTP " .. tostring(_pjtpt_yd) or tostring(_hjdszhtqdai)
end
function hubState.Destroy()
if not hubState.Running then
return
end
hubState.Running=false hubState.StopPlayback() hubState.Recording=false hubState.SaveConfig()
for _yrmktbnogc,_0x596f79d6 in ipairs(hubState.Connections) do
pcall(_0x596f79d6.Disconnect,_0x596f79d6)
end
if hubState.Router and hubState.Router.Hub==hubState then
hubState.Router.Hub=nil
end
if hubState.BlackScreenController then
pcall(hubState.BlackScreenController.Destroy)
end
if hubState.HideUserController then
pcall(hubState.HideUserController.Destroy)
end
if hubState.SetFPS then
pcall(hubState.SetFPS,false)
end
if hubState.SetHide then
pcall(hubState.SetHide,false)
end
if hubState.Window then
pcall(hubState.Window.Destroy,hubState.Window)
end
if executorEnvironment.DragonTDHub==hubState then
executorEnvironment.DragonTDHub=nil
end
end
function hubState.PadPart(_0xe6be)
if _0xe6be:IsA("BasePart") then
return _0xe6be
end
for I1l1IIlII1,_0x43606c6 in ipairs({"Trigger","Pad","TouchPart","Zone","Platform"}) do
local _phrbassguxsez=_0xe6be:FindFirstChild(_0x43606c6,true)
if _phrbassguxsez and _phrbassguxsez:IsA("BasePart") and _phrbassguxsez.CanTouch then
return _phrbassguxsez
end
end
if _0xe6be:IsA("Model") and _0xe6be.PrimaryPart and _0xe6be.PrimaryPart.CanTouch then
return _0xe6be.PrimaryPart
end
local _ewocnezuhb
for _I1l1IlI1l1111,_0xf87aa in ipairs(_0xe6be:GetDescendants()) do
if _0xf87aa:IsA("BasePart") and _0xf87aa.CanTouch and (not _ewocnezuhb or _0xf87aa.Size.X*_0xf87aa.Size.Z>_ewocnezuhb.Size.X*_ewocnezuhb.Size.Z) then
_ewocnezuhb=_0xf87aa
end
end
return _ewocnezuhb
end
hubState.Maps={"Sunny Meadow","Castle Town","Pirate Cove","Snowy Summit","Volcano Fortress"} hubState.MapIds={["Sunny Meadow"]="SunnyMeadow",["Castle Town"]="CastleTown",["Pirate Cove"]="PirateCove",["Snowy Summit"]="SnowySummit",["Volcano Fortress"]="VolcanoFortress"} hubState.PadDifficulty={["Sunny Meadow"]="Easy",["Castle Town"]="Normal",["Pirate Cove"]="Hard",["Snowy Summit"]="Insane",["Volcano Fortress"]="Nightmare"} function hubState.EndlessJoin()
if not hubState.Due("EndlessJoin",math.max(2,hubSettings.JoinDelay)) then
return
end
local _0x28ac=hubState.Shared("Endless")
if not _0x28ac then
hubState.LobbyStatus="Waiting for Endless data"
return
end
local _0x27da8=_xrdj_vtwj:GetServerTimeNow()
if _0x27da8<_0x28ac.opensAt() and localPlayer:GetAttribute("EndlessEarly")~=true then
hubState.LobbyStatus="Endless not open"
return
end
if not _0x28ac.allowed(localPlayer:GetAttribute("TalentsUnlocked")==true,localPlayer:GetAttribute("EndlessInsaneWin")==true,localPlayer:GetAttribute("EndlessEver") or 0,_0x27da8) then
hubState.LobbyStatus=_0x28ac.lockText(_0x27da8)
return
end
local _0x2f0523=hubState.Shared("GameConfig")
local I1l11IlllIIl1l=_0x2f0523 and _0x2f0523.ENDLESS and _0x2f0523.ENDLESS.keys.max
if not I1l11IlllIIl1l then
return
end
local _0x51d2=_0x28ac.keys(localPlayer:GetAttribute("EndlessKeys") or I1l11IlllIIl1l,localPlayer:GetAttribute("EndlessKeyAt") or 0,_0x27da8,_0x28ac.level(localPlayer,"keys"))
if _0x51d2==0 then
hubState.LobbyStatus="Waiting for an Endless key"
return
end
if not hubState.EndlessEntered then
local I1lIIl1111,l11I1l11I1l=hubState.Call("EndlessHall","enter") hubState.EndlessEntered=I1lIIl1111 and l11I1l11I1l==true
return
end
hubState.SaveConfig() hubState.QueueTeleport()
local llIllllIII1,_wtsnyvcp,_0x0c01c=hubState.Call("EnterEndless") hubState.LobbyStatus=llIllllIII1 and _wtsnyvcp and "Joining Endless" or tostring(_0x0c01c or "Endless join rejected")
if not llIllllIII1 or _wtsnyvcp~=true then
hubState.EndlessEntered=nil
end
end
function hubState.RelicStep()
if not hubSettings.AutoRelic or not hubState.Due("Relic",1) then
return
end
local _0xfa41b5=_fwxrf_y_sp:FindFirstChild("Match")
if not _0xfa41b5 then
return
end
local _0x7db35e=_0xfa41b5:GetAttribute("RelicPick") or ""
local IlllllIIIIIl=hubState.Shared("GameConfig")
local _wmwlaqaj=IlllllIIIIIl and IlllllIIIIIl.RELICS and IlllllIIIIIl.RELICS.list
if not _wmwlaqaj then
return
end
local _qqmadtp,_wposxdwgeisnm
for IIIl1I11I11 in _0x7db35e:gmatch("[^,]+") do
local _0xcd84b06=_wmwlaqaj[IIIl1I11I11]
if _0xcd84b06 and not _0xcd84b06.cursed then
local _0x7872=({bargain=100,claws=90,wings=85,gold=80,eye=70})[IIIl1I11I11] or 50
if not _wposxdwgeisnm or _0x7872>_wposxdwgeisnm then
_qqmadtp,_wposxdwgeisnm=IIIl1I11I11,_0x7872
end
end
end
if _qqmadtp then
hubState.Call("PickRelic",_qqmadtp)
elseif _0x7db35e=="" and (tonumber(_0xfa41b5:GetAttribute("RelicsReady")) or 0)>0 then
hubState.Call("OpenRelic")
end
end
function hubState.ResetJoin() hubState.JoinTarget,hubState.JoinAt,hubState.EndlessEntered=nil,nil,nil hubState.Next.Join,hubState.Next.StartPad=0,0
end
function hubState.NearPad(_ggqlbnwley,IlIl11II1111,__mlmo_jybfq)
local _llIll1l1=_ggqlbnwley.CFrame:PointToObjectSpace(IlIl11II1111.Position)
return math.abs(_llIll1l1.X)<=_ggqlbnwley.Size.X/2+__mlmo_jybfq and math.abs(_llIll1l1.Z)<=_ggqlbnwley.Size.Z/2+__mlmo_jybfq and math.abs(_llIll1l1.Y)<=_ggqlbnwley.Size.Y/2+8
end
function hubState.PadEmpty(_0x8b09218,_ll11I1llI1)
local _0x3222c5=hubState.Text(hubState.Path(_0x8b09218,"Status/TextLabel"))
local _0x5af25ab=tonumber(_0x3222c5:match("(%d+)%s*/%s*%d+"))
local I1lll1I1IIIl1I=_0x8b09218:GetAttribute("Group")
local Il1IIl111Ill1l=_0x8b09218:GetAttribute("Map")
if I1lll1I1IIIl1I~=nil then
if tostring(I1lll1I1IIIl1I)~="" or Il1IIl111Ill1l~=hubState.MapIds[hubSettings.Map] then
return false
end
elseif _0x5af25ab~=0 or not _0x3222c5:find(hubSettings.Map,1,true) then
return false
end
for _qtmswd__a,_jaikdoh_p in ipairs(game:GetService("Players"):GetPlayers()) do
local _0xd7580fd=_jaikdoh_p~=localPlayer and _jaikdoh_p.Character and _jaikdoh_p.Character:FindFirstChild("HumanoidRootPart")
if _0xd7580fd and hubState.NearPad(_ll11I1llI1,_0xd7580fd,2) then
return false
end
end
return true
end
function hubState.LobbyStep()
if game.PlaceId~=hubState.LobbyId or not hubSettings.AutoJoin or not hubState.Due("Join",.4) then
return
end
if hubSettings.Mode=="Endless" then
hubState.EndlessJoin()
return
end
local _fnbxvtthmu=localPlayer.Character and localPlayer.Character:FindFirstChild("HumanoidRootPart")
local _kdmbburxacg=hubState.Path(_xrdj_vtwj,"Lobby/Interact")
if not _fnbxvtthmu or not _kdmbburxacg then
return
end
for _0x49610de,_IIl1lll1 in ipairs(_kdmbburxacg:GetChildren()) do
local _0xe140c2b5=tostring(_IIl1lll1:GetAttribute("Group") or "")
if _0xe140c2b5:match("^%d+")==tostring(localPlayer.UserId) then
if _IIl1lll1:GetAttribute("Map")~=hubState.MapIds[hubSettings.Map] then
hubState.LobbyStatus="Leave the other map pad"
return
end
hubState.JoinTarget=_IIl1lll1 hubState.JoinAt=hubState.JoinAt or os.clock()
if _IIl1lll1:GetAttribute("Difficulty")~=hubState.PadDifficulty[hubSettings.Map] then
if hubState.Due("ChooseDifficulty",1) then
hubState.Call("ChooseDifficulty",_IIl1lll1.Name,hubState.PadDifficulty[hubSettings.Map])
end
return
end
local _0x8d6b1121=0
for _elewegqniq in _0xe140c2b5:gmatch("%d+") do
_0x8d6b1121=_0x8d6b1121+1
end
if _0x8d6b1121>=(tonumber(hubSettings.Players) or 1) and not _IIl1lll1:GetAttribute("Launching") and os.clock() - hubState.JoinAt>=hubSettings.JoinDelay and hubState.Due("StartPad",2) then
hubState.SaveConfig() hubState.QueueTeleport() hubState.Call("StartPad",_IIl1lll1.Name)
end
return
end
end
local lI1lIlIlII1l=hubState.PG("LobbyHUD/PadPanel")
if hubState.Visible(lI1lIlIlII1l) then
local _gxlkappt=hubState.Text(hubState.Path(lI1lIlIlII1l,"Title")):gsub("<[^>]+>","")
local _cytqvyc_svz=hubState.PadDifficulty[hubSettings.Map]
if not _cytqvyc_svz or not _gxlkappt:find(hubSettings.Map,1,true) or not _gxlkappt:find(_cytqvyc_svz,1,true) then
hubState.LobbyStatus="Move off the other map pad"
return
end
local _xockfatx=tonumber(hubState.Text(hubState.Path(lI1lIlIlII1l,"Players/Value")):match("(%d+)%s*/"))
local _0x141a20a=hubState.Path(lI1lIlIlII1l,"Start")
if hubState.Text(hubState.Path(_0x141a20a,"Label")):lower():find("teleport",1,true) then
hubState.LobbyStatus="Teleporting"
return
end
local _0xb8ffc=hubState.JoinTarget
local _0xa707f8f=_0xb8ffc and _0xb8ffc.Parent==_kdmbburxacg and hubState.PadPart(_0xb8ffc)
if not _0xa707f8f or not hubState.NearPad(_0xa707f8f,_fnbxvtthmu,1) then
_0xb8ffc=nil
for _koicdjppvdthw,II1l11ll1ll in ipairs(_kdmbburxacg:GetChildren()) do
if II1l11ll1ll.Name:match("^PlayPad%d+$") then
local _1l1I11l1l1I11=hubState.PadPart(II1l11ll1ll)
if _1l1I11l1l1I11 and hubState.NearPad(_1l1I11l1l1I11,_fnbxvtthmu,1) and hubState.Text(hubState.Path(II1l11ll1ll,"Status/TextLabel")):find(hubSettings.Map,1,true) then
if _0xb8ffc then
return
end
_0xb8ffc=II1l11ll1ll
end
end
end
end
if not _0xb8ffc then
return
end
if not _xockfatx or _xockfatx<(tonumber(hubSettings.Players) or 1) then
hubState.LobbyStatus="Waiting for players"
return
end
if hubState.JoinTarget~=_0xb8ffc then
hubState.JoinTarget,hubState.JoinAt=_0xb8ffc,os.clock()
end
if hubState.Visible(_0x141a20a) and os.clock() - (hubState.JoinAt or 0)>=hubSettings.JoinDelay and hubState.Due("StartPad",2) then
hubState.SaveConfig() hubState.QueueTeleport()
local _0xc86c=hubState.Call("StartPad",_0xb8ffc.Name) hubState.LobbyStatus=_0xc86c and "Starting " .. hubSettings.Map or "Start request failed"
end
return
end
if hubState.JoinTarget and os.clock() - (hubState.JoinAt or 0)<5 then
return
end
hubState.JoinTarget,hubState.JoinAt=nil,nil
local _mioqzmtskt,_nufdmxtp,_txdkehd
for _w_buzzn,_khtwmvye in ipairs(_kdmbburxacg:GetChildren()) do
if _khtwmvye.Name:match("^PlayPad%d+$") then
local _hvvszum=hubState.PadPart(_khtwmvye)
if _hvvszum and hubState.PadEmpty(_khtwmvye,_hvvszum) then
local _yzqztghxrl=(_fnbxvtthmu.Position - _hvvszum.Position).Magnitude
if not _mioqzmtskt or _yzqztghxrl<_mioqzmtskt then
_mioqzmtskt,_nufdmxtp,_txdkehd=_yzqztghxrl,_hvvszum,_khtwmvye
end
end
end
end
if not _nufdmxtp then
hubState.LobbyStatus="Waiting for an empty " .. hubSettings.Map .. " pad"
return
end
hubState.JoinTarget,hubState.JoinAt=_txdkehd,os.clock() hubState.LobbyStatus="Entering " .. hubSettings.Map _fnbxvtthmu.CFrame=CFrame.new(_nufdmxtp.Position+Vector3.new(0,_nufdmxtp.Size.Y/2+3,0)) _fnbxvtthmu.AssemblyLinearVelocity=Vector3.new()
end
function hubState.SummonStep()
if game.PlaceId~=hubState.LobbyId or not hubSettings.AutoSummon or not hubState.Due("Summon",hubSettings.SummonDelay) then
return
end
local _adaoutzwur_oa=hubSettings.Amount=="10" and 10 or 1
local _0x6626=hubState.ExactNumber(hubState.Text(hubState.PG("LobbyHUD/SummonWindow/Body/Buttons/Summon" .. _adaoutzwur_oa .. "/Price/TextLabel")))
local _0x500ded6=hubState.Shared("GameConfig")
local _0x4796=_0x500ded6 and _0x500ded6.SUMMON
if _0x4796 then
_0x6626=hubState.ExactNumber(_adaoutzwur_oa==10 and _0x4796.price10 or _0x4796.price)
end
local _1l1I1l1IllI=hubState.Currency("Coins")
if not _0x6626 or _0x6626<=0 or not _1l1I1l1IllI or _1l1I1l1IllI<_0x6626 then
hubState.LobbyStatus="Waiting for summon coins / price"
return
end
local _vvnvtxp,_0x1f51f8e0,l1I11lIl=hubState.Call("Summon",_adaoutzwur_oa) hubState.LobbyStatus=_vvnvtxp and _0x1f51f8e0==true and "Summoned x" .. _adaoutzwur_oa or "Summon rejected: " .. tostring(l1I11lIl or _0x1f51f8e0)
end
function hubState.ResetSpeed() hubState.SpeedAttempts=0 hubState.Next.Speed=0
end
function hubState.WaveStep()
if game.PlaceId~=hubState.MatchId or hubState.Ended then
return
end
if hubState.StartVisible() then
if hubSettings.AutoReady and hubState.Due("Ready",2) then
hubState.Call("StartMatch")
end
return
end
if not hubState.Active then
return
end
hubState.RelicStep()
if hubState.Paused then
return
end
local _bzpsduokv=false
for __qoudhutiit_ in hubSettings.StopSkipAt:gmatch("%d+") do
if tonumber(__qoudhutiit_)==hubState.Wave then
_bzpsduokv=true
break
end
end
local _I1Ill1IlI111=hubSettings.AutoSkip and not _bzpsduokv
if hubState.SkipManaged and hubState.AppliedSkip~=_I1Ill1IlI111 and hubState.Due("SkipSetting",hubSettings.SkipDelay) then
if hubState.Call("SetAutoSkip",_I1Ill1IlI111) then
hubState.AppliedSkip=_I1Ill1IlI111
end
end
local _ehmaett=tonumber(hubSettings.Speed)
if hubSettings.AutoSpeed and (_ehmaett==1 or _ehmaett==2 or _ehmaett==3 or _ehmaett==4) and hubState.LiveSpeed and hubState.LiveSpeed~=_ehmaett and (hubState.SpeedAttempts or 0)<3 and os.clock() - (hubState.StartedAt or os.clock())>=hubSettings.SpeedDelay and hubState.Due("Speed",2) then
hubState.SpeedAttempts=(hubState.SpeedAttempts or 0)+1 hubState.Call("SetSpeed",_ehmaett)
end
if hubSettings.AutoSell and hubState.Wave>=hubSettings.SellAtWave then
hubState.SellAt=hubState.SellAt or os.clock()+hubSettings.SellDelay
if os.clock()>=hubState.SellAt and hubState.SoldRound~=hubState.Round then
hubState.SoldRound=hubState.Round
if hubState.Playing then
hubState.StopPlayback()
end
for _lzggbsbqxd_yc,_lzaqkp_hybvt in ipairs(hubState.Troops()) do
task.spawn(function()
if hubState.Running and hubState.Own(_lzaqkp_hybvt) then
hubState.Call("SellDragon",_lzaqkp_hybvt)
end
end
)
end
end
else
hubState.SellAt=nil
end
end
function hubState.MatchMap()
local l1I1ll1I11ll=_xrdj_vtwj:GetAttribute("Map")
if type(l1I1ll1I11ll)=="string" and l1I1ll1I11ll~="" then
local _0x4435df=hubState.Shared("GameConfig")
return _0x4435df and _0x4435df.MAP_NAMES and _0x4435df.MAP_NAMES[l1I1ll1I11ll] or l1I1ll1I11ll
end
local Illll1lII1=hubState.TeleportData
local l1I1ll1I11ll=type(Illll1lII1)=="table" and (Illll1lII1.map or Illll1lII1.Map or Illll1lII1.mapName)
return type(l1I1ll1I11ll)=="string" and l1I1ll1I11ll~="" and l1I1ll1I11ll or nil
end
if game.PlaceId==hubState.MatchId then
local _0x687fa639,_rgvxxxh=pcall(lIIIIllll11I1.GetLocalPlayerTeleportData,lIIIIllll11I1)
if _0x687fa639 then
hubState.TeleportData=_rgvxxxh
end
end
function hubState.OnMatchEnded(_0x36a59a)
if type(_0x36a59a)~="table" or type(_0x36a59a.won)~="boolean" or hubState.Ended or _0x36a59a.match and _0x36a59a.match==hubState.LastMatchToken then
return
end
hubState.LastMatchToken=_0x36a59a.match hubState.Ended,hubState.EndAt=true,os.clock() hubState.EndAttempts=0 hubState.Matches=hubState.Matches+1 hubState.Result={Won=_0x36a59a.won,Wave=tonumber(_0x36a59a.wave) or hubState.Wave,Stage=hubState.MatchMap(),Duration=hubState.StartedAt and math.max(0,math.floor(hubState.EndAt - hubState.StartedAt)),Coins=tonumber(_0x36a59a.coins),Welcome=tonumber(_0x36a59a.welcomeCoins),Crystals=tonumber(_0x36a59a.crystals)}
if hubState.Playing then
hubState.StopPlayback()
end
if hubState.Recording then
task.spawn(hubState.StopRecord,true)
end
task.spawn(hubState.SendWebhook,false)
end
function hubState.EndStep()
if hubState.Recovery and hubState.Recovery.Busy() then
return
end
if not hubState.Ended or hubSettings.EndAction=="None" or os.clock() - (hubState.EndAt or os.clock())<hubSettings.EndDelay then
return
end
local _0x504e21=_fwxrf_y_sp:FindFirstChild("Match")
local _tytolt_c=_0x504e21 and _0x504e21:GetAttribute("State")
if not hubState.Visible(hubState.PG("MatchHUD/VictoryWindow")) and _tytolt_c~="Won" and _tytolt_c~="Lost" or hubState.EndAttempts>=3 or not hubState.Due("End",3) then
return
end
hubState.EndAttempts=hubState.EndAttempts+1 hubState.SaveConfig() hubState.QueueTeleport()
local _bnghnwmtgscup=hubSettings.EndAction=="Replay" and hubState.Recovery and hubState.Recovery.Watch()
local II1111III=hubState.Call(hubSettings.EndAction=="Replay" and "PlayAgain" or "ReturnToLobby")
if _bnghnwmtgscup and not II1111III then
hubState.Recovery.Rejected(_bnghnwmtgscup)
end
end
function hubState.StateStep() hubState.ReadState()
if game.PlaceId==hubState.MatchId then
local _dmyibmpvc=hubState.StartVisible()
if hubState.Ended and _dmyibmpvc and not hubState.Visible(hubState.PG("MatchHUD/VictoryWindow")) then
hubState.Ended,hubState.Active,hubState.StartedAt,hubState.Result=false,false,nil,nil hubState.Round,hubState.Clock,hubState.WaveAt=hubState.Round+1,0,0 hubState.SawStart,hubState.AppliedSkip,hubState.SellAt=false,nil,nil hubState.Next.Ready,hubState.Next.End=0,0 hubState.ResetSpeed()
end
if _dmyibmpvc and not hubState.Ended then
hubState.SawStart=true
end
if not hubState.Active and not hubState.Ended and not _dmyibmpvc and (hubState.SawStart or hubState.Wave>0) then
hubState.Active,hubState.StartedAt=true,os.clock() hubState.ClockAt=hubState.StartedAt
end
if hubState.Due("Bind",2) then
hubState.BindCash()
local lI1IIII1l=hubState.Remote("MatchEnded")
if lI1IIII1l and lI1IIII1l~=hubState.ResultRemote and lI1IIII1l:IsA("RemoteEvent") then
if hubState.ResultConnection then
hubState.ResultConnection:Disconnect()
end
hubState.ResultRemote=lI1IIII1l hubState.ResultConnection=hubState.Connect(lI1IIII1l.OnClientEvent,hubState.OnMatchEnded)
end
end
if hubSettings.AutoPlayback and hubState.Active and not hubState.Ended and not hubState.Playing and not hubState.Recording and not hubState.Closing and hubState.AutoPlayedRound~=hubState.Round and #hubState.Actions>0 then
local _irruataakiq=hubState.StartPlayback()
if _irruataakiq then
hubState.AutoPlayedRound=hubState.Round
end
end
end
if hubState.Due("UI",.4) then
hubState.UIUpdate()
end
end
function hubState.BuildMatchEmbed(_zcyxiya)
local _0x5af04ad9=hubState.Result or {}
local IIIIIIllI=hubSettings.HideName and "Player" or localPlayer.Name
local _0x993e3=_0x5af04ad9.Duration
local _ehlargssxlzgq=_zcyxiya and "Webhook connected." or "Reward data unavailable"
if _0x5af04ad9.Coins and not _zcyxiya then
_ehlargssxlzgq="Coins: +" .. _0x5af04ad9.Coins
if _0x5af04ad9.Welcome and _0x5af04ad9.Welcome>0 then
_ehlargssxlzgq=_ehlargssxlzgq .. "\nWelcome Bonus: +" .. _0x5af04ad9.Welcome
end
if _0x5af04ad9.Crystals and _0x5af04ad9.Crystals>0 then
_ehlargssxlzgq=_ehlargssxlzgq .. "\nCrystals: +" .. _0x5af04ad9.Crystals
end
end
local __nrxrcov=_zcyxiya and "Webhook Test" or _0x5af04ad9.Won and "Victory" or "Defeat"
return {title="Dragon Tower Defense | " .. __nrxrcov,color=_zcyxiya and 5793266 or _0x5af04ad9.Won and 65280 or 16711680,description="**Stage:** " .. (_0x5af04ad9.Stage or "Unavailable"),fields={{name="Player Info",value="Name: ||" .. IIIIIIllI .. "||"},{name="Clear Time",value=_0x993e3 and string.format("%02d:%02d",math.floor(_0x993e3/60),_0x993e3%60) or "Unavailable",inline=true},{name="Waves",value=tostring(_0x5af04ad9.Wave or hubState.Wave or 0),inline=true},{name="Matches",value=tostring(hubState.Matches),inline=true},{name="Match Rewards",value=_ehlargssxlzgq}},footer={text="Cactus Hub"},timestamp=os.date("!%Y-%m-%dT%H:%M:%SZ")}
end
function hubState.Restore(IIl1II1IIl11l1)
for _ljskalx,IIII1IIIl1l1 in pairs(IIl1II1IIl11l1) do
for _nobdgmxg,_ll1II11 in pairs(IIII1IIIl1l1) do
pcall(function() _ljskalx[_nobdgmxg]=_ll1II11
end
)
end
IIl1II1IIl11l1[_ljskalx]=nil
end
end
function hubState.SetFPS(l1IIllIll111) hubState.NativeGraphics=l1IIllIll111 hubState.Next.Graphics=0 hubState.FPSGeneration=(hubState.FPSGeneration or 0)+1
local _0x292d7c22=hubState.FPSGeneration
if hubState.FPSConnection then
hubState.FPSConnection:Disconnect() hubState.FPSConnection=nil
end
if not l1IIllIll111 then
hubState.Restore(hubState.FPS)
return
end
local function IIlII1ll1lI(__aetvxogvjrm)
if __aetvxogvjrm:IsA("Decal") and __aetvxogvjrm.Name:lower()=="face" and localPlayer.Character and __aetvxogvjrm:IsDescendantOf(localPlayer.Character) then
return
end
if __aetvxogvjrm:IsA("BasePart") then
return {CastShadow=false,Material=Enum.Material.SmoothPlastic,Reflectance=0}
elseif __aetvxogvjrm:IsA("Decal") or __aetvxogvjrm:IsA("Texture") then
return {Transparency=1}
elseif __aetvxogvjrm:IsA("ParticleEmitter") or __aetvxogvjrm:IsA("Trail") or __aetvxogvjrm:IsA("Beam") or __aetvxogvjrm:IsA("Smoke") or __aetvxogvjrm:IsA("Fire") or __aetvxogvjrm:IsA("Sparkles") or __aetvxogvjrm:IsA("PostEffect") then
return {Enabled=false}
end
end
local function lll11llI(_0x2397c3fc,lIllII1l11ll)
if hubState.FPS[_0x2397c3fc] then
return
end
local _0xb16ba={}
for _0xe90d7d,_uusxkeamjgpx in pairs(lIllII1l11ll) do
pcall(function() _0xb16ba[_0xe90d7d]=_0x2397c3fc[_0xe90d7d] _0x2397c3fc[_0xe90d7d]=_uusxkeamjgpx
end
)
end
hubState.FPS[_0x2397c3fc]=_0xb16ba
end
local _0x235d4,_xlwcimmsiwuwk,lIlIl1I1I,lIlI111I1l1Il,_0x4b02={},setmetatable({},{__mode="k"}),1,0,false
local function _0x053d71(IlIlIl11II)
if hubState.FPS[IlIlIl11II] or _xlwcimmsiwuwk[IlIlIl11II] then
return
end
local _0xc2fad7=IIlII1ll1lI(IlIlIl11II)
if not _0xc2fad7 then
return
end
lIlI111I1l1Il=lIlI111I1l1Il+1 _0x235d4[lIlI111I1l1Il]={IlIlIl11II,_0xc2fad7} _xlwcimmsiwuwk[IlIlIl11II]=true
if _0x4b02 then
return
end
_0x4b02=true task.defer(function()
local _ulvwrfmuubnv=os.clock()
local II1Ill1Il=0
while hubState.Running and hubSettings.FPSBoost and hubState.FPSGeneration==_0x292d7c22 and lIlIl1I1I<=lIlI111I1l1Il do
local __vqgevorsrodn=_0x235d4[lIlIl1I1I] _0x235d4[lIlIl1I1I]=nil lIlIl1I1I=lIlIl1I1I+1 _xlwcimmsiwuwk[__vqgevorsrodn[1]]=nil
if __vqgevorsrodn[1].Parent then
lll11llI(__vqgevorsrodn[1],__vqgevorsrodn[2])
end
II1Ill1Il=II1Ill1Il+1
if II1Ill1Il%16==0 and os.clock() - _ulvwrfmuubnv>=.001 then
task.wait() _ulvwrfmuubnv=os.clock()
end
end
_0x235d4={} lIlIl1I1I=1 lIlI111I1l1Il=0 _0x4b02=false
end
)
end
hubState.FPSConnection=_xrdj_vtwj.DescendantAdded:Connect(_0x053d71)
local _vpcpgwfie_y=game:GetService("Lighting") lll11llI(_vpcpgwfie_y,{GlobalShadows=false,EnvironmentDiffuseScale=0,EnvironmentSpecularScale=0}) task.spawn(function()
local _rkmsxlz__gbaj=os.clock()
for II1IIIIIlI1,_ddc_chpa in ipairs({_xrdj_vtwj,_vpcpgwfie_y}) do
for _0xee55a,_qiwdxslmim in ipairs(_ddc_chpa:GetDescendants()) do
if not hubState.Running or not hubSettings.FPSBoost or hubState.FPSGeneration~=_0x292d7c22 then
return
end
_0x053d71(_qiwdxslmim)
if os.clock() - _rkmsxlz__gbaj>=.001 then
task.wait() _rkmsxlz__gbaj=os.clock()
end
end
end
end
)
end
function hubState.SetHide(_0xa58b6b) hubState.HideGeneration=(hubState.HideGeneration or 0)+1
local _mrsdtbzjj=hubState.HideGeneration
for _zzlamui,_hfjmzcunfv in ipairs(hubState.HideConnections or {}) do
_hfjmzcunfv:Disconnect()
end
hubState.HideConnections={}
for _l1IlI1I,_0xc987 in pairs(hubState.HideWatches or {}) do
_0xc987.Text:Disconnect()
if _0xc987.Destroy then
_0xc987.Destroy:Disconnect()
end
end
hubState.HideWatches=setmetatable({},{__mode="k"})
if not _0xa58b6b then
hubState.Restore(hubState.Hidden)
return
end
local function _0x3586(_0xfe5fd)
for _vfbuvelxd,Illl1Il1IlI11l in ipairs({localPlayer.Name,localPlayer.DisplayName}) do
if Illl1Il1IlI11l~="" then
_0xfe5fd=_0xfe5fd:gsub("%f[%w_]" .. Illl1Il1IlI11l:gsub("(%W)","%%%1") .. "%f[^%w_]","Player")
end
end
return _0xfe5fd
end
local function _stpddbotf_kp(II1Ill1Ill1)
if II1Ill1Ill1:IsA("Humanoid") and localPlayer.Character and II1Ill1Ill1:IsDescendantOf(localPlayer.Character) then
if not hubState.Hidden[II1Ill1Ill1] then
hubState.Hidden[II1Ill1Ill1]={DisplayDistanceType=II1Ill1Ill1.DisplayDistanceType}
end
II1Ill1Ill1.DisplayDistanceType=Enum.HumanoidDisplayDistanceType.None
elseif II1Ill1Ill1:IsA("TextLabel") or II1Ill1Ill1:IsA("TextButton") then
local I1IlI1lI1=II1Ill1Ill1.Text
local _0x551c7b=II1Ill1Ill1.Name:lower()
local _0x0757e17=_0x551c7b=="username" or _0x551c7b=="displayname" or _0x551c7b=="playername" or _0x551c7b=="namelabel" or _0x551c7b=="playerlabel" or _0x551c7b=="ownername"
if hubState.HideWatches[II1Ill1Ill1] or _0x3586(I1IlI1lI1)==I1IlI1lI1 and not _0x0757e17 and not (hubState.IsHideNameLabel and hubState.IsHideNameLabel(II1Ill1Ill1)) then
return
end
local _zexccqt
local function I11I11IIllIl()
if not hubState.Running or not hubSettings.HideName then
return
end
local l1I1I1IIlI11Il=II1Ill1Ill1.Text
if l1I1I1IIlI11Il==_zexccqt then
return
end
local _daadagaobvuss=_0x3586(l1I1I1IIlI11Il)
if _daadagaobvuss~=l1I1I1IIlI11Il then
hubState.Hidden[II1Ill1Ill1]={Text=l1I1I1IIlI11Il} _zexccqt=_daadagaobvuss II1Ill1Ill1.Text=_daadagaobvuss
elseif hubState.Hidden[II1Ill1Ill1] and hubState.Hidden[II1Ill1Ill1].Text then
hubState.Hidden[II1Ill1Ill1]=nil _zexccqt=nil
end
end
local Il1l1Ill=II1Ill1Ill1:GetPropertyChangedSignal("Text"):Connect(I11I11IIllIl)
local __lnqzalxkczn={Text=Il1l1Ill} hubState.HideWatches[II1Ill1Ill1]=__lnqzalxkczn
if II1Ill1Ill1.Destroying then
__lnqzalxkczn.Destroy=II1Ill1Ill1.Destroying:Connect(function() Il1l1Ill:Disconnect() hubState.HideWatches[II1Ill1Ill1]=nil
end
)
end
I11I11IIllIl()
end
end
local _ycgtao_az={}
local _jdivejplal=localPlayer:FindFirstChildOfClass("PlayerGui")
if _jdivejplal then
_ycgtao_az[#_ycgtao_az+1]=_jdivejplal
end
local l11Il11lll1l,_dkrxamc_p=pcall(game.GetService,game,"CoreGui")
if l11Il11lll1l and _dkrxamc_p then
_ycgtao_az[#_ycgtao_az+1]=_dkrxamc_p
end
if localPlayer.Character then
_ycgtao_az[#_ycgtao_az+1]=localPlayer.Character
end
for _xhcjpgaca,_0x068e92 in ipairs(_ycgtao_az) do
if _0x068e92 then
hubState.HideConnections[#hubState.HideConnections+1]=_0x068e92.DescendantAdded:Connect(function(_0xdda034) task.defer(function()
if hubState.Running and hubSettings.HideName and _mrsdtbzjj==hubState.HideGeneration then
pcall(_stpddbotf_kp,_0xdda034)
end
end
)
end
) task.spawn(function()
local _0x0861f2=os.clock()
local l11Il11lIIlll,_0xc080a2e1=pcall(_0x068e92.GetDescendants,_0x068e92)
if not l11Il11lIIlll then
return
end
for _fecc_tra,ll1Il1lI in ipairs(_0xc080a2e1) do
if not hubState.Running or not hubSettings.HideName or _mrsdtbzjj~=hubState.HideGeneration then
return
end
pcall(_stpddbotf_kp,ll1Il1lI)
if os.clock() - _0x0861f2>=.001 then
task.wait() _0x0861f2=os.clock()
end
end
end
)
end
end
end
function hubState.UIUpdate()
if not hubState.Window then
return
end
local function _piapaotqwg_df(_pabpvpyje,_pboqzurzsctrr)
local _0xd3e9a=hubState.Widgets[_pabpvpyje]
if _0xd3e9a and hubState["UI" .. _pabpvpyje]~=_pboqzurzsctrr then
hubState["UI" .. _pabpvpyje]=_pboqzurzsctrr _0xd3e9a:SetDesc(_pboqzurzsctrr)
end
end
local _0x16512bd4="State: " .. (hubState.Recording and "Recording" or hubState.Playing and "Playback" or "Idle")
if hubState.Widgets.State and hubState.StateTitle~=_0x16512bd4 then
hubState.StateTitle=_0x16512bd4 hubState.Widgets.State:SetTitle(_0x16512bd4)
end
_piapaotqwg_df("State",(game.PlaceId==hubState.LobbyId and (hubState.LobbyStatus or hubState.Status) or hubState.Status) .. (hubState.RecordFault and " | " .. hubState.RecordFault or hubState.LastError and " | " .. hubState.LastError or "")) _piapaotqwg_df("Live","Wave " .. tostring(hubState.Wave or 0) .. " | " .. hubSettings.PlaybackMode .. " | Cash: " .. tostring(hubState.Cash or "?") .. (hubState.LiveSpeed and " | " .. hubState.LiveSpeed .. "x" or ""))
local _0x78af8774="Recorded actions: " .. #hubState.Actions
if hubState.Widgets.Actions and hubState.ActionTitle~=_0x78af8774 then
hubState.ActionTitle=_0x78af8774 hubState.Widgets.Actions:SetTitle(_0x78af8774)
end
_piapaotqwg_df("Actions",hubState.Playing and "Playback: " .. tostring(hubState.PlaybackIndex or 0) .. "/" .. #hubState.Actions or hubSettings.Profile~="" and "Selected macro: " .. hubSettings.Profile or "No macro selected.")
if hubState.Widgets.Record and not hubState.Recording and not hubState.Closing then
hubState.Syncing=true hubState.Widgets.Record:Set(false) hubState.Syncing=false
end
if hubState.Widgets.Playback then
hubState.Syncing=true hubState.Widgets.Playback:Set(hubSettings.AutoPlayback) hubState.Syncing=false
end
end
function hubState.BuildUI()
local uiLibrary=executorEnvironment.__DragonTDWindUI
if not uiLibrary then
uiLibrary=loadstring(game:HttpGet("https://raw.githubusercontent.com/Footagesus/WindUI/main/dist/main.lua"))() executorEnvironment.__DragonTDWindUI=uiLibrary
end
if not hubState.Running or executorEnvironment.DragonTDHub~=hubState then
return
end
hubState.UI=uiLibrary
local hubWindow=hubBranding.Bind(uiLibrary:CreateWindow(hubBranding.Check({Title="Cactus Hub | Dragon Tower Defense",Folder="CactusHubDragonTD",Icon="flame",Size=UDim2.fromOffset(620,500),Theme="Dark",Transparent=true,ToggleKey=Enum.KeyCode.RightShift,OpenButton={Title=hubBranding.OpenButton,Enabled=true,Draggable=true,OnlyMobile=false}})),function()
return hubState.Running
end
,function()
if hubState.Destroy then
hubState.Destroy()
end
end
,uiLibrary) hubState.Window=hubWindow
local _0x9f366e=hubWindow:Tab({Title="Lobby",Icon="door-open"})
local _pamrqlm=hubWindow:Tab({Title="Match",Icon="swords"})
local _aisavjvk=hubWindow:Tab({Title="Macros",Icon="clapperboard"})
local _cw_rnetcu=hubWindow:Tab({Title="Webhook",Icon="webhook"})
local _0x24ed=hubWindow:Tab({Title="Misc",Icon="settings"})
local function _0x633c(_0x17128,_grzmnpenyqkv) _0x17128:Section({Title=_grzmnpenyqkv})
end
local function __jna_giqojd_(_fueccnfehof,Il1Il1ll11l1II,_111II1I1,Il1l1llII1,llI1l11I)
return _fueccnfehof:Toggle({Title=Il1Il1ll11l1II,Desc=Il1l1llII1,Value=hubSettings[_111II1I1],Callback=function(_gthaapjs)
if hubState.Syncing then
return
end
hubSettings[_111II1I1]=_gthaapjs==true
if llI1l11I then
llI1l11I(hubSettings[_111II1I1])
end
hubState.QueueSave()
end
})
end
local function _nwomichi(_0xbda9,_hvl_ixsleyn_,IllI11lIIl,_nc_b_gd)
return _0xbda9:Input({Title=_hvl_ixsleyn_,Placeholder=_nc_b_gd,Value=tostring(hubSettings[IllI11lIIl]),Callback=function(_0x3a68e)
if not hubState.Syncing then
hubSettings[IllI11lIIl]=tostring(_0x3a68e) hubState.QueueSave()
end
end
})
end
local function _I1l1ll1l(_111lI11l11lI,lI1lI111I11I11,_rkr_npf_o,_0x15ac70ca,_numcnzt)
return _111lI11l11lI:Dropdown({Title=lI1lI111I11I11,Values=_0x15ac70ca,Value=hubSettings[_rkr_npf_o],Callback=function(_0xf29a25)
if hubState.Syncing or type(_0xf29a25)~="string" then
return
end
hubSettings[_rkr_npf_o]=_0xf29a25
if _numcnzt then
_numcnzt(_0xf29a25)
end
hubState.QueueSave()
end
})
end
local function I1I1llIlI(_binq_ydk,_0x09907811,lIII1I1l11l)
return _binq_ydk:Slider({Title=_0x09907811,Step=.1,Value={Min=.1,Max=10,Default=hubSettings[lIII1I1l11l]},Callback=function(llIl1l1I11Il1)
if not hubState.Syncing then
hubSettings[lIII1I1l11l]=math.clamp(tonumber(llIl1l1I11Il1) or 1,.1,10) hubState.QueueSave()
end
end
})
end
hubState.Syncing=true _0x633c(_0x9f366e,"Play") _0x9f366e:Dropdown({Title="Players",Values={"1 Player","2 Players","3 Players","4 Players"},Value=hubSettings.Players .. (hubSettings.Players=="1" and " Player" or " Players"),Callback=function(l1llI1l1)
if hubState.Syncing then
return
end
hubSettings.Players=tostring(l1llI1l1):match("%d+") or "1" hubState.ResetJoin() hubState.QueueSave()
end
}) _I1l1ll1l(_0x9f366e,"Mode","Mode",{"Standard","Endless"},hubState.ResetJoin) _I1l1ll1l(_0x9f366e,"Map","Map",hubState.Maps,hubState.ResetJoin) I1I1llIlI(_0x9f366e,"Join Delay","JoinDelay") __jna_giqojd_(_0x9f366e,"Auto Join & Start","AutoJoin",nil,hubState.ResetJoin) _0x633c(_0x9f366e,"Auto Summon") _I1l1ll1l(_0x9f366e,"Amount","Amount",{"1","10"}) I1I1llIlI(_0x9f366e,"Summon Delay","SummonDelay") __jna_giqojd_(_0x9f366e,"Auto Summon","AutoSummon") _0x633c(_pamrqlm,"Start") __jna_giqojd_(_pamrqlm,"Auto Start Match","AutoReady") _0x633c(_pamrqlm,"Relics") __jna_giqojd_(_pamrqlm,"Auto Pick Relic","AutoRelic") _0x633c(_pamrqlm,"Wave") __jna_giqojd_(_pamrqlm,"Auto Skip Waves","AutoSkip",nil,function() hubState.SkipManaged=true hubState.Next.SkipSetting=0
end
) _nwomichi(_pamrqlm,"Stop Auto Skip At","StopSkipAt","1, 5, 10") I1I1llIlI(_pamrqlm,"Skip Delay","SkipDelay") _0x633c(_pamrqlm,"Speed") _I1l1ll1l(_pamrqlm,"Speed Scale","Speed",{"1","2","3","4"},hubState.ResetSpeed) __jna_giqojd_(_pamrqlm,"Auto Speed Scale","AutoSpeed",nil,hubState.ResetSpeed) I1I1llIlI(_pamrqlm,"Speed Delay","SpeedDelay") _0x633c(_pamrqlm,"Auto Sell") __jna_giqojd_(_pamrqlm,"Auto Sell All Towers","AutoSell") _pamrqlm:Input({Title="Sell At Wave",Value=tostring(hubSettings.SellAtWave),Placeholder="15",Callback=function(_fjniuvmqmy)
if not hubState.Syncing then
hubSettings.SellAtWave=math.clamp(tonumber(_fjniuvmqmy) or 15,1,10000) hubState.QueueSave()
end
end
}) I1I1llIlI(_pamrqlm,"Sell Delay","SellDelay") _0x633c(_pamrqlm,"Match End") _I1l1ll1l(_pamrqlm,"After Match","EndAction",{"None","Replay","Return"}) I1I1llIlI(_pamrqlm,"End Delay","EndDelay") _0x633c(_aisavjvk,"Macro State") hubState.Widgets.State=_aisavjvk:Paragraph({Title="State: Idle",Desc="Ready to record or play."}) hubState.Widgets.Live=_aisavjvk:Paragraph({Title="Live match",Desc="Waiting for match data."}) hubState.Widgets.Actions=_aisavjvk:Paragraph({Title="Recorded actions: 0",Desc="No macro selected."}) _nwomichi(_aisavjvk,"Create Macro","NewProfile","Macro name")
local function _lIlllII1ll() hubState.Syncing=true hubState.Widgets.Profiles:Refresh(hubState.ListMacros()) hubState.Widgets.Profiles:Select(hubSettings.Profile~="" and hubSettings.Profile or {}) hubState.Syncing=false
end
_aisavjvk:Button({Title="Create New Macro",Callback=function()
if hubState.Recording or hubState.Playing or hubState.Closing then
hubState.Notify("Stop macro first")
return
end
local _0x46c2=hubState.Clean(hubSettings.NewProfile)
local _tehdvvumdra=hubState.ProfilePath(_0x46c2)
if not _tehdvvumdra or _0x46c2:lower()=="settings" then
hubState.Notify("Enter a macro name")
return
end
if hubState.FS and isfile(_tehdvvumdra) then
hubState.Notify("Name already exists")
return
end
hubSettings.Profile=_0x46c2 hubState.Actions={} hubState.Existing={} hubState.RecordMap=nil
local _0x495c3a,_tafxuomrb=hubState.SaveMacro() hubState.Notify(_0x495c3a and "Macro created" or _tafxuomrb) _lIlllII1ll()
end
}) hubState.Widgets.Profiles=_aisavjvk:Dropdown({Title="Select Macro",Values=hubState.ListMacros(),Value=hubSettings.Profile,SearchBarEnabled=true,AllowNone=true,Callback=function(Il1l11lIl)
if hubState.Syncing or type(Il1l11lIl)~="string" or Il1l11lIl=="" then
return
end
local lll11l1111I1l,_0xaab95de1=hubState.LoadMacro(Il1l11lIl)
if not lll11l1111I1l then
hubState.Notify(_0xaab95de1)
end
end
}) _aisavjvk:Button({Title="Delete Selected Macro",Callback=function()
if hubState.Recording or hubState.Playing or hubState.Closing or hubSettings.AutoPlayback then
hubState.Notify("Stop macro first")
return
end
local _0x1531f571=hubState.ProfilePath(hubSettings.Profile)
if hubState.FS and _0x1531f571 and isfile(_0x1531f571) and type(delfile)=="function" then
if hubState.DeleteProfile~=hubSettings.Profile or os.clock()>(hubState.DeleteUntil or 0) then
hubState.DeleteProfile=hubSettings.Profile hubState.DeleteUntil=os.clock()+5 hubState.Notify("Click again to delete")
return
end
hubState.DeleteProfile=nil writefile(_0x1531f571 .. ".bak",readfile(_0x1531f571)) delfile(_0x1531f571) hubState.Actions={} hubState.Existing={} hubSettings.Profile="" hubState.QueueSave() _lIlllII1ll()
end
end
}) _I1l1ll1l(_aisavjvk,"Playback Mode","PlaybackMode",{"Hybrid","Time","Money"}) hubState.Widgets.Record=_aisavjvk:Toggle({Title="Record",Value=false,Callback=function(III1I1III)
if hubState.Syncing then
return
end
if III1I1III then
if hubState.Playing then
hubState.StopPlayback()
end
hubSettings.AutoPlayback=false hubState.QueueSave()
local _0x90211e7,lIIIll1II=hubState.StartRecord()
if not _0x90211e7 then
hubState.Notify(lIIIll1II)
end
else
task.spawn(function() hubState.StopRecord(true)
end
)
end
end
}) hubState.Widgets.Playback=_aisavjvk:Toggle({Title="Auto Playback Every Match",Value=hubSettings.AutoPlayback,Callback=function(_dlzal_b_ooh_l)
if hubState.Syncing then
return
end
hubSettings.AutoPlayback=_dlzal_b_ooh_l==true hubState.AutoPlayedRound=nil hubState.QueueSave()
if _dlzal_b_ooh_l then
task.spawn(function()
if hubState.Recording then
hubState.StopRecord(true)
end
if not hubSettings.AutoPlayback or not hubState.Running then
return
end
if game.PlaceId==hubState.MatchId and hubState.Active and not hubState.Ended and #hubState.Actions>0 then
local _qryviw_nijhla,_0x04bf62a6=hubState.StartPlayback()
if _qryviw_nijhla then
hubState.AutoPlayedRound=hubState.Round
else
hubState.Notify(_0x04bf62a6)
end
else
hubState.Status="Playback armed: waiting for match"
end
end
)
else
hubState.StopPlayback()
end
end
}) do
local _0x8255159={Tab=_aisavjvk,Owner=hubState,HTTP=_lI1lI1III1I1l,StateTables={hubState,hubSettings},Games={"Dragon Tower Defense"},KindKey="Kind",Kinds={"Place","Upgrade","Sell","Target","Skip"},FS=function()
return hubState.FS
end
,Busy=function()
return hubState.Recording or hubState.Playing or hubState.Closing or hubSettings.AutoPlayback
end
,Clean=hubState.Clean,Path=hubState.ProfilePath,Load=hubState.LoadMacro,Validate=hubState.ValidMacro,Notify=hubState.Notify,Refresh=function() _lIlllII1ll() hubState.QueueSave()
end
} assert(type(_0x8255159.Load)=="function" and type(_0x8255159.Path)=="function" and type(_0x8255159.Clean)=="function","Macro import adapter unavailable")
local _tpvsn_rpo={}
local function _II1IIll(_0x738bb)
if type(_0x738bb)~="string" then
return nil,"Please paste a Discord macro link tagged [Cactus Hub]."
end
local _fj_fnuygxoc=_0x738bb:find("`",1,true)~=nil _0x738bb=_0x738bb:gsub("`",""):match("^%s*(.-)%s*$")
if _fj_fnuygxoc then
_0x738bb=_0x738bb:gsub("^[jJ][sS][oO][nN]%s+",""):match("^%s*(.-)%s*$")
end
if _0x738bb=="" then
return nil,"Please paste a Discord macro link tagged [Cactus Hub]."
end
if _0x738bb:sub(1,12)~="[Cactus Hub]" then
return nil,"Please paste a Discord macro link tagged [Cactus Hub]."
end
_0x738bb=_0x738bb:sub(13)
local _lIll1l1=true do
if #_0x738bb>4096 or _0x738bb:find("[%s%c<>\\]") then
return nil,"Paste one complete Discord file link"
end
local _przklxan__pb_,_lIIIl1ll1Il1=_0x738bb:match("^https://([^/%?#]+)(/[^#]*)$")
if not _przklxan__pb_ or not (_przklxan__pb_:lower()=="cdn.discordapp.com" or _przklxan__pb_:lower()=="media.discordapp.net") or not _lIIIl1ll1Il1:match("^/attachments/%d+/%d+/[^%?#]+") then
return nil,"Use the Discord file link, not a message or Copy Link page URL"
end
local l1l1lIIII11ll1=type(request)=="function" and request or type(http_request)=="function" and http_request or type(syn)=="table" and type(syn.request)=="function" and syn.request or type(http)=="table" and type(http.request)=="function" and http.request
local _0xb51d,_lll1lIIlIl111,_0x10a2e7=pcall(function()
if l1l1lIIII11ll1 then
local _0x8095a865=l1l1lIIII11ll1({Url=_0x738bb,Method="GET",Headers={Accept="application/json"},Redirect=false}) assert(type(_0x8095a865)=="table","Invalid HTTP response")
local _0x526f=tonumber(_0x8095a865.StatusCode or _0x8095a865.Status)
if _0x526f==403 or _0x526f==404 then
return nil,"Link expired or unavailable; copy a fresh file link from Discord"
end
if _0x526f and (_0x526f<200 or _0x526f>=300) then
return nil,"Download failed (HTTP " .. _0x526f .. ")"
end
return _0x8095a865.Body or _0x8095a865.body
end
return game:HttpGet(_0x738bb)
end
)
if not _0xb51d then
return nil,"Cannot download macro; check the link, network and executor HTTP support"
end
if type(_lll1lIIlIl111)~="string" or _lll1lIIlIl111=="" then
return nil,_0x10a2e7 or "Link expired or unavailable; copy a fresh file link from Discord"
end
_0x738bb=_lll1lIIlIl111
end
if #_0x738bb>200*1024 then
return nil,"Macro exceeds 200 KB"
end
_0x738bb=_0x738bb:gsub("^\239\187\191","")
return _0x738bb,_lIll1l1
end
local function _0x19f3fef()
local _kwismkzjhbkgm={}
for _lllIll1,_lllI1Il11III1 in ipairs(_0x8255159.StateTables) do
local _l1I1I1Il1={}
for llIIlI11II,_0x76a1 in pairs(_lllI1Il11III1) do
_l1I1I1Il1[llIIlI11II]=_0x76a1
end
_kwismkzjhbkgm[#_kwismkzjhbkgm+1]={State=_lllI1Il11III1,Copy=_l1I1I1Il1}
end
return function()
for _0xd76240,_0xaacc2 in ipairs(_kwismkzjhbkgm) do
for _0xd3d7 in pairs(_0xaacc2.State) do
_0xaacc2.State[_0xd3d7]=nil
end
for _0x4bf64d3,_0x455f in pairs(_0xaacc2.Copy) do
_0xaacc2.State[_0x4bf64d3]=_0x455f
end
end
end
end
local function _evzmdtzmtk(_ytvs_vlhwtld,lllI11I1) assert(lllI11I1<40,"Macro nesting is too deep")
if type(_ytvs_vlhwtld)=="number" then
assert(_ytvs_vlhwtld==_ytvs_vlhwtld and math.abs(_ytvs_vlhwtld)<math.huge,"Invalid macro number")
end
if type(_ytvs_vlhwtld)~="table" then
return _ytvs_vlhwtld
end
local ll11II1Ill={}
for IlI1II1I1111l,_jkxwfupdqbkm in pairs(_ytvs_vlhwtld) do
local _vfgrcxit=type(IlI1II1I1111l)=="string" and (IlI1II1I1111l:lower()=="owneruserid" or IlI1II1I1111l:lower()=="ownerid")
if not _vfgrcxit then
ll11II1Ill[IlI1II1I1111l]=_evzmdtzmtk(_jkxwfupdqbkm,lllI11I1+1)
end
end
return ll11II1Ill
end
function _tpvsn_rpo.Import(_rvktloeo,_0x195a1)
if _tpvsn_rpo.Busy or _tpvsn_rpo.Fetching or _0x8255159.Busy() then
return false,"Stop recording and Auto Playback before importing"
end
if not _0x8255159.FS() or type(delfile)~="function" then
return false,"File read/write/delete APIs required"
end
_tpvsn_rpo.Fetching=true
local l1I11l1ll1II11,_jk_xfgewd=_II1IIll(_rvktloeo) _tpvsn_rpo.Fetching=false
if not l1I11l1ll1II11 then
return false,_jk_xfgewd
end
if _tpvsn_rpo.Busy or _0x8255159.Busy() then
return false,"Stop recording and Auto Playback before importing"
end
_rvktloeo=l1I11l1ll1II11
local _0x2ae9a75e,_fezvmyhh=pcall(_0x8255159.HTTP.JSONDecode,_0x8255159.HTTP,_rvktloeo)
if not _0x2ae9a75e or type(_fezvmyhh)~="table" then
return false,_jk_xfgewd and "Link did not return macro JSON; copy a fresh Discord file link" or "Invalid JSON; paste the complete macro file"
end
if not table.find(_0x8255159.Games,_fezvmyhh.Game) and not (_0x8255159.Legacy and _0x8255159.Legacy(_fezvmyhh)) then
return false,"This macro belongs to another game"
end
if type(_fezvmyhh.Actions)~="table" or #_fezvmyhh.Actions==0 or #_fezvmyhh.Actions>50000 then
return false,"Invalid macro actions"
end
local _0xa48db9c=0
for _bawo_zikkx,_IIIl11l1llI in pairs(_fezvmyhh.Actions) do
_0xa48db9c=_0xa48db9c+1
if type(_bawo_zikkx)~="number" or _bawo_zikkx%1~=0 or _bawo_zikkx<1 or _bawo_zikkx>#_fezvmyhh.Actions or type(_IIIl11l1llI)~="table" or not table.find(_0x8255159.Kinds,_IIIl11l1llI[_0x8255159.KindKey]) then
return false,"Invalid macro action"
end
for lIl11l1llII,IIIlIIl11 in ipairs({"Time","At","Wave","WaveAt","WaveTime"}) do
local II11111lIl1II=_IIIl11l1llI[IIIlIIl11]
if II11111lIl1II~=nil and (type(II11111lIl1II)~="number" or II11111lIl1II~=II11111lIl1II or II11111lIl1II<0 or II11111lIl1II==math.huge) then
return false,"Invalid action " .. IIIlIIl11
end
end
end
if _0xa48db9c~=#_fezvmyhh.Actions then
return false,"Macro actions must be a list"
end
_0x2ae9a75e,_fezvmyhh=pcall(_evzmdtzmtk,_fezvmyhh,0)
if not _0x2ae9a75e then
return false,tostring(_fezvmyhh)
end
if _0x8255159.Validate then
local _0x1b1443b,_0xb1b79a4,l1I1II1Il1lI=pcall(_0x8255159.Validate,_fezvmyhh)
if not _0x1b1443b or not _0xb1b79a4 then
return false,_0x1b1443b and (l1I1II1Il1lI or "Invalid macro data") or "Invalid macro data"
end
end
_0x195a1=tostring(_0x195a1 or ""):match("^%s*(.-)%s*$")
if _0x195a1=="" then
_0x195a1=type(_fezvmyhh.Name)=="string" and _fezvmyhh.Name or type(_fezvmyhh.Profile)=="string" and _fezvmyhh.Profile or "Imported Macro"
end
_0x195a1=_0x8255159.Clean(_0x195a1)
local Il1Il111l=_0x195a1:lower()
if _0x195a1=="" or Il1Il111l=="settings" or Il1Il111l=="hubconfig" or Il1Il111l=="playback_debug" or Il1Il111l:match("_config$") then
return false,"Enter another macro name"
end
local _0xfca2=_0x8255159.Path(_0x195a1)
if not _0xfca2 then
return false,"Invalid macro name"
end
local _Il11IIll,_0x2aa1=pcall(isfile,_0xfca2)
if not _Il11IIll then
return false,"Cannot check existing macro files"
end
if _0x2aa1 then
return false,"Macro name already exists; choose another name"
end
local _xeewweqf=_0x19f3fef() _tpvsn_rpo.Busy=true
local _potyxzooeao,_ryopxjemmrvvl=pcall(function()
local IIlIl1IlI1=_0x8255159.HTTP:JSONEncode(_fezvmyhh) writefile(_0xfca2 .. ".pending",IIlIl1IlI1) assert(readfile(_0xfca2 .. ".pending")==IIlIl1IlI1,"Pending verification failed") assert(not isfile(_0xfca2),"Macro name already exists") _tpvsn_rpo.Created=_0xfca2 writefile(_0xfca2,IIlIl1IlI1) assert(readfile(_0xfca2)==IIlIl1IlI1,"Save verification failed")
local _wwzzerka,_kuiehoapbyhyq=_0x8255159.Load(_0x195a1) assert(_wwzzerka,_kuiehoapbyhyq or "Macro failed its game-specific validation")
end
)
if not _potyxzooeao then
_xeewweqf()
if _tpvsn_rpo.Created then
pcall(delfile,_tpvsn_rpo.Created)
end
_tpvsn_rpo.Created=nil _tpvsn_rpo.Busy=false pcall(delfile,_0xfca2 .. ".pending")
return false,"Import failed: " .. tostring(_ryopxjemmrvvl)
end
_tpvsn_rpo.Created=nil _tpvsn_rpo.Busy=false pcall(delfile,_0xfca2 .. ".pending")
return true,_0x195a1,#_fezvmyhh.Actions
end
_0x8255159.Owner.MacroImport=_tpvsn_rpo _0x8255159.Tab:Section({Title="Import Macro"})
local _vymojekb,_0xb37027ab="",""
local lII1IllllIlI1I=_0x8255159.Tab:Input({Title="Macro Name",Desc="Enter Any Names You Want",Placeholder="Imported Macro",Value="",Callback=function(_0xb12428) _vymojekb=tostring(_0xb12428 or "")
end
})
local IlII1lII=_0x8255159.Tab:Input({Title="Discord Link",Desc="Paste a Discord file link tagged [Cactus Hub]",Type="Textarea",ClearTextOnFocus=false,Placeholder="[Cactus Hub]https://cdn.discordapp.com/attachments/...",Value="",Callback=function(II11I1lII1lIlI) _0xb37027ab=tostring(II11I1lII1lIlI or "")
end
}) _0x8255159.Tab:Button({Title="Import Macro",Icon="download",Callback=function()
local _0xd4843d77,_ll1I1IIII,_yafokhk=_tpvsn_rpo.Import(_0xb37027ab,_vymojekb)
if not _0xd4843d77 then
_0x8255159.Notify(_ll1I1IIII)
return
end
_vymojekb=_ll1I1IIII _0xb37027ab="" lII1IllllIlI1I:Set(_ll1I1IIII) IlII1lII:Set("")
local IIll1I1I1ll1I,_lIIllllI=pcall(_0x8255159.Refresh,_ll1I1IIII) _0x8255159.Notify("Imported " .. _ll1I1IIII .. " (" .. tostring(_yafokhk) .. " actions)" .. (not IIll1I1I1ll1I and "; reopen Select Macro to refresh" or ""))
end
})
end
_0x633c(_cw_rnetcu,"Discord Webhook") _nwomichi(_cw_rnetcu,"Webhook URL","WebhookURL","https://discord.com/api/webhooks/...") __jna_giqojd_(_cw_rnetcu,"Enable Webhook","WebhookEnabled") __jna_giqojd_(_cw_rnetcu,"Notify On Match End","WebhookMatchEnd") _cw_rnetcu:Button({Title="Send Test Webhook",Callback=function() task.spawn(function()
local _1I1111IIl11Il,_awkflcplq=hubState.SendWebhook(true) hubState.Notify(_1I1111IIl11Il and "Test sent" or _awkflcplq)
end
)
end
}) hubState.BlackScreenPersistence={Get=function()
return hubSettings.BlackScreen==true
end
,Set=function(_1I1IllIlIIIl) hubSettings.BlackScreen=_1I1IllIlIIIl==true hubState.SaveConfig()
end
} do
local _lsscijm=type(getgenv)=="function" and getgenv() or _G
local _11II11lII1l11
local III11lIIl11ll=hubState.BlackScreenPersistence
local III1ll1Il1ll=III11lIIl11ll and III11lIIl11ll.Get()==true or false
local function __gqeujc_gtxzo(_0x02df)
if III11lIIl11ll and not _11II11lII1l11.Cleaning and III11lIIl11ll.Get()~=_0x02df then
III11lIIl11ll.Set(_0x02df)
end
end
local _1lll1lI=_lsscijm.__CactusHubBlackScreen
if _1lll1lI and type(_1lll1lI.Destroy)=="function" and _1lll1lI.Destroy()==false then
return
end
_11II11lII1l11={Alive=true,Enabled=false,Connections={}} _lsscijm.__CactusHubBlackScreen=_11II11lII1l11 hubState.BlackScreenController=_11II11lII1l11
local _cqrupdw,IlIIllll1
local _0x9d944909
local function _0xe2fe9dd(_0x2ffc) pcall(function() uiLibrary:Notify({Title="Black Screen",Content=_0x2ffc,Duration=5})
end
)
end
local function I11111I1(_0x63e1)
if not _cqrupdw or IlIIllll1 then
return
end
IlIIllll1=true pcall(function() _cqrupdw:Set(_0x63e1)
end
) IlIIllll1=false
end
local function _0xc6fc67()
for IIIlIIIl,_nkyzxcobunrgu in ipairs(_11II11lII1l11.Connections) do
pcall(_nkyzxcobunrgu.Disconnect,_nkyzxcobunrgu)
end
_11II11lII1l11.Connections={}
local _ouzpgiwffbq=_11II11lII1l11.Gui _11II11lII1l11.Gui=nil
if _ouzpgiwffbq then
pcall(_ouzpgiwffbq.Destroy,_ouzpgiwffbq)
end
end
function _11II11lII1l11.Set(_cd_nqtyjptntt) _cd_nqtyjptntt=_cd_nqtyjptntt==true
if _cd_nqtyjptntt and not _11II11lII1l11.Alive then
return false
end
if not _cd_nqtyjptntt then
if _11II11lII1l11.RenderDisabled then
local _cpttmlpanq=pcall(_0x9d944909.Set3dRenderingEnabled,_0x9d944909,true)
if not _cpttmlpanq then
_0xe2fe9dd("Could not restore 3D rendering. Press Disable Black Screen to retry.")
return false
end
_11II11lII1l11.RenderDisabled=nil
end
_11II11lII1l11.Enabled=false __gqeujc_gtxzo(false) _0xc6fc67() I11111I1(false)
return true
end
if _11II11lII1l11.Enabled and _11II11lII1l11.Gui and _11II11lII1l11.Gui.Parent then
return true
end
local _w_fl_thhogjo
local Il11I1lI1IIllI,_11I11I1=pcall(function() _w_fl_thhogjo=Instance.new("ScreenGui") _w_fl_thhogjo.Name="CactusHubBlackScreen_DragonTD" _w_fl_thhogjo.Enabled=false _w_fl_thhogjo.IgnoreGuiInset=true _w_fl_thhogjo.ResetOnSpawn=false _w_fl_thhogjo.DisplayOrder=2147483647 _w_fl_thhogjo.ZIndexBehavior=Enum.ZIndexBehavior.Sibling
local IIIlI11IIII=Instance.new("Frame") IIIlI11IIII.Name="Background" IIIlI11IIII.Size=UDim2.fromScale(1,1) IIIlI11IIII.BackgroundColor3=Color3.new(0,0,0) IIIlI11IIII.BorderSizePixel=0 IIIlI11IIII.Active=true IIIlI11IIII.ZIndex=1 IIIlI11IIII.Parent=_w_fl_thhogjo
local _0xafb04=Instance.new("TextButton") _0xafb04.Name="DisableBlackScreen" _0xafb04.AnchorPoint=Vector2.new(.5,.5) _0xafb04.Position=UDim2.fromScale(.5,.5) _0xafb04.Size=UDim2.fromOffset(230,52) _0xafb04.BackgroundColor3=Color3.fromRGB(28,28,32) _0xafb04.BorderSizePixel=0 _0xafb04.Text="Disable Black Screen" _0xafb04.TextColor3=Color3.fromRGB(245,245,245) _0xafb04.TextSize=17 _0xafb04.Font=Enum.Font.GothamSemibold _0xafb04.ZIndex=2 _0xafb04.Parent=IIIlI11IIII
local _0x9870e6=Instance.new("UICorner") _0x9870e6.CornerRadius=UDim.new(0,10) _0x9870e6.Parent=_0xafb04
local _fpvzjbsotu={}
if type(gethui)=="function" then
local _wuifs_zuaflrz,_1I11I111lIII=pcall(gethui)
if _wuifs_zuaflrz and _1I11I111lIII then
_fpvzjbsotu[#_fpvzjbsotu+1]=_1I11I111lIII
end
end
local _ebdameykljeh,_hd_gfaz=pcall(game.GetService,game,"CoreGui")
if _ebdameykljeh and _hd_gfaz then
_fpvzjbsotu[#_fpvzjbsotu+1]=_hd_gfaz
end
local _I111II11llI=game:GetService("Players").LocalPlayer
local _kfdmftlgwbfo=_I111II11llI and _I111II11llI:FindFirstChildOfClass("PlayerGui")
if _kfdmftlgwbfo then
_fpvzjbsotu[#_fpvzjbsotu+1]=_kfdmftlgwbfo
end
local _ll1IIII1=false
for _gshixoepfu,_0x600c2a2 in ipairs(_fpvzjbsotu) do
if pcall(function() _w_fl_thhogjo.Parent=_0x600c2a2
end
) and _w_fl_thhogjo.Parent==_0x600c2a2 then
_ll1IIII1=true
break
end
end
assert(_ll1IIII1,"Overlay unavailable on this executor") _11II11lII1l11.Gui=_w_fl_thhogjo _11II11lII1l11.Connections[#_11II11lII1l11.Connections+1]=_0xafb04.Activated:Connect(function() _11II11lII1l11.Set(false)
end
)
if _w_fl_thhogjo.Destroying then
_11II11lII1l11.Connections[#_11II11lII1l11.Connections+1]=_w_fl_thhogjo.Destroying:Connect(function() _11II11lII1l11.Gui=nil _11II11lII1l11.Set(false)
end
)
end
_w_fl_thhogjo.Enabled=true
end
)
if not Il11I1lI1IIllI then
if _w_fl_thhogjo then
pcall(_w_fl_thhogjo.Destroy,_w_fl_thhogjo)
end
_0xc6fc67() _11II11lII1l11.Enabled=false I11111I1(false) _0xe2fe9dd(tostring(_11I11I1))
return false
end
local _0x19bcfc=pcall(function() _0x9d944909=game:GetService("RunService") _0x9d944909:Set3dRenderingEnabled(false)
end
) _11II11lII1l11.RenderDisabled=_0x19bcfc or nil _11II11lII1l11.Enabled=true __gqeujc_gtxzo(true)
if not _0x19bcfc then
_0xe2fe9dd("Black overlay enabled; this executor cannot disable 3D rendering.")
end
return true
end
function _11II11lII1l11.Destroy() _11II11lII1l11.Cleaning=true
if not _11II11lII1l11.Set(false) then
_11II11lII1l11.Cleaning=false
return false
end
_11II11lII1l11.Alive=false
if _lsscijm.__CactusHubBlackScreen==_11II11lII1l11 then
_lsscijm.__CactusHubBlackScreen=nil
end
return true
end
_0x24ed:Section({Title="Display"}) _cqrupdw=_0x24ed:Toggle({Title="Black Screen",Desc="Dark screen with a Disable button.",Value=III1ll1Il1ll,Callback=function(_0xa4aa1)
if not IlIIllll1 then
_11II11lII1l11.Set(_0xa4aa1)
end
end
})
if III1ll1Il1ll then
_11II11lII1l11.Set(true)
end
end
_0x633c(_0x24ed,"Automation") __jna_giqojd_(_0x24ed,"Auto Execute","AutoExecute","Reload after teleport.",hubState.QueueTeleport) __jna_giqojd_(_0x24ed,"Auto Rejoin","AutoRejoin","Return to the lobby after a disconnect.") do
local function _lbptwthwbc()
local _wtor_i_,_0xb8e57,_0x4f4e70e9,l11l1IIIIl,_podbxwlegrp,_rtnabqyrtisw
local function _0x34a2c540(_iwa_oucswtn)
return Vector3.new(_iwa_oucswtn.X,0,_iwa_oucswtn.Z)
end
local function lII11IlIl1() _wtor_i_,_0xb8e57,_0x4f4e70e9,l11l1IIIIl,_podbxwlegrp,_rtnabqyrtisw=nil,nil,nil,nil,nil,nil
end
local function _0x1d7679d(ll1I1111l1Il,_mmayny_pgthp,lIlIIlll1)
local _0x41a2a=ll1I1111l1Il.SeatPart
local _1111III1=_0x41a2a~=nil or ll1I1111l1Il.Sit
if _wtor_i_~=_mmayny_pgthp then
lII11IlIl1()
end
if _1111III1 then
local _0x906426=os.clock()
if not _wtor_i_ then
_wtor_i_,_0xb8e57,l11l1IIIIl,_rtnabqyrtisw=_mmayny_pgthp,_0x41a2a and _0x41a2a.Position or _mmayny_pgthp.Position,_0x906426+2,0
end
if _0x906426>=l11l1IIIIl then
lII11IlIl1()
return false
end
if not _podbxwlegrp or _0x906426>=_podbxwlegrp then
_podbxwlegrp=_0x906426+.35 ll1I1111l1Il.Sit=false ll1I1111l1Il.Jump=true ll1I1111l1Il:ChangeState(Enum.HumanoidStateType.Jumping)
end
_0x4f4e70e9=nil
return true
end
if not _wtor_i_ then
return false
end
local _bcwobtixhwi=os.clock()
if not _0x4f4e70e9 then
local _0x4a83=game:GetService("Workspace")
local _tmaoqglq_mcw_=RaycastParams.new() _tmaoqglq_mcw_.FilterType=Enum.RaycastFilterType.Exclude _tmaoqglq_mcw_.FilterDescendantsInstances={ll1I1111l1Il.Parent} _tmaoqglq_mcw_.RespectCanCollide=true
local _II1III1lI11I1=_0x34a2c540(_mmayny_pgthp.CFrame.LookVector)
if _II1III1lI11I1.Magnitude<.1 then
_II1III1lI11I1=Vector3.new(0,0,1)
end
_II1III1lI11I1=_II1III1lI11I1.Unit
local _hdqadhejvhqd=Vector3.new(-_II1III1lI11I1.Z,0,_II1III1lI11I1.X)
local _11Il1IllIIlIl={_II1III1lI11I1,_hdqadhejvhqd,_hdqadhejvhqd*-1,_II1III1lI11I1*-1,(_II1III1lI11I1+_hdqadhejvhqd).Unit,(_II1III1lI11I1 - _hdqadhejvhqd).Unit,(_hdqadhejvhqd - _II1III1lI11I1).Unit,(_II1III1lI11I1+_hdqadhejvhqd).Unit*-1}
for I1Il1l1IIl1=0,#_11Il1IllIIlIl - 1 do
local _0x2d7a5f3=_11Il1IllIIlIl[(_rtnabqyrtisw+I1Il1l1IIl1)%#_11Il1IllIIlIl+1]
local _lIII1lI1II1=_0x2d7a5f3*10
local Il11l1ll=_mmayny_pgthp.Position+_lIII1lI1II1
local _l1lIl1I1I1=_0x4a83:Raycast(Il11l1ll+Vector3.new(0,2,0),Vector3.new(0,-10,0),_tmaoqglq_mcw_)
if _l1lIl1I1I1 and _l1lIl1I1I1.Normal.Y>=.6 and not _l1lIl1I1I1.Instance:IsA("Seat") and not _l1lIl1I1I1.Instance:IsA("VehicleSeat") and _0x34a2c540(Il11l1ll - _0xb8e57).Magnitude>=8 and not _0x4a83:Raycast(_mmayny_pgthp.Position,_lIII1lI1II1,_tmaoqglq_mcw_) then
_0x4f4e70e9,l11l1IIIIl,_rtnabqyrtisw=Il11l1ll,_bcwobtixhwi+1.1,_rtnabqyrtisw+I1Il1l1IIl1+1
break
end
end
if not _0x4f4e70e9 then
lII11IlIl1()
return false
end
end
local _cnlkoxjemgsw=_0x34a2c540(_0x4f4e70e9 - _mmayny_pgthp.Position)
if _cnlkoxjemgsw.Magnitude<=2 then
lII11IlIl1()
return false,true
end
if _bcwobtixhwi>=l11l1IIIIl then
if _rtnabqyrtisw<8 then
_0x4f4e70e9=nil
return true
end
lII11IlIl1()
return false,true
end
if lIlIIlll1 then
ll1I1111l1Il:Move(_cnlkoxjemgsw.Unit,false)
else
ll1I1111l1Il:MoveTo(_0x4f4e70e9)
end
return true
end
return _0x1d7679d,lII11IlIl1
end
local function _0x28553(_woa_rkaq_b)
local I11l1IlllI={Alive=true,Enabled=false,Phase=1,Turns=0}
local _lI11IlIl1I1I,_0x9763aa0=_lbptwthwbc() function I11l1IlllI.Stop() _0x9763aa0()
local _0xfa18=I11l1IlllI.Humanoid I11l1IlllI.Humanoid,I11l1IlllI.Root,I11l1IlllI.Center,I11l1IlllI.Direction=nil,nil,nil,nil
if _0xfa18 and _0xfa18.Parent then
_0xfa18:Move(Vector3.new(0,0,0),false)
end
end
local I1II11lIll function I11l1IlllI.Step(_jckhszk)
if not I11l1IlllI.Alive or not _woa_rkaq_b.Alive() then
I11l1IlllI.Destroy()
return
end
if not I11l1IlllI.Enabled or not _woa_rkaq_b.Allowed() then
I11l1IlllI.Stop()
return
end
local _vqasen_pdc=_woa_rkaq_b.Player.Character
local _ppdvmag=_vqasen_pdc and _vqasen_pdc:FindFirstChildOfClass("Humanoid")
local _0xcc01=_vqasen_pdc and _vqasen_pdc:FindFirstChild("HumanoidRootPart")
if not _ppdvmag or not _0xcc01 or _ppdvmag.Health<=0 then
I11l1IlllI.Stop()
return
end
if I11l1IlllI.Root~=_0xcc01 then
I11l1IlllI.Stop() I11l1IlllI.Root,I11l1IlllI.Humanoid,I11l1IlllI.Center=_0xcc01,_ppdvmag,_0xcc01.Position I11l1IlllI.Phase,I11l1IlllI.Turns,I11l1IlllI.Point=1,0,1
end
local IlIl1IIlllI,II1lI1l1l11I=_lI11IlIl1I1I(_ppdvmag,_0xcc01,true)
if IlIl1IIlllI then
return
end
if II1lI1l1l11I then
I11l1IlllI.Center,I11l1IlllI.Direction,I11l1IlllI.LastPosition=_0xcc01.Position,nil,nil I11l1IlllI.Phase,I11l1IlllI.Turns,I11l1IlllI.Point=1,0,1
end
I1II11lIll=I1II11lIll or {{{5,0},{3.54,3.54},{0,5},{-3.54,3.54},{-5,0},{-3.54,-3.54},{0,-5},{3.54,-3.54}},{{-4,-4},{4,-2},{-4,0},{4,2},{-4,4},{4,2},{-4,0},{4,-2}},{{0,0},{3.54,3},{5,0},{3.54,-3},{0,0},{-3.54,3},{-5,0},{-3.54,-3}},{{4,4},{-4,4},{-4,-4},{4,-4}}}
local __iojqf_lrljm=I1II11lIll[I11l1IlllI.Phase]
local function _xwkwkeoxj()
local _jmrenirgx=__iojqf_lrljm[I11l1IlllI.Point]
return I11l1IlllI.Center+Vector3.new(_jmrenirgx[1],0,_jmrenirgx[2])
end
local _1I1l1I1lI=_xwkwkeoxj()
local _0x4776fd8=_1I1l1I1lI - _0xcc01.Position _0x4776fd8=Vector3.new(_0x4776fd8.X,0,_0x4776fd8.Z)
if _0x4776fd8.Magnitude<1.6 then
I11l1IlllI.Point=I11l1IlllI.Point+1
if I11l1IlllI.Point>#__iojqf_lrljm then
I11l1IlllI.Point,I11l1IlllI.Turns=1,I11l1IlllI.Turns+1
if I11l1IlllI.Turns>=2 then
I11l1IlllI.Phase,I11l1IlllI.Turns=I11l1IlllI.Phase%4+1,0
end
__iojqf_lrljm=I1II11lIll[I11l1IlllI.Phase]
end
_1I1l1I1lI=_xwkwkeoxj() _0x4776fd8=_1I1l1I1lI - _0xcc01.Position _0x4776fd8=Vector3.new(_0x4776fd8.X,0,_0x4776fd8.Z)
end
local _ipkvclb=_0x4776fd8.Magnitude>.1 and _0x4776fd8.Unit or Vector3.new(0,0,0)
local _0x3ea693a0=math.min(1,_jckhszk*12)
local _bdceegy=I11l1IlllI.Direction and I11l1IlllI.Direction:Lerp(_ipkvclb,_0x3ea693a0) or _ipkvclb I11l1IlllI.Direction=_bdceegy
if _bdceegy.Magnitude>.1 then
_bdceegy=_bdceegy.Unit
end
_ppdvmag:Move(_bdceegy,false)
if not I11l1IlllI.LastPosition or (_0xcc01.Position - I11l1IlllI.LastPosition).Magnitude>.5 then
I11l1IlllI.LastPosition,I11l1IlllI.StuckAt=_0xcc01.Position,os.clock()
elseif os.clock() - I11l1IlllI.StuckAt>3 then
I11l1IlllI.Point=I11l1IlllI.Point%#__iojqf_lrljm+1 I11l1IlllI.StuckAt=os.clock()
end
end
function I11l1IlllI.Set(_nnloeezbuf) I11l1IlllI.Enabled=_nnloeezbuf==true _woa_rkaq_b.Save(I11l1IlllI.Enabled)
if not I11l1IlllI.Enabled then
I11l1IlllI.Stop()
if I11l1IlllI.Bound then
game:GetService("RunService"):UnbindFromRenderStep(_woa_rkaq_b.Key) I11l1IlllI.Bound=nil
end
elseif not I11l1IlllI.Bound then
I11l1IlllI.Bound=true game:GetService("RunService"):BindToRenderStep(_woa_rkaq_b.Key,201,I11l1IlllI.Step)
end
end
function I11l1IlllI.Destroy()
if not I11l1IlllI.Alive then
return
end
I11l1IlllI.Alive=false I11l1IlllI.Stop()
if I11l1IlllI.Bound then
game:GetService("RunService"):UnbindFromRenderStep(_woa_rkaq_b.Key) I11l1IlllI.Bound=nil
end
end
return I11l1IlllI
end
local _1Il1IlllI1={Key="CactusHubMoveAround_dragon",Owner=hubState,Player=localPlayer,Tab=_0x24ed,Window=hubWindow,Enabled=hubSettings.MoveAround,Alive=function()
return hubState.Running
end
,Allowed=function()
return game.PlaceId~=hubState.LobbyId and not hubState.Ended and not hubState.Recording and not hubState.Teleporting
end
,Save=function(lIlIIlII) hubSettings.MoveAround=lIlIIlII hubState.QueueSave()
end
}
local _bwlpndlcrwb=_1Il1IlllI1.Owner.MoveAroundController
if _bwlpndlcrwb then
_bwlpndlcrwb.Destroy()
end
local _1l1l11l=_0x28553(_1Il1IlllI1) _1Il1IlllI1.Owner.MoveAroundController=_1l1l11l
local _nxtq_dqeeh=_1Il1IlllI1.Owner.Destroy
if type(_nxtq_dqeeh)=="function" then
_1Il1IlllI1.Owner.Destroy=function(...) _1l1l11l.Destroy()
return _nxtq_dqeeh(...)
end
end
if _1Il1IlllI1.AddToggle then
_1Il1IlllI1.AddToggle(_1l1l11l.Set,_1Il1IlllI1.Enabled==true)
else
_1Il1IlllI1.Tab:Toggle({Title="Move Around",Value=_1Il1IlllI1.Enabled==true,Callback=function(_yrhymtebaps) _1l1l11l.Set(_yrhymtebaps)
end
})
end
if _1Il1IlllI1.Enabled==true then
_1l1l11l.Set(true)
end
end
_0x633c(_0x24ed,"Privacy") __jna_giqojd_(_0x24ed,"Hide Name","HideName",nil,hubState.SetHide) do
local _nskhdwamyrmet,_0xc074,_hthfivdqj_qnr=hubState,hubSettings,localPlayer
local _0x8aa53b31=type(getgenv)=="function" and getgenv() or _G
local _0xd7ab22f1="__CactusHubHideUser_DragonTD"
local I1l1I1II1ll=_0x8aa53b31[_0xd7ab22f1]
if I1l1I1II1ll and type(I1l1I1II1ll.Destroy)=="function" then
pcall(I1l1I1II1ll.Destroy)
end
local l1lllI1Il11ll={Alive=true,Enabled=false,Saved={},Generation=0} _nskhdwamyrmet.HideUserController=l1lllI1Il11ll _0x8aa53b31[_0xd7ab22f1]=l1lllI1Il11ll l1lllI1Il11ll.ImageSaved={} l1lllI1Il11ll.ImageWatches={} l1lllI1Il11ll.ImageConnections={}
local function _0xc665c4()
for _ypbuatbftwcut,lI1IIlllIll1Il in ipairs(l1lllI1Il11ll.ImageConnections) do
pcall(lI1IIlllIll1Il.Disconnect,lI1IIlllIll1Il)
end
for _0x3d06,_iodelvfh in pairs(l1lllI1Il11ll.ImageWatches) do
for _0xa3b1e1a,_pkoztesfr in ipairs(_iodelvfh) do
pcall(_pkoztesfr.Disconnect,_pkoztesfr)
end
end
l1lllI1Il11ll.ImageConnections={} l1lllI1Il11ll.ImageWatches={}
for l111Il1l,_guigjcrqqlfv in pairs(l1lllI1Il11ll.ImageSaved) do
pcall(function() l111Il1l.ImageTransparency=_guigjcrqqlfv
end
)
end
l1lllI1Il11ll.ImageSaved={}
end
local function _0xa928e(llI11Il1)
local _0x9002687=l1lllI1Il11ll.PlayerNames or {}
local _pnvwlzcdve=llI11Il1.Parent
for _qgkwaomd=1,2 do
if not _pnvwlzcdve then
break
end
if _0x9002687[_pnvwlzcdve.Name] then
return true
end
for _0xe402ab04,_kfwxygcb in ipairs(_pnvwlzcdve:GetChildren()) do
if _kfwxygcb:IsA("TextLabel") or _kfwxygcb:IsA("TextButton") then
local _0xec3f85=_kfwxygcb.Name:lower():gsub("[^%a]","")
if _0xec3f85=="username" or _0xec3f85=="displayname" or _0xec3f85=="playername" or _0xec3f85=="name" or _0xec3f85=="namelabel" then
local llI111lIlI11=tostring(_kfwxygcb.Text):gsub("<[^>]+>",""):match("^%s*(.-)%s*$")
if _0x9002687[llI111lIlI11] or _0xc074.HideName and llI111lIlI11=="Player" then
return true
end
end
end
end
_pnvwlzcdve=_pnvwlzcdve.Parent
end
return false
end
local function _0x051669e(_l111lIl11)
local lIlIIlIIIl11="" pcall(function() lIlIIlIIIl11=tostring(_l111lIl11.Image):lower()
end
)
if lIlIIlIIIl11:find("rbxthumb://",1,true) and (lIlIIlIIIl11:find("type=avatar",1,true) or lIlIIlIIIl11:find("type=headshot",1,true)) then
return true
end
if lIlIIlIIIl11:find("headshot%-thumbnail") or lIlIIlIIIl11:find("avatar%-thumbnail") or lIlIIlIIIl11:find("avatar%.ashx") or lIlIIlIIIl11:find("headshot%.ashx") or lIlIIlIIIl11:find("thumbnails.roblox.com/v1/users/",1,true) then
return true
end
local _1IllI111=_l111lIl11.Name:lower():gsub("[^%a]","")
if _1IllI111:find("avatar",1,true) or _1IllI111:find("headshot",1,true) or _1IllI111:find("portrait",1,true) or _1IllI111=="playericon" or _1IllI111=="playerimage" or _1IllI111=="profilepicture" then
return true
end
return _0xa928e(_l111lIl11)
end
local function _0xebd6d2() _0xc665c4()
if not l1lllI1Il11ll.Alive or not l1lllI1Il11ll.Enabled then
return
end
l1lllI1Il11ll.PlayerNames={}
local function _0x905de9a8(I1I111lI)
if I1I111lI.Name then
l1lllI1Il11ll.PlayerNames[I1I111lI.Name]=true
end
if I1I111lI.DisplayName then
l1lllI1Il11ll.PlayerNames[I1I111lI.DisplayName]=true
end
if I1I111lI.UserId then
l1lllI1Il11ll.PlayerNames[tostring(I1I111lI.UserId)]=true
end
end
_0x905de9a8(_hthfivdqj_qnr)
local _toqttxxtaejni pcall(function() _toqttxxtaejni=game:GetService("Players")
for _0xe2e8f1b0,_yflgyivvpsev in ipairs(_toqttxxtaejni:GetPlayers()) do
_0x905de9a8(_yflgyivvpsev)
end
end
)
local IlIII111IlIl=setmetatable({},{__mode="k"})
local function I1Il1IIIlllll1(_peecgfv)
if not l1lllI1Il11ll.Alive or not l1lllI1Il11ll.Enabled or IlIII111IlIl[_peecgfv] then
return
end
if not (_peecgfv:IsA("ImageLabel") or _peecgfv:IsA("ImageButton") or _peecgfv:IsA("ViewportFrame")) then
return
end
local Il1IIIl1l1I=_0x051669e(_peecgfv)
if Il1IIIl1l1I then
if l1lllI1Il11ll.ImageSaved[_peecgfv]==nil then
l1lllI1Il11ll.ImageSaved[_peecgfv]=_peecgfv.ImageTransparency
end
IlIII111IlIl[_peecgfv]=true _peecgfv.ImageTransparency=1 IlIII111IlIl[_peecgfv]=nil
elseif l1lllI1Il11ll.ImageSaved[_peecgfv]~=nil then
local _tpqlgdntymo=l1lllI1Il11ll.ImageSaved[_peecgfv] l1lllI1Il11ll.ImageSaved[_peecgfv]=nil IlIII111IlIl[_peecgfv]=true _peecgfv.ImageTransparency=_tpqlgdntymo IlIII111IlIl[_peecgfv]=nil
end
end
local function _fandusa__dap(_0x74ca810)
local l1l1ll1lllI1=_0x74ca810.Parent
if not l1l1ll1lllI1 then
return
end
for _I11Il1Il11 in pairs(l1lllI1Il11ll.ImageWatches) do
if _I11Il1Il11.Parent==l1l1ll1lllI1 or _I11Il1Il11.Parent and _I11Il1Il11.Parent.Parent==l1l1ll1lllI1 then
pcall(I1Il1IIIlllll1,_I11Il1Il11)
end
end
end
local function _0xc414(_sgibrgaumuwai)
if l1lllI1Il11ll.ImageWatches[_sgibrgaumuwai] then
pcall(I1Il1IIIlllll1,_sgibrgaumuwai)
return
end
local _luyeoqtghn=_sgibrgaumuwai:IsA("ImageLabel") or _sgibrgaumuwai:IsA("ImageButton") or _sgibrgaumuwai:IsA("ViewportFrame")
local I1IIIl1l1=_sgibrgaumuwai.Name:lower():gsub("[^%a]","")
local _0x03068=(_sgibrgaumuwai:IsA("TextLabel") or _sgibrgaumuwai:IsA("TextButton")) and (I1IIIl1l1=="username" or I1IIIl1l1=="displayname" or I1IIIl1l1=="playername" or I1IIIl1l1=="name" or I1IIIl1l1=="namelabel")
if not _luyeoqtghn and not _0x03068 then
return
end
local _dnqkirm={} l1lllI1Il11ll.ImageWatches[_sgibrgaumuwai]=_dnqkirm
local function _lil_u_wtkl(_ohlieazqco,_0x1298c)
local _0xdc894721,_0xadaa=pcall(function()
return _sgibrgaumuwai:GetPropertyChangedSignal(_ohlieazqco):Connect(_0x1298c)
end
)
if _0xdc894721 then
_dnqkirm[#_dnqkirm+1]=_0xadaa
end
end
if _luyeoqtghn then
_lil_u_wtkl("Image",function() pcall(I1Il1IIIlllll1,_sgibrgaumuwai)
end
) _lil_u_wtkl("Name",function() pcall(I1Il1IIIlllll1,_sgibrgaumuwai)
end
)
if _sgibrgaumuwai.AncestryChanged then
_dnqkirm[#_dnqkirm+1]=_sgibrgaumuwai.AncestryChanged:Connect(function() pcall(I1Il1IIIlllll1,_sgibrgaumuwai)
end
)
end
_lil_u_wtkl("ImageTransparency",function()
if IlIII111IlIl[_sgibrgaumuwai] or not l1lllI1Il11ll.Enabled then
return
end
if l1lllI1Il11ll.ImageSaved[_sgibrgaumuwai]~=nil then
l1lllI1Il11ll.ImageSaved[_sgibrgaumuwai]=_sgibrgaumuwai.ImageTransparency
end
pcall(I1Il1IIIlllll1,_sgibrgaumuwai)
end
) pcall(I1Il1IIIlllll1,_sgibrgaumuwai)
else
_lil_u_wtkl("Text",function() _fandusa__dap(_sgibrgaumuwai)
end
) _fandusa__dap(_sgibrgaumuwai)
end
if _sgibrgaumuwai.Destroying then
_dnqkirm[#_dnqkirm+1]=_sgibrgaumuwai.Destroying:Connect(function()
for lI1111111,I1l1IIII1III in ipairs(_dnqkirm) do
pcall(I1l1IIII1III.Disconnect,I1l1IIII1III)
end
l1lllI1Il11ll.ImageWatches[_sgibrgaumuwai]=nil l1lllI1Il11ll.ImageSaved[_sgibrgaumuwai]=nil
end
)
end
end
local II11lIIll1ll={} pcall(function()
local IIlI1I1I=_hthfivdqj_qnr:FindFirstChildOfClass("PlayerGui")
if IIlI1I1I then
II11lIIll1ll[#II11lIIll1ll+1]=IIlI1I1I
end
end
)
for llI1IlIlIIl,_waacsemesq in ipairs({"CoreGui","Workspace"}) do
pcall(function() II11lIIll1ll[#II11lIIll1ll+1]=game:GetService(_waacsemesq)
end
)
end
local function _1IIIII1(_orynemww)
if _orynemww.DescendantAdded then
l1lllI1Il11ll.ImageConnections[#l1lllI1Il11ll.ImageConnections+1]=_orynemww.DescendantAdded:Connect(function(_0xe2b64afe) task.defer(function()
if l1lllI1Il11ll.Alive and l1lllI1Il11ll.Enabled then
pcall(_0xc414,_0xe2b64afe)
end
end
)
end
)
end
local _0x5621a1f,_hphbmmm_ot=pcall(_orynemww.GetDescendants,_orynemww)
if _0x5621a1f then
for _1Il1IIl,_uqanmiqil in ipairs(_hphbmmm_ot) do
pcall(_0xc414,_uqanmiqil)
end
end
end
for llIlll1I111I,_0x8e67 in ipairs(II11lIIll1ll) do
_1IIIII1(_0x8e67)
end
if _hthfivdqj_qnr.ChildAdded then
l1lllI1Il11ll.ImageConnections[#l1lllI1Il11ll.ImageConnections+1]=_hthfivdqj_qnr.ChildAdded:Connect(function(_mkiufylojumq)
if l1lllI1Il11ll.Alive and l1lllI1Il11ll.Enabled and _mkiufylojumq:IsA("PlayerGui") then
_1IIIII1(_mkiufylojumq)
end
end
)
end
if _toqttxxtaejni and _toqttxxtaejni.PlayerAdded then
l1lllI1Il11ll.ImageConnections[#l1lllI1Il11ll.ImageConnections+1]=_toqttxxtaejni.PlayerAdded:Connect(function(_ykfhtprzct_) _0x905de9a8(_ykfhtprzct_)
for _curnsbjczx in pairs(l1lllI1Il11ll.ImageWatches) do
pcall(I1Il1IIIlllll1,_curnsbjczx)
end
end
)
end
end
local function _I11Ill1IIIl1()
for _IlII1III,_0x618b1dd in pairs(l1lllI1Il11ll.Saved) do
for _0xb8352,llIIlI1Il in pairs(_0x618b1dd) do
pcall(function() _IlII1III[_0xb8352]=llIIlI1Il
end
)
end
end
l1lllI1Il11ll.Saved={}
end
local function _0xf454(_0x7aab5) l1lllI1Il11ll.Generation=l1lllI1Il11ll.Generation+1
local _l11I11l11IlI=l1lllI1Il11ll.Generation
if l1lllI1Il11ll.Descendants then
l1lllI1Il11ll.Descendants:Disconnect() l1lllI1Il11ll.Descendants=nil
end
_I11Ill1IIIl1() l1lllI1Il11ll.Character=_0x7aab5
if not l1lllI1Il11ll.Alive or not l1lllI1Il11ll.Enabled or not _0x7aab5 then
return
end
local _0x4ff5a23=Color3.fromRGB(255,0,0)
local function ll11l1lII(_11llI11lII1l)
if l1lllI1Il11ll.Saved[_11llI11lII1l] or not _11llI11lII1l:IsDescendantOf(_0x7aab5) then
return
end
local _0x846be71
if _11llI11lII1l:IsA("Accessory") or _11llI11lII1l:IsA("Shirt") or _11llI11lII1l:IsA("Pants") or _11llI11lII1l:IsA("ShirtGraphic") or _11llI11lII1l:IsA("CharacterMesh") then
_0x846be71={Parent=false}
elseif _11llI11lII1l:IsA("BasePart") and _11llI11lII1l.Parent==_0x7aab5 and _11llI11lII1l.Name~="HumanoidRootPart" then
_0x846be71={Color=_0x4ff5a23}
if _11llI11lII1l:IsA("MeshPart") then
_0x846be71.TextureID=""
end
elseif _11llI11lII1l:IsA("BodyColors") then
_0x846be71={}
for _wwyqenwvjn,_pkhvapd in ipairs({"HeadColor3","TorsoColor3","LeftArmColor3","RightArmColor3","LeftLegColor3","RightLegColor3"}) do
_0x846be71[_pkhvapd]=_0x4ff5a23
end
elseif _11llI11lII1l:IsA("SpecialMesh") and _11llI11lII1l.Parent and _11llI11lII1l.Parent.Parent==_0x7aab5 then
_0x846be71={TextureId=""}
elseif _11llI11lII1l:IsA("SurfaceAppearance") and _11llI11lII1l.Parent and _11llI11lII1l.Parent.Parent==_0x7aab5 then
_0x846be71={Parent=false}
end
if _0x846be71 then
local _0xba700={} l1lllI1Il11ll.Saved[_11llI11lII1l]=_0xba700
for l1Ill1I1,l11lIII1 in pairs(_0x846be71) do
pcall(function() _0xba700[l1Ill1I1]=_11llI11lII1l[l1Ill1I1]
if l1Ill1I1=="Parent" then
_11llI11lII1l.Parent=nil
else
_11llI11lII1l[l1Ill1I1]=l11lIII1
end
end
)
end
end
end
l1lllI1Il11ll.Descendants=_0x7aab5.DescendantAdded:Connect(function(lIl1IlIll1I) task.defer(function()
if l1lllI1Il11ll.Alive and l1lllI1Il11ll.Enabled and _l11I11l11IlI==l1lllI1Il11ll.Generation then
pcall(ll11l1lII,lIl1IlIll1I)
end
end
)
end
)
for _cvejmzljyefxl,_0xdb69 in ipairs(_0x7aab5:GetDescendants()) do
pcall(ll11l1lII,_0xdb69)
end
end
function l1lllI1Il11ll.Set(_0x85d9c)
if not l1lllI1Il11ll.Alive then
return
end
_0x85d9c=_0x85d9c==true _0xc074.HideUser=_0x85d9c
if l1lllI1Il11ll.Enabled==_0x85d9c and (not _0x85d9c or l1lllI1Il11ll.Character==_hthfivdqj_qnr.Character) then
return
end
l1lllI1Il11ll.Enabled=_0x85d9c _0xf454(_0x85d9c and _hthfivdqj_qnr.Character or nil) _0xebd6d2()
end
function l1lllI1Il11ll.Destroy()
if not l1lllI1Il11ll.Alive then
return
end
l1lllI1Il11ll.Alive=false l1lllI1Il11ll.Enabled=false _0xf454(nil) _0xc665c4()
if l1lllI1Il11ll.Respawn then
l1lllI1Il11ll.Respawn:Disconnect() l1lllI1Il11ll.Respawn=nil
end
if _0x8aa53b31[_0xd7ab22f1]==l1lllI1Il11ll then
_0x8aa53b31[_0xd7ab22f1]=nil
end
end
l1lllI1Il11ll.Respawn=_hthfivdqj_qnr.CharacterAdded:Connect(function(_lll1llIllI1l)
if l1lllI1Il11ll.Alive and l1lllI1Il11ll.Enabled then
_0xf454(_lll1llIllI1l)
end
end
) function _nskhdwamyrmet.SetHideUser(II1lIIl1I) l1lllI1Il11ll.Set(II1lIIl1I)
end
if hubWindow and type(hubWindow.OnDestroy)=="function" then
pcall(function() hubWindow:OnDestroy(l1lllI1Il11ll.Destroy)
end
)
end
l1lllI1Il11ll.Set(_0xc074.HideUser)
end
__jna_giqojd_(_0x24ed,"Hide User","HideUser",nil,hubState.SetHideUser) _0x633c(_0x24ed,"Performance") __jna_giqojd_(_0x24ed,"FPS Boost","FPSBoost",nil,hubState.SetFPS) _0x633c(_0x24ed,"Anti-AFK") __jna_giqojd_(_0x24ed,"Anti-AFK","AntiAFK") do
local _l1lll1llIl=hubWindow:Tab({Title="Info",Icon="info"})
local III1IIlI="https://discord.gg/CP2RHTgbFT" _l1lll1llIl:Section({Title="Information"}) _l1lll1llIl:Paragraph({Title="Cactus Hub",Desc="Feel Free To Join Discord For Suggestion and Report Bugs"}) _l1lll1llIl:Button({Title="Discord",Desc=III1IIlI,Icon="external-link",Callback=function()
local _IlII1I1
if type(openurl)=="function" then
local _tcxvwim,_0x9917=pcall(openurl,III1IIlI)
if _tcxvwim and _0x9917~=false then
_IlII1I1="Discord link opened."
end
end
if not _IlII1I1 then
for _gcjzkjcdsvetp,II1lllIl in ipairs({"setclipboard","toclipboard","set_clipboard"}) do
local _i_mjbsvxx=type(getgenv)=="function" and getgenv() or _G
local _ryh_lbe=_i_mjbsvxx[II1lllIl]
if type(_ryh_lbe)=="function" then
local Il1Il1lII,_uzbctbsxqlgxf=pcall(_ryh_lbe,III1IIlI)
if Il1Il1lII and _uzbctbsxqlgxf~=false then
_IlII1I1="Copied! Paste the link into your browser or Discord."
break
end
end
end
end
pcall(function() uiLibrary:Notify({Title="Discord",Content=_IlII1I1 or "Open this link: " .. III1IIlI,Duration=5,Icon="message-circle"})
end
)
end
})
end
hubState.Syncing=false
if hubWindow.OnDestroy then
hubWindow:OnDestroy(hubState.Destroy)
end
end
hubState.ReadState() hubState.Connect(localPlayer.Idled,function()
if hubSettings.AntiAFK then
local _0x5f35=game:GetService("VirtualUser") pcall(function() _0x5f35:CaptureController() _0x5f35:ClickButton2(Vector2.new())
end
)
end
end
) do
local function _0x90a22(_0xd693)
local III1Ill1IlI=_0xd693.Player
local _0x296f3=_0xd693.Lobby
local _fllcorv,_k_wmhtjife=game.PlaceId,game.JobId
local _ustyaxpcqszlx=game:GetService("TeleportService")
local _I1lIl1llI={}
local _0x82f995={2,8,18}
local lIIl1lll1,l1l1l11ll1,_0x998d
local lI1l1Il11l1
local _r_v_keuuv=-math.huge function _I1lIl1llI.Busy()
return l1l1l11ll1~=nil
end
function _I1lIl1llI.Watch(_zoi_hrazo)
local _I1I1l111Il1l1=_0xd693.ReplayKey and _0xd693.ReplayKey() _zoi_hrazo=_zoi_hrazo or _I1I1l111Il1l1
if _zoi_hrazo==nil or _I1I1l111Il1l1~=_zoi_hrazo or lIIl1lll1 and lIIl1lll1.Key==_zoi_hrazo then
return
end
lIIl1lll1={Key=_zoi_hrazo,Deadline=os.clock()+(_0xd693.ReplayTimeout or 35)}
return lIIl1lll1
end
function _I1lIl1llI.Rejected(_0xcec3e2)
if lIIl1lll1==_0xcec3e2 then
lIIl1lll1=nil
end
end
function _I1lIl1llI.Request(_0xca9dd69a,_0xb7e3)
if l1l1l11ll1 or not _0xd693.Alive() then
return
end
if _0xd693.LegacyPending and _0xd693.LegacyPending() then
return
end
if game.PlaceId==_0x296f3 and not _0xd693.SamePlace then
return
end
l1l1l11ll1={Reason=_0xca9dd69a,ReplayKey=_0xb7e3,Attempts=0,NextAt=os.clock()+_0x82f995[1]} warn("[CactusHub Hub] " .. _0xca9dd69a .. ". Returning to lobby.")
end
local function _0xec2fb(_0x222c63b2)
if not _0xd693.Alive() then
return
end
if l1l1l11ll1 and l1l1l11ll1.Waiting and _0x222c63b2 and _0x222c63b2~=_0x296f3 then
return
end
local _0xf529=os.clock()
if _0xf529 - _r_v_keuuv<1 then
return
end
_r_v_keuuv=_0xf529 _0x998d=nil
if l1l1l11ll1 and l1l1l11ll1.Waiting then
l1l1l11ll1.Waiting=nil l1l1l11ll1.NextAt=_0xf529+(_0x82f995[l1l1l11ll1.Attempts+1] or 0)
elseif not _0xd693.AutoRejoin or _0xd693.AutoRejoin() then
local _0x856fa=lIIl1lll1 and lIIl1lll1.Key _I1lIl1llI.Request("Roblox teleport failed",_0x856fa)
end
end
local function _0x517910(II1l1I11l1lI)
local _0x9ca0=type(II1l1I11l1lI)=="string" and II1l1I11l1lI:lower() or ""
if _0x9ca0==lI1l1Il11l1 then
return
end
lI1l1Il11l1=_0x9ca0
if _0x9ca0:find("teleport",1,true) and (_0x9ca0:find("fail",1,true) or _0x9ca0:find("error",1,true) or _0x9ca0:find("unable",1,true)) then
_0xec2fb()
end
end
function _I1lIl1llI.Step()
if game.PlaceId~=_fllcorv or game.JobId~=_k_wmhtjife then
lIIl1lll1,l1l1l11ll1,_0x998d=nil,nil,nil
return
end
local _laglowhnddmp=os.clock()
if _0x998d and _laglowhnddmp>=_0x998d then
_0x998d=nil
end
local _ofwhezjukmp=(lIIl1lll1 or l1l1l11ll1 and l1l1l11ll1.ReplayKey~=nil) and _0xd693.ReplayKey()
if lIIl1lll1 and lIIl1lll1.Key~=_ofwhezjukmp then
lIIl1lll1=nil
end
if l1l1l11ll1 and l1l1l11ll1.ReplayKey~=nil and l1l1l11ll1.ReplayKey~=_ofwhezjukmp then
l1l1l11ll1=nil
end
if lIIl1lll1 and not _0x998d and _laglowhnddmp>=lIIl1lll1.Deadline then
_I1lIl1llI.Request("Replay sent but the match did not restart",lIIl1lll1.Key)
end
if not l1l1l11ll1 or _0x998d then
return
end
if l1l1l11ll1.Waiting then
if _laglowhnddmp<l1l1l11ll1.Waiting then
return
end
l1l1l11ll1.Waiting=nil l1l1l11ll1.NextAt=_laglowhnddmp+(_0x82f995[l1l1l11ll1.Attempts+1] or 0)
end
if _laglowhnddmp<l1l1l11ll1.NextAt or l1l1l11ll1.Exhausted then
return
end
if l1l1l11ll1.Attempts>=#_0x82f995 then
l1l1l11ll1.Exhausted=true warn("[CactusHub Hub] Lobby teleport unconfirmed after 3 attempts.")
return
end
local _1ll11IIII1lII=l1l1l11ll1 _1ll11IIII1lII.Attempts=_1ll11IIII1lII.Attempts+1 _1ll11IIII1lII.Waiting=_laglowhnddmp+25
if _0xd693.BeforeTeleport then
pcall(_0xd693.BeforeTeleport)
end
if l1l1l11ll1~=_1ll11IIII1lII or not _0xd693.Alive() then
return
end
if _1ll11IIII1lII.ReplayKey~=nil and _0xd693.ReplayKey()~=_1ll11IIII1lII.ReplayKey then
l1l1l11ll1=nil
return
end
local _lll11111II1I=pcall(_ustyaxpcqszlx.Teleport,_ustyaxpcqszlx,_0x296f3,III1Ill1IlI)
if not _lll11111II1I and l1l1l11ll1==_1ll11IIII1lII and _1ll11IIII1lII.Waiting then
_1ll11IIII1lII.Waiting=nil _1ll11IIII1lII.NextAt=os.clock()+(_0x82f995[_1ll11IIII1lII.Attempts+1] or 0)
end
end
_0xd693.Connect(_ustyaxpcqszlx.TeleportInitFailed,function(II11II1lI,Il1l1llI1,Il1l1llI1,_cgicwcooauc)
if II11II1lI==III1Ill1IlI then
_0xec2fb(_cgicwcooauc)
end
end
) _0xd693.Connect(III1Ill1IlI.OnTeleport,function(_wsfecgdzzrl,_csvqvdonkdl)
if _wsfecgdzzrl==Enum.TeleportState.Failed then
_0xec2fb(_csvqvdonkdl)
elseif _wsfecgdzzrl==Enum.TeleportState.Started or _wsfecgdzzrl==Enum.TeleportState.InProgress then
_0x998d=_0x998d or os.clock()+25
end
end
) pcall(function()
local _zdjsakrgxfmsr=game:GetService("GuiService") _0xd693.Connect(_zdjsakrgxfmsr.ErrorMessageChanged,_0x517910) _0x517910(_zdjsakrgxfmsr:GetErrorMessage())
end
) task.spawn(function()
while _0xd693.Alive() and game.PlaceId==_fllcorv and game.JobId==_k_wmhtjife do
_I1lIl1llI.Step() task.wait(0.25)
end
end
)
return _I1lIl1llI
end
hubState.Recovery=_0x90a22({Player=localPlayer,Lobby=hubState.LobbyId,Connect=hubState.Connect,Alive=function()
return hubState.Running
end
,BeforeTeleport=function() hubState.SaveConfig() hubState.QueueTeleport()
end
,ReplayKey=function()
if hubSettings.EndAction=="Replay" then
return hubState.Ended and hubState.Round or nil
end
end
,AutoRejoin=function()
return hubSettings.AutoRejoin
end
})
end
hubState.Connect(localPlayer.OnTeleport,function(_111l1II)
if _111l1II==Enum.TeleportState.Started then
hubState.SaveConfig() hubState.QueueTeleport()
end
end
)
if lIIIIllll11I1.TeleportInitFailed then
hubState.Connect(lIIIIllll11I1.TeleportInitFailed,function(_0x46b4)
if _0x46b4==localPlayer then
hubState.RejoinAt=nil hubState.Next.RejoinAttempt=os.clock()+10 hubState.JoinSent=nil
end
end
)
end
pcall(function()
local _0x3978=game:GetService("GuiService") hubState.Connect(_0x3978.ErrorMessageChanged,function(_0xacc124)
if type(_0xacc124)~="string" then
return
end
_0xacc124=_0xacc124:lower()
if _0xacc124:find("disconnect",1,true) or _0xacc124:find("connection",1,true) or _0xacc124:find("kicked",1,true) or _0xacc124:match("error%s*code%s*:%s*%d+") then
hubState.Disconnected=true
end
end
)
end
)
local _0x373f0,IllIII1ll111I=pcall(hubState.BuildUI)
if not _0x373f0 then
hubState.Destroy() error("Dragon TD UI: " .. tostring(IllIII1ll111I),0)
end
if not hubState.Running or executorEnvironment.DragonTDHub~=hubState then
return
end
if hubSettings.Profile~="" then
hubState.LoadMacro(hubSettings.Profile)
end
hubState.SetHide(hubSettings.HideName) hubState.SetFPS(hubSettings.FPSBoost) hubState.QueueTeleport() hubState.SkipManaged=hubSettings.AutoSkip hubState.StateStep()
local function _beeeq_qi(_teuzsbfdvb,_0x4d2cfa8,_0xf414dd12) task.spawn(function()
while hubState.Running do
local _0x3b6b4,ll1IIlI1I=pcall(_0xf414dd12)
if not _0x3b6b4 then
hubState.LastError=_teuzsbfdvb .. ": " .. tostring(ll1IIlI1I)
end
task.wait(_0x4d2cfa8)
end
end
)
end
_beeeq_qi("State",.05,hubState.StateStep) _beeeq_qi("Record",.03,function()
local _11lllII1=hubState.Jobs[hubState.Head]
if not _11lllII1 or not _11lllII1.Done then
return
end
hubState.RecordBusy=true
local _0x6c484772,lI11l1111lI1I1=pcall(hubState.RecordJob,_11lllII1) hubState.RecordBusy=false hubState.Head=hubState.Head+1
if not _0x6c484772 then
hubState.RecordFault=tostring(lI11l1111lI1I1)
end
if hubState.Head>#hubState.Jobs then
hubState.Jobs={} hubState.Head=1
end
end
) _beeeq_qi("Match",.2,function() hubState.WaveStep() hubState.EndStep()
end
) _beeeq_qi("Lobby",.25,hubState.LobbyStep) _beeeq_qi("Summon",.25,hubState.SummonStep) _beeeq_qi("Rejoin",1,hubState.RejoinStep) hubState.Notify("Hub loaded")]========]
if isfile(destination) then
local existing = readfile(destination)
if existing ~= hubSource then
pcall(writefile, folder .. "/Hub_backup_before_Cactus.lua", existing)
end
end
writefile(destination, hubSource)
assert(readfile(destination) == hubSource, "[Cactus Hub] Could not verify Hub.lua was updated")
local runHub, compileError = loadstring(hubSource)
assert(runHub, compileError)
runHub()Copy the code above into a compatible Roblox script executor if you choose to test it.
Dragon Tower Defense Script Status
Roblox and game updates can affect compatibility, so the script’s status should be treated as temporary rather than guaranteed.
Frequently Asked Questions
What is a Dragon Tower Defense script?
A Dragon Tower Defense script is third-party Lua code intended to run alongside the Roblox game through a compatible script executor.
What features does this Dragon Tower Defense script include?
Different scripts contain different code. This version includes: Macro, Auto Farm.
How do you use the Dragon Tower Defense script?
Pick a compatible executor such as Hydrogen, MacSploit, AWP.GG, Delta, Fluxus, Codex, launch Roblox and join the game, copy the complete Lua code from the script card above, paste it into the executor’s editor, and click Run or Execute. Compatibility changes over time, so a name here doesn’t guarantee current support.
Can a Dragon Tower Defense script get your Roblox account banned?
Yes. Third-party scripts can violate Roblox rules and may put an account at risk. Only use code from a source you trust, never enter your Roblox password into a script or executor, and test on an alternate account first.
Does the Dragon Tower Defense script work on mobile?
Check whether both the executor and the script support your device and the current Roblox version. Mobile executor support does not guarantee that every script will work.