local Players = game:GetService("Players") local UserInputService = game:GetService("UserInputService") local RunService = game:GetService("RunService") local player = Players.LocalPlayer local AnimationSpeed = 0.75 local popupShown = false -- Item selection state local chosenItem = nil local itemChosen = false -- Version selection state local deadlyMode = nil local versionChosen = false local function showItemChoice() if itemChosen then return end local playerGui = player:WaitForChild("PlayerGui") local gui = Instance.new("ScreenGui") gui.Name = "ItemChoice" gui.ResetOnSpawn = false gui.IgnoreGuiInset = true gui.DisplayOrder = 200 gui.Parent = playerGui local backdrop = Instance.new("Frame") backdrop.Name = "Backdrop" backdrop.Size = UDim2.new(1, 0, 1, 0) backdrop.BackgroundColor3 = Color3.fromRGB(0, 0, 0) backdrop.BackgroundTransparency = 0.5 backdrop.BorderSizePixel = 0 backdrop.Parent = gui local frame = Instance.new("Frame") frame.Name = "Main" frame.Size = UDim2.new(0, 380, 0, 400) frame.Position = UDim2.new(0.5, 0, 0.5, 0) frame.AnchorPoint = Vector2.new(0.5, 0.5) frame.BackgroundColor3 = Color3.fromRGB(35, 35, 40) frame.BorderSizePixel = 0 frame.Parent = gui local corner = Instance.new("UICorner") corner.CornerRadius = UDim.new(0, 12) corner.Parent = frame local stroke = Instance.new("UIStroke") stroke.Color = Color3.fromRGB(90, 90, 100) stroke.Thickness = 1.5 stroke.Parent = frame local title = Instance.new("TextLabel") title.Name = "Title" title.Size = UDim2.new(1, -24, 0, 34) title.Position = UDim2.new(0, 12, 0, 12) title.BackgroundTransparency = 1 title.Text = "Choose Your Item" title.TextColor3 = Color3.fromRGB(255, 255, 255) title.Font = Enum.Font.GothamBold title.TextSize = 22 title.TextXAlignment = Enum.TextXAlignment.Left title.Parent = frame local subtitle = Instance.new("TextLabel") subtitle.Name = "Subtitle" subtitle.Size = UDim2.new(1, -24, 0, 22) subtitle.Position = UDim2.new(0, 12, 0, 50) subtitle.BackgroundTransparency = 1 subtitle.Text = "Pick an item to spawn with:" subtitle.TextColor3 = Color3.fromRGB(215, 215, 215) subtitle.Font = Enum.Font.Gotham subtitle.TextSize = 16 subtitle.TextXAlignment = Enum.TextXAlignment.Left subtitle.Parent = frame local items = { {name = "bat", label = "BASEBALL BAT\nSwing, charge crits, send targets flying", base = Color3.fromRGB(255, 170, 0), hover = Color3.fromRGB(255, 195, 45)}, {name = "combat", label = "COMBAT\nPunches, kicks, blocks and drop kicks", base = Color3.fromRGB(60, 120, 200), hover = Color3.fromRGB(85, 150, 225)}, {name = "pipe", label = "LEAD PIPE\nHeavy metal swings, concussions", base = Color3.fromRGB(120, 120, 130), hover = Color3.fromRGB(150, 150, 160)}, {name = "katana", label = "KATANA\nFast slashes, spin attack, sword blocks", base = Color3.fromRGB(180, 40, 60), hover = Color3.fromRGB(215, 60, 80)}, } for index, data in ipairs(items) do local btn = Instance.new("TextButton") btn.Name = data.name .. "Button" btn.Size = UDim2.new(1, -24, 0, 62) btn.Position = UDim2.new(0, 12, 0, 82 + (index - 1) * 70) btn.BackgroundColor3 = data.base btn.BorderSizePixel = 0 btn.Text = data.label btn.TextColor3 = Color3.fromRGB(255, 255, 255) btn.Font = Enum.Font.GothamBold btn.TextSize = 17 btn.AutoButtonColor = false btn.Parent = frame local btnCorner = Instance.new("UICorner") btnCorner.CornerRadius = UDim.new(0, 8) btnCorner.Parent = btn btn.MouseEnter:Connect(function() btn.BackgroundColor3 = data.hover end) btn.MouseLeave:Connect(function() btn.BackgroundColor3 = data.base end) btn.MouseButton1Click:Connect(function() if itemChosen then return end chosenItem = data.name itemChosen = true gui:Destroy() end) end end local function showVersionChoice() if versionChosen then return end local playerGui = player:WaitForChild("PlayerGui") local gui = Instance.new("ScreenGui") gui.Name = "BatVersionChoice" gui.ResetOnSpawn = false gui.IgnoreGuiInset = true gui.DisplayOrder = 200 gui.Parent = playerGui local backdrop = Instance.new("Frame") backdrop.Name = "Backdrop" backdrop.Size = UDim2.new(1, 0, 1, 0) backdrop.BackgroundColor3 = Color3.fromRGB(0, 0, 0) backdrop.BackgroundTransparency = 0.5 backdrop.BorderSizePixel = 0 backdrop.Parent = gui local frame = Instance.new("Frame") frame.Name = "Main" frame.Size = UDim2.new(0, 380, 0, 250) frame.Position = UDim2.new(0.5, 0, 0.5, 0) frame.AnchorPoint = Vector2.new(0.5, 0.5) frame.BackgroundColor3 = Color3.fromRGB(35, 35, 40) frame.BorderSizePixel = 0 frame.Parent = gui local corner = Instance.new("UICorner") corner.CornerRadius = UDim.new(0, 12) corner.Parent = frame local stroke = Instance.new("UIStroke") stroke.Color = Color3.fromRGB(90, 90, 100) stroke.Thickness = 1.5 stroke.Parent = frame local title = Instance.new("TextLabel") title.Name = "Title" title.Size = UDim2.new(1, -24, 0, 34) title.Position = UDim2.new(0, 12, 0, 12) title.BackgroundTransparency = 1 local names = {bat = "Baseball Bat", combat = "Combat", pipe = "Lead Pipe", katana = "Katana"} local weaponName = names[chosenItem] or "Weapon" title.Text = weaponName title.TextColor3 = Color3.fromRGB(255, 255, 255) title.Font = Enum.Font.GothamBold title.TextSize = 22 title.TextXAlignment = Enum.TextXAlignment.Left title.Parent = frame local subtitle = Instance.new("TextLabel") subtitle.Name = "Subtitle" subtitle.Size = UDim2.new(1, -24, 0, 22) subtitle.Position = UDim2.new(0, 12, 0, 50) subtitle.BackgroundTransparency = 1 subtitle.Text = "Choose how the " .. weaponName .. " should behave:" subtitle.TextColor3 = Color3.fromRGB(215, 215, 215) subtitle.Font = Enum.Font.Gotham subtitle.TextSize = 16 subtitle.TextXAlignment = Enum.TextXAlignment.Left subtitle.Parent = frame local deadlyBtn = Instance.new("TextButton") deadlyBtn.Name = "DeadlyButton" deadlyBtn.Size = UDim2.new(1, -24, 0, 62) deadlyBtn.Position = UDim2.new(0, 12, 0, 80) deadlyBtn.BackgroundColor3 = Color3.fromRGB(180, 40, 40) deadlyBtn.BorderSizePixel = 0 deadlyBtn.Text = "DEADLY\nReally kills targets" deadlyBtn.TextColor3 = Color3.fromRGB(255, 255, 255) deadlyBtn.Font = Enum.Font.GothamBold deadlyBtn.TextSize = 18 deadlyBtn.AutoButtonColor = false deadlyBtn.Parent = frame local deadlyCorner = Instance.new("UICorner") deadlyCorner.CornerRadius = UDim.new(0, 8) deadlyCorner.Parent = deadlyBtn local safeBtn = Instance.new("TextButton") safeBtn.Name = "SafeButton" safeBtn.Size = UDim2.new(1, -24, 0, 62) safeBtn.Position = UDim2.new(0, 12, 0, 150) safeBtn.BackgroundColor3 = Color3.fromRGB(0, 140, 90) safeBtn.BorderSizePixel = 0 safeBtn.Text = "RESPAWN\nTargets respawn after death" safeBtn.TextColor3 = Color3.fromRGB(255, 255, 255) safeBtn.Font = Enum.Font.GothamBold safeBtn.TextSize = 18 safeBtn.AutoButtonColor = false safeBtn.Parent = frame local safeCorner = Instance.new("UICorner") safeCorner.CornerRadius = UDim.new(0, 8) safeCorner.Parent = safeBtn deadlyBtn.MouseEnter:Connect(function() deadlyBtn.BackgroundColor3 = Color3.fromRGB(210, 55, 55) end) deadlyBtn.MouseLeave:Connect(function() deadlyBtn.BackgroundColor3 = Color3.fromRGB(180, 40, 40) end) safeBtn.MouseEnter:Connect(function() safeBtn.BackgroundColor3 = Color3.fromRGB(0, 165, 105) end) safeBtn.MouseLeave:Connect(function() safeBtn.BackgroundColor3 = Color3.fromRGB(0, 140, 90) end) local function choose(isDeadly) if versionChosen then return end deadlyMode = isDeadly versionChosen = true gui:Destroy() end deadlyBtn.MouseButton1Click:Connect(function() choose(true) end) safeBtn.MouseButton1Click:Connect(function() choose(false) end) end local function showR6OnlyPopup() if popupShown then return end popupShown = true local playerGui = player:WaitForChild("PlayerGui") local gui = Instance.new("ScreenGui") gui.Name = "BatR6OnlyPopup" gui.ResetOnSpawn = false gui.IgnoreGuiInset = true gui.DisplayOrder = 100 gui.Parent = playerGui local backdrop = Instance.new("Frame") backdrop.Name = "Backdrop" backdrop.Size = UDim2.new(1, 0, 1, 0) backdrop.BackgroundColor3 = Color3.fromRGB(0, 0, 0) backdrop.BackgroundTransparency = 0.5 backdrop.BorderSizePixel = 0 backdrop.Parent = gui local frame = Instance.new("Frame") frame.Name = "Main" frame.Size = UDim2.new(0, 360, 0, 180) frame.Position = UDim2.new(0.5, 0, 0.5, 0) frame.AnchorPoint = Vector2.new(0.5, 0.5) frame.BackgroundColor3 = Color3.fromRGB(35, 35, 40) frame.BorderSizePixel = 0 frame.Parent = gui local corner = Instance.new("UICorner") corner.CornerRadius = UDim.new(0, 12) corner.Parent = frame local stroke = Instance.new("UIStroke") stroke.Color = Color3.fromRGB(90, 90, 100) stroke.Thickness = 1.5 stroke.Parent = frame local title = Instance.new("TextLabel") title.Name = "Title" title.Size = UDim2.new(1, -24, 0, 34) title.Position = UDim2.new(0, 12, 0, 12) title.BackgroundTransparency = 1 local names = {bat = "Baseball Bat", combat = "Combat", pipe = "Lead Pipe", katana = "Katana"} local weaponName = names[chosenItem] or "Weapon" title.Text = weaponName title.TextColor3 = Color3.fromRGB(255, 255, 255) title.Font = Enum.Font.GothamBold title.TextSize = 22 title.TextXAlignment = Enum.TextXAlignment.Left title.Parent = frame local text = Instance.new("TextLabel") text.Name = "Text" text.Size = UDim2.new(1, -24, 0, 70) text.Position = UDim2.new(0, 12, 0, 50) text.BackgroundTransparency = 1 text.Text = "This script only supports R6 rigs.\nYour character is R15, so the weapon will not be loaded." text.TextColor3 = Color3.fromRGB(215, 215, 215) text.Font = Enum.Font.Gotham text.TextSize = 16 text.TextWrapped = true text.TextXAlignment = Enum.TextXAlignment.Left text.TextYAlignment = Enum.TextYAlignment.Top text.Parent = frame local button = Instance.new("TextButton") button.Name = "OkButton" button.Size = UDim2.new(0, 120, 0, 36) button.Position = UDim2.new(0.5, 0, 1, -50) button.AnchorPoint = Vector2.new(0.5, 0) button.BackgroundColor3 = Color3.fromRGB(0, 140, 90) button.BorderSizePixel = 0 button.Text = "OK" button.TextColor3 = Color3.fromRGB(255, 255, 255) button.Font = Enum.Font.GothamBold button.TextSize = 16 button.AutoButtonColor = false button.Parent = frame local btnCorner = Instance.new("UICorner") btnCorner.CornerRadius = UDim.new(0, 8) btnCorner.Parent = button button.MouseEnter:Connect(function() button.BackgroundColor3 = Color3.fromRGB(0, 165, 105) end) button.MouseLeave:Connect(function() button.BackgroundColor3 = Color3.fromRGB(0, 140, 90) end) local closed = false button.MouseButton1Click:Connect(function() if closed then return end closed = true for i = 0, 1, 0.1 do frame.BackgroundTransparency = i title.TextTransparency = i text.TextTransparency = i button.BackgroundTransparency = i button.TextTransparency = i stroke.Transparency = i backdrop.BackgroundTransparency = 0.5 + i * 0.5 task.wait(0.02) end gui:Destroy() end) end local function isR15Character(character) if not character then return false end local humanoid = character:FindFirstChildOfClass("Humanoid") if not humanoid then humanoid = character:WaitForChild("Humanoid", 5) end if not humanoid then return false end return humanoid.RigType == Enum.HumanoidRigType.R15 end local mobileButtonGui = nil local function createMobileButton(tool) if mobileButtonGui then return end if not UserInputService.TouchEnabled then return end local label = "ATTACK" local color = Color3.fromRGB(255, 170, 0) if tool.Name == "Baseball Bat" then label = "SWING BAT" color = Color3.fromRGB(255, 170, 0) elseif tool.Name == "Lead Pipe" then label = "SWING PIPE" color = Color3.fromRGB(150, 150, 160) elseif tool.Name == "Combat" then label = "PUNCH" color = Color3.fromRGB(60, 120, 200) elseif tool.Name == "Katana" then label = "SLASH" color = Color3.fromRGB(180, 40, 60) end local pressedColor = Color3.new(color.R * 0.8, color.G * 0.8, color.B * 0.8) mobileButtonGui = Instance.new("ScreenGui") mobileButtonGui.Name = "AttackButtonGui" mobileButtonGui.ResetOnSpawn = false mobileButtonGui.IgnoreGuiInset = true mobileButtonGui.DisplayOrder = 50 local button = Instance.new("TextButton") button.Name = "AttackButton" button.Size = UDim2.new(0, 150, 0, 60) button.Position = UDim2.new(1, -20, 1, -130) button.AnchorPoint = Vector2.new(1, 1) button.Text = label button.BackgroundColor3 = color button.TextColor3 = Color3.fromRGB(255, 255, 255) button.Font = Enum.Font.GothamBold button.TextSize = 20 button.BorderSizePixel = 0 button.AutoButtonColor = false button.Parent = mobileButtonGui local corner = Instance.new("UICorner") corner.CornerRadius = UDim.new(0, 10) corner.Parent = button local isBat = (tool.Name == "Baseball Bat") local pressed = false local function canUseTool() return tool.Parent ~= nil and tool.Parent:IsA("Model") end local function release() if not pressed then return end pressed = false button.BackgroundColor3 = color if not canUseTool() then return end if isBat then local startT = tick() while (count or 0) < 30 and (tick() - startT) < 1 do if not canUseTool() then return end task.wait() end end if canUseTool() then tool:Deactivate() end end button.MouseButton1Down:Connect(function() if pressed then return end if not canUseTool() then return end pressed = true button.BackgroundColor3 = pressedColor tool:Activate() end) button.MouseButton1Up:Connect(release) button.MouseLeave:Connect(release) mobileButtonGui.Parent = player:WaitForChild("PlayerGui") end local function removeMobileButton() if mobileButtonGui then mobileButtonGui:Destroy() mobileButtonGui = nil end end local function makeSound(parent, name, soundId, volume) local sound = Instance.new("Sound") sound.Name = name sound.SoundId = soundId sound.Volume = volume sound.Parent = parent return sound end local function ragdollkill(character) local victimshumanoid = character:findFirstChildOfClass("Humanoid") local checkragd = character:findFirstChild("ragded") if not checkragd then local boolvalue = Instance.new("BoolValue", character) boolvalue.Name = "ragded" game.Debris:AddItem(boolvalue, 8) local function hideOriginal() local hiddenParts = {} for _, d in pairs(character:GetDescendants()) do if d:IsA("BasePart") then hiddenParts[d] = {transparency = d.Transparency, canCollide = d.CanCollide} d.Transparency = 1 d.CanCollide = false elseif d:IsA("Decal") then hiddenParts[d] = {transparency = d.Transparency} d.Transparency = 1 end end task.delay(8, function() for p, saved in pairs(hiddenParts) do if p.Parent then p.Transparency = saved.transparency if saved.canCollide ~= nil then p.CanCollide = saved.canCollide end end end end) end if not character:findFirstChild("UpperTorso") then character.Archivable = true for i,v in pairs(character:GetChildren()) do if v.ClassName == "Sound" then v:destroy() end for q,w in pairs(v:GetChildren()) do if w.ClassName == "Sound" then w:destroy() end end end local ragdoll = character:Clone() for _, d in pairs(ragdoll:GetDescendants()) do if d.ClassName == "BodyVelocity" or d.ClassName == "BodyPosition" or d.ClassName == "BodyForce" then d:destroy() end end local decapcloneflag = ragdoll:findFirstChild("decapitatedbat") if decapcloneflag then local rhead = ragdoll:findFirstChild("Head") if rhead then rhead.Transparency = 1 for _, w in pairs(rhead:GetChildren()) do if w.ClassName == "Weld" and w.Part1 and w.Part1 ~= rhead then w.Part1:destroy() end if w.ClassName == "Decal" then w:destroy() end end end for _, w in pairs(ragdoll:GetChildren()) do if w.ClassName == "Accessory" or w.ClassName == "Hat" then w:destroy() end end decapcloneflag:destroy() end local origdecapflag = character:findFirstChild("decapitatedbat") if origdecapflag then origdecapflag:destroy() end hideOriginal() local ranimate = ragdoll:FindFirstChild("Animate") if ranimate then ranimate.Disabled = true end for _, d in pairs(ragdoll:GetDescendants()) do if d.ClassName == "Motor" or d.ClassName == "Motor6D" then d:destroy() end end local function makeSocket(part0, part1, c0, c1) if not (part0 and part1) then return end local a0 = Instance.new("Attachment") a0.Name = "RagdollJoint0" a0.CFrame = c0 a0.Parent = part0 local a1 = Instance.new("Attachment") a1.Name = "RagdollJoint1" a1.CFrame = c1 a1.Parent = part1 local socket = Instance.new("BallSocketConstraint") socket.Name = "RagdollSocket" socket.Attachment0 = a0 socket.Attachment1 = a1 socket.LimitsEnabled = true socket.TwistLimitsEnabled = true socket.TwistLowerAngle = -45 socket.TwistUpperAngle = 45 socket.Parent = part0 end local ragdollhumanoid = ragdoll:findFirstChildOfClass("Humanoid") if ragdollhumanoid then ragdollhumanoid.BreakJointsOnDeath = false ragdollhumanoid.Health = 0 ragdollhumanoid.PlatformStand = true end if ragdoll:findFirstChild("Health") then if ragdoll:findFirstChild("Health").ClassName == "Script" then ragdoll:findFirstChild("Health").Disabled = true end end local torso = ragdoll:findFirstChild("Torso") if torso then makeSocket(torso, ragdoll:findFirstChild("Head"), CFrame.new(0, 1, 0) * CFrame.Angles(-math.pi/2, 0, math.pi), CFrame.new(0, -0.5, 0) * CFrame.Angles(-math.pi/2, 0, math.pi)) makeSocket(torso, ragdoll:findFirstChild("Right Arm"), CFrame.new(1, 0.5, 0) * CFrame.Angles(0, math.pi/2, 0), CFrame.new(-0.5, 0.5, 0) * CFrame.Angles(0, math.pi/2, 0)) makeSocket(torso, ragdoll:findFirstChild("Left Arm"), CFrame.new(-1, 0.5, 0) * CFrame.Angles(0, -math.pi/2, 0), CFrame.new(0.5, 0.5, 0) * CFrame.Angles(0, -math.pi/2, 0)) makeSocket(torso, ragdoll:findFirstChild("Right Leg"), CFrame.new(1, -1, 0) * CFrame.Angles(0, math.pi/2, 0), CFrame.new(0.5, 1, 0) * CFrame.Angles(0, math.pi/2, 0)) makeSocket(torso, ragdoll:findFirstChild("Left Leg"), CFrame.new(-1, -1, 0) * CFrame.Angles(0, -math.pi/2, 0), CFrame.new(-0.5, 1, 0) * CFrame.Angles(0, -math.pi/2, 0)) end for _, limbName in pairs({"Right Arm", "Left Arm", "Right Leg", "Left Leg"}) do local limb = ragdoll:findFirstChild(limbName) if limb then local limbcollider = Instance.new("Part") limbcollider.Size = Vector3.new(0.3, 1, 1) limbcollider.Shape = Enum.PartType.Cylinder limbcollider.Transparency = 1 limbcollider.Massless = true limbcollider.Name = "LimbCollider" limbcollider.Parent = limb local limbcolliderweld = Instance.new("Weld") limbcolliderweld.Part0 = limb limbcolliderweld.Part1 = limbcollider limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2) * CFrame.new(-0.3, 0, 0) limbcolliderweld.Parent = limbcollider end end if ragdoll:findFirstChild("HumanoidRootPart") then ragdoll.HumanoidRootPart:destroy() end game.Debris:AddItem(ragdoll, 8) ragdoll.Parent = workspace elseif character:findFirstChild("UpperTorso") then character.Archivable = true for i,v in pairs(character:GetChildren()) do if v.ClassName == "Sound" then v:remove() end for q,w in pairs(v:GetChildren()) do if w.ClassName == "Sound" then w:remove() end end end local ragdoll = character:Clone() local decapcloneflag = ragdoll:findFirstChild("decapitatedbat") if decapcloneflag then local rhead = ragdoll:findFirstChild("Head") if rhead then rhead.Transparency = 1 for _, w in pairs(rhead:GetChildren()) do if w:IsA("Decal") then w:Destroy() end end end for _, w in pairs(ragdoll:GetChildren()) do if w.ClassName == "Accessory" or w.ClassName == "Hat" then w:Destroy() end end decapcloneflag:Destroy() end local origdecapflag = character:findFirstChild("decapitatedbat") if origdecapflag then origdecapflag:Destroy() end hideOriginal() ragdoll:findFirstChildOfClass("Humanoid").BreakJointsOnDeath = false for i,v in pairs(ragdoll:GetDescendants()) do if v.ClassName == "Motor" or v.ClassName == "Motor6D" then v:destroy() end end ragdoll:BreakJoints() ragdoll:findFirstChildOfClass("Humanoid").Health = 0 if ragdoll:findFirstChild("Health") then if ragdoll:findFirstChild("Health").ClassName == "Script" then ragdoll:findFirstChild("Health").Disabled = true end end ragdoll.Parent = workspace local Humanoid = ragdoll:findFirstChildOfClass("Humanoid") Humanoid.PlatformStand = true local function makeballconnections(limb, attachementone, attachmenttwo, twistlower, twistupper) local connection = Instance.new('BallSocketConstraint', limb) connection.LimitsEnabled = true connection.Attachment0 = attachementone connection.Attachment1 = attachmenttwo connection.TwistLimitsEnabled = true connection.TwistLowerAngle = twistlower connection.TwistUpperAngle = twistupper local limbcollider = Instance.new("Part", limb) limbcollider.Size = Vector3.new(0.1,1,1) limbcollider.Shape = "Cylinder" limbcollider.Transparency = 1 limbcollider:BreakJoints() local limbcolliderweld = Instance.new("Weld", limbcollider) limbcolliderweld.Part0 = limb limbcolliderweld.Part1 = limbcollider limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) end local function makehingeconnections(limb, attachementone, attachmenttwo, lower, upper) local connection = Instance.new('HingeConstraint', limb) connection.LimitsEnabled = true connection.Attachment0 = attachementone connection.Attachment1 = attachmenttwo connection.LimitsEnabled = true connection.LowerAngle = lower connection.UpperAngle = upper local limbcollider = Instance.new("Part", limb) limbcollider.Size = Vector3.new(0.1,1,1) limbcollider.Shape = "Cylinder" limbcollider.Transparency = 1 limbcollider:BreakJoints() local limbcolliderweld = Instance.new("Weld", limbcollider) limbcolliderweld.Part0 = limb limbcolliderweld.Part1 = limbcollider limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) end local HeadAttachment = Instance.new("Attachment", Humanoid.Parent.Head) HeadAttachment.Position = Vector3.new(0, -0.5, 0) if ragdoll.UpperTorso:findFirstChild("NeckAttachment") then makehingeconnections(Humanoid.Parent.Head, HeadAttachment, ragdoll.UpperTorso.NeckAttachment, -50, 50) end makehingeconnections(Humanoid.Parent.LowerTorso, Humanoid.Parent.LowerTorso.WaistRigAttachment, Humanoid.Parent.UpperTorso.WaistRigAttachment, -50, 50) makeballconnections(Humanoid.Parent.LeftUpperArm, Humanoid.Parent.LeftUpperArm.LeftShoulderRigAttachment, Humanoid.Parent.UpperTorso.LeftShoulderRigAttachment, -200, 200, 180) makehingeconnections(Humanoid.Parent.LeftLowerArm, Humanoid.Parent.LeftLowerArm.LeftElbowRigAttachment, Humanoid.Parent.LeftUpperArm.LeftElbowRigAttachment, 0, -60) makehingeconnections(Humanoid.Parent.LeftHand, Humanoid.Parent.LeftHand.LeftWristRigAttachment, Humanoid.Parent.LeftLowerArm.LeftWristRigAttachment, -20, 20) makeballconnections(Humanoid.Parent.RightUpperArm, Humanoid.Parent.RightUpperArm.RightShoulderRigAttachment, Humanoid.Parent.UpperTorso.RightShoulderRigAttachment, -200, 200, 180) makehingeconnections(Humanoid.Parent.RightLowerArm, Humanoid.Parent.RightLowerArm.RightElbowRigAttachment, Humanoid.Parent.RightUpperArm.RightElbowRigAttachment, 0, -60) makehingeconnections(Humanoid.Parent.RightHand, Humanoid.Parent.RightHand.RightWristRigAttachment, Humanoid.Parent.RightLowerArm.RightWristRigAttachment, -20, 20) makeballconnections(Humanoid.Parent.RightUpperLeg, Humanoid.Parent.RightUpperLeg.RightHipRigAttachment, Humanoid.Parent.LowerTorso.RightHipRigAttachment, -80, 80, 80) makehingeconnections(Humanoid.Parent.RightLowerLeg, Humanoid.Parent.RightLowerLeg.RightKneeRigAttachment, Humanoid.Parent.RightUpperLeg.RightKneeRigAttachment, 0, 60) makehingeconnections(Humanoid.Parent.RightFoot, Humanoid.Parent.RightFoot.RightAnkleRigAttachment, Humanoid.Parent.RightLowerLeg.RightAnkleRigAttachment, -20, 20) makeballconnections(Humanoid.Parent.LeftUpperLeg, Humanoid.Parent.LeftUpperLeg.LeftHipRigAttachment, Humanoid.Parent.LowerTorso.LeftHipRigAttachment, -80, 80, 80) makehingeconnections(Humanoid.Parent.LeftLowerLeg, Humanoid.Parent.LeftLowerLeg.LeftKneeRigAttachment, Humanoid.Parent.LeftUpperLeg.LeftKneeRigAttachment, 0, 60) makehingeconnections(Humanoid.Parent.LeftFoot, Humanoid.Parent.LeftFoot.LeftAnkleRigAttachment, Humanoid.Parent.LeftLowerLeg.LeftAnkleRigAttachment, -20, 20) for i,v in pairs(Humanoid.Parent:GetChildren()) do if v.ClassName == "Accessory" then local attachment1 = v.Handle:findFirstChildOfClass("Attachment") if attachment1 then for q,w in pairs(Humanoid.Parent:GetChildren()) do if w.ClassName == "Part" then local attachment2 = w:findFirstChild(attachment1.Name) if attachment2 then local hinge = Instance.new("HingeConstraint", v.Handle) hinge.Attachment0 = attachment1 hinge.Attachment1 = attachment2 hinge.LimitsEnabled = true hinge.LowerAngle = 0 hinge.UpperAngle = 0 end end end end end end for i,v in pairs(ragdoll:GetChildren()) do for q,w in pairs(v:GetChildren()) do if w.ClassName == "Motor6D" and w.Name ~= "ouch_weld" then w:destroy() end end end if ragdoll:findFirstChild("HumanoidRootPart") then ragdoll.HumanoidRootPart:destroy() end if ragdoll:findFirstChildOfClass("Humanoid") then ragdoll:findFirstChildOfClass("Humanoid").PlatformStand = true end local function waitfordatmoment() wait(0.2) local function searchforvelocity(wot) for i,v in pairs(wot:GetChildren()) do searchforvelocity(v) if v.ClassName == "BodyPosition" or v.ClassName == "BodyVelocity" then v:destroy() end end end searchforvelocity(ragdoll) end spawn(waitfordatmoment) game.Debris:AddItem(ragdoll, 8) end end end local function buildBat() local tool = Instance.new("Tool") tool.Name = "Baseball Bat" tool.CanBeDropped = true tool.RequiresHandle = true tool.Grip = CFrame.new(0, 0, -1.7, 0, 0, 1, 1, 0, 0, 0, 1, 0) local handle = Instance.new("Part") handle.Name = "Handle" handle.Size = Vector3.new(0.4, 0.4, 4.2) handle.Color = Color3.fromRGB(99, 95, 98) handle.Reflectance = 0.4 handle.Material = Enum.Material.Plastic handle.CanCollide = true handle.Parent = tool local mesh = Instance.new("SpecialMesh") mesh.MeshType = Enum.MeshType.FileMesh mesh.MeshId = "rbxassetid://54983181" mesh.TextureId = "rbxassetid://54983107" mesh.Scale = Vector3.new(3, 3, 1.5) mesh.Parent = handle makeSound(handle, "Swoosh", "rbxassetid://3755636638", 0.7) makeSound(handle, "Equip", "rbxassetid://769464514", 1) makeSound(handle, "Hit", "rbxassetid://175024455", 1) makeSound(handle, "Ouch", "rbxassetid://4306991691", 0.5) makeSound(handle, "Hit2", "rbxassetid://3932505023", 0.5) makeSound(handle, "Ouch2", "rbxassetid://4459572527", 0.5) local att0 = Instance.new("Attachment") att0.Name = "Attachment" att0.Position = Vector3.new(0, 0, -0.84) att0.Parent = handle local att1 = Instance.new("Attachment") att1.Name = "Attachment2" att1.Position = Vector3.new(0, 0, 2.184) att1.Parent = handle local trail = Instance.new("Trail") trail.Name = "Trail" trail.Attachment0 = att0 trail.Attachment1 = att1 trail.Lifetime = 0.1 trail.LightEmission = 0 trail.Color = ColorSequence.new(Color3.new(1, 1, 1)) trail.Transparency = NumberSequence.new({ NumberSequenceKeypoint.new(0, 0.8), NumberSequenceKeypoint.new(1, 0.8), }) trail.Enabled = false trail.Parent = handle return tool end local function suppressToolNone(character) if not character then return nil end local humanoid = character:FindFirstChildOfClass("Humanoid") if not humanoid then return nil end local animator = humanoid:FindFirstChildOfClass("Animator") if not animator then animator = humanoid:WaitForChild("Animator", 5) if not animator then return nil end end local TOOLNONE_IDS = { ["rbxassetid://182393478"] = true, ["http://www.roblox.com/asset/?id=182393478"] = true, } local function isToolNone(track) if string.find(string.lower(track.Name), "toolnone", 1, true) then return true end local anim = track.Animation if anim then if string.find(string.lower(anim.Name), "toolnone", 1, true) then return true end return TOOLNONE_IDS[anim.AnimationId] == true end return false end for _, track in animator:GetPlayingAnimationTracks() do if isToolNone(track) then track:Stop(0) end end local conn = animator.AnimationPlayed:Connect(function(track) if isToolNone(track) then track:Stop(0) end end) return function() if conn then conn:Disconnect() conn = nil end end end function runBehavior(tool) canattack = true cananimate = false equipped = false handle = tool.Handle equipsound = handle.Equip swishsound = handle.Swoosh hitsound = handle.Hit goresound = handle.Ouch hitsound2 = handle.Hit2 goresound2 = handle.Ouch2 owner = nil character = nil mouseclick = false attacknumber = 1 attacktype = 0 count = 0 trail = handle.Trail runservice = game:GetService("RunService") -- tool.Activated:connect(function() mouseclick = true end) tool.Deactivated:connect(function() mouseclick = false end) -- function damage(action, force, maxforce, t) for i,v in pairs(workspace:GetDescendants()) do if v.ClassName == "Model" then local head = v:findFirstChild("Head") local humanoid = v:findFirstChildOfClass("Humanoid") local torso = v:findFirstChild("Torso") local ragdolled = v:findFirstChild("ragdolledbat") if humanoid and head then if (head.Position - handle.Position).magnitude < 3 and v ~= character and humanoid.Health > 0 then if v:findFirstChild("ragded") then return end if action ~= "vibe check" then if ragdolled then return end end local rightarmweld = character.Torso:findFirstChild("RightArmWeldbat") local leftarmweld = character.Torso:findFirstChild("LeftArmWeldbat") local headweld = character.Torso:findFirstChild("HeadWeldbat") local rootweld = character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeldbat") hitsound.PlaybackSpeed = 1+(math.random(-4,4)/20) hitsound:Play() hitsound2.PlaybackSpeed = 1+(math.random(-4,4)/20) hitsound2:Play() local velocity = Instance.new("BodyVelocity", head) velocity.MaxForce = Vector3.new(math.huge,0,math.huge) velocity.Velocity = character.HumanoidRootPart.CFrame.lookVector * math.random(force,maxforce) if action == "normal" then local dmg = math.random(30,80) if humanoid.Health <= dmg then ragdollkill(v) if deadlyMode then humanoid.Health = 0 else humanoid.Health = humanoid.MaxHealth end else humanoid.Health = humanoid.Health - dmg end elseif action == "critical" then local dmg = math.random(70,90) if humanoid.Health <= dmg then ragdollkill(v) if deadlyMode then humanoid.Health = 0 else humanoid.Health = humanoid.MaxHealth end else humanoid.Health = humanoid.Health - dmg end elseif action == "vibe check" then goresound.PlaybackSpeed = 1+(math.random(-4,4)/20) goresound:Play() goresound2.PlaybackSpeed = 1+(math.random(-4,4)/20) goresound2:Play() local decapflag = Instance.new("BoolValue", v) decapflag.Name = "decapitatedbat" for i = 1,math.random(25,30) do local hedd = Instance.new("Part", workspace) hedd.Size = Vector3.new(0.25,0.25,0.25) hedd.CFrame = head.CFrame * CFrame.new(math.random(-10,10)/20,math.random(-10,10)/20,math.random(-10,10)/20) game.Debris:AddItem(hedd, 7) if math.random(1,3) == 1 then hedd.BrickColor = head.BrickColor hedd.Material = head.Material else hedd.BrickColor = BrickColor.new("Maroon") hedd.Material = "Granite" end end ragdollkill(v) if deadlyMode then humanoid.Health = 0 else humanoid.Health = humanoid.MaxHealth end end local ragdolledknife = Instance.new("BoolValue", v) ragdolledknife.Name = "ragdolledbat" humanoid.PlatformStand = true coroutine.wrap(function() wait(t) humanoid.PlatformStand = false end)() game.Debris:AddItem(ragdolledknife, t) game.Debris:AddItem(velocity, 0.2) if torso then coroutine.wrap(function() humanoid = v:WaitForChild("Humanoid") local ragdoll = v if ragdoll:findFirstChild("Right Arm") then local glue = Instance.new("Glue", ragdoll.Torso) glue.Part0 = ragdoll.Torso glue.Part1 = ragdoll:findFirstChild("Right Arm") glue.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) glue.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Right Arm")) limbcollider.Size = Vector3.new(1.4,1,1) limbcollider.Shape = "Cylinder" limbcollider.Transparency = 1 limbcollider.Name = "LimbCollider" local limbcolliderweld = Instance.new("Weld", limbcollider) limbcolliderweld.Part0 = ragdoll:findFirstChild("Right Arm") limbcolliderweld.Part1 = limbcollider limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0) coroutine.wrap(function() if ragdoll.Torso:findFirstChild("Right Shoulder") then local limbclone = ragdoll.Torso:findFirstChild("Right Shoulder"):Clone() ragdoll.Torso:findFirstChild("Right Shoulder"):destroy() coroutine.wrap(function() wait(t) limbclone.Parent = ragdoll.Torso limbclone.Part0 = ragdoll.Torso limbclone.Part1 = ragdoll["Right Arm"] end)() end wait(t) glue:destroy() limbcollider:destroy() limbcolliderweld:destroy() end)() end if ragdoll:findFirstChild("Left Arm") then local glue = Instance.new("Glue", ragdoll.Torso) glue.Part0 = ragdoll.Torso glue.Part1 = ragdoll:findFirstChild("Left Arm") glue.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) glue.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Left Arm")) limbcollider.Size = Vector3.new(1.4,1,1) limbcollider.Shape = "Cylinder" limbcollider.Name = "LimbCollider" limbcollider.Transparency = 1 local limbcolliderweld = Instance.new("Weld", limbcollider) limbcolliderweld.Part0 = ragdoll:findFirstChild("Left Arm") limbcolliderweld.Part1 = limbcollider limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0) coroutine.wrap(function() if ragdoll.Torso:findFirstChild("Left Shoulder") then local limbclone = ragdoll.Torso:findFirstChild("Left Shoulder"):Clone() ragdoll.Torso:findFirstChild("Left Shoulder"):destroy() coroutine.wrap(function() wait(t) limbclone.Parent = ragdoll.Torso limbclone.Part0 = ragdoll.Torso limbclone.Part1 = ragdoll["Left Arm"] end)() end wait(t) glue:destroy() limbcollider:destroy() limbcolliderweld:destroy() end)() end if ragdoll:findFirstChild("Left Leg") then local glue = Instance.new("Glue", ragdoll.Torso) glue.Part0 = ragdoll.Torso glue.Part1 = ragdoll:findFirstChild("Left Leg") glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Left Leg")) limbcollider.Size = Vector3.new(1.5,1,1) limbcollider.Shape = "Cylinder" limbcollider.Name = "LimbCollider" limbcollider.Transparency = 1 local limbcolliderweld = Instance.new("Weld", limbcollider) limbcolliderweld.Part0 = ragdoll:findFirstChild("Left Leg") limbcolliderweld.Part1 = limbcollider limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.2,0,0) coroutine.wrap(function() if ragdoll.Torso:findFirstChild("Left Hip") then local limbclone = ragdoll.Torso:findFirstChild("Left Hip"):Clone() ragdoll.Torso:findFirstChild("Left Hip"):destroy() coroutine.wrap(function() wait(t) limbclone.Parent = ragdoll.Torso limbclone.Part0 = ragdoll.Torso limbclone.Part1 = ragdoll["Left Leg"] end)() end wait(t) glue:destroy() limbcollider:destroy() limbcolliderweld:destroy() end)() end if ragdoll:findFirstChild("Right Leg") then local glue = Instance.new("Glue", ragdoll.Torso) glue.Part0 = ragdoll.Torso glue.Part1 = ragdoll:findFirstChild("Right Leg") glue.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) glue.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) local limbcollider = Instance.new("Part", ragdoll:findFirstChild("Right Leg")) limbcollider.Size = Vector3.new(1.5,1,1) limbcollider.Shape = "Cylinder" limbcollider.Name = "LimbCollider" limbcollider.Transparency = 1 local limbcolliderweld = Instance.new("Weld", limbcollider) limbcolliderweld.Part0 = ragdoll:findFirstChild("Right Leg") limbcolliderweld.Part1 = limbcollider limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.2,0,0) coroutine.wrap(function() if ragdoll.Torso:findFirstChild("Right Hip") then local limbclone = ragdoll.Torso:findFirstChild("Right Hip"):Clone() ragdoll.Torso:findFirstChild("Right Hip"):destroy() coroutine.wrap(function() wait(t) limbclone.Parent = ragdoll.Torso limbclone.Part0 = ragdoll.Torso limbclone.Part1 = ragdoll["Right Leg"] end)() end wait(t) glue:destroy() limbcollider:destroy() limbcolliderweld:destroy() end)() end end)() end end end end end end tool.Deactivated:connect(function() if mouseclick and not cananimate then if count < 30 then cananimate = true canattack = true return end local rightarmweld = character.Torso:findFirstChild("RightArmWeldbat") local leftarmweld = character.Torso:findFirstChild("LeftArmWeldbat") local headweld = character.Torso:findFirstChild("HeadWeldbat") local rootweld = character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeldbat") if attacknumber == 1 then trail.Enabled = true swishsound.PlaybackSpeed = 1+(math.random(-4,4)/20) swishsound:Play() for i = 0,1 , 0.1 * AnimationSpeed do if attacktype == 0 then damage("normal", 10,20, 2) elseif attacktype == 1 then damage("critical", 20,30, 2.5) elseif attacktype == 2 then damage("vibe check", 30,40, 1) end tool.Grip = tool.Grip:lerp(CFrame.new(0, 0, -1.70000005, 0, 0, 1, 1, 0, 0, 0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.pi/2,-(math.pi/3),0),0.1 * AnimationSpeed) headweld.C0 = headweld.C0:lerp(CFrame.new(9.53674316e-07, 1.49999952, 9.53674316e-07, 0.499999791, -1.49011612e-08, -0.866025269, -3.14321369e-09, 0.999999881, -1.49011612e-08, 0.866025388, -7.4505806e-09, 0.499999821),i) rightarmweld.C0 = rightarmweld.C0:lerp(CFrame.new(0.27244854, 0.123777866, -0.741029739, 0.642787457, 0.719846129, 0.262002736, 1.49011612e-08, 0.342020303, -0.939692438, -0.766044378, 0.604022741, 0.219846398),i) leftarmweld.C0 = leftarmweld.C0:lerp(CFrame.new(-0.993065834, 0.0928759575, -0.543260574, 0.981225848, -0.183488816, 0.0593911558, 0.116977744, 0.321393728, -0.939692438, 0.153335154, 0.928998232, 0.336824),i) rootweld.C0 = rootweld.C0:lerp(CFrame.new(0, 0, 0, 0.492403746, 0.0868240669, 0.866025448, -0.173648179, 0.98480773, 0, -0.852868557, -0.150383741, 0.499999881),i) runservice.Stepped:wait() end trail.Enabled = false attacknumber = 2 elseif attacknumber == 2 then trail.Enabled = true swishsound.PlaybackSpeed = 1+(math.random(-4,4)/20) swishsound:Play() for i = 0,1 , 0.1 * AnimationSpeed do if attacktype == 0 then damage("normal", 10,20, 2) elseif attacktype == 1 then damage("critical", 20,30, 2.5) elseif attacktype == 2 then damage("vibe check", 30,40, 1) end tool.Grip = tool.Grip:lerp(CFrame.new(0, 0, -1.70000005, 0, 0, 1, 1, 0, 0, 0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.pi/2,(math.pi/2),0),0.1 * AnimationSpeed) headweld.C0 = headweld.C0:lerp(CFrame.new(0, 1.5, 1.90734863e-06, 0.642787576, 7.4505806e-09, 0.766044378, -1.0477379e-09, 0.99999994, 1.49011612e-08, -0.766044378, 0, 0.642787576),i) rightarmweld.C0 = rightarmweld.C0:lerp(CFrame.new(1.50000191, 0.328989983, -0.469844818, 0.99999994, 2.98023224e-08, -2.98023224e-08, 7.4505806e-09, 0.342020035, -0.939692438, 0, 0.939692378, 0.342020065),i) leftarmweld.C0 = leftarmweld.C0:lerp(CFrame.new(0.314659119, 0.191040754, -1.2273407, 0.344304681, -0.926735461, -0.150383726, 0.0301536545, 0.171010002, -0.984807611, 0.938373566, 0.334539324, 0.0868240297),i) rootweld.C0 = rootweld.C0:lerp(CFrame.new(0, 0, 0, 0.633022368, -0.111618921, -0.766044259, 0.173648179, 0.98480773, 0, 0.754406333, -0.133022189, 0.642787755) * CFrame.fromEulerAnglesXYZ(0,math.rad(20),0),i) runservice.Stepped:wait() end trail.Enabled = false attacknumber = 1 end cananimate = true canattack = true end end) tool.Activated:connect(function() if owner ~= nil and character ~= nil and canattack then cananimate = false canattack = false attacktype = 0 count = 0 local rightarmweld = character.Torso:findFirstChild("RightArmWeldbat") local leftarmweld = character.Torso:findFirstChild("LeftArmWeldbat") local headweld = character.Torso:findFirstChild("HeadWeldbat") local rootweld = character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeldbat") if handle:findFirstChild("AIDS") then handle.AIDS:destroy() local grip = character["Right Arm"]:WaitForChild("RightGrip") grip.Part1 = handle end for i,v in pairs(workspace:GetDescendants()) do if v.ClassName == "Model" and v ~= character then local humanoid = v:findFirstChildOfClass("Humanoid") local headepic = v:findFirstChild("Head") if humanoid and headepic then if (headepic.Position - character.HumanoidRootPart.Position).magnitude < 6 and humanoid.PlatformStand and humanoid.Health > 0 then local rightlegweld = Instance.new("Weld", character.Torso) rightlegweld.Part0 = character.Torso rightlegweld.Part1 = character["Right Leg"] rightlegweld.C0 = CFrame.new(0.5,-2,0) rightlegweld.Name = "RightLegWeldbat" local leftlegweld = Instance.new("Weld", character.Torso) leftlegweld.Part0 = character.Torso leftlegweld.Part1 = character["Left Leg"] leftlegweld.C0 = CFrame.new(-0.5,-2,0) leftlegweld.Name = "LeftLegWeldbat" character:findFirstChildOfClass("Humanoid").WalkSpeed = 0 for i = 0,1 , 0.05 * AnimationSpeed do cananimate = false canattack = false character.HumanoidRootPart.CFrame = CFrame.new(character.HumanoidRootPart.Position, Vector3.new(headepic.Position.x,character.HumanoidRootPart.Position.y,headepic.Position.z)) tool.Grip = tool.Grip:lerp(CFrame.new(0, 0, -1.70000005, 0, 0, 1, 1, 0, 0, 0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.pi/2,(math.pi/2)+math.rad(25),0),i) rightlegweld.C0 = rightlegweld.C0:lerp(CFrame.new(0.681245327, -2.07163143, 0, 0.98480773, -0.173648179, -2.98023224e-08, 0.173648164, 0.984807611, 7.4505806e-09, -2.98023224e-08, 1.14149561e-08, 1),i) leftlegweld.C0 = leftlegweld.C0:lerp(CFrame.new(-0.499999046, -1.39999986, -0.399999619, 0.99999994, -7.4505806e-09, -2.98023224e-08, 1.49011612e-08, 0.999999881, 7.4505806e-09, -2.98023224e-08, 0, 1),i) rightarmweld.C0 = rightarmweld.C0:lerp(CFrame.new(1.57790804, 0.75, 0.321748734, 0.342020154, -0.813797712, 0.469846278, -1.49011612e-08, -0.49999994, -0.866025209, 0.939692616, 0.29619813, -0.171010107),i) leftarmweld.C0 = leftarmweld.C0:lerp(CFrame.new(1.41171503, 0.67853117, -0.785638809, -0.468489617, -0.76629442, 0.439670324, -0.134425014, -0.430039823, -0.892745972, 0.873182297, -0.47734493, 0.0984600335),i) rootweld.C0 = rootweld.C0:lerp(CFrame.new(0, 0, 0, 0.633021891, 0.111618839, -0.766044736, -0.173648179, 0.98480773, 0, 0.75440675, 0.133022279, 0.642787278),i) headweld.C0 = headweld.C0:lerp(CFrame.new(-0.131000042, 1.46984625, -0.109922409, 0.642787337, -0.262002826, 0.719846427, -6.98491931e-10, 0.939692497, 0.342020392, -0.766044617, -0.219846383, 0.604022503),i) runservice.Stepped:wait() end trail.Enabled = true for i = 0,1 , 0.12 * AnimationSpeed do damage("vibe check", 0, 0, 1) tool.Grip = tool.Grip:lerp(CFrame.new(0, 0, -1.70000005, 0, 0, 1, 1, 0, 0, 0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.pi/2,0,0),i) rightlegweld.C0 = rightlegweld.C0:lerp(CFrame.new(0.499998093, -1.49999964, 0.866025925, 0.99999994, -2.98023224e-08, -3.7252903e-09, -7.4505806e-09, 0.499999911, 0.866025269, 0, -0.866025448, 0.49999994),i) leftlegweld.C0 = leftlegweld.C0:lerp(CFrame.new(-0.500001907, -0.739692211, -0.657979965, 0.99999994, 0, 2.98023224e-08, -7.4505806e-09, 0.939692378, 0.342020035, 0, -0.342020184, 0.939692616),i) rightarmweld.C0 = rightarmweld.C0:lerp(CFrame.new(0.569936752, 0.318357229, -1.03014803, 0.939692497, 0.342020154, 1.49011612e-08, -0.0593912005, 0.163175836, -0.984807611, -0.336824059, 0.92541647, 0.173648238),i) leftarmweld.C0 = leftarmweld.C0:lerp(CFrame.new(-0.429023743, 0.324180841, -0.997120857, 0.98480767, -0.173648149, 1.49011612e-08, 0.0301536694, 0.171010017, -0.984807611, 0.171010062, 0.969846368, 0.173648238),i) rootweld.C0 = rootweld.C0:lerp(CFrame.new(0, -1.19999969, 0, 0.950535476, -0.055632934, 0.305593252, -0.0479752049, 0.945729434, 0.321393996, -0.30688861, -0.320157319, 0.896280468),i) headweld.C0 = headweld.C0:lerp(CFrame.new(-1.90734863e-06, 1.5, 0, 0.98480773, -7.4505806e-09, -0.173648179, -1.49011612e-08, 0.999999881, 0, 0.173648253, -2.98023224e-08, 0.98480773),i) runservice.Stepped:wait() end coroutine.wrap(function() for i = 0,1 , 0.07 * AnimationSpeed do leftlegweld.C0 = leftlegweld.C0:lerp(CFrame.new(-0.5,-2,0),i) rightlegweld.C0 = rightlegweld.C0:lerp(CFrame.new(0.5,-2,0),i) runservice.Stepped:wait() end leftlegweld:destroy() rightlegweld:destroy() character:findFirstChildOfClass("Humanoid").WalkSpeed = 16 end)() trail.Enabled = false cananimate = true canattack = true return end end end end if attacknumber == 1 then coroutine.wrap(function() while runservice.Stepped:wait() and mouseclick do count = count + 1 if count == 50 then attacktype = 1 local effect = Instance.new("Part", workspace) effect.Material = "ForceField" effect.BrickColor = BrickColor.new("Institutional white") effect.Anchored = true effect.CanCollide = false effect.CFrame = handle.CFrame effect.Size = handle.Size coroutine.wrap(function() for i = 1, math.floor(40 / AnimationSpeed) do effect.Transparency = effect.Transparency + 0.025 effect.Size = effect.Size + Vector3.new(0.02,0.02,0.02) runservice.Stepped:wait() end effect:destroy() end)() end if count == 90 then attacktype = 2 local effect = Instance.new("Part", workspace) effect.Material = "ForceField" effect.BrickColor = BrickColor.new("Really red") effect.Anchored = true effect.CanCollide = false effect.CFrame = handle.CFrame effect.Size = handle.Size coroutine.wrap(function() for i = 1, math.floor(40 / AnimationSpeed) do effect.Transparency = effect.Transparency + 0.025 effect.Size = effect.Size + Vector3.new(0.02,0.02,0.02) runservice.Stepped:wait() end effect:destroy() end)() end tool.Grip = tool.Grip:lerp(CFrame.new(0, 0, -1.70000005, 0, 0, 1, 1, 0, 0, 0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.pi/2,(math.pi/2)+math.rad(25),0),0.1 * AnimationSpeed) headweld.C0 = headweld.C0:lerp(CFrame.new(-0.0815873146, 1.49240327, -0.0296955109, 0.342020094, -0.163175672, 0.925416231, 1.00699253e-08, 0.984807491, 0.173647955, -0.939692616, -0.0593911149, 0.336824059),0.1 * AnimationSpeed) rootweld.C0 = rootweld.C0:lerp(CFrame.new(0, 0, 0, 0.336824089, 0.0593911782, -0.939692616, -0.173648149, 0.984807611, 0, 0.92541641, 0.163175896, 0.342020154) * CFrame.fromEulerAnglesXYZ(math.sin(tick())/20,0,0),0.1 * AnimationSpeed) leftarmweld.C0 = leftarmweld.C0:lerp(CFrame.new(1.3505621, 0.950000048, -0.634313583, -0.342020035, -0.813797235, 0.469846278, -4.87780198e-08, -0.49999997, -0.866025031, 0.939692616, -0.29619804, 0.171010047) * CFrame.new(0,math.cos(tick())/20,0),0.1 * AnimationSpeed) rightarmweld.C0 = rightarmweld.C0:lerp(CFrame.new(1.58705735, 0.872320414, 0.129386902, 0.607604206, -0.566511154, 0.556670189, 0.111618847, -0.633021832, -0.766044259, 0.786357343, 0.527587116, -0.321393698) * CFrame.new(0,math.cos(tick())/20,0),0.1 * AnimationSpeed) end end)() elseif attacknumber == 2 then coroutine.wrap(function() while runservice.Stepped:wait() and mouseclick do count = count + 1 if count == 50 then attacktype = 1 local effect = Instance.new("Part", workspace) effect.Material = "ForceField" effect.BrickColor = BrickColor.new("Institutional white") effect.Anchored = true effect.CanCollide = false effect.CFrame = handle.CFrame effect.Size = handle.Size coroutine.wrap(function() for i = 1, math.floor(40 / AnimationSpeed) do effect.Transparency = effect.Transparency + 0.025 effect.Size = effect.Size + Vector3.new(0.02,0.02,0.02) runservice.Stepped:wait() end effect:destroy() end)() end if count == 90 then attacktype = 2 local effect = Instance.new("Part", workspace) effect.Material = "ForceField" effect.BrickColor = BrickColor.new("Really red") effect.Anchored = true effect.CanCollide = false effect.CFrame = handle.CFrame effect.Size = handle.Size coroutine.wrap(function() for i = 1, math.floor(40 / AnimationSpeed) do effect.Transparency = effect.Transparency + 0.025 effect.Size = effect.Size + Vector3.new(0.02,0.02,0.02) runservice.Stepped:wait() end effect:destroy() end)() end tool.Grip = tool.Grip:lerp(CFrame.new(0, 0, -1.70000005, 0, 0, 1, 1, 0, 0, 0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.pi/2,(-math.pi/2)+math.rad(25),0),0.1 * AnimationSpeed) headweld.C0 = headweld.C0:lerp(CFrame.new(0, 1.5, 0, 0.342020035, 0, -0.939692378, -1.64301071e-07, 1, -5.98006906e-08, 0.939692378, 1.74845525e-07, 0.342020035),0.1 * AnimationSpeed) rootweld.C0 = rootweld.C0:lerp(CFrame.new(0, 0, 0, 0.173648119, 0, 0.98480767, 0, 1, 0, -0.98480767, 0, 0.173648119) * CFrame.fromEulerAnglesXYZ(math.sin(tick())/20,0,0.1 * AnimationSpeed),0.1) leftarmweld.C0 = leftarmweld.C0:lerp(CFrame.new(-1.69218636, 0.638716698, -0.0404472351, 0.771280289, 0.613091826, -0.171010137, 0.0593912005, -0.336824268, -0.939692497, -0.633718252, 0.714609921, -0.296198249) * CFrame.new(0,math.cos(tick())/20,0),0.1 * AnimationSpeed) rightarmweld.C0 = rightarmweld.C0:lerp(CFrame.new(-1.2802496, 0.725742579, -0.5, -4.47034836e-08, 0.984807432, -0.173648149, 4.37113847e-08, -0.173648149, -0.984807551, -0.999999762, -2.98023224e-08, -3.35276127e-08) * CFrame.new(0,math.cos(tick())/20,0),0.1 * AnimationSpeed) end end)() end end end) -- tool.Equipped:connect(function() equipped = true trail.Enabled = false cananimate = true canattack = false handle.Transparency = 1 owner = game:GetService("Players"):GetPlayerFromCharacter(tool.Parent) character = owner.Character local rightarm = Instance.new("Weld", character.Torso) rightarm.Part0 = character.Torso rightarm.Part1 = character["Right Arm"] rightarm.C0 = CFrame.new(1.5,0,0) rightarm.Name = "RightArmWeldbat" local leftarm = Instance.new("Weld", character.Torso) leftarm.Part0 = character.Torso leftarm.Part1 = character["Left Arm"] leftarm.C0 = CFrame.new(-1.5,0,0) leftarm.Name = "LeftArmWeldbat" local head = Instance.new("Weld", character.Torso) head.Part0 = character.Torso head.Part1 = character.Head head.C0 = CFrame.new(0,1.5,0) head.Name = "HeadWeldbat" local humanoidrootpart = Instance.new("Weld", character.HumanoidRootPart) humanoidrootpart.Part0 = character.HumanoidRootPart humanoidrootpart.Part1 = character.Torso humanoidrootpart.Name = "HumanoidRootPartWeldbat" for i = 0,1 , 0.05 * AnimationSpeed do humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.fromEulerAnglesXYZ(0,math.rad(25),0),i) leftarm.C0 = leftarm.C0:lerp(CFrame.new(-1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(math.pi+math.rad(10),math.rad(75),math.rad(-10)) * CFrame.new(0,-0.5,0),i) rightarm.C0 = rightarm.C0:lerp(CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(10)) * CFrame.new(0,-0.5,0),i) runservice.Stepped:wait() end local grip = character["Right Arm"]:WaitForChild("RightGrip") grip.Part1 = nil local weldd = Instance.new("Weld", handle) weldd.Part0 = character["Left Arm"] weldd.Part1 = handle weldd.Name = "AIDS" weldd.C0 = CFrame.new(0, 0, -1.70000005, 0, 0, 1, 1, 0, 0, 0, 1, 0) * CFrame.fromEulerAnglesXYZ((math.pi/2),math.rad(15),0) * CFrame.new(-0.7,0,-0.1) cananimate = true if character:findFirstChild("BatBack") then character:findFirstChild("BatBack").Transparency = 1 end handle.Transparency = 0 equipsound:Play() local WHEN = 0 coroutine.wrap(function() while runservice.Stepped:wait() and equipped do if cananimate then if WHEN < 40 then WHEN = WHEN + 1 elseif WHEN == 40 then WHEN = 41 grip.Part1 = handle canattack = true weldd:destroy() end tool.Grip = tool.Grip:lerp(CFrame.new(0, 0, -1.70000005, 0, 0, 1, 1, 0, 0, 0, 1, 0),0.1 * AnimationSpeed) head.C0 = head.C0:lerp(CFrame.new(0,1.5,0),0.1 * AnimationSpeed) humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(),0.1 * AnimationSpeed) leftarm.C0 = leftarm.C0:lerp(CFrame.new(-1.4,0.5,0) * CFrame.fromEulerAnglesXYZ((math.pi/2)-math.rad(50)+math.sin(tick())/15,0,math.rad(50)) * CFrame.new(0,-0.8,0),0.1 * AnimationSpeed) rightarm.C0 = rightarm.C0:lerp(CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ((math.pi/2)-math.rad(35)+math.sin(tick())/15,math.rad(20),math.rad(-40)) * CFrame.new(0,-0.8,0),0.1 * AnimationSpeed) end end end)() end) tool.Unequipped:connect(function() equipped = false mouseclick = false cananimate = false if character.Torso:findFirstChild("LeftArmWeldbat") then character.Torso:findFirstChild("LeftArmWeldbat"):destroy() end if character.Torso:findFirstChild("RightArmWeldbat") then character.Torso:findFirstChild("RightArmWeldbat"):destroy() end if character.Torso:findFirstChild("HeadWeldbat") then character.Torso:findFirstChild("HeadWeldbat"):destroy() end if character:findFirstChild("HumanoidRootPart") then if character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeldbat") then character.HumanoidRootPart:findFirstChild("HumanoidRootPartWeldbat"):destroy() end end if not character:findFirstChild("BatBack") then local clone = handle:Clone() clone:BreakJoints() for i,v in pairs(clone:GetDescendants()) do if v.ClassName ~= "SpecialMesh" and v.ClassName ~= "TouchTransmitter" then v:destroy() end end local weld = Instance.new("Weld", clone) weld.Part0 = character.Torso weld.Part1 = clone weld.C0 = CFrame.new(0,0,0.55) weld.C0 = weld.C0 * CFrame.fromEulerAnglesXYZ(0,math.pi/2,math.pi/2) weld.C0 = weld.C0 * CFrame.fromEulerAnglesXYZ(math.pi,math.rad(60)+math.pi,0) clone.Parent = character clone.Name = "BatBack" else character:findFirstChild("BatBack").Transparency = 0 end handle.Transparency = 1 character.BatBack:findFirstChildOfClass("SpecialMesh").TextureId = handle:findFirstChildOfClass("SpecialMesh").TextureId end) end local PIPE_GRIP = CFrame.new(-1.33580685, -1.09495306, -0.391068697, 0.96628654, 0.230114311, -0.115489528, 0.127946258, -0.0399156809, 0.990977526, 0.223428279, -0.972344756, -0.0680122375) local PIPE_GRIP_SWING = CFrame.new(-0.0920391083, -1.25493407, -1.08148742, 0.0278200079, 0.997889102, 0.0586810894, 0.0716719925, -0.0605439581, 0.995588958, 0.997040212, -0.0234915055, -0.0732050538) local function buildPipe() local tool = Instance.new("Tool") tool.Name = "Lead Pipe" tool.CanBeDropped = true tool.RequiresHandle = true local handle = Instance.new("Part") handle.Name = "Handle" handle.Size = Vector3.new(3.909090, 0.727272, 0.727272) handle.Shape = Enum.PartType.Cylinder handle.Material = Enum.Material.Metal handle.Color = Color3.fromRGB(159, 161, 172) handle.CanCollide = false handle.Parent = tool makeSound(handle, "MetalHit", "rbxassetid://933780081", 1) makeSound(handle, "Swoosh", "rbxassetid://1489705211", 0.7) makeSound(handle, "Hit", "rbxassetid://743886825", 1) makeSound(handle, "MetalHit2", "rbxassetid://546410481", 1) makeSound(handle, "unequip", "rbxassetid://769464514", 1) makeSound(handle, "Swoosh2", "rbxassetid://181894961", 0.7) return tool end local function runPipeBehavior(tool) local handle = tool:WaitForChild("Handle") local swooshsound = handle.Swoosh local swooshsound2 = handle.Swoosh2 local metalhit = handle.MetalHit local metalhit2 = handle.MetalHit2 local hitsound = handle.Hit local equipsound = handle.unequip local canattack = true local cananimate = true local attacknumber = 0 local owner = nil local welds = {} local function applyPipeHit() for _, v in pairs(workspace:GetChildren()) do if v:IsA("Model") and v ~= owner then local headdd = v:FindFirstChild("Head") local humanoiddd = v:FindFirstChildOfClass("Humanoid") if humanoiddd and headdd and humanoiddd.Health > 0 then if (headdd.Position - handle.Position).Magnitude <= 4 then local dmg = math.random(20, 25) if humanoiddd.Health <= dmg then ragdollkill(v) if deadlyMode then humanoiddd.Health = 0 else humanoiddd.Health = humanoiddd.MaxHealth end else humanoiddd.Health = humanoiddd.Health - dmg end hitsound.PlaybackSpeed = 1 + math.random(-2, 2) / 10 hitsound:Play() metalhit2.PlaybackSpeed = 1 + math.random(-2, 2) / 10 metalhit2:Play() metalhit.PlaybackSpeed = 1 + math.random(-2, 2) / 10 metalhit.TimePosition = 1 metalhit:Play() local velocity = Instance.new("BodyVelocity") velocity.MaxForce = Vector3.new(math.huge, 0, math.huge) velocity.Velocity = owner.HumanoidRootPart.CFrame.lookVector * 10 velocity.Parent = headdd game.Debris:AddItem(velocity, 0.3) end end end end end local function lerpWelds(i, rootCF, rightCF, leftCF, headCF) if welds.grip and welds.grip.Part1 == handle then welds.grip.C0 = welds.grip.C0:lerp(PIPE_GRIP_SWING, i) end if welds.root then welds.root.C0 = welds.root.C0:lerp(rootCF, i) end if welds.right then welds.right.C0 = welds.right.C0:lerp(rightCF, i) end if welds.left then welds.left.C0 = welds.left.C0:lerp(leftCF, i) end if welds.head then welds.head.C0 = welds.head.C0:lerp(headCF, i) end end local LEFT_ARM_HIT = CFrame.new(0.5, 0.5, 0) * CFrame.new(-1.96153116, 0.131953716, 0, 0.766044378, 0.642787516, -2.98023224e-08, -0.642787516, 0.766044378, 0, -2.98023224e-08, 1.49011612e-08, 0.99999994) tool.Equipped:Connect(function() owner = tool.Parent if not owner or not owner:FindFirstChild("Torso") then return end equipsound:Play() local torso = owner.Torso local leftarm = Instance.new("Weld") leftarm.Part0 = torso leftarm.Part1 = owner["Left Arm"] leftarm.C0 = CFrame.new(-1.5, 0.5, 0) leftarm.C1 = CFrame.new(0, 0.5, 0) leftarm.Name = "LeftArmWelde" leftarm.Parent = torso local rightarm = Instance.new("Weld") rightarm.Part0 = torso rightarm.Part1 = owner["Right Arm"] rightarm.C0 = CFrame.new(1.5, 0.5, 0) rightarm.C1 = CFrame.new(0, 0.5, 0) rightarm.Name = "RightArmWelde" rightarm.Parent = torso local head = Instance.new("Weld") head.Part0 = torso head.Part1 = owner.Head head.C0 = CFrame.new(0, 1, 0) head.C1 = CFrame.new(0, -0.5, 0) head.Name = "HeadWelde" head.Parent = torso local humanoidrootpart = Instance.new("Weld") humanoidrootpart.Part0 = owner.HumanoidRootPart humanoidrootpart.Part1 = torso humanoidrootpart.Name = "HumanoidRootPartWelde" humanoidrootpart.Parent = owner.HumanoidRootPart welds = {left = leftarm, right = rightarm, head = head, root = humanoidrootpart, grip = nil} task.spawn(function() local grip = owner["Right Arm"]:WaitForChild("RightGrip", 5) if grip then grip.C0 = PIPE_GRIP welds.grip = grip end end) local sine = 0 task.spawn(function() while tool.Parent == owner and owner.Parent do sine = sine + 1 if cananimate then if welds.grip and welds.grip.Part1 == handle then welds.grip.C0 = welds.grip.C0:lerp(PIPE_GRIP, 0.2) end humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0, 0, 0), 0.2) rightarm.C0 = rightarm.C0:lerp(CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(math.rad(45 + (3 * math.sin(sine / 60))), math.rad(-2.5) + math.sin(sine / 60) / 15, math.rad(-10) + math.rad(math.sin(sine / 60))), 0.2) leftarm.C0 = leftarm.C0:lerp(CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(math.rad(55 + (3 * math.sin(sine / 60))), 0, math.rad(10) + math.rad(-math.sin(sine / 60))), 0.2) head.C0 = head.C0:lerp(CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(math.rad(math.sin(sine / 60)), 0, 0), 0.2) end task.wait() end end) end) tool.Unequipped:Connect(function() if not owner then return end for key, w in pairs(welds) do if key ~= "grip" and w and w.Parent then w:Destroy() end end welds = {} end) tool.Activated:Connect(function() if not canattack or not owner or not owner.Parent then return end if not welds.root then return end canattack = false cananimate = false local swingrand = math.random(-50, 50) if attacknumber == 0 then attacknumber = 1 for i = 0, 1, 0.14 do lerpWelds(i, CFrame.new(0, 0, 0, 0.33682403, 0.0593911596, -0.939692616, -0.173648149, 0.98480773, 0, 0.925416529, 0.163175896, 0.342020094), CFrame.new(0, -0.1, 0) * CFrame.new(1.43301249, 0.884340763, -0.405934334, 0.866025448, 7.4505806e-09, -0.499999762, -0.171009988, -0.939692438, -0.296198189, -0.469846129, 0.342020154, -0.813797832) * CFrame.fromEulerAnglesXYZ(0, math.rad(swingrand), 0), LEFT_ARM_HIT, CFrame.new(0, -0.5, 0) * CFrame.new(-0.0815877914, 1.49240351, -0.0296964645, 0.342020094, -0.163175687, 0.92541647, -1.45519152e-09, 0.98480773, 0.17364797, -0.939692557, -0.0593911, 0.336824089)) task.wait() end swooshsound2.PlaybackSpeed = 1 + math.random(-2, 2) / 10 swooshsound2:Play() swooshsound.PlaybackSpeed = 1 + math.random(-2, 2) / 10 swooshsound:Play() for i = 0, 1, 0.1 do lerpWelds(i, CFrame.new(0, 0, 0, 0.645385742, -0.0593911596, 0.761544466, -0.0868240744, 0.98480767, 0.150383741, -0.758906364, -0.163175881, 0.630424261), CFrame.new(0, 0.4, 0.3) * CFrame.new(1.88293552, 0.2333498, -0.433140755, 0.859446883, -0.503111184, -0.0907213986, 0.308427513, 0.651808023, -0.692833483, 0.407705337, 0.567472816, 0.715367913) * CFrame.fromEulerAnglesXYZ(0, math.rad(swingrand), 0), LEFT_ARM_HIT, CFrame.new(0, -0.5, 0) * CFrame.new(-0.0406684875, 1.4979527, 0.0197181702, 0.649181902, -0.0813359022, -0.756272018, 0.0229108427, 0.995905817, -0.0874414966, 0.76028806, 0.0394386649, 0.648387671)) task.wait() end applyPipeHit() else attacknumber = 0 swingrand = math.random(-20, 20) for i = 0, 1, 0.14 do lerpWelds(i, CFrame.new(0, 0, 0, 0.342020303, 0.163175672, 0.925416589, 4.47034836e-08, 0.98480773, -0.17364797, -0.939692557, 0.0593911409, 0.336824268), CFrame.new(0, 0, 0.5) * CFrame.new(1.11058283, 0.534516811, -1.14242649, 0.133022264, 0.395739019, 0.908677936, 0.991084576, -0.0600325875, -0.118940994, 0.00748064928, 0.916398764, -0.400196671) * CFrame.fromEulerAnglesXYZ(0, math.rad(swingrand), 0), LEFT_ARM_HIT, CFrame.new(0, -0.5, 0) * CFrame.new(-2.38418579e-07, 1.49999952, 9.53674316e-07, 0.49999994, 2.60770321e-08, -0.866025388, -1.02445483e-08, 0.999999821, -3.35276127e-08, 0.866025567, -1.49011612e-08, 0.49999994)) task.wait() end swooshsound2.PlaybackSpeed = 1 + math.random(-2, 2) / 10 swooshsound2:Play() swooshsound.PlaybackSpeed = 1 + math.random(-2, 2) / 10 swooshsound:Play() local canhit = true for i = 0, 1, 0.1 do if i >= 0.5 and canhit then canhit = false applyPipeHit() end lerpWelds(i, CFrame.new(0, 0, 0, 0.356122136, 0.10289897, -0.928756654, 0.0610870048, 0.989228606, 0.133022025, 0.932440579, -0.104107097, 0.346000373), CFrame.new(0, 0.7, 0.3) * CFrame.new(1.94078016, 0.420045853, -0.739268303, 0.133022189, -0.718527198, 0.682659388, 0.991084456, 0.0912356675, -0.0970924273, 0.00748063065, 0.689488888, 0.724257588) * CFrame.fromEulerAnglesXYZ(0, math.rad(swingrand), 0), CFrame.new(0.7, 0, 0) * CFrame.new(-2.05798006, 0.156598568, 9.53674316e-07, 0.50000006, 0.866025329, -5.96046448e-08, -0.86602509, 0.499999821, -1.11758709e-08, -4.47034836e-08, -8.94069672e-08, 1), CFrame.new(0, -0.5, 0) * CFrame.new(0, 1.49999905, 0, 0.342020094, -6.70552254e-08, 0.939692616, -1.10594556e-08, 0.999999702, -6.70552254e-08, -0.939692676, -1.11758709e-08, 0.342019945)) task.wait() end end cananimate = true canattack = true end) end local function runCombatBehavior(tool) local handle = tool:WaitForChild("Handle") local punchsound = handle.Punch local kicksound = handle.Kick local swishsound = handle.Swoosh local goresound = handle.Ouch local basssound = handle.Bass local blocksound = handle.Block local runservice = game:GetService("RunService") local canattack = true local cananimate = false local equipped = false local mouseclick = false local attacknumber = 1 local owner = nil local character = nil local function combatDamage(what, action, t, range) for _, v in pairs(workspace:GetDescendants()) do if v:IsA("Model") and v ~= character then local head = v:FindFirstChild("Head") local humanoid = v:FindFirstChildOfClass("Humanoid") if humanoid and head and humanoid.Health > 0 and (head.Position - what.Position).Magnitude < range then local ragdolled = v:FindFirstChild("ragdolledpunch") if action ~= "stomp" and ragdolled then return end local marker = Instance.new("BoolValue") marker.Name = "ragdolledpunch" marker.Parent = v game.Debris:AddItem(marker, t) local rootPart = character and character:FindFirstChild("HumanoidRootPart") local victimRoot = v:FindFirstChild("HumanoidRootPart") or head if action == "punch" then if rootPart then victimRoot.AssemblyLinearVelocity = rootPart.CFrame.LookVector * math.random(5, 15) + Vector3.new(0, victimRoot.AssemblyLinearVelocity.Y, 0) end punchsound.PlaybackSpeed = 1 + (math.random(-5, 5) / 15) punchsound:Play() elseif action == "uppercut" then if rootPart then victimRoot.AssemblyLinearVelocity = rootPart.CFrame.LookVector * math.random(5, 15) + Vector3.new(0, math.random(10, 20), 0) end kicksound.PlaybackSpeed = 1 + (math.random(-5, 5) / 15) kicksound:Play() elseif action == "kick" then if rootPart then victimRoot.AssemblyLinearVelocity = rootPart.CFrame.LookVector * 20 + Vector3.new(0, victimRoot.AssemblyLinearVelocity.Y, 0) end goresound.PlaybackSpeed = 1 + (math.random(-5, 5) / 15) goresound:Play() elseif action == "stomp" then punchsound.PlaybackSpeed = 1 + (math.random(-5, 5) / 15) punchsound:Play() end if action ~= "blocked" then local dmg = math.random(30, 50) if action == "uppercut" then dmg = dmg + math.random(20, 30) elseif action == "kick" then dmg = dmg + math.random(40, 50) end if humanoid.Health <= dmg then ragdollkill(v) if deadlyMode then humanoid.Health = 0 else humanoid.Health = humanoid.MaxHealth end else humanoid.Health = humanoid.Health - dmg end end if action ~= "stomp" then if action ~= "blocked" and action ~= "uppercut" and action ~= "kick" then if math.random(1, 5) ~= 1 then return end end humanoid.PlatformStand = true task.delay(t, function() if humanoid and humanoid.Parent then humanoid.PlatformStand = false end end) end end end end end local function findDownedEnemy() local rootPart = character and character:FindFirstChild("HumanoidRootPart") if not rootPart then return nil end for _, v in pairs(workspace:GetDescendants()) do if v:IsA("Model") and v ~= character then local humanoid = v:FindFirstChildOfClass("Humanoid") local head = v:FindFirstChild("Head") if humanoid and head and humanoid.Health > 0 and humanoid.PlatformStand then if (head.Position - rootPart.Position).Magnitude < 5 then return v, head end end end end return nil end tool.Unequipped:Connect(function() equipped = false mouseclick = false cananimate = false if character then local torso = character:FindFirstChild("Torso") if torso then for _, weldName in pairs({"RightArmWeldpunch", "LeftArmWeldpunch", "HeadWeldpunch"}) do local w = torso:FindFirstChild(weldName) if w then w:Destroy() end end end local rootPart = character:FindFirstChild("HumanoidRootPart") if rootPart then local w = rootPart:FindFirstChild("HumanoidRootPartWeldpunch") if w then w:Destroy() end end end end) tool.Equipped:Connect(function() equipped = true canattack = false -- ФИКС: блокируем атаку во время экипировки owner = Players:GetPlayerFromCharacter(tool.Parent) if not owner then return end character = owner.Character if not character then return end local torso = character:FindFirstChild("Torso") local humanoid = character:FindFirstChildOfClass("Humanoid") local rootPart = character:FindFirstChild("HumanoidRootPart") if not torso or not humanoid or not rootPart then return end if not character:FindFirstChild("Right Arm") or not character:FindFirstChild("Left Arm") or not character:FindFirstChild("Head") then return end local rightarm = Instance.new("Weld") rightarm.Part0 = torso rightarm.Part1 = character["Right Arm"] rightarm.C0 = CFrame.new(1.5, 0, 0) rightarm.Name = "RightArmWeldpunch" rightarm.Parent = torso local leftarm = Instance.new("Weld") leftarm.Part0 = torso leftarm.Part1 = character["Left Arm"] leftarm.C0 = CFrame.new(-1.5, 0, 0) leftarm.Name = "LeftArmWeldpunch" leftarm.Parent = torso local headweld = Instance.new("Weld") headweld.Part0 = torso headweld.Part1 = character.Head headweld.C0 = CFrame.new(0, 1.5, 0) headweld.Name = "HeadWeldpunch" headweld.Parent = torso local rootweld = Instance.new("Weld") rootweld.Part0 = rootPart rootweld.Part1 = torso rootweld.Name = "HumanoidRootPartWeldpunch" rootweld.Parent = rootPart cananimate = true canattack = true -- ФИКС: разблокируем атаку после создания weld'ов task.spawn(function() local humhp = humanoid.Health while runservice.Stepped:Wait() and equipped do local h = character and character:FindFirstChildOfClass("Humanoid") if h then if h.Health < humhp then local thedamage = humhp - h.Health h.Health = h.Health + thedamage / 2.5 end if cananimate then headweld.C0 = headweld.C0:Lerp(CFrame.new(0, 1.5, 0), 0.1) rootweld.C0 = rootweld.C0:Lerp(CFrame.new(), 0.2) leftarm.C0 = leftarm.C0:Lerp(CFrame.new(-0.8, 0.15, -0.5) * CFrame.fromEulerAnglesXYZ(math.pi - math.rad(20), 0, math.rad(15)) * CFrame.new(0, -0.5, 0), 0.2) rightarm.C0 = rightarm.C0:Lerp(CFrame.new(0.8, 0.15, -0.5) * CFrame.fromEulerAnglesXYZ(math.pi - math.rad(20), 0, math.rad(-15)) * CFrame.new(0, -0.5, 0), 0.2) end humhp = h.Health end end end) end) tool.Activated:Connect(function() if not (owner and character and canattack) then return end mouseclick = true local humanoid = character:FindFirstChildOfClass("Humanoid") local torso = character:FindFirstChild("Torso") local rootPart = character:FindFirstChild("HumanoidRootPart") if not humanoid or not torso or not rootPart then return end if not character:FindFirstChild("Right Arm") or not character:FindFirstChild("Left Arm") or not character:FindFirstChild("Right Leg") or not character:FindFirstChild("Left Leg") then return end local rightarmweld = torso:FindFirstChild("RightArmWeldpunch") local leftarmweld = torso:FindFirstChild("LeftArmWeldpunch") local headweld = torso:FindFirstChild("HeadWeldpunch") local rootweld = rootPart:FindFirstChild("HumanoidRootPartWeldpunch") if not rightarmweld or not leftarmweld or not headweld or not rootweld then return end local downedModel, downedHead = findDownedEnemy() if downedModel and downedHead then canattack = false cananimate = false local rightlegweld = Instance.new("Weld") rightlegweld.Part0 = torso rightlegweld.Part1 = character["Right Leg"] rightlegweld.C0 = CFrame.new(0.5, -2, 0) rightlegweld.Name = "RightLegWeldcombat" rightlegweld.Parent = torso local leftlegweld = Instance.new("Weld") leftlegweld.Part0 = torso leftlegweld.Part1 = character["Left Leg"] leftlegweld.C0 = CFrame.new(-0.5, -2, 0) leftlegweld.Name = "LeftLegWeldcombat" leftlegweld.Parent = torso humanoid.WalkSpeed = 0 for i = 0, 1, 0.1 do rootPart.CFrame = CFrame.new(rootPart.Position, Vector3.new(downedHead.Position.X, rootPart.Position.Y, downedHead.Position.Z)) rightlegweld.C0 = rightlegweld.C0:Lerp(CFrame.new(0.5, -0.75804615, -1.03058243, 1, 0, 0, 0, 1, 5.96046448e-08, 0, -5.96046448e-08, 1), i) leftlegweld.C0 = leftlegweld.C0:Lerp(CFrame.new(-0.5, -1.93969202, 0.342020512, 1, 0, 0, 0, 0.939692557, 0.342020333, 0, -0.342020392, 0.939692557), i) rightarmweld.C0 = rightarmweld.C0:Lerp(CFrame.new(1.5, 0, 0), i) leftarmweld.C0 = leftarmweld.C0:Lerp(CFrame.new(-1.5, 0, 0), i) rootweld.C0 = rootweld.C0:Lerp(CFrame.new(0, 0, 0, 1, 0, 0, 0, 0.939692557, -0.342020363, 0, 0.342020363, 0.939692557), i) headweld.C0 = headweld.C0:Lerp(CFrame.new(0, 1.38302135, -0.32139349, 1, 0, 0, 0, 0.766044259, 0.642787755, 0, -0.642787755, 0.766044259), i) runservice.Stepped:Wait() end for i = 0, 1, 0.15 do rightlegweld.C0 = rightlegweld.C0:Lerp(CFrame.new(0.5, -1.93246841, -1.17564046, 1, 0, 0, 0, 0.939692557, -0.342019618, 0, 0.342019647, 0.939692676), i) leftlegweld.C0 = leftlegweld.C0:Lerp(CFrame.new(-0.5, -1.98480701, 0.173648238, 1, 0, 0, 0, 0.984807491, 0.173648387, 0, -0.173648402, 0.984807551), i) rightarmweld.C0 = rightarmweld.C0:Lerp(CFrame.new(1.64085674, 0.201163769, -2.38418579e-07, 0.939692616, -0.342020124, 0, 0.342020094, 0.939692497, 0, 0, 0, 0.99999994), i) leftarmweld.C0 = leftarmweld.C0:Lerp(CFrame.new(-1.64085674, 0.201163769, -2.38418579e-07, 0.939692616, 0.342020124, 0, -0.342020094, 0.939692497, 0, 0, 0, 0.99999994), i) rootweld.C0 = rootweld.C0:Lerp(CFrame.new(0, -0.0347294807, -0.396961689, 1, 0, 0, 0, 0.98480773, 0.173648179, 0, -0.173648179, 0.98480773), i) headweld.C0 = headweld.C0:Lerp(CFrame.new(0, 1.38302231, -0.321393967, 1, 0, 0, 0, 0.766044259, 0.642787695, 0, -0.642787695, 0.766044259), i) runservice.Stepped:Wait() end combatDamage(character["Right Leg"], "stomp", 1, 3.5) task.spawn(function() for i = 0, 1, 0.07 do leftlegweld.C0 = leftlegweld.C0:Lerp(CFrame.new(-0.5, -2, 0), i) rightlegweld.C0 = rightlegweld.C0:Lerp(CFrame.new(0.5, -2, 0), i) runservice.Stepped:Wait() end leftlegweld:Destroy() rightlegweld:Destroy() if character and character:FindFirstChildOfClass("Humanoid") then character:FindFirstChildOfClass("Humanoid").WalkSpeed = 16 end end) canattack = true cananimate = true return end canattack = false cananimate = false if attacknumber == 1 then local sine = 0 local tiltval = 0 for i = 1, 20 do sine = sine + 1 combatDamage(character["Right Arm"], "punch", 1, 2) headweld.C0 = headweld.C0:Lerp(CFrame.new(0, 1.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.sin(sine / 3.25), 0), 0.3) leftarmweld.C0 = leftarmweld.C0:Lerp(CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(math.pi / 2, 0, -math.sin(sine / 3.25) * 2) * CFrame.new(0, -0.5, 0), 0.3) rightarmweld.C0 = rightarmweld.C0:Lerp(CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(math.pi / 2, 0, (-math.sin(sine / 3.25) * 1.5) - math.rad(10) + math.cos(sine / 11.25)) * CFrame.new(0, -0.5, 0), 0.3) if i == 3 then swishsound.PlaybackSpeed = 1 + (math.random(-2, 5) / 12) swishsound:Play() end if i > 10 and i < 17 then tiltval = tiltval + 0.048 end if i > 10 then rightarmweld.C0 = rightarmweld.C0 * CFrame.new(-tiltval / 2, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, -tiltval) end rootweld.C0 = rootweld.C0:Lerp(CFrame.fromEulerAnglesXYZ(math.sin(sine / 3.25) / 8, -math.sin(sine / 3.25) * 2.3, 0), 0.3) runservice.Stepped:Wait() end attacknumber = 2 elseif attacknumber == 2 then local sine = 0 local tiltval = 0 for i = 1, 20 do sine = sine + 1 combatDamage(character["Left Arm"], "punch", 1, 2) headweld.C0 = headweld.C0:Lerp(CFrame.new(0, 1.5, 0) * CFrame.fromEulerAnglesXYZ(0, -math.sin(sine / 3.25), 0), 0.3) leftarmweld.C0 = leftarmweld.C0:Lerp(CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(math.pi / 2, 0, (math.sin(sine / 3.25) * 1.5) + math.rad(10) - math.cos(sine / 11.25)) * CFrame.new(0, -0.5, 0), 0.3) rightarmweld.C0 = rightarmweld.C0:Lerp(CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(math.pi / 2, 0, math.sin(sine / 3.25) * 2) * CFrame.new(0, -0.5, 0), 0.3) if i == 3 then swishsound.PlaybackSpeed = 1 + (math.random(-2, 5) / 12) swishsound:Play() end if i > 10 and i < 17 then tiltval = tiltval + 0.048 end if i > 10 then leftarmweld.C0 = leftarmweld.C0 * CFrame.new(tiltval / 2, 0, 0) * CFrame.fromEulerAnglesXYZ(0, 0, tiltval) end rootweld.C0 = rootweld.C0:Lerp(CFrame.fromEulerAnglesXYZ(math.sin(sine / 3.25) / 8, math.sin(sine / 3.25) * 2.3, 0), 0.3) runservice.Stepped:Wait() end attacknumber = 3 elseif attacknumber == 3 then for i = 0, 1, 0.06 do rightarmweld.C0 = rightarmweld.C0:Lerp(CFrame.new(1.52833557, 0.510312557, 0.469846129, 0.939692497, -0.116977774, -0.321393788, 0.342020124, 0.321393818, 0.88302213, 1.49011612e-08, -0.939692616, 0.342020124), i) leftarmweld.C0 = leftarmweld.C0:Lerp(CFrame.new(-1.64085674, 0.307911873, -0.228921652, 0.939692557, 0.342020094, 0, -0.219846308, 0.604022801, -0.766044378, -0.262002587, 0.719846249, 0.642787576), i) rootweld.C0 = rootweld.C0:Lerp(CFrame.new(0, 0, 0, 0.98480773, 0, -0.173648179, 0.0593911819, 0.939692616, 0.336824119, 0.163175911, -0.342020184, 0.925416529), i) headweld.C0 = headweld.C0:Lerp(CFrame.new(0, 1.49240446, 0.0868239403, 0.999999881, -1.86264515e-09, 0, 3.7252903e-09, 0.984807789, -0.17364797, 0, 0.17364794, 0.98480773), i) runservice.Stepped:Wait() end swishsound.PlaybackSpeed = 1 + (math.random(-2, 5) / 12) swishsound:Play() for i = 0.35, 0.65, 0.1 do rightarmweld.C0 = rightarmweld.C0:Lerp(CFrame.new(1.64085674, 0.201164246, 2.38418579e-07, 0.939692497, -0.342020154, 2.7474016e-08, 0.342020005, 0.939692378, -8.94069672e-08, -1.49011612e-08, 1.1920929e-07, 0.999999762) * CFrame.fromEulerAnglesXYZ(0.2, 0, 0), i) leftarmweld.C0 = leftarmweld.C0:Lerp(CFrame.new(-1.60084724, 0.132367611, 0.0618722439, 0.939692557, 0.262002587, 0.219846293, -0.219846219, 0.955111742, -0.198565692, -0.262002587, 0.138258308, 0.955111921), i) rootweld.C0 = rootweld.C0:Lerp(CFrame.new(0.0180921555, -0.590343475, 0.105676413, 0.999541819, -0.0301466491, -0.00267778337, 0.0292237774, 0.938346207, 0.344459206, -0.0078715831, -0.344379693, 0.938797355), i) headweld.C0 = headweld.C0:Lerp(CFrame.new(9.53674316e-07, 1.49240351, 0.0868239403, 0.999999881, 2.32830644e-09, 2.09547579e-08, -2.09547579e-09, 0.984807611, -0.173648, 2.14204192e-08, 0.173647881, 0.984807551), i) runservice.Stepped:Wait() end for i = 0, 1, 0.1 do combatDamage(character["Right Arm"], "uppercut", 1.5, 2) rightarmweld.C0 = rightarmweld.C0:Lerp(CFrame.new(1.50000012, 1.00000048, -9.53674316e-07, 0.999999881, -1.1920929e-07, 9.12696123e-08, 1.1920929e-07, -0.999999702, -8.80099833e-08, -5.21540642e-08, 6.0768798e-08, -0.999999523), i) leftarmweld.C0 = leftarmweld.C0:Lerp(CFrame.new(-1.68977165, 0.475360394, 0.153648376, 0.682796299, 0.696747243, 0.219846189, -0.667948365, 0.717228174, -0.198565692, -0.296030015, -0.0112660835, 0.955111802), i) rootweld.C0 = rootweld.C0:Lerp(CFrame.new(0, 0, 0, 0.00488264859, 0.0593911037, 0.998222649, -0.184096873, 0.981225967, -0.0574793406, -0.98289597, -0.183489174, 0.0157247484), i) headweld.C0 = headweld.C0:Lerp(CFrame.new(-0.0558092594, 1.49647284, 0.0200033188, 0.63302207, -0.11161878, -0.766044497, 0.0400089845, 0.992945373, -0.111618832, 0.773098826, 0.0400085226, 0.633021951), i) runservice.Stepped:Wait() end attacknumber = 4 elseif attacknumber == 4 then local rightlegweld = Instance.new("Weld") rightlegweld.Part0 = torso rightlegweld.Part1 = character["Right Leg"] rightlegweld.C0 = CFrame.new(0.5, -2, 0) rightlegweld.Name = "RightLegWeldcombat" rightlegweld.Parent = torso local leftlegweld = Instance.new("Weld") leftlegweld.Part0 = torso leftlegweld.Part1 = character["Left Leg"] leftlegweld.C0 = CFrame.new(-0.5, -2, 0) leftlegweld.Name = "LeftLegWeldcombat" leftlegweld.Parent = torso humanoid.WalkSpeed = humanoid.WalkSpeed - 10 for i = 0, 1, 0.06 do rightlegweld.C0 = rightlegweld.C0:Lerp(CFrame.new(0.500000954, -1.86602545, -0.499999046, 1, -1.49011665e-08, 2.98023224e-08, -2.98023224e-08, 0.866025329, -0.5, 2.98023224e-08, 0.5, 0.866025448), i) leftlegweld.C0 = leftlegweld.C0:Lerp(CFrame.new(-0.5, -0.999999523, 1, 1, -2.98023224e-08, -4.47034836e-08, -2.98023224e-08, -5.96046448e-08, 0.999999881, 2.98023224e-08, -1, -1.78813934e-07), i) rightarmweld.C0 = rightarmweld.C0:Lerp(CFrame.new(1.50000095, 0.250000477, 0.433013439, 1, -5.96046448e-08, -1.09083995e-08, -2.98023224e-08, 0.5, 0.866025388, 2.98023224e-08, -0.866025567, 0.49999997), i) leftarmweld.C0 = leftarmweld.C0:Lerp(CFrame.new(-1.49999905, 0.75, -0.433012009, 1, 5.96046448e-08, 3.99276701e-09, -4.47034836e-08, -0.50000006, -0.866025388, 2.98023224e-08, 0.866025507, -0.50000006), i) rootweld.C0 = rootweld.C0:Lerp(CFrame.new(0, 0, 0, 0.866025329, -0.250000119, 0.433012873, 0, 0.866025388, 0.5, -0.500000179, -0.433012664, 0.74999994), i) headweld.C0 = headweld.C0:Lerp(CFrame.new(-0.0434112549, 1.49240398, 0.0751919746, 0.866025329, -0.0868241489, -0.492404073, -4.47034836e-08, 0.98480767, -0.173648179, 0.500000179, 0.150383696, 0.852868497), i) runservice.Stepped:Wait() end swishsound.PlaybackSpeed = 1 + (math.random(-3, 5) / 12) swishsound:Play() for i = 0, 1, 0.15 do combatDamage(character["Left Leg"], "kick", 1.5, 3.5) rightlegweld.C0 = rightlegweld.C0:Lerp(CFrame.new(0.5, -1.93969274, 0.342020035, 1.00000024, -2.98023224e-08, 0, -1.49011612e-08, 0.939692557, 0.342019916, 0, -0.342019945, 0.939692676), i) leftlegweld.C0 = leftlegweld.C0:Lerp(CFrame.new(-0.500000477, -0.826352119, -0.984807968, 1.00000024, 2.98023224e-08, 1.49011612e-08, -1.49011612e-08, -0.173648193, -0.984807611, 0, 0.98480767, -0.173648223), i) rightarmweld.C0 = rightarmweld.C0:Lerp(CFrame.new(1.50000095, 0.116978168, 0.321393967, 1.00000024, -1.49011612e-08, 2.98023224e-08, 2.98023224e-08, 0.766044378, 0.642787695, 0, -0.642787814, 0.766044557), i) leftarmweld.C0 = leftarmweld.C0:Lerp(CFrame.new(-1.50000048, 0.116977692, 0.321393013, 1.00000024, -1.49011612e-08, 0, -1.49011612e-08, 0.766044438, 0.642787576, 0, -0.642787576, 0.766044497), i) rootweld.C0 = rootweld.C0:Lerp(CFrame.new(0, 0, 0, 0.766044676, -0.111618795, -0.63302207, -1.68030141e-07, 0.98480773, -0.173648238, 0.642787516, 0.133022398, 0.754406631), i) headweld.C0 = headweld.C0:Lerp(CFrame.new(-0.0525569916, 1.49498224, -0.0472278595, 0.663642108, -0.105113029, 0.74062866, -0.000909253955, 0.989964247, 0.141314477, -0.748049736, -0.0944556296, 0.656886339), i) runservice.Stepped:Wait() end task.spawn(function() for i = 0, 1, 0.07 do leftlegweld.C0 = leftlegweld.C0:Lerp(CFrame.new(-0.5, -2, 0), i) rightlegweld.C0 = rightlegweld.C0:Lerp(CFrame.new(0.5, -2, 0), i) runservice.Stepped:Wait() end leftlegweld:Destroy() rightlegweld:Destroy() local h = character and character:FindFirstChildOfClass("Humanoid") if h then h.WalkSpeed = h.WalkSpeed + 10 end end) attacknumber = 1 end if mouseclick then task.spawn(function() local humhp = humanoid.Health while runservice.Stepped:Wait() and mouseclick do cananimate = false local h = character and character:FindFirstChildOfClass("Humanoid") if not h then break end if h.Health < humhp then h.PlatformStand = false h.Health = h.Health + (humhp - h.Health) h.WalkSpeed = 16 basssound.TimePosition = 1.525 blocksound:Play() basssound:Play() task.spawn(function() local thehpp = h.Health for _ = 1, 20 do h.Health = thehpp runservice.Stepped:Wait() end end) local myHead = character:FindFirstChild("Head") local nearestdistance = math.huge local nearestplr = nil if myHead then for _, v in pairs(workspace:GetDescendants()) do if v:IsA("Model") and v ~= character then local headdw = v:FindFirstChild("Head") local humanoiddw = v:FindFirstChildOfClass("Humanoid") if humanoiddw and headdw then local dist = (headdw.Position - myHead.Position).Magnitude if dist < 10 and dist < nearestdistance then nearestdistance = dist nearestplr = v end end end end end if nearestplr then local nearHead = nearestplr:FindFirstChild("Head") if nearHead then local nearRoot = nearestplr:FindFirstChild("HumanoidRootPart") or nearHead nearRoot.AssemblyLinearVelocity = nearRoot.CFrame.LookVector * -math.random(15, 25) + Vector3.new(0, nearRoot.AssemblyLinearVelocity.Y, 0) combatDamage(nearHead, "blocked", 3, 0.5) end end local myRoot = character:FindFirstChild("HumanoidRootPart") if myRoot then myRoot.AssemblyLinearVelocity = myRoot.CFrame.LookVector * -math.random(10, 15) + Vector3.new(0, myRoot.AssemblyLinearVelocity.Y, 0) end break end rootweld.C0 = rootweld.C0:Lerp(CFrame.new(0, 0, 0, 0.999663353, 0.0246764347, 0.00799234211, -0.0226141848, 0.980059326, -0.19741419, -0.0127044618, 0.197166979, 0.980287552) * CFrame.fromEulerAnglesXYZ(math.sin(tick()) / 20, 0, 0), 0.3) leftarmweld.C0 = leftarmweld.C0:Lerp(CFrame.new(-0.0263385773, 0.920211315, -1.15523124, 0.76604414, -0.642787278, 7.17118382e-08, -0.604022741, -0.719846249, -0.342020154, 0.219846427, 0.262002707, -0.939692557) * CFrame.new(0, math.cos(tick()) / 20, 0), 0.3) headweld.C0 = headweld.C0:Lerp(CFrame.new(-9.53674316e-07, 1.49240446, -0.0868245959, 0.999999642, -1.33004505e-08, -1.58324838e-08, -1.51339918e-08, 0.98480773, 0.173648581, -1.3038516e-08, -0.1736487, 0.984807611) * CFrame.fromEulerAnglesXYZ(-math.sin(tick()) / 20, 0, 0), 0.3) rightarmweld.C0 = rightarmweld.C0:Lerp(CFrame.new(0.0363903046, 0.923784733, -1.1914165, 0.721851647, 0.684478879, -0.102069058, 0.613821924, -0.701371074, -0.362355202, -0.319613039, 0.198914632, -0.926434338) * CFrame.new(0, math.cos(tick()) / 20, 0), 0.3) humhp = h.Health end cananimate = true canattack = true end) else canattack = true cananimate = true end end) tool.Deactivated:Connect(function() mouseclick = false end) end local function buildCombat() local tool = Instance.new("Tool") tool.Name = "Combat" tool.CanBeDropped = true tool.RequiresHandle = true local handle = Instance.new("Part") handle.Name = "Handle" handle.Size = Vector3.new(0.4, 0.4, 0.4) handle.Transparency = 1 handle.CanCollide = false handle.Parent = tool makeSound(handle, "Punch", "rbxassetid://3932505023", 1) makeSound(handle, "Kick", "rbxassetid://542443306", 1) makeSound(handle, "Swoosh", "rbxassetid://1489705211", 0.7) makeSound(handle, "Ouch", "rbxassetid://4306991962", 0.5) makeSound(handle, "Bass", "rbxassetid://2487714799", 0.5) makeSound(handle, "Block", "rbxassetid://4306994664", 1) return tool end local KATANA_GRIP = CFrame.new(0, 0, -1.70000005, 0, 0, 1, 1, 0, 0, 0, 1, 0) local function buildKatana() local tool = Instance.new("Tool") tool.Name = "Katana" tool.CanBeDropped = true tool.RequiresHandle = true tool.Grip = KATANA_GRIP local handle = Instance.new("Part") handle.Name = "Handle" handle.Size = Vector3.new(0.4, 0.2, 5) handle.Color = Color3.fromRGB(99, 95, 98) handle.Reflectance = 0.4 handle.Material = Enum.Material.Plastic handle.CanCollide = true handle.Parent = tool local mesh = Instance.new("SpecialMesh") mesh.MeshType = Enum.MeshType.FileMesh mesh.MeshId = "rbxassetid://11442510" mesh.TextureId = "rbxassetid://11442524" mesh.Scale = Vector3.new(1.7, 1.7, 1.7) mesh.Parent = handle makeSound(handle, "Swoosh", "rbxassetid://1489705211", 0.7) makeSound(handle, "Equip", "rbxassetid://211059653", 1) makeSound(handle, "Stab", "rbxassetid://4471648128", 0.5) makeSound(handle, "Clang", "rbxassetid://357622136", 1) local att0 = Instance.new("Attachment") att0.Name = "Attachment" att0.Position = Vector3.new(0, 0, -1) att0.Parent = handle local att1 = Instance.new("Attachment") att1.Name = "Attachment2" att1.Position = Vector3.new(0, 0, 2.6) att1.Parent = handle local trail = Instance.new("Trail") trail.Name = "Trail" trail.Attachment0 = att0 trail.Attachment1 = att1 trail.Lifetime = 0.1 trail.LightEmission = 0 trail.Color = ColorSequence.new(Color3.new(1, 1, 1)) trail.Transparency = NumberSequence.new({ NumberSequenceKeypoint.new(0, 0.8), NumberSequenceKeypoint.new(1, 0.8), }) trail.Enabled = false trail.Parent = handle return tool end local function runKatanaBehavior(tool) local handle = tool:WaitForChild("Handle") local equipsound = handle:FindFirstChild("Equip") local swishsound = handle:FindFirstChild("Swoosh") local blocksound = handle:FindFirstChild("Clang") local stabsound = handle:FindFirstChild("Stab") local trail = handle:FindFirstChild("Trail") local runservice = game:GetService("RunService") local canattack = true local cananimate = false local equipped = false local mouseclick = false local attacknumber = 1 local owner = nil local character = nil local function katanaFlail(v, t) local torso = v:FindFirstChild("Torso") if not torso then return end local limbs = { {name = "Right Arm", joint = "Right Shoulder", c0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0), c1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0), collider = 1.4, offset = -0.3}, {name = "Left Arm", joint = "Left Shoulder", c0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0), c1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0), collider = 1.4, offset = -0.3}, {name = "Left Leg", joint = "Left Hip", c0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0), c1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0), collider = 1.5, offset = -0.2}, {name = "Right Leg", joint = "Right Hip", c0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0), c1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0), collider = 1.5, offset = -0.2}, } for _, info in ipairs(limbs) do local limb = v:FindFirstChild(info.name) if limb then local glue = Instance.new("Glue") glue.Part0 = torso glue.Part1 = limb glue.C0 = info.c0 glue.C1 = info.c1 glue.Parent = torso local limbcollider = Instance.new("Part") limbcollider.Size = Vector3.new(info.collider, 1, 1) limbcollider.Shape = Enum.PartType.Cylinder limbcollider.Transparency = 1 limbcollider.Name = "LimbCollider" limbcollider.Parent = limb local limbcolliderweld = Instance.new("Weld") limbcolliderweld.Part0 = limb limbcolliderweld.Part1 = limbcollider limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0, 0, math.pi / 2) * CFrame.new(info.offset, 0, 0) limbcolliderweld.Parent = limbcollider task.spawn(function() local joint = torso:FindFirstChild(info.joint) if joint then local limbclone = joint:Clone() joint:Destroy() task.delay(t, function() if torso.Parent then limbclone.Parent = torso limbclone.Part0 = torso limbclone.Part1 = limb end end) end task.wait(t) if glue.Parent then glue:Destroy() end if limbcollider.Parent then limbcollider:Destroy() end if limbcolliderweld.Parent then limbcolliderweld:Destroy() end end) end end end -- Урон катаны БЕЗ кулдауна (метка ragdolledknife удалена) local function katanaDamage() for _, v in pairs(workspace:GetDescendants()) do if v:IsA("Model") then local head = v:FindFirstChild("Head") local humanoid = v:FindFirstChildOfClass("Humanoid") local torso = v:FindFirstChild("Torso") if humanoid and head then if (head.Position - handle.Position).Magnitude < 2.5 and v ~= character and humanoid.Health > 0 then stabsound.PlaybackSpeed = 1 + (math.random(-4, 4) / 20) stabsound:Play() local dmg = math.random(30, 50) if humanoid.Health <= dmg then ragdollkill(v) if deadlyMode then humanoid.Health = 0 else humanoid.Health = humanoid.MaxHealth end else humanoid.Health = humanoid.Health - dmg end local rootPart = character and character:FindFirstChild("HumanoidRootPart") if rootPart then local velocity = Instance.new("BodyVelocity") velocity.MaxForce = Vector3.new(math.huge, 0, math.huge) velocity.Velocity = rootPart.CFrame.lookVector * math.random(5, 15) velocity.Parent = head game.Debris:AddItem(velocity, 0.2) end humanoid.PlatformStand = true task.delay(1, function() if humanoid and humanoid.Parent then humanoid.PlatformStand = false end end) if torso then katanaFlail(v, 1) end end end end end end tool.Activated:Connect(function() mouseclick = true end) tool.Deactivated:Connect(function() mouseclick = false end) tool.Activated:Connect(function() if owner == nil or character == nil or not canattack then return end local torso = character:FindFirstChild("Torso") local rootPart = character:FindFirstChild("HumanoidRootPart") if not torso or not rootPart then return end local rightarmweld = torso:FindFirstChild("RightArmWeldkata") local leftarmweld = torso:FindFirstChild("LeftArmWeldkata") local headweld = torso:FindFirstChild("HeadWeldkata") local rootweld = rootPart:FindFirstChild("HumanoidRootPartWeldkata") if not (rightarmweld and leftarmweld and headweld and rootweld) then return end cananimate = false canattack = false if attacknumber == 1 then for i = 0, 1, 0.15 * AnimationSpeed do tool.Grip = tool.Grip * CFrame.fromEulerAnglesXYZ(math.rad(-5), 0, 0) headweld.C0 = headweld.C0:Lerp(CFrame.new(0, 1.5, 0, 0.866025388, 0, 0.5, 0, 1, 0, -0.5, 0, 0.866025388), i) rightarmweld.C0 = rightarmweld.C0:Lerp(CFrame.new(1.64085674, 0.312389612, -0.122621536, 0.939692497, -0.342020065, 0, -0.29619807, -0.813797593, -0.5, 0.171010077, 0.469846338, -0.866025388), i) leftarmweld.C0 = leftarmweld.C0:Lerp(CFrame.new(1.02380371, 0.612811089, -0.671613693, 0.440969527, -0.84082067, 0.313952357, -0.813797534, -0.522099257, -0.255236179, 0.378522247, -0.14294228, -0.914487958), i) rootweld.C0 = rootweld.C0:Lerp(CFrame.new(0, 0, 0, 0.866025388, 0, -0.5, 0, 1, 0, 0.5, 0, 0.866025388) * CFrame.fromEulerAnglesXYZ(math.rad(10), 0, 0), i) runservice.Stepped:Wait() end trail.Enabled = true swishsound.PlaybackSpeed = 1 + (math.random(-4, 4) / 20) swishsound:Play() for i = 0, 1, 0.15 * AnimationSpeed do katanaDamage() tool.Grip = tool.Grip * CFrame.fromEulerAnglesXYZ(math.rad(15), 0, 0) headweld.C0 = headweld.C0:Lerp(CFrame.new(0, 1.5, 0, 0.766044259, 0, -0.642787516, 0, 1, 0, 0.642787516, 0, 0.766044259), i) rightarmweld.C0 = rightarmweld.C0:Lerp(CFrame.new(0.683202744, -0.20174861, -0.846788406, 0.485379666, 0.55736959, -0.673606277, -0.785861969, 0.615793824, -0.056734439, 0.383180559, 0.556899309, 0.736909389), i) leftarmweld.C0 = leftarmweld.C0:Lerp(CFrame.new(-0.429347992, -0.274533272, -0.938881874, -0.164195985, -0.2279284, -0.959733248, -0.713444591, 0.699326932, -0.0440245233, 0.681201816, 0.677488148, -0.277441025), i) rootweld.C0 = rootweld.C0:Lerp(CFrame.new(0, 0, 0, 0.766044378, 0, 0.642787576, 0, 1, 0, -0.642787576, 0, 0.766044378) * CFrame.fromEulerAnglesXYZ(-math.rad(10), math.rad(20), 0), i) runservice.Stepped:Wait() end trail.Enabled = false attacknumber = 2 elseif attacknumber == 2 then for i = 0, 1, 0.15 * AnimationSpeed do tool.Grip = tool.Grip * CFrame.fromEulerAnglesXYZ(math.rad(-5), 0, 0) headweld.C0 = headweld.C0:Lerp(CFrame.new(0.0751914978, 1.49240375, -0.0434103012, 0.640502989, 0.150383756, -0.753087461, -0.0301536862, 0.98480773, 0.171010047, 0.767363608, -0.0868240893, 0.635306776), i) rightarmweld.C0 = rightarmweld.C0:Lerp(CFrame.new(-0.66223526, 0.676017523, -1.025383, 0.49999997, 0.866025388, -2.98023224e-08, 0.749999762, -0.433012694, -0.5, -0.433012754, 0.25000006, -0.866025448), i) leftarmweld.C0 = leftarmweld.C0:Lerp(CFrame.new(-1.26498032, 0.448050499, -0.739653587, 0.939692616, 0.342020124, 0, 0.262002617, -0.719846368, -0.642787337, -0.219846219, 0.604022563, -0.766044617), i) rootweld.C0 = rootweld.C0:Lerp(CFrame.new(0, 0, 0, 0.642787635, 0, 0.766044438, 0.133022219, 0.98480773, -0.111618899, -0.754406512, 0.173648179, 0.633022249), i) runservice.Stepped:Wait() end trail.Enabled = true swishsound.PlaybackSpeed = 1 + (math.random(-4, 4) / 20) swishsound:Play() for i = 0, 1, 0.15 * AnimationSpeed do katanaDamage() tool.Grip = tool.Grip * CFrame.fromEulerAnglesXYZ(math.rad(15), 0, 0) headweld.C0 = headweld.C0:Lerp(CFrame.new(0.0641422272, 1.48955965, 0.0788440704, 0.767760158, 0.128285766, 0.627763689, 0.00259800092, 0.979120135, -0.203264251, -0.640731931, 0.15768908, 0.751396239), i) rightarmweld.C0 = rightarmweld.C0:Lerp(CFrame.new(1.37565041, -0.222093105, -0.689687729, 0.5, -0.296198189, 0.813797593, 0.749999642, 0.617945373, -0.235888779, -0.433012664, 0.728292406, 0.531121194), i) leftarmweld.C0 = leftarmweld.C0:Lerp(CFrame.new(0.835933685, -0.400773525, -1.04433632, 0.649519086, -0.755761325, 0.083365947, 0.557579219, 0.39889279, -0.72800374, 0.516942859, 0.519335449, 0.680485249), i) rootweld.C0 = rootweld.C0:Lerp(CFrame.new(0, 0, 0, 0.773788929, 0.0871748775, -0.627416253, 0.0624999851, 0.975144863, 0.212570071, 0.630352676, -0.20369792, 0.749107838), i) runservice.Stepped:Wait() end trail.Enabled = false attacknumber = 3 elseif attacknumber == 3 then trail.Enabled = true local rota = 0 tool.Grip = KATANA_GRIP * CFrame.fromEulerAnglesXYZ(math.rad(85), 0, math.pi / 2) swishsound:Play() for i = 1, 25 do katanaDamage() if i == 10 or i == 20 then swishsound.PlaybackSpeed = 1 + (math.random(-4, 4) / 20) swishsound:Play() end rota = rota + 1 headweld.C0 = CFrame.new(0, 1.5, 0) rightarmweld.C0 = CFrame.new(-0.694223404, 0.5, -1.11978149, 2.98023188e-08, 0.99999994, 0, -1.19248798e-08, -4.44089183e-16, -0.99999994, -0.99999994, 2.98023188e-08, 1.19248806e-08) leftarmweld.C0 = CFrame.new(-1.57922745, 0.5, -0.405579567, 0.984807611, 0.173648179, 0, 7.59040208e-09, -4.30473079e-08, -0.99999994, -0.173648208, 0.98480773, -4.37113883e-08) rootweld.C0 = CFrame.new() * CFrame.fromEulerAnglesXYZ(0, -math.rad(rota * 30), 0) runservice.Stepped:Wait() end trail.Enabled = false attacknumber = 1 end if mouseclick then task.spawn(function() local humanoid = character:FindFirstChildOfClass("Humanoid") if not humanoid then cananimate = true canattack = true return end local humhp = humanoid.Health local canblockanim = true while runservice.Stepped:Wait() and mouseclick do local h = character:FindFirstChildOfClass("Humanoid") if not h then break end if h.Health < humhp then local thedamage = humhp - h.Health h.Health = h.Health + thedamage / 1.3 blocksound.PlaybackSpeed = 1 + (math.random(-4, 4) / 20) blocksound.TimePosition = 0.05 blocksound:Play() if canblockanim then canblockanim = false local myHead = character:FindFirstChild("Head") local nearestdistance = math.huge local nearestplr = nil if myHead then for _, v in pairs(workspace:GetDescendants()) do if v:IsA("Model") and v ~= character then local headdw = v:FindFirstChild("Head") local humanoiddw = v:FindFirstChildOfClass("Humanoid") if humanoiddw and headdw then local dist = (headdw.Position - myHead.Position).Magnitude if dist < 10 and dist < nearestdistance then nearestdistance = dist nearestplr = v end end end end end if nearestplr then local nearHead = nearestplr:FindFirstChild("Head") if nearHead and myHead then myHead.CFrame = CFrame.new(myHead.Position, nearHead.Position) end end local chead = character:FindFirstChild("Head") if chead then h.PlatformStand = false local velocity = Instance.new("BodyVelocity") velocity.MaxForce = Vector3.new(math.huge, 0, math.huge) velocity.Velocity = chead.CFrame.lookVector * -math.random(10, 25) velocity.Parent = chead game.Debris:AddItem(velocity, 0.2) end task.delay(0.2, function() canblockanim = true end) end end rootweld.C0 = rootweld.C0:Lerp(CFrame.new(), 0.3) headweld.C0 = headweld.C0:Lerp(CFrame.new(0, 1.5, 0), 0.3) rightarmweld.C0 = rightarmweld.C0:Lerp(CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(math.pi - math.rad(40), 0, 0) * CFrame.new(0, -0.5, 0), 0.3) leftarmweld.C0 = leftarmweld.C0:Lerp(CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ((math.pi / 2) - math.rad(10), 0, 0) * CFrame.new(0, -0.5, 0), 0.3) tool.Grip = tool.Grip:Lerp(KATANA_GRIP * CFrame.fromEulerAnglesXYZ((math.pi / 2), (-math.pi / 2) - math.rad(15), math.rad(-25)), 0.3) humhp = h.Health end cananimate = true canattack = true end) else cananimate = true canattack = true end end) tool.Equipped:Connect(function() equipped = true trail.Enabled = false handle.Transparency = 1 canattack = false -- ФИКС: нельзя бить во время Equip-анимации owner = Players:GetPlayerFromCharacter(tool.Parent) if not owner then return end character = owner.Character if not character then return end local torso = character:FindFirstChild("Torso") local rootPart = character:FindFirstChild("HumanoidRootPart") if not torso or not rootPart then return end if not character:FindFirstChild("Right Arm") or not character:FindFirstChild("Left Arm") or not character:FindFirstChild("Head") then return end local rightarm = Instance.new("Weld") rightarm.Part0 = torso rightarm.Part1 = character["Right Arm"] rightarm.C0 = CFrame.new(1.5, 0, 0) rightarm.Name = "RightArmWeldkata" rightarm.Parent = torso local leftarm = Instance.new("Weld") leftarm.Part0 = torso leftarm.Part1 = character["Left Arm"] leftarm.C0 = CFrame.new(-1.5, 0, 0) leftarm.Name = "LeftArmWeldkata" leftarm.Parent = torso local headw = Instance.new("Weld") headw.Part0 = torso headw.Part1 = character.Head headw.C0 = CFrame.new(0, 1.5, 0) headw.Name = "HeadWeldkata" headw.Parent = torso local humanoidrootpart = Instance.new("Weld") humanoidrootpart.Part0 = rootPart humanoidrootpart.Part1 = torso humanoidrootpart.Name = "HumanoidRootPartWeldkata" humanoidrootpart.Parent = rootPart for i = 0, 1, 0.05 * AnimationSpeed do humanoidrootpart.C0 = humanoidrootpart.C0:Lerp(CFrame.fromEulerAnglesXYZ(0, math.rad(-25), 0), i) leftarm.C0 = leftarm.C0:Lerp(CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, 0, math.rad(-10)) * CFrame.new(0, -0.5, 0), i) rightarm.C0 = rightarm.C0:Lerp(CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(math.pi + math.rad(10), math.rad(75), 0) * CFrame.new(0, -0.5, 0), i) runservice.Stepped:Wait() end cananimate = true canattack = true -- ФИКС: разрешаем атаку после завершения Equip-анимации local back = character:FindFirstChild("KatanaBack") if back then back.Transparency = 1 end handle.Transparency = 0 equipsound:Play() task.spawn(function() while runservice.Stepped:Wait() and equipped do if cananimate then tool.Grip = tool.Grip:Lerp(KATANA_GRIP, 0.1) headw.C0 = headw.C0:Lerp(CFrame.new(0, 1.5, 0), 0.1) humanoidrootpart.C0 = humanoidrootpart.C0:Lerp(CFrame.new(), 0.1) leftarm.C0 = leftarm.C0:Lerp(CFrame.new(-1.4, 0.5, 0) * CFrame.fromEulerAnglesXYZ((math.pi / 2) - math.rad(50) + math.sin(tick()) / 15, 0, math.rad(50)) * CFrame.new(0, -0.8, 0), 0.1) rightarm.C0 = rightarm.C0:Lerp(CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ((math.pi / 2) - math.rad(35) + math.sin(tick()) / 15, math.rad(20), math.rad(-40)) * CFrame.new(0, -0.8, 0), 0.1) end end end) end) tool.Unequipped:Connect(function() equipped = false mouseclick = false cananimate = false if not character then return end local torso = character:FindFirstChild("Torso") if torso then for _, weldName in pairs({"RightArmWeldkata", "LeftArmWeldkata", "HeadWeldkata"}) do local w = torso:FindFirstChild(weldName) if w then w:Destroy() end end end local rootPart = character:FindFirstChild("HumanoidRootPart") if rootPart then local w = rootPart:FindFirstChild("HumanoidRootPartWeldkata") if w then w:Destroy() end end if not torso then return end local back = character:FindFirstChild("KatanaBack") if not back then local clone = handle:Clone() clone:BreakJoints() for _, v in pairs(clone:GetDescendants()) do if v.ClassName ~= "SpecialMesh" and v.ClassName ~= "TouchTransmitter" then v:Destroy() end end local weld = Instance.new("Weld") weld.Part0 = torso weld.Part1 = clone weld.C0 = CFrame.new(0, 0, 0.55) weld.C0 = weld.C0 * CFrame.fromEulerAnglesXYZ(0, math.pi / 2, math.pi / 2) weld.C0 = weld.C0 * CFrame.fromEulerAnglesXYZ(math.pi, math.rad(-60), 0) weld.Parent = clone clone.Parent = character clone.Name = "KatanaBack" back = clone else back.Transparency = 0 end handle.Transparency = 1 local backMesh = back:FindFirstChildOfClass("SpecialMesh") local handleMesh = handle:FindFirstChildOfClass("SpecialMesh") if backMesh and handleMesh then backMesh.TextureId = handleMesh.TextureId end end) end -- ============================================================ -- ПРОСТО ДЕЛАЕМ РУКИ ВИДИМЫМИ В ПЕРВОМ ЛИЦЕ -- ============================================================ local fpArmsConn = nil local function forceArmsVisible() if fpArmsConn then fpArmsConn:Disconnect() fpArmsConn = nil end fpArmsConn = RunService.RenderStepped:Connect(function() local char = player.Character if not char then return end local rArm = char:FindFirstChild("Right Arm") local lArm = char:FindFirstChild("Left Arm") if rArm then rArm.LocalTransparencyModifier = 0 end if lArm then lArm.LocalTransparencyModifier = 0 end end) end local function stopForceArmsVisible() if fpArmsConn then fpArmsConn:Disconnect() fpArmsConn = nil end local char = player.Character if char then local rArm = char:FindFirstChild("Right Arm") local lArm = char:FindFirstChild("Left Arm") if rArm then rArm.LocalTransparencyModifier = 0 end if lArm then lArm.LocalTransparencyModifier = 0 end end end -- ============================================================ local function giveTool() local backpack = player:FindFirstChild("Backpack") if not backpack then return end local itemName if chosenItem == "pipe" then itemName = "Lead Pipe" elseif chosenItem == "combat" then itemName = "Combat" elseif chosenItem == "katana" then itemName = "Katana" else itemName = "Baseball Bat" end if backpack:FindFirstChild(itemName) then return end local character = player.Character if character and character:FindFirstChild(itemName) then return end local tool if chosenItem == "pipe" then tool = buildPipe() runPipeBehavior(tool) elseif chosenItem == "combat" then tool = buildCombat() if not tool then return end runCombatBehavior(tool) elseif chosenItem == "katana" then tool = buildKatana() if not tool then return end runKatanaBehavior(tool) else tool = buildBat() runBehavior(tool) end local suppressConn = nil tool.Equipped:Connect(function() suppressConn = suppressToolNone(tool.Parent) forceArmsVisible() end) tool.Unequipped:Connect(function() if suppressConn then suppressConn() suppressConn = nil end stopForceArmsVisible() end) if UserInputService.TouchEnabled then tool.Equipped:Connect(function() createMobileButton(tool) end) tool.Unequipped:Connect(function() removeMobileButton() end) end tool.Parent = backpack end local function handleCharacter(character) if isR15Character(character) then showR6OnlyPopup() return end for attempt = 1, 10 do local backpack = player:FindFirstChild("Backpack") if backpack then giveTool() break end task.wait(0.5) end end -- Show item choice first, then mode choice (applies to every item) showItemChoice() task.spawn(function() while not itemChosen do task.wait(0.1) end showVersionChoice() while not versionChosen do task.wait(0.1) end player.CharacterAdded:Connect(handleCharacter) if player.Character then handleCharacter(player.Character) end end)