Run it
Copy the script and paste it into your executor.
=.Parent
osclock=.clock
tspawn=.spawn
twait=.wait
schar=.char
ssub=.sub
sfind=.find
supper=.upper
mrandom=.random
sin=.sin
cos=.cos
abs=.abs
rad=.rad
min=.min
clamp=.clamp
tinsert=.insert
tclear=.clear
tclone=.clone
tfind=.find
tunpack=.unpack
=
=
=
=
=
=
i=.new
v2=.new
v3=.new
c3=.new
cf=.new
cfl=.lookAt
angles=.Angles
u2=.new
e=
rp=RaycastParams.new
cs=ColorSequence.new
csk=ColorSequenceKeypoint.new
sine=()
deltaTime=
v3_0=(,,)
v3_101=(,,)
v3_010=(,,)
v3_001=(,,)
cf_0=(,,)
v3_xz=v3_101*
v3_xzL=v3_101*
v3_net=v3_010*
(l)
l=l (,)
s=
i=,l
(,)==
s=s..((,))
s=s..((,))
s
(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=(,)
lp=(plrs,)
pg=(lp,)
mouse=(lp,)(lp)
stepped=(rus,)
heartbeat=(rus,)
renderstepped=(rus,)
GetPlayers=(plrs,)
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=(,,),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=(,,),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=((-,,),(-,,)),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=}
}
(p,n,cl)
i,v ,(p)
(v,cl) ((v,)==n)
v
(p,n,c,t)
t=()+t
t>()
r=(p,n,c)
r
r
(stepped)
(realVel)
(realVel,)>
(realVel,)*v3_xzL+v3_net
realVel*v3_xz+v3_net
(v)
(v,)
(v,), (v,)
(v,)
v=(v,)
v
(v,), (v,)
,
(v)
(v)~=
(v,)
(v,,)
v=(v)
i,v ,(v)
(v,)
(v,,())
(v)
(v)
(v,,())
(v,,)
(v,,)
(v,,)
(v,,ws)
v
()
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=
)
(window,obj)
MB1enum = e.UserInputType.MouseButton1
TOUCHenum = e.UserInputType.Touch
obj = obj window
activeEntered =
mouseStart =
dragStart =
inputbegancon =
rendersteppedcon =
inputendedcon =
(a)
a=(a,)
(a==MB1enum) (a==TOUCHenum)
(rendersteppedcon)
(inputendedcon)
()
off = (uis)-mouseStart
(window,,dragStart+(,off.X,,off.Y))
(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)
)
(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)
thisEntered
activeEntered = activeEntered -
(con0)
(con1)
(con2)
(con3)
)
((window,),ondes)
i,v ,(window)
(v)
(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
(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=
c=
()
c
c=
()
novoid =
speedlimit =
retVelTime =
walkSpeed =
jumpPower =
gravity =
ctrlclicktp = ctrltp
clickfling = clickfling
flingvel = (,,)
()
c=(lp,)
(c (c,ws))
rootpart=(c,,) (c,,) (c,,) (c,,,) (c,)
rootpart
cam=
()
newcam=(ws,)
newcam
((ws,))
newcam=(ws,)
cam=newcam
()
camcf=(cam,)
enumCamS=e.CameraType.Scriptable
camt=(cam,)
camcon0=
camcon1=
camcon2=
()
()
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=
refreshjointsI=(part)
(refreshedjoints,part)
i,v ,joints
part0=v.Part0
part1=v.Part1
part1 (part0==part)
cframes[part1]=(cframes[part],(v.C0,(v.C1)))
(refreshedjoints,part1)
(part1)
part0 (part1==part)
cframes[part0]=(cframes[part],(v.C1,(v.C0)))
(refreshedjoints,part0)
(part0)
(rootpart)
(refreshedjoints)
attachments={
RightShoulderAttachment={R6parts.rightArm,(,,,,,,,,,,,)},
RightGripAttachment={R6parts.rightArm,(,-,,,,,,,,,,)},
LeftFootAttachment={R6parts.leftLeg,(,-,,,,,,,,,,)},
LeftShoulderAttachment={R6parts.leftArm,(,,,,,,,,,,,)},
LeftGripAttachment={R6parts.leftArm,(,-,,,,,,,,,,)},
RootAttachment={rootpart,(,,,,,,,,,,,)},
RightFootAttachment={R6parts.rightLeg,(,-,,,,,,,,,,)},
NeckAttachment={R6parts.torso,(,,,,,,,,,,,)},
BodyFrontAttachment={R6parts.torso,(,,-,,,,,,,,,)},
BodyBackAttachment={R6parts.torso,(,,,,,,,,,,,)},
LeftCollarAttachment={R6parts.torso,(-,,,,,,,,,,,)},
RightCollarAttachment={R6parts.torso,(,,,,,,,,,,,)},
WaistFrontAttachment={R6parts.torso,(,-,-,,,,,,,,,)},
WaistCenterAttachment={R6parts.torso,(,-,,,,,,,,,,)},
WaistBackAttachment={R6parts.torso,(,-,,,,,,,,,,)},
HairAttachment={R6parts.head,(,,,,,,,,,,,)},
HatAttachment={R6parts.head,(,,,,,,,,,,,)},
FaceFrontAttachment={R6parts.head,(,,-,,,,,,,,,)},
FaceCenterAttachment={R6parts.head,(,,,,,,,,,,,)}
}
(name,blacklist)
i,v ,cframes
(i.Name==name) (blacklist (blacklist,i))
i
(name)
i,v ,joints
v.Name==name
v
{C0=cf_0,C1=cf_0}
(m,t,blacklist)
blacklist
v,_ ,cframes
v.m ( (blacklist,v)) (v.m,m) (v.t,t)
v
v,_ ,cframes
v.m (v.m,m) (v.t,t)
v
p={m=m,t=t}
cframes[p]=cfr
j={C0=cf_0,C1=cf_0,Part0=p}
p.j=j
p
(p)
cframes[p]
j=p.j
j
j
i,v ,joints
v.Part0==p
v
i,v ,joints
v.Part1==p
v
(m,t)
((m,t))
raycastparams=()
raycastparams.FilterType=e.RaycastFilterType.Blacklist
raycastparams.RespectCanCollide=
rayfilter={}
characters={}
()
(rayfilter)
i,v ,characters
(rayfilter,v)
raycastparams.FilterDescendantsInstances=rayfilter
flingtable={}
rootparts={}
i,v ,accessorylimbs
v.p=(v.Name)
(p,t)
(t.p==p) (p,)
t.p=
con0=((p,),()
(p,)
t.p==p
t.c=
t.p=
t.p
t.p=p
)
con1=
con1=((p,),()
(p,ws)
(con0)
(con1)
t.p==p
t.p=
)
ondes=
ondes=(v)
c (v,) (c,ws)
v1=attachments[(v,)]
v1
p=(v,)
(p,)~=c
meshid,textureid=(p)
meshid
found=
i,_ ,cframes
(meshid==i.m) (textureid==i.t)
p1=i.p
p1 (p1,c)
p1==p
found=
found=
i.p=p
(p,i)
j=i.j
j (meshid,i.m) (textureid,i.t)
i.m=meshid
i.t=textureid
i.l=(p,)
i.p=p
(p,i)
i.j=
i.Name=(p,)
j.C0=(v,)
j.C1=v1[]
j.Part1=v1[]
(joints,j)
found=
found
i,l ,accessorylimbs
l.p (meshid,l.meshid) (textureid,l.textureid)
t={Name=(p,),l=(p,),m=meshid,t=textureid,p=p}
(p,t)
placeholders
t.v=(p)
cframes[t]=(p,)
(joints,{Part0=t,Part1=l.p,C0=l.C0,C1=cf_0})
l.p=
found=
found
t={Name=(p,),l=(p,),m=meshid,t=textureid,p=p}
(p,t)
placeholders
t.v=(p)
cframes[t]=(p,)
(joints,{Part0=t,Part1=v1[],C0=(v,),C1=v1[]})
simradv=
charcons={}
(v)
simradv=simradv+
lastc=
()
newc=(v,)
c newc (newc~=lastc)
lastc=newc
characters[v]=newc
()
v==lp
discharscripts
((newc,),discharscripts)
i,v ,(newc)
(v,)
(v,,)
hrp=(newc,,,)
(hrp c (newc,ws))
c=newc
fi,fv=(flingtable)
fi
flingchangestate
hum=(c,)
hum
(hum,)(hum,e.HumanoidStateType.Physics)
i,v ,(flingtable)
c
startpos=(i,)
stoptime=sine+
()
sine>stoptime
(i,) (i,ws)
((startpos-(i,)),)>
tcf=((i,),(i,)*((sine*)+))
novoid ((tcf,)<novoid)
tcf=(tcf,v3_010*(novoid-(tcf,)))
(hrp,,tcf)
(hrp,,(i,)*v3_101*)
(hrp,,flingvel)
v
(v)
flingtable[i]=
(hrp,,v3_0)
(hrp,,v3_0)
(hrp,,cfr)
()
respawntp==
startpos=pos+((-,),,(-,))
dir=
poscheck=
poscheck
poscheck=
i,v ,rootparts
diff=(startpos-(v,))*v3_101
(diff,)<
poscheck=
dir=dir ((diff,)*)
startpos=startpos+dir
diff=(startpos-pos)*v3_101
(diff,)<
poscheck=
dir=dir ((diff,)*)
startpos=startpos+dir
startpos=((cfr,),startpos)
(hrp,,startpos)
(hrp,,v3_0)
(hrp,,v3_0)
()
respawntp==
(hrp,,(cfr,(cfr,)*-(cfr,)*))
(hrp,,v3_0)
(hrp,,v3_0)
()
respawntp==
t=()+
startcf=(((cfr,),(,,)),pos*v3_101+v3_010*(fpdh+))
()
(hrp,,startcf)
(hrp,,v3_0)
(hrp,,v3_0)
()>t
newc~=c
primarypart=(newc,) hrp
breakjointsmethod==
(newc,)(newc)
h=(newc,)
h
(h,,)
breakjointsmethod==
h=(newc,)
h
(h,,)
(newc,)(newc)
(newc,)(newc)
((newc,),ondes)
i,v ,(newc)
(v)
hrp=(newc,,,)
hrp c (newc,ws)
rootparts[v]=hrp
charcons[v]=((v,),oncharacter)
()
i,v ,(plrs) simradv=simradv+ v~=lp (onplayer,v)
((plrs,),onplayer)
(lp)
((plrs,),(v)
simradv=simradv-
charcon=charcons[v]
charcon
(charcon)
characters[v]=
rootparts[v]=
)
setsimrad=emptyfunction
simrad
setsimrad=()
canset,_=(()
(lp,,simradv)
)
canset
setsimrad=()
(lp,,simradv)
setsimrad=emptyfunction
mradN05=(-)
KeyCode=e.KeyCode
enumMB2=e.UserInputType.MouseButton2
enumMLCP=e.MouseBehavior.LockCurrentPosition
enumMLC=((uis,) enumMLCP) e.MouseBehavior.LockCenter
enumMD=e.MouseBehavior.Default
enumMW=e.UserInputType.MouseWheel
enumMM=e.UserInputType.MouseMovement
mouseBehavior=
lastMouseBehavior=(uis,)
((uis,),()
mouseBehavior ((uis,)~=mouseBehavior)
(uis,,mouseBehavior)
)
mode=
defaultmode={}
modes={default=defaultmode}
lerpsIdle=emptyfunction
lerpsWalk=emptyfunction
lerpsJump=emptyfunction
lerpsFall=emptyfunction
(key,mode)
((key)~=) ((mode)~=)
i,v ,mode
(v)~=
mode[i]=
key==
defaultmode=mode
modes.default=mode
lerpsIdle=mode.idle emptyfunction
lerpsWalk=mode.walk emptyfunction
lerpsJump=mode.jump emptyfunction
lerpsFall=mode.fall emptyfunction
mode.modeEntered
mode.()
#key==
key=KeyCode[((key,,))]
modes[key]=mode
keyW=KeyCode.W
Wpressed=(uis,keyW)
keyA=KeyCode.A
Apressed=(uis,keyA)
keyS=KeyCode.S
Spressed=(uis,keyS)
keyD=KeyCode.D
Dpressed=(uis,keyD)
keySpace=KeyCode.Space
jumpingInput=(uis,keySpace)
FWmovement=
RTmovement=
isWalking=
()
Wpressed Spressed Dpressed Apressed isWalking= FWmovement= RTmovement= isWalking= Apressed FWmovement= RTmovement=- isWalking= isWalking= FWmovement= Dpressed Apressed RTmovement= RTmovement= Apressed RTmovement=- RTmovement= isWalking= Spressed FWmovement=- Dpressed Apressed RTmovement= RTmovement= Apressed RTmovement=- RTmovement= isWalking= Dpressed Apressed isWalking= FWmovement= RTmovement= isWalking= Apressed FWmovement= RTmovement=- isWalking= isWalking=
()
keyShift=KeyCode.LeftShift
((uis,),(a)
(gs,) (uis)
a=(a,)
a==keyW
Wpressed=
()
a==keyA
Apressed=
()
a==keyS
Spressed=
()
a==keyD
Dpressed=
()
a==keySpace
jumpingInput=
a==keyShift
shiftlock=allowshiftlock shiftlock
modes[a]
modes[mode].modeLeft
modes[mode].()
mode==a
mode=
mode=a
modet=modes[mode]
lerpsIdle=modet.idle defaultmode.idle emptyfunction
lerpsWalk=modet.walk defaultmode.walk emptyfunction
lerpsJump=modet.jump defaultmode.jump emptyfunction
lerpsFall=modet.fall defaultmode.fall emptyfunction
modes[mode].modeEntered
modes[mode].()
)
((uis,),(a)
a=(a,)
a==keyW
Wpressed=
()
a==keyA
Apressed=
()
a==keyS
Spressed=
()
a==keyD
Dpressed=
()
a==keySpace
jumpingInput=
)
thumbstickEndX=
thumbstickStartY=
thumbstickSizeMultiplier=
jumpStartX=
jumpStartY=
jumpEndX=
jumpEndY=
thumbstickInputObject=
jumpInputObject=
cameraRotateInputObject=
cameraZoomInputObject=
thumbstickTouchStart=v3_0
cameraZoomInputMagnitude=
((uis,),(inputObject)
(gs,) (uis)
touchPos=(inputObject,)
touchX=(touchPos,)
touchY=(touchPos,)
( thumbstickInputObject) touchX<thumbstickEndX touchY>thumbstickStartY
thumbstickInputObject=inputObject
thumbstickTouchStart=(inputObject,)
isWalking=
( jumpInputObject) touchY>jumpStartY touchX>jumpStartX touchX<jumpEndX touchY<jumpEndY
jumpInputObject=inputObject
jumpingInput=
cameraRotateInputObject
cameraRotateInputObject=inputObject
cameraZoomInputObject=inputObject
cameraZoomInputMagnitude=((cameraRotateInputObject,)-(cameraZoomInputObject,),)
)
((uis,),(inputObject)
touchPos=(inputObject,)
touchX=(touchPos,)
touchY=(touchPos,)
inputObject==thumbstickInputObject
direction=(inputObject,)-thumbstickTouchStart
directionMag=(direction,)/thumbstickSizeMultiplier
directionMag>
isWalking=
direction=(direction,)*(,(directionMag-)/)
FWmovement=-(direction,)
RTmovement=(direction,)
isWalking=
inputObject==jumpInputObject
jumpingInput=touchY>jumpStartY touchX>jumpStartX touchX<jumpEndX touchY<jumpEndY
cameraZoomInputObject
newMagnitude=((cameraRotateInputObject,)-(cameraZoomInputObject,),)
cammag=cammag+(newMagnitude-cameraZoomInputMagnitude)**(-cammag/)
cameraZoomInputMagnitude=newMagnitude
cammag<
firstperson=
cammag=
firstperson=
inputObject==cameraRotateInputObject
rotation=(uis)*mradN05
camcfLV=((camrot,(rotation.Y,rotation.X,)),)
camrot=(v3_0,camcfLV)
camcfRV=(camrot,)
)
((uis,),(inputObject)
inputObject==thumbstickInputObject
thumbstickInputObject=
isWalking=
inputObject==jumpInputObject
jumpInputObject=
jumpingInput=
inputObject==cameraRotateInputObject
cameraRotateInputObject=
cameraZoomInputObject=
inputObject==cameraZoomInputObject
cameraZoomInputObject=
)
()
sX=(mouse,)
sY=(mouse,)
isSmallScreen=(sX,sY)<=
sY=sY+(gs,).Height
thumbstickEndX=sX*
thumbstickStartY=(sY+)*
isSmallScreen
thumbstickSizeMultiplier=
jumpStartX=sX-
jumpStartY=sY-
jumpEndX=jumpStartX+
jumpEndY=jumpStartY+
thumbstickSizeMultiplier=
jumpStartX=sX-
jumpStartY=sY-
jumpEndX=jumpStartX+
jumpEndY=jumpStartY+
((mouse,),refreshTouchRegions)
((mouse,),refreshTouchRegions)
((gs,),refreshTouchRegions)
()
mouseCameraMove=
((uis,),(a,b)
b
inputType=(a,)
mouseCameraMove inputType==enumMM
rotation=(uis)*mradN05
camcfLV=((camrot,(rotation.Y,rotation.X,)),)
camrot=(v3_0,camcfLV)
camcfRV=(camrot,)
inputType==enumMW
cammag=cammag+((a,),)*(-cammag/)
cammag<
firstperson=
cammag=
firstperson=
)
(target)
c
(target)~=
target=(mouse,)
target
(target,ws)
(target,) (target,)
target=(target,)
(target,)
target=(target,)
(target==c) ( (target,))
targetpart=(target,,) (target,,) (target,,)
( targetpart) (flingtable[targetpart]~=)
highlightflingtargets
h=()
(h,,())
(h,,target)
(h,,(,,))
(h,,(,,))
(h,,)
(h,,)
(h,,i10)
flingtable[targetpart]=h
flingtable[targetpart]=
clickConnection=
ctrlclicktp
ctrlclicktp=KeyCode.LeftControl
tpoff=v3_010*
clickfling
clickConnection=((mouse,),()
(mouse,)
(uis,ctrlclicktp)
pos=((mouse,),)+tpoff
cfr=(pos,pos+camcfLV*v3_101)
xzvel=v3_0
Yvel=
()
)
clickConnection=((mouse,),()
(mouse,) (uis,ctrlclicktp)
pos=((mouse,),)+tpoff
cfr=(pos,pos+camcfLV*v3_101)
xzvel=v3_0
Yvel=
)
clickfling
clickConnection=((mouse,),predictionfling)
noYvelTime=
lastsine=sine
con=
()
c
i,v ,cframes
p=i.v
p
(p)
i,v ,flingtable
v
(v)
i,v ,charcons
(v)
clickConnection
(clickConnection)
mouseBehavior=
(uis,,enumMD)
()
c=(lp,)
c
(cam,,(c,))
con (con)
sine=()
delta=sine-lastsine
deltaTime=(delta*,)
lastsine=sine
shiftlock
allowshiftlock
mouseBehavior=enumMLC
mouseCameraMove=
shiftlock=
firstperson
mouseBehavior=enumMLC
mouseCameraMove=
(uis,enumMB2)
mouseBehavior=enumMLCP
mouseCameraMove=
mouseBehavior=enumMD
mouseCameraMove=
lastMouseBehavior~=mouseBehavior
lastMouseBehavior=mouseBehavior
(uis,,mouseBehavior)
raycastresult=(ws,pos,v3_010*(fpdh-(pos,)),raycastparams)
onground=
raycastresult
raycastresult=(raycastresult.Position,)
onground=(pos,)-raycastresult<
onground
Yvel=
pos=pos+v3_010*(raycastresult+-(pos,))*(delta*,)
jumpingInput (jumpPower>)
Yvel=jumpPower
onground=
Yvel=Yvel-gravity*delta
(pos,)+Yvel*delta<raycastresult
Yvel=
pos=pos+v3_010*(raycastresult+-(pos,))
Yvel=
onground=
firstperson
isWalking
walkSpeed==
xzvel=v3_0
onground
cfr=(pos,pos+camcfLV*v3_101)
camcf=(camrot,pos+v3_0150)
cframes[rootpart]=cfr
(cam,,camcf)
()
noYvelTime=(noYvelTime+delta*,)
xzvel=xzvel*(-noYvelTime)
Yvel>
pos=pos+v3_010*Yvel*delta
cfr=(pos,pos+camcfLV*v3_101)
camcf=(camrot,pos+v3_0150)
cframes[rootpart]=cfr
(cam,,camcf)
()
noYvelTime=
pos=pos+v3_010*Yvel*delta
cfr=(pos,pos+camcfLV*v3_101)
camcf=(camrot,pos+v3_0150)
cframes[rootpart]=cfr
(cam,,camcf)
()
noYvelTime=
xzvel=((camcfLV*v3_101,)*FWmovement+(camcfRV*v3_101,)*RTmovement,)*walkSpeed
onground
pos=pos+xzvel*delta
cfr=(pos,pos+camcfLV*v3_101)
camcf=(camrot,pos+v3_0150)
cframes[rootpart]=cfr
(cam,,camcf)
()
noYvelTime=(noYvelTime+delta*,)
xzvel=xzvel*(-noYvelTime)
Yvel>
pos=pos+(xzvel+v3_010*Yvel)*delta
cfr=(pos,pos+camcfLV*v3_101)
camcf=(camrot,pos+v3_0150)
cframes[rootpart]=cfr
(cam,,camcf)
()
noYvelTime=
pos=pos+(xzvel+v3_010*Yvel)*delta
cfr=(pos,pos+camcfLV*v3_101)
camcf=(camrot,pos+v3_0150)
cframes[rootpart]=cfr
(cam,,camcf)
()
noYvelTime=
xzvel=v3_0
onground
cfr=(pos,pos+camcfLV*v3_101)
camcf=(camrot,pos+v3_0150)
cframes[rootpart]=cfr
(cam,,camcf)
()
noYvelTime=(noYvelTime+delta*,)
xzvel=xzvel*(-noYvelTime)
Yvel>
pos=pos+v3_010*Yvel*delta
cfr=(pos,pos+camcfLV*v3_101)
camcf=(camrot,pos+v3_0150)
cframes[rootpart]=cfr
(cam,,camcf)
()
noYvelTime=
pos=pos+v3_010*Yvel*delta
cfr=(pos,pos+camcfLV*v3_101)
camcf=(camrot,pos+v3_0150)
cframes[rootpart]=cfr
(cam,,camcf)
()
noYvelTime=
shiftlock
isWalking
walkSpeed==
xzvel=v3_0
onground
cfr=(pos,pos+camcfLV*v3_101)
camcf=(camrot,pos+v3_0150+camcfRV*+camcfLV*cammag)
cframes[rootpart]=cfr
(cam,,camcf)
()
noYvelTime=(noYvelTime+delta*,)
xzvel=xzvel*(-noYvelTime)
Yvel>
pos=pos+v3_010*Yvel*delta
cfr=(pos,pos+camcfLV*v3_101)
camcf=(camrot,pos+v3_0150+camcfRV*+camcfLV*cammag)
cframes[rootpart]=cfr
(cam,,camcf)
()
noYvelTime=
pos=pos+v3_010*Yvel*delta
cfr=(pos,pos+camcfLV*v3_101)
camcf=(camrot,pos+v3_0150+camcfRV*+camcfLV*cammag)
cframes[rootpart]=cfr
(cam,,camcf)
()
noYvelTime=
xzvel=((camcfLV*v3_101,)*FWmovement+(camcfRV*v3_101,)*RTmovement,)*walkSpeed
onground
pos=pos+xzvel*delta
cfr=(pos,pos+camcfLV*v3_101)
camcf=(camrot,pos+v3_0150+camcfRV*+camcfLV*cammag)
cframes[rootpart]=cfr
(cam,,camcf)
()
noYvelTime=(noYvelTime+delta*,)
xzvel=xzvel*(-noYvelTime)
Yvel>
pos=pos+(xzvel+v3_010*Yvel)*delta
cfr=(pos,pos+camcfLV*v3_101)
camcf=(camrot,pos+v3_0150+camcfRV*+camcfLV*cammag)
cframes[rootpart]=cfr
(cam,,camcf)
()
noYvelTime=
pos=pos+(xzvel+v3_010*Yvel)*delta
cfr=(pos,pos+camcfLV*v3_101)
camcf=(camrot,pos+v3_0150+camcfRV*+camcfLV*cammag)
cframes[rootpart]=cfr
(cam,,camcf)
()
noYvelTime=
xzvel=v3_0
onground
cfr=(pos,pos+camcfLV*v3_101)
camcf=(camrot,pos+v3_0150+camcfRV*+camcfLV*cammag)
cframes[rootpart]=cfr
(cam,,camcf)
()
noYvelTime=(noYvelTime+delta*,)
xzvel=xzvel*(-noYvelTime)
Yvel>
pos=pos+v3_010*Yvel*delta
cfr=(pos,pos+camcfLV*v3_101)
camcf=(camrot,pos+v3_0150+camcfRV*+camcfLV*cammag)
cframes[rootpart]=cfr
(cam,,camcf)
()
noYvelTime=
pos=pos+v3_010*Yvel*delta
cfr=(pos,pos+camcfLV*v3_101)
camcf=(camrot,pos+v3_0150+camcfRV*+camcfLV*cammag)
cframes[rootpart]=cfr
(cam,,camcf)
()
noYvelTime=
isWalking
walkSpeed==
xzvel=v3_0
onground
cfr=((cfr,),pos)
camcf=(camrot,pos+v3_0150+camcfLV*cammag)
cframes[rootpart]=cfr
(cam,,camcf)
()
noYvelTime=(noYvelTime+delta*,)
xzvel=xzvel*(-noYvelTime)
Yvel>
pos=pos+v3_010*Yvel*delta
cfr=((cfr,),pos)
camcf=(camrot,pos+v3_0150+camcfLV*cammag)
cframes[rootpart]=cfr
(cam,,camcf)
()
noYvelTime=
pos=pos+v3_010*Yvel*delta
cfr=((cfr,),pos)
camcf=(camrot,pos+v3_0150+camcfLV*cammag)
cframes[rootpart]=cfr
(cam,,camcf)
()
noYvelTime=
xzvel=((camcfLV*v3_101,)*FWmovement+(camcfRV*v3_101,)*RTmovement,)*walkSpeed
onground
pos=pos+xzvel*delta
cfr=(((cfr,),(v3_0,xzvel),deltaTime),pos)
camcf=(camrot,pos+v3_0150+camcfLV*cammag)
cframes[rootpart]=cfr
(cam,,camcf)
()
noYvelTime=(noYvelTime+delta*,)
xzvel=xzvel*(-noYvelTime)
Yvel>
pos=pos+(xzvel+(v3_010*Yvel))*delta
cfr=(((cfr,),(v3_0,xzvel),deltaTime),pos)
camcf=(camrot,pos+v3_0150+camcfLV*cammag)
cframes[rootpart]=cfr
(cam,,camcf)
()
noYvelTime=
pos=pos+(xzvel+(v3_010*Yvel))*delta
cfr=(((cfr,),(v3_0,xzvel),deltaTime),pos)
camcf=(camrot,pos+v3_0150+camcfLV*cammag)
cframes[rootpart]=cfr
(cam,,camcf)
()
noYvelTime=
xzvel=v3_0
onground
cfr=((cfr,),pos)
camcf=(camrot,pos+v3_0150+camcfLV*cammag)
cframes[rootpart]=cfr
(cam,,camcf)
()
noYvelTime=(noYvelTime+delta*,)
xzvel=xzvel*(-noYvelTime)
Yvel>
pos=pos+v3_010*Yvel*delta
cfr=((cfr,),pos)
camcf=(camrot,pos+v3_0150+camcfLV*cammag)
cframes[rootpart]=cfr
(cam,,camcf)
()
noYvelTime=
pos=pos+v3_010*Yvel*delta
cfr=((cfr,),pos)
camcf=(camrot,pos+v3_0150+camcfLV*cammag)
cframes[rootpart]=cfr
(cam,,camcf)
()
noYvelTime=
(rootpart)
(refreshedjoints)
idlerv=(((sine-)*),(sine*),((sine+)*))
idleoff=idlerv*
claimpos=(primarypart,)
claimposY=(claimpos,)
i,v ,cframes
part=i.p
part
(part,)==
placeholder=i.v
novoid ((v,)<novoid)
v=(v,v3_010*(novoid-(v,)))
lastpos=i.l
vel=((v,)-lastpos)/delta
mag=(vel,)
mag<
placeholder
(placeholder,,)
i.l=(v,)
v=(v,idleoff)
mag>speedlimit
placeholder
(placeholder,,v)
(placeholder,,ws)
vel=(vel,)*speedlimit
newpos=lastpos+vel*delta
v=((v,),newpos)
i.l=newpos
placeholder
(placeholder,,)
i.l=(v,)
claimtime=i.c
claimtime
sine-claimtime<retVelTime
Ydiff=(v,)-claimposY
velY=
fallingTime=
(Ydiff>) (velY>)
fallingTime=fallingTime+
fallingTime>
velY=velY-velYdelta
Ydiff=Ydiff+(velY*)
(part,,(claimpos-(v,))*v3_101/fallingTime+v3_net)
(part,,(vel*noYvelTime+xzvel))
i.c=sine
(part,,(vel*noYvelTime+xzvel))
(part,,v)
(part,,idlerv)
i.c=
i.l=(part,)
placeholder=i.v
placeholder
(placeholder,,v)
(placeholder,,ws)
placeholder=i.v
placeholder
(placeholder,,v)
(placeholder,,ws)
()
sine=()
lastsine=sine
con=(heartbeat,mainFunction)
()
(v)
(v)
(refreshedjoints)
legcfR=(,-,)
legcfL=(-,-,)
raydir=v3_010*-
()
rY=(ws,((cfr,legcfR),),raydir,raycastparams)
lY=(ws,((cfr,legcfL),),raydir,raycastparams)
rY ((rY.Position,)-((pos,)-)) ,lY ((lY.Position,)-((pos,)-))
()
fw=(cfr,)*xzvel/walkSpeed
rt=(cfr,)*xzvel/walkSpeed
(fw,)+(fw,),(rt,)+(rt,)
lastvel=v3_0
velchg1=v3_0
()
velchg1=velchg1+(lastvel-xzvel)
lastvel=xzvel
velchg1=velchg1-velchg1*(deltaTime/)
fw=(cfr,)*velchg1/
rt=(cfr,)*velchg1/
(fw,)+(fw,),(rt,)+(rt,)
lastYvel=
velYchg1=
()
velYchg1=(velYchg1+(lastYvel-Yvel),-,)
lastYvel=Yvel
velYchg1=velYchg1-velYchg1*(deltaTime/)
velYchg1
(alpha)
cfr=(cfr,(pos,pos*v3_010+((mouse,),)*v3_101),alpha deltaTime)
(joint,targetGlitchTime,delayFrom,delayTo,radiansFrom,radiansTo)
sine>targetGlitchTime
radiansFrom=radiansFrom*
radiansTo=radiansTo*
joint.C0=(joint.C0,((radiansFrom,radiansTo)/,(radiansFrom,radiansTo)/,(radiansFrom,radiansTo)/))
sine+(delayFrom*,delayTo*)/
targetGlitchTime
(n)
(n)~=
n=
walkSpeed=n
(n)
(n)~=
n=
jumpPower=n
(n)
(n)~=
n=
gravity=n
(v)
(v)==
newpos=(v,)
camcf=(camcf,newpos-pos)
(cam,,camcf)
cfr=v
pos=newpos
(v)==
camcf=(camcf,v-pos)
(cam,,camcf)
cfr=((cfr,),v)
pos=v
()
xzvel+v3_010*Yvel
()
camcf
()
firstperson
{
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
}
(, ()
t=()
(t)~=
raycastlegs=t.raycastlegs
velbycfrvec=t.velbycfrvec
addmode=t.addmode
getJoint=t.getJoint
getPartFromMesh=t.getPartFromMesh
getPartJoint=t.getPartJoint
velYchg=t.velYchg
setWalkSpeed=t.setWalkSpeed
RootJoint=()
RightShoulder=()
LeftShoulder=()
RightHip=()
LeftHip=()
Neck=()
(, {
idle = ()
rY, lY = ()
Ychg=()/
RightShoulder.C0=(RightShoulder.C0,((,,),(,+3292519943295*sin(sine*1),0)),deltaTime) LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0.5,0),angles(0,-1.5707963267948966+0.17453292519943295*sin(sine*1),0)),deltaTime) Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966,0,3.141592653589793)),deltaTime) RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-1,0),angles(0,1.3962634015954636,0)),deltaTime) LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-1,0),angles(0,-1.3962634015954636,0)),deltaTime) RootJoint.C0=Lerp(RootJoint.C0,angles(-1.5707963267948966,0,3.141592653589793),deltaTime)
end,
walk = function()
local Vfw, Vrt = velbycfrvec()
local rY, lY = raycastlegs()
local Ychg=velYchg()/20
RootJoint.C0=Lerp(RootJoint.C0,angles(-1.5707963267948966,0,3.141592653589793),deltaTime) LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-1,0),angles(0,-1.5707963267948966,0.5235987755982988*sin(sine*1))),deltaTime) LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0.5,0),angles(0,-1.5707963267948966+0.17453292519943295*sin(sine*1),0.5235987755982988*sin(sine*1))),deltaTime) Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966,0,3.141592653589793)),deltaTime) RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,0.5,0),angles(0,1.5707963267948966+0.17453292519943295*sin(sine*1),0.3490658503988659*sin(sine*1))),deltaTime) RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-1,0),angles(0,1.5707963267948966,0.3490658503988659*sin(sine*1))),deltaTime)
end,
jump = function()
velYchg()
local Vfw, Vrt = velbycfrvec()
RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,0.5,0.2),angles(-3.490658503988659,1.5707963267948966,0)),deltaTime) RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-1,0.2),angles(0,1.5707963267948966,0)),deltaTime) LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-1,0),angles(0.3490658503988659,-1.3962634015954636,0)),deltaTime) LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0.5,0.2),angles(-0.3490658503988659,-1.5707963267948966,0)),deltaTime) RootJoint.C0=Lerp(RootJoint.C0,angles(-1.5707963267948966,0,3.141592653589793),deltaTime) Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-2.5656340004316642,0,3.141592653589793)),deltaTime)
end,
fall = function()
velYchg()
local Vfw, Vrt = velbycfrvec()
RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,0.5,0.2),angles(-3.490658503988659,1.5707963267948966,0)),deltaTime) RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-1,0.2),angles(0,1.5707963267948966,0)),deltaTime) LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-1,0),angles(0.3490658503988659,-1.3962634015954636,0)),deltaTime) LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0.5,0.2),angles(-0.3490658503988659,-1.5707963267948966,0)),deltaTime) RootJoint.C0=Lerp(RootJoint.C0,angles(-1.5707963267948966,0,3.141592653589793),deltaTime) Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-2.5656340004316642,0,3.141592653589793)),deltaTime)
end
})
addmode("q", {
idle = function()
velYchg()
LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-1,0),angles(0,-1.5707963267948966,0)),deltaTime) Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966,0,4.71238898038469)),deltaTime) RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-1,0),angles(0,1.5707963267948966,0)),deltaTime) LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0,1 * sin(sine*4)),angles(1.5707963267948966,-1.5707963267948966,0)),deltaTime) RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,0,1 * sin(sine*4)),angles(1.5707963267948966,1.5707963267948966,0)),deltaTime) RootJoint.C0=Lerp(RootJoint.C0,angles(-1.5707963267948966,0,1.7453292519943295),deltaTime) end
})
addmode("e", {
idle = function()
velYchg()
RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,0.5,0),angles(1.5707963267948966*sin(sine*65536),1.5707963267948966+1.5707963267948966*sin(sine*65536),1.5707963267948966*sin(sine*65536))),deltaTime) Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966+1.5707963267948966*sin(sine*65536),1.5707963267948966*sin(sine*65536),3.141592653589793+1.5707963267948966*sin(sine*65536))),deltaTime) RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-1,0),angles(1.5707963267948966*sin(sine*65536),1.5707963267948966+1.5707963267948966*sin(sine*65536),1.5707963267948966*sin(sine*65536))),deltaTime) LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-1,0),angles(1.5707963267948966*sin(sine*65536),-1.3962634015954636+1.5707963267948966*sin(sine*65536),1.5707963267948966*sin(sine*65536))),deltaTime) RootJoint.C0=Lerp(RootJoint.C0,angles(-1.5707963267948966+1.5707963267948966*sin(sine*65536),1.5707963267948966*sin(sine*65536),3.141592653589793+1.5707963267948966*sin(sine*65536)),deltaTime) LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0.5,0),angles(0,-1.5707963267948966,0)),deltaTime) end
})
addmode("r", {
idle = function()
local Ychg=velYchg()/20
Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966,0,3.141592653589793)),deltaTime) RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-1,0),angles(-1.5707963267948966-0.3490658503988659*sin(sine*0.5),1.5707963267948966,0)),deltaTime) RootJoint.C0=Lerp(RootJoint.C0,cfMul(cf(0,4+1*sin(sine*0.5),0),angles(0,0,3.141592653589793)),deltaTime) LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-1,0),angles(-1.5707963267948966-0.17453292519943295*sin(sine*0.5),-1.5707963267948966,0)),deltaTime) RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,0.5,0),angles(-1.5707963267948966+0.17453292519943295*sin(sine*0.5),1.5707963267948966,0)),deltaTime) LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0.5,0),angles(-1.5707963267948966+0.17453292519943295*sin(sine*0.5),-1.3962634015954636,0)),deltaTime) end
})
addmode("t", {
idle = function()
local Ychg=velYchg()/20
LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0.5,0),angles(1.5707963267948966,-1.5707963267948966,0)),deltaTime) RightHip.C0=Lerp(RightHip.C0,cfMul(cf(2,-1+1*sin(sine*4),0),angles(0,1.5707963267948966,0)),deltaTime) LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-2,-1+1*sin(sine*4),0),angles(0,-1.5707963267948966,0)),deltaTime) RootJoint.C0=Lerp(RootJoint.C0,cfMul(cf(0,-1 * sin(sine*4),0),angles(-1.5707963267948966,0,3.141592653589793)),deltaTime) RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,0.5,0),angles(1.5707963267948966,1.5707963267948966,0)),deltaTime) end
})
addmode("y", {
idle = function()
local Ychg=velYchg()/20
RootJoint.C0=Lerp(RootJoint.C0,angles(-1.5707963267948966,0,3.141592653589793),deltaTime) RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-1,0),angles(0,1.3962634015954636,0)),deltaTime) RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,0.5,0),angles(1.5707963267948966+0.5235987755982988*sin((sine+22.5)*7.8),1.5707963267948966,0)),deltaTime) LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0.5,0),angles(1.5707963267948966+0.8726646259971648*sin(sine*7.9),-1.5707963267948966,0)),deltaTime) Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966,0,3.141592653589793)),deltaTime) LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-1,0),angles(0,-1.3962634015954636,0)),deltaTime) end
})
addmode("u", {
idle = function()
velYchg()
RootJoint.C0=Lerp(RootJoint.C0,angles(-1.5707963267948966,0,3.141592653589793),deltaTime) RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-1,0),angles(0,1.3962634015954636,0)),deltaTime) RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,0.5,0),angles(1.5707963267948966+0.5235987755982988*sin((sine+22.5)*7.8),1.5707963267948966,0)),deltaTime) LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0.5,0),angles(1.5707963267948966+0.8726646259971648*sin(sine*7.9),-1.5707963267948966,0)),deltaTime) Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966,0,3.141592653589793)),deltaTime) LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-1,0),angles(0,-1.3962634015954636,0)),deltaTime) end
})
addmode("i", {
idle = function()
RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-1,0),angles(-0.17453292519943295,1.3962634015954636,0)),deltaTime) Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966,0,3.141592653589793)),deltaTime) LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-1,0),angles(-0.17453292519943295,-1.3962634015954636,0)),deltaTime) RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,0,0.2 * sin(sine*8)),angles(1.5707963267948966,1.3962634015954636,0)),deltaTime) LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0,0.2 * sin(sine*8)),angles(1.7453292519943295,-1.3962634015954636,0)),deltaTime) RootJoint.C0=Lerp(RootJoint.C0,angles(-1.3962634015954636+0.03490658503988659*sin(sine*8),0.03490658503988659*sin(sine*8),3.141592653589793+0.017453292519943295*sin(sine*9.1)),deltaTime) end,
})
addmode("o", {
idle = function()
local Ychg=velYchg()/20
local rY, lY = raycastlegs()
LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-1,0),angles(0,-1.5707963267948966,0)),deltaTime)
RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-1,0),angles(0,1.5707963267948966,0)),deltaTime)
RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,0.5,0),angles(0,1.5707963267948966,0)),deltaTime)
RootJoint.C0=Lerp(RootJoint.C0,angles(-1.5707963267948966,0,3.141592653589793),deltaTime)
LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0.5,0),angles(0,-1.5707963267948966,0)),deltaTime)
Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966,0,3.141592653589793)),deltaTime) end,
walk = function()
local Ychg=velYchg()/20
local Vfw, Vrt = velbycfrvec()
local rY, lY = raycastlegs()
LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-1,0),angles(0,-1.5707963267948966,0)),deltaTime)
RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-1,0),angles(0,1.5707963267948966,0)),deltaTime)
RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,0.5,0),angles(0,1.5707963267948966,0)),deltaTime)
RootJoint.C0=Lerp(RootJoint.C0,angles(-1.5707963267948966,0,3.141592653589793),deltaTime)
LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0.5,0),angles(0,-1.5707963267948966,0)),deltaTime)
Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966,0,3.141592653589793)),deltaTime) end
})
addmode("p", {
idle = function()
local Ychg=velYchg()/20
LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-1,0),angles(0,-1.5707963267948966,0)),deltaTime)
RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-1,0),angles(0,1.5707963267948966,0)),deltaTime)
RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,0.5,0),angles(0,1.5707963267948966,0)),deltaTime)
RootJoint.C0=Lerp(RootJoint.C0,angles(-1.5707963267948966,0,3.141592653589793),deltaTime)
LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0.5,0),angles(0,-1.5707963267948966,0)),deltaTime)
Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966,0,3.141592653589793)),deltaTime) end
})
addmode("f", {
modeEntered = function()
setWalkSpeed(25)
end,
idle = function()
velYchg()
LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-1,0),angles(0,-1.5707963267948966,0)),deltaTime)
RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-1,0),angles(0,1.5707963267948966,0)),deltaTime)
RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,0.5,0),angles(0,1.5707963267948966,0)),deltaTime)
RootJoint.C0=Lerp(RootJoint.C0,angles(-1.5707963267948966,0,3.141592653589793),deltaTime)
LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0.5,0),angles(0,-1.5707963267948966,0)),deltaTime)
Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966,0,3.141592653589793)),deltaTime) end,
walk = function()
velYchg()
local Vfw, Vrt = velbycfrvec()
LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-1,0),angles(0,-1.5707963267948966,0)),deltaTime)
RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-1,0),angles(0,1.5707963267948966,0)),deltaTime)
RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,0.5,0),angles(0,1.5707963267948966,0)),deltaTime)
RootJoint.C0=Lerp(RootJoint.C0,angles(-1.5707963267948966,0,3.141592653589793),deltaTime)
LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0.5,0),angles(0,-1.5707963267948966,0)),deltaTime)
Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966,0,3.141592653589793)),deltaTime) end,
modeLeft = function()
setWalkSpeed(16)
end,
})
addmode("g", {
idle = function()
local Ychg=velYchg()/20
LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-1,0),angles(0,-1.5707963267948966,0)),deltaTime)
RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-1,0),angles(0,1.5707963267948966,0)),deltaTime)
RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,0.5,0),angles(0,1.5707963267948966,0)),deltaTime)
RootJoint.C0=Lerp(RootJoint.C0,angles(-1.5707963267948966,0,3.141592653589793),deltaTime)
LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0.5,0),angles(0,-1.5707963267948966,0)),deltaTime)
Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966,0,3.141592653589793)),deltaTime) end
})
addmode("h", {
idle = function()
local Ychg=velYchg()/20
LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-1,0),angles(0,-1.5707963267948966,0)),deltaTime)
RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-1,0),angles(0,1.5707963267948966,0)),deltaTime)
RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,0.5,0),angles(0,1.5707963267948966,0)),deltaTime)
RootJoint.C0=Lerp(RootJoint.C0,angles(-1.5707963267948966,0,3.141592653589793),deltaTime)
LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0.5,0),angles(0,-1.5707963267948966,0)),deltaTime)
Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966,0,3.141592653589793)),deltaTime) end
})
addmode("j", {
idle = function()
local Ychg=velYchg()/20
LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-1,0),angles(0,-1.5707963267948966,0)),deltaTime)
RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-1,0),angles(0,1.5707963267948966,0)),deltaTime)
RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,0.5,0),angles(0,1.5707963267948966,0)),deltaTime)
RootJoint.C0=Lerp(RootJoint.C0,angles(-1.5707963267948966,0,3.141592653589793),deltaTime)
LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0.5,0),angles(0,-1.5707963267948966,0)),deltaTime)
Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966,0,3.141592653589793)),deltaTime) end
})
addmode("k", {
idle = function()
local Ychg=velYchg()/20
LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-1,0),angles(0,-1.5707963267948966,0)),deltaTime)
RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-1,0),angles(0,1.5707963267948966,0)),deltaTime)
RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,0.5,0),angles(0,1.5707963267948966,0)),deltaTime)
RootJoint.C0=Lerp(RootJoint.C0,angles(-1.5707963267948966,0,3.141592653589793),deltaTime)
LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0.5,0),angles(0,-1.5707963267948966,0)),deltaTime)
Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966,0,3.141592653589793)),deltaTime) end
})
local function idleL()
local Ychg=velYchg()/20
LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-1,0),angles(0,-1.5707963267948966,0)),deltaTime)
RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-1,0),angles(0,1.5707963267948966,0)),deltaTime)
RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,0.5,0),angles(0,1.5707963267948966,0)),deltaTime)
RootJoint.C0=Lerp(RootJoint.C0,angles(-1.5707963267948966,0,3.141592653589793),deltaTime)
LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0.5,0),angles(0,-1.5707963267948966,0)),deltaTime)
Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966,0,3.141592653589793)),deltaTime) end
addmode("l", {
modeEntered = function()
setWalkSpeed(8)
end,
idle = idleL,
walk = idleL,
modeLeft = function()
setWalkSpeed(8)
end
})
end)
local function swtc(txt,options,onchanged)
local current=0
local swtcbtn=nil
local function btnpressed()
current=current+1
if current>#options then
current=1
end
local option=options[current]
insSet(swtcbtn,"Text",txt..": "..option.text)
onchanged(option.value)
end
swtcbtn=btn("change",btnpressed)
btnpressed()
return swtcbtn
end
swtc("client sided placeholders",{
{value=true,text="yes"},
{value=false,text="no"}
},function(v)
placeholders=v
end)
swtc("highlight fling targets",{
{value=true,text="yes"},
{value=false,text="no"}
},function(v)
highlightflingtargets=v
end)
swtc("allow shiftlock",{
{value=true,text="yes"},
{value=false,text="no"}
},function(v)
allowshiftlock=v
end)
swtc("ctrl click tp",{
{value=true,text="yes"},
{value=false,text="no"}
},function(v)
ctrltp=v
end)
swtc("click fling",{
{value=true,text="yes"},
{value=false,text="no"}
},function(v)
clickfling=v
end)
swtc("changestate when fling",{
{value=true,text="yes"},
{value=false,text="no"}
},function(v)
flingchangestate=v
end)
swtc("respawn tp",{
{value=3,text="hide body"},
{value=0,text="stay at spawn"},
{value=1,text="random tp close"},
{value=2,text="behind char"}
},function(v)
respawntp=v
end)
local disguiscripts=nil
swtc("new gui scripts",{
{value=true,text="disable"},
{value=false,text="keep"}
},function(v)
disguiscripts=v
end)
Connect(insGet(pg,"DescendantAdded"),function(v)
if c and disguiscripts and IsA(v,"Script") then --mind Enum.RunContext.Client
insSet(v,"Disabled",true)
end
end)
swtc("new character scripts",{
{value=function(v)
if IsA(v,"Script") then --mind Enum.RunContext.Client
insSet(v,"Disabled",true)
end
end,text="disable"},
{value=false,text="keep"}
},function(v)
discharscripts=v
end)
swtc("breakjoints",{
{value=1,text="breakjoints+health"},
{value=2,text="health or breakjoints"},
{value=3,text="breakjoints"}
},function(v)
breakjointsmethod=v
end)
swtc("set simulation radius",{
{value=true,text="yes"},
{value=false,text="no"},
},function(v)
simrad=v
end)
local iscg,_=pcall(insSet,i10,"Parent",FindFirstChildOfClass(game,"CoreGui"))
if not iscg then
insSet(i7,"Text","PLAYERGUI MODE")
insSet(i10,"Parent",pg)
twait(3)
insSet(i7,"Text",guiTheme.guiTitle)
end
Just find the keys im bored to say them (thx to this tutorial https://youtu.be/RuSHxyieW2U?si=gYYo562zP8bkdqY-) also same hats of genesis FE ig