local Players = game:GetService("Players") local RunService = game:GetService("RunService") local UserInputService = game:GetService("UserInputService") local Workspace = game:GetService("Workspace") local Debris = game:GetService("Debris") local LP = Players.LocalPlayer local Cam = Workspace.CurrentCamera local V2, V3, CF, RGB = Vector2.new, Vector3.new, CFrame.new, Color3.fromRGB local U2, UO, UD = UDim2.fromScale, UDim2.fromOffset, UDim.new local Rad, Sin, Cos, Asin = math.rad, math.sin, math.cos, math.asin local Clamp, Max, Min, Abs, Huge, Pi = math.clamp, math.max, math.min, math.abs, math.huge, math.pi local Clock, Rand = os.clock, math.random local CFA = function(x, y, z) return CFrame.Angles(Rad(x), Rad(y), Rad(z)) end local function New(cls, par, props) local o = Instance.new(cls) if props then for k, v in pairs(props) do o[k] = v end end if par then o.Parent = par end return o end local CFG = { SwingAnim = "rbxassetid://97674654492880", WalkSpeed = 20, SprintSpeed = 40, JumpPower = 55, FOV = 70, SprintFOV = 82, SwingFOV = 92, WingFOV = 94, KickFOV = 98, WebMin = 18, WebFwd = 70, WebUp = 76, SwingSteer = 86, SwingBoost = 62, SwingPump = 42, ReleaseMult = 1.25, ReleaseUp = 34, ZipDist = 118, ZipSpeed = 156, ZipLift = 28, ZipCD = 0.6, ShootMax = 195, ShootImp = 105, ShootCD = 0.32, GrabMax = 28, GrabEdge = 34, CarryY = 5.2, CarryZ = 2.2, ThrowSpeed = 168, ThrowUp = 26, ThrowCD = 0.45, WingMin = 54, WingMax = 128, WingSink = 7.5, WingClimb = 54, WingDive = 78, CrawlSpeed = 28, CrawlDist = 7.0, CrawlOff = 2.6, CrawlJump = 66, JumpChargeMax = 1.0, JumpMinY = 86, JumpMaxY = 165, JumpFwd = 36, JumpCD = 0.75, DodgeSpeed = 86, DodgeDur = 0.34, DodgeCD = 0.42, FlipDur = 0.52, FlipUp = 58, FlipBack = 50, FlipCD = 0.55, PunchCD = 0.28, PunchDur = 0.32, PunchLunge = 58, PunchFling = 195, KickCD = 0.38, KickDur = 0.42, KickLunge = 72, KickFling = 240, SwingKickCD = 0.85, SwingKickDur = 0.68, SwingKickSpeed = 138, SwingKickFling = 320, SenseRad = 54, AutoDodgeRad = 25, ProjMinSpd = 25, NPCSpd = 14, } local SND = { WebShoot = "rbxassetid://9114223585", WebSnap = "rbxassetid://12222200", Whoosh = "rbxassetid://12222216", HeavyWhoosh = "rbxassetid://9117969687", Hit = "rbxassetid://9117969892", KO = "rbxassetid://4868633804", Wind = "rbxassetid://9113652855", Sense = "rbxassetid://9119720940", Land = "rbxassetid://9114223585", } local Char, Hum, Root, Animator, Rig local RAtt, Conns, Temp, Joints, C0s, C1s = nil, {}, {}, {}, {}, {} local Held, CD = {}, {} local SwingTrack, WindSound = nil, nil local HUD, MobilePad, PadScale, SenseStroke, JumpBg, JumpFill, HeadGui, SenseHL = nil, nil, nil, nil, nil, nil, nil, nil local Btns, Act = {}, {} local S = { Swinging = false, Hand = "R", Rope = nil, Webs = nil, SForce = nil, SAlign = nil, APart = nil, AAtt = nil, HAtt = nil, Anchor = V3(), WebAge = 0, Crawling = false, CAlignP = nil, CAlignO = nil, CNorm = V3(0, 1, 0), CPhase = 0, CExit = 0, WingActive = false, WingOpen = 0, WLV = nil, WAO = nil, WSpd = 68, WBank = 0, WPitch = 0, Wings = nil, GrabPart = nil, GAtt = nil, GAP = nil, GAO = nil, GWebL = nil, GWebR = nil, GNoCol = {}, ChargingJump = false, JumpStart = 0, JumpPct = 0, Sprinting = false, SenseAuto = true, ThreatActive = false, ThreatPos = nil, LastAutoDodge = 0, Anim = nil, AnimT = 0, AnimDur = 0, AnimDir = V3(), Combo = 1, LastCombo = 0, FlingMode = false, FlingEnd = 0, FlingPower = 220, FlingDir = V3(0, 0, -1), SavedVel = V3(), HitTargets = {}, SwingKicking = false, SKRope = nil, SKWeb = nil, SKPart = nil, WalkCycle = 0, LastAir = false, LandT = 0, CamShake = 0, } local function PlaySnd(id, vol, pitch, par) if not Root and not par then return end local s = New("Sound", par or Root, { SoundId = id, Volume = vol or 0.7, PlaybackSpeed = (pitch or 1) + (Rand(-6, 6) * 0.01), }) s:Play() Debris:AddItem(s, 2.5) return s end local function Shake(amt) S.CamShake = Max(S.CamShake, amt) end local function Ready(Action, d) local now = Clock() if (CD[Action] or 0) > now then return false end if d and d > 0 then CD[Action] = now + d end return true end local function PlayAnim(n, d, dir) S.Anim, S.AnimT, S.AnimDur, S.AnimDir = n, Clock(), d, dir or V3() end local function RayHit(orig, dir, ex) local rp = RaycastParams.new() rp.FilterType = Enum.RaycastFilterType.Exclude local f = { Char } if S.GrabPart then table.insert(f, S.GrabPart) end if ex then for _, v in ipairs(ex) do table.insert(f, v) end end rp.FilterDescendantsInstances = f rp.IgnoreWater = true return Workspace:Raycast(orig, dir, rp) end local function HandPart(side) if not Char then return Root end if Rig == Enum.HumanoidRigType.R15 then return Char:FindFirstChild(side == "L" and "LeftHand" or "RightHand") or Char:FindFirstChild(side == "L" and "LeftLowerArm" or "RightLowerArm") or Root end return Char:FindFirstChild(side == "L" and "Left Arm" or "Right Arm") or Root end local function MakeRealisticWeb(a0, a1, par) local p = par or Workspace local core = New("Beam", p, { Attachment0 = a0, Attachment1 = a1, Color = ColorSequence.new(RGB(248, 252, 255)), LightEmission = 0.45, LightInfluence = 0.15, Transparency = NumberSequence.new(0.02), Width0 = 0.11, Width1 = 0.16, FaceCamera = true, Segments = 28, }) local spiralA = New("Beam", p, { Attachment0 = a0, Attachment1 = a1, Color = ColorSequence.new(RGB(235, 244, 255)), LightEmission = 0.35, LightInfluence = 0.2, Transparency = NumberSequence.new({ NumberSequenceKeypoint.new(0, 0.2), NumberSequenceKeypoint.new(0.5, 0.38), NumberSequenceKeypoint.new(1, 0.15) }), Width0 = 0.22, Width1 = 0.28, FaceCamera = true, Segments = 28, CurveSize0 = 2.8, CurveSize1 = -2.8, }) local spiralB = New("Beam", p, { Attachment0 = a0, Attachment1 = a1, Color = ColorSequence.new(RGB(240, 248, 255)), LightEmission = 0.3, LightInfluence = 0.2, Transparency = NumberSequence.new({ NumberSequenceKeypoint.new(0, 0.25), NumberSequenceKeypoint.new(0.5, 0.45), NumberSequenceKeypoint.new(1, 0.2) }), Width0 = 0.18, Width1 = 0.24, FaceCamera = false, Segments = 24, CurveSize0 = -2.4, CurveSize1 = 2.4, }) local burst = New("ParticleEmitter", a0, { Color = ColorSequence.new(RGB(250, 252, 255)), Size = NumberSequence.new({ NumberSequenceKeypoint.new(0, 0.22), NumberSequenceKeypoint.new(1, 0) }), Transparency = NumberSequence.new({ NumberSequenceKeypoint.new(0, 0.1), NumberSequenceKeypoint.new(1, 1) }), Lifetime = NumberRange.new(0.12, 0.24), Speed = NumberRange.new(14, 28), SpreadAngle = V2(25, 25), LightEmission = 0.5, Rate = 0, }) burst:Emit(10) Debris:AddItem(burst, 0.35) return { core = core, sA = spiralA, sB = spiralB } end local function UpdateWebTension(w, age, taut) if not w or not w.core then return end local whip = Clamp(1 - age * 5.5, 0, 1) local wave = Sin(age * 38) * whip * 3.2 + (taut and 0 or 1.4) if w.sA then w.sA.CurveSize0 = wave; w.sA.CurveSize1 = -wave end if w.sB then w.sB.CurveSize0 = -wave * 0.85; w.sB.CurveSize1 = wave * 0.85 end end local function DestroyWeb(w) if not w then return end for _, b in pairs(w) do if b and b.Parent then b:Destroy() end end end local function SpawnDetachedWeb(p0, p1) local holder = New("Part", Workspace, { Size = V3(0.2, 0.2, 0.2), Position = p0, Anchored = true, CanCollide = false, CanQuery = false, CanTouch = false, Transparency = 1, }) local a0 = New("Attachment", holder, { WorldPosition = p0 }) local a1 = New("Attachment", holder, { WorldPosition = p1 }) local w = MakeRealisticWeb(a0, a1, holder) w.sA.CurveSize0 = 4.5; w.sA.CurveSize1 = -3.5 w.core.CurveSize0 = -2.2; w.core.CurveSize1 = 2.0 Debris:AddItem(holder, 0.32) end local function SpawnHitVFX(pos) local p = New("Part", Workspace, { Shape = Enum.PartType.Ball, Size = V3(1.5, 1.5, 1.5), Position = pos, Color = RGB(255, 235, 190), Material = Enum.Material.Neon, Anchored = true, CanCollide = false, CanQuery = false, CanTouch = false, Transparency = 0.15, }) local pe = New("ParticleEmitter", p, { Color = ColorSequence.new(RGB(255, 210, 90), RGB(255, 50, 40)), Size = NumberSequence.new({ NumberSequenceKeypoint.new(0, 0.45), NumberSequenceKeypoint.new(1, 0) }), Transparency = NumberSequence.new({ NumberSequenceKeypoint.new(0, 0), NumberSequenceKeypoint.new(1, 1) }), Lifetime = NumberRange.new(0.15, 0.32), Speed = NumberRange.new(24, 52), SpreadAngle = V2(180, 180), LightEmission = 0.85, Rate = 0, }) pe:Emit(18) task.spawn(function() for i = 1, 6 do p.Size = p.Size + V3(1.6, 1.6, 1.6) p.Transparency = 0.15 + (i / 6) * 0.85 task.wait(0.025) end end) Debris:AddItem(p, 0.38) end local function SetJ(k, rot, pos, a) local m = Joints[k] if not m or not C0s[k] then return end local r = rot or CF() if Rig == Enum.HumanoidRigType.R6 then local rx, ry, rz = r:ToEulerAnglesXYZ() if k == "Root" then r = CFA(-math.deg(rx), -math.deg(ry), -math.deg(rz)) elseif k == "Neck" then r = CFA(-math.deg(rx), -math.deg(rz), -math.deg(ry)) elseif k == "RS" or k == "RH" then r = CFA(math.deg(rz), math.deg(ry), math.deg(rx)) elseif k == "LS" or k == "LH" then r = CFA(-math.deg(rz), math.deg(ry), -math.deg(rx)) end end local goal = C0s[k] * CF(pos or V3()) * r m.C0 = (a and a < 1) and m.C0:Lerp(goal, Clamp(a, 0, 1)) or goal end local function ApplyPose(p, a, rPos) for k in pairs(Joints) do if C0s[k] then SetJ(k, p and p[k] or CF(), (k == "Root" and rPos) and rPos or V3(), a) end end end local function RestoreJointsInstant() for k, m in pairs(Joints) do if m and m.Parent and C0s[k] then m.C0 = C0s[k] if C1s[k] then m.C1 = C1s[k] end end end end local function StartFlingMode(dur, power, dir) S.FlingMode = true S.FlingEnd = Clock() + dur S.FlingPower = power or 220 S.FlingDir = (dir and dir.Magnitude > 0.01) and dir.Unit or Root.CFrame.LookVector S.HitTargets = {} if Root then S.SavedVel = Root.AssemblyLinearVelocity end end local function StopFlingMode() if not S.FlingMode then return end S.FlingMode = false S.HitTargets = {} if Root then Root.AssemblyAngularVelocity = V3() if S.SavedVel.Magnitude < 220 then Root.AssemblyLinearVelocity = S.SavedVel end end end local function FindNearestEnemy(maxDist) if not Root then return nil, nil end local op = OverlapParams.new() op.FilterType = Enum.RaycastFilterType.Exclude op.FilterDescendantsInstances = { Char } local parts = Workspace:GetPartBoundsInRadius(Root.Position + Root.CFrame.LookVector * (maxDist * 0.45), maxDist, op) local bestModel, bestRoot, bestScore = nil, nil, Huge local seen = {} for _, p in ipairs(parts) do local m = p:FindFirstAncestorOfClass("Model") if m and m ~= Char and not seen[m] then seen[m] = true local eh = m:FindFirstChildOfClass("Humanoid") local er = m:FindFirstChild("HumanoidRootPart") or m.PrimaryPart or (p:IsA("BasePart") and p) if eh and er and eh.Health > 0 then local toE = er.Position - Root.Position local d = toE.Magnitude local dot = d > 0.1 and Root.CFrame.LookVector:Dot(toE.Unit) or 1 local score = d - dot * 8 if score < bestScore then bestScore, bestModel, bestRoot = score, m, er end end end end return bestModel, bestRoot end local function StepCombatFling() if not S.FlingMode or not Root or not Hum or Hum.Health <= 0 then return end if Clock() >= S.FlingEnd then StopFlingMode() return end local op = OverlapParams.new() op.FilterType = Enum.RaycastFilterType.Exclude op.FilterDescendantsInstances = { Char } local hitCenter = Root.Position + S.FlingDir * 5.2 local parts = Workspace:GetPartBoundsInRadius(hitCenter, 8.5, op) local touchingEnemy = false for _, p in ipairs(parts) do local m = p:FindFirstAncestorOfClass("Model") if m and m ~= Char then local eh = m:FindFirstChildOfClass("Humanoid") local er = m:FindFirstChild("HumanoidRootPart") or m.PrimaryPart or p if eh and er then touchingEnemy = true if not S.HitTargets[m] then S.HitTargets[m] = true SpawnHitVFX(er.Position) PlaySnd(SND.Hit, 0.9, 1.0) PlaySnd(SND.KO, 0.85, 0.96) Shake(1.4) end pcall(function() eh.PlatformStand = true eh:ChangeState(Enum.HumanoidStateType.FallingDown) er.AssemblyLinearVelocity = S.FlingDir * S.FlingPower + V3(0, S.FlingPower * 0.48, 0) er.AssemblyAngularVelocity = V3(Rand(-60, 60), Rand(-80, 80), Rand(-60, 60)) task.delay(1.3, function() if eh and eh.Parent then eh.PlatformStand = false end end) end) end elseif p:IsA("BasePart") and not p.Anchored and p ~= S.APart and p ~= S.SKPart then if not S.HitTargets[p] then S.HitTargets[p] = true SpawnHitVFX(p.Position) PlaySnd(SND.Hit, 0.8, 1.05) Shake(0.8) end p.AssemblyLinearVelocity = S.FlingDir * (S.FlingPower * 0.85) + V3(0, 55, 0) p.AssemblyAngularVelocity = V3(35, 50, 35) end end S.SavedVel = Root.AssemblyLinearVelocity if touchingEnemy then Root.AssemblyLinearVelocity = S.FlingDir * (S.FlingPower * 32) + V3(0, S.FlingPower * 16, 0) Root.AssemblyAngularVelocity = V3(9500, 9500, 9500) end end local function BuildHUD() local pg = LP:FindFirstChildOfClass("PlayerGui") or LP:WaitForChild("PlayerGui", 10) if not pg then return end if HUD and HUD.Parent then HUD:Destroy() end HUD = New("ScreenGui", pg, { Name = "SpiderManHUD", ResetOnSpawn = false, IgnoreGuiInset = true, ZIndexBehavior = Enum.ZIndexBehavior.Sibling, DisplayOrder = 50, }) SenseStroke = New("UIStroke", New("Frame", HUD, { Size = U2(1, 0, 1, 0), BackgroundTransparency = 1 }), { Thickness = 8, Color = RGB(255, 30, 30), Transparency = 1, }) JumpBg = New("Frame", HUD, { Size = UO(160, 10), Position = UDim2.new(0.5, -80, 1, -58), BackgroundColor3 = RGB(15, 18, 25), BorderSizePixel = 0, Visible = false, }) New("UICorner", JumpBg, { CornerRadius = UD(1, 0) }) New("UIStroke", JumpBg, { Thickness = 1.5, Color = RGB(225, 35, 35) }) JumpFill = New("Frame", JumpBg, { Size = U2(0, 0, 1, 0), BackgroundColor3 = RGB(235, 40, 40), BorderSizePixel = 0 }) New("UICorner", JumpFill, { CornerRadius = UD(1, 0) }) MobilePad = New("Frame", HUD, { Name = "MobilePad", Size = UO(275, 350), AnchorPoint = V2(1, 1), Position = UDim2.new(1, -12, 1, -12), BackgroundTransparency = 1, }) PadScale = New("UIScale", MobilePad, { Scale = 1 }) local BDefs = { { id = "SWING", x = 226, y = 200, s = 76, bg = RGB(195, 22, 28), st = RGB(255, 65, 70) }, { id = "SWINGKICK", x = 226, y = 118, s = 60, bg = RGB(165, 32, 18), st = RGB(255, 165, 35) }, { id = "JUMP", x = 226, y = 282, s = 64, bg = RGB(18, 20, 28), st = RGB(225, 35, 40) }, { id = "PUNCH", x = 152, y = 192, s = 58, bg = RGB(145, 24, 30), st = RGB(255, 110, 40) }, { id = "KICK", x = 152, y = 256, s = 58, bg = RGB(145, 24, 30), st = RGB(255, 140, 35) }, { id = "DODGE", x = 152, y = 316, s = 52, bg = RGB(18, 20, 28), st = RGB(225, 35, 40) }, { id = "GRAB", x = 152, y = 130, s = 52, bg = RGB(18, 20, 28), st = RGB(225, 35, 40) }, { id = "SHOOT", x = 88, y = 172, s = 52, bg = RGB(18, 20, 28), st = RGB(225, 35, 40) }, { id = "ZIP", x = 88, y = 232, s = 52, bg = RGB(18, 20, 28), st = RGB(225, 35, 40) }, { id = "FLIP", x = 88, y = 292, s = 50, bg = RGB(18, 20, 28), st = RGB(225, 35, 40) }, { id = "THROW", x = 88, y = 114, s = 50, bg = RGB(18, 20, 28), st = RGB(225, 35, 40) }, { id = "WINGS", x = 30, y = 172, s = 48, bg = RGB(18, 20, 28), st = RGB(225, 35, 40) }, { id = "CRAWL", x = 30, y = 232, s = 48, bg = RGB(18, 20, 28), st = RGB(225, 35, 40) }, { id = "SPRINT", x = 30, y = 114, s = 48, bg = RGB(18, 20, 28), st = RGB(225, 35, 40) }, { id = "SENSE", x = 226, y = 50, s = 50, bg = RGB(18, 20, 28), st = RGB(40, 235, 95) }, } Btns = {} for _, info in ipairs(BDefs) do local b = New("TextButton", MobilePad, { Name = info.id, AnchorPoint = V2(0.5, 0.5), Position = UO(info.x, info.y), Size = UO(info.s, info.s), BackgroundColor3 = info.bg, BackgroundTransparency = 0.08, Text = "", AutoButtonColor = false, ZIndex = 10, }) New("UICorner", b, { CornerRadius = UD(1, 0) }) local st = New("UIStroke", b, { Thickness = 2.5, Color = info.st }) local inner = New("Frame", b, { Size = U2(0.36, 0, 0.36, 0), Position = U2(0.5, 0, 0.5, 0), AnchorPoint = V2(0.5, 0.5), BackgroundColor3 = info.st, BackgroundTransparency = 0.35, BorderSizePixel = 0, ZIndex = 10, }) New("UICorner", inner, { CornerRadius = UD(1, 0) }) local cd = New("Frame", b, { Size = U2(1, 0, 0, 0), Position = U2(0, 0, 1, 0), AnchorPoint = V2(0, 1), BackgroundColor3 = RGB(0, 0, 0), BackgroundTransparency = 0.38, BorderSizePixel = 0, ZIndex = 11, }) New("UICorner", cd, { CornerRadius = UD(1, 0) }) Btns[info.id] = { btn = b, cd = cd, st = st, bg = info.bg } b.InputBegan:Connect(function(inp) if inp.UserInputType ~= Enum.UserInputType.Touch and inp.UserInputType ~= Enum.UserInputType.MouseButton1 then return end local id = info.id if id == "SWING" then Act.StartSwing() elseif id == "SWINGKICK" then Act.SwingKick() elseif id == "PUNCH" then Act.Punch() elseif id == "KICK" then Act.Kick() elseif id == "JUMP" then Act.StartJump() elseif id == "SHOOT" then Act.ShootWeb() elseif id == "ZIP" then Act.WebZip() elseif id == "DODGE" then Act.Dodge() elseif id == "FLIP" then Act.Backflip() elseif id == "CRAWL" then Act.ToggleCrawl() elseif id == "WINGS" then Act.ToggleWings() elseif id == "GRAB" then Act.ToggleGrab() elseif id == "THROW" then Act.Throw() elseif id == "SPRINT" then S.Sprinting = not S.Sprinting elseif id == "SENSE" then Act.ToggleSense() end end) b.InputEnded:Connect(function(inp) if inp.UserInputType ~= Enum.UserInputType.Touch and inp.UserInputType ~= Enum.UserInputType.MouseButton1 then return end if info.id == "SWING" and S.Swinging then Act.ReleaseSwing(true) elseif info.id == "JUMP" and S.ChargingJump then Act.ReleaseJump(false) end end) end end local function CreateSenseGui() if not Char then return end local head = Char:FindFirstChild("Head") if not head then return end HeadGui = New("BillboardGui", head, { Size = UO(160, 90), StudsOffset = V3(0, 2.2, 0), AlwaysOnTop = true, Enabled = false, }) for i = 1, 6 do local a = (i <= 3) and (-60 + (i - 1) * 24) or (60 - (i - 4) * 24) local side = (i <= 3) and -1 or 1 local bar = New("Frame", HeadGui, { Size = UO(6, 26), AnchorPoint = V2(0.5, 0.5), Position = U2(0.5 + side * (0.2 + (i % 3) * 0.08), 0.45 - (i % 2) * 0.12), Rotation = a, BackgroundColor3 = (i % 2 == 0) and RGB(255, 225, 45) or RGB(255, 35, 35), BorderSizePixel = 0, }) New("UICorner", bar, { CornerRadius = UD(1, 0) }) end SenseHL = New("Highlight", Char, { FillColor = RGB(255, 30, 30), OutlineColor = RGB(255, 220, 60), FillTransparency = 0.82, OutlineTransparency = 0.15, Enabled = false, }) end local function CreateWebWings() if not Char or not Root then return end local torso = Char:FindFirstChild("UpperTorso") or Char:FindFirstChild("Torso") or Root local la = Char:FindFirstChild("LeftUpperArm") or Char:FindFirstChild("Left Arm") local ra = Char:FindFirstChild("RightUpperArm") or Char:FindFirstChild("Right Arm") local lh, rh = HandPart("L"), HandPart("R") if not (torso and la and ra) then return end local function side(arm, hand, s) local tA = New("Attachment", torso, { Position = V3(s * 0.95, 0.1, 0), Orientation = V3(0, 0, 90) }) local tLow = New("Attachment", torso, { Position = V3(s * 0.92, -0.75, 0) }) local aA = New("Attachment", arm, { Position = V3(s * 0.25, -0.45, 0), Orientation = V3(0, 0, 90) }) local hA = New("Attachment", hand, { Position = V3(0, -0.2, 0) }) local hT = New("Attachment", hand, { Position = V3(0, 0.2, 0) }) local b1 = New("Beam", torso, { Attachment0 = tA, Attachment1 = aA, Color = ColorSequence.new(RGB(240, 248, 255)), LightEmission = 0.35, Transparency = NumberSequence.new({ NumberSequenceKeypoint.new(0, 0.15), NumberSequenceKeypoint.new(1, 0.45) }), Width0 = 0, Width1 = 0, FaceCamera = false, Segments = 8, Enabled = false, }) local b2 = New("Beam", torso, { Attachment0 = tLow, Attachment1 = hA, Color = ColorSequence.new(RGB(255, 255, 255)), LightEmission = 0.45, Transparency = NumberSequence.new(0.18), Width0 = 0, Width1 = 0, FaceCamera = true, Segments = 8, Enabled = false, }) local tr = New("Trail", hand, { Attachment0 = hA, Attachment1 = hT, Lifetime = 0.22, Color = ColorSequence.new(RGB(240, 248, 255)), Transparency = NumberSequence.new({ NumberSequenceKeypoint.new(0, 0.4), NumberSequenceKeypoint.new(1, 1) }), WidthScale = NumberSequence.new(0.35), Enabled = false, }) table.insert(Temp, tA); table.insert(Temp, tLow); table.insert(Temp, aA) table.insert(Temp, hA); table.insert(Temp, hT); table.insert(Temp, b1) table.insert(Temp, b2); table.insert(Temp, tr) return { b1 = b1, b2 = b2, tr = tr } end S.Wings = { L = side(la, lh, -1), R = side(ra, rh, 1) } end local function SetWingsVisual(a) if not S.Wings then return end local en = a > 0.02 for _, w in pairs(S.Wings) do w.b1.Enabled, w.b2.Enabled, w.tr.Enabled = en, en, a > 0.5 w.b1.Width0, w.b1.Width1 = 1.65 * a, 0.16 * a w.b2.Width0, w.b2.Width1 = 0.12 * a, 0.06 * a end end local function ClearSwingObjs() DestroyWeb(S.Webs); S.Webs = nil for _, k in ipairs({ "Rope", "SForce", "SAlign", "APart", "AAtt", "HAtt" }) do if S[k] then S[k]:Destroy(); S[k] = nil end end end local function ClearSwingKickObjs() DestroyWeb(S.SKWeb); S.SKWeb = nil for _, k in ipairs({ "SKRope", "SKPart" }) do if S[k] then S[k]:Destroy(); S[k] = nil end end S.SwingKicking = false end local function GetSwingPoint() local origin = Root.Position local look = Cam.CFrame.LookVector local flat = V3(look.X, 0, look.Z) flat = flat.Magnitude > 0.05 and flat.Unit or V3(Root.CFrame.LookVector.X, 0, Root.CFrame.LookVector.Z).Unit local vel = Root.AssemblyLinearVelocity local hSpd = Clamp(V3(vel.X, 0, vel.Z).Magnitude, 0, 48) return origin + flat * (CFG.WebFwd + hSpd * 0.35) + V3(0, CFG.WebUp + Clamp(look.Y * 22, -10, 24), 0) end function Act.StartSwing() if not Root or not Hum or Hum.Health <= 0 then return end if S.Swinging then Act.ReleaseSwing(true) return end if S.Crawling then Act.StopCrawl(false) end if S.WingActive then Act.StopWings() end if S.SwingKicking then ClearSwingKickObjs(); StopFlingMode() end if S.ChargingJump then S.ChargingJump = false; if JumpBg then JumpBg.Visible = false end end local pt = GetSwingPoint() ClearSwingObjs() S.Swinging = true S.Anchor = pt S.WebAge = 0 S.Hand = (S.Hand == "R") and "L" or "R" S.APart = New("Part", Workspace, { Name = "WebAnchor", Size = V3(0.45, 0.45, 0.45), Position = pt, Shape = Enum.PartType.Ball, Color = RGB(245, 250, 255), Material = Enum.Material.Neon, Anchored = true, CanCollide = false, CanQuery = false, CanTouch = false, Transparency = 0.25, }) S.AAtt = New("Attachment", S.APart) S.HAtt = New("Attachment", HandPart(S.Hand), { Position = V3(0, -0.8, 0) }) local dist = (pt - Root.Position).Magnitude S.Rope = New("RopeConstraint", Root, { Attachment0 = RAtt, Attachment1 = S.AAtt, Length = Clamp(dist * 0.88, CFG.WebMin, 160), Visible = false, Restitution = 0.12, }) S.Webs = MakeRealisticWeb(S.HAtt, S.AAtt, S.APart) S.SForce = New("VectorForce", Root, { Attachment0 = RAtt, RelativeTo = Enum.ActuatorRelativeTo.World, Force = V3(), Enabled = true, }) S.SAlign = New("AlignOrientation", Root, { Mode = Enum.OrientationAlignmentMode.OneAttachment, Attachment0 = RAtt, MaxTorque = 95000, Responsiveness = 22, CFrame = Root.CFrame, }) PlaySnd(SND.WebShoot, 0.75, 1.08) PlaySnd(SND.WebSnap, 0.55, 1.25) Hum.PlatformStand = false Hum:ChangeState(Enum.HumanoidStateType.Freefall) RestoreJointsInstant() if SwingTrack then pcall(function() SwingTrack:Play(0.12, 1, 1.05) end) end local v = Root.AssemblyLinearVelocity if v.Magnitude < 38 then local f = V3(Cam.CFrame.LookVector.X, 0, Cam.CFrame.LookVector.Z) f = f.Magnitude > 0.01 and f.Unit or Root.CFrame.LookVector Root.AssemblyLinearVelocity = v + f * 34 + V3(0, 12, 0) end end function Act.ReleaseSwing(boost) if not S.Swinging then return end local oldHandPos = S.HAtt and S.HAtt.WorldPosition or (Root and Root.Position) local oldAnchor = S.Anchor S.Swinging = false ClearSwingObjs() if SwingTrack then pcall(function() SwingTrack:Stop(0.18) end) end if oldHandPos and oldAnchor then SpawnDetachedWeb(oldHandPos, oldAnchor) end PlaySnd(SND.Whoosh, 0.65, 1.15) if boost and Root and Hum and Hum.Health > 0 then local v = Root.AssemblyLinearVelocity local h = V3(v.X, 0, v.Z) local dir = h.Magnitude > 4 and h.Unit or V3(Cam.CFrame.LookVector.X, 0, Cam.CFrame.LookVector.Z).Unit local spd = Clamp(h.Magnitude * CFG.ReleaseMult, 46, 142) Root.AssemblyLinearVelocity = dir * spd + V3(0, Clamp(v.Y * 0.55 + CFG.ReleaseUp, 28, 78), 0) PlayAnim("Flip", 0.44) end end local function UpdateSwing(dt) if not S.Swinging or not Root or not S.Rope then return end S.WebAge = S.WebAge + dt if S.APart then S.APart.Position = S.Anchor end local toA = S.Anchor - Root.Position local dist = toA.Magnitude if dist < 8 then S.Anchor = GetSwingPoint() S.WebAge = 0 if S.APart then S.APart.Position = S.Anchor end PlaySnd(SND.WebShoot, 0.6, 1.12) toA = S.Anchor - Root.Position dist = toA.Magnitude S.Rope.Length = Clamp(dist * 0.88, CFG.WebMin, 150) end UpdateWebTension(S.Webs, S.WebAge, dist >= S.Rope.Length * 0.92) local rDir = toA.Unit local vel = Root.AssemblyLinearVelocity local gHit = RayHit(Root.Position, V3(0, -18, 0)) if gHit and S.Rope.Length > CFG.WebMin then S.Rope.Length = Max(CFG.WebMin, S.Rope.Length - 65 * dt) elseif UserInputService:IsKeyDown(Enum.KeyCode.W) then S.Rope.Length = Max(CFG.WebMin, S.Rope.Length - CFG.SwingPump * dt) end if Root.Position.Y > S.Anchor.Y + 8 and vel.Y > 0 then S.Anchor = GetSwingPoint() S.WebAge = 0 if S.APart then S.APart.Position = S.Anchor end S.Rope.Length = Clamp((S.Anchor - Root.Position).Magnitude * 0.86, CFG.WebMin, 150) end local cLook = Cam.CFrame.LookVector local cRight = Cam.CFrame.RightVector local fLook = V3(cLook.X, 0, cLook.Z) fLook = fLook.Magnitude > 0.01 and fLook.Unit or V3(0, 0, -1) local fRight = V3(cRight.X, 0, cRight.Z) fRight = fRight.Magnitude > 0.01 and fRight.Unit or V3(1, 0, 0) local m = Hum.MoveDirection local steer = m.Magnitude > 0.05 and m.Unit or fLook local tan = (steer - steer:Dot(rDir) * rDir) tan = tan.Magnitude > 0.01 and tan.Unit or fLook local mass = Root.AssemblyMass local swingFactor = Clamp(1 - Abs(rDir.Y) * 0.35, 0.5, 1.25) S.SForce.Force = tan * (CFG.SwingBoost * swingFactor * mass) + m * (CFG.SwingSteer * mass) + V3(0, mass * 22, 0) local vDir = vel.Magnitude > 4 and vel.Unit or fLook local fVel = V3(vDir.X, 0, vDir.Z) fVel = fVel.Magnitude > 0.05 and fVel.Unit or fLook local bank = Clamp(-fVel:Cross(rDir).Y * 38 - m:Dot(fRight) * 18, -48, 48) local pitch = Clamp(vel.Y * 0.35, -35, 35) S.SAlign.CFrame = CF(V3(), fVel) * CFA(pitch, 0, bank) end function Act.Punch() if not Root or not Hum or Hum.Health <= 0 or not Ready("PUNCH", CFG.PunchCD) then return end if S.Swinging then Act.ReleaseSwing(false) end if S.Crawling then Act.StopCrawl(false) end if S.WingActive then Act.StopWings() end local now = Clock() if now - S.LastCombo > 0.9 then S.Combo = 1 else S.Combo = (S.Combo % 3) + 1 end S.LastCombo = now local _, enemyRoot = FindNearestEnemy(18) local dir if enemyRoot then local toE = enemyRoot.Position - Root.Position dir = V3(toE.X, 0, toE.Z) dir = dir.Magnitude > 0.05 and dir.Unit or Root.CFrame.LookVector Root.CFrame = CF(Root.Position, Root.Position + dir) else local cLook = Cam.CFrame.LookVector dir = V3(cLook.X, 0, cLook.Z) dir = dir.Magnitude > 0.05 and dir.Unit or Root.CFrame.LookVector Root.CFrame = CF(Root.Position, Root.Position + dir) end local animName = (S.Combo == 1 and "PunchR") or (S.Combo == 2 and "PunchL") or "Uppercut" PlayAnim(animName, CFG.PunchDur, dir) PlaySnd(SND.Whoosh, 0.8, 1.05 + S.Combo * 0.08) local upBoost = (S.Combo == 3) and 24 or 8 Root.AssemblyLinearVelocity = dir * CFG.PunchLunge + V3(0, upBoost, 0) StartFlingMode(CFG.PunchDur, CFG.PunchFling + (S.Combo == 3 and 50 or 0), dir) end function Act.Kick() if not Root or not Hum or Hum.Health <= 0 or not Ready("KICK", CFG.KickCD) then return end if S.Swinging then Act.SwingKick() return end if S.Crawling then Act.StopCrawl(false) end if S.WingActive then Act.StopWings() end local _, enemyRoot = FindNearestEnemy(22) local dir if enemyRoot then local toE = enemyRoot.Position - Root.Position dir = V3(toE.X, 0, toE.Z) dir = dir.Magnitude > 0.05 and dir.Unit or Root.CFrame.LookVector Root.CFrame = CF(Root.Position, Root.Position + dir) else local cLook = Cam.CFrame.LookVector dir = V3(cLook.X, 0, cLook.Z) dir = dir.Magnitude > 0.05 and dir.Unit or Root.CFrame.LookVector Root.CFrame = CF(Root.Position, Root.Position + dir) end S.Combo = (S.Combo % 2) + 1 PlayAnim(S.Combo == 1 and "Roundhouse" or "AxeKick", CFG.KickDur, dir) PlaySnd(SND.HeavyWhoosh, 0.9, 1.0) Root.AssemblyLinearVelocity = dir * CFG.KickLunge + V3(0, 22, 0) StartFlingMode(CFG.KickDur, CFG.KickFling, dir) end function Act.SwingKick() if not Root or not Hum or Hum.Health <= 0 or not Ready("SWINGKICK", CFG.SwingKickCD) then return end if S.Swinging then Act.ReleaseSwing(false) end if S.Crawling then Act.StopCrawl(false) end if S.WingActive then Act.StopWings() end ClearSwingKickObjs() local _, enemyRoot = FindNearestEnemy(55) local cLook = Cam.CFrame.LookVector local dir if enemyRoot then local toE = (enemyRoot.Position + V3(0, 2, 0)) - Root.Position dir = toE.Magnitude > 0.1 and toE.Unit or cLook else dir = V3(cLook.X, Clamp(cLook.Y, -0.25, 0.35), cLook.Z).Unit end local fDir = V3(dir.X, 0, dir.Z) fDir = fDir.Magnitude > 0.01 and fDir.Unit or Root.CFrame.LookVector Root.CFrame = CF(Root.Position, Root.Position + fDir) local anchorPos = Root.Position + fDir * 36 + V3(0, 34, 0) S.SwingKicking = true S.SKPart = New("Part", Workspace, { Size = V3(0.4, 0.4, 0.4), Position = anchorPos, Shape = Enum.PartType.Ball, Color = RGB(248, 252, 255), Material = Enum.Material.Neon, Anchored = true, CanCollide = false, CanQuery = false, CanTouch = false, Transparency = 0.25, }) local a1 = New("Attachment", S.SKPart) local a0 = New("Attachment", HandPart("R"), { Position = V3(0, -0.7, 0) }) Debris:AddItem(a0, CFG.SwingKickDur) S.SKWeb = MakeRealisticWeb(a0, a1, S.SKPart) PlaySnd(SND.WebShoot, 0.85, 1.12) PlaySnd(SND.HeavyWhoosh, 1.0, 0.92) Shake(0.6) Hum:ChangeState(Enum.HumanoidStateType.Freefall) PlayAnim("SwingKick", CFG.SwingKickDur, fDir) StartFlingMode(CFG.SwingKickDur, CFG.SwingKickFling, fDir) local startT = Clock() task.spawn(function() while S.SwingKicking and (Clock() - startT) < CFG.SwingKickDur and Root and Hum and Hum.Health > 0 do local elapsed = Clock() - startT local _, liveEnemy = FindNearestEnemy(42) local steerDir = dir if liveEnemy then local toTarget = (liveEnemy.Position + V3(0, 1.5, 0)) - Root.Position if toTarget.Magnitude > 2 then steerDir = toTarget.Unit local flatT = V3(steerDir.X, 0, steerDir.Z) if flatT.Magnitude > 0.05 then S.FlingDir = flatT.Unit Root.CFrame = CF(Root.Position, Root.Position + flatT.Unit) end end end local arcY = Cos((elapsed / CFG.SwingKickDur) * Pi) * 26 local vGoal = steerDir * CFG.SwingKickSpeed + V3(0, arcY, 0) Root.AssemblyLinearVelocity = vGoal S.SavedVel = vGoal UpdateWebTension(S.SKWeb, elapsed, true) RunService.Heartbeat:Wait() end ClearSwingKickObjs() StopFlingMode() end) end function Act.WebZip() if not Root or not Hum or Hum.Health <= 0 or not Ready("ZIP", CFG.ZipCD) then return end if S.Swinging then Act.ReleaseSwing(false) end if S.Crawling then Act.StopCrawl(false) end if S.WingActive then Act.StopWings() end local orig = Cam.CFrame.Position local dir = Cam.CFrame.LookVector local hit = RayHit(orig, dir * CFG.ZipDist) local target = hit and hit.Position or (orig + dir * (CFG.ZipDist * 0.72)) local hPart = HandPart("R") local a0 = New("Attachment", hPart, { Position = V3(0, -0.7, 0) }) local p1 = New("Part", Workspace, { Size = V3(0.3, 0.3, 0.3), Position = target, Anchored = true, CanCollide = false, CanQuery = false, CanTouch = false, Transparency = 1, }) local a1 = New("Attachment", p1) MakeRealisticWeb(a0, a1, p1) Debris:AddItem(a0, 0.3); Debris:AddItem(p1, 0.3) PlaySnd(SND.WebShoot, 0.8, 1.15) PlaySnd(SND.Whoosh, 0.75, 1.1) local toT = target - Root.Position local u = toT.Magnitude > 1 and toT.Unit or dir Root.AssemblyLinearVelocity = u * CFG.ZipSpeed + V3(0, CFG.ZipLift, 0) PlayAnim("Zip", 0.38) end function Act.ShootWeb() if not Root or not Hum or Hum.Health <= 0 or not Ready("SHOOT", CFG.ShootCD) then return end S.Hand = (S.Hand == "R") and "L" or "R" local hPart = HandPart(S.Hand) local orig = Cam.CFrame.Position local dir = Cam.CFrame.LookVector local hit = RayHit(orig, dir * CFG.ShootMax) local endPos = hit and hit.Position or (orig + dir * CFG.ShootMax) local a0 = New("Attachment", hPart, { Position = V3(0, -0.7, 0) }) local p1 = New("Part", Workspace, { Size = V3(0.25, 0.25, 0.25), Position = endPos, Anchored = true, CanCollide = false, CanQuery = false, CanTouch = false, Transparency = 1, }) local a1 = New("Attachment", p1) MakeRealisticWeb(a0, a1, p1) Debris:AddItem(a0, 0.24); Debris:AddItem(p1, 0.24) PlaySnd(SND.WebShoot, 0.75, 1.2) PlayAnim("Shoot", 0.26) if hit and hit.Instance then local inst = hit.Instance local model = inst:FindFirstAncestorOfClass("Model") local eHum = model and model:FindFirstChildOfClass("Humanoid") if eHum and model ~= Char then local eRoot = model:FindFirstChild("HumanoidRootPart") or inst local sb = New("SelectionBox", eRoot, { Adornee = eRoot, Color3 = RGB(245, 248, 255), LineThickness = 0.08 }) local origSpd = eHum.WalkSpeed eHum.WalkSpeed = Max(4, origSpd * 0.25) PlaySnd(SND.WebSnap, 0.7, 1.1, eRoot) task.delay(2.2, function() if eHum and eHum.Parent then eHum.WalkSpeed = origSpd end if sb and sb.Parent then sb:Destroy() end end) elseif inst:IsA("BasePart") and not inst.Anchored then inst:ApplyImpulse(dir * (inst.AssemblyMass * CFG.ShootImp) + V3(0, inst.AssemblyMass * 18, 0)) else local splat = New("Part", Workspace, { Shape = Enum.PartType.Cylinder, Size = V3(0.15, 2.6, 2.6), CFrame = CF(hit.Position, hit.Position + hit.Normal) * CFA(0, 90, 0), Color = RGB(245, 248, 255), Material = Enum.Material.SmoothPlastic, Anchored = true, CanCollide = false, CanQuery = false, CanTouch = false, Transparency = 0.15, }) Debris:AddItem(splat, 4) end end end local function FindGrabbable() local orig = Cam.CFrame.Position local dir = Cam.CFrame.LookVector local hit = RayHit(orig, dir * CFG.GrabMax) local function valid(p) if not p or not p:IsA("BasePart") or p.Anchored or p:IsDescendantOf(Char) then return false end local m = p:FindFirstAncestorOfClass("Model") if m and m:FindFirstChildOfClass("Humanoid") then return false end return p.Size.Magnitude <= CFG.GrabEdge * 1.75 end if hit and valid(hit.Instance) then return hit.Instance end local op = OverlapParams.new() op.FilterType = Enum.RaycastFilterType.Exclude op.FilterDescendantsInstances = { Char } local best, bestD = nil, CFG.GrabMax for _, p in ipairs(Workspace:GetPartBoundsInRadius(Root.Position + dir * 8, 16, op)) do if valid(p) then local d = (p.Position - Root.Position).Magnitude if d < bestD then best, bestD = p, d end end end return best end function Act.ReleaseGrab() if not S.GrabPart then return end local p = S.GrabPart S.GrabPart = nil DestroyWeb(S.GWebL); S.GWebL = nil DestroyWeb(S.GWebR); S.GWebR = nil for _, k in ipairs({ "GAtt", "GAP", "GAO" }) do if S[k] then S[k]:Destroy(); S[k] = nil end end for _, nc in ipairs(S.GNoCol) do if nc then nc:Destroy() end end S.GNoCol = {} if p and p.Parent then p.CustomPhysicalProperties = nil end end function Act.ToggleGrab() if S.GrabPart then Act.ReleaseGrab() return end if not Root or not Hum or Hum.Health <= 0 then return end local p = FindGrabbable() if not p then return end S.GrabPart = p S.GAtt = New("Attachment", p) S.GAP = New("AlignPosition", p, { Mode = Enum.PositionAlignmentMode.OneAttachment, Attachment0 = S.GAtt, MaxForce = Max(250000, p.AssemblyMass * 5500), MaxVelocity = 95, Responsiveness = 28, Position = Root.Position + V3(0, CFG.CarryY + p.Size.Y * 0.4, 0), }) S.GAO = New("AlignOrientation", p, { Mode = Enum.OrientationAlignmentMode.OneAttachment, Attachment0 = S.GAtt, MaxTorque = Max(200000, p.AssemblyMass * 4500), Responsiveness = 25, CFrame = Root.CFrame, }) for _, limb in ipairs(Char:GetDescendants()) do if limb:IsA("BasePart") then table.insert(S.GNoCol, New("NoCollisionConstraint", p, { Part0 = p, Part1 = limb })) end end local la = New("Attachment", HandPart("L")) local ra = New("Attachment", HandPart("R")) S.GWebL = MakeRealisticWeb(la, S.GAtt, p) S.GWebR = MakeRealisticWeb(ra, S.GAtt, p) table.insert(S.GNoCol, la); table.insert(S.GNoCol, ra) PlaySnd(SND.WebShoot, 0.75, 1.0) PlayAnim("Lift", 0.35) end function Act.Throw() if not S.GrabPart or not Ready("THROW", CFG.ThrowCD) then return end local p = S.GrabPart Act.ReleaseGrab() if p and p.Parent and not p.Anchored then local dir = Cam.CFrame.LookVector p.AssemblyLinearVelocity = dir * CFG.ThrowSpeed + V3(0, CFG.ThrowUp, 0) p.AssemblyAngularVelocity = Cam.CFrame.RightVector * 14 PlaySnd(SND.HeavyWhoosh, 0.9, 0.95) PlayAnim("Throw", 0.35) end end local function UpdateGrab() if not S.GrabPart then return end if not S.GrabPart.Parent or S.GrabPart.Anchored or (S.GrabPart.Position - Root.Position).Magnitude > 42 then Act.ReleaseGrab() return end local cf = Root.CFrame S.GAP.Position = cf.Position + V3(0, CFG.CarryY + S.GrabPart.Size.Y * 0.42, 0) + cf.LookVector * CFG.CarryZ S.GAO.CFrame = cf end function Act.StopWings() if not S.WingActive then return end S.WingActive = false for _, k in ipairs({ "WLV", "WAO" }) do if S[k] then S[k]:Destroy(); S[k] = nil end end end function Act.ToggleWings() if S.WingActive then Act.StopWings() return end if not Root or not Hum or Hum.Health <= 0 then return end if Hum:GetState() ~= Enum.HumanoidStateType.Freefall and Hum.FloorMaterial ~= Enum.Material.Air then Root.AssemblyLinearVelocity = Root.AssemblyLinearVelocity + V3(0, 44, 0) end if S.Swinging then Act.ReleaseSwing(false) end if S.Crawling then Act.StopCrawl(false) end S.WingActive = true PlaySnd(SND.Whoosh, 0.75, 0.9) local v = Root.AssemblyLinearVelocity S.WSpd = Clamp(V3(v.X, 0, v.Z).Magnitude, CFG.WingMin, CFG.WingMax) S.WLV = New("LinearVelocity", Root, { Attachment0 = RAtt, MaxForce = 180000, RelativeTo = Enum.ActuatorRelativeTo.World, VectorVelocity = Cam.CFrame.LookVector * S.WSpd, }) S.WAO = New("AlignOrientation", Root, { Mode = Enum.OrientationAlignmentMode.OneAttachment, Attachment0 = RAtt, MaxTorque = 120000, Responsiveness = 22, CFrame = Cam.CFrame, }) Hum:ChangeState(Enum.HumanoidStateType.Freefall) end local function UpdateWings(dt) local targetOpen = S.WingActive and 1 or 0 S.WingOpen = S.WingOpen + (targetOpen - S.WingOpen) * Min(1, dt * 12) SetWingsVisual(S.WingOpen) if not S.WingActive or not Root or not S.WLV then return end if Hum.FloorMaterial ~= Enum.Material.Air and Root.AssemblyLinearVelocity.Y <= 2 then Act.StopWings() return end local cLook = Cam.CFrame.LookVector local cRight = Cam.CFrame.RightVector local m = Hum.MoveDirection local fRight = V3(cRight.X, 0, cRight.Z) fRight = fRight.Magnitude > 0.01 and fRight.Unit or V3(1, 0, 0) local steer = m:Dot(fRight) S.WBank = S.WBank + (-steer * 42 - S.WBank) * Min(1, dt * 8) S.WPitch = Asin(Clamp(cLook.Y, -0.85, 0.85)) if cLook.Y < -0.1 then S.WSpd = Min(CFG.WingMax, S.WSpd + (-cLook.Y) * CFG.WingDive * dt) elseif cLook.Y > 0.15 then S.WSpd = Max(CFG.WingMin, S.WSpd - cLook.Y * 32 * dt) else S.WSpd = S.WSpd + (76 - S.WSpd) * Min(1, dt * 2) end local fDir = V3(cLook.X, 0, cLook.Z) fDir = fDir.Magnitude > 0.01 and fDir.Unit or V3(0, 0, -1) local vy = -CFG.WingSink + cLook.Y * CFG.WingClimb S.WLV.VectorVelocity = fDir * S.WSpd + V3(0, vy, 0) S.WAO.CFrame = CF(V3(), cLook) * CFA(-78, 0, S.WBank) end local function FindCrawlSurface() local dirs = { Root.CFrame.LookVector, -Root.CFrame.LookVector, Root.CFrame.RightVector, -Root.CFrame.RightVector, V3(0, 1, 0), } for _, d in ipairs(dirs) do local h = RayHit(Root.Position, d * CFG.CrawlDist) if h and h.Normal.Y < 0.75 then return h end end return nil end function Act.StopCrawl(jump) if not S.Crawling then return end S.Crawling = false S.CExit = Clock() + 0.35 for _, k in ipairs({ "CAlignP", "CAlignO" }) do if S[k] then S[k]:Destroy(); S[k] = nil end end if Hum then Hum.AutoRotate = true Hum:ChangeState(Enum.HumanoidStateType.Freefall) end if Root then if jump then Root.AssemblyLinearVelocity = (S.CNorm * 0.75 + V3(0, 0.65, 0)).Unit * CFG.CrawlJump PlaySnd(SND.Whoosh, 0.7, 1.1) PlayAnim("Flip", 0.45) else Root.CFrame = CF(Root.Position + S.CNorm * 1.5, Root.Position + S.CNorm * 1.5 + V3(Cam.CFrame.LookVector.X, 0, Cam.CFrame.LookVector.Z)) Root.AssemblyLinearVelocity = S.CNorm * 18 + V3(0, 10, 0) end end end function Act.ToggleCrawl() if S.Crawling then Act.StopCrawl(false) return end if not Root or not Hum or Hum.Health <= 0 or Clock() < S.CExit then return end local h = FindCrawlSurface() if not h then return end if S.Swinging then Act.ReleaseSwing(false) end if S.WingActive then Act.StopWings() end S.Crawling = true S.CNorm = h.Normal Hum.AutoRotate = false S.CAlignP = New("AlignPosition", Root, { Mode = Enum.PositionAlignmentMode.OneAttachment, Attachment0 = RAtt, MaxForce = 180000, MaxVelocity = CFG.CrawlSpeed, Responsiveness = 32, Position = h.Position + h.Normal * CFG.CrawlOff, }) S.CAlignO = New("AlignOrientation", Root, { Mode = Enum.OrientationAlignmentMode.OneAttachment, Attachment0 = RAtt, MaxTorque = 150000, Responsiveness = 28, CFrame = Root.CFrame, }) end local function UpdateCrawl(dt) if not S.Crawling or not Root or not S.CAlignP then return end local n = S.CNorm local cLook = Cam.CFrame.LookVector local cRight = Cam.CFrame.RightVector local rawMove = Hum.MoveDirection local moveVec = V3() if rawMove.Magnitude > 0.05 then local f = (cLook - cLook:Dot(n) * n) local r = (cRight - cRight:Dot(n) * n) f = f.Magnitude > 0.01 and f.Unit or Root.CFrame.LookVector r = r.Magnitude > 0.01 and r.Unit or Root.CFrame.RightVector local f2 = V3(cLook.X, 0, cLook.Z) local r2 = V3(cRight.X, 0, cRight.Z) f2 = f2.Magnitude > 0.01 and f2.Unit or V3(0, 0, -1) r2 = r2.Magnitude > 0.01 and r2.Unit or V3(1, 0, 0) local inF = rawMove:Dot(f2) local inR = rawMove:Dot(r2) moveVec = (f * inF + r * inR) if moveVec.Magnitude > 0.01 then moveVec = moveVec.Unit end end local hit = nil if moveVec.Magnitude > 0.05 then local fHit = RayHit(Root.Position, moveVec * 3.8) if fHit and fHit.Normal.Y < 0.75 then hit = fHit else local nextPos = Root.Position + moveVec * (CFG.CrawlSpeed * dt) hit = RayHit(nextPos + n * 1.2, -n * (CFG.CrawlDist + 2.5)) if not hit then hit = RayHit(nextPos - n * 1.4, -moveVec * 4.5) end end else hit = RayHit(Root.Position + n * 1.0, -n * CFG.CrawlDist) end if not hit or hit.Normal.Y >= 0.78 then Act.StopCrawl(false) return end S.CNorm = S.CNorm:Lerp(hit.Normal, Min(1, dt * 16)).Unit n = S.CNorm S.CAlignP.Position = hit.Position + n * CFG.CrawlOff + moveVec * (CFG.CrawlSpeed * dt * 2.2) local fwd = moveVec.Magnitude > 0.05 and moveVec or (Root.CFrame.LookVector - Root.CFrame.LookVector:Dot(n) * n) fwd = fwd.Magnitude > 0.01 and fwd.Unit or V3(0, 1, 0) local right = fwd:Cross(n).Unit local realFwd = n:Cross(right).Unit S.CAlignO.CFrame = CF.fromMatrix(Root.Position, right, n, -realFwd) if moveVec.Magnitude > 0.05 then S.CPhase = S.CPhase + dt * 9 end end function Act.StartJump() if not Root or not Hum or Hum.Health <= 0 then return end if S.Crawling then Act.StopCrawl(true) return end if S.Swinging then Act.ReleaseSwing(true) return end if S.WingActive then Act.StopWings() return end S.ChargingJump = true S.JumpStart = Clock() S.JumpPct = 0 if JumpBg then JumpBg.Visible = true end end function Act.ReleaseJump(tap) if not S.ChargingJump then return end S.ChargingJump = false if JumpBg then JumpBg.Visible = false end if not Root or not Hum or Hum.Health <= 0 then return end local pct = tap and 0 or S.JumpPct if pct < 0.16 or not Ready("JUMP", CFG.JumpCD) then Hum.Jump = true return end local vy = CFG.JumpMinY + (CFG.JumpMaxY - CFG.JumpMinY) * pct local m = Hum.MoveDirection local f = m.Magnitude > 0.05 and m.Unit or V3(Cam.CFrame.LookVector.X, 0, Cam.CFrame.LookVector.Z).Unit Hum:ChangeState(Enum.HumanoidStateType.Jumping) Root.AssemblyLinearVelocity = f * (CFG.JumpFwd * (0.5 + 0.5 * pct)) + V3(0, vy, 0) PlaySnd(SND.HeavyWhoosh, 0.85, 1.05) PlayAnim("SuperJump", 0.5) end function Act.Dodge(oDir) if not Root or not Hum or Hum.Health <= 0 or not Ready("DODGE", CFG.DodgeCD) then return end if S.Swinging then Act.ReleaseSwing(false) end if S.Crawling then Act.StopCrawl(false) end if S.WingActive then Act.StopWings() end local d = oDir if not d or d.Magnitude < 0.05 then local m = Hum.MoveDirection local r = V3(Cam.CFrame.RightVector.X, 0, Cam.CFrame.RightVector.Z).Unit d = m.Magnitude > 0.05 and m.Unit or ((Rand(1, 2) == 1) and r or -r) end d = V3(d.X, 0, d.Z) d = d.Magnitude > 0.01 and d.Unit or Root.CFrame.RightVector Root.AssemblyLinearVelocity = d * CFG.DodgeSpeed + V3(0, 18, 0) PlaySnd(SND.Whoosh, 0.75, 1.2) PlayAnim("Dodge", CFG.DodgeDur, d) end function Act.Backflip() if not Root or not Hum or Hum.Health <= 0 or not Ready("FLIP", CFG.FlipCD) then return end if S.Swinging then Act.ReleaseSwing(false) end if S.Crawling then Act.StopCrawl(false) end if S.WingActive then Act.StopWings() end local back = -V3(Cam.CFrame.LookVector.X, 0, Cam.CFrame.LookVector.Z) back = back.Magnitude > 0.01 and back.Unit or -Root.CFrame.LookVector Hum:ChangeState(Enum.HumanoidStateType.Jumping) Root.AssemblyLinearVelocity = back * CFG.FlipBack + V3(0, CFG.FlipUp, 0) PlaySnd(SND.Whoosh, 0.75, 1.12) PlayAnim("Flip", CFG.FlipDur) end function Act.ToggleSense() S.SenseAuto = not S.SenseAuto if Btns.SENSE and Btns.SENSE.st then Btns.SENSE.st.Color = S.SenseAuto and RGB(40, 235, 95) or RGB(120, 120, 130) end end local function UpdateSense(dt) if not Root or not Hum or Hum.Health <= 0 then return end local op = OverlapParams.new() op.FilterType = Enum.RaycastFilterType.Exclude local ex = { Char } if S.GrabPart then table.insert(ex, S.GrabPart) end op.FilterDescendantsInstances = ex local parts = Workspace:GetPartBoundsInRadius(Root.Position, CFG.SenseRad, op) local threatPos, minDist = nil, Huge local checkedModels = {} for _, p in ipairs(parts) do if p:IsA("BasePart") then local m = p:FindFirstAncestorOfClass("Model") if m and not checkedModels[m] then checkedModels[m] = true local eh = m:FindFirstChildOfClass("Humanoid") local er = m:FindFirstChild("HumanoidRootPart") if eh and er and eh.Health > 0 and not Players:GetPlayerFromCharacter(m) then local toP = Root.Position - er.Position local dist = toP.Magnitude local ev = er.AssemblyLinearVelocity local movingTo = ev.Magnitude > CFG.NPCSpd and ev.Unit:Dot(toP.Unit) > 0.55 local hasTool = m:FindFirstChildOfClass("Tool") ~= nil if dist < 15 or movingTo or (hasTool and dist < 24) then if dist < minDist then minDist, threatPos = dist, er.Position end end end elseif not p.Anchored and p ~= S.APart and p ~= S.SKPart then local pv = p.AssemblyLinearVelocity if pv.Magnitude >= CFG.ProjMinSpd then local toMe = Root.Position - p.Position local d = toMe.Magnitude if d < CFG.SenseRad and pv.Unit:Dot(toMe.Unit) > 0.72 then if d < minDist then minDist, threatPos = d, p.Position end end end end end end local wasThreat = S.ThreatActive S.ThreatActive = threatPos ~= nil S.ThreatPos = threatPos if HeadGui then HeadGui.Enabled = S.ThreatActive end if SenseHL then SenseHL.Enabled = S.ThreatActive end if SenseStroke then local tGoal = S.ThreatActive and (0.25 + 0.2 * Sin(Clock() * 18)) or 1 SenseStroke.Transparency = SenseStroke.Transparency + (tGoal - SenseStroke.Transparency) * Min(1, dt * 14) end if S.ThreatActive and not wasThreat then PlaySnd(SND.Sense, 0.65, 1.05) if not S.Anim then PlayAnim("Sense", 0.3) end end if S.ThreatActive and S.SenseAuto and minDist <= CFG.AutoDodgeRad and (Clock() - S.LastAutoDodge) > 0.75 and not S.FlingMode then S.LastAutoDodge = Clock() local fromT = Root.Position - threatPos local side = V3(-fromT.Z, 0, fromT.X) side = side.Magnitude > 0.01 and side.Unit or Root.CFrame.RightVector Act.Dodge(side) end end local function UpdateProceduralAnims(dt) if not Char or not Root then return end if S.Swinging then RestoreJointsInstant() return end local now = Clock() if S.Anim and (now - S.AnimT) >= S.AnimDur then S.Anim = nil end local pose, rootPos, alpha = {}, V3(), Min(1, dt * 18) local p = S.Anim and Clamp((now - S.AnimT) / Max(0.01, S.AnimDur), 0, 1) or 0 local sP = Sin(p * Pi) if S.Anim == "SwingKick" then pose.Root = CFA(58, 0, 0) pose.Neck = CFA(-35, 0, 0) pose.RS, pose.LS = CFA(145, 0, 28), CFA(-45, 0, -35) pose.RE, pose.LE = CFA(20, 0, 0), CFA(35, 0, 0) pose.RH, pose.LH = CFA(88, 0, 8), CFA(82, 0, -8) pose.RK, pose.LK = CFA(-10, 0, 0), CFA(-18, 0, 0) ApplyPose(pose, 0.85) return elseif S.Anim == "PunchR" then pose.Root = CFA(-12 * sP, -42 * sP, 0) pose.Waist = CFA(0, -28 * sP, 0) pose.Neck = CFA(0, 32 * sP, 0) pose.RS, pose.RE = CFA(96 * sP, 0, 14), CFA(15 * (1 - sP), 0, 0) pose.LS, pose.LE = CFA(35, 0, -25), CFA(75, 0, 0) pose.RH, pose.LH = CFA(-26 * sP, 0, 8), CFA(32 * sP, 0, -8) ApplyPose(pose, 0.85) return elseif S.Anim == "PunchL" then pose.Root = CFA(-12 * sP, 42 * sP, 0) pose.Waist = CFA(0, 28 * sP, 0) pose.Neck = CFA(0, -32 * sP, 0) pose.LS, pose.LE = CFA(96 * sP, 0, -14), CFA(15 * (1 - sP), 0, 0) pose.RS, pose.RE = CFA(35, 0, 25), CFA(75, 0, 0) pose.LH, pose.RH = CFA(-26 * sP, 0, -8), CFA(32 * sP, 0, 8) ApplyPose(pose, 0.85) return elseif S.Anim == "Uppercut" then rootPos = V3(0, 0.35 * sP, 0) pose.Root = CFA(18 * sP, -48 * sP, 0) pose.RS, pose.RE = CFA(155 * sP, 0, 12), CFA(45 * sP, 0, 0) pose.LS, pose.LE = CFA(-30, 0, -28), CFA(65, 0, 0) pose.RH, pose.LH = CFA(-32 * sP, 0, 10), CFA(28 * sP, 0, -10) ApplyPose(pose, 0.85) return elseif S.Anim == "Roundhouse" then pose.Root = CFA(24 * sP, -p * 360, 18 * sP) pose.RS, pose.LS = CFA(45, 0, 55), CFA(45, 0, -55) pose.RH, pose.RK = CFA(105 * sP, 0, 38 * sP), CFA(-12, 0, 0) pose.LH, pose.LK = CFA(-28 * sP, 0, -14), CFA(-35 * sP, 0, 0) ApplyPose(pose, 0.88) return elseif S.Anim == "AxeKick" then local swing = Sin(Clamp(p * 1.4, 0, 1) * Pi) pose.Root = CFA(-22 * swing, 18 * swing, 0) pose.RS, pose.LS = CFA(-40 * swing, 0, 35), CFA(-40 * swing, 0, -35) pose.LH, pose.LK = CFA(138 * swing, 0, -10), CFA(-8, 0, 0) pose.RH, pose.RK = CFA(-35 * swing, 0, 10), CFA(-25, 0, 0) ApplyPose(pose, 0.88) return elseif S.Anim == "Flip" then local ang = -p * 360 pose.Root = CFA(ang, 0, 0) pose.RS, pose.LS = CFA(110, 0, 18), CFA(110, 0, -18) pose.RH, pose.LH = CFA(45, 0, 0), CFA(45, 0, 0) pose.RK, pose.LK = CFA(-70, 0, 0), CFA(-70, 0, 0) ApplyPose(pose, 0.85) return elseif S.Anim == "Dodge" then local rDot = S.AnimDir:Dot(Root.CFrame.RightVector) local roll = rDot >= 0 and -38 or 38 pose.Root = CFA(-14, 0, roll * sP) pose.RS, pose.LS = CFA(-35, 0, 48), CFA(-35, 0, -48) pose.RH, pose.LH = CFA(32, 0, 12), CFA(-24, 0, -12) elseif S.Anim == "SuperJump" then pose.Root = CFA(16, 0, 0) pose.Neck = CFA(22, 0, 0) pose.RS, pose.LS = CFA(165, 0, 16), CFA(165, 0, -16) pose.RH, pose.LH = CFA(-32, 0, 6), CFA(24, 0, -6) elseif S.Anim == "Zip" then pose.Root = CFA(-32, 0, 0) pose.RS, pose.LS = CFA(135, 0, 10), CFA(-45, 0, -22) pose.RH, pose.LH = CFA(35, 0, 5), CFA(-25, 0, -5) elseif S.Anim == "Shoot" then if S.Hand == "R" then pose.Waist = CFA(0, -18, 0) pose.RS, pose.RE = CFA(92, 0, 8), CFA(10, 0, 0) pose.LS = CFA(-25, 0, -18) else pose.Waist = CFA(0, 18, 0) pose.LS, pose.LE = CFA(92, 0, -8), CFA(10, 0, 0) pose.RS = CFA(-25, 0, 18) end elseif S.Anim == "Lift" then local u = Sin(p * Pi * 0.5) rootPos = V3(0, -0.6 * (1 - u), 0) pose.RS, pose.LS = CFA(165 * u, 0, 14), CFA(165 * u, 0, -14) elseif S.Anim == "Throw" then pose.Root = CFA(-26 * sP, 0, 0) pose.RS, pose.LS = CFA(165 - 75 * sP, 0, 15), CFA(165 - 75 * sP, 0, -15) elseif S.Anim == "Sense" then pose.Root = CFA(-10, 0, 0) pose.Neck = CFA(10, 18 * Sin(now * 28), 0) pose.RS, pose.LS = CFA(45, 0, 38), CFA(45, 0, -38) pose.RH, pose.LH = CFA(22, 0, 10), CFA(22, 0, -10) elseif S.WingActive then pose.Neck = CFA(38, 0, 0) pose.RS, pose.LS = CFA(12, 0, 88), CFA(12, 0, -88) pose.RE, pose.LE = CFA(15, 0, 0), CFA(15, 0, 0) pose.RH, pose.LH = CFA(-14, 0, 12), CFA(-14, 0, -12) elseif S.Crawling then local s, c = Sin(S.CPhase), Cos(S.CPhase) rootPos = V3(0, -0.95, 0) pose.Root = CFA(-78, 0, s * 6) pose.Neck = CFA(62, 0, -s * 8) pose.RS = CFA(115 + s * 36, 0, 48) pose.LS = CFA(115 - s * 36, 0, -48) pose.RE, pose.LE = CFA(42, 0, 0), CFA(42, 0, 0) pose.RH = CFA(55 - s * 34, 0, 38) pose.LH = CFA(55 + s * 34, 0, -38) pose.RK = CFA(-55 + c * 15, 0, 0) pose.LK = CFA(-55 - c * 15, 0, 0) elseif S.ChargingJump then local c = S.JumpPct rootPos = V3(0, -1.25 * c, 0) pose.Root = CFA(-28 * c, 0, 0) pose.Neck = CFA(26 * c, 0, 0) pose.RS, pose.LS = CFA(-42 * c, 0, 24 * c), CFA(-42 * c, 0, -24 * c) pose.RH, pose.LH = CFA(58 * c, 0, 12 * c), CFA(58 * c, 0, -12 * c) pose.RK, pose.LK = CFA(-68 * c, 0, 0), CFA(-68 * c, 0, 0) else local vel = Root.AssemblyLinearVelocity local hSpd = V3(vel.X, 0, vel.Z).Magnitude local inAir = Hum.FloorMaterial == Enum.Material.Air if S.LastAir and not inAir and vel.Y < -25 then S.LandT = now + 0.24 PlaySnd(SND.Land, 0.45, 0.85) end S.LastAir = inAir if now < S.LandT then local lPct = Sin(((S.LandT - now) / 0.24) * Pi) rootPos = V3(0, -0.85 * lPct, 0) pose.Root = CFA(-22 * lPct, 0, 0) pose.Neck = CFA(18 * lPct, 0, 0) pose.RS, pose.LS = CFA(-28 * lPct, 0, 22 * lPct), CFA(-28 * lPct, 0, -22 * lPct) pose.RH, pose.LH = CFA(48 * lPct, 0, 10), CFA(48 * lPct, 0, -10) pose.RK, pose.LK = CFA(-58 * lPct, 0, 0), CFA(-58 * lPct, 0, 0) elseif inAir then local vy = Clamp(vel.Y / 65, -1, 1) if vy < -0.25 then local dive = Clamp(-vy, 0, 1) pose.Root = CFA(-32 * dive, 0, 0) pose.Neck = CFA(24 * dive, 0, 0) pose.RS, pose.LS = CFA(-35 * dive, 0, 38 * dive), CFA(-35 * dive, 0, -38 * dive) pose.RE, pose.LE = CFA(28, 0, 0), CFA(28, 0, 0) pose.RH, pose.LH = CFA(38 * dive, 0, 8), CFA(18 * dive, 0, -8) pose.RK, pose.LK = CFA(-48 * dive, 0, 0), CFA(-28 * dive, 0, 0) else pose.Root = CFA(10 * vy, 0, 0) pose.RS, pose.LS = CFA(35, 0, 24), CFA(35, 0, -24) pose.RH, pose.LH = CFA(28, 0, 6), CFA(-16, 0, -6) pose.RK, pose.LK = CFA(-42, 0, 0), CFA(-22, 0, 0) end elseif hSpd > 2 then local rate = S.Sprinting and 13 or 8.5 S.WalkCycle = S.WalkCycle + dt * rate local sw = Sin(S.WalkCycle) local cw = Cos(S.WalkCycle) local lean = S.Sprinting and -22 or -8 local armAmp = S.Sprinting and 52 or 26 local legAmp = S.Sprinting and 46 or 24 rootPos = V3(0, Abs(cw) * (S.Sprinting and 0.22 or 0.1), 0) pose.Root = CFA(lean, sw * (S.Sprinting and 10 or 4), 0) pose.Neck = CFA(-lean * 0.75, -sw * 6, 0) pose.RS = CFA(-sw * armAmp, 0, 10) pose.LS = CFA(sw * armAmp, 0, -10) pose.RE = CFA(S.Sprinting and 48 or 22, 0, 0) pose.LE = CFA(S.Sprinting and 48 or 22, 0, 0) pose.RH = CFA(sw * legAmp, 0, 3) pose.LH = CFA(-sw * legAmp, 0, -3) pose.RK = CFA(Max(0, -sw) * -42, 0, 0) pose.LK = CFA(Max(0, sw) * -42, 0, 0) else local br = Sin(now * 2.6) if S.ThreatActive then rootPos = V3(0, -0.35 + br * 0.04, 0) pose.Root = CFA(-10, 0, 0) pose.RS, pose.LS = CFA(38, 0, 32), CFA(38, 0, -32) pose.RH, pose.LH = CFA(20, 0, 10), CFA(20, 0, -10) else rootPos = V3(0, br * 0.05, 0) pose.Root = CFA(-3 + br * 1.5, 0, 0) pose.Neck = CFA(3 - br * 1.5, Sin(now * 0.9) * 4, 0) pose.RS, pose.LS = CFA(6 * br, 0, 8 + 2 * br), CFA(6 * br, 0, -8 - 2 * br) pose.RE, pose.LE = CFA(12, 0, 0), CFA(12, 0, 0) pose.RH, pose.LH = CFA(5, 0, 4), CFA(5, 0, -4) pose.RK, pose.LK = CFA(-8, 0, 0), CFA(-8, 0, 0) end end if S.GrabPart then pose.RS, pose.LS = CFA(168, 0, 14), CFA(168, 0, -14) pose.RE, pose.LE = CFA(18, 0, 0), CFA(18, 0, 0) end end ApplyPose(pose, alpha, rootPos) end local function UpdateHUD() if not HUD or not HUD.Parent then BuildHUD() end if PadScale and Cam then local vp = Cam.ViewportSize PadScale.Scale = Clamp(Min(vp.X, vp.Y) / 480, 0.68, 1.2) end local now = Clock() local activeMap = { SWING = S.Swinging, SWINGKICK = S.SwingKicking, CRAWL = S.Crawling, WINGS = S.WingActive, GRAB = S.GrabPart ~= nil, SPRINT = S.Sprinting, SENSE = S.SenseAuto, } local cdDurMap = { ZIP = CFG.ZipCD, SHOOT = CFG.ShootCD, DODGE = CFG.DodgeCD, FLIP = CFG.FlipCD, JUMP = CFG.JumpCD, THROW = CFG.ThrowCD, PUNCH = CFG.PunchCD, KICK = CFG.KickCD, SWINGKICK = CFG.SwingKickCD, } for id, ui in pairs(Btns) do local rem = Max(0, (CD[id] or 0) - now) local dur = cdDurMap[id] or 1 ui.cd.Size = U2(1, 0, Clamp(rem / dur, 0, 1), 0) if id ~= "SWING" then ui.btn.BackgroundColor3 = activeMap[id] and RGB(215, 34, 38) or ui.bg end end end local function CleanupChar() Act.ReleaseSwing(false) Act.StopCrawl(false) Act.StopWings() Act.ReleaseGrab() ClearSwingKickObjs() StopFlingMode() for _, c in ipairs(Conns) do pcall(function() c:Disconnect() end) end Conns = {} for _, o in ipairs(Temp) do if o and o.Parent then o:Destroy() end end Temp = {} if HeadGui then HeadGui:Destroy(); HeadGui = nil end if SenseHL then SenseHL:Destroy(); SenseHL = nil end if WindSound then WindSound:Destroy(); WindSound = nil end SwingTrack = nil end local function SetupChar(c) CleanupChar() Char = c Hum = c:WaitForChild("Humanoid", 10) Root = c:WaitForChild("HumanoidRootPart", 10) if not Hum or not Root then return end Rig = Hum.RigType Hum.WalkSpeed = CFG.WalkSpeed Hum.UseJumpPower = true Hum.JumpPower = CFG.JumpPower Animator = Hum:FindFirstChildOfClass("Animator") or New("Animator", Hum) RAtt = Root:FindFirstChild("RootAttachment") or New("Attachment", Root, { Name = "RootAttachment" }) WindSound = New("Sound", Root, { SoundId = SND.Wind, Volume = 0, Looped = true, PlaybackSpeed = 1.0 }) WindSound:Play() local animObj = New("Animation", nil, { AnimationId = CFG.SwingAnim }) pcall(function() SwingTrack = Animator:LoadAnimation(animObj) SwingTrack.Priority = Enum.AnimationPriority.Action4 SwingTrack.Looped = true end) Joints, C0s, C1s = {}, {}, {} local mapR15 = { Root = { "LowerTorso", "Root" }, Waist = { "UpperTorso", "Waist" }, Neck = { "Head", "Neck" }, RS = { "RightUpperArm", "RightShoulder" }, LS = { "LeftUpperArm", "LeftShoulder" }, RE = { "RightLowerArm", "RightElbow" }, LE = { "LeftLowerArm", "LeftElbow" }, RH = { "RightUpperLeg", "RightHip" }, LH = { "LeftUpperLeg", "LeftHip" }, RK = { "RightLowerLeg", "RightKnee" }, LK = { "LeftLowerLeg", "LeftKnee" }, } local mapR6 = { Root = { "HumanoidRootPart", "RootJoint" }, Neck = { "Torso", "Neck" }, RS = { "Torso", "Right Shoulder" }, LS = { "Torso", "Left Shoulder" }, RH = { "Torso", "Right Hip" }, LH = { "Torso", "Left Hip" }, } local mTable = (Rig == Enum.HumanoidRigType.R15) and mapR15 or mapR6 for k, pair in pairs(mTable) do local p = c:FindFirstChild(pair[1]) local j = p and p:FindFirstChild(pair[2]) if j and j:IsA("Motor6D") then Joints[k], C0s[k], C1s[k] = j, j.C0, j.C1 end end CreateWebWings() CreateSenseGui() BuildHUD() table.insert(Conns, Hum.Died:Connect(CleanupChar)) end UserInputService.InputBegan:Connect(function(inp, gp) if gp then return end local kc = inp.KeyCode if Held[kc] then return end Held[kc] = true if kc == Enum.KeyCode.E or kc == Enum.KeyCode.ButtonR2 then Act.StartSwing() elseif kc == Enum.KeyCode.Z or kc == Enum.KeyCode.ButtonR1 then Act.Punch() elseif kc == Enum.KeyCode.T or kc == Enum.KeyCode.K or kc == Enum.KeyCode.ButtonL1 then Act.Kick() elseif kc == Enum.KeyCode.J then Act.SwingKick() elseif kc == Enum.KeyCode.F or kc == Enum.KeyCode.ButtonX then Act.ShootWeb() elseif kc == Enum.KeyCode.Q or kc == Enum.KeyCode.ButtonL2 then Act.WebZip() elseif kc == Enum.KeyCode.C or kc == Enum.KeyCode.DPadUp then Act.ToggleCrawl() elseif kc == Enum.KeyCode.X or kc == Enum.KeyCode.ButtonB then Act.Dodge() elseif kc == Enum.KeyCode.B or kc == Enum.KeyCode.DPadDown then Act.Backflip() elseif kc == Enum.KeyCode.G or kc == Enum.KeyCode.DPadLeft then Act.ToggleGrab() elseif kc == Enum.KeyCode.H or kc == Enum.KeyCode.DPadRight then Act.Throw() elseif kc == Enum.KeyCode.V or kc == Enum.KeyCode.ButtonY then Act.ToggleWings() elseif kc == Enum.KeyCode.P then Act.ToggleSense() elseif kc == Enum.KeyCode.Space or kc == Enum.KeyCode.ButtonA then Act.StartJump() elseif kc == Enum.KeyCode.LeftShift or kc == Enum.KeyCode.ButtonL3 then S.Sprinting = not S.Sprinting elseif kc == Enum.KeyCode.R then if S.Swinging then Act.ReleaseSwing(true) end if S.GrabPart then Act.ReleaseGrab() end if S.Crawling then Act.StopCrawl(false) end if S.WingActive then Act.StopWings() end end end) UserInputService.InputEnded:Connect(function(inp) local kc = inp.KeyCode Held[kc] = false if (kc == Enum.KeyCode.E or kc == Enum.KeyCode.ButtonR2) and S.Swinging then Act.ReleaseSwing(true) elseif (kc == Enum.KeyCode.Space or kc == Enum.KeyCode.ButtonA) and S.ChargingJump then Act.ReleaseJump(false) end end) RunService.RenderStepped:Connect(function(dt) if S.FlingMode and Root then Root.AssemblyAngularVelocity = V3() if S.SavedVel.Magnitude < 220 then Root.AssemblyLinearVelocity = S.SavedVel end end if S.CamShake > 0.01 and Cam then local ox = (Rand() - 0.5) * S.CamShake local oy = (Rand() - 0.5) * S.CamShake Cam.CFrame = Cam.CFrame * CF(ox, oy, 0) S.CamShake = Max(0, S.CamShake - dt * 6) end end) RunService.Heartbeat:Connect(function(dt) Cam = Workspace.CurrentCamera UpdateHUD() if not Char or not Hum or not Root or Hum.Health <= 0 then return end if S.ChargingJump then S.JumpPct = Clamp((Clock() - S.JumpStart) / CFG.JumpChargeMax, 0, 1) if JumpFill then JumpFill.Size = U2(S.JumpPct, 0, 1, 0) end end UpdateSwing(dt) UpdateCrawl(dt) UpdateWings(dt) UpdateGrab() UpdateSense(dt) UpdateProceduralAnims(dt) StepCombatFling() if WindSound then local spd = Root.AssemblyLinearVelocity.Magnitude local wVol = (S.Swinging or S.WingActive or spd > 55) and Clamp((spd - 35) / 110, 0, 0.65) or 0 WindSound.Volume = WindSound.Volume + (wVol - WindSound.Volume) * Min(1, dt * 8) WindSound.PlaybackSpeed = Clamp(0.8 + spd / 160, 0.8, 1.45) end if not S.Swinging and not S.Crawling and not S.WingActive and not S.FlingMode then Hum.WalkSpeed = S.Sprinting and CFG.SprintSpeed or CFG.WalkSpeed if Hum.FloorMaterial == Enum.Material.Air and Hum.MoveDirection.Magnitude > 0.05 then Root.AssemblyLinearVelocity = Root.AssemblyLinearVelocity + Hum.MoveDirection * (24 * dt) end end if Cam then local tFov = CFG.FOV if S.SwingKicking then tFov = CFG.KickFOV elseif S.WingActive then tFov = CFG.WingFOV elseif S.Swinging then tFov = CFG.SwingFOV elseif S.Sprinting and Hum.MoveDirection.Magnitude > 0.1 then tFov = CFG.SprintFOV end Cam.FieldOfView = Cam.FieldOfView + (tFov - Cam.FieldOfView) * Min(1, dt * 8) end end) BuildHUD() if LP.Character then SetupChar(LP.Character) end LP.CharacterAdded:Connect(SetupChar)