Created
July 26, 2026 02:29
-
-
Save q687239-lang/34b7c8b7b3a8ed2954a4f26a8f28a5f5 to your computer and use it in GitHub Desktop.
Hub sparks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| local P,T,U=game:GetService"Players",game:GetService"TweenService",game:GetService"UserInputService" | |
| local RS=game:GetService"RunService";local CG=game:GetService"CoreGui";local C=workspace.CurrentCamera | |
| local LP=P.LocalPlayer;local PG=LP:WaitForChild"PlayerGui" | |
| local CH=LP.Character or LP.CharacterAdded:Wait();local H=CH:WaitForChild"Humanoid";local R=CH:WaitForChild"HumanoidRootPart" | |
| local CF={A=true,TC=true,WC=true,E=true,F=false,NC=false,FS=50} | |
| local f,g,bv=false;local u,d=false,false | |
| local espHighlights={};local espRainbow=false;local rainbow=0 | |
| -- ===== FIXED ESP: respects Team Check ===== | |
| local function createESP(pl) | |
| -- Don't create for self | |
| if pl==LP then return end | |
| -- Don't create if already exists | |
| if espHighlights[pl.Name] then return end | |
| -- Team Check: skip teammates if enabled | |
| if CF.TC and LP.Team and pl.Team and LP.Team==pl.Team then return end | |
| pcall(function() | |
| local h=Instance.new("Highlight") | |
| h.FillColor=Color3.fromRGB(255,50,50) | |
| h.FillTransparency=0.5 | |
| if pl.Character then | |
| h.Adornee=pl.Character | |
| h.Parent=pl.Character | |
| end | |
| espHighlights[pl.Name]=h | |
| end) | |
| end | |
| local function removeESP(pl) | |
| if espHighlights[pl.Name] then | |
| pcall(function() espHighlights[pl.Name]:Destroy() end) | |
| espHighlights[pl.Name]=nil | |
| end | |
| end | |
| local function toggleESP(state) | |
| CF.E=state | |
| if state then | |
| for _,pl in pairs(P:GetPlayers()) do createESP(pl) end | |
| else | |
| for _,pl in pairs(P:GetPlayers()) do removeESP(pl) end | |
| end | |
| end | |
| -- When new players join, only create if ESP is ON | |
| P.PlayerAdded:Connect(function(pl) | |
| if CF.E then | |
| task.wait(0.1) | |
| createESP(pl) | |
| end | |
| end) | |
| -- When players leave, remove their Highlight | |
| P.PlayerRemoving:Connect(function(pl) | |
| removeESP(pl) | |
| end) | |
| -- Respawn: re‑apply ESP to all players (needed if character resets) | |
| LP.CharacterAdded:Connect(function() | |
| task.wait(0.5) | |
| if CF.E then | |
| for _,pl in pairs(P:GetPlayers()) do | |
| if pl~=LP then | |
| removeESP(pl) | |
| task.wait(0.05) | |
| createESP(pl) | |
| end | |
| end | |
| end | |
| end) | |
| -- Rainbow ESP loop | |
| task.spawn(function() | |
| while true do | |
| if espRainbow and CF.E then | |
| rainbow=(rainbow+0.01)%1 | |
| local col=Color3.fromHSV(rainbow,1,1) | |
| for _,h in pairs(espHighlights) do | |
| if h then pcall(function() h.FillColor=col end) end | |
| end | |
| end | |
| task.wait(0.05) | |
| end | |
| end) | |
| local function sF()if not R then return end;f=true;H.PlatformStand=false;H.AutoRotate=false;bv=Instance.new"BodyVelocity";bv.MaxForce=Vector3.new(math.huge,math.huge,math.huge);bv.Velocity=Vector3.zero;bv.Parent=R;g=Instance.new"BodyGyro";g.MaxTorque=Vector3.new(math.huge,math.huge,math.huge);g.P=3000;g.CFrame=R.CFrame;g.Parent=R end | |
| local function stF()f=false;if g then g:Destroy();g=nil end;if bv then bv:Destroy();bv=nil end;H.PlatformStand=false;H.AutoRotate=true;R.Velocity=Vector3.zero end | |
| local function tF()if f then stF()else sF()end;CF.F=f end | |
| local function aNC()if H then H:SetStateEnabled(Enum.HumanoidStateType.Climbing,not CF.NC);H:SetStateEnabled(Enum.HumanoidStateType.FallingDown,not CF.NC)end;for _,p in pairs(CH:GetDescendants())do if p:IsA"BasePart"then p.CanCollide=not CF.NC end end end | |
| U.InputBegan:Connect(function(i,g)if g then return end;if i.KeyCode==Enum.KeyCode.F then tF()elseif i.KeyCode==Enum.KeyCode.Space then u=true elseif i.KeyCode==Enum.KeyCode.LeftControl then d=true end end) | |
| U.InputEnded:Connect(function(i)if i.KeyCode==Enum.KeyCode.Space then u=false elseif i.KeyCode==Enum.KeyCode.LeftControl then d=false end end) | |
| local TH={B=Color3.fromRGB(20,20,25),S=Color3.fromRGB(15,15,18),A=Color3.fromRGB(120,190,255),T=Color3.fromRGB(230,230,230),St=Color3.fromRGB(140,140,140),To=Color3.fromRGB(60,60,68)} | |
| local SW,SC=180,55;local TABS={{'Combat','⚔'},{'Visuals','👁'},{'Movement','🏃'}} | |
| local function N(c,p,pa)local o=Instance.new(c);for k,v in pairs(p)do o[k]=v end;if pa then o.Parent=pa end;return o end | |
| local SG=N("ScreenGui",{Name="SH",ResetOnSpawn=false,IgnoreGuiInset=true},CG) | |
| local MN=N("Frame",{Size=UDim2.new(0,500,0,320),Position=UDim2.new(.5,-250,.5,-160),BackgroundColor3=TH.B,BorderSizePixel=0},SG);N("UICorner",{CornerRadius=UDim.new(0,8)},MN) | |
| local SB=N("Frame",{Size=UDim2.new(0,SW,1,0),BackgroundColor3=TH.S,BorderSizePixel=0,ClipsDescendants=true},MN);N("UICorner",{CornerRadius=UDim.new(0,8)},SB);N("Frame",{Size=UDim2.new(0,10,1,0),Position=UDim2.new(1,-10,0,0),BackgroundColor3=TH.S,BorderSizePixel=0,ZIndex=0},SB) | |
| local TL=N("TextLabel",{Size=UDim2.new(1,-20,0,40),Position=UDim2.new(0,10,0,5),BackgroundTransparency=1,Font=Enum.Font.GothamBold,Text="SPARK HUB",TextColor3=TH.T,TextSize=18,TextXAlignment=Enum.TextXAlignment.Left,Active=true},SB) | |
| local CB=N("TextButton",{Size=UDim2.new(0,30,0,30),Position=UDim2.new(1,-38,0,5),BackgroundColor3=Color3.fromRGB(255,50,50),BackgroundTransparency=.3,BorderSizePixel=0,Text="✕",TextColor3=Color3.new(1,1,1),TextSize=18,Font=Enum.Font.GothamBold},SB);N("UICorner",{CornerRadius=UDim.new(1,0)},CB) | |
| local OB=N("TextButton",{Size=UDim2.new(0,55,0,55),Position=UDim2.new(.9,0,.05,0),BackgroundColor3=Color3.fromRGB(0,170,255),BorderSizePixel=0,Text="OPEN",TextColor3=Color3.new(1,1,1),TextSize=16,Font=Enum.Font.GothamBold,Visible=false,ZIndex=999},SG);N("UICorner",{CornerRadius=UDim.new(1,0)},OB) | |
| CB.MouseButton1Click:Connect(function()MN.Visible=false;OB.Visible=true end) | |
| OB.MouseButton1Click:Connect(function()MN.Visible=true;OB.Visible=false end) | |
| local TB=N("Frame",{Size=UDim2.new(1,0,1,-95),Position=UDim2.new(0,0,0,50),BackgroundTransparency=1},SB);N("UIListLayout",{Padding=UDim.new(0,4),SortOrder=Enum.SortOrder.LayoutOrder},TB) | |
| local CL=N("TextButton",{Size=UDim2.new(1,-20,0,32),Position=UDim2.new(0,10,1,-40),BackgroundColor3=Color3.fromRGB(30,30,35),AutoButtonColor=false,Font=Enum.Font.Gotham,Text="◀ Collapse",TextColor3=TH.St,TextSize=13},SB);N("UICorner",{CornerRadius=UDim.new(0,6)},CL) | |
| local CN=N("Frame",{Size=UDim2.new(1,-SW,1,0),Position=UDim2.new(0,SW,0,0),BackgroundColor3=TH.B,BorderSizePixel=0},MN) | |
| local drg,ds,sp;TL.InputBegan:Connect(function(i)if i.UserInputType==Enum.UserInputType.MouseButton1 or i.UserInputType==Enum.UserInputType.Touch then drg,ds,sp=true,i.Position,MN.Position;i.Changed:Connect(function()if i.UserInputState==Enum.UserInputState.End then drg=false end end)end end) | |
| U.InputChanged:Connect(function(i)if drg and(i.UserInputType==Enum.UserInputType.MouseMovement or i.UserInputType==Enum.UserInputType.Touch)then local d=i.Position-ds;MN.Position=UDim2.new(sp.X.Scale,sp.X.Offset+d.X,sp.Y.Scale,sp.Y.Offset+d.Y)end end) | |
| local PGS,TBS,ACT,COL={},{},nil,false | |
| local function sT(n)if ACT==n then return end;ACT=n;for k,v in pairs(PGS)do v.Visible=(k==n)end;for k,v in pairs(TBS)do local o=k==n;v.BackgroundColor3=o and TH.A or TH.S;v.TextColor3=o and Color3.new(1,1,1)or TH.St end end | |
| local function cT(pg,od,l,g,s)local st=g();local h=N("Frame",{Size=UDim2.new(1,0,0,32),BackgroundTransparency=1,LayoutOrder=od},pg);N("TextLabel",{Size=UDim2.new(1,-54,1,0),BackgroundTransparency=1,Font=Enum.Font.Gotham,Text=l,TextColor3=TH.T,TextSize=14,TextXAlignment=Enum.TextXAlignment.Left},h);local sw=N("TextButton",{Size=UDim2.new(0,44,0,22),Position=UDim2.new(1,-44,.5,-11),BackgroundColor3=st and TH.A or TH.To,AutoButtonColor=false,Text=""},h);N("UICorner",{CornerRadius=UDim.new(1,0)},sw);local kn=N("Frame",{Size=UDim2.new(0,18,0,18),Position=st and UDim2.new(1,-20,.5,-9)or UDim2.new(0,2,.5,-9),BackgroundColor3=Color3.new(1,1,1)},sw);N("UICorner",{CornerRadius=UDim.new(1,0)},kn);sw.MouseButton1Click:Connect(function()st=not st;s(st);T:Create(sw,TweenInfo.new(.15),{BackgroundColor3=st and TH.A or TH.To}):Play();T:Create(kn,TweenInfo.new(.15),{Position=st and UDim2.new(1,-20,.5,-9)or UDim2.new(0,2,.5,-9)}):Play();if l=="Fly"then tF()end;if l=="NoClip"then aNC()end end)end | |
| local function cS(pg,od,l,g,s,mi,ma)local h=N("Frame",{Size=UDim2.new(1,0,0,40),BackgroundTransparency=1,LayoutOrder=od},pg);local lb=N("TextLabel",{Size=UDim2.new(0.6,0,1,0),BackgroundTransparency=1,Font=Enum.Font.Gotham,Text=l..": "..g(),TextColor3=TH.T,TextSize=13,TextXAlignment=Enum.TextXAlignment.Left},h);local tr=N("Frame",{Size=UDim2.new(0.4,0,0,6),Position=UDim2.new(.5,0,.5,-3),BackgroundColor3=Color3.fromRGB(60,60,65),BorderSizePixel=0},h);N("UICorner",{CornerRadius=UDim.new(0,3)},tr);local fi=N("Frame",{Size=UDim2.new((g()-mi)/(ma-mi),0,1,0),BackgroundColor3=TH.A,BorderSizePixel=0},tr);N("UICorner",{CornerRadius=UDim.new(0,3)},fi);local hd=N("Frame",{Size=UDim2.new(0,12,0,12),Position=UDim2.new((g()-mi)/(ma-mi),-6,.5,-6),BackgroundColor3=TH.A,BorderSizePixel=0},tr);N("UICorner",{CornerRadius=UDim.new(1,0)},hd);local function up(v)v=math.clamp(math.round(v),mi,ma);s(v);lb.Text=l..": "..v;fi.Size=UDim2.new((v-mi)/(ma-mi),0,1,0);hd.Position=UDim2.new((v-mi)/(ma-mi),-6,.5,-6)end;local dr=false;tr.InputBegan:Connect(function(i)if i.UserInputType==Enum.UserInputType.MouseButton1 or i.UserInputType==Enum.UserInputType.Touch then local pos=tr.AbsolutePosition.X;local sz=tr.AbsoluteSize.X;local v=((i.Position.X-pos)/sz)*(ma-mi)+mi;up(v);dr=true end end);tr.InputChanged:Connect(function(i)if dr and(i.UserInputType==Enum.UserInputType.MouseMovement or i.UserInputType==Enum.UserInputType.Touch)then local pos=tr.AbsolutePosition.X;local sz=tr.AbsoluteSize.X;local v=((i.Position.X-pos)/sz)*(ma-mi)+mi;up(v)end end);U.InputEnded:Connect(function(i)if i.UserInputType==Enum.UserInputType.MouseButton1 or i.UserInputType==Enum.UserInputType.Touch then dr=false end end)end | |
| for i,t in ipairs(TABS)do local n,ic=t[1],t[2];local b=N("TextButton",{Size=UDim2.new(1,-20,0,36),BackgroundColor3=TH.S,AutoButtonColor=false,Font=Enum.Font.Gotham,Text=" "..ic.." "..n,TextColor3=TH.St,TextSize=14,TextXAlignment=Enum.TextXAlignment.Left,LayoutOrder=i},TB);N("UICorner",{CornerRadius=UDim.new(0,6)},b);b.MouseButton1Click:Connect(function()sT(n)end);TBS[n]=b;local pg=N("ScrollingFrame",{Size=UDim2.new(1,-20,1,-20),Position=UDim2.new(0,10,0,10),BackgroundTransparency=1,BorderSizePixel=0,ScrollBarThickness=4,AutomaticCanvasSize=Enum.AutomaticSize.Y,Visible=false},CN);N("UIListLayout",{Padding=UDim.new(0,6),SortOrder=Enum.SortOrder.LayoutOrder},pg);if n=="Combat"then cT(pg,1,"Aimbot",function()return CF.A end,function(v)CF.A=v end);cT(pg,2,"Team Check",function()return CF.TC end,function(v)CF.TC=v end);cT(pg,3,"Wall Check",function()return CF.WC end,function(v)CF.WC=v end)elseif n=="Visuals"then cT(pg,1,"ESP",function()return CF.E end,function(v)CF.E=v;toggleESP(v)end);cT(pg,2,"Rainbow ESP",function()return espRainbow end,function(v)espRainbow=v end)elseif n=="Movement"then cT(pg,1,"Fly",function()return CF.F end,function(v)CF.F=v end);cT(pg,2,"NoClip",function()return CF.NC end,function(v)CF.NC=v;aNC()end);cS(pg,3,"Fly Speed",function()return CF.FS end,function(v)CF.FS=v end,5,150)end;PGS[n]=pg end | |
| sT(TABS[1][1]) | |
| CL.MouseButton1Click:Connect(function()COL=not COL;local w=COL and SC or SW;T:Create(SB,TweenInfo.new(.25),{Size=UDim2.new(0,w,1,0)}):Play();T:Create(CN,TweenInfo.new(.25),{Size=UDim2.new(1,-w,1,0),Position=UDim2.new(0,w,0,0)}):Play();TL.Visible=not COL;CL.Text=COL and"▶"or"◀ Collapse";for _,t in ipairs(TABS)do local b=TBS[t[1]];b.Text=COL and t[2]or(" "..t[2].." "..t[1]);b.TextXAlignment=COL and Enum.TextXAlignment.Center or Enum.TextXAlignment.Left end end) | |
| if U.TouchEnabled then | |
| local FG=N("ScreenGui",{Name="FlyBtns",ResetOnSpawn=false},PG) | |
| local PN=N("Frame",{Size=UDim2.new(0,55,0,130),Position=UDim2.new(.02,0,.08,0),BackgroundTransparency=1},FG) | |
| local HD=N("Frame",{Size=UDim2.new(1,0,0,12),BackgroundColor3=Color3.fromRGB(80,80,80),BackgroundTransparency=.3,BorderSizePixel=0},PN) | |
| local function mB(t,y,c)local b=N("TextButton",{Size=UDim2.new(0,40,0,40),Position=UDim2.new(.5,-20,0,y),Text=t,TextScaled=true,Font=Enum.Font.GothamBold,BackgroundColor3=c or Color3.fromRGB(40,40,40),TextColor3=Color3.new(1,1,1),BackgroundTransparency=.15},PN);N("UICorner",{CornerRadius=UDim.new(1,0)},b);return b end | |
| local uB=mB("⬆",18,Color3.fromRGB(0,170,255));uB.MouseButton1Down:Connect(function()u=true end);uB.MouseButton1Up:Connect(function()u=false end) | |
| local tB=mB("FLY",58,Color3.fromRGB(60,160,90));tB.MouseButton1Click:Connect(tF) | |
| local dB=mB("⬇",98,Color3.fromRGB(255,170,0));dB.MouseButton1Down:Connect(function()d=true end);dB.MouseButton1Up:Connect(function()d=false end) | |
| local pd,pds,pps;HD.InputBegan:Connect(function(i)if i.UserInputType==Enum.UserInputType.MouseButton1 or i.UserInputType==Enum.UserInputType.Touch then pd,pds,pps=true,i.Position,PN.Position end end) | |
| HD.InputEnded:Connect(function(i)if i.UserInputType==Enum.UserInputType.MouseButton1 or i.UserInputType==Enum.UserInputType.Touch then pd=false end end) | |
| HD.InputChanged:Connect(function(i)if pd and(i.UserInputType==Enum.UserInputType.MouseMovement or i.UserInputType==Enum.UserInputType.Touch)then local d=i.Position-pds;PN.Position=UDim2.new(pps.X.Scale,pps.X.Offset+d.X,pps.Y.Scale,pps.Y.Offset+d.Y)end end) | |
| RS.RenderStepped:Connect(function()tB.BackgroundColor3=f and Color3.fromRGB(60,160,90)or Color3.fromRGB(40,40,40)end)end | |
| local rp=RaycastParams.new();rp.FilterType=Enum.RaycastFilterType.Blacklist;rp.FilterDescendantsInstances={CH} | |
| local function getC() | |
| local c,sd=nil,1e9;local cen=Vector2.new(C.ViewportSize.X/2,C.ViewportSize.Y/2) | |
| for _,pl in pairs(P:GetPlayers())do if pl==LP then continue end | |
| if not pl.Character or not pl.Character:FindFirstChild"Humanoid"then continue end | |
| if pl.Character.Humanoid.Health<=0 then continue end | |
| if CF.TC and LP.Team and pl.Team==LP.Team then continue end | |
| local pt=pl.Character:FindFirstChild"Head"or pl.Character:FindFirstChild"HumanoidRootPart" | |
| if not pt then continue end | |
| if CF.WC then local dir=(pt.Position-C.CFrame.Position).Unit*500;local res=workspace:Raycast(C.CFrame.Position,dir,rp);if res and not res.Instance:IsDescendantOf(pl.Character)then continue end end | |
| local sp,on=C:WorldToScreenPoint(pt.Position);if not on then continue end | |
| local d=(Vector2.new(sp.X,sp.Y)-cen).Magnitude;if d<sd then sd=d;c=pl end | |
| end | |
| return c | |
| end | |
| RS.RenderStepped:Connect(function() | |
| if f and R then | |
| local md=H.MoveDirection;local fwd=-C.CFrame.LookVector;local rgt=C.CFrame.RightVector;local spd=CF.FS | |
| if bv then bv.Velocity=(fwd*-md.Z+rgt*md.X)*spd+Vector3.new(0,(u and spd or 0)-(d and spd or 0),0);if g then g.CFrame=C.CFrame end | |
| else R.Velocity=((fwd*-md.Z+rgt*md.X)*spd)+Vector3.new(0,(u and spd or 0)-(d and spd or 0),0)end | |
| end | |
| if CF.A then | |
| local t=getC() | |
| if t then | |
| local pt=t.Character:FindFirstChild"Head"or t.Character:FindFirstChild"HumanoidRootPart" | |
| if pt then | |
| C.CFrame=CFrame.lookAt(C.CFrame.Position,pt.Position) | |
| end | |
| end | |
| end | |
| end) | |
| print("✅ SPARK HUB – ESP now respects Team Check and toggles cleanly") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment