Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local module = {}
- local GlobalMod = require(game.ReplicatedStorage.GlobalMod)
- local CombatMod = require(game.ReplicatedStorage.CombatMod)
- local rayCastMod = require(game.ReplicatedStorage.Modules.RaycastFromWeapon)
- local damageMod = require(game.ServerScriptService.Core.DamageModule)
- local ChildrenMods = GlobalMod:GetChildrenMods(script)
- local debris = game:GetService("Debris")
- local List = {
- [1] = {'Combo1Anim',2,0.32},
- [2] = {'Combo2Anim',3,0.32},
- [3] = {'Combo3Anim',4,0.32},
- [4] = {'Combo4Anim',1,1.3}
- }
- local tab = {}
- local Loaded = {}
- local ResetTab = {}
- function module:Attack(char,data)
- if ResetTab[char] and os.clock() - ResetTab[char] > 1.3 or not tab[char] then
- tab[char] = 1
- end
- ResetTab[char] = os.clock()
- CombatMod:AddedCharToATable(char,tab)
- CombatMod:AddedCharToATable(char,ResetTab)
- rayCastMod:StartCasts(
- {
- Char = char,
- IgnoreList = {workspace.Debris,char},
- HowLong = 0.3,
- ShowLine = false, -- use for debugging
- DamageFunction = nil,
- NumberOn = tab[char],
- DamageModuleData = {
- Damage = data.BaseDamage,
- Sender = char,
- StunTime = tab[char] ~= 4 and 0.3 or 0.5,
- Fling = true,
- FlingHeight = tab[char] ~= 4 and 10 or 50,
- FlingDistance = tab[char] ~= 4 and 2 or 50,
- FlingDestroyTime = tab[char] ~= 4 and 0.3 or 0.5,
- EnemyShakeCamera = {10,5,0.05,0.05},
- SenderShakeCamera = {10,5,0.05,0.05},
- SenderBlur = {StopTime = 0.1,Amount = 10},
- EnemyBlur = {StopTime = 0.1,Amount = 10},
- StunAnimation = {'Combat','Stun1'},
- },
- }
- )
- _G:ChangeSpeed(char,1,0,0.33,true)
- CombatMod:PlayAnim(char,'Yoru',List[tab[char]][1],1,Enum.AnimationPriority.Action)
- CombatMod:updateCanAttack(char,List[tab[char]][3])
- tab[char] = List[tab[char]][2]
- end
- _G[script.Parent.Name..'ClickAttackReset'] = function(char)
- tab[char] = 1
- ResetTab[char] = os.clock()
- end
- return module
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement