i was working on this code and when i finished adding the bottom function, it caused the orange bar:
--!strict
local module = {}
local abilities = {
["Ring"] = {
ZMove = true,
XMove = false,
CMove = false,
SpecialMove = true,
MovesData = {
ZMove = {
Name = "Tornado",
Cooldown = 12,
Hitbox = "WindRingZHitbox",
Duration = 1.2,
Resistance = 10,
Knockback = 30,
StunDuration = 1.4,
Stun = true,
Hotkey = "Z",
BackgroundColor = Color3.fromRGB(77, 77, 77),
TextColor = Color3.fromRGB(255, 255, 255),
StrokeColor = Color3.fromRGB(0, 0, 0),
KeyColor = Color3.fromRGB(255, 255, 255),
KeyStrokeColor = Color3.fromRGB(0, 0, 0),
Data = {
DashTime = 1.02,
ForwardSpeed = 60,
DriftSpeed = 28,
},
},
SpecialMove = {
Name = "Wind Arrow",
Cooldown = 15,
Hitbox = "WindRingRHitbox",
Duration = 1,
Resistance = 40,
Knockback = 50,
StunDuration = 1.6,
Stun = true,
Hotkey = "R",
BackgroundColor = Color3.fromRGB(186, 186, 186),
TextColor = Color3.fromRGB(255, 255, 255),
StrokeColor = Color3.fromRGB(139, 139, 139),
KeyColor = Color3.fromRGB(186, 186, 186),
KeyStrokeColor = Color3.fromRGB(139, 139, 139),
},
},
},
}
export type Ability = {
ZMove: boolean?,
XMove: boolean?,
CMove: boolean?,
SpecialMove: boolean?,
MovesData: {
ZMove: MoveData,
XMove: MoveData,
CMove: MoveData,
SpecialMove: MoveData,
[string]: MoveData
},
HotkeyMoves: {
[string]: MoveData
}
}
export type AbilityName = keyof<typeof(abilities)>
export type Abilities = {
[string | AbilityName]: Ability
}
export type MoveData = {
Name: string,
Cooldown: number,
Hitbox: string,
Duration: number,
Resistance: number,
Knockback: number,
Hotkey: string,
BackgroundColor: Color3,
TextColor: Color3,
StrokeColor: Color3,
KeyColor: Color3,
KeyStrokeColor: Color3,
Data: {any}?,
} & {
Stun: true,
StunDuration: number
}
for name, abilityData in abilities :: Abilities do
abilityData.HotkeyMoves = {}
for move, moveData in abilityData.MovesData do
abilityData.HotkeyMoves[moveData.Hotkey] = moveData
end
end
export type GetAbility<T> = index<typeof(abilities), T>
function module.GetAbilityData<T>(name: T | AbilityName): GetAbility<T>
return abilities[name]
end
return module