# Framework Setup

## Short description

This page describes how to set up the framework and lists out all the conditions in the framework. Any other conditions in folders are not listed down here.

### **Setting up the framework**

#### Calling the framework

```lua
local f = require(game.ServerStorage.ClassesFramework)
local Framework = f()
```

#### Class initialisation

This example is taken from Assailant.

```lua
local Defs = require(game.ServerStorage.ClassesFramework.Defs)
local UniversalMovesFunctions = Defs(Framework)
Framework.Setup()
Framework.Hitboxes = Hitboxes
Framework.Weapon = Weapon
Framework.MovesTable = MovesTable
Framework.Character = Character
Framework.Conditions.ClassBeingUsed.Value = Weapon
Framework.Animation.Source = Resources.Animations
Framework.HitboxesModel = Character.Hitboxes
Framework.Signals = Signals
Framework.Animation.DisableRobloxAnimations()
-- See function UpdateStats
Framework.UpdateStats(100, 80, 120, 81.25)
-- See function UpdateCondition
Framework.UpdateCondition("ClassCanSprint",true)
```

#### Framework modules

<table><thead><tr><th width="166">Module</th><th width="270">Description</th><th>Default value</th></tr></thead><tbody><tr><td>Animation</td><td>Used for controlling animations</td><td>&#x3C;requires a module></td></tr><tr><td>Library</td><td>A number of functions. See <a href="../visual-effects-vfx/general-vfx">VFX </a>for some usage.</td><td>&#x3C;requires a module></td></tr><tr><td>ProjApi</td><td>Raycasting module</td><td>&#x3C;requires a module></td></tr><tr><td>Region3</td><td>Another raycasting module</td><td>&#x3C;requires a module></td></tr><tr><td>EventAPI</td><td>Events manager</td><td>&#x3C;requires a module></td></tr><tr><td>EasingStyles</td><td>Easing functions</td><td>&#x3C;requires a module></td></tr></tbody></table>

#### Services

<table><thead><tr><th width="166">Module</th><th width="270">Description</th><th>Default value</th></tr></thead><tbody><tr><td>YieldService</td><td>Gets heartbeat</td><td>game["Run Service"].Heartbeat</td></tr></tbody></table>

#### Values/Settings

<table><thead><tr><th width="183">Value</th><th width="270">Description</th><th>Default value</th></tr></thead><tbody><tr><td>Character</td><td>Gets the player's character</td><td>game["Run Service"].Heartbeat</td></tr><tr><td>Conditions</td><td>A table of condition values in the Conditions folder of each player</td><td>nil</td></tr><tr><td>LocalConditions</td><td>A table of local condition values in the LocalConditions folder of each player</td><td>nil</td></tr><tr><td>ComboStats</td><td>A table of combo stats values in the ComboStats folder of each player</td><td>nil</td></tr><tr><td>Stats</td><td>A table of stat values in the Stats folder of each player</td><td>nil</td></tr><tr><td>Bindables</td><td>A table of objects (BindableFunction, BindableEvent) in the Bindables folder of each player</td><td>nil</td></tr><tr><td>Remotes</td><td>A table of remotes in the Remotes folder of each player</td><td>nil</td></tr><tr><td>Debuffs</td><td>A table of debuff values in the Debuffs folder of each player</td><td>nil</td></tr><tr><td>Hitboxes</td><td>Table of hitboxes</td><td>nil</td></tr><tr><td>AttackDebounces</td><td>Table of attack debounces</td><td>nil</td></tr><tr><td><p>HitboxesDe</p><p>bounces</p></td><td>Table of hitbox debounces</td><td>nil</td></tr><tr><td>ComboEnded<br>Functions</td><td>Table of functions running after a combo ends</td><td>nil</td></tr><tr><td>LastBuffer</td><td></td><td>tick()</td></tr><tr><td>LastGuardRise</td><td></td><td>tick()</td></tr><tr><td>LastGuardDown</td><td></td><td>tick()</td></tr><tr><td>LastGuard</td><td></td><td>tick()</td></tr><tr><td>CanRegenGuard</td><td></td><td>false</td></tr><tr><td>GuardBrokenTick</td><td></td><td>tick()</td></tr><tr><td>GuardBrokenCD</td><td></td><td>6</td></tr><tr><td>HoldingGuard<br>Button</td><td></td><td>false</td></tr><tr><td>AirAC</td><td></td><td>1</td></tr><tr><td>LightAC</td><td></td><td>1</td></tr><tr><td>HeavyAC</td><td></td><td>1</td></tr><tr><td>UsedLAC</td><td></td><td>false</td></tr><tr><td>UsedHAC</td><td></td><td>false</td></tr><tr><td>UsedAAC</td><td></td><td>false</td></tr><tr><td>UsedAirX</td><td></td><td>false</td></tr><tr><td>UsedLC</td><td></td><td>false</td></tr><tr><td>UsedAirdash</td><td></td><td>false</td></tr><tr><td>AirdashOnCd</td><td></td><td>false</td></tr><tr><td>BackdashOnCd</td><td></td><td>false</td></tr><tr><td>ComboStartTime</td><td></td><td>nil</td></tr></tbody></table>

#### Code for reference

```lua
local An = require(game.ReplicatedStorage.Modules.AnimationModule)
local Lib = require(game.ReplicatedStorage.Modules.LibraryModule)

-- Initialize modules and properties
Framework.Animation = An()
Framework.Animation.Master = Framework
Framework.Library = Lib()
Framework.Library.Master = Framework
Framework.ProjApi = require(game.ReplicatedStorage.Modules.ProjectileModule)
Framework.Region3 = require(game.ReplicatedStorage.Modules.RotatedRegion3)
Framework.DefaultFPS = 60
Framework.RenderEffects = game.ReplicatedStorage.Remotes.RenderEffects
Framework.RbxAsset = "http://www.roblox.com/asset/?id="
Framework.EventAPI = require(game.ReplicatedStorage.Modules:WaitForChild("Event"))
Framework.EasingStyles = require(game.ReplicatedStorage.Modules:WaitForChild("_EASING"))
Framework.Caller = game["Run Service"]:IsClient() and "Client" or "Server"

-- Initialise base character reference
Framework.Character = Framework.Caller == "Client" and game.Players.LocalPlayer.Character or nil
Framework.Conditions, Framework.LocalConditions, Framework.ComboStats, Framework.Stats, Framework.Bindables, Framework.Remotes, Framework.Debuffs = nil

-- YieldService from Heartbeat
Framework.YieldService = game["Run Service"].Heartbeat

-- Default values and tables for tracking state
Framework.Hitboxes = {}
Framework.AttackDebounces = {}
Framework.HitboxesDebounces = {}
Framework.ComboEndedFunctions = {}
Framework.LastBuffer = tick()
Framework.LastGuardRise = tick()
Framework.LastGuardDown = tick()
Framework.LastGuard = tick()
Framework.CanRegenGuard = true
Framework.GuardBrokenTick = tick()
Framework.GuardBrokenCD = 6
Framework.HoldingGuardButton = false
Framework.AirAC = 1
Framework.LightAC = 1
Framework.HeavyAC = 1
Framework.UsedLAC = false
Framework.UsedHAC = false
Framework.UsedAAC = false
Framework.UsedAirX = false
Framework.UsedLC = false
Framework.UsedAirdash = false
Framework.AirdashOnCd = false
Framework.BackdashOnCd = false

-- New combo start time value
Framework.ComboStartTime = nil
```
