Run it
Copy the script and paste it into your executor.
OrionLib = (
:(
)
)()
Window = OrionLib:({
Name = ,
HidePremium = ,
SaveConfig = ,
ConfigFolder = ,
})
PlayerTab = Window:({
Name = ,
Icon = ,
PremiumOnly = ,
})
Section = PlayerTab:({
Name = ,
})
PlayerTab:({
Name = ,
Min = ,
Max = ,
Default = ,
Color = .(, , ),
Increment = ,
ValueName = ,
Callback = (Value)
.Players.LocalPlayer.Character.Humanoid.WalkSpeed = Value
,
})
PlayerTab:({
Name = ,
Min = ,
Max = ,
Default = ,
Color = .(, , ),
Increment = ,
ValueName = ,
Callback = (Value)
.Players.LocalPlayer.Character.Humanoid.JumpPower = Value
,
})
PlayerTab:({
Name = ,
Callback = ()
InfiniteJumpEnabled =
:().JumpRequest:(()
InfiniteJumpEnabled
:().LocalPlayer.Character
:()
:()
)
,
})
Section = PlayerTab:({
Name = ,
})
PlayerTab:({
Name = ,
Callback = ()
(
:(
,
)
)()
,
})
PlayerTab:({
Name = ,
Callback = ()
ScreenGui = .()
Draggable = .()
Frame = .()
Frame_2 = .()
Time = .()
_1E = .()
UICorner = .()
_3E = .()
UICorner_2 = .()
SE = .()
UICorner_3 = .()
Path = .()
Top = .()
Top_2 = .()
ImageLabel = .()
TextLabel = .()
Exit = .()
Minizum = .()
Stop = .()
UICorner_4 = .()
IY = .()
UICorner_5 = .()
TextLabel_2 = .()
Wait = .()
ScreenGui.Name =
ScreenGui.Parent = :()
ScreenGui.ZIndexBehavior = .ZIndexBehavior.Sibling
ScreenGui.ResetOnSpawn =
Draggable.Name =
Draggable.Parent = ScreenGui
Draggable.BackgroundColor3 = .(, , )
Draggable.BackgroundTransparency =
Draggable.BorderSizePixel =
Draggable.Position = .(, , , )
Draggable.Size = .(, , , )
Frame.Name =
Frame.Parent = Draggable
Frame.BackgroundColor3 = .(, , )
Frame.BackgroundTransparency =
Frame.BorderColor3 = .(, , )
Frame.BorderSizePixel =
Frame.Position = .(-, , -, )
Frame.Size = .(, , , )
Frame_2.Name =
Frame_2.Parent = Frame
Frame_2.BackgroundColor3 = .(, , )
Frame_2.BorderColor3 = .(, , )
Frame_2.BorderSizePixel =
Frame_2.Position = .(-, , -, )
Frame_2.Size = .(, , , )
Frame_2.Active =
Frame_2.Draggable =
Time.Name =
Time.Parent = Frame_2
Time.BackgroundColor3 = .(, , )
Time.BackgroundTransparency =
Time.Position = .(, , , )
Time.Size = .(, , , )
Time.Font = .Font.GothamSemibold
Time.Text =
Time.TextColor3 = .(, , )
Time.TextScaled =
Time.TextSize =
Time.TextWrapped =
_1E.Name =
_1E.Parent = Frame_2
_1E.BackgroundColor3 = .(, , )
_1E.BorderSizePixel =
_1E.Position = .(, , , )
_1E.Size = .(, , , )
_1E.Font = .Font.SourceSans
_1E.Text =
_1E.TextColor3 = .(, , )
_1E.TextScaled =
_1E.TextSize =
_1E.TextWrapped =
UICorner.Parent = _1E
_3E.Name =
_3E.Parent = Frame_2
_3E.BackgroundColor3 = .(, , )
_3E.BorderSizePixel =
_3E.Position = .(, , , )
_3E.Size = .(, , , )
_3E.Font = .Font.SourceSans
_3E.Text =
_3E.TextColor3 = .(, , )
_3E.TextSize =
_3E.TextWrapped =
UICorner_2.Parent = _3E
SE.Name =
SE.Parent = Frame_2
SE.BackgroundColor3 = .(, , )
SE.BorderSizePixel =
SE.Position = .(, , , )
SE.Size = .(, , , )
SE.Font = .Font.SourceSans
SE.Text =
SE.TextColor3 = .(, , )
SE.TextSize =
SE.TextWrapped =
UICorner_3.Parent = SE
Path.Name =
Path.Parent = Frame_2
Path.BackgroundColor3 = .(, , )
Path.BackgroundTransparency =
Path.Position = .(, , , )
Path.Size = .(, , , )
Path.Font = .Font.GothamSemibold
Path.Text =
Path.TextColor3 = .(, , )
Path.TextScaled =
Path.TextSize =
Path.TextWrapped =
Top.Name =
Top.Parent = Frame_2
Top.BackgroundColor3 = .(, , )
Top.BorderColor3 = .(, , )
Top.BorderSizePixel =
Top.Position = .(-, , -, )
Top.Size = .(, , , )
Top_2.Name =
Top_2.Parent = Top
Top_2.BackgroundColor3 = .(, , )
Top_2.BorderColor3 = .(, , )
Top_2.BorderSizePixel =
Top_2.Position = .(, , , )
Top_2.Size = .(, , , )
ImageLabel.Parent = Top
ImageLabel.BackgroundColor3 = .(, , )
ImageLabel.BackgroundTransparency =
ImageLabel.Position = .(, , , )
ImageLabel.Size = .(, , , )
ImageLabel.Image =
TextLabel.Parent = ImageLabel
TextLabel.BackgroundColor3 = .(, , )
TextLabel.BackgroundTransparency =
TextLabel.Position = .(, , , )
TextLabel.Size = .(, , , )
TextLabel.Font = .Font.GothamSemibold
TextLabel.Text =
TextLabel.TextColor3 = .(, , )
TextLabel.TextScaled =
TextLabel.TextSize =
TextLabel.TextStrokeColor3 = .(, , )
TextLabel.TextWrapped =
Exit.Name =
Exit.Parent = Top
Exit.BackgroundColor3 = .(, , )
Exit.BackgroundTransparency =
Exit.Position = .(, , , )
Exit.Size = .(, , , )
Exit.Font = .Font.GothamSemibold
Exit.Text =
Exit.TextColor3 = .(, , )
Exit.TextScaled =
Exit.TextSize =
Exit.TextWrapped =
Minizum.Name =
Minizum.Parent = Top
Minizum.BackgroundColor3 = .(, , )
Minizum.BackgroundTransparency =
Minizum.Position = .(, , , )
Minizum.Size = .(, , , )
Minizum.Font = .Font.GothamSemibold
Minizum.Text =
Minizum.TextColor3 = .(, , )
Minizum.TextScaled =
Minizum.TextSize =
Minizum.TextWrapped =
Stop.Name =
Stop.Parent = Frame_2
Stop.BackgroundColor3 = .(, , )
Stop.BorderSizePixel =
Stop.Position = .(, , , )
Stop.Size = .(, , , )
Stop.Font = .Font.SourceSans
Stop.Text =
Stop.TextColor3 = .(, , )
Stop.TextSize =
Stop.TextWrapped =
UICorner_4.Parent = Stop
IY.Name =
IY.Parent = Frame_2
IY.BackgroundColor3 = .(, , )
IY.BorderSizePixel =
IY.Position = .(, , , )
IY.Size = .(, , , )
IY.Font = .Font.SourceSans
IY.Text =
IY.TextColor3 = .(, , )
IY.TextScaled =
IY.TextSize =
IY.TextWrapped =
UICorner_5.Parent = IY
TextLabel_2.Parent = Frame_2
TextLabel_2.BackgroundColor3 = .(, , )
TextLabel_2.BackgroundTransparency =
TextLabel_2.Position = .(, , , )
TextLabel_2.Size = .(, , , )
TextLabel_2.Font = .Font.GothamSemibold
TextLabel_2.Text =
TextLabel_2.TextColor3 = .(, , )
TextLabel_2.TextSize =
TextLabel_2.TextWrapped =
TextLabel_2.TextXAlignment = .TextXAlignment.Left
Wait.Name =
Wait.Parent = Frame_2
Wait.BackgroundColor3 = .(, , )
Wait.BackgroundTransparency =
Wait.Position = .(, , , )
Wait.Size = .(, , , )
Wait.ZIndex =
Wait.ClearTextOnFocus =
Wait.Font = .Font.GothamSemibold
Wait.Text =
Wait.TextColor3 = .(, , )
Wait.TextSize =
Wait.TextWrapped =
notification = .()
notification.Parent = :()
notification.SoundId =
notification.Volume =
notification.Name =
Exit.MouseButton1Click:(()
ScreenGui:()
)
Mute =
IY.MouseButton1Click:(()
Mute =
)
_1E.MouseButton1Click:(()
Mute =
Mute ==
()
_, sound , :()
sound:()
sound:()
)
_3E.MouseButton1Click:(()
_, sound , :()
sound:()
sound:()
)
Active =
SE.MouseButton1Click:(()
Active =
Active ==
StringValue = Wait.Text
(StringValue)
_, sound , :()
sound:()
sound:()
)
Stop.MouseButton1Click:(()
Active =
)
notification:()
:():(, {
Title = ,
Text = ,
Icon = ,
Duration = ,
Button1 = ,
})
()
setting =
:().RespectFilteringEnabled
setting ==
Time.TextColor = BrickColor.(, , )
Time.Text =
setting ==
Time.Text =
Time.TextColor = BrickColor.(, , )
,
})
PlayerTab:({
Name = ,
Callback = ()
(
:(
)
)()
,
})
PlayerTab:({
Name = ,
Callback = ()
(
:(
)
)()
,
})
PlayerTab:({
Name = ,
Callback = ()
(:())()
,
})
OtherTab = Window:({
Name = ,
Icon = ,
PremiumOnly = ,
})
Section = OtherTab:({
Name = ,
})
OtherTab:({
Name = ,
Callback = ()
(
:(
)
)()
,
})
OtherTab:({
Name = ,
Callback = ()
(
:(
)
)()
,
})
OtherTab = Window:({
Name = ,
Icon = ,
PremiumOnly = ,
})
Section = OtherTab:({
Name = ,
})
OtherTab:({
Name = ,
Callback = ()
permadeath =
fling =
allowshiftlock =
ctrltp =
placeholders =
clickfling =
highlightflingtargets =
discharscripts =
flingchangestate =
hidedeatheffect =
respawntp =
breakjointsmethod =
simrad =
(
:(
)
)()
,
})
OtherTab:({
Name = ,
Callback = ()
permadeath =
fling =
allowshiftlock =
ctrltp =
placeholders =
clickfling =
highlightflingtargets =
discharscripts =
flingchangestate =
hidedeatheffect =
respawntp =
breakjointsmethod =
simrad =
(
:(
)
)()
,
})
OtherTab:({
Name = ,
Callback = ()
permadeath =
fling =
allowshiftlock =
ctrltp =
placeholders =
clickfling =
highlightflingtargets =
discharscripts =
flingchangestate =
hidedeatheffect =
respawntp =
breakjointsmethod =
simrad =
(
:(
)
)()
,
})
OtherTab:({
Name = ,
Callback = ()
permadeath =
fling =
allowshiftlock =
ctrltp =
placeholders =
clickfling =
highlightflingtargets =
discharscripts =
flingchangestate =
hidedeatheffect =
respawntp =
breakjointsmethod =
simrad =
(
:(
)
)()
,
})
OtherTab:({
Name = ,
Callback = ()
permadeath =
fling =
allowshiftlock =
ctrltp =
placeholders =
clickfling =
highlightflingtargets =
discharscripts =
flingchangestate =
hidedeatheffect =
respawntp =
breakjointsmethod =
simrad =
(
:(
)
)()
,
})
OtherTab:({
Name = ,
Callback = ()
permadeath =
fling =
allowshiftlock =
ctrltp =
placeholders =
clickfling =
highlightflingtargets =
discharscripts =
flingchangestate =
hidedeatheffect =
respawntp =
breakjointsmethod =
simrad =
(
:(
)
)()
,
})
OtherTab:({
Name = ,
Callback = ()
DisableRedAnimatedText =
permadeath =
fling =
allowshiftlock =
ctrltp =
placeholders =
clickfling =
highlightflingtargets =
discharscripts =
flingchangestate =
hidedeatheffect =
respawntp =
breakjointsmethod =
simrad =
(
:(
)
)()
,
})
OtherTab:({
Name = ,
Callback = ()
permadeath =
fling =
allowshiftlock =
ctrltp =
placeholders =
clickfling =
highlightflingtargets =
discharscripts =
flingchangestate =
hidedeatheffect =
respawntp =
breakjointsmethod =
simrad =
(
:(
)
)()
,
})
OtherTab:({
Name = ,
Callback = ()
permadeath =
fling =
allowshiftlock =
ctrltp =
placeholders =
clickfling =
highlightflingtargets =
discharscripts =
flingchangestate =
hidedeatheffect =
respawntp =
breakjointsmethod =
simrad =
(
:(
)
)()
,
})
Section = OtherTab:({
Name = ,
})
OtherTab:({
Name = ,
Callback = ()
osclock = .clock
tspawn = .spawn
twait = .wait
schar = .char
ssub = .sub
sfind = .find
supper = .upper
mrandom = .random
sin = .sin
cos = .cos
abs = .abs
min = .min
clamp = .clamp
tinsert = .insert
tclear = .clear
tclone = .clone
tfind = .find
=
=
=
=
=
=
replicatesignal = replicatesignal
i = .new
v2 = .new
v3 = .new
c3 = .new
cf = .new
cfl = .lookAt
angles = .fromEulerAngles
u2 = .new
e =
rp = RaycastParams.new
cs = ColorSequence.new
csk = ColorSequenceKeypoint.new
sine = ()
deltaTime =
v3_0 = ()
v3_101 = (, , )
v3_010 = (, , )
cf_0 = ()
v3_xz = v3_101 *
v3_xzL = v3_101 *
v3_net = v3_010 *
pdloadedtime =
rs = ()
s =
i = , (, )
() ==
s = s .. ((, ))
s = s .. ((, ))
s
getMetamethodFromErrorStack = (userdata, f, test)
ret =
(f, ()
ret = debug.(, )
, userdata, , )
((ret) ~= ) (ret)
f
ret
insSet = (, (a, b, c)
a[b] = c
, (f)
a = ()
b = ()
(a, , b)
a.Name == b
)
insGet = (, (a, b)
a[b]
, (f)
a = ()
b = ()
a.Name = b
(a, ) == b
)
cfGet = (cf_0, (a, b)
a[b]
, (f)
((, , ), ) == (, , )
)
cfMul = (cf_0, (a, b)
a * b
, (f)
(, , ) * (, , )
== ((, , ), (, , ))
)
cfAdd = (cf_0, (a, b)
a + b
, (f)
(, , ) + (, , ) == ((, , ), (, , ))
)
v3Get = (v3_0, (a, b)
a[b]
, (f)
(, , ).Unit == ((, , ), )
)
Clone = (, )
ClearAllChildren = (, )
Destroy = (, )
IsA = (, )
FindFirstChildOfClass = (, )
FindFirstChildWhichIsA = (, )
GetChildren = (, )
GetDescendants = (, )
IsDescendantOf = (, )
GetPropertyChangedSignal = (
,
)
plrs = (, )
rus = (, )
ws = (, )
uis = (, )
gs = (, )
sg = (, )
lp = (plrs, )
pg = (lp, )
mouse = (lp, )(lp)
cdsb = (lp, )
rst = (plrs, ) +
preanimation = (rus, )
heartbeat = (rus, )
renderstepped = (rus, )
GetPlayers = (plrs, )
SetCoreGuiEnabled = (sg, )
GetCoreGuiEnabled = (sg, )
Raycast = (ws, )
Connect = heartbeat.Connect
Disconnect = (
(, ),
).Disconnect
Wait = heartbeat.Wait
GetMouseLocation = (uis, )
GetFocusedTextBox = (uis, )
GetMouseDelta = (uis, )
IsMouseButtonPressed = (uis, )
IsKeyDown = (uis, )
Inverse = (cf_0, )
Lerp = (cf_0, )
guiTheme = {
guiTitle = ,
windowTitleColor = (, , ),
windowTopColor = (, , ),
windowBottomColor = (, , ),
windowMinimizedSize = { X = , Y = },
windowRegularSize = { X = , Y = },
buttonsTextColor = (, , ),
labelsTextColor = (, , ),
listTopColor = (, , ),
listBottomColor = (, , ),
}
accessorylimbs = {
{
meshid = ,
textureid = ,
C0 = cf_0,
Name = ,
},
{
meshid = ,
textureid = ,
C0 = cf_0,
Name = ,
},
{
meshid = ,
textureid = ,
C0 = (, , ),
Name = ,
},
{
meshid = ,
textureid = ,
C0 = (, , ),
Name = ,
},
{
meshid = ,
textureid = ,
C0 = (, , ),
Name = ,
},
{
meshid = ,
textureid = ,
C0 = (-, , ),
Name = ,
},
{
meshid = ,
textureid = ,
C0 = (, , ),
Name = ,
},
{
meshid = ,
textureid = ,
C0 = (-, , ),
Name = ,
},
{
meshid = ,
textureid = ,
C0 = (, , ),
Name = ,
},
{
meshid = ,
textureid = ,
C0 = (-, , ),
Name = ,
},
{
meshid = ,
textureid = ,
C0 = (, , ),
Name = ,
},
{
meshid = ,
textureid = ,
C0 = (, , ),
Name = ,
},
{
meshid = ,
textureid = ,
C0 = (, , -) * (
-,
-,
),
Name = ,
},
{
meshid = ,
textureid = ,
C0 = (, -, -) * (
,
,
-
),
Name = ,
},
{
meshid = ,
textureid = ,
C0 = cf_0,
Name = ,
},
{
meshid = ,
textureid = ,
C0 = cf_0,
Name = ,
},
{
meshid = ,
textureid = ,
C0 = (, , ),
Name = ,
},
{
meshid = ,
textureid = ,
C0 = (, -, ),
Name = ,
},
{
meshid = ,
textureid = ,
C0 = (, , ),
Name = ,
},
{
meshid = ,
textureid = ,
C0 = (, , ),
Name = ,
},
{
meshid = ,
textureid = ,
C0 = (, , ),
Name = ,
},
{
meshid = ,
textureid = ,
C0 = (-, , ),
Name = ,
},
{
meshid = ,
textureid = ,
C0 = cf_0,
Name = ,
},
{
meshid = ,
textureid = ,
C0 = cf_0,
Name = ,
},
{
meshid = ,
textureid = ,
C0 = cf_0,
Name = ,
},
{
meshid = ,
textureid = ,
C0 = cf_0,
Name = ,
},
{
meshid = ,
textureid = ,
C0 = (, , ),
Name = ,
},
{
meshid = ,
textureid = ,
C0 = (-, , ) * (
-,
,
),
Name = ,
},
{
meshid = ,
textureid = ,
C0 = (, -, ) * (
-,
-,
),
Name = ,
},
{
meshid = ,
textureid = ,
C0 = (, , ) * (
,
-,
),
Name = ,
},
{
meshid = ,
textureid = ,
C0 = (-, -, ) * (
,
,
),
Name = ,
},
{
meshid = ,
textureid = ,
C0 = (, , ) * (
-,
-,
),
Name = ,
},
{
meshid = ,
textureid = ,
C0 = (-, -, ) * (
-,
,
),
Name = ,
},
{
meshid = ,
textureid = ,
C0 = (, -, ) * (
,
-,
),
Name = ,
},
{
meshid = ,
textureid = ,
C0 = (-, , ) * (
,
,
),
Name = ,
},
{
meshid = ,
textureid = ,
C0 = (, , ),
Name = ,
},
}
gp = (p, n, cl)
i, v , (p)
(v, cl) ((v, ) == n)
v
timegp = (p, n, c, t)
t = () + t
t > ()
i, v , (p)
(v, c) ((v, ) == n)
v
(preanimation)
makeplaceholder = (v)
(v, )
(v, , )
v = (v)
i, v , (v)
(v, )
(v, , ())
(v)
(v)
(v, , ())
(v, , )
(v, , )
(v, , )
v
emptyfunction = ()
i1 = ()
i2 = ()
i3 = ()
i4 = ()
i5 = ()
i6 = ()
i7 = ()
i8 = ()
i9 = ()
i10 = ()
(i1, , (, ))
(i1, , )
(i1, , )
(i1, , )
(
i1,
,
(, , , guiTheme.windowRegularSize.Y / -)
)
(
i1,
,
(, guiTheme.windowRegularSize.X, , guiTheme.windowRegularSize.Y)
)
(i1, , ())
(i1, , i10)
(i2, , (, , ))
(i2, , )
(
i2,
,
(, guiTheme.windowRegularSize.X, , guiTheme.windowRegularSize.Y)
)
(i2, , ())
(i2, , i1)
(i3, , (, , ))
(i3, , )
(i3, , (, , , guiTheme.windowMinimizedSize.Y - ))
(
i3,
,
(
,
-,
,
guiTheme.windowRegularSize.Y
- guiTheme.windowMinimizedSize.Y
-
)
)
(i3, , ())
(i3, , i2)
(i4, , )
(i4, , )
(i4, , )
(i4, , (, -, , ))
(i4, , e.AutomaticSize.Y)
(i4, , (, , , ))
(i4, , )
(i4, , ())
(i4, , i3)
(i5, , ())
(i5, , i4)
(i5, , e.SortOrder.LayoutOrder)
(i6, , ())
(i6, , i3)
(
i6,
,
({
(, guiTheme.listTopColor),
(, guiTheme.listBottomColor),
})
)
(i6, , )
(i7, , e.Font.SourceSans)
(i7, , e.FontSize.Size18)
(i7, , )
(i7, , guiTheme.guiTitle)
(i7, , guiTheme.windowTitleColor)
(i7, , )
(i7, , (, ))
(i7, , )
(
i7,
,
(, , , guiTheme.windowMinimizedSize.Y / )
)
(i7, , ())
(i7, , i2)
(i8, , (, ))
(i8, , )
(i8, , (, , , ))
(i8, , (, , , guiTheme.windowMinimizedSize.Y))
(i8, , ())
(i8, , i2)
(i8, , e.Font.SourceSans)
(i8, , e.FontSize.Size18)
(i8, , )
(i8, , (, , ))
(i8, , )
(i9, , ())
(i9, , i2)
(
i9,
,
({
(, guiTheme.windowTopColor),
(, guiTheme.windowBottomColor),
})
)
(i9, , )
(i10, , e.ZIndexBehavior.Sibling)
(i10, , )
(i10, , )
(i10, , )
(i10, , ())
guimin =
minloop =
i1X = guiTheme.windowRegularSize.X
i1Y = guiTheme.windowRegularSize.Y
i1Xdest = i1X
i1Ydest = i1Y
((i8, ), ()
guimin = guimin
guimin
i1Xdest = guiTheme.windowMinimizedSize.X
i1Ydest = guiTheme.windowMinimizedSize.Y
i1Xdest = guiTheme.windowRegularSize.X
i1Ydest = guiTheme.windowRegularSize.Y
minloop
minloop =
(i3, , )
sine = ()
lastsine = sine
sine = ()
deltaTime = (sine - lastsine) *
lastsine = sine
difX = i1Xdest - i1X
difY = i1Ydest - i1Y
((difY) <= ) ((difX) <= )
i1X = i1Xdest
i1Y = i1Ydest
(i1, , (, i1X, , i1Y))
i1X = i1X + difX * deltaTime
i1Y = i1Y + difY * deltaTime
(i1, , (, i1X, , i1Y))
()
(i3, , guimin)
minloop =
)
Draggable = (window, obj)
MB1enum = e.UserInputType.MouseButton1
TOUCHenum = e.UserInputType.Touch
obj = obj window
activeEntered =
mouseStart =
dragStart =
inputbegancon =
rendersteppedcon =
inputendedcon =
inputendedf = (a)
a = (a, )
(a == MB1enum) (a == TOUCHenum)
(rendersteppedcon)
(inputendedcon)
rendersteppedf = ()
off = (uis) - mouseStart
(window, , dragStart + (, off.X, , off.Y))
inputbeganf = (a)
a = (a, )
((a == MB1enum) (a == TOUCHenum))
(activeEntered == )
(uis)
mouseStart = (uis)
dragStart = (window, )
rendersteppedcon
(rendersteppedcon)
rendersteppedcon = (renderstepped, rendersteppedf)
inputendedcon
(inputendedcon)
inputendedcon = (
(uis, ),
inputendedf
)
((obj, ), ()
inputbegancon
(inputbegancon)
inputbegancon = ((uis, ), inputbeganf)
)
((obj, ), ()
(inputbegancon)
)
ondes = (d)
(d, )
thisEntered =
thisAdded =
con0 = ((d, ), ()
thisEntered =
thisAdded (d, )
activeEntered = activeEntered +
thisAdded =
)
con1 = ((d, ), ()
thisEntered =
thisAdded
activeEntered = activeEntered -
thisAdded =
)
con2 = (
(d, ),
()
thisEntered
thisAdded (d, )
activeEntered = activeEntered -
thisAdded =
(d, ) thisAdded
activeEntered = activeEntered +
thisAdded =
)
con3 =
con3 = ((d, ), ()
(d, window)
thisAdded
activeEntered = activeEntered -
(con0)
(con1)
(con2)
(con3)
)
((window, ), ondes)
i, v , (window)
(v)
btn = (txt, f)
i1 = ()
i2 = ()
(i1, , e.Font.SourceSans)
(i1, , e.FontSize.Size14)
(i1, , txt)
(i1, , )
(i1, , (, , , ))
(i1, , guiTheme.buttonsTextColor)
(i1, , ())
(i1, , i2)
(i2, , )
(i2, , )
(i2, , (, , , ))
(i2, , ())
f
((i2, ), f)
(i2, , i4)
i1
lbl = (txt)
i1 = ()
i2 = ()
(i1, , e.Font.SourceSans)
(i1, , e.FontSize.Size14)
(i1, , txt)
(i1, , )
(i1, , guiTheme.labelsTextColor)
(i1, , (, , ))
(i1, , )
(i1, , ())
(i1, , i2)
(i2, , (, , , ))
(i2, , )
(i2, , ())
(i2, , i4)
i1
(i1)
()
()
allowshiftlock =
ctrltp =
placeholders =
clickfling =
highlightflingtargets =
discharscripts =
flingchangestate =
respawntp =
breakjointsmethod =
simrad =
hidedeatheffect =
c =
stopreanimate = ()
c
c =
replicatesignal
(cdsb)
reanimate = ()
novoid =
speedlimit =
retVelTime =
walkSpeed =
jumpPower =
gravity =
ctrlclicktp = ctrltp
clickfling = clickfling
flingvel = (, , )
()
c = (lp, )
(c (c, ws))
rootpart = (c, , )
(c, , )
(c, , )
(
c,
,
,
)
(c, )
rootpart
cam =
refcam = ()
newcam = (ws, )
newcam
((ws, ))
newcam = (ws, )
cam = newcam
()
camcf = (cam, )
enumCamS = e.CameraType.Scriptable
camt = (cam, )
camcon0 =
camcon1 =
camcon2 =
onnewcamera = ()
()
camcon0
(camcon0)
(camcon1)
camcon0 =
c
(cam, ) == enumCamS
(cam, , camt)
(camcon2)
camcon0 = (
(cam, ),
()
(cam, ) ~= camcf
(cam, , camcf)
)
camcon1 = (
(cam, ),
()
(cam, ) ~= enumCamS
(cam, , enumCamS)
)
(cam, ) ~= enumCamS
(cam, , enumCamS)
(cam, ) ~= camcf
(cam, , camcf)
camcon2 = (
(ws, ),
onnewcamera
)
()
velYdelta = (ws, ) *
((ws, ), ()
velYdelta = (ws, ) *
)
fpdh = (ws, )
novoid = novoid (fpdh + )
Yvel =
cfr = (rootpart, )
pos = (cfr, )
cfr = (pos, pos + (cfr, ) * v3_101)
primarypart =
shiftlock =
firstperson =
xzvel = v3_0
v3_0150 = v3_010 *
camcfLV = (camcf, )
camrot = (v3_0, camcfLV)
camcfRV = (camrot, )
cammag = -(
((camcf, ) - (pos + v3_0150)),
)
R6parts = {
head = { Name = },
torso = { Name = },
root = { Name = },
leftArm = { Name = },
rightArm = { Name = },
leftLeg = { Name = },
rightLeg = { Name = },
}
rootpart = R6parts.root
cframes = {}
i, v , R6parts
cframes[v] = cfr
joints = {
{
Name = ,
Part0 = R6parts.torso,
Part1 = R6parts.head,
C0 = (, , , -, , , , , , , , -),
C1 = (, -, , -, , , , , , , , -),
},
{
Name = ,
Part0 = rootpart,
Part1 = R6parts.torso,
C0 = (, , , -, , , , , , , , -),
C1 = (, , , -, , , , , , , , -),
},
{
Name = ,
Part0 = R6parts.torso,
Part1 = R6parts.rightArm,
C0 = (, , , , , , , , -, -, , ),
C1 = (-, , , , , , , , -, -, , ),
},
{
Name = ,
Part0 = R6parts.torso,
Part1 = R6parts.leftArm,
C0 = (-, , , , , -, , , , , , ),
C1 = (, , , , , -, , , , , , ),
},
{
Name = ,
Part0 = R6parts.torso,
Part1 = R6parts.rightLeg,
C0 = (, -, , , , , , , -, -, , ),
C1 = (, , , , , , , , -, -, , ),
},
{
Name = ,
Part0 = R6parts.torso,
Part1 = R6parts.leftLeg,
C0 = (-, -, , , , -, , , , , , ),
C1 = (-, , , , , -, , , , , , ),
},
}
refreshedjoints = {}
refreshjointsI = nil
refreshjointsI = function(part)
tinsert(refreshedjoints, part)
for i, v in next, joints do
local part0 = v.Part0
local part1 = v.Part1
if part1 and (part0 == part) then
cframes[part1] = cfMul(
cframes[part],
cfMul(v.C0, Inverse(v.C1))
)
if not tfind(refreshedjoints, part1) then
refreshjointsI(part1)
end
elseif part0 and (part1 == part) then
cframes[part0] = cfMul(
cframes[part],
cfMul(v.C1, Inverse(v.C0))
)
if not tfind(refreshedjoints, part0) then
refreshjointsI(part0)
end
end
end
end
refreshjointsI(rootpart)
tclear(refreshedjoints)
local attachments = {
RightShoulderAttachment = {
R6parts.rightArm,
cf(0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
},
RightGripAttachment = {
R6parts.rightArm,
cf(0, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
},
LeftFootAttachment = {
R6parts.leftLeg,
cf(0, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
},
LeftShoulderAttachment = {
R6parts.leftArm,
cf(0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
},
LeftGripAttachment = {
R6parts.leftArm,
cf(0, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
},
RootAttachment = {
rootpart,
cf(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
},
RightFootAttachment = {
R6parts.rightLeg,
cf(0, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
},
NeckAttachment = {
R6parts.torso,
cf(0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
},
BodyFrontAttachment = {
R6parts.torso,
cf(0, 0, -0.5, 1, 0, 0, 0, 1, 0, 0, 0, 1),
},
BodyBackAttachment = {
R6parts.torso,
cf(0, 0, 0.5, 1, 0, 0, 0, 1, 0, 0, 0, 1),
},
LeftCollarAttachment = {
R6parts.torso,
cf(-1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
},
RightCollarAttachment = {
R6parts.torso,
cf(1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
},
WaistFrontAttachment = {
R6parts.torso,
cf(0, -1, -0.5, 1, 0, 0, 0, 1, 0, 0, 0, 1),
},
WaistCenterAttachment = {
R6parts.torso,
cf(0, -1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
},
WaistBackAttachment = {
R6parts.torso,
cf(0, -1, 0.5, 1, 0, 0, 0, 1, 0, 0, 0, 1),
},
HairAttachment = {
R6parts.head,
cf(0, 0.6, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
},
HatAttachment = {
R6parts.head,
cf(0, 0.6, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
},
FaceFrontAttachment = {
R6parts.head,
cf(0, 0, -0.6, 1, 0, 0, 0, 1, 0, 0, 0, 1),
},
FaceCenterAttachment = {
R6parts.head,
cf(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),
},
}
local getPart = function(name, blacklist)
if blacklist then
for i, v in next, cframes do
if (i.Name == name) and not tfind(blacklist, i) then
return i
end
end
else
for i, v in next, cframes do
if i.Name == name then
return i
end
end
end
return nil
end
local getJoint = function(name)
for i, v in next, joints do
if v.Name == name then
return v
end
end
return { C0 = cf_0, C1 = cf_0 }
end
local getPartFromMesh = function(m, t, blacklist)
if blacklist then
for v, _ in next, cframes do
if
v.m
and (not tfind(blacklist, v))
and sfind(v.m, m)
and sfind(v.t, t)
then
return v
end
end
else
for v, _ in next, cframes do
if v.m and sfind(v.m, m) and sfind(v.t, t) then
return v
end
end
end
local p = { m = m, t = t }
cframes[p] = cfr
local j = { C0 = cf_0, C1 = cf_0, Part0 = p }
p.j = j
return p
end
local getPartJoint = function(p)
if cframes[p] then
local j = p.j
if j then
return j
end
for i, v in next, joints do
if v.Part0 == p then
return v
end
end
for i, v in next, joints do
if v.Part1 == p then
return v
end
end
end
return nil
end
local getAccWeldFromMesh = function(m, t)
return getPartJoint(getPartFromMesh(m, t))
end
local raycastparams = rp()
raycastparams.FilterType = e.RaycastFilterType.Exclude
raycastparams.RespectCanCollide = true
local rayfilter = {}
local characters = {}
local refreshrayfilter = function()
tclear(rayfilter)
for i, v in next, characters do
tinsert(rayfilter, v)
end
raycastparams.FilterDescendantsInstances = rayfilter
end
local flingtable = {}
local rootparts = {}
for i, v in next, accessorylimbs do
v.p = getPart(v.Name)
end
local makePartCons = function(p, t)
if (t.p == p) and insGet(p, 'Anchored') then
t.p = nil
end
local con0 = Connect(
GetPropertyChangedSignal(p, 'Anchored'),
function()
if insGet(p, 'Anchored') then
if t.p == p then
t.c = nil
t.p = nil
end
elseif not t.p then
t.p = p
end
end
)
local con1 = nil
con1 = Connect(insGet(p, 'AncestryChanged'), function()
if not IsDescendantOf(p, ws) then
Disconnect(con0)
Disconnect(con1)
if t.p == p then
t.p = nil
end
end
end)
end
local ondes = nil
ondes = function(v)
if c and IsA(v, 'Attachment') and IsDescendantOf(c, ws) then
local v1 = attachments[insGet(v, 'Name')]
if v1 then
local p = insGet(v, 'Parent')
if insGet(p, 'Parent') ~= c then
local meshid = nil
local textureid = nil
if IsA(p, 'MeshPart') then
meshid = insGet(p, 'MeshId')
textureid = insGet(p, 'TextureID')
elseif IsA(p, 'BasePart') then
local sm = FindFirstChildOfClass(
p,
'SpecialMesh'
)
if sm then
meshid = insGet(sm, 'MeshId')
textureid = insGet(sm, 'TextureId')
else
return
end
else
return
end
for i, _ in next, cframes do
if (meshid == i.m) and (textureid == i.t) then
local p1 = i.p
if p1 and IsDescendantOf(p1, c) then
if p1 == p then
return
end
else
i.p = p
makePartCons(p, i)
return
end
else
local j = i.j
if
j
and sfind(meshid, i.m)
and sfind(textureid, i.t)
then
i.m = meshid
i.t = textureid
i.l = insGet(p, 'Position')
i.p = p
makePartCons(p, i)
i.j = nil
i.Name = insGet(p, 'Name')
j.C0 = insGet(v, 'CFrame')
j.C1 = v1[2]
j.Part1 = v1[1]
tinsert(joints, j)
return
end
end
end
for i, l in next, accessorylimbs do
if
l.p
and sfind(meshid, l.meshid)
and sfind(textureid, l.textureid)
then
local t = {
Name = insGet(p, 'Name'),
l = insGet(p, 'Position'),
m = meshid,
t = textureid,
p = p,
}
makePartCons(p, t)
if placeholders then
t.v = makeplaceholder(p)
t.b = false
end
cframes[t] = insGet(p, 'CFrame')
tinsert(joints, {
Part0 = t,
Part1 = l.p,
C0 = l.C0,
C1 = cf_0,
})
l.p = nil
return
end
end
local t = {
Name = insGet(p, 'Name'),
l = insGet(p, 'Position'),
m = meshid,
t = textureid,
p = p,
}
makePartCons(p, t)
if placeholders then
t.v = makeplaceholder(p)
t.b = false
end
cframes[t] = insGet(p, 'CFrame')
tinsert(joints, {
Part0 = t,
Part1 = v1[1],
C0 = insGet(v, 'CFrame'),
C1 = v1[2],
})
end
end
end
end
local simradv = 0
local charcons = {}
local enumH = e.CoreGuiType.Health
local onplayer = function(v)
simradv = simradv + 1000
local islp = v == lp
local lastc = nil
local oncharacter = function()
local newc = insGet(v, 'Character')
if c and newc and (newc ~= lastc) then
lastc = newc
characters[v] = newc
refreshrayfilter()
if islp then
if discharscripts then
Connect(
insGet(newc, 'DescendantAdded'),
discharscripts
)
for i, v in next, GetDescendants(newc) do
if IsA(v, 'Script') then
insSet(v, 'Disabled', true)
end
end
end
local hrp = timegp(
newc,
'HumanoidRootPart',
'BasePart',
10
)
if not (hrp and c and IsDescendantOf(newc, ws)) then
return
end
c = newc
local fi, fv = next(flingtable)
if fi then
if replicatesignal and not pdloadedtime then
replicatesignal(cdsb)
pdloadedtime = osclock() + rst
end
if flingchangestate == 3 then
local hum = FindFirstChildOfClass(
c,
'Humanoid'
)
if hum then
insGet(hum, 'ChangeState')(
hum,
e.HumanoidStateType.Physics
)
insGet(hum, 'SetStateEnabled')(
hum,
e.HumanoidStateType.Seated,
false
)
end
elseif flingchangestate == 1 then
local hum = FindFirstChildOfClass(
c,
'Humanoid'
)
if hum then
insGet(hum, 'ChangeState')(
hum,
e.HumanoidStateType.Physics
)
end
elseif flingchangestate == 2 then
local hum = FindFirstChildOfClass(
c,
'Humanoid'
)
if hum then
insGet(hum, 'SetStateEnabled')(
hum,
e.HumanoidStateType.Seated,
false
)
end
end
for i, v in next, tclone(flingtable) do
if not c then
return
end
local startpos = insGet(i, 'Position')
local stoptime = sine + 3
while true do
twait()
if sine > stoptime then
break
end
if
insGet(i, 'Anchored')
or not IsDescendantOf(i, ws)
then
break
end
if
v3Get(
(
startpos
- insGet(i, 'Position')
),
'Magnitude'
) > 200
then
break
end
local tcf = cfAdd(
insGet(i, 'CFrame'),
insGet(i, 'AssemblyLinearVelocity')
* (sin(sine * 15) + 1)
)
if
novoid
and (cfGet(tcf, 'Y') < novoid)
then
tcf = cfAdd(
tcf,
v3_010
* (novoid - cfGet(tcf, 'Y'))
)
end
insSet(hrp, 'CFrame', tcf)
insSet(
hrp,
'AssemblyLinearVelocity',
insGet(i, 'AssemblyLinearVelocity')
* v3_101
* 75
)
insSet(
hrp,
'AssemblyAngularVelocity',
flingvel
)
end
if v then
Destroy(v)
end
flingtable[i] = nil
end
insSet(hrp, 'AssemblyLinearVelocity', v3_0)
insSet(hrp, 'AssemblyAngularVelocity', v3_0)
insSet(hrp, 'CFrame', cfr)
twait(0.17)
end
if respawntp == 1 then
local startpos = pos
+ v3(mrandom(-32, 32), 0, mrandom(-32, 32))
local dir = nil
local poscheck = true
while poscheck do
poscheck = false
for i, v in next, rootparts do
local diff = (
startpos
- insGet(v, 'Position')
) * v3_101
if v3Get(diff, 'Magnitude') < 10 then
poscheck = true
dir = dir
or (v3Get(diff, 'Unit') * 3)
startpos = startpos + dir
end
end
local diff = (startpos - pos) * v3_101
if v3Get(diff, 'Magnitude') < 10 then
poscheck = true
dir = dir or (v3Get(diff, 'Unit') * 3)
startpos = startpos + dir
end
end
startpos = cfAdd(
cfGet(cfr, 'Rotation'),
startpos
)
insSet(hrp, 'CFrame', startpos)
insSet(hrp, 'AssemblyLinearVelocity', v3_0)
insSet(hrp, 'AssemblyAngularVelocity', v3_0)
twait(0.17)
elseif respawntp == 2 then
insSet(
hrp,
'CFrame',
cfAdd(
cfr,
cfGet(cfr, 'RightVector') * 3.5
- cfGet(cfr, 'LookVector') * 3.5
)
)
insSet(hrp, 'AssemblyLinearVelocity', v3_0)
insSet(hrp, 'AssemblyAngularVelocity', v3_0)
twait(0.17)
elseif respawntp == 3 then
local t = osclock() + 0.17
if pdloadedtime and pdloadedtime > t then
t = pdloadedtime
end
local startcf = cfAdd(
cfMul(
cfGet(cfr, 'Rotation'),
angles(1.5707963267948966, 0, 0)
),
pos * v3_101
+ v3_010
* min(
fpdh + 30,
v3Get(pos, 'Y') - 5
)
)
while twait() do
insSet(hrp, 'CFrame', startcf)
insSet(hrp, 'AssemblyLinearVelocity', v3_0)
insSet(hrp, 'AssemblyAngularVelocity', v3_0)
if osclock() > t then
break
end
end
end
if newc ~= c then
return
end
primarypart = insGet(newc, 'PrimaryPart') or hrp
if
hidedeatheffect
and GetCoreGuiEnabled(sg, enumH)
then
SetCoreGuiEnabled(sg, enumH, false)
end
if pdloadedtime then
if osclock() < pdloadedtime then
twait(pdloadedtime - osclock())
end
pdloadedtime = nil
end
if breakjointsmethod == 1 then
insGet(newc, 'BreakJoints')(newc)
local h = FindFirstChildOfClass(
newc,
'Humanoid'
)
if h then
insSet(h, 'Health', 0)
end
elseif breakjointsmethod == 2 then
local h = FindFirstChildOfClass(
newc,
'Humanoid'
)
if h then
insSet(h, 'Health', 0)
else
insGet(newc, 'BreakJoints')(newc)
end
else
insGet(newc, 'BreakJoints')(newc)
end
Connect(insGet(newc, 'DescendantAdded'), ondes)
for i, v in next, GetDescendants(newc) do
ondes(v)
end
else
local hrp = timegp(
newc,
'HumanoidRootPart',
'BasePart',
10
)
if hrp and c and IsDescendantOf(newc, ws) then
rootparts[v] = hrp
end
end
end
end
charcons[v] = Connect(
GetPropertyChangedSignal(v, 'Character'),
oncharacter
)
oncharacter()
end
Connect(insGet(plrs, 'PlayerRemoving'), function(v)
simradv = simradv - 1000
local charcon = charcons[v]
if charcon then
Disconnect(charcon)
end
characters[v] = nil
rootparts[v] = nil
end)
for i, v in next, GetPlayers(plrs) do
simradv = simradv + 1000
if v ~= lp then
tspawn(onplayer, v)
end
end
Connect(insGet(plrs, 'PlayerAdded'), onplayer)
onplayer(lp)
local setsimrad = emptyfunction
if simrad then
setsimrad = function()
local canset, _ = pcall(function()
insSet(lp, 'SimulationRadius', simradv)
end)
if canset then
setsimrad = function()
insSet(lp, 'SimulationRadius', simradv)
end
else
setsimrad = emptyfunction
end
end
end
local mradN05 = -0.008726646259971648
local KeyCode = e.KeyCode
local enumMB2 = e.UserInputType.MouseButton2
local enumMLCP = e.MouseBehavior.LockCurrentPosition
local enumMLC = (insGet(uis, 'TouchEnabled') and enumMLCP)
or e.MouseBehavior.LockCenter
local enumMD = e.MouseBehavior.Default
local enumMW = e.UserInputType.MouseWheel
local enumMM = e.UserInputType.MouseMovement
local mouseBehavior = nil
local lastMouseBehavior = insGet(uis, 'MouseBehavior')
Connect(GetPropertyChangedSignal(uis, 'MouseBehavior'), function()
if
mouseBehavior
and (insGet(uis, 'MouseBehavior') ~= mouseBehavior)
then
insSet(uis, 'MouseBehavior', mouseBehavior)
end
end)
local mode = 'default'
local defaultmode = {}
local modes = { default = defaultmode }
local lerpsIdle = emptyfunction
local lerpsWalk = emptyfunction
local lerpsJump = emptyfunction
local lerpsFall = emptyfunction
local addmode = function(key, mode)
if (type(key) ~= 'string') or (type(mode) ~= 'table') then
return
end
for i, v in next, mode do
if type(v) ~= 'function' then
mode[i] = nil
end
end
if key == 'default' then
defaultmode = mode
modes.default = mode
lerpsIdle = mode.idle or emptyfunction
lerpsWalk = mode.walk or emptyfunction
lerpsJump = mode.jump or emptyfunction
lerpsFall = mode.fall or emptyfunction
if mode.modeEntered then
mode.modeEntered()
end
elseif #key == 1 then
key = KeyCode[supper(ssub(key, 1, 1))]
modes[key] = mode
end
end
local keyW = KeyCode.W
local Wpressed = IsKeyDown(uis, keyW)
local keyA = KeyCode.A
local Apressed = IsKeyDown(uis, keyA)
local keyS = KeyCode.S
local Spressed = IsKeyDown(uis, keyS)
local keyD = KeyCode.D
local Dpressed = IsKeyDown(uis, keyD)
local keySpace = KeyCode.Space
local jumpingInput = IsKeyDown(uis, keySpace)
local FWmovement = 0
local RTmovement = 0
local isWalking = false
local refreshKeyboardMovement = function()
if Wpressed then
if Spressed then
if Dpressed then
if Apressed then
isWalking = false
else
FWmovement = 0
RTmovement = 1
isWalking = true
end
else
if Apressed then
FWmovement = 0
RTmovement = -1
isWalking = true
else
isWalking = false
end
end
else
FWmovement = 1
if Dpressed then
if Apressed then
RTmovement = 0
else
RTmovement = 1
end
else
if Apressed then
RTmovement = -1
else
RTmovement = 0
end
end
isWalking = true
end
else
if Spressed then
FWmovement = -1
if Dpressed then
if Apressed then
RTmovement = 0
else
RTmovement = 1
end
else
if Apressed then
RTmovement = -1
else
RTmovement = 0
end
end
isWalking = true
else
if Dpressed then
if Apressed then
isWalking = false
else
FWmovement = 0
RTmovement = 1
isWalking = true
end
else
if Apressed then
FWmovement = 0
RTmovement = -1
isWalking = true
else
isWalking = false
end
end
end
end
end
refreshKeyboardMovement()
local keyShift = KeyCode.LeftShift
Connect(insGet(uis, 'InputBegan'), function(a)
if insGet(gs, 'MenuIsOpen') or GetFocusedTextBox(uis) then
return
end
a = insGet(a, 'KeyCode')
if a == keyW then
Wpressed = true
refreshKeyboardMovement()
elseif a == keyA then
Apressed = true
refreshKeyboardMovement()
elseif a == keyS then
Spressed = true
refreshKeyboardMovement()
elseif a == keyD then
Dpressed = true
refreshKeyboardMovement()
elseif a == keySpace then
jumpingInput = true
elseif a == keyShift then
shiftlock = allowshiftlock and not shiftlock
elseif modes[a] then
if modes[mode].modeLeft then
modes[mode].modeLeft()
end
if mode == a then
mode = 'default'
else
mode = a
end
local modet = modes[mode]
lerpsIdle = modet.idle or defaultmode.idle or emptyfunction
lerpsWalk = modet.walk or defaultmode.walk or emptyfunction
lerpsJump = modet.jump or defaultmode.jump or emptyfunction
lerpsFall = modet.fall or defaultmode.fall or emptyfunction
if modes[mode].modeEntered then
modes[mode].modeEntered()
end
end
end)
Connect(insGet(uis, 'InputEnded'), function(a)
a = insGet(a, 'KeyCode')
if a == keyW then
Wpressed = false
refreshKeyboardMovement()
elseif a == keyA then
Apressed = false
refreshKeyboardMovement()
elseif a == keyS then
Spressed = false
refreshKeyboardMovement()
elseif a == keyD then
Dpressed = false
refreshKeyboardMovement()
elseif a == keySpace then
jumpingInput = false
end
end)
local thumbstickEndX = 0
local thumbstickStartY = 0
local thumbstickSizeMultiplier = 0
local jumpStartX = 0
local jumpStartY = 0
local jumpEndX = 0
local jumpEndY = 0
local thumbstickInputObject = nil
local jumpInputObject = nil
local cameraRotateInputObject = nil
local cameraZoomInputObject = nil
local thumbstickTouchStart = v3_0
local cameraZoomInputMagnitude = 0
Connect(insGet(uis, 'TouchStarted'), function(inputObject)
if insGet(gs, 'MenuIsOpen') or GetFocusedTextBox(uis) then
return
end
local touchPos = insGet(inputObject, 'Position')
local touchX = v3Get(touchPos, 'X')
local touchY = v3Get(touchPos, 'Y')
if
not thumbstickInputObject
and touchX < thumbstickEndX
and touchY > thumbstickStartY
then
thumbstickInputObject = inputObject
thumbstickTouchStart = insGet(inputObject, 'Position')
isWalking = false
elseif
not jumpInputObject
and touchY > jumpStartY
and touchX > jumpStartX
and touchX < jumpEndX
and touchY < jumpEndY
then
jumpInputObject = inputObject
jumpingInput = true
elseif not cameraRotateInputObject then
cameraRotateInputObject = inputObject
else
cameraZoomInputObject = inputObject
cameraZoomInputMagnitude = v3Get(
insGet(cameraRotateInputObject, 'Position')
- insGet(cameraZoomInputObject, 'Position'),
'Magnitude'
)
end
end)
Connect(insGet(uis, 'TouchMoved'), function(inputObject)
local touchPos = insGet(inputObject, 'Position')
local touchX = v3Get(touchPos, 'X')
local touchY = v3Get(touchPos, 'Y')
if inputObject == thumbstickInputObject then
local direction = insGet(inputObject, 'Position')
- thumbstickTouchStart
local directionMag = v3Get(direction, 'Magnitude')
/ thumbstickSizeMultiplier
if directionMag > 0.05 then
isWalking = true
direction = v3Get(direction, 'Unit')
* min(1, (directionMag - 0.05) / 0.95)
FWmovement = -v3Get(direction, 'Y')
RTmovement = v3Get(direction, 'X')
else
isWalking = false
end
elseif inputObject == jumpInputObject then
jumpingInput = touchY > jumpStartY
and touchX > jumpStartX
and touchX < jumpEndX
and touchY < jumpEndY
else
if cameraZoomInputObject then
local newMagnitude = v3Get(
insGet(cameraRotateInputObject, 'Position')
- insGet(cameraZoomInputObject, 'Position'),
'Magnitude'
)
cammag = cammag
+ (newMagnitude - cameraZoomInputMagnitude)
* 0.04
* (0.75 - cammag / 4)
cameraZoomInputMagnitude = newMagnitude
if cammag < 0 then
firstperson = false
else
cammag = 0
firstperson = true
end
elseif inputObject == cameraRotateInputObject then
local rotation = GetMouseDelta(uis) * mradN05
camcfLV = cfGet(
cfMul(camrot, angles(rotation.Y, rotation.X, 0)),
'LookVector'
)
camrot = cfl(v3_0, camcfLV)
camcfRV = cfGet(camrot, 'RightVector')
end
end
end)
Connect(insGet(uis, 'TouchEnded'), function(inputObject)
if inputObject == thumbstickInputObject then
thumbstickInputObject = nil
isWalking = false
elseif inputObject == jumpInputObject then
jumpInputObject = nil
jumpingInput = false
elseif inputObject == cameraRotateInputObject then
cameraRotateInputObject = nil
cameraZoomInputObject = nil
elseif inputObject == cameraZoomInputObject then
cameraZoomInputObject = nil
end
end)
local refreshTouchRegions = function()
local sX = insGet(mouse, 'ViewSizeX')
local sY = insGet(mouse, 'ViewSizeY')
local isSmallScreen = min(sX, sY) <= 500
sY = sY + insGet(gs, 'TopbarInset').Height
thumbstickEndX = sX * 0.4
thumbstickStartY = (sY + 0) * 0.333
if isSmallScreen then
thumbstickSizeMultiplier = 35
jumpStartX = sX - 95
jumpStartY = sY - 90
jumpEndX = jumpStartX + 70
jumpEndY = jumpStartY + 70
else
thumbstickSizeMultiplier = 60
jumpStartX = sX - 170
jumpStartY = sY - 210
jumpEndX = jumpStartX + 120
jumpEndY = jumpStartY + 120
end
end
Connect(
GetPropertyChangedSignal(mouse, 'ViewSizeX'),
refreshTouchRegions
)
Connect(
GetPropertyChangedSignal(mouse, 'ViewSizeY'),
refreshTouchRegions
)
Connect(
GetPropertyChangedSignal(gs, 'TopbarInset'),
refreshTouchRegions
)
refreshTouchRegions()
local mouseCameraMove = false
Connect(insGet(uis, 'InputChanged'), function(a, b)
if b then
return
end
local inputType = insGet(a, 'UserInputType')
if mouseCameraMove and inputType == enumMM then
local rotation = GetMouseDelta(uis) * mradN05
camcfLV = cfGet(
cfMul(camrot, angles(rotation.Y, rotation.X, 0)),
'LookVector'
)
camrot = cfl(v3_0, camcfLV)
camcfRV = cfGet(camrot, 'RightVector')
elseif inputType == enumMW then
cammag = cammag
+ v3Get(insGet(a, 'Position'), 'Z')
* (0.75 - cammag / 4)
if cammag < 0 then
firstperson = false
else
cammag = 0
firstperson = true
end
end
end)
local predictionfling = function(target)
if not c then
return false
end
if typeof(target) ~= 'Instance' then
target = insGet(mouse, 'Target')
if not target then
return false
end
end
if not IsDescendantOf(target, ws) then
return false
end
if IsA(target, 'BasePart') or IsA(target, 'Humanoid') then
target = insGet(target, 'Parent')
if IsA(target, 'Accessory') then
target = insGet(target, 'Parent')
end
end
if (not IsA(target, 'Model')) or (target == c) then
return false
end
local targetpart = gp(target, 'HumanoidRootPart', 'BasePart')
or gp(target, 'Torso', 'BasePart')
or gp(target, 'UpperTorso', 'BasePart')
if not targetpart or (flingtable[targetpart] ~= nil) then
return false
end
if replicatesignal then
replicatesignal(cdsb)
end
if highlightflingtargets then
local h = i('Highlight')
insSet(h, 'Name', rs())
insSet(h, 'Adornee', target)
insSet(h, 'FillColor', c3(1, 0, 0))
insSet(h, 'OutlineColor', c3(1, 0, 0))
insSet(h, 'FillTransparency', 0.5)
insSet(h, 'OutlineTransparency', 0)
insSet(h, 'Parent', i10)
flingtable[targetpart] = h
else
flingtable[targetpart] = false
end
return true
end
local clickConnection = nil
if ctrlclicktp then
ctrlclicktp = KeyCode.LeftControl
local tpoff = v3_010 * 3
if clickfling then
clickConnection = Connect(
insGet(mouse, 'Button1Down'),
function()
if insGet(mouse, 'Target') then
if IsKeyDown(uis, ctrlclicktp) then
pos = cfGet(
insGet(mouse, 'Hit'),
'Position'
) + tpoff
cfr = cfl(pos, pos + camcfLV * v3_101)
xzvel = v3_0
Yvel = 0
else
predictionfling()
end
end
end
)
else
clickConnection = Connect(
insGet(mouse, 'Button1Down'),
function()
if
insGet(mouse, 'Target')
and IsKeyDown(uis, ctrlclicktp)
then
pos = cfGet(insGet(mouse, 'Hit'), 'Position')
+ tpoff
cfr = cfl(pos, pos + camcfLV * v3_101)
xzvel = v3_0
Yvel = 0
end
end
)
end
elseif clickfling then
clickConnection = Connect(
insGet(mouse, 'Button1Down'),
predictionfling
)
end
local hhOff = 3
local hhOff1 = 3.01
local setHipHeight = function(n)
hhOff = n + 3
hhOff1 = n + 3.01
end
local noYvelTime = 1
local lastsine = sine
local con = nil
local mainFunction = function()
if not c then
for i, v in next, cframes do
local p = i.v
if p then
Destroy(p)
end
end
for i, v in next, flingtable do
if v then --it could be false
Destroy(v)
end
end
for i, v in next, charcons do
Disconnect(v)
end
if clickConnection then
Disconnect(clickConnection)
end
mouseBehavior = nil
insSet(uis, 'MouseBehavior', enumMD)
onnewcamera()
local c = insGet(lp, 'Character')
if c then
insSet(
cam,
'CameraSubject',
FindFirstChildOfClass(c, 'Humanoid')
)
end
return con and Disconnect(con)
end
sine = osclock()
local delta = sine - lastsine
deltaTime = min(delta * 10, 1)
lastsine = sine
if shiftlock then
if allowshiftlock then
mouseBehavior = enumMLC
mouseCameraMove = true
else
shiftlock = false
end
elseif firstperson then
mouseBehavior = enumMLC
mouseCameraMove = true
elseif IsMouseButtonPressed(uis, enumMB2) then
mouseBehavior = enumMLCP
mouseCameraMove = true
else
mouseBehavior = enumMD
mouseCameraMove = false
end
if lastMouseBehavior ~= mouseBehavior then
lastMouseBehavior = mouseBehavior
insSet(uis, 'MouseBehavior', mouseBehavior)
end
local raycastresult = Raycast(
ws,
pos,
v3_010 * (fpdh - v3Get(pos, 'Y')),
raycastparams
)
local onground = nil
if raycastresult then
raycastresult = v3Get(raycastresult.Position, 'Y')
onground = v3Get(pos, 'Y') - raycastresult < hhOff1
if onground then
Yvel = 0
pos = pos
+ v3_010
* (raycastresult + hhOff - v3Get(pos, 'Y'))
* min(delta * 20, 1)
if jumpingInput and (jumpPower > 0) then
Yvel = jumpPower
onground = false
end
else
Yvel = Yvel - gravity * delta
if v3Get(pos, 'Y') + Yvel * delta < raycastresult then
Yvel = 0
pos = pos
+ v3_010
* (raycastresult + hhOff - v3Get(pos, 'Y'))
end
end
else
Yvel = 0
onground = false
end
if firstperson then
if isWalking then
if walkSpeed == 0 then
xzvel = v3_0
if onground then
cfr = cfl(pos, pos + camcfLV * v3_101)
camcf = cfAdd(camrot, pos + v3_0150)
cframes[rootpart] = cfr
insSet(cam, 'CFrame', camcf)
lerpsIdle()
noYvelTime = min(noYvelTime + delta * 0.3, 1)
xzvel = xzvel * (1 - noYvelTime)
elseif Yvel > 0 then
pos = pos + v3_010 * Yvel * delta
cfr = cfl(pos, pos + camcfLV * v3_101)
camcf = cfAdd(camrot, pos + v3_0150)
cframes[rootpart] = cfr
insSet(cam, 'CFrame', camcf)
lerpsJump()
noYvelTime = 0
else
pos = pos + v3_010 * Yvel * delta
cfr = cfl(pos, pos + camcfLV * v3_101)
camcf = cfAdd(camrot, pos + v3_0150)
cframes[rootpart] = cfr
insSet(cam, 'CFrame', camcf)
lerpsFall()
noYvelTime = 0
end
else
xzvel = v3Get(
v3Get(camcfLV * v3_101, 'Unit') * FWmovement
+ v3Get(camcfRV * v3_101, 'Unit')
* RTmovement,
'Unit'
) * walkSpeed
if onground then
pos = pos + xzvel * delta
cfr = cfl(pos, pos + camcfLV * v3_101)
camcf = cfAdd(camrot, pos + v3_0150)
cframes[rootpart] = cfr
insSet(cam, 'CFrame', camcf)
lerpsWalk()
noYvelTime = min(noYvelTime + delta * 0.3, 1)
xzvel = xzvel * (1 - noYvelTime)
elseif Yvel > 0 then
pos = pos + (xzvel + v3_010 * Yvel) * delta
cfr = cfl(pos, pos + camcfLV * v3_101)
camcf = cfAdd(camrot, pos + v3_0150)
cframes[rootpart] = cfr
insSet(cam, 'CFrame', camcf)
lerpsJump()
noYvelTime = 0
else
pos = pos + (xzvel + v3_010 * Yvel) * delta
cfr = cfl(pos, pos + camcfLV * v3_101)
camcf = cfAdd(camrot, pos + v3_0150)
cframes[rootpart] = cfr
insSet(cam, 'CFrame', camcf)
lerpsFall()
noYvelTime = 0
end
end
else
xzvel = v3_0
if onground then
cfr = cfl(pos, pos + camcfLV * v3_101)
camcf = cfAdd(camrot, pos + v3_0150)
cframes[rootpart] = cfr
insSet(cam, 'CFrame', camcf)
lerpsIdle()
noYvelTime = min(noYvelTime + delta * 0.3, 1)
xzvel = xzvel * (1 - noYvelTime)
elseif Yvel > 0 then
pos = pos + v3_010 * Yvel * delta
cfr = cfl(pos, pos + camcfLV * v3_101)
camcf = cfAdd(camrot, pos + v3_0150)
cframes[rootpart] = cfr
insSet(cam, 'CFrame', camcf)
lerpsJump()
noYvelTime = 0
else
pos = pos + v3_010 * Yvel * delta
cfr = cfl(pos, pos + camcfLV * v3_101)
camcf = cfAdd(camrot, pos + v3_0150)
cframes[rootpart] = cfr
insSet(cam, 'CFrame', camcf)
lerpsFall()
noYvelTime = 0
end
end
elseif shiftlock then
if isWalking then
if walkSpeed == 0 then
xzvel = v3_0
if onground then
cfr = cfl(pos, pos + camcfLV * v3_101)
camcf = cfAdd(
camrot,
pos
+ v3_0150
+ camcfRV * 1.75
+ camcfLV * cammag
)
cframes[rootpart] = cfr
insSet(cam, 'CFrame', camcf)
lerpsIdle()
noYvelTime = min(noYvelTime + delta * 0.3, 1)
xzvel = xzvel * (1 - noYvelTime)
elseif Yvel > 0 then
pos = pos + v3_010 * Yvel * delta
cfr = cfl(pos, pos + camcfLV * v3_101)
camcf = cfAdd(
camrot,
pos
+ v3_0150
+ camcfRV * 1.75
+ camcfLV * cammag
)
cframes[rootpart] = cfr
insSet(cam, 'CFrame', camcf)
lerpsJump()
noYvelTime = 0
else
pos = pos + v3_010 * Yvel * delta
cfr = cfl(pos, pos + camcfLV * v3_101)
camcf = cfAdd(
camrot,
pos
+ v3_0150
+ camcfRV * 1.75
+ camcfLV * cammag
)
cframes[rootpart] = cfr
insSet(cam, 'CFrame', camcf)
lerpsFall()
noYvelTime = 0
end
else
xzvel = v3Get(
v3Get(camcfLV * v3_101, 'Unit') * FWmovement
+ v3Get(camcfRV * v3_101, 'Unit')
* RTmovement,
'Unit'
) * walkSpeed
if onground then
pos = pos + xzvel * delta
cfr = cfl(pos, pos + camcfLV * v3_101)
camcf = cfAdd(
camrot,
pos
+ v3_0150
+ camcfRV * 1.75
+ camcfLV * cammag
)
cframes[rootpart] = cfr
insSet(cam, 'CFrame', camcf)
lerpsWalk()
noYvelTime = min(noYvelTime + delta * 0.3, 1)
xzvel = xzvel * (1 - noYvelTime)
elseif Yvel > 0 then
pos = pos + (xzvel + v3_010 * Yvel) * delta
cfr = cfl(pos, pos + camcfLV * v3_101)
camcf = cfAdd(
camrot,
pos
+ v3_0150
+ camcfRV * 1.75
+ camcfLV * cammag
)
cframes[rootpart] = cfr
insSet(cam, 'CFrame', camcf)
lerpsJump()
noYvelTime = 0
else
pos = pos + (xzvel + v3_010 * Yvel) * delta
cfr = cfl(pos, pos + camcfLV * v3_101)
camcf = cfAdd(
camrot,
pos
+ v3_0150
+ camcfRV * 1.75
+ camcfLV * cammag
)
cframes[rootpart] = cfr
insSet(cam, 'CFrame', camcf)
lerpsFall()
noYvelTime = 0
end
end
else
xzvel = v3_0
if onground then
cfr = cfl(pos, pos + camcfLV * v3_101)
camcf = cfAdd(
camrot,
pos
+ v3_0150
+ camcfRV * 1.75
+ camcfLV * cammag
)
cframes[rootpart] = cfr
insSet(cam, 'CFrame', camcf)
lerpsIdle()
noYvelTime = min(noYvelTime + delta * 0.3, 1)
xzvel = xzvel * (1 - noYvelTime)
elseif Yvel > 0 then
pos = pos + v3_010 * Yvel * delta
cfr = cfl(pos, pos + camcfLV * v3_101)
camcf = cfAdd(
camrot,
pos
+ v3_0150
+ camcfRV * 1.75
+ camcfLV * cammag
)
cframes[rootpart] = cfr
insSet(cam, 'CFrame', camcf)
lerpsJump()
noYvelTime = 0
else
pos = pos + v3_010 * Yvel * delta
cfr = cfl(pos, pos + camcfLV * v3_101)
camcf = cfAdd(
camrot,
pos
+ v3_0150
+ camcfRV * 1.75
+ camcfLV * cammag
)
cframes[rootpart] = cfr
insSet(cam, 'CFrame', camcf)
lerpsFall()
noYvelTime = 0
end
end
else
if isWalking then
if walkSpeed == 0 then
xzvel = v3_0
if onground then
cfr = cfAdd(cfGet(cfr, 'Rotation'), pos)
camcf = cfAdd(
camrot,
pos + v3_0150 + camcfLV * cammag
)
cframes[rootpart] = cfr
insSet(cam, 'CFrame', camcf)
lerpsIdle()
noYvelTime = min(noYvelTime + delta * 0.3, 1)
xzvel = xzvel * (1 - noYvelTime)
elseif Yvel > 0 then
pos = pos + v3_010 * Yvel * delta
cfr = cfAdd(cfGet(cfr, 'Rotation'), pos)
camcf = cfAdd(
camrot,
pos + v3_0150 + camcfLV * cammag
)
cframes[rootpart] = cfr
insSet(cam, 'CFrame', camcf)
lerpsJump()
noYvelTime = 0
else
pos = pos + v3_010 * Yvel * delta
cfr = cfAdd(cfGet(cfr, 'Rotation'), pos)
camcf = cfAdd(
camrot,
pos + v3_0150 + camcfLV * cammag
)
cframes[rootpart] = cfr
insSet(cam, 'CFrame', camcf)
lerpsFall()
noYvelTime = 0
end
else
xzvel = v3Get(
v3Get(camcfLV * v3_101, 'Unit') * FWmovement
+ v3Get(camcfRV * v3_101, 'Unit')
* RTmovement,
'Unit'
) * walkSpeed
if onground then
pos = pos + xzvel * delta
cfr = cfAdd(
Lerp(
cfGet(cfr, 'Rotation'),
cfl(v3_0, xzvel),
deltaTime
),
pos
)
camcf = cfAdd(
camrot,
pos + v3_0150 + camcfLV * cammag
)
cframes[rootpart] = cfr
insSet(cam, 'CFrame', camcf)
lerpsWalk()
noYvelTime = min(noYvelTime + delta * 0.3, 1)
xzvel = xzvel * (1 - noYvelTime)
elseif Yvel > 0 then
pos = pos + (xzvel + (v3_010 * Yvel)) * delta
cfr = cfAdd(
Lerp(
cfGet(cfr, 'Rotation'),
cfl(v3_0, xzvel),
deltaTime
),
pos
)
camcf = cfAdd(
camrot,
pos + v3_0150 + camcfLV * cammag
)
cframes[rootpart] = cfr
insSet(cam, 'CFrame', camcf)
lerpsJump()
noYvelTime = 0
else
pos = pos + (xzvel + (v3_010 * Yvel)) * delta
cfr = cfAdd(
Lerp(
cfGet(cfr, 'Rotation'),
cfl(v3_0, xzvel),
deltaTime
),
pos
)
camcf = cfAdd(
camrot,
pos + v3_0150 + camcfLV * cammag
)
cframes[rootpart] = cfr
insSet(cam, 'CFrame', camcf)
lerpsFall()
noYvelTime = 0
end
end
else
xzvel = v3_0
if onground then
cfr = cfAdd(cfGet(cfr, 'Rotation'), pos)
camcf = cfAdd(
camrot,
pos + v3_0150 + camcfLV * cammag
)
cframes[rootpart] = cfr
insSet(cam, 'CFrame', camcf)
lerpsIdle()
noYvelTime = min(noYvelTime + delta * 0.3, 1)
xzvel = xzvel * (1 - noYvelTime)
elseif Yvel > 0 then
pos = pos + v3_010 * Yvel * delta
cfr = cfAdd(cfGet(cfr, 'Rotation'), pos)
camcf = cfAdd(
camrot,
pos + v3_0150 + camcfLV * cammag
)
cframes[rootpart] = cfr
insSet(cam, 'CFrame', camcf)
lerpsJump()
noYvelTime = 0
else
pos = pos + v3_010 * Yvel * delta
cfr = cfAdd(cfGet(cfr, 'Rotation'), pos)
camcf = cfAdd(
camrot,
pos + v3_0150 + camcfLV * cammag
)
cframes[rootpart] = cfr
insSet(cam, 'CFrame', camcf)
lerpsFall()
noYvelTime = 0
end
end
end
refreshjointsI(rootpart)
tclear(refreshedjoints)
local sine15 = sine * 15
local idlerv = v3(
sin(sine15),
sin(sine15 + 1.0471975511965976),
sin(sine15 + 2.0943951023931953)
)
local idleoff = idlerv * 0.003910064697265625 --0.0156402587890625/4
local claimpos = insGet(primarypart, 'Position')
local claimposY = v3Get(claimpos, 'Y')
for i, v in next, cframes do
local part = i.p
if part then
if insGet(part, 'ReceiveAge') == 0 then
local placeholder = i.v
local vpos = cfGet(v, 'Position')
if novoid and (v3Get(vpos, 'Y') < novoid) then
v = cfAdd(
v,
v3_010 * (novoid - v3Get(vpos, 'Y'))
)
end
local lastpos = i.l
local vel = (vpos - lastpos) / delta
local mag = v3Get(vel, 'Magnitude')
if mag < 0.11730194091796875 then --0.0156402587890625*15/2
if placeholder and i.b then
insSet(placeholder, 'Parent', nil)
i.b = false
end
i.l = cfGet(v, 'Position')
v = cfAdd(v, idleoff)
elseif mag > speedlimit then
if placeholder then
insSet(placeholder, 'CFrame', v)
if not i.b then
insSet(placeholder, 'Parent', ws)
i.b = true
end
end
vel = v3Get(vel, 'Unit') * speedlimit
local newpos = lastpos + vel * delta
v = cfAdd(cfGet(v, 'Rotation'), newpos)
i.l = newpos
else
if placeholder and i.b then
insSet(placeholder, 'Parent', nil)
i.b = false
end
i.l = cfGet(v, 'Position')
end
local claimtime = i.c
if claimtime then
if sine - claimtime < retVelTime then
local Ydiff = cfGet(v, 'Y') - claimposY
local velY = 25.01
local fallingTime = 0
while (Ydiff > 0) or (velY > 0) do
fallingTime = fallingTime + 0.025
if fallingTime > 0.6 then
break
end
velY = velY - velYdelta
Ydiff = Ydiff + (velY * 0.025)
end
insSet(
part,
'AssemblyLinearVelocity',
(claimpos - cfGet(v, 'Position'))
* v3_101
/ fallingTime
+ v3_net
)
else
local vel1 = vel * noYvelTime + xzvel
if v3Get(vel1, 'Magnitude') > 25.01 then
insSet(
part,
'AssemblyLinearVelocity',
v3Get(vel1, 'Unit') * v3_xzL
+ v3_net
)
else
insSet(
part,
'AssemblyLinearVelocity',
vel1 * v3_xz + v3_net
)
end
end
else
i.c = sine
local vel1 = vel * noYvelTime + xzvel
if v3Get(vel1, 'Magnitude') > 25.01 then
insSet(
part,
'AssemblyLinearVelocity',
v3Get(vel1, 'Unit') * v3_xzL + v3_net
)
else
insSet(
part,
'AssemblyLinearVelocity',
vel1 * v3_xz + v3_net
)
end
end
insSet(part, 'CFrame', v)
insSet(part, 'AssemblyAngularVelocity', idlerv)
else
i.c = nil
i.l = insGet(part, 'Position')
local placeholder = i.v
if placeholder then
insSet(placeholder, 'CFrame', v)
if not i.b then
insSet(placeholder, 'Parent', ws)
i.b = true
end
end
end
else
local placeholder = i.v
if placeholder then
insSet(placeholder, 'CFrame', v)
if not i.b then
insSet(placeholder, 'Parent', ws)
i.b = true
end
end
end
end
setsimrad()
end
sine = osclock()
lastsine = sine
con = Connect(heartbeat, mainFunction)
mainFunction()
local refreshjoints =
function(v) --use this on the main part if u have parts that
refreshjointsI(v) --are connected with each other but arent connected to rootpart
tclear(refreshedjoints)
end
local legcfR = cf(1, -1, 0)
local legcfL = cf(-1, -1, 0)
local raydir = v3_010 * -2
local raycastlegs =
function() --this returns 2 values: right leg raycast offset, left leg raycast offset
local rY = Raycast(
ws,
cfGet(cfMul(cfr, legcfR), 'Position'),
raydir,
raycastparams
)
local lY = Raycast(
ws,
cfGet(cfMul(cfr, legcfL), 'Position'),
raydir,
raycastparams
)
if rY then
if lY then
return v3Get(rY.Position, 'Y')
- (v3Get(pos, 'Y') - 3),
v3Get(lY.Position, 'Y') - (v3Get(pos, 'Y') - 3)
else
return v3Get(rY.Position, 'Y')
- (v3Get(pos, 'Y') - 3),
0
end
elseif lY then
return 0,
v3Get(lY.Position, 'Y') - (v3Get(pos, 'Y') - 3)
else
return 0, 0
end
end
local velbycfrvec =
function() --this returns 2 values: forward/backwards movement (from -1 to 1), right/left movement (from -1 to 1)
local fw = cfGet(cfr, 'LookVector') * xzvel / walkSpeed
local rt = cfGet(cfr, 'RightVector') * xzvel / walkSpeed
return v3Get(fw, 'X') + v3Get(fw, 'Z'),
v3Get(rt, 'X') + v3Get(rt, 'Z')
end
local lastvel = v3_0
local velchg1 = v3_0
local velchgbycfrvec =
function() --this returns 2 values: forward/backwards velocity change, right/left velocity change
velchg1 = velchg1 + (lastvel - xzvel) --i recommend setting velchg1 to v3_0 when u start using this function or it will look worse
lastvel = xzvel
velchg1 = velchg1 - velchg1 * (deltaTime / 2)
local fw = cfGet(cfr, 'LookVector') * velchg1 / 32
local rt = cfGet(cfr, 'RightVector') * velchg1 / 32
return v3Get(fw, 'X') + v3Get(fw, 'Z'),
v3Get(rt, 'X') + v3Get(rt, 'Z')
end
local lastYvel = 0
local velYchg1 = 0
local velYchg = function() --this returns Y axis velocity change
velYchg1 = clamp(velYchg1 + (lastYvel - Yvel), -50, 50) --i recommend setting velYchg1 to 0 when u start using this function or it will look worse
lastYvel = Yvel
velYchg1 = velYchg1 - velYchg1 * (deltaTime / 2)
return velYchg1
end
local rotToMouse =
function(alpha) --this rotates ur character towards your mouse hit position
local pos1 = pos * v3_010
+ cfGet(insGet(mouse, 'Hit'), 'Position') * v3_101
if pos ~= pos1 then --could make nan rotation
cfr = Lerp(cfr, cfl(pos, pos1), alpha or deltaTime)
end
end
local glitchJoint = function(
joint,
targetGlitchTime,
delayFrom,
delayTo,
radiansFrom,
radiansTo
)
if sine > targetGlitchTime then --example usage: local glitchtime=0 addMode("x",{idle=function() glitchtime=glitchJoint(joint,glitchtime,0.2,0.4,-0.1,0.1) end})
radiansFrom = radiansFrom * 100
radiansTo = radiansTo * 100
joint.C0 = cfMul(
joint.C0,
angles(
mrandom(radiansFrom, radiansTo) / 100,
mrandom(radiansFrom, radiansTo) / 100,
mrandom(radiansFrom, radiansTo) / 100
)
)
return sine + mrandom(delayFrom * 100, delayTo * 100) / 100
end
return targetGlitchTime
end
local setWalkSpeed = function(n)
if type(n) ~= 'number' then
n = 16
end
walkSpeed = n
end
local setJumpPower = function(n)
if type(n) ~= 'number' then
n = 50
end
jumpPower = n
end
local setGravity = function(n)
if type(n) ~= 'number' then
n = 196.2
end
gravity = n
end
local setCfr = function(v) --sets character cframe
if typeof(v) == 'CFrame' then
local newpos = cfGet(v, 'Position')
camcf = cfAdd(camcf, newpos - pos)
insSet(cam, 'CFrame', camcf)
cfr = v
pos = newpos
elseif typeof(v) == 'Vector3' then
camcf = cfAdd(camcf, v - pos)
insSet(cam, 'CFrame', camcf)
cfr = cfAdd(cfGet(cfr, 'Rotation'), v)
pos = v
end
end
local getVel = function() --returns character velocity
return xzvel + v3_010 * Yvel --important: use only in lerps or it might not work
end
local getCamCF = function() --returns camera cframe
return camcf
end
local isFirstPerson =
function() --returns true if user is in first person camera mode
return firstperson
end
return {
cframes = cframes,
joints = joints,
fling = predictionfling,
predictionfling = predictionfling,
refreshjoints = refreshjoints,
raycastlegs = raycastlegs,
velbycfrvec = velbycfrvec,
velchgbycfrvec = velchgbycfrvec,
velYchg = velYchg,
addmode = addmode,
getPart = getPart,
getPartFromMesh = getPartFromMesh,
getAccWeldFromMesh = getAccWeldFromMesh,
getJoint = getJoint,
getPartJoint = getPartJoint,
rotToMouse = rotToMouse,
glitchJoint = glitchJoint,
setWalkSpeed = setWalkSpeed,
setJumpPower = setJumpPower,
setGravity = setGravity,
setCfr = setCfr,
getVel = getVel,
getCamCF = getCamCF,
isFirstPerson = isFirstPerson,
setHipHeight = setHipHeight,
}
end
btn('creepy crawler', function()
local t = reanimate()
if type(t) ~= 'table' then
return
end
local getJoint = t.getJoint
local rootJoint = getJoint('RootJoint')
local rightShoulder = getJoint('Right Shoulder')
local leftShoulder = getJoint('Left Shoulder')
local rightHip = getJoint('Right Hip')
local leftHip = getJoint('Left Hip')
local neck = getJoint('Neck')
t.setWalkSpeed(10)
local jumplerp = function()
neck.C0 = Lerp(
neck.C0,
cfMul(cf(0, 0, 0.5), angles(0, 0, 3.141592653589793)),
deltaTime
)
rootJoint.C0 = Lerp(
rootJoint.C0,
cfMul(
cf(0, -1.4, 0),
angles(3.141592653589793, 0, -3.141592653589793)
),
deltaTime
)
leftShoulder.C0 = Lerp(
leftShoulder.C0,
cfMul(
cf(-1, 1.5, 0.3),
angles(1.7453292519943295, 0, -0.17453292519943295)
),
deltaTime
)
rightShoulder.C0 = Lerp(
rightShoulder.C0,
cfMul(
cf(1, 1.5, 0.3),
angles(1.7453292519943295, 0, 0.17453292519943295)
),
deltaTime
)
leftHip.C0 = Lerp(
leftHip.C0,
cfMul(
cf(-1, -1.5, 0.8),
angles(1.3962634015954636, 0, -0.17453292519943295)
),
deltaTime
)
rightHip.C0 = Lerp(
rightHip.C0,
cfMul(
cf(1, -1.5, 0.8),
angles(1.3962634015954636, 0, 0.17453292519943295)
),
deltaTime
)
end
t.addmode('default', {
idle = function()
local sine = sine * 60
neck.C0 = Lerp(
neck.C0,
cfMul(
cf(0, 0, 0.5),
angles(
0.08726646259971647 * sin((sine + 20) * 0.05),
0,
3.141592653589793
+ 0.3490658503988659
* sin((sine + -30) * 0.025)
)
),
deltaTime
)
rootJoint.C0 = Lerp(
rootJoint.C0,
cfMul(
cf(0, -1.5 + 0.1 * sin(sine * 0.05), 0),
angles(
3.141592653589793,
0,
-3.1590459461097367
+ 0.05235987755982989
* sin(sine * 0.025)
)
),
deltaTime
)
leftShoulder.C0 = Lerp(
leftShoulder.C0,
cfMul(
cf(-1, 1.5, -0.1 * sin(sine * 0.05)),
angles(
1.5707963267948966,
0,
0.08726646259971647 * sin(sine * 0.025)
)
),
deltaTime
)
rightShoulder.C0 = Lerp(
rightShoulder.C0,
cfMul(
cf(1, 1.5, -0.1 * sin(sine * 0.05)),
angles(
1.5707963267948966,
0,
0.08726646259971647 * sin(sine * 0.025)
)
),
deltaTime
)
leftHip.C0 = Lerp(
leftHip.C0,
cfMul(
cf(-1, -1.5, 0.5 + -0.1 * sin((sine + 10) * 0.05)),
angles(
1.5707963267948966,
0,
0.08726646259971647 * sin(sine * 0.025)
)
),
deltaTime
)
rightHip.C0 = Lerp(
rightHip.C0,
cfMul(
cf(1, -1.5, 0.5 + -0.1 * sin((sine + 10) * 0.05)),
angles(
1.5707963267948966,
0,
0.08726646259971647 * sin(sine * 0.025)
)
),
deltaTime
)
end,
walk = function()
local sine = sine * 60
neck.C0 = Lerp(
neck.C0,
cfMul(
cf(0, 0, 0.5),
angles(
0.17453292519943295,
0.03490658503988659 * sin((sine + 2.5) * 0.2),
3.141592653589793
+ -0.17453292519943295
* sin((sine + -10) * 0.2)
)
),
deltaTime
)
rootJoint.C0 = Lerp(
rootJoint.C0,
cfMul(
cf(0, -1.5, 0),
angles(
3.0543261909900767,
0.08726646259971647 * sin((sine + 7.5) * 0.2),
-3.1590459461097367
+ -0.08726646259971647 * sin(sine * 0.2)
)
),
deltaTime
)
leftShoulder.C0 = Lerp(
leftShoulder.C0,
cfMul(
cf(
-1,
1.5 + 0.5 * sin((sine + 10) * 0.2),
0.3 + 0.2 * sin((sine + -10) * 0.2)
),
angles(
1.6580627893946132
+ 0.17453292519943295
* sin((sine + 15) * 0.2),
0,
-0.08726646259971647 * sin(sine * 0.2)
)
),
deltaTime
)
rightShoulder.C0 = Lerp(
rightShoulder.C0,
cfMul(
cf(
1,
1.5 + 0.5 * sin((sine + -7.5) * 0.2),
0.3 + 0.2 * sin((sine + 5) * 0.2)
),
angles(
1.6580627893946132
+ 0.17453292519943295 * sin(sine * 0.2),
0,
-0.08726646259971647 * sin(sine * 0.2)
)
),
deltaTime
)
leftHip.C0 = Lerp(
leftHip.C0,
cfMul(
cf(
-1,
-1.5 + 0.5 * sin((sine + -7.5) * 0.2),
0.5 + 0.2 * sin((sine + 5) * 0.2)
),
angles(
1.6580627893946132
+ 0.17453292519943295 * sin(sine * 0.2),
0,
-0.08726646259971647 * sin(sine * 0.2)
)
),
deltaTime
)
rightHip.C0 = Lerp(
rightHip.C0,
cfMul(
cf(
1,
-1.5 + 0.5 * sin((sine + 10) * 0.2),
0.5 + 0.2 * sin((sine + -7.5) * 0.2)
),
angles(
1.6580627893946132
+ -0.17453292519943295 * sin(sine * 0.2),
0,
-0.08726646259971647 * sin(sine * 0.2)
)
),
deltaTime
)
end,
jump = jumplerp,
fall = jumplerp,
})
end)
btn('nameless animations V8', function()
local t = reanimate()
if type(t) ~= 'table' then
return
end
local raycastlegs = t.raycastlegs
local velbycfrvec = t.velbycfrvec
local addmode = t.addmode
local getJoint = t.getJoint
local velYchg = t.velYchg
local setWalkSpeed = t.setWalkSpeed
local RootJoint = getJoint('RootJoint')
local RightShoulder = getJoint('Right Shoulder')
local LeftShoulder = getJoint('Left Shoulder')
local RightHip = getJoint('Right Hip')
local LeftHip = getJoint('Left Hip')
local Neck = getJoint('Neck')
addmode('default', {
idle = function()
local rY, lY = raycastlegs()
local Ychg = velYchg() / 20
LeftShoulder.C0 = Lerp(
LeftShoulder.C0,
cfMul(
cf(
-1,
0.5 + 0.1 * sin((sine - 1) * 1.3),
0.05 * sin((sine - 0.3) * 1.3)
),
angles(
0.5235987755982988
+ 0.08726646259971647 * sin(sine * 1),
-1.4835298641951802
+ 0.10471975511965978 * sin(sine * 1.3),
0.5235987755982988
)
),
deltaTime
)
RightShoulder.C0 = Lerp(
RightShoulder.C0,
cfMul(
cf(
1,
0.5 + 0.1 * sin((sine - 1) * 1.3),
0.05 * sin((sine - 0.3) * 1.3)
),
angles(
0.5235987755982988
+ 0.08726646259971647 * sin(sine * 1),
1.4835298641951802
- 0.10471975511965978 * sin(sine * 1.3),
-0.5235987755982988
)
),
deltaTime
)
LeftHip.C0 = Lerp(
LeftHip.C0,
cfMul(
cf(
-1,
-1.09 - 0.1 * sin(sine * 1.3) + lY - Ychg,
lY * -0.5
),
angles(
-0.026179938779914945 * sin(sine * 1.3),
-1.3962634015954636,
0
)
),
deltaTime
)
RightHip.C0 = Lerp(
RightHip.C0,
cfMul(
cf(
1,
-1.09 - 0.1 * sin(sine * 1.3) + rY - Ychg,
rY * -0.5
),
angles(
-0.026179938779914945 * sin(sine * 1.3),
1.3962634015954636,
0
)
),
deltaTime
)
RootJoint.C0 = Lerp(
RootJoint.C0,
cfMul(
cf(
0,
0.09 + 0.1 * sin(sine * 1.3) + Ychg,
0.025 * sin(sine * 1.3)
),
angles(
-1.5707963267948966
+ 0.026179938779914945 * sin(sine * 1.3),
0,
3.141592653589793
)
),
deltaTime
)
Neck.C0 = Lerp(
Neck.C0,
cfMul(
cf(0, 1, 0),
angles(
-1.53588974175501
- 0.026179938779914945
* sin((sine + 1) * 1.3),
0.05235987755982989 * sin((sine - 0.6) * 0.65),
3.141592653589793
)
),
deltaTime
)
--MW_animatorProgressSave: LeftArm,-1,0,0,1,30,5,0,1,0.5,0.1,-1,1.3,-85,6,0,1.3,0,0.05,-0.3,1.3,30,0,0,1,RightArm,1,0,0,1,30,5,0,1,0.5,0.1,-1,1.3,85,-6,0,1.3,0,0.05,-0.3,1.3,-30,0,0,1,LeftLeg,-1,0,0,1,-0,-1.5,0,1.3,-1.09,-0.1,0,1.3,-80,0,0,1,0,0,0,1,0,0,0,1,CPlusPlusTextbook_Handle,8.658389560878277e-09,0,0,1,0,0,0,1,-0.25,0,0,1,0,0,0,1,-0.0002722442150115967,0,0,1,0,0,0,1,RightLeg,1,0,0,1,0,-1.5,0,1.3,-1.09,-0.1,0,1.3,80,0,0,1,0,0,0,1,0,0,0,1,Torso,0,0,0,1,-90,1.5,0,1.3,0.09,0.1,0,1.3,-0,0,0,1,0,0.025,0,1.3,180,0,0,1,Head,0,0,0,1,-88,-1.5,1,1.3,1,0,0,1,-0,3,-0.6,0.65,0,0,0,1,180,0,0,1
end,
walk = function()
local Vfw, Vrt = velbycfrvec()
local rY, lY = raycastlegs()
local Ychg = velYchg() / 20
LeftShoulder.C0 = Lerp(
LeftShoulder.C0,
cfMul(
cf(-1, 0.5, 0),
angles(
-0.7853981633974483
* sin((sine + 0.07) * 8)
* Vfw,
-1.5707963267948966
+ 0.5235987755982988
* sin((sine + 0.15) * 8),
0
)
),
deltaTime
)
RightShoulder.C0 = Lerp(
RightShoulder.C0,
cfMul(
cf(1, 0.5, 0),
angles(
0.7853981633974483
* sin((sine + 0.07) * 8)
* Vfw,
1.5707963267948966
+ 0.5235987755982988
* sin((sine + 0.15) * 8),
0
)
),
deltaTime
)
RightHip.C0 = Lerp(
RightHip.C0,
cfMul(
cf(
1,
-1 + 0.3 * sin((sine - 0.15) * 8) + rY - Ychg,
rY * -0.5
),
angles(
1.5707963267948966
- 0.9599310885968813
* sin(sine * 8)
* Vfw,
1.5707963267948966
- 0.7853981633974483
* sin(sine * 8)
* Vrt,
-1.5707963267948966
)
),
deltaTime
)
LeftHip.C0 = Lerp(
LeftHip.C0,
cfMul(
cf(
-1,
-1 + 0.3 * sin((sine + 0.15) * 8) + lY - Ychg,
lY * -0.5
),
angles(
1.5707963267948966
+ 0.9599310885968813
* sin(sine * 8)
* Vfw,
-1.5707963267948966
+ 0.7853981633974483
* sin(sine * 8)
* Vrt,
1.5707963267948966
)
),
deltaTime
)
Neck.C0 = Lerp(
Neck.C0,
cfMul(
cf(0, 1, 0),
angles(
-1.5707963267948966
+ 0.08726646259971647 * sin(sine * 16),
0,
3.141592653589793
+ 0.08726646259971647 * sin(
(sine + 0.04) * 8
)
- Vrt
)
),
deltaTime
)
RootJoint.C0 = Lerp(
RootJoint.C0,
cfMul(
cf(0, 0.2 * sin((sine + 0.1) * 16) + Ychg, 0),
angles(-1.5707963267948966, 0, 3.141592653589793)
),
deltaTime
)
--MW_animatorProgressSave: CPlusPlusTextbook_Handle,8.658389560878277e-09,0,0,8,0,0,0,8,-0.25,0,0,8,0,0,0,8,-0.0002722442150115967,0,0,8,0,0,0,8,LeftArm,-1,0,0,8,-0,-45,0.07,8,0.5,0,0,8,-90,30,0.15,8,0,0,0,8,0,0,0,8,RightArm,1,0,0,8,0,45,0.07,8,0.5,0,0,8,90,30,0.15,8,0,0,0,8,0,0,0,8,RightLeg,1,0,0,8,90,-55,0,8,-1,0.3,-0.15,8,90,-45,0,8,0,0,0,8,-90,0,0,8,LeftLeg,-1,0,0,8,90,55,0,8,-1,0.3,0.15,8,-90,45,0,8,0,0,0,8,90,0,0,8,Head,0,0,0,8,-90,5,0,16,1,0,0,8,-0,0,0,8,0,0,0,8,180,5,0.04,8,Torso,0,0,0,8,-90,0,0,8,0,0.2,0.1,16,-0,0,0,8,0,0,0,8,180,0,0,8
end,
jump = function()
velYchg()
local Vfw, Vrt = velbycfrvec()
RootJoint.C0 = Lerp(
RootJoint.C0,
cfMul(
cf_0,
angles(
-1.4835298641951802 + Vfw * 0.1,
Vrt * -0.05,
-3.141592653589793
)
),
deltaTime
)
RightShoulder.C0 = Lerp(
RightShoulder.C0,
cfMul(
cf(1, 0.5, 0),
angles(
4.014257279586958
- 0.08726646259971647
* sin((sine + 0.5) * 4),
1.7453292519943295
+ 0.08726646259971647
* sin((sine + 0.25) * 4),
-1.5707963267948966
)
),
deltaTime
)
LeftHip.C0 = Lerp(
LeftHip.C0,
cfMul(
cf(-1, -1, 0),
angles(
1.5707963267948966
- 0.08726646259971647
* sin((sine + 0.5) * 4),
-1.6580627893946132
+ 0.06981317007977318
* sin((sine + 0.25) * 4),
1.5707963267948966
)
),
deltaTime
)
LeftShoulder.C0 = Lerp(
LeftShoulder.C0,
cfMul(
cf(-1, 0.5, 0),
angles(
4.014257279586958
- 0.08726646259971647
* sin((sine + 0.5) * 4),
-1.7453292519943295
- 0.08726646259971647
* sin((sine + 0.25) * 4),
1.5707963267948966
)
),
deltaTime
)
Neck.C0 = Lerp(
Neck.C0,
cfMul(
cf(0, 1, 0),
angles(
-1.3962634015954636,
0,
-3.141592653589793 - Vrt
)
),
deltaTime
)
RightHip.C0 = Lerp(
RightHip.C0,
cfMul(
cf(1, -1, 0),
angles(
1.5707963267948966
- 0.08726646259971647
* sin((sine + 0.5) * 4),
1.6580627893946132
- 0.06981317007977318
* sin((sine + 0.25) * 4),
-1.5707963267948966
)
),
deltaTime
)
--Torso,0,0,0,4,-85,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,-180,0,0,4,RightArm,1,0,0,4,230,-5,0.5,4,0.5,0,0,4,100,5,0.25,4,0,0,0,4,-90,0,0,4,LeftLeg,-1,0,0,4,90,-5,0.5,4,-1,0,0,4,-95,4,0.25,4,0,0,0,4,90,0,0,4,LeftArm,-1,0,0,4,230,-5,0.5,4,0.5,0,0,4,-100,-5,0.25,4,0,0,0,4,90,0,0,4,Head,0,0,0,4,-80,0,0.5,4,1,0,0,4,0,0,0.25,4,0,0,0,4,-180,0,0,4,RightLeg,1,0,0,4,90,-5,0.5,4,-1,0,0,4,95,-4,0.25,4,0,0,0,4,-90,0,0,4
end,
fall = function()
velYchg()
local Vfw, Vrt = velbycfrvec()
RootJoint.C0 = Lerp(
RootJoint.C0,
cfMul(
cf_0,
angles(
-1.6580627893946132 + Vfw * 0.1,
Vrt * -0.05,
-3.141592653589793
)
),
deltaTime
)
RightShoulder.C0 = Lerp(
RightShoulder.C0,
cfMul(
cf(1, 0.5, 0),
angles(
4.014257279586958
- 0.08726646259971647
* sin((sine + 0.5) * 4),
1.7453292519943295
+ 0.08726646259971647
* sin((sine + 0.25) * 4),
-1.5707963267948966
)
),
deltaTime
)
LeftHip.C0 = Lerp(
LeftHip.C0,
cfMul(
cf(-1, -1, 0),
angles(
1.5707963267948966
- 0.08726646259971647
* sin((sine + 0.5) * 4),
-1.6580627893946132
+ 0.06981317007977318
* sin((sine + 0.25) * 4),
1.5707963267948966
)
),
deltaTime
)
LeftShoulder.C0 = Lerp(
LeftShoulder.C0,
cfMul(
cf(-1, 0.5, 0),
angles(
4.014257279586958
- 0.08726646259971647
* sin((sine + 0.5) * 4),
-1.7453292519943295
- 0.08726646259971647
* sin((sine + 0.25) * 4),
1.5707963267948966
)
),
deltaTime
)
Neck.C0 = Lerp(
Neck.C0,
cfMul(
cf(0, 1, 0),
angles(
-1.7453292519943295,
0,
-3.141592653589793 - Vrt
)
),
deltaTime
)
RightHip.C0 = Lerp(
RightHip.C0,
cfMul(
cf(1, -1, 0),
angles(
1.5707963267948966
- 0.08726646259971647
* sin((sine + 0.5) * 4),
1.6580627893946132
- 0.06981317007977318
* sin((sine + 0.25) * 4),
-1.5707963267948966
)
),
deltaTime
)
--Torso,0,0,0,4,-95,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,-180,0,0,4,RightArm,1,0,0,4,230,-5,0.5,4,0.5,0,0,4,100,5,0.25,4,0,0,0,4,-90,0,0,4,LeftLeg,-1,0,0,4,90,-5,0.5,4,-1,0,0,4,-95,4,0.25,4,0,0,0,4,90,0,0,4,LeftArm,-1,0,0,4,230,-5,0.5,4,0.5,0,0,4,-100,-5,0.25,4,0,0,0,4,90,0,0,4,Head,0,0,0,4,-100,0,0.5,4,1,0,0,4,0,0,0.25,4,0,0,0,4,-180,0,0,4,RightLeg,1,0,0,4,90,-5,0.5,4,-1,0,0,4,95,-4,0.25,4,0,0,0,4,-90,0,0,4
end,
})
addmode('q', {
idle = function()
velYchg()
LeftShoulder.C0 = Lerp(
LeftShoulder.C0,
cfMul(
cf(-1, 0.75, -0.2),
angles(
2.705260340591211
- 0.08726646259971647
* sin((sine + 0.1) * 2),
-2.792526803190927,
-0.6981317007977318
)
),
deltaTime
)
RightShoulder.C0 = Lerp(
RightShoulder.C0,
cfMul(
cf(1, 0.75, -0.2),
angles(
2.705260340591211
- 0.08726646259971647
* sin((sine + 0.1) * 2),
2.792526803190927,
0.6981317007977318
)
),
deltaTime
)
Neck.C0 = Lerp(
Neck.C0,
cfMul(
cf(0, 1, 0),
angles(
-1.9198621771937625
- 0.10471975511965978
* sin((sine + 0.3) * 2),
0,
3.141592653589793
)
),
deltaTime
)
RootJoint.C0 = Lerp(
RootJoint.C0,
cfMul(
cf(0, -2.45 - 0.05 * sin(sine * 2), 0),
angles(
0.03490658503988659 * sin(sine * 2),
0,
3.141592653589793
)
),
deltaTime
)
RightHip.C0 = Lerp(
RightHip.C0,
cfMul(
cf(1, -1, 0),
angles(
1.3962634015954636
- 0.03490658503988659 * sin(sine * 2),
1.3089969389957472,
-0.9599310885968813
)
),
deltaTime
)
LeftHip.C0 = Lerp(
LeftHip.C0,
cfMul(
cf(-1, -1, 0),
angles(
1.5707963267948966
- 0.03490658503988659 * sin(sine * 2),
-1.3089969389957472,
1.5707963267948966
)
),
deltaTime
)
--LeftArm,-1,0,0,2,155,-5,0.1,2,0.75,0,0,2,-160,0,0,2,-0.2,0,0,2,-40,0,0,2,RightArm,1,0,0,2,155,-5,0.1,2,0.75,0,0,2,160,0,0,2,-0.2,0,0,2,40,0,0,2,Head,0,0,0,2,-110,-6,0.3,2,1,0,0,2,-0,0,0,2,0,0,0,2,180,0,0,2,Torso,0,0,0,2,0,2,0,2,-2.45,-0.05,0,2,-0,0,0,2,0,0,0,2,180,0,0,2,RightLeg,1,0,0,2,80,-2,0,2,-1,0,0,2,75,0,0,2,0,0,0,2,-55,0,0,2,LeftLeg,-1,0,0,2,90,-2,0,2,-1,0,0,2,-75,0,0,2,0,0,0,2,90,0,0,2
end,
})
addmode('e', {
idle = function()
velYchg()
LeftShoulder.C0 = Lerp(
LeftShoulder.C0,
cfMul(
cf(
-0.9,
0.4 + 0.1 * sin(sine * 2),
0.3 - 0.15 * sin(sine * 2)
),
angles(
-1.0471975511965976
- 0.12217304763960307 * sin(sine * 2),
-1.3962634015954636,
-0.6981317007977318
)
),
deltaTime
)
RootJoint.C0 = Lerp(
RootJoint.C0,
cfMul(
cf(0, -1.85 - 0.1 * sin((sine + 0.2) * 2), 0),
angles(
-1.3962634015954636
+ 0.03490658503988659 * sin(sine * 2),
-0.08726646259971647,
3.141592653589793
)
),
deltaTime
)
RightShoulder.C0 = Lerp(
RightShoulder.C0,
cfMul(
cf(
1,
0.4 + 0.1 * sin(sine * 2),
0.2 - 0.15 * sin(sine * 2)
),
angles(
0.6108652381980153
- 0.12217304763960307 * sin(sine * 2),
1.2217304763960306,
-0.7853981633974483
)
),
deltaTime
)
Neck.C0 = Lerp(
Neck.C0,
cfMul(
cf(0, 1, 0),
angles(
-1.6580627893946132
- 0.03490658503988659
* sin((sine + 0.6) * 2),
0.10471975511965978
+ 0.06981317007977318 * sin(sine * 0.66),
3.141592653589793
+ 0.3490658503988659 * sin(sine * 0.66)
)
),
deltaTime
)
RightHip.C0 = Lerp(
RightHip.C0,
cfMul(
cf(
1,
0.2 + 0.15 * sin((sine + 0.2) * 2),
-0.7 + 0.1 * sin(sine * 2)
),
angles(
1.4835298641951802
+ 0.03490658503988659 * sin(sine * 2),
1.4835298641951802,
-1.5707963267948966
)
),
deltaTime
)
LeftHip.C0 = Lerp(
LeftHip.C0,
cfMul(
cf(-1, -0.75 + 0.1 * sin((sine + 0.2) * 2), -0.5),
angles(
1.3962634015954636
- 0.03490658503988659 * sin(sine * 2),
-1.6580627893946132,
0
)
),
deltaTime
)
--LeftArm,-0.9,0,0,2,-60,-7,0,2,0.4,0.1,0,2,-80,0,0,2,0.3,-0.15,0,2,-40,0,0,2,Torso,0,0,0,2,-80,2,0,2,-1.85,-0.1,0.2,2,-5,0,0,2,0,0,0,2,180,0,0,2,RightArm,1,0,0,2,35,-7,0,2,0.4,0.1,0,2,70,0,0,2,0.2,-0.15,0,2,-45,0,0,2,Head,0,0,0,2,-95,-2,0.6,2,1,0,0,2,6,4,0,0.66,0,0,0,2,180,20,0,0.66,RightLeg,1,0,0,2,85,2,0,2,0.2,0.15,0.2,2,85,0,0,2,-0.7,0.1,0,2,-90,0,0,2,LeftLeg,-1,0,0,2,80,-2,0,2,-0.75,0.1,0.2,2,-95,0,0,2,-0.5,0,0,2,0,0,0,2
end,
})
addmode('r', {
idle = function()
local Ychg = velYchg() / 20
RightHip.C0 = Lerp(
RightHip.C0,
cfMul(
cf(1, -0.9 - 0.2 * sin(sine * 2) - Ychg, 0),
angles(
1.5707963267948966,
1.6580627893946132
- 0.17453292519943295 * sin(sine + 0.8),
-1.5707963267948966
)
),
deltaTime
)
RootJoint.C0 = Lerp(
RootJoint.C0,
cfMul(
cf(
0.3 * sin(sine + 0.8),
-0.1 + 0.2 * sin(sine * 2) + Ychg,
0
),
angles(-1.5707963267948966, 0, -3.141592653589793)
),
deltaTime
)
Neck.C0 = Lerp(
Neck.C0,
cfMul(
cf(0, 1, 0),
angles(
-1.5707963267948966
+ 0.08726646259971647
* sin((sine - 0.5) * 2),
0.08726646259971647 * sin(sine - 1),
-3.141592653589793
+ 0.2617993877991494 * sin(sine * 5)
)
),
deltaTime
)
LeftShoulder.C0 = Lerp(
LeftShoulder.C0,
cfMul(
cf(
-1 + 0.1 * sin(sine * 7),
0.2 - 0.1 * sin(sine + 0.8),
-0.25
),
angles(
1.5707963267948966
+ 0.5235987755982988 * sin(sine * 7),
-0.6981317007977318,
0.3490658503988659 * sin(sine * 7)
)
),
deltaTime
)
LeftHip.C0 = Lerp(
LeftHip.C0,
cfMul(
cf(-1, -0.9 - 0.2 * sin(sine * 2) - Ychg, 0),
angles(
1.5707963267948966,
-1.6580627893946132
- 0.17453292519943295 * sin(sine + 0.8),
1.5707963267948966
)
),
deltaTime
)
RightShoulder.C0 = Lerp(
RightShoulder.C0,
cfMul(
cf(
1 + 0.1 * sin(sine * 7),
0.2 + 0.1 * sin(sine + 0.8),
-0.25
),
angles(
1.5707963267948966
- 0.5235987755982988 * sin(sine * 7),
0.6981317007977318,
0.3490658503988659 * sin(sine * 7)
)
),
deltaTime
)
--RightLeg,1,0,0,1,90,0,0,1,-0.9,-0.2,0,2,95,-10,0.8,1,0,0,0,1,-90,0,0,1,Torso,0,0.3,0.8,1,-90,0,0,1,-0.1,0.2,0,2,0,0,0,1,0,0,0,1,-180,0,0,1,Head,0,0,0,1,-90,5,-0.5,2,1,0,0,1,0,5,-1,1,0,0,0,1,-180,15,0,5,Fedora_Handle,8.657480066176504e-09,0,0,1,-6,0,0,1,-0.15052366256713867,0,0,1,0,0,0,1,-0.010221302509307861,0,0,1,0,0,0,1,LeftArm,-1,0.1,0,7,90,30,0,7,0.2,-0.1,0.8,1,-40,0,0,1,-0.25,0,0,1,0,20,0,7,LeftLeg,-1,0,0,1,90,0,0,1,-0.9,-0.2,0,2,-95,-10,0.8,1,0,0,0,1,90,0,0,1,RightArm,1,0.1,0,7,90,-30,0,7,0.2,0.1,0.8,1,40,0,0,1,-0.25,0,0,1,-0,20,0,7
end,
})
addmode('t', {
idle = function()
local Ychg = velYchg() / 20
LeftShoulder.C0 = Lerp(
LeftShoulder.C0,
cfMul(
cf(-1, 0.5, 0),
angles(
1.5707963267948966,
-1.6580627893946132
+ 0.08726646259971647
* sin((sine - 0.3) * 4),
1.5707963267948966
)
),
deltaTime
)
RightShoulder.C0 = Lerp(
RightShoulder.C0,
cfMul(
cf(1 + 0.15 * sin((sine - 0.4) * 4), 1.42, 0),
angles(
1.5707963267948966,
1.4835298641951802
- 0.3490658503988659
* sin((sine - 0.4) * 4),
1.5707963267948966
)
),
deltaTime
)
Neck.C0 = Lerp(
Neck.C0,
cfMul(
cf(0, 1, 0),
angles(
-1.4835298641951802,
0.04363323129985824
- 0.08726646259971647
* sin((sine + 0.1) * 4),
-3.141592653589793
+ 0.04363323129985824 * sin(sine * 4)
)
),
deltaTime
)
RootJoint.C0 = Lerp(
RootJoint.C0,
cfMul(
cf(0.1 * sin(sine * 4), Ychg, 0),
angles(
-1.5707963267948966,
-0.08726646259971647
+ 0.08726646259971647 * sin(sine * 4),
-3.141592653589793
)
),
deltaTime
)
RightHip.C0 = Lerp(
RightHip.C0,
cfMul(
cf(1, -1.1 + 0.1 * sin(sine * 4) - Ychg, 0),
angles(
1.5707963267948966,
1.5707963267948966
+ 0.08726646259971647 * sin(sine * 4),
-1.5707963267948966
)
),
deltaTime
)
LeftHip.C0 = Lerp(
LeftHip.C0,
cfMul(
cf(
-1 - 0.02 * sin(sine * 4),
-0.925 - 0.07 * sin(sine * 4) - Ychg,
0
),
angles(
1.5707963267948966,
-1.7453292519943295
+ 0.08726646259971647 * sin(sine * 4),
1.5707963267948966
)
),
deltaTime
)
--LeftArm,-1,0,0,4,90,0,0,4,0.5,0,0,4,-95,5,-0.3,4,0,0,0,4,90,0,0,4,RightArm,1,0.15,-0.4,4,90,0,0,4,1.42,0,0,4,85,-20,-0.4,4,0,0,0,4,90,0,0,4,Head,0,0,0,4,-85,0,0,4,1,0,0,4,2.5,-5,0.1,4,0,0,0,4,-180,2.5,0,4,Torso,0,0.1,0,4,-90,0,0,4,0,0,0,4,-5,5,0,4,0,0,0,4,-180,0,0,4,RightLeg,1,0,0,4,90,0,0,4,-1.1,0.1,0,4,90,5,0,4,0,0,0,4,-90,0,0,4,LeftLeg,-1,-0.02,0,4,90,0,0,4,-0.925,-0.07,0,4,-100,5,0,4,0,0,0,4,90,0,0,4
end,
})
addmode('y', {
idle = function()
local Ychg = velYchg() / 20
LeftShoulder.C0 = Lerp(
LeftShoulder.C0,
cfMul(
cf(-1.5, 0.5, 0),
angles(
-1.7453292519943295,
0.17453292519943295
- 0.04363323129985824 * sin(sine * 2),
-1.4835298641951802
)
),
deltaTime
)
RightHip.C0 = Lerp(
RightHip.C0,
cfMul(
cf(
1,
-0.9000000953674316 - 0.1 * sin(sine * 2) - Ychg,
0
),
angles(
-1.3962634015954636,
1.3962634015954636,
1.5707963267948966
)
),
deltaTime
)
LeftHip.C0 = Lerp(
LeftHip.C0,
cfMul(
cf(
-1,
-1.0000001192092896 - 0.1 * sin(sine * 2) - Ychg,
0
),
angles(
-1.5707963267948966,
-1.3962634015954636,
-1.5707963267948966
)
),
deltaTime
)
Neck.C0 = Lerp(
Neck.C0,
cfMul(
cf(0, 1, 0),
angles(
-2.0943951023931953
+ 0.08726646259971647
* sin((sine - 1) * 2),
-0.08726646259971647,
2.792526803190927
)
),
deltaTime
)
RightShoulder.C0 = Lerp(
RightShoulder.C0,
cfMul(
cf(1, 1.2000000476837158, 0),
angles(
2.6179938779914944
+ 0.08726646259971647
* sin((sine - 1) * 2),
0.6981317007977318,
-1.3962634015954636
)
),
deltaTime
)
RootJoint.C0 = Lerp(
RootJoint.C0,
cfMul(
cf(0, 0.1 * sin(sine * 2) + Ychg, 0),
angles(
-1.6580627893946132,
0.08726646259971647,
3.0543261909900767
)
),
deltaTime
)
--LeftArm,-1.5,0,0,2,-100,0,0,2,0.5,0,0,2,10,-2.5,0,2,0,0,0,2,-85,0,0,2,RightLeg,1,0,0,2,-80,0,0,2,-0.9000000953674316,-0.1,0,2,80,0,0,2,0,0,0,2,90,0,0,2,LeftLeg,-1,0,0,2,-90,0,0,2,-1.0000001192092896,-0.1,0,2,-80,0,0,2,0,0,0,2,-90,0,0,2,Fedora_Handle,8.657480066176504e-09,0,0,2,-6,0,0,2,-0.15052366256713867,0,0,2,0,0,0,2,-0.010221302509307861,0,0,2,0,0,0,2,Head,0,0,0,2,-120,5,-1,2,1,0,0,2,-5,0,0,2,0,0,0,2,160,0,0,2,RightArm,1,0,0,2,150,5,-1,2,1.2000000476837158,0,0,2,40,0,0,2,0,0,0,2,-80,0,0,2,Torso,0,0,0,2,-95,0,0,2,0,0.1,0,2,5,0,0,2,0,0,0,2,175,0,0,2
end,
})
addmode('u', {
idle = function()
velYchg()
RootJoint.C0 = Lerp(
RootJoint.C0,
cfMul(
cf(0, 0.75 + 0.25 * sin(sine * 2), 0),
angles(-1.5707963267948966, 0, 3.141592653589793)
),
deltaTime
)
Neck.C0 = Lerp(
Neck.C0,
cfMul(
cf(0, 1.5 - 0.1 * sin((sine + 0.2) * 2), 0),
angles(
-1.5707963267948966
- 0.08726646259971647
* sin((sine + 0.4) * 2),
0,
3.141592653589793
+ 0.3490658503988659 * sin(sine * 0.66)
)
),
deltaTime
)
LeftHip.C0 = Lerp(
LeftHip.C0,
cfMul(
cf(
-0.5 - 1 * sin((sine + 0.2) * 2.2),
-0.75 - 0.25 * sin(sine * 2),
1 * sin((sine + 0.95) * 2.2)
),
angles(0, -1.5707963267948966, 0)
),
deltaTime
)
RightHip.C0 = Lerp(
RightHip.C0,
cfMul(
cf(
0.5 + 1 * sin((sine + 0.2) * 2.2),
-0.75 - 0.25 * sin(sine * 2),
-1 * sin((sine + 0.95) * 2.2)
),
angles(0, 1.5707963267948966, 0)
),
deltaTime
)
RightShoulder.C0 = Lerp(
RightShoulder.C0,
cfMul(
cf(
-0.5 - 1.85 * sin(sine * 2),
0.8 - 0.5 * sin(sine * 2),
-1.85 * sin((sine + 0.75) * 2)
),
angles(0, 1.5707963267948966, 0)
),
deltaTime
)
LeftShoulder.C0 = Lerp(
LeftShoulder.C0,
cfMul(
cf(
0.5 + 1.85 * sin(sine * 2),
0.8 - 0.5 * sin(sine * 2),
1.85 * sin((sine + 0.75) * 2)
),
angles(0, -1.5707963267948966, 0)
),
deltaTime
)
--Torso,0,0,0,2,-90,0,0,2,0.75,0.25,0,2,-0,0,0,2,0,0,0,2,180,0,0,2,Fedora_Handle,8.657480066176504e-09,0,0,2,-6,0,0,2,-0.15052366256713867,0,0,2,0,0,0,2,-0.010221302509307861,0,0,2,0,0,0,2,Head,0,0,0,2,-90,-5,0.4,2,1.5,-0.1,0.2,2,-0,0,0,2,0,0,0,2,180,20,0,0.66,LeftLeg,-0.5,-1,0.2,2.2,-0,0,0,2,-0.75,-0.25,0,2,-90,0,0,2,0,1,0.95,2.2,0,0,0,2,RightLeg,0.5,1,0.2,2.2,0,0,0,2,-0.75,-0.25,0,2,90,0,0,2,0,-1,0.95,2.2,0,0,0,2,RightArm,-0.5,-1.85,0,2,0,0,0,2,0.8,-0.5,0,2,90,0,0,2,0,-1.85,0.75,2,0,0,0,2,LeftArm,0.5,1.85,0,2,-0,0,0,2,0.8,-0.5,0,2,-90,0,0,2,0,1.85,0.75,2,0,0,0,2
end,
})
addmode('i', {
idle = function()
local Ychg = velYchg() / 20
LeftShoulder.C0 = Lerp(
LeftShoulder.C0,
cfMul(
cf(
-0.5,
0.5 + 0.1 * sin((sine - 0.4444444444444444) * 9),
0
),
angles(
2.9670597283903604
+ 0.17453292519943295
* sin(
(sine - 0.17777777777777778) * 9
),
-0.5235987755982988,
1.5707963267948966
+ 0.17453292519943295 * sin(sine * 4.5)
)
),
deltaTime
)
LeftHip.C0 = Lerp(
LeftHip.C0,
cfMul(
cf(
-1,
-0.5
+ 0.1 * sin(
(sine + 0.26666666666666666) * 4.5
)
- Ychg,
-0.5
),
angles(
1.7453292519943295
- 1.0471975511965976 * sin(sine * 4.5),
-1.5707963267948966
+ 0.03490658503988659 * sin(sine * 4.5),
1.5707963267948966
)
),
deltaTime
)
RootJoint.C0 = Lerp(
RootJoint.C0,
cfMul(
cf(
0,
-0.5
+ 0.5 * sin(
(sine + 0.17777777777777778) * 9
)
+ Ychg,
0
),
angles(
-1.3962634015954636
- 0.03490658503988659
* sin(
(sine + 0.17777777777777778) * 9
),
-0.05235987755982989 * sin(sine * 4.5),
3.141592653589793
+ 0.03490658503988659 * sin(sine * 4.5)
)
),
deltaTime
)
Neck.C0 = Lerp(
Neck.C0,
cfMul(
cf(0, 1 + 0.2 * sin(sine * 9), 0),
angles(
-1.5707963267948966
+ 0.08726646259971647 * sin(sine * 9),
0.08726646259971647 * sin(sine * 4.5),
3.141592653589793
- 0.06981317007977318 * sin(sine * 4.5)
)
),
deltaTime
)
RightShoulder.C0 = Lerp(
RightShoulder.C0,
cfMul(
cf(
0.5,
0.5 + 0.1 * sin((sine - 0.4444444444444444) * 9),
0
),
angles(
2.9670597283903604
+ 0.17453292519943295
* sin(
(sine - 0.17777777777777778) * 9
),
0.5235987755982988,
-1.5707963267948966
+ 0.17453292519943295 * sin(sine * 4.5)
)
),
deltaTime
)
RightHip.C0 = Lerp(
RightHip.C0,
cfMul(
cf(
1,
-0.5
+ 0.1 * sin(
(sine - 0.26666666666666666) * 4.5
)
- Ychg,
-0.5
),
angles(
1.7453292519943295
+ 1.0471975511965976 * sin(sine * 4.5),
1.5707963267948966
+ 0.03490658503988659 * sin(sine * 4.5),
-1.5707963267948966
)
),
deltaTime
)
--LeftArm,-0.5,0,0,4.5,170,10,-0.17777777777777778,9,0.5,0.1,-0.4444444444444444,9,-30,0,0,4.5,0,0,0,4.5,90,10,0,4.5,LeftLeg,-1,0,0,4.5,100,-60,0,4.5,-0.5,0.1,0.26666666666666666,4.5,-90,2,0,4.5,-0.5,0,0,4.5,90,0,0,4.5,Torso,0,0,0,4.5,-80,-2,0.17777777777777778,9,-0.5,0.5,0.17777777777777778,9,-0,-3,0,4.5,0,0,0,4.5,180,2,0,4.5,Head,0,0,0,4.5,-90,5,0,9,1,0.2,0,9,-0,5,0,4.5,0,0,0,4.5,180,-4,0,4.5,RightArm,0.5,0,0,4.5,170,10,-0.17777777777777778,9,0.5,0.1,-0.4444444444444444,9,30,0,0,4.5,0,0,0,4.5,-90,10,0,4.5,RightLeg,1,0,0,4.5,100,60,0,4.5,-0.5,0.1,-0.26666666666666666,4.5,90,2,0,4.5,-0.5,0,0,4.5,-90,0,0,4.5
end,
})
addmode('o', {
idle = function()
local Ychg = velYchg() / 20
local rY, lY = raycastlegs()
LeftHip.C0 = Lerp(
LeftHip.C0,
cfMul(
cf(-1, -1 + lY - Ychg, lY * -0.5),
angles(
-1.8325957145940461
- 0.08726646259971647 * sin(sine * 2),
-1.4835298641951802,
-1.5707963267948966
)
),
deltaTime
)
RootJoint.C0 = Lerp(
RootJoint.C0,
cfMul(
cf(0, Ychg, 0.09 * sin(sine * 2)),
angles(
-1.3962634015954636
+ 0.08726646259971647 * sin(sine * 2),
-0.08726646259971647,
3.141592653589793
)
),
deltaTime
)
LeftShoulder.C0 = Lerp(
LeftShoulder.C0,
cfMul(
cf(-1, 0.5, 0),
angles(
2.9670597283903604
+ 0.08726646259971647 * sin(sine * 1),
-1.5707963267948966
+ 0.08726646259971647
* sin((sine + 0.6) * 1),
1.5707963267948966
)
),
deltaTime
)
RightHip.C0 = Lerp(
RightHip.C0,
cfMul(
cf(1, -1.1 + rY - Ychg, rY * -0.5),
angles(
-1.7453292519943295
- 0.08726646259971647 * sin(sine * 2),
1.5707963267948966,
1.5707963267948966
)
),
deltaTime
)
Neck.C0 = Lerp(
Neck.C0,
cfMul(
cf(0, 1, 0),
angles(
-1.2217304763960306
- 0.08726646259971647
* sin((sine + 0.3) * 2),
-0.2617993877991494
- 0.08726646259971647 * sin(sine * 2),
3.141592653589793
)
),
deltaTime
)
RightShoulder.C0 = Lerp(
RightShoulder.C0,
cfMul(
cf(1, 0.5, 0),
angles(
2.8797932657906435
+ 0.08726646259971647 * sin(sine * 1),
1.5707963267948966
- 0.08726646259971647
* sin((sine + 0.6) * 1),
-1.5707963267948966
)
),
deltaTime
)
--LeftLeg,-1,0,0,2,-105,-5,0,2,-1,0,0,2,-85,0,0,2,0,0,0,2,-90,0,0.75,2,Torso,0,0,0,2,-80,5,0,2,0,0,0,2,-5,0,0,2,0,0.09,0,2,180,0,0,2,LeftArm,-1,0,0,2,170,5,0,1,0.5,0,0,2,-90,5,0.6,1,0,0,0,2,90,0,0,2,RightLeg,1,0,0,2,-100,-5,0,2,-1.1,0,0,2,90,0,0,2,0,0,0,2,90,0,0.75,2,Head,0,0,0,2,-70,-5,0.3,2,1,0,0,2,-15,-5,0,2,0,0,0,2,180,0,0,2,RightArm,1,0,0,2,165,5,0,1,0.5,0,0,2,90,-5,0.6,1,0,0,0,2,-90,0,0,2
end,
walk = function()
local Ychg = velYchg() / 20
local Vfw, Vrt = velbycfrvec()
local rY, lY = raycastlegs()
Neck.C0 = Lerp(
Neck.C0,
cfMul(
cf(0, 1, 0),
angles(
-1.5707963267948966
+ 0.04363323129985824 * sin(sine * 16),
0,
3.141592653589793
+ 0.08726646259971647 * sin(sine * 8)
- Vrt
)
),
deltaTime
)
RightHip.C0 = Lerp(
RightHip.C0,
cfMul(
cf(
1,
-1 - 0.3 * sin((sine + 0.15) * 8) + rY - Ychg,
rY * -0.5
),
angles(
-1.5707963267948966
- 0.6981317007977318
* sin(sine * 8)
* Vfw,
1.5707963267948966
+ 0.6981317007977318
* sin(sine * 8)
* Vrt,
1.5707963267948966
)
),
deltaTime
)
RightShoulder.C0 = Lerp(
RightShoulder.C0,
cfMul(
cf(1, 0.5, 0),
angles(
0.08726646259971647 * sin((sine - 0.05) * 16),
1.5707963267948966
+ 0.08726646259971647 * sin(sine * 8)
- Vrt / 3,
1.5707963267948966
)
),
deltaTime
)
LeftShoulder.C0 = Lerp(
LeftShoulder.C0,
cfMul(
cf(-1, 0.5, 0),
angles(
0.08726646259971647 * sin((sine - 0.05) * 16),
-1.5707963267948966
+ 0.08726646259971647 * sin(sine * 8)
- Vrt / 3,
-1.5707963267948966
)
),
deltaTime
)
RootJoint.C0 = Lerp(
RootJoint.C0,
cfMul(
cf(0, 0.1 * sin((sine + 0.1) * 16) + Ychg, 0),
angles(
-1.5707963267948966,
0,
3.141592653589793
- 0.08726646259971647 * sin(sine * 8)
)
),
deltaTime
)
LeftHip.C0 = Lerp(
LeftHip.C0,
cfMul(
cf(
-1,
-1 + 0.3 * sin((sine + 0.15) * 8) + lY - Ychg,
lY * -0.5
),
angles(
1.5707963267948966
+ 0.6981317007977318
* sin(sine * 8)
* Vfw,
-1.5707963267948966
+ 0.6981317007977318
* sin(sine * 8)
* Vrt,
1.5707963267948966
)
),
deltaTime
)
--Head,0,0,0,8,-90,2.5,0,16,1,0,0,8,-0,0,0,8,0,0,0,8,180,5,0,8,RightLeg,1,0,0,8,-90,-40,0,8,-1,-0.3,0.15,8,90,40,0,8,0,0,0,8,90,0,0,8,RightArm,1,0,0,8,0,5,-0.05,16,0.5,0,0,8,90,5,0,8,0,0,0,8,90,0,0,8,LeftArm,-1,0,0,8,0,5,-0.05,16,0.5,0,0,8,-90,5,0,8,0,0,0,8,-90,0,0,8,Torso,0,0,0,8,-90,0,0,8,0,0.1,0.1,16,-0,0,0,8,0,0,0,8,180,-5,0,8,LeftLeg,-1,0,0,8,90,40,0,8,-1,0.3,0.15,8,-90,40,0,8,0,0,0,8,90,0,0,8
end,
})
addmode('p', {
idle = function()
local Ychg = velYchg() / 20
RightShoulder.C0 = Lerp(
RightShoulder.C0,
cfMul(
cf(1.5, 0.5, 0),
angles(
1.5707963267948966,
3.141592653589793,
-1.5707963267948966
)
),
deltaTime
)
RightHip.C0 = Lerp(
RightHip.C0,
cfMul(
cf(1, -1 - Ychg, 0),
angles(0, 1.5707963267948966, 0)
),
deltaTime
)
LeftShoulder.C0 = Lerp(
LeftShoulder.C0,
cfMul(
cf(-1.5, 0.5, 0),
angles(
1.5707963267948966,
3.141592653589793,
1.5707963267948966
)
),
deltaTime
)
LeftHip.C0 = Lerp(
LeftHip.C0,
cfMul(
cf(-1, -1 - Ychg, 0),
angles(0, -1.5707963267948966, 0)
),
deltaTime
)
Neck.C0 = Lerp(
Neck.C0,
cfMul(
cf(0, 1, 0),
angles(-1.5707963267948966, 0, -3.141592653589793)
),
deltaTime
)
RootJoint.C0 = Lerp(
RootJoint.C0,
cfMul(
cf(0, Ychg, 0),
angles(-1.5707963267948966, 0, -3.141592653589793)
),
deltaTime
)
--RightArm,1.5,0,0,1,90,0,0,1,0.5,0,0,1,180,0,0,1,0,0,0,1,-90,0,0,1,RightLeg,1,0,0,1,0,0,0,1,-1,0,0,1,90,0,0,1,0,0,0,1,0,0,0,1,Fedora_Handle,8.657480066176504e-09,0,0,1,-6,0,0,1,-0.15052366256713867,0,0,1,0,0,0,1,-0.010221302509307861,0,0,1,0,0,0,1,LeftArm,-1.5,0,0,1,90,0,0,1,0.5,0,0,1,180,0,0,1,0,0,0,1,90,0,0,1,LeftLeg,-1,0,0,1,-0,0,0,1,-1,0,0,1,-90,0,0,1,0,0,0,1,0,0,0,1,Head,0,0,0,1,-90,0,0,1,1,0,0,1,0,0,0,1,0,0,0,1,-180,0,0,1,Torso,0,0,0,1,-90,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,-180,0,0,1
end,
})
addmode('f', {
modeEntered = function()
setWalkSpeed(25)
end,
idle = function()
velYchg()
LeftShoulder.C0 = Lerp(
LeftShoulder.C0,
cfMul(
cf(-1, 0.5, 0),
angles(
-3.0543261909900767
- 0.17453292519943295
* sin((sine + 1.5) * 1),
-1.5707963267948966
+ 0.08726646259971647
* sin((sine + 0.6) * 1),
-1.5707963267948966
)
),
deltaTime
)
RightShoulder.C0 = Lerp(
RightShoulder.C0,
cfMul(
cf(1, 0.5, 0),
angles(
3.141592653589793
- 0.08726646259971647 * sin(sine * 1),
0.3490658503988659
+ 0.08726646259971647
* sin((sine + 0.3) * 1),
-1.9198621771937625
+ 0.08726646259971647
* sin((sine + 1) * 1)
)
),
deltaTime
)
Neck.C0 = Lerp(
Neck.C0,
cfMul(
cf(0, 1, 0),
angles(
-1.3089969389957472
- 0.2617993877991494
* sin((sine + 1.2) * 1),
0.08726646259971647 * sin((sine + 0.2) * 0.5),
-2.9670597283903604
)
),
deltaTime
)
RootJoint.C0 = Lerp(
RootJoint.C0,
cfMul(
cf(
0,
5 - 0.5 * sin((sine - 0.2) * 1),
0.2 * sin((sine - 1.2) * 1)
),
angles(
-0.08726646259971647
+ 0.17453292519943295
* sin((sine + 1.2) * 1),
0.08726646259971647 * sin(sine * 0.5),
3.141592653589793
)
),
deltaTime
)
LeftHip.C0 = Lerp(
LeftHip.C0,
cfMul(
cf(-1, -1, 0),
angles(
1.3962634015954636
+ 0.12217304763960307
* sin((sine + 1.5) * 1),
-1.2217304763960306
+ 0.08726646259971647
* sin((sine + 0.2) * 0.5),
1.5707963267948966
)
),
deltaTime
)
RightHip.C0 = Lerp(
RightHip.C0,
cfMul(
cf(1, -1, 0),
angles(
1.9198621771937625
+ 0.12217304763960307
* sin((sine + 1.5) * 1),
1.2217304763960306
+ 0.08726646259971647
* sin((sine + 0.2) * 0.5),
-1.5707963267948966
)
),
deltaTime
)
--LeftArm,-1,0,0,1,-175,-10,1.5,1,0.5,0,0,1,-90,5,0.6,1,0,0,0,1,-90,0,0,1,RightArm,1,0,0,1,180,-5,0,1,0.5,0,0,1,20,5,0.3,1,0,0,0,1,-110,5,1,1,Head,0,0,0,1,-75,-15,1.2,1,1,0,0,1,-0,5,0.2,0.5,0,0,0,1,-170,0,0,1,Torso,0,0,0,1,-5,10,1.2,1,5,-0.5,-0.2,1,-0,5,0,0.5,0,0.2,-1.2,1,180,0,0,1,LeftLeg,-1,0,0,1,80,7,1.5,1,-1,0,0,1,-70,5,0.2,0.5,0,0,0,1,90,0,0,1,RightLeg,1,0,0,1,110,7,1.5,1,-1,0,0,1,70,5,0.2,0.5,0,0,0,1,-90,0,0,1
end,
walk = function()
velYchg()
local Vfw, Vrt = velbycfrvec()
LeftShoulder.C0 = Lerp(
LeftShoulder.C0,
cfMul(
cf(-1, 0.5, 0),
angles(
-3.0543261909900767
- 0.17453292519943295 * sin(
(sine + 1.5) * 1
)
- Vfw * 0.1,
-1.5707963267948966
+ 0.08726646259971647 * sin(
(sine + 0.6) * 1
)
+ Vrt * 0.2,
-1.5707963267948966
)
),
deltaTime
)
RightShoulder.C0 = Lerp(
RightShoulder.C0,
cfMul(
cf(1, 0.5, 0),
angles(
3.141592653589793
- 0.08726646259971647 * sin(sine * 1),
0.3490658503988659
+ 0.08726646259971647
* sin((sine + 0.3) * 1),
-1.9198621771937625
+ 0.08726646259971647
* sin((sine + 1) * 1)
)
),
deltaTime
)
Neck.C0 = Lerp(
Neck.C0,
cfMul(
cf(0, 1, 0),
angles(
-1.3089969389957472
- 0.2617993877991494 * sin((sine + 1.2) * 1)
+ Vfw * 0.1,
0.08726646259971647 * sin((sine + 0.2) * 0.5)
- Vrt * 0.2,
-2.9670597283903604
)
),
deltaTime
)
RootJoint.C0 = Lerp(
RootJoint.C0,
cfMul(
cf(
0,
5 - 0.5 * sin((sine - 0.2) * 1),
0.2 * sin((sine - 1.2) * 1)
),
angles(
-0.08726646259971647
+ 0.17453292519943295 * sin(
(sine + 1.2) * 1
)
- Vfw * 0.2,
0.08726646259971647 * sin(sine * 0.5),
3.141592653589793 - Vrt * 0.2
)
),
deltaTime
)
LeftHip.C0 = Lerp(
LeftHip.C0,
cfMul(
cf(-1, -1, 0),
angles(
1.3962634015954636
+ 0.12217304763960307 * sin(
(sine + 1.5) * 1
)
- Vfw * 0.2,
-1.2217304763960306
+ 0.08726646259971647
* sin((sine + 0.2) * 0.5),
1.5707963267948966
)
),
deltaTime
)
RightHip.C0 = Lerp(
RightHip.C0,
cfMul(
cf(1, -1, 0),
angles(
1.9198621771937625
+ 0.12217304763960307 * sin(
(sine + 1.5) * 1
)
- Vfw * 0.2,
1.2217304763960306
+ 0.08726646259971647
* sin((sine + 0.2) * 0.5),
-1.5707963267948966
)
),
deltaTime
)
--LeftArm,-1,0,0,1,-175,-10,1.5,1,0.5,0,0,1,-90,5,0.6,1,0,0,0,1,-90,0,0,1,RightArm,1,0,0,1,180,-5,0,1,0.5,0,0,1,20,5,0.3,1,0,0,0,1,-110,5,1,1,Head,0,0,0,1,-75,-15,1.2,1,1,0,0,1,-0,5,0.2,0.5,0,0,0,1,-170,0,0,1,Torso,0,0,0,1,-5,10,1.2,1,5,-0.5,-0.2,1,-0,5,0,0.5,0,0.2,-1.2,1,180,0,0,1,LeftLeg,-1,0,0,1,80,7,1.5,1,-1,0,0,1,-70,5,0.2,0.5,0,0,0,1,90,0,0,1,RightLeg,1,0,0,1,110,7,1.5,1,-1,0,0,1,70,5,0.2,0.5,0,0,0,1,-90,0,0,1
end,
modeLeft = function()
setWalkSpeed(16)
end,
})
addmode('g', {
idle = function()
local Ychg = velYchg() / 20
LeftShoulder.C0 = Lerp(
LeftShoulder.C0,
cfMul(
cf(
-0.9 + 0.4 * sin(sine * 8),
0.5,
0.5 * sin((sine + 0.25) * 4)
),
angles(
1.5707963267948966,
-1.5707963267948966
+ 1.0471975511965976 * sin(sine * 8),
1.5707963267948966
+ 0.6981317007977318
* sin((sine + 0.25) * 4)
)
),
deltaTime
)
RootJoint.C0 = Lerp(
RootJoint.C0,
cfMul(
cf(0.3 * sin((sine + 0.4) * 8), Ychg, 0),
angles(
-1.5707963267948966,
0.3490658503988659 * sin(sine * 8),
-3.141592653589793
)
),
deltaTime
)
Neck.C0 = Lerp(
Neck.C0,
cfMul(
cf(0, 1, 0),
angles(
-1.5707963267948966
+ 0.061086523819801536
* sin((sine + 0.125) * 16),
-0.3839724354387525 * sin(sine * 8),
-3.141592653589793
)
),
deltaTime
)
RightHip.C0 = Lerp(
RightHip.C0,
cfMul(
cf(1, -1 + 0.4 * sin((sine - 0.01) * 8) - Ychg, 0),
angles(
1.5707963267948966,
1.7453292519943295
+ 0.6981317007977318 * sin(sine * 8),
-1.5707963267948966
)
),
deltaTime
)
LeftHip.C0 = Lerp(
LeftHip.C0,
cfMul(
cf(-1, -1 - 0.4 * sin((sine - 0.01) * 8) - Ychg, 0),
angles(
1.5707963267948966,
-1.7453292519943295
+ 0.6981317007977318 * sin(sine * 8),
1.5707963267948966
)
),
deltaTime
)
RightShoulder.C0 = Lerp(
RightShoulder.C0,
cfMul(
cf(
0.9 + 0.4 * sin(sine * 8),
0.5,
-0.5 * sin((sine - 0.35) * 4)
),
angles(
1.5707963267948966
+ 0.6981317007977318 * sin(sine * 4),
1.5707963267948966
+ 1.0471975511965976 * sin(sine * 8),
-1.5707963267948966
+ 0.17453292519943295
* sin((sine - 0.35) * 4)
)
),
deltaTime
)
--LeftArm,-0.9,0.4,0,8,90,0,0.25,4,0.5,0,0,8,-90,60,0,8,0,0.5,0.25,4,90,40,0.25,4,Torso,0,0.3,0.4,8,-90,0,0,8,0,0,0,4,0,20,0,8,0,0,0,8,-180,0,0,8,Head,0,0,0,8,-90,3.5,0.125,16,1,0,0,8,0,-22,0,8,0,0,0,8,-180,0,0,1.1,RightLeg,1,0,0,8,90,0,0,8,-1,0.4,-0.01,8,100,40,0,8,0,0,0,8,-90,0,0,8,LeftLeg,-1,0,0,8,90,0,0,8,-1,-0.4,-0.01,8,-100,40,0,8,0,0,0,8,90,0,0,8,RightArm,0.9,0.4,0,8,90,40,0,4,0.5,0,0,8,90,60,0,8,0,-0.5,-0.35,4,-90,10,-0.35,4
end,
})
addmode('h', {
idle = function()
local Ychg = velYchg() / 20
Neck.C0 = Lerp(
Neck.C0,
cfMul(
cf(0, 1, 0),
angles(
-1.5707963267948966,
-0.4363323129985824 * sin(sine * 8),
-3.141592653589793
)
),
deltaTime
)
RightHip.C0 = Lerp(
RightHip.C0,
cfMul(
cf(1, -1 + 0.3 * sin(sine * 8) - Ychg, 0),
angles(
1.5707963267948966,
1.5707963267948966
+ 0.5235987755982988 * sin(sine * 8),
-1.5707963267948966
)
),
deltaTime
)
LeftShoulder.C0 = Lerp(
LeftShoulder.C0,
cfMul(
cf(-0.5, 1, 0),
angles(
-0.5235987755982988,
-1.5707963267948966
- 0.5235987755982988 * sin(sine * 8),
3.141592653589793
)
),
deltaTime
)
RightShoulder.C0 = Lerp(
RightShoulder.C0,
cfMul(
cf(0.5, 1, 0),
angles(
-0.5235987755982988,
1.5707963267948966
- 0.5235987755982988 * sin(sine * 8),
3.141592653589793
)
),
deltaTime
)
RootJoint.C0 = Lerp(
RootJoint.C0,
cfMul(
cf(
-0.1 * sin(sine * 8),
0.2 * sin((sine + 0.1) * 16) + Ychg,
0
),
angles(
-1.5707963267948966,
0.2617993877991494 * sin(sine * 8),
-3.141592653589793
)
),
deltaTime
)
LeftHip.C0 = Lerp(
LeftHip.C0,
cfMul(
cf(-1, -1 - 0.3 * sin(sine * 8) - Ychg, 0),
angles(
1.5707963267948966,
-1.5707963267948966
+ 0.5235987755982988 * sin(sine * 8),
1.5707963267948966
)
),
deltaTime
)
--Head,0,0,0,8,-90,0,0,8,1,0,0,8,0,-25,0,8,0,0,0,8,-180,0,0,8,RightLeg,1,0,0,8,90,0,0,8,-1,0.3,0,8,90,30,0,8,0,0,0,8,-90,0,0,8,LeftArm,-0.5,0,0,8,-30,0,0,8,1,0,0,8,-90,-30,0,8,0,0,0,8,180,0,0,8,RightArm,0.5,0,0,8,-30,0,0,8,1,0,0,16,90,-30,0,8,0,0,0,8,180,0,0,8,Torso,0,-0.1,0,8,-90,0,0,8,0,0.2,0.1,16,0,15,0,8,0,0,0,8,-180,0,0,8,LeftLeg,-1,0,0,8,90,0,0,8,-1,-0.3,0,8,-90,30,0,8,0,0,0,8,90,0,0,8,Fedora_Handle,8.657480066176504e-09,0,0,8,-6,0,0,8,-0.15052366256713867,0,0,8,0,0,0,8,-0.010221302509307861,0,0,8,0,0,0,8
end,
})
addmode('j', {
idle = function()
local Ychg = velYchg() / 20
LeftHip.C0 = Lerp(
LeftHip.C0,
cfMul(
cf(-0.8, -1, -0.1),
angles(0.17453292519943295, -0.6981317007977318, 0)
),
deltaTime
)
LeftShoulder.C0 = Lerp(
LeftShoulder.C0,
cfMul(
cf(-1.2, 0.5, 0),
angles(
-0.3490658503988659
+ 0.08726646259971647
* sin((sine + 0.1) * 4),
0,
0.6981317007977318
+ 0.08726646259971647
* sin((sine + 0.1) * 4)
)
),
deltaTime
)
RightHip.C0 = Lerp(
RightHip.C0,
cfMul(
cf(1.1, -1, 0),
angles(
1.5707963267948966,
1.7453292519943295,
-1.5707963267948966
)
),
deltaTime
)
Neck.C0 = Lerp(
Neck.C0,
cfMul(
cf(0, 1, 0),
angles(
-1.5707963267948966
+ 0.08726646259971647
* sin((sine + 0.1) * 4),
0,
2.792526803190927
)
),
deltaTime
)
RootJoint.C0 = Lerp(
RootJoint.C0,
cfMul(
cf(
0,
-1.7 + 0.5 * sin(sine * 4) + Ychg,
0.15 * sin(sine * 4)
),
angles(
3.3161255787892263
+ 0.17453292519943295 * sin(sine * 4),
0,
3.6651914291880923
)
),
deltaTime
)
RightShoulder.C0 = Lerp(
RightShoulder.C0,
cfMul(
cf(
0.8 + 0.4 * sin(sine * 4),
0.6 + 0.1 * sin(sine * 4),
0.4 - 0.25 * sin(sine * 4)
),
angles(
2.9670597283903604,
2.2689280275926285
- 0.17453292519943295 * sin(sine * 4),
-1.4835298641951802
- 0.17453292519943295 * sin(sine * 4)
)
),
deltaTime
)
--GalaxyBeautifulHair_Handle,-0.15000000596046448,0,0,1,0,0,0,1,0.10000000149011612,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,LeftLeg,-0.8,0,0,4,10,0,0,4,-1,0,0,4,-40,0,0,4,-0.1,0,0,4,0,0,0,4,LeftArm,-1.2,0,0,4,-20,5,0.1,4,0.5,0,0,4,0,0,0,4,0,0,0,4,40,5,0.1,4,Fedora_Handle,8.657480066176504e-09,0,0,1,-6,0,0,1,-0.15052366256713867,0,0,1,0,0,0,1,-0.010221302509307861,0,0,1,0,0,0,1,ValkyrieHelm_Handle,8.658389560878277e-09,0,0,1,-15,0,0,1,-0.2433757781982422,0,0,1,0,0,0,1,-0.2657628059387207,0,0,1,0,0,0,1,RightLeg,1.1,0,0,4,90,0,0,4,-1,0,0,4,100,0,0,4,0,0,0,4,-90,0,0,4,BlackIronAntlers_Handle,8.658389560878277e-09,0,0,1,0,0,0,1,-0.6500000953674316,0,0,1,0,0,0,1,0.19972775876522064,0,0,1,0,0,0,1,DevAwardsAdurite_Handle,0,0,0,1,0,0,0,1,-0.25,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,SilverthornAntlers_Handle,8.658389560878277e-09,0,0,1,0,0,0,1,-0.6500000953674316,0,0,1,0,0,0,1,0.19972775876522064,0,0,1,0,0,0,1,Head,0,0,0,4,-90,5,0.1,4,1,0,0,4,-0,0,0,4,0,0,0,4,160,0,0,4,Torso,0,0,0,4,190,10,0,4,-1.70,0.5,0,4,-0,0,0,4,0,0.15,0,4,210,0,0,4,RightArm,0.8,0.4,0,4,170,0,0,4,0.6,0.1,0,4,130,-10,0,4,0.4,-0.25,0,4,-85,-10,0,4
end,
})
addmode('k', {
idle = function()
local Ychg = velYchg() / 20
Neck.C0 = Lerp(
Neck.C0,
cfMul(
cf(0, 1, 0),
angles(
-1.6580627893946132
- 0.08726646259971647
* sin(
(sine + 0.3333333333333333) * 12
),
-0.08726646259971647 * sin((sine + 0.2) * 6),
3.141592653589793
)
),
deltaTime
)
LeftHip.C0 = Lerp(
LeftHip.C0,
cfMul(
cf(
-1,
-0.5
- 0.5 * sin(
(sine + 0.39999999999999997) * 12
)
- Ychg,
-0.5
),
angles(
1.7453292519943295
- 1.0471975511965976 * sin(sine * 6),
-1.5707963267948966
+ 0.1308996938995747 * sin(sine * 6),
1.5707963267948966
)
),
deltaTime
)
RightHip.C0 = Lerp(
RightHip.C0,
cfMul(
cf(
1,
-0.5
- 0.5 * sin(
(sine + 0.39999999999999997) * 12
)
- Ychg,
-0.5
),
angles(
1.7453292519943295
+ 1.0471975511965976 * sin(sine * 6),
1.5707963267948966
+ 0.1308996938995747 * sin(sine * 6),
-1.5707963267948966
)
),
deltaTime
)
RootJoint.C0 = Lerp(
RootJoint.C0,
cfMul(
cf(
0,
-0.5
+ 0.3 * sin(
(sine + 0.16666666666666666) * 12
)
+ Ychg,
0
),
angles(
-1.3962634015954636
+ 0.08726646259971647
* sin(
(sine + 0.3333333333333333) * 12
),
0.08726646259971647
* sin((sine + 0.06666666666666667) * 6),
3.141592653589793
)
),
deltaTime
)
LeftShoulder.C0 = Lerp(
LeftShoulder.C0,
cfMul(
cf(
-0.8 - 0.1 * sin(sine * 6),
0.5 + 0.1 * sin(sine * 6),
-0.2
),
angles(
3.141592653589793
- 0.17453292519943295
* sin(
(sine + 0.39999999999999997) * 12
),
-0.17453292519943295,
1.5707963267948966
)
),
deltaTime
)
RightShoulder.C0 = Lerp(
RightShoulder.C0,
cfMul(
cf(
0.8 - 0.1 * sin(sine * 6),
0.5 - 0.1 * sin(sine * 6),
-0.2
),
angles(
3.141592653589793
- 0.17453292519943295
* sin(
(sine + 0.39999999999999997) * 12
),
0.17453292519943295,
-1.5707963267948966
)
),
deltaTime
)
--GalaxyBeautifulHair_Handle,-0.15000000596046448,0,0,1.5,0,0,0,1.5,0.10000000149011612,0,0,1.5,0,0,0,1.5,0,0,0,1.5,0,0,0,1.5,Head,0,0,0,6,-95,-5,0.3333333333333333,12,1,0,0,6,-0,-5,0.2,6,0,0,0,6,180,0,0,6,ValkyrieHelm_Handle,8.658389560878277e-09,0,0,1.5,-15,0,0,1.5,-0.2433757781982422,0,0,1.5,0,0,0,1.5,-0.2657628059387207,0,0,1.5,0,0,0,1.5,SilverthornAntlers_Handle,8.658389560878277e-09,0,0,1.5,0,0,0,1.5,-0.6500000953674316,0,0,1.5,0,0,0,1.5,0.19972775876522064,0,0,1.5,0,0,0,1.5,BlackIronAntlers_Handle,8.658389560878277e-09,0,0,1.5,0,0,0,1.5,-0.6500000953674316,0,0,1.5,0,0,0,1.5,0.19972775876522064,0,0,1.5,0,0,0,1.5,Fedora_Handle,8.657480066176504e-09,0,0,1.5,-6,0,0,1.5,-0.15052366256713867,0,0,1.5,0,0,0,1.5,-0.010221302509307861,0,0,1.5,0,0,0,1.5,LeftLeg,-1,0,0,6,100,-60,0,6,-0.5,-0.5,0.39999999999999997,12,-90,7.5,0,6,-0.5,0,0,6,90,0,0,6,EyelessSmileHead_Handle,-0.00043487548828125,0,0,1.5,180,0,0,1.5,0.6000361442565918,0,0,1.5,0,0,0,1.5,0.0003204345703125,0,0,1.5,180,0,0,1.5,RightLeg,1,0,0,6,100,60,0,6,-0.5,-0.5,0.39999999999999997,12,90,7.5,0,6,-0.5,0,0,6,-90,0,0,6,DevAwardsAdurite_Handle,0,0,0,1.5,0,0,0,1.5,-0.25,0,0,1.5,0,0,0,1.5,0,0,0,1.5,0,0,0,1.5,Torso,0,0,0,6,-80,5,0.3333333333333333,12,-0.5,0.3,0.16666666666666666,12,-0,5,0.06666666666666667,6,0,0,0,6,180,0,0,6,LeftArm,-0.8,-0.1,0,6,180,-10,0.39999999999999997,12,0.5,0.1,0,6,-10,0,0,6,-0.2,0,0,6,90,0,0,6,RightArm,0.8,-0.1,0,6,180,-10,0.39999999999999997,12,0.5,-0.1,0,6,10,0,0,6,-0.2,0,0,6,-90,0,0,6
end,
})
local idleL = function()
local Ychg = velYchg() / 20
RightHip.C0 = Lerp(
RightHip.C0,
cfMul(
cf(1, -0.9 + 0.2 * sin((sine - 0.2) * 16) - Ychg, 0.25),
angles(
0,
0.7853981633974483,
0.4363323129985824
- 1.1344640137963142
* sin((sine - 0.0875) * 8)
)
),
deltaTime
)
RootJoint.C0 = Lerp(
RootJoint.C0,
cfMul(
cf(
0.15 * sin((sine - 0.1) * 8),
0.54 * sin(sine * 16) + Ychg,
0
),
angles(
-1.5707963267948966,
-0.08726646259971647 * sin((sine - 0.0785) * 8),
3.141592653589793
- 0.08726646259971647
* sin((sine - 0.0785) * 8)
)
),
deltaTime
)
RightShoulder.C0 = Lerp(
RightShoulder.C0,
cfMul(
cf(
0.75 + 0.07 * sin((sine - 0.0785) * 8),
1.3 + 0.1 * sin((sine - 0.0875) * 16),
0
),
angles(
1.3962634015954636,
2.356194490192345
- 0.06981317007977318
* sin((sine - 0.0785) * 8),
1.2217304763960306
)
),
deltaTime
)
Neck.C0 = Lerp(
Neck.C0,
cfMul(
cf(0, 1, 0),
angles(
-1.5707963267948966
+ 0.08726646259971647
* sin((sine - 0.1) * 16),
0.12217304763960307 * sin((sine - 0.0785) * 8),
3.141592653589793
)
),
deltaTime
)
LeftHip.C0 = Lerp(
LeftHip.C0,
cfMul(
cf(-1, -0.9 + 0.2 * sin((sine - 0.2) * 16) - Ychg, 0.25),
angles(
0,
-0.7853981633974483,
-0.4363323129985824
- 1.1344640137963142
* sin((sine - 0.0875) * 8)
)
),
deltaTime
)
LeftShoulder.C0 = Lerp(
LeftShoulder.C0,
cfMul(
cf(-1, 0.45 + 0.05 * sin((sine - 0.0875) * 16), -0.2),
angles(
2.0943951023931953
+ 0.17453292519943295
* sin((sine - 0.0875) * 16),
-0.5235987755982988,
1.5707963267948966
+ 0.17453292519943295
* sin((sine - 0.0875) * 16)
)
),
deltaTime
)
--MW_animatorProgressSave: RightLeg,1,0,0,16,0,0,0,8,-0.9,0.2,-0.2,16,45,0,-0.0875,8,0.25,0,0,16,25,-65,-0.0875,8,Fedora_Handle,8.657480066176504e-09,0,0,2,-6,0,0,2,-0.15052366256713867,0,0,2,0,0,0,2,-0.010221302509307861,0,0,2,0,0,0,2,Torso,0,0.15,-0.1,8,-90,0,0,16,0,0.54,0,16,-0,-5,-0.0785,8,0,0,0,16,180,-5,-0.0785,8,RightArm,0.75,0.07,-0.0785,8,80,0,0,16,1.3,0.1,-0.0875,16,135,-4,-0.0785,8,0,0,0,16,70,0,0,16,Head,0,0,0,16,-90,5,-0.1,16,1,0,0,16,-0,7,-0.0785,8,0,0,0,16,180,0,0,16,LeftLeg,-1,0,0,16,0,0,0,8,-0.9,0.2,-0.2,16,-45,0,0,8,0.25,0,0,16,-25,-65,-0.0875,8,Bandana_Handle,3.9362930692732334e-09,0,0,2,0,0,0,2,0.3000001907348633,0,0,2,0,0,0,2,-0.6002722978591919,0,0,2,0,0,0,2,LeftArm,-1,0,0,16,120,10,-0.0875,16,0.45,0.05,-0.0875,16,-30,0,0,16,-0.2,0,0,16,90,10,-0.0875,16
end
addmode('l', {
modeEntered = function()
setWalkSpeed(10)
end,
idle = idleL,
walk = idleL,
modeLeft = function()
setWalkSpeed(16)
end,
})
end)
btn('nameless animations V7', function()
local t = reanimate()
if type(t) ~= 'table' then
return
end
local raycastlegs = t.raycastlegs
local velbycfrvec = t.velbycfrvec
local velchgbycfrvec = t.velchgbycfrvec
local addmode = t.addmode
local getJoint = t.getJoint
local RootJoint = getJoint('RootJoint')
local RightShoulder = getJoint('Right Shoulder')
local LeftShoulder = getJoint('Left Shoulder')
local RightHip = getJoint('Right Hip')
local LeftHip = getJoint('Left Hip')
local Neck = getJoint('Neck')
addmode('default', {
idle = function()
local rY, lY = raycastlegs()
local Cfw, Crt = velchgbycfrvec()
RightShoulder.C0 = Lerp(
RightShoulder.C0,
cfMul(
cf(1, 0.3 + 0.1 * sin(sine * 2), -0.1),
angles(
-0.5235987755982988
+ 0.05235987755982989
* sin((sine + 1.5) * 2),
1.0471975511965976
+ 0.08726646259971647
* sin((sine + 0.5) * 2),
0.5235987755982988
)
),
deltaTime
)
Neck.C0 = Lerp(
Neck.C0,
cfMul(
cf(0, 1, 0),
angles(
-1.6580627893946132
+ 0.08726646259971647
* sin((sine + 0.6) * 2),
0,
3.141592653589793
+ 0.2617993877991494
* sin((sine - 1.2) * 1)
)
),
deltaTime
)
RootJoint.C0 = Lerp(
RootJoint.C0,
cfMul(
cf(Crt * 3, 0.1 * sin(sine * 2), Cfw * -3),
angles(
-1.5707963267948966
+ 0.08726646259971647 * sin(sine * 2)
- Cfw,
Crt,
3.141592653589793
)
),
deltaTime
)
RightHip.C0 = Lerp(
RightHip.C0,
cfMul(
cf(
1,
-1 - 0.1 * sin(sine * 2) + rY,
0.1 * sin(sine * 2) - rY * 0.5
),
angles(
-0.6981317007977318
- 0.08726646259971647 * sin(sine * 2),
1.0471975511965976,
0.5235987755982988
)
),
deltaTime
)
LeftShoulder.C0 = Lerp(
LeftShoulder.C0,
cfMul(
cf(-1, 0.6 + 0.1 * sin(sine * 2), 0),
angles(
3.141592653589793
+ 0.05235987755982989
* sin((sine + 0.5) * 2),
-2.705260340591211
+ 0.017453292519943295
* sin((sine + 1.5) * 2),
-1.2217304763960306
+ 0.05235987755982989
* sin((sine + 1.5) * 2)
)
),
deltaTime
)
LeftHip.C0 = Lerp(
LeftHip.C0,
cfMul(
cf(
-1,
-1 - 0.1 * sin(sine * 2) + lY,
0.1 * sin(sine * 2) - lY * 0.5
),
angles(
-0.3490658503988659
- 0.08726646259971647 * sin(sine * 2),
-1.0471975511965976,
-0.5235987755982988
)
),
deltaTime
)
--RightArm,1,0,0,2,-30,3,1.5,2,0.3,0.1,0,2,60,5,0.5,2,-0.1,0,0,2,30,0,0,2,Head,0,0,0,2,-95,5,0.6,2,1,0,0,2,-0,0,0,1,0,0,0,2,180,15,-1.2,1,Torso,0,0,0,2,-90,5,0,2,0,0.1,0,2,-0,0,0,2,0,0,0,2,180,0,0,2,RightLeg,1,0,0,2,-40,-5,0,2,-1,-0.1,0,2,60,0,0,2,0,0.1,0,2,30,0,0,2,Meshes/TrollFaceHeadAccessory_Handle,0.01043701171875,0,0,1,0,0,0,1,0.43610429763793945,0,0,1,0,0,0,1,-0.01102447509765625,0,0,1,0,0,0,1,LeftArm,-1,0,0,2,180,3,0.5,2,0.6,0.1,0,2,-155,1,1.5,2,0,0,0,2,-70,3,1.5,2,LeftLeg,-1,0,0,2,-20,-5,0,2,-1,-0.1,0,2,-60,0,0,2,0,0.1,0,2,-30,0,0,2
end,
walk = function()
local Vfw, Vrt = velbycfrvec()
local rY, lY = raycastlegs()
local Cfw, Crt = velchgbycfrvec()
RootJoint.C0 = Lerp(
RootJoint.C0,
cfMul(
cf(Crt * 3, -0.2 + 0.2 * sin(sine * 16), Cfw * -3),
angles(
-1.6580627893946132
+ 0.04363323129985824 * sin(sine * 16)
- Vfw * 0.15
- Cfw,
0.03490658503988659 * sin(sine * 8)
+ Vrt * 0.15
+ Crt,
-3.141592653589793
- 0.08726646259971647 * sin(
(sine + 0.25) * 8
)
- Vrt * 0.1
)
),
deltaTime
)
RightHip.C0 = Lerp(
RightHip.C0,
cfMul(
cf(
1,
-0.8 + 0.4 * sin((sine + 0.125) * 8) + rY,
-0.15 * Vfw
+ 0.4 * sin((sine + 10) * 8) * Vfw
+ rY * -0.5
),
angles(
1.3962634015954636
+ 0.6981317007977318
* sin(sine * 8)
* Vfw,
1.5707963267948966
+ 0.6981317007977318
* sin(sine * 8)
* Vrt,
-1.5707963267948966
+ 0.2617993877991494 * sin(sine * 8)
)
),
deltaTime
)
LeftShoulder.C0 = Lerp(
LeftShoulder.C0,
cfMul(
cf(-1, 0.35 - 0.1 * sin(sine * 8), 0),
angles(
0.5235987755982988 * sin(sine * 8) * Vfw,
-1.5707963267948966
- 0.5235987755982988
* sin(sine * 8)
* Vfw,
-0.5235987755982988 * sin(sine * 8) * Vfw
)
),
deltaTime
)
RightShoulder.C0 = Lerp(
RightShoulder.C0,
cfMul(
cf(1, 0.35 + 0.1 * sin(sine * 8), 0),
angles(
-0.5235987755982988 * sin(sine * 8) * Vfw,
1.5707963267948966
- 0.5235987755982988
* sin(sine * 8)
* Vfw,
-0.5235987755982988 * sin(sine * 8) * Vfw
)
),
deltaTime
)
LeftHip.C0 = Lerp(
LeftHip.C0,
cfMul(
cf(
-1,
-0.8 - 0.4 * sin((sine + 0.125) * 8) + lY,
-0.15 * Vfw
- 0.4 * sin((sine + 10) * 8) * Vfw
+ lY * -0.5
),
angles(
1.3962634015954636
- 0.6981317007977318
* sin(sine * 8)
* Vfw,
-1.5707963267948966
- 0.6981317007977318
* sin(sine * 8)
* Vrt,
1.5707963267948966
+ 0.2617993877991494 * sin(sine * 8)
)
),
deltaTime
)
Neck.C0 = Lerp(
Neck.C0,
cfMul(
cf(0, 1, 0),
angles(
-1.5707963267948966
+ 0.08726646259971647 * sin(
(sine + 10) * 16
)
+ Vfw * 0.15,
-0.08726646259971647 * sin(sine * 8)
+ Vrt * -0.1,
3.141592653589793
- 0.05235987755982989 * sin((sine + 5) * 8)
- Vrt * 0.5
)
),
deltaTime
)
--Torso,0,0,0,8,-95,2.5,0,16,-0.2,0.2,0,16,0,5,0,8,0,0,0,8,-180,-5,0.25,8,RightArm,1,0,0,1,0,-30,0,8,0.35,0.1,0,8,90,-30,0,8,0,0,0,8,0,-30,0,8,RightLeg,1,0,0,8,80,40,0,8,-0.8,0.4,0.125,8,90,40,0,8,-0.15,0.4,10,8,-90,15,0,8,LeftLeg,-1,0,0,8,80,-40,0,8,-0.8,-0.4,0.125,8,-90,-40,0,8,-0.15,-0.4,10,8,90,15,0,8,Head,0,0,0,1,-90,2.5,10,16,1,0,0,1,-0,-5,0,8,0,0,0,1,180,-3,5,8,LeftArm,-1,0,0,1,0,30,0,8,0.35,-0.1,0,8,-90,-30,0,8,0,-0.4,0,8,0,-30,0,8
end,
jump = function()
local Vfw, Vrt = velbycfrvec()
local Cfw, Crt = velchgbycfrvec()
RootJoint.C0 = Lerp(
RootJoint.C0,
cfMul(
cf(Crt * 3, 0, Cfw * -3),
angles(
-1.4835298641951802 + Vfw * 0.1 - Cfw,
Vrt * -0.05 + Crt,
-3.141592653589793
)
),
deltaTime
)
RightShoulder.C0 = Lerp(
RightShoulder.C0,
cfMul(
cf(1, 0.5, 0),
angles(
4.014257279586958
- 0.08726646259971647
* sin((sine + 0.5) * 4),
1.7453292519943295
+ 0.08726646259971647
* sin((sine + 0.25) * 4),
-1.5707963267948966
)
),
deltaTime
)
LeftHip.C0 = Lerp(
LeftHip.C0,
cfMul(
cf(-1, -1, 0),
angles(
1.5707963267948966
- 0.08726646259971647
* sin((sine + 0.5) * 4),
-1.6580627893946132
+ 0.06981317007977318
* sin((sine + 0.25) * 4),
1.5707963267948966
)
),
deltaTime
)
LeftShoulder.C0 = Lerp(
LeftShoulder.C0,
cfMul(
cf(-1, 0.5, 0),
angles(
4.014257279586958
- 0.08726646259971647
* sin((sine + 0.5) * 4),
-1.7453292519943295
- 0.08726646259971647
* sin((sine + 0.25) * 4),
1.5707963267948966
)
),
deltaTime
)
Neck.C0 = Lerp(
Neck.C0,
cfMul(
cf(0, 1, 0),
angles(
-1.3962634015954636,
0,
-3.141592653589793 - Vrt
)
),
deltaTime
)
RightHip.C0 = Lerp(
RightHip.C0,
cfMul(
cf(1, -1, 0),
angles(
1.5707963267948966
- 0.08726646259971647
* sin((sine + 0.5) * 4),
1.6580627893946132
- 0.06981317007977318
* sin((sine + 0.25) * 4),
-1.5707963267948966
)
),
deltaTime
)
--Torso,0,0,0,4,-85,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,-180,0,0,4,RightArm,1,0,0,4,230,-5,0.5,4,0.5,0,0,4,100,5,0.25,4,0,0,0,4,-90,0,0,4,LeftLeg,-1,0,0,4,90,-5,0.5,4,-1,0,0,4,-95,4,0.25,4,0,0,0,4,90,0,0,4,LeftArm,-1,0,0,4,230,-5,0.5,4,0.5,0,0,4,-100,-5,0.25,4,0,0,0,4,90,0,0,4,Head,0,0,0,4,-80,0,0.5,4,1,0,0,4,0,0,0.25,4,0,0,0,4,-180,0,0,4,RightLeg,1,0,0,4,90,-5,0.5,4,-1,0,0,4,95,-4,0.25,4,0,0,0,4,-90,0,0,4
end,
fall = function()
local Vfw, Vrt = velbycfrvec()
local Cfw, Crt = velchgbycfrvec()
RootJoint.C0 = Lerp(
RootJoint.C0,
cfMul(
cf(Crt * 3, 0, Cfw * -3),
angles(
-1.6580627893946132 + Vfw * 0.1 - Cfw,
Vrt * -0.05 + Crt,
-3.141592653589793
)
),
deltaTime
)
RightShoulder.C0 = Lerp(
RightShoulder.C0,
cfMul(
cf(1, 0.5, 0),
angles(
4.014257279586958
- 0.08726646259971647
* sin((sine + 0.5) * 4),
1.7453292519943295
+ 0.08726646259971647
* sin((sine + 0.25) * 4),
-1.5707963267948966
)
),
deltaTime
)
LeftHip.C0 = Lerp(
LeftHip.C0,
cfMul(
cf(-1, -1, 0),
angles(
1.5707963267948966
- 0.08726646259971647
* sin((sine + 0.5) * 4),
-1.6580627893946132
+ 0.06981317007977318
* sin((sine + 0.25) * 4),
1.5707963267948966
)
),
deltaTime
)
LeftShoulder.C0 = Lerp(
LeftShoulder.C0,
cfMul(
cf(-1, 0.5, 0),
angles(
4.014257279586958
- 0.08726646259971647
* sin((sine + 0.5) * 4),
-1.7453292519943295
- 0.08726646259971647
* sin((sine + 0.25) * 4),
1.5707963267948966
)
),
deltaTime
)
Neck.C0 = Lerp(
Neck.C0,
cfMul(
cf(0, 1, 0),
angles(
-1.7453292519943295,
0,
-3.141592653589793 - Vrt
)
),
deltaTime
)
RightHip.C0 = Lerp(
RightHip.C0,
cfMul(
cf(1, -1, 0),
angles(
1.5707963267948966
- 0.08726646259971647
* sin((sine + 0.5) * 4),
1.6580627893946132
- 0.06981317007977318
* sin((sine + 0.25) * 4),
-1.5707963267948966
)
),
deltaTime
)
--Torso,0,0,0,4,-95,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,-180,0,0,4,RightArm,1,0,0,4,230,-5,0.5,4,0.5,0,0,4,100,5,0.25,4,0,0,0,4,-90,0,0,4,LeftLeg,-1,0,0,4,90,-5,0.5,4,-1,0,0,4,-95,4,0.25,4,0,0,0,4,90,0,0,4,LeftArm,-1,0,0,4,230,-5,0.5,4,0.5,0,0,4,-100,-5,0.25,4,0,0,0,4,90,0,0,4,Head,0,0,0,4,-100,0,0.5,4,1,0,0,4,0,0,0.25,4,0,0,0,4,-180,0,0,4,RightLeg,1,0,0,4,90,-5,0.5,4,-1,0,0,4,95,-4,0.25,4,0,0,0,4,-90,0,0,4
end,
})
addmode('q', {
idle = function()
local Cfw, Crt = velchgbycfrvec()
LeftShoulder.C0 = Lerp(
LeftShoulder.C0,
cfMul(
cf(-1, 0.75, -0.2),
angles(
2.705260340591211
- 0.08726646259971647
* sin((sine + 0.1) * 2),
-2.792526803190927,
-0.6981317007977318
)
),
deltaTime
)
RightShoulder.C0 = Lerp(
RightShoulder.C0,
cfMul(
cf(1, 0.75, -0.2),
angles(
2.705260340591211
- 0.08726646259971647
* sin((sine + 0.1) * 2),
2.792526803190927,
0.6981317007977318
)
),
deltaTime
)
Neck.C0 = Lerp(
Neck.C0,
cfMul(
cf(0, 1, 0),
angles(
-1.9198621771937625
- 0.10471975511965978
* sin((sine + 0.3) * 2),
0,
3.141592653589793
)
),
deltaTime
)
RootJoint.C0 = Lerp(
RootJoint.C0,
cfMul(
cf(Crt * 3, -2.45 - 0.05 * sin(sine * 2), Cfw * -3),
angles(
0.03490658503988659 * sin(sine * 2) - Cfw,
Crt,
3.141592653589793
)
),
deltaTime
)
RightHip.C0 = Lerp(
RightHip.C0,
cfMul(
cf(1, -1, 0),
angles(
1.3962634015954636
- 0.03490658503988659 * sin(sine * 2),
1.3089969389957472,
-0.9599310885968813
)
),
deltaTime
)
LeftHip.C0 = Lerp(
LeftHip.C0,
cfMul(
cf(-1, -1, 0),
angles(
1.5707963267948966
- 0.03490658503988659 * sin(sine * 2),
-1.3089969389957472,
1.5707963267948966
)
),
deltaTime
)
--LeftArm,-1,0,0,2,155,-5,0.1,2,0.75,0,0,2,-160,0,0,2,-0.2,0,0,2,-40,0,0,2,RightArm,1,0,0,2,155,-5,0.1,2,0.75,0,0,2,160,0,0,2,-0.2,0,0,2,40,0,0,2,Head,0,0,0,2,-110,-6,0.3,2,1,0,0,2,-0,0,0,2,0,0,0,2,180,0,0,2,Torso,0,0,0,2,0,2,0,2,-2.45,-0.05,0,2,-0,0,0,2,0,0,0,2,180,0,0,2,RightLeg,1,0,0,2,80,-2,0,2,-1,0,0,2,75,0,0,2,0,0,0,2,-55,0,0,2,LeftLeg,-1,0,0,2,90,-2,0,2,-1,0,0,2,-75,0,0,2,0,0,0,2,90,0,0,2
end,
})
addmode('e', {
idle = function()
local Cfw, Crt = velchgbycfrvec()
LeftShoulder.C0 = Lerp(
LeftShoulder.C0,
cfMul(
cf(
-0.9,
0.4 + 0.1 * sin(sine * 2),
0.3 - 0.15 * sin(sine * 2)
),
angles(
-1.0471975511965976
- 0.12217304763960307 * sin(sine * 2),
-1.3962634015954636,
-0.6981317007977318
)
),
deltaTime
)
RootJoint.C0 = Lerp(
RootJoint.C0,
cfMul(
cf(
Crt * 3,
-1.85 - 0.1 * sin((sine + 0.2) * 2),
Cfw * -3
),
angles(
-1.3962634015954636
+ 0.03490658503988659 * sin(sine * 2)
- Cfw,
-0.08726646259971647 + Crt,
3.141592653589793
)
),
deltaTime
)
RightShoulder.C0 = Lerp(
RightShoulder.C0,
cfMul(
cf(
1,
0.4 + 0.1 * sin(sine * 2),
0.2 - 0.15 * sin(sine * 2)
),
angles(
0.6108652381980153
- 0.12217304763960307 * sin(sine * 2),
1.2217304763960306,
-0.7853981633974483
)
),
deltaTime
)
Neck.C0 = Lerp(
Neck.C0,
cfMul(
cf(0, 1, 0),
angles(
-1.6580627893946132
- 0.03490658503988659
* sin((sine + 0.6) * 2),
0.10471975511965978
+ 0.06981317007977318 * sin(sine * 0.66),
3.141592653589793
+ 0.3490658503988659 * sin(sine * 0.66)
)
),
deltaTime
)
RightHip.C0 = Lerp(
RightHip.C0,
cfMul(
cf(
1,
0.2 + 0.15 * sin((sine + 0.2) * 2),
-0.7 + 0.1 * sin(sine * 2)
),
angles(
1.4835298641951802
+ 0.03490658503988659 * sin(sine * 2),
1.4835298641951802,
-1.5707963267948966
)
),
deltaTime
)
LeftHip.C0 = Lerp(
LeftHip.C0,
cfMul(
cf(-1, -0.75 + 0.1 * sin((sine + 0.2) * 2), -0.5),
angles(
1.3962634015954636
- 0.03490658503988659 * sin(sine * 2),
-1.6580627893946132,
0
)
),
deltaTime
)
--LeftArm,-0.9,0,0,2,-60,-7,0,2,0.4,0.1,0,2,-80,0,0,2,0.3,-0.15,0,2,-40,0,0,2,Torso,0,0,0,2,-80,2,0,2,-1.85,-0.1,0.2,2,-5,0,0,2,0,0,0,2,180,0,0,2,RightArm,1,0,0,2,35,-7,0,2,0.4,0.1,0,2,70,0,0,2,0.2,-0.15,0,2,-45,0,0,2,Head,0,0,0,2,-95,-2,0.6,2,1,0,0,2,6,4,0,0.66,0,0,0,2,180,20,0,0.66,RightLeg,1,0,0,2,85,2,0,2,0.2,0.15,0.2,2,85,0,0,2,-0.7,0.1,0,2,-90,0,0,2,LeftLeg,-1,0,0,2,80,-2,0,2,-0.75,0.1,0.2,2,-95,0,0,2,-0.5,0,0,2,0,0,0,2
end,
})
addmode('r', {
idle = function()
local Cfw, Crt = velchgbycfrvec()
RightHip.C0 = Lerp(
RightHip.C0,
cfMul(
cf(1, -0.9 - 0.2 * sin(sine * 2), 0),
angles(
1.5707963267948966,
1.6580627893946132
- 0.17453292519943295 * sin(sine + 0.8),
-1.5707963267948966
)
),
deltaTime
)
RootJoint.C0 = Lerp(
RootJoint.C0,
cfMul(
cf(
0.3 * sin(sine + 0.8) + Crt * 3,
-0.1 + 0.2 * sin(sine * 2),
Cfw * -3
),
angles(
-1.5707963267948966 - Cfw,
Crt,
-3.141592653589793
)
),
deltaTime
)
Neck.C0 = Lerp(
Neck.C0,
cfMul(
cf(0, 1, 0),
angles(
-1.5707963267948966
+ 0.08726646259971647
* sin((sine - 0.5) * 2),
0.08726646259971647 * sin(sine - 1),
-3.141592653589793
+ 0.2617993877991494 * sin(sine * 5)
)
),
deltaTime
)
LeftShoulder.C0 = Lerp(
LeftShoulder.C0,
cfMul(
cf(
-1 + 0.1 * sin(sine * 7),
0.2 - 0.1 * sin(sine + 0.8),
-0.25
),
angles(
1.5707963267948966
+ 0.5235987755982988 * sin(sine * 7),
-0.6981317007977318,
0.3490658503988659 * sin(sine * 7)
)
),
deltaTime
)
LeftHip.C0 = Lerp(
LeftHip.C0,
cfMul(
cf(-1, -0.9 - 0.2 * sin(sine * 2), 0),
angles(
1.5707963267948966,
-1.6580627893946132
- 0.17453292519943295 * sin(sine + 0.8),
1.5707963267948966
)
),
deltaTime
)
RightShoulder.C0 = Lerp(
RightShoulder.C0,
cfMul(
cf(
1 + 0.1 * sin(sine * 7),
0.2 + 0.1 * sin(sine + 0.8),
-0.25
),
angles(
1.5707963267948966
- 0.5235987755982988 * sin(sine * 7),
0.6981317007977318,
0.3490658503988659 * sin(sine * 7)
)
),
deltaTime
)
--RightLeg,1,0,0,1,90,0,0,1,-0.9,-0.2,0,2,95,-10,0.8,1,0,0,0,1,-90,0,0,1,Torso,0,0.3,0.8,1,-90,0,0,1,-0.1,0.2,0,2,0,0,0,1,0,0,0,1,-180,0,0,1,Head,0,0,0,1,-90,5,-0.5,2,1,0,0,1,0,5,-1,1,0,0,0,1,-180,15,0,5,Fedora_Handle,8.657480066176504e-09,0,0,1,-6,0,0,1,-0.15052366256713867,0,0,1,0,0,0,1,-0.010221302509307861,0,0,1,0,0,0,1,LeftArm,-1,0.1,0,7,90,30,0,7,0.2,-0.1,0.8,1,-40,0,0,1,-0.25,0,0,1,0,20,0,7,LeftLeg,-1,0,0,1,90,0,0,1,-0.9,-0.2,0,2,-95,-10,0.8,1,0,0,0,1,90,0,0,1,RightArm,1,0.1,0,7,90,-30,0,7,0.2,0.1,0.8,1,40,0,0,1,-0.25,0,0,1,-0,20,0,7
end,
})
addmode('t', {
idle = function()
local Cfw, Crt = velchgbycfrvec()
LeftShoulder.C0 = Lerp(
LeftShoulder.C0,
cfMul(
cf(-1, 0.5, 0),
angles(
1.5707963267948966,
-1.6580627893946132
+ 0.08726646259971647
* sin((sine - 0.3) * 4),
1.5707963267948966
)
),
deltaTime
)
RightShoulder.C0 = Lerp(
RightShoulder.C0,
cfMul(
cf(1 + 0.15 * sin((sine - 0.4) * 4), 1.42, 0),
angles(
1.5707963267948966,
1.4835298641951802
- 0.3490658503988659
* sin((sine - 0.4) * 4),
1.5707963267948966
)
),
deltaTime
)
Neck.C0 = Lerp(
Neck.C0,
cfMul(
cf(0, 1, 0),
angles(
-1.4835298641951802,
0.04363323129985824
- 0.08726646259971647
* sin((sine + 0.1) * 4),
-3.141592653589793
+ 0.04363323129985824 * sin(sine * 4)
)
),
deltaTime
)
RootJoint.C0 = Lerp(
RootJoint.C0,
cfMul(
cf(0.1 * sin(sine * 4) + Crt * 3, 0, Cfw * -3),
angles(
-1.5707963267948966 - Cfw,
-0.08726646259971647
+ 0.08726646259971647 * sin(sine * 4)
+ Crt,
-3.141592653589793
)
),
deltaTime
)
RightHip.C0 = Lerp(
RightHip.C0,
cfMul(
cf(1, -1.1 + 0.1 * sin(sine * 4), 0),
angles(
1.5707963267948966,
1.5707963267948966
+ 0.08726646259971647 * sin(sine * 4),
-1.5707963267948966
)
),
deltaTime
)
LeftHip.C0 = Lerp(
LeftHip.C0,
cfMul(
cf(
-1 - 0.02 * sin(sine * 4),
-0.925 - 0.07 * sin(sine * 4),
0
),
angles(
1.5707963267948966,
-1.7453292519943295
+ 0.08726646259971647 * sin(sine * 4),
1.5707963267948966
)
),
deltaTime
)
--LeftArm,-1,0,0,4,90,0,0,4,0.5,0,0,4,-95,5,-0.3,4,0,0,0,4,90,0,0,4,RightArm,1,0.15,-0.4,4,90,0,0,4,1.42,0,0,4,85,-20,-0.4,4,0,0,0,4,90,0,0,4,Head,0,0,0,4,-85,0,0,4,1,0,0,4,2.5,-5,0.1,4,0,0,0,4,-180,2.5,0,4,Torso,0,0.1,0,4,-90,0,0,4,0,0,0,4,-5,5,0,4,0,0,0,4,-180,0,0,4,RightLeg,1,0,0,4,90,0,0,4,-1.1,0.1,0,4,90,5,0,4,0,0,0,4,-90,0,0,4,LeftLeg,-1,-0.02,0,4,90,0,0,4,-0.925,-0.07,0,4,-100,5,0,4,0,0,0,4,90,0,0,4
end,
})
addmode('y', {
idle = function()
local Cfw, Crt = velchgbycfrvec()
LeftShoulder.C0 = Lerp(
LeftShoulder.C0,
cfMul(
cf(-1.5, 0.5, 0),
angles(
-1.7453292519943295,
0.17453292519943295
- 0.04363323129985824 * sin(sine * 2),
-1.4835298641951802
)
),
deltaTime
)
RightHip.C0 = Lerp(
RightHip.C0,
cfMul(
cf(1, -0.9000000953674316 - 0.1 * sin(sine * 2), 0),
angles(
-1.3962634015954636,
1.3962634015954636,
1.5707963267948966
)
),
deltaTime
)
LeftHip.C0 = Lerp(
LeftHip.C0,
cfMul(
cf(-1, -1.0000001192092896 - 0.1 * sin(sine * 2), 0),
angles(
-1.5707963267948966,
-1.3962634015954636,
-1.5707963267948966
)
),
deltaTime
)
Neck.C0 = Lerp(
Neck.C0,
cfMul(
cf(0, 1, 0),
angles(
-2.0943951023931953
+ 0.08726646259971647
* sin((sine - 1) * 2),
-0.08726646259971647,
2.792526803190927
)
),
deltaTime
)
RightShoulder.C0 = Lerp(
RightShoulder.C0,
cfMul(
cf(1, 1.2000000476837158, 0),
angles(
2.6179938779914944
+ 0.08726646259971647
* sin((sine - 1) * 2),
0.6981317007977318,
-1.3962634015954636
)
),
deltaTime
)
RootJoint.C0 = Lerp(
RootJoint.C0,
cfMul(
cf(Crt * 3, 0.1 * sin(sine * 2), Cfw * -3),
angles(
-1.6580627893946132 - Cfw,
0.08726646259971647 + Crt,
3.0543261909900767
)
),
deltaTime
)
--LeftArm,-1.5,0,0,2,-100,0,0,2,0.5,0,0,2,10,-2.5,0,2,0,0,0,2,-85,0,0,2,RightLeg,1,0,0,2,-80,0,0,2,-0.9000000953674316,-0.1,0,2,80,0,0,2,0,0,0,2,90,0,0,2,LeftLeg,-1,0,0,2,-90,0,0,2,-1.0000001192092896,-0.1,0,2,-80,0,0,2,0,0,0,2,-90,0,0,2,Fedora_Handle,8.657480066176504e-09,0,0,2,-6,0,0,2,-0.15052366256713867,0,0,2,0,0,0,2,-0.010221302509307861,0,0,2,0,0,0,2,Head,0,0,0,2,-120,5,-1,2,1,0,0,2,-5,0,0,2,0,0,0,2,160,0,0,2,RightArm,1,0,0,2,150,5,-1,2,1.2000000476837158,0,0,2,40,0,0,2,0,0,0,2,-80,0,0,2,Torso,0,0,0,2,-95,0,0,2,0,0.1,0,2,5,0,0,2,0,0,0,2,175,0,0,2
end,
})
addmode('u', {
idle = function()
local Cfw, Crt = velchgbycfrvec()
RootJoint.C0 = Lerp(
RootJoint.C0,
cfMul(
cf(Crt * 3, 0.75 + 0.25 * sin(sine * 2), Cfw * -3),
angles(
-1.5707963267948966 - Cfw,
Crt,
3.141592653589793
)
),
deltaTime
)
Neck.C0 = Lerp(
Neck.C0,
cfMul(
cf(0, 1.5 - 0.1 * sin((sine + 0.2) * 2), 0),
angles(
-1.5707963267948966
- 0.08726646259971647
* sin((sine + 0.4) * 2),
0,
3.141592653589793
+ 0.3490658503988659 * sin(sine * 0.66)
)
),
deltaTime
)
LeftHip.C0 = Lerp(
LeftHip.C0,
cfMul(
cf(
-0.5 - 1 * sin((sine + 0.2) * 2.2),
-0.75 - 0.25 * sin(sine * 2),
1 * sin((sine + 0.95) * 2.2)
),
angles(0, -1.5707963267948966, 0)
),
deltaTime
)
RightHip.C0 = Lerp(
RightHip.C0,
cfMul(
cf(
0.5 + 1 * sin((sine + 0.2) * 2.2),
-0.75 - 0.25 * sin(sine * 2),
-1 * sin((sine + 0.95) * 2.2)
),
angles(0, 1.5707963267948966, 0)
),
deltaTime
)
RightShoulder.C0 = Lerp(
RightShoulder.C0,
cfMul(
cf(
-0.5 - 1.85 * sin(sine * 2),
0.8 - 0.5 * sin(sine * 2),
-1.85 * sin((sine + 0.75) * 2)
),
angles(0, 1.5707963267948966, 0)
),
deltaTime
)
LeftShoulder.C0 = Lerp(
LeftShoulder.C0,
cfMul(
cf(
0.5 + 1.85 * sin(sine * 2),
0.8 - 0.5 * sin(sine * 2),
1.85 * sin((sine + 0.75) * 2)
),
angles(0, -1.5707963267948966, 0)
),
deltaTime
)
--Torso,0,0,0,2,-90,0,0,2,0.75,0.25,0,2,-0,0,0,2,0,0,0,2,180,0,0,2,Fedora_Handle,8.657480066176504e-09,0,0,2,-6,0,0,2,-0.15052366256713867,0,0,2,0,0,0,2,-0.010221302509307861,0,0,2,0,0,0,2,Head,0,0,0,2,-90,-5,0.4,2,1.5,-0.1,0.2,2,-0,0,0,2,0,0,0,2,180,20,0,0.66,LeftLeg,-0.5,-1,0.2,2.2,-0,0,0,2,-0.75,-0.25,0,2,-90,0,0,2,0,1,0.95,2.2,0,0,0,2,RightLeg,0.5,1,0.2,2.2,0,0,0,2,-0.75,-0.25,0,2,90,0,0,2,0,-1,0.95,2.2,0,0,0,2,RightArm,-0.5,-1.85,0,2,0,0,0,2,0.8,-0.5,0,2,90,0,0,2,0,-1.85,0.75,2,0,0,0,2,LeftArm,0.5,1.85,0,2,-0,0,0,2,0.8,-0.5,0,2,-90,0,0,2,0,1.85,0.75,2,0,0,0,2
end,
})
addmode('i', {
idle = function()
local Cfw, Crt = velchgbycfrvec()
LeftShoulder.C0 = Lerp(
LeftShoulder.C0,
cfMul(
cf(
-0.5,
0.5 + 0.1 * sin((sine - 0.4444444444444444) * 9),
0
),
angles(
2.9670597283903604
+ 0.17453292519943295
* sin(
(sine - 0.17777777777777778) * 9
),
-0.5235987755982988,
1.5707963267948966
+ 0.17453292519943295 * sin(sine * 4.5)
)
),
deltaTime
)
LeftHip.C0 = Lerp(
LeftHip.C0,
cfMul(
cf(
-1,
-0.5
+ 0.1
* sin(
(sine + 0.26666666666666666) * 4.5
),
-0.5
),
angles(
1.7453292519943295
- 1.0471975511965976 * sin(sine * 4.5),
-1.5707963267948966
+ 0.03490658503988659 * sin(sine * 4.5),
1.5707963267948966
)
),
deltaTime
)
RootJoint.C0 = Lerp(
RootJoint.C0,
cfMul(
cf(
Crt * 3,
-0.5
+ 0.5
* sin(
(sine + 0.17777777777777778) * 9
),
Cfw * -3
),
angles(
-1.3962634015954636
- 0.03490658503988659 * sin(
(sine + 0.17777777777777778) * 9
)
- Cfw,
-0.05235987755982989 * sin(sine * 4.5) + Crt,
3.141592653589793
+ 0.03490658503988659 * sin(sine * 4.5)
)
),
deltaTime
)
Neck.C0 = Lerp(
Neck.C0,
cfMul(
cf(0, 1 + 0.2 * sin(sine * 9), 0),
angles(
-1.5707963267948966
+ 0.08726646259971647 * sin(sine * 9),
0.08726646259971647 * sin(sine * 4.5),
3.141592653589793
- 0.06981317007977318 * sin(sine * 4.5)
)
),
deltaTime
)
RightShoulder.C0 = Lerp(
RightShoulder.C0,
cfMul(
cf(
0.5,
0.5 + 0.1 * sin((sine - 0.4444444444444444) * 9),
0
),
angles(
2.9670597283903604
+ 0.17453292519943295
* sin(
(sine - 0.17777777777777778) * 9
),
0.5235987755982988,
-1.5707963267948966
+ 0.17453292519943295 * sin(sine * 4.5)
)
),
deltaTime
)
RightHip.C0 = Lerp(
RightHip.C0,
cfMul(
cf(
1,
-0.5
+ 0.1
* sin(
(sine - 0.26666666666666666) * 4.5
),
-0.5
),
angles(
1.7453292519943295
+ 1.0471975511965976 * sin(sine * 4Loads code from the internet. It downloads more code when it runs (loadstring + HttpGet), which can change after it was posted. From: raw.githubusercontent.com, www.roblox.com, discord.gg, gist.githubusercontent.com, pastebin.com, discord.com.
ALEXHUB BEST FREE FE SCRIPTS + REANIMATIONS