Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local ReplicatedStorage = game:GetService("ReplicatedStorage")
- local Config = require(ReplicatedStorage:WaitForChild("Modules"):WaitForChild("Config"))
- local CharactersFolder = script:WaitForChild("Characters")
- local CharacterModule = {}
- function CharacterModule.GetCharacterInfo(Player: Player, Character: string)
- local CharInfo = {
- Name = nil,
- Health = 0,
- SpeedMult = 0,
- Atk = {
- Moves = 0,
- Dmg = 0
- },
- Ult = {
- Moves = 0,
- PointsReq = 0,
- Dmg = 0,
- Duration = 0,
- Moveset = {
- [Config.NormalKeyStrokes.One] = {
- AbilityName = "",
- Damage = 0,
- Cooldown = 0,
- HitboxType = "",
- Hitbox = Vector3.new(0, 0, 0),
- Keybind = Config.NormalKeyStrokes.One,
- },
- [Config.NormalKeyStrokes.Two] = {
- AbilityName = "",
- Damage = 0,
- Cooldown = 0,
- HitboxType = "",
- Hitbox = Vector3.new(0, 0, 0),
- Keybind = Config.NormalKeyStrokes.Two,
- },
- [Config.NormalKeyStrokes.Three] = {
- AbilityName = "",
- Damage = 0,
- Cooldown = 0,
- HitboxType = "",
- Hitbox = Vector3.new(0, 0, 0),
- Keybind = Config.NormalKeyStrokes.Three,
- },
- [Config.NormalKeyStrokes.Four] = {
- AbilityName = "",
- Damage = 0,
- Cooldown = 0,
- HitboxType = "",
- Hitbox = Vector3.new(0, 0, 0),
- Keybind = Config.NormalKeyStrokes.Four,
- },
- }
- },
- Moveset = {
- [Config.NormalKeyStrokes.One] = {
- AbilityName = "",
- Damage = 0,
- Cooldown = 0,
- HitboxType = "",
- Hitbox = Vector3.new(0, 0, 0),
- Keybind = Config.NormalKeyStrokes.One,
- },
- [Config.NormalKeyStrokes.Two] = {
- AbilityName = "",
- Damage = 0,
- Cooldown = 0,
- HitboxType = "",
- Hitbox = Vector3.new(0, 0, 0),
- Keybind = Config.NormalKeyStrokes.Two,
- },
- [Config.NormalKeyStrokes.Three] = {
- AbilityName = "",
- Damage = 0,
- Cooldown = 0,
- HitboxType = "",
- Hitbox = Vector3.new(0, 0, 0),
- Keybind = Config.NormalKeyStrokes.Three,
- },
- [Config.NormalKeyStrokes.Four] = {
- AbilityName = "",
- Damage = 0,
- Cooldown = 0,
- HitboxType = "",
- Hitbox = Vector3.new(0, 0, 0),
- Keybind = Config.NormalKeyStrokes.Four,
- },
- [Config.NormalKeyStrokes.Ult] = {
- AbilityName = "",
- Damage = 0,
- Cooldown = 0,
- HitboxType = "",
- Hitbox = Vector3.new(0, 0, 0),
- Keybind = Config.NormalKeyStrokes.Ult,
- },
- }
- }
- local CharModule = require(CharactersFolder[Character])
- if CharModule then
- local NormalMoves = CharModule.NormalMovesNum
- local NormalAtkDmg = CharModule.NormalAtkDmg
- local UltMovesNum = CharModule.UltMovesNum
- local UltPointsRequired = CharModule.UltPointsRequired
- local UltAtkDamage = CharModule.UltAtkDamage
- local UltDuration = CharModule.UltDuration
- local Moveset = CharModule.Moveset
- CharInfo.Name = CharModule.Name
- CharInfo.Health = CharModule.Health
- CharInfo.SpeedMult = CharModule.SpeedMult
- CharInfo.Atk.Moves = CharModule.NormalMovesNum
- CharInfo.Atk.Dmg = CharModule.NormalAtkDmg
- CharInfo.Ult.Moves = CharModule.UltMovesNum
- CharInfo.Ult.PointsReq = CharModule.UltPointsRequired
- CharInfo.Ult.Dmg = CharModule.UltAtkDamage
- CharInfo.Ult.Duration = CharModule.UltDuration
- CharInfo.Moveset[Config.NormalKeyStrokes.One].AbilityName = CharModule.Moveset.One.Name
- CharInfo.Moveset[Config.NormalKeyStrokes.One].Damage = CharModule.Moveset.One.Damage
- CharInfo.Moveset[Config.NormalKeyStrokes.One].Cooldown = CharModule.Moveset.One.Cooldown
- CharInfo.Moveset[Config.NormalKeyStrokes.One].HitboxType = CharModule.Moveset.One.HitboxType
- CharInfo.Moveset[Config.NormalKeyStrokes.One].Hitbox = CharModule.Moveset.One.Hitbox
- CharInfo.Moveset[Config.NormalKeyStrokes.Two].AbilityName = CharModule.Moveset.Two.Name
- CharInfo.Moveset[Config.NormalKeyStrokes.Two].Damage = CharModule.Moveset.Two.Damage
- CharInfo.Moveset[Config.NormalKeyStrokes.Two].Cooldown = CharModule.Moveset.Two.Cooldown
- CharInfo.Moveset[Config.NormalKeyStrokes.Two].HitboxType = CharModule.Moveset.Two.HitboxType
- CharInfo.Moveset[Config.NormalKeyStrokes.Two].Hitbox = CharModule.Moveset.Two.Hitbox
- CharInfo.Moveset[Config.NormalKeyStrokes.Three].AbilityName = CharModule.Moveset.Three.Name
- CharInfo.Moveset[Config.NormalKeyStrokes.Three].Damage = CharModule.Moveset.Three.Damage
- CharInfo.Moveset[Config.NormalKeyStrokes.Three].Cooldown = CharModule.Moveset.Three.Cooldown
- CharInfo.Moveset[Config.NormalKeyStrokes.Three].HitboxType = CharModule.Moveset.Three.HitboxType
- CharInfo.Moveset[Config.NormalKeyStrokes.Three].Hitbox = CharModule.Moveset.Three.Hitbox
- CharInfo.Moveset[Config.NormalKeyStrokes.Four].AbilityName = CharModule.Moveset.Four.Name
- CharInfo.Moveset[Config.NormalKeyStrokes.Four].Damage = CharModule.Moveset.Four.Damage
- CharInfo.Moveset[Config.NormalKeyStrokes.Four].Cooldown = CharModule.Moveset.Four.Cooldown
- CharInfo.Moveset[Config.NormalKeyStrokes.Four].HitboxType = CharModule.Moveset.Four.HitboxType
- CharInfo.Moveset[Config.NormalKeyStrokes.Four].Hitbox = CharModule.Moveset.Four.Hitbox
- CharInfo.Moveset[Config.NormalKeyStrokes.Ult].AbilityName = CharModule.Moveset.Ult.Name
- CharInfo.Moveset[Config.NormalKeyStrokes.Ult].Damage = CharModule.Moveset.Ult.Damage
- CharInfo.Moveset[Config.NormalKeyStrokes.Ult].Cooldown = CharModule.Moveset.Ult.Cooldown
- CharInfo.Moveset[Config.NormalKeyStrokes.Ult].HitboxType = CharModule.Moveset.Ult.HitboxType
- CharInfo.Moveset[Config.NormalKeyStrokes.Ult].Hitbox = CharModule.Moveset.Ult.Hitbox
- -----------
- CharInfo.Ult.Moveset[Config.NormalKeyStrokes.One].AbilityName = CharModule.UltMoveset.One.Name
- CharInfo.Ult.Moveset[Config.NormalKeyStrokes.One].Damage = CharModule.UltMoveset.One.Damage
- CharInfo.Ult.Moveset[Config.NormalKeyStrokes.One].Cooldown = CharModule.UltMoveset.One.Cooldown
- CharInfo.Ult.Moveset[Config.NormalKeyStrokes.One].HitboxType = CharModule.UltMoveset.One.HitboxType
- CharInfo.Ult.Moveset[Config.NormalKeyStrokes.One].Hitbox = CharModule.UltMoveset.One.Hitbox
- CharInfo.Ult.Moveset[Config.NormalKeyStrokes.Two].AbilityName = CharModule.UltMoveset.Two.Name
- CharInfo.Ult.Moveset[Config.NormalKeyStrokes.Two].Damage = CharModule.UltMoveset.Two.Damage
- CharInfo.Ult.Moveset[Config.NormalKeyStrokes.Two].Cooldown = CharModule.UltMoveset.Two.Cooldown
- CharInfo.Ult.Moveset[Config.NormalKeyStrokes.Two].HitboxType = CharModule.UltMoveset.Two.HitboxType
- CharInfo.Ult.Moveset[Config.NormalKeyStrokes.Two].Hitbox = CharModule.UltMoveset.Two.Hitbox
- CharInfo.Ult.Moveset[Config.NormalKeyStrokes.Three].AbilityName = CharModule.UltMoveset.Three.Name
- CharInfo.Ult.Moveset[Config.NormalKeyStrokes.Three].Damage = CharModule.UltMoveset.Three.Damage
- CharInfo.Ult.Moveset[Config.NormalKeyStrokes.Three].Cooldown = CharModule.UltMoveset.Three.Cooldown
- CharInfo.Ult.Moveset[Config.NormalKeyStrokes.Three].HitboxType = CharModule.UltMoveset.Three.HitboxType
- CharInfo.Ult.Moveset[Config.NormalKeyStrokes.Three].Hitbox = CharModule.UltMoveset.Three.Hitbox
- CharInfo.Ult.Moveset[Config.NormalKeyStrokes.Four].AbilityName = CharModule.UltMoveset.Four.Name
- CharInfo.Ult.Moveset[Config.NormalKeyStrokes.Four].Damage = CharModule.UltMoveset.Four.Damage
- CharInfo.Ult.Moveset[Config.NormalKeyStrokes.Four].Cooldown = CharModule.UltMoveset.Four.Cooldown
- CharInfo.Ult.Moveset[Config.NormalKeyStrokes.Four].HitboxType = CharModule.UltMoveset.Four.HitboxType
- CharInfo.Ult.Moveset[Config.NormalKeyStrokes.Four].Hitbox = CharModule.UltMoveset.Four.Hitbox
- print(CharInfo)
- return CharInfo
- end
- return {}
- end
- function CharacterModule.GetCharacters(Player: Player)
- local AvailableCharacters = {}
- for _, Character: Instance in CharactersFolder:GetChildren() do
- if Character.Name == "Template" then continue end
- table.insert(AvailableCharacters, Character.Name)
- end
- return (AvailableCharacters)
- end
- return CharacterModule
Advertisement
Add Comment
Please, Sign In to add comment