local combatEvent = game:GetService("ReplicatedStorage").combatEvent local module = require(game:GetService("ServerStorage").MuchachoHitbox) local animationEvent = game:GetService("ReplicatedStorage").animationStop local blockEvent = game:GetService("ReplicatedStorage").blockEvent local stunEvent = game:GetService("ReplicatedStorage").stunPlay combatEvent.OnServerEvent:Connect(function(plyr, combo) local char = plyr.Character local hum = char.Humanoid local root = char.HumanoidRootPart local stunned = char:WaitForChild("Stunned") local exist = false local blocking = char:WaitForChild("Blocking") local hitBox = module.CreateHitbox() exist = true local params = OverlapParams.new() params.FilterType = Enum.RaycastFilterType.Exclude params.FilterDescendantsInstances = {char} hitBox.Size = Vector3.new(3,4,4) hitBox.CFrame = root hitBox.Offset = CFrame.new(0,0,-1.7) hitBox.OverlapParams = params stunned.Changed:Connect(function(value) if value then if not exist then return end hitBox:Destroy() exist = false end end) hitBox.Touched:Connect(function(hit,human) local player = game.Players:GetPlayerFromCharacter(human.Parent) if human.Parent.Blocking.Value == false then if combo == 4 then local wee = Instance.new('BodyVelocity') wee.MaxForce = Vector3.new(math.huge, math.huge, math.huge) wee.P = math.huge wee.Velocity = (root.CFrame.LookVector + root.CFrame.UpVector) * 60 wee.Parent = human.Parent.HumanoidRootPart task.delay(0.15, function() wee:Destroy() end) human:TakeDamage(8) task.delay(2.25, function() human.Parent.Stunned.Value = false end) else human:TakeDamage(4) stunEvent:FireClient(player, false) task.delay(1.75, function() human.Parent.Stunned.Value = false end) end human.Parent.Stunned.Value = true else if combo == 4 then human:TakeDamage(2) human.Parent.Blocking.Value = false human.Parent.Stunned.Value = true stunEvent:FireClient(player, true) task.delay(3, function() human.Parent.Stunned.Value = false end) end end end) task.delay(0.1, function() if not exist then return end hitBox:Start() task.delay(0.35, function() if not exist then return end hitBox:Destroy() exist = false end) end) end) blockEvent.OnServerEvent:Connect(function(plyr, block) local char = plyr.Character local hum = char.Humanoid local blocking = char.Blocking --if plyr.Name == "cooltayfa" then -- print(char.Stunned.Value) --end if block == true then blocking.Value = true end if block == false then blocking.Value = false end print(blocking.Value) end)