Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Damagee = {}
- local effects = {}
- local SS = game:GetService("ServerStorage")
- local config = SS.Config
- local effectsRemote = game:GetService("ReplicatedStorage")["Main"]:WaitForChild("effects"):WaitForChild("EffectsEvent")
- Damagee.NormalHitbox = (function(plr,chr,dmg,hitboxtime,emittime,Force,StunTime,HitboxExtend,IsStand)
- local debounce = false
- local hum = chr:WaitForChild("Humanoid")
- local Humrp = chr:WaitForChild("HumanoidRootPart")
- local hitbox = game.ServerStorage.HitBox:Clone()
- local UV = chr.UserValues
- local IsUsingMove = UV.IsUsingMove
- local GettingAttacked = UV.GettingAttacked
- local howlongtothedeleteting = .3
- hitbox.Parent = workspace.Effects
- hitbox.Size = hitbox.Size + Vector3.new(HitboxExtend,0,0)
- if IsStand then
- hitbox.CFrame = chr.Stand.HumanoidRootPart.CFrame + chr.Stand.HumanoidRootPart.CFrame.LookVector*2
- elseif not IsStand then
- hitbox.CFrame = chr.HumanoidRootPart.CFrame + chr.HumanoidRootPart.CFrame.LookVector*2
- end
- hitbox.Orientation = chr.HumanoidRootPart.Orientation + Vector3.new(0,-90,0)
- local weld = Instance.new("WeldConstraint")
- weld.Part0 = chr.HumanoidRootPart
- weld.Part1 = hitbox
- weld.Parent = weld.Part0
- game.Debris:AddItem(weld,hitboxtime + 0.2)
- game.Debris:AddItem(hitbox,hitboxtime + 0.2)
- hitbox.Touched:Connect(function(hit)
- print("OMGYASS")
- if hit.Parent ~= chr and hit.Parent:IsA("Model")and hit.Parent:FindFirstChild("Humanoid") and not UV:FindFirstChild("StunDetect") and hit.Parent ~= chr:FindFirstChild("Stand") then
- print("OMGYASS EZ JAJAJA MOREEEEEEEEE")
- if debounce == false then
- debounce = true
- hitbox:Destroy()
- local eChar = hit.Parent
- local eHumrp = eChar:FindFirstChild("HumanoidRootPart")
- local eHum = eChar:FindFirstChild("Humanoid")
- local eUV = eChar.UserValues
- local eIsUsingMove = eUV.IsUsingMove
- local eGettingAttacked = eUV.GettingAttacked
- local Block = eUV.IsBlocking
- eHumrp.CFrame = CFrame.new(eHumrp.Position,Humrp.Position)
- if Block.Value and not UV:FindFirstChild("StunDetect") then
- eHum:TakeDamage(dmg/100)
- task.spawn(function()
- effectsRemote:FireAllClients(eChar.Torso,"Block",1)
- end)
- local Sound = script.Sound.ForBasic.Block:Clone()
- Sound.Parent = eHumrp
- Sound:Play()
- game.Debris:AddItem(Sound,Sound.TimeLength + 0.4)
- elseif not Block.Value and not UV:FindFirstChild("StunDetect") then
- game.ReplicatedStorage.ComboGUIReciever:FireAllClients(dmg)
- spawn(function()
- local StunValue = Instance.new("Model", eUV)
- StunValue.Name = "StunDetect"
- game.Debris:AddItem(StunValue,1)
- --eGettingAttacked.Value = true
- --print("getting attacked!")
- --wait(1)
- --eGettingAttacked.Value = false
- --print("not getting attacked anymore")
- end)
- game.ReplicatedStorage.Main.Client.Combo:FireClient(plr)
- local vel = Instance.new("BodyVelocity")
- vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- vel.Parent = eHumrp
- vel.Velocity = Humrp.CFrame.LookVector * Force
- vel.Name = "SmallMoveVel"
- game.Debris:AddItem(vel,howlongtothedeleteting)
- local vel = Instance.new("BodyVelocity")
- vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
- vel.Parent = Humrp
- vel.Velocity = Humrp. CFrame.LookVector * Force / 2
- vel.Name = "SmallMoveVel"
- game.Debris:AddItem(vel,howlongtothedeleteting)
- eHum:TakeDamage(dmg)
- task.spawn(function()
- effectsRemote:FireAllClients(eChar.Torso,"NormalHitEffect",emittime)
- local hitanim = eHum:LoadAnimation(script.Animations.Basic.hit)
- hitanim:Play()
- end)
- local Sound = script.Sound.ForBasic.Rad1:Clone()
- Sound.Parent = eHumrp
- Sound:Play()
- game.Debris:AddItem(Sound,Sound.TimeLength + 0.4)
- end
- end
- end
- end)
- debounce = false
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement