Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function GetGainData(pl,data)
- if (not pl.SSJ) then return end
- if pl.SSJ["Settings"][6] then
- local aim = data:GetMoveAngles()
- local fw, rt = aim:Forward(), aim:Right()
- local fm, sm = data:GetForwardSpeed(), data:GetSideSpeed()
- local mv = 32.3
- local wv = fw * fm + rt * sm
- local wishspd = wv:Length()
- wishspd = math.Clamp( wishspd, 0, mv )
- local wishdir = wv:GetNormal()
- local current = data:GetVelocity():Dot( wishdir )
- local addspeed = wishspd - current
- if addspeed <= 0 then return end
- if current <= 30 then
- gain = math.Round(((wishspd - math.abs(current)) / wishspd ), 1 )
- table.insert(pl.SSJ["Gains"],gain)
- end
- end
- end
- hook.Add( "SetupMove", "GetGainData", GetGainData )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement