Advertisement
Dark_Agent

FE SCP-096 Script Free by Ocfi

Jul 19th, 2024 (edited)
2,218
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 77.58 KB | Gaming | 0 0
  1. -- SCP-096 Script
  2. -- Original: https://scriptblox.com/script/Universal-Script-SCP-096-REANIMATE-Read-Desc-Suggested-By-user47527alt-15159
  3. -- Credit: ocfi (ScriptBlox)
  4. -- local Module = game:HttpGet("https://pastebin.com/raw/5G223UH5")loadstring(Module)()
  5. game=workspace.Parent
  6. local osclock=os.clock
  7. local tspawn=task.spawn
  8. local twait=task.wait
  9. local schar=string.char
  10. local ssub=string.sub
  11. local sfind=string.find
  12. local supper=string.upper
  13. local mrandom=math.random
  14. local sin=math.sin
  15. local cos=math.cos
  16. local abs=math.abs
  17. local rad=math.rad
  18. local min=math.min
  19. local clamp=math.clamp
  20. local tinsert=table.insert
  21. local tclear=table.clear
  22. local tclone=table.clone
  23. local tfind=table.find
  24. local tunpack=table.unpack
  25.  
  26. --the script doesnt have to read global varaibles every time to get them
  27. --why not have them saved in local varaibles for faster access times
  28. local next=next
  29. local pcall=pcall
  30. local xpcall=xpcall
  31. local type=type
  32. local typeof=typeof
  33. local game=game
  34.  
  35. local i=Instance.new
  36. local v2=Vector2.new
  37. local v3=Vector3.new
  38. local c3=Color3.new
  39. local cf=CFrame.new
  40. local cfl=CFrame.lookAt
  41. local angles=CFrame.Angles
  42. local u2=UDim2.new
  43. local e=Enum
  44. local rp=RaycastParams.new
  45. local cs=ColorSequence.new
  46. local csk=ColorSequenceKeypoint.new
  47.  
  48. local sine=osclock()
  49. local deltaTime=0
  50. local v3_0=v3(0,0,0)
  51. local v3_101=v3(1,0,1)
  52. local v3_010=v3(0,1,0)
  53. local v3_001=v3(0,0,1)
  54. local cf_0=cf(0,0,0)
  55. local v3_xz=v3_101*10
  56. local v3_xzL=v3_101*250.1
  57. local v3_net=v3_010*25.01
  58.  
  59. local function rs(l)
  60.     l=l or mrandom(8,15)
  61.     local s=""
  62.     for i=1,l do
  63.         if mrandom(1,2)==1 then
  64.             s=s..schar(mrandom(65,90))
  65.         else
  66.             s=s..schar(mrandom(97,122))
  67.         end
  68.     end
  69.     return s
  70. end
  71.  
  72. --it runs even faster if u call __index and __newindex of metatables of userdata directly
  73. local function getMetamethodFromErrorStack(userdata,f,test)
  74.     local ret=nil
  75.     xpcall(f,function()
  76.         ret=debug.info(2,"f")
  77.     end,userdata,nil,0)
  78.     if (type(ret)~="function") or not test(ret) then
  79.         return f
  80.     end
  81.     return ret
  82. end
  83. local insSet=getMetamethodFromErrorStack(game,function(a,b,c) a[b]=c end,function(f) local a=i("Folder") local b=rs() f(a,"Name",b) return a.Name==b end)
  84. local insGet=getMetamethodFromErrorStack(game,function(a,b) return a[b] end,function(f) local a=i("Folder") local b=rs() a.Name=b return f(a,"Name")==b end)
  85. local cfGet=getMetamethodFromErrorStack(cf_0,function(a,b) return a[b] end,function(f) return f(cf(1,2,3),"Position")==v3(1,2,3) end)
  86. local cfMul=getMetamethodFromErrorStack(cf_0,function(a,b) return a*b end,function(f) return angles(1,2,3)*angles(1,2,3)==f(angles(1,2,3),angles(1,2,3)) end)
  87. local cfAdd=getMetamethodFromErrorStack(cf_0,function(a,b) return a+b end,function(f) return cf(1,2,3)+v3(1,2,3)==f(cf(1,2,3),v3(1,2,3)) end)
  88. local v3Get=getMetamethodFromErrorStack(v3_0,function(a,b) return a[b] end,function(f) return v3(1,2,3).Unit==f(v3(1,2,3),"Unit") end)
  89. --multiplying and adding vector3 is faster if you use the * and + operators
  90.  
  91. --no need to index instances every time to call their functions
  92. local Clone=insGet(game,"Clone")
  93. local ClearAllChildren=insGet(game,"ClearAllChildren")
  94. local Destroy=insGet(game,"Destroy")
  95. local IsA=insGet(game,"IsA")
  96. local FindFirstChildOfClass=insGet(game,"FindFirstChildOfClass")
  97. local FindFirstChildWhichIsA=insGet(game,"FindFirstChildWhichIsA")
  98. local GetChildren=insGet(game,"GetChildren")
  99. local GetDescendants=insGet(game,"GetDescendants")
  100. local IsDescendantOf=insGet(game,"IsDescendantOf")
  101. local GetPropertyChangedSignal=insGet(game,"GetPropertyChangedSignal")
  102.  
  103. --findfirstchildofclass faster than getservice
  104. local plrs=FindFirstChildOfClass(game,"Players")
  105. local rus=FindFirstChildOfClass(game,"RunService")
  106. local ws=FindFirstChildOfClass(game,"Workspace")
  107. local uis=FindFirstChildOfClass(game,"UserInputService")
  108. local gs=FindFirstChildOfClass(game,"GuiService")
  109. local lp=insGet(plrs,"LocalPlayer")
  110. local pg=FindFirstChildOfClass(lp,"PlayerGui")
  111. local mouse=insGet(lp,"GetMouse")(lp)
  112. local stepped=insGet(rus,"Stepped")
  113. local heartbeat=insGet(rus,"Heartbeat")
  114. local renderstepped=insGet(rus,"RenderStepped")
  115.  
  116. local GetPlayers=insGet(plrs,"GetPlayers")
  117. local Raycast=insGet(ws,"Raycast")
  118. local Connect=heartbeat.Connect
  119. local Disconnect=Connect(GetPropertyChangedSignal(game,"CreatorId"),type).Disconnect
  120. local Wait=heartbeat.Wait
  121. local GetMouseLocation=insGet(uis,"GetMouseLocation")
  122. local GetFocusedTextBox=insGet(uis,"GetFocusedTextBox")
  123. local GetMouseDelta=insGet(uis,"GetMouseDelta")
  124. local IsMouseButtonPressed=insGet(uis,"IsMouseButtonPressed")
  125. local IsKeyDown=insGet(uis,"IsKeyDown")
  126.  
  127. local Inverse=cfGet(cf_0,"Inverse")
  128. local Lerp=cfGet(cf_0,"Lerp")
  129.  
  130. local guiTheme={
  131.     guiTitle="patchma",
  132.     windowTitleColor=c3(1,0,0),
  133.     windowTopColor=c3(0.5,0.5,0.5),
  134.     windowBottomColor=c3(0.5,0,0),
  135.     windowMinimizedSize={X=220,Y=22},
  136.     windowRegularSize={X=220,Y=235},
  137.     buttonsTextColor=c3(1,0,0),
  138.     labelsTextColor=c3(0.560784,0.560784,0.560784),
  139.     listTopColor=c3(0.5,0,0),
  140.     listBottomColor=c3(0.5,0.5,0.5)
  141. }
  142.  
  143. local accessorylimbs={
  144.     {meshid="11263221350",textureid="11263219250",C0=angles(1.5707963267948966,0,1.5707963267948966),Name="Left Arm"},
  145.     {meshid="11159370334",textureid="11159284657",C0=angles(-1.5707963267948966,0,1.5707963267948966),Name="Right Arm"},
  146.  
  147.     {meshid="14255522247",textureid="",C0=angles(1.5707963267948966,0,1.5707963267948966),Name="Left Arm"},
  148.     {meshid="14255522247",textureid="",C0=angles(-1.5707963267948966,0,1.5707963267948966),Name="Right Arm"},
  149.  
  150.     {meshid="17374767929",textureid="",C0=angles(1.5707963267948966,0,1.5707963267948966),Name="Left Arm"},
  151.     {meshid="17374767929",textureid="",C0=angles(-1.5707963267948966,0,1.5707963267948966),Name="Right Arm"},
  152.  
  153.     {meshid="12344207333",textureid="",C0=angles(2,0,0),Name="Left Arm"},
  154.     {meshid="12344206657",textureid="",C0=angles(2,0,0),Name="Right Arm"},
  155.  
  156.     {meshid="13831073174",textureid="",C0=cfMul(cf(0.017,0,-0.23),angles(-1.4835298641951802,-0.15707963267948966,2.199114857512855)),Name="Left Arm"},
  157.     {meshid="13839903766",textureid="",C0=cfMul(cf(0,-0.62,-0.01),angles(1.6580627893946132,0.15707963267948966,-2.199114857512855)),Name="Right Arm"},
  158.  
  159.     {meshid="11159370334",textureid="11159285454",C0=angles(1.5707963267948966,0,1.5707963267948966),Name="Left Leg"},
  160.     {meshid="12652772399",textureid="12652775021",C0=cf(0,-0.125,0),Name="Right Leg"},
  161.  
  162.     {meshid="14768684979",textureid="",C0=angles(0,0,1.5707963267948966),Name="Left Leg"},
  163.     {meshid="14768684979",textureid="",C0=angles(0,0,1.5707963267948966),Name="Right Leg"},
  164.  
  165.     {meshid="17387586286",textureid="",C0=angles(1.5707963267948966,0,1.5707963267948966),Name="Left Leg"},
  166.     {meshid="17387586286",textureid="",C0=angles(-1.5707963267948966,0,1.5707963267948966),Name="Right Leg"},
  167.  
  168.     {meshid="14768666349",textureid="",C0=cf_0,Name="Torso"},
  169.     {meshid="14241018198",textureid="",C0=cf_0,Name="Torso"},
  170.     {meshid="13421774668",textureid="",C0=cf_0,Name="Torso"},
  171.  
  172.     {meshid="4324138105",textureid="4324138210",C0=cfMul(angles(-1.6144295580947547,1.5707963267948966,0),cf(-0.125,0.1,0)),Name="Left Arm"},
  173.     {meshid="4154474745",textureid="4154474807",C0=cfMul(angles(1.5271630954950384,-1.5707963267948966,0),cf(-0.125,-1.5,0)),Name="Left Arm"},
  174.     {meshid="3030546036",textureid="3650191503",C0=cfMul(angles(1.5271630954950384,1.5707963267948966,0),cf(0.125,-1.5,0)),Name="Right Arm"},
  175.     {meshid="3030546036",textureid="3443321249",C0=cfMul(angles(-1.6144295580947547,-1.5707963267948966,0),cf(0.125,0.1,0)),Name="Right Arm"},
  176.     {meshid="3030546036",textureid="3360974849",C0=cfMul(angles(1.5271630954950384,1.5707963267948966,0),cf(-0.125,-1.5,0)),Name="Left Leg"},
  177.     {meshid="3030546036",textureid="3360978739",C0=cfMul(angles(-1.6144295580947547,-1.5707963267948966,0),cf(-0.125,0.3,0)),Name="Left Leg"},
  178.     {meshid="3030546036",textureid="3033898741",C0=cfMul(angles(1.5271630954950384,-1.5707963267948966,0),cf(0.125,-1.5,0)),Name="Right Leg"},
  179.     {meshid="3030546036",textureid="3409604993",C0=cfMul(angles(-1.6144295580947547,1.5707963267948966,0),cf(0.125,0.3,0)),Name="Right Leg"},
  180.     {meshid="4819720316",textureid="4819722776",C0=angles(0,0,0.2617993877991494),Name="Torso"}
  181. }
  182.  
  183. local function gp(p,n,cl)
  184.     for i,v in next,GetChildren(p) do
  185.         if IsA(v,cl) and (insGet(v,"Name")==n) then
  186.             return v
  187.         end
  188.     end
  189.     return nil
  190. end
  191. local function timegp(p,n,c,t)
  192.     t=osclock()+t
  193.     while t>osclock() do
  194.         local r=gp(p,n,c)
  195.         if r then
  196.             return r
  197.         end
  198.         Wait(stepped)
  199.     end
  200.     return nil
  201. end
  202. local function getNetlessVelocity(realVel)
  203.     --if true then return v3_0 end
  204.     --if true then return realVel end
  205.     --if true then return v3_net end
  206.     if v3Get(realVel,"Magnitude")>25.01 then
  207.         return v3Get(realVel,"Unit")*v3_xzL+v3_net
  208.     end
  209.     return realVel*v3_xz+v3_net
  210. end
  211. local function getMeshOfPart(v)
  212.     if IsA(v,"MeshPart") then
  213.         return insGet(v,"MeshId"), insGet(v,"TextureID")
  214.     elseif IsA(v,"BasePart") then
  215.         v=FindFirstChildOfClass(v,"SpecialMesh")
  216.         if v then
  217.             return insGet(v,"MeshId"), insGet(v,"TextureId")
  218.         end
  219.     end
  220.     return nil, nil
  221. end
  222. local function makeplaceholder(v)
  223.     if typeof(v)~="Instance" then
  224.         return nil
  225.     end
  226.     if not insGet(v,"Archivable") then
  227.         insSet(v,"Archivable",true)
  228.     end
  229.     v=Clone(v)
  230.     for i,v in next,GetChildren(v) do
  231.         if IsA(v,"SpecialMesh") then
  232.             insSet(v,"Name",rs())
  233.             ClearAllChildren(v)
  234.         else
  235.             Destroy(v)
  236.         end
  237.     end
  238.     insSet(v,"Name",rs())
  239.     insSet(v,"Anchored",true)
  240.     insSet(v,"CanCollide",false)
  241.     insSet(v,"Transparency",0.25)
  242.     insSet(v,"Parent",ws)
  243.     return v
  244. end
  245. local function emptyfunction() end
  246.  
  247. local i1=i("Frame")
  248. local i2=i("Frame")
  249. local i3=i("Frame")
  250. local i4=i("ScrollingFrame")
  251. local i5=i("UIListLayout")
  252. local i6=i("UIGradient")
  253. local i7=i("TextBox")
  254. local i8=i("TextButton")
  255. local i9=i("UIGradient")
  256. local i10=i("ScreenGui")
  257. insSet(i1,"AnchorPoint",v2(0.5,0))
  258. insSet(i1,"Active",true)
  259. insSet(i1,"BorderSizePixel",0)
  260. insSet(i1,"ClipsDescendants",true)
  261. insSet(i1,"Position",u2(0.5,0,0.5,guiTheme.windowRegularSize.Y/-2))
  262. insSet(i1,"Size",u2(0,guiTheme.windowRegularSize.X,0,guiTheme.windowRegularSize.Y))
  263. insSet(i1,"Name",rs())
  264. insSet(i1,"Parent",i10)
  265. insSet(i2,"BackgroundColor3",c3(1,1,1))
  266. insSet(i2,"BorderSizePixel",0)
  267. insSet(i2,"Size",u2(0,guiTheme.windowRegularSize.X,0,guiTheme.windowRegularSize.Y))
  268. insSet(i2,"Name",rs())
  269. insSet(i2,"Parent",i1)
  270. insSet(i3,"BackgroundColor3",c3(1,1,1))
  271. insSet(i3,"BorderSizePixel",0)
  272. insSet(i3,"Position",u2(0,5,0,guiTheme.windowMinimizedSize.Y-2))
  273. insSet(i3,"Size",u2(1,-10,0,guiTheme.windowRegularSize.Y-guiTheme.windowMinimizedSize.Y-3))
  274. insSet(i3,"Name",rs())
  275. insSet(i3,"Parent",i2)
  276. insSet(i4,"Active",true)
  277. insSet(i4,"BackgroundTransparency",1)
  278. insSet(i4,"BorderSizePixel",0)
  279. insSet(i4,"Size",u2(1,-3,1,0))
  280. insSet(i4,"AutomaticCanvasSize",e.AutomaticSize.Y)
  281. insSet(i4,"CanvasSize",u2(0,0,0,0))
  282. insSet(i4,"ScrollBarThickness",7)
  283. insSet(i4,"Name",rs())
  284. insSet(i4,"Parent",i3)
  285. insSet(i5,"Name",rs())
  286. insSet(i5,"Parent",i4)
  287. insSet(i5,"SortOrder",e.SortOrder.LayoutOrder)
  288. insSet(i6,"Name",rs())
  289. insSet(i6,"Parent",i3)
  290. insSet(i6,"Color",cs({csk(0,guiTheme.listTopColor),csk(1,guiTheme.listBottomColor)}))
  291. insSet(i6,"Rotation",90)
  292. insSet(i7,"Font",e.Font.SourceSans)
  293. insSet(i7,"FontSize",e.FontSize.Size18)
  294. insSet(i7,"ClearTextOnFocus",false)
  295. insSet(i7,"Text",guiTheme.guiTitle)
  296. insSet(i7,"TextColor3",guiTheme.windowTitleColor)
  297. insSet(i7,"TextSize",16)
  298. insSet(i7,"AnchorPoint",v2(0.5,0))
  299. insSet(i7,"BackgroundTransparency",1)
  300. insSet(i7,"Position",u2(0.5,0,0,guiTheme.windowMinimizedSize.Y/2))
  301. insSet(i7,"Name",rs())
  302. insSet(i7,"Parent",i2)
  303. insSet(i8,"AnchorPoint",v2(1,0))
  304. insSet(i8,"BackgroundTransparency",1)
  305. insSet(i8,"Position",u2(1,0,0,0))
  306. insSet(i8,"Size",u2(0,40,0,guiTheme.windowMinimizedSize.Y))
  307. insSet(i8,"Name",rs())
  308. insSet(i8,"Parent",i2)
  309. insSet(i8,"Font",e.Font.SourceSans)
  310. insSet(i8,"FontSize",e.FontSize.Size18)
  311. insSet(i8,"Text","-")
  312. insSet(i8,"TextColor3",c3(1,1,1))
  313. insSet(i8,"TextSize",16)
  314. insSet(i9,"Name",rs())
  315. insSet(i9,"Parent",i2)
  316. insSet(i9,"Color",cs({csk(0,guiTheme.windowTopColor),csk(1,guiTheme.windowBottomColor)}))
  317. insSet(i9,"Rotation",90)
  318. insSet(i10,"ZIndexBehavior",e.ZIndexBehavior.Sibling)
  319. insSet(i10,"IgnoreGuiInset",true)
  320. insSet(i10,"ResetOnSpawn",false)
  321. insSet(i10,"DisplayOrder",2147483647)
  322. insSet(i10,"Name",rs())
  323. local guimin=false
  324. local minloop=false
  325. local i1X=guiTheme.windowRegularSize.X
  326. local i1Y=guiTheme.windowRegularSize.Y
  327. local i1Xdest=i1X
  328. local i1Ydest=i1Y
  329. Connect(insGet(i8,"MouseButton1Click"),function()
  330.     guimin = not guimin
  331.     if guimin then
  332.         i1Xdest=guiTheme.windowMinimizedSize.X
  333.         i1Ydest=guiTheme.windowMinimizedSize.Y
  334.     else
  335.         i1Xdest=guiTheme.windowRegularSize.X
  336.         i1Ydest=guiTheme.windowRegularSize.Y
  337.     end
  338.     if minloop then
  339.         return
  340.     end
  341.     minloop=true
  342.     insSet(i3,"Visible",true)
  343.     sine=osclock()
  344.     local lastsine=sine
  345.     while true do
  346.         sine=osclock()
  347.         local deltaTime=(sine-lastsine)*10
  348.         lastsine=sine
  349.         local difX=i1Xdest-i1X
  350.         local difY=i1Ydest-i1Y
  351.         if (abs(difY)<=1) and (abs(difX)<=1) then
  352.             i1X=i1Xdest
  353.             i1Y=i1Ydest
  354.             insSet(i1,"Size",u2(0,i1X,0,i1Y))
  355.             break
  356.         end
  357.         i1X=i1X+difX*deltaTime
  358.         i1Y=i1Y+difY*deltaTime
  359.         insSet(i1,"Size",u2(0,i1X,0,i1Y))
  360.         twait()
  361.     end
  362.     insSet(i3,"Visible",not guimin)
  363.     minloop=false
  364. end)
  365. local function Draggable(window,obj)
  366.     local MB1enum = e.UserInputType.MouseButton1
  367.     local TOUCHenum = e.UserInputType.Touch
  368.     obj = obj or window
  369.     local activeEntered = 0
  370.     local mouseStart = nil
  371.     local dragStart = nil
  372.     local inputbegancon = nil
  373.     local rendersteppedcon = nil
  374.     local inputendedcon = nil
  375.     local function inputendedf(a)
  376.         a=insGet(a,"UserInputType")
  377.         if (a==MB1enum) or (a==TOUCHenum) then
  378.             Disconnect(rendersteppedcon)
  379.             Disconnect(inputendedcon)
  380.         end
  381.     end
  382.     local function rendersteppedf()
  383.         local off = GetMouseLocation(uis)-mouseStart
  384.         insSet(window,"Position",dragStart+u2(0,off.X,0,off.Y))
  385.     end
  386.     local function inputbeganf(a)
  387.         a=insGet(a,"UserInputType")
  388.         if ((a==MB1enum) or (a==TOUCHenum)) and (activeEntered==0) and not GetFocusedTextBox(uis) then
  389.             mouseStart=GetMouseLocation(uis)
  390.             dragStart=insGet(window,"Position")
  391.             if rendersteppedcon then Disconnect(rendersteppedcon) end
  392.             rendersteppedcon = Connect(renderstepped,rendersteppedf)
  393.             if inputendedcon then Disconnect(inputendedcon) end
  394.             inputendedcon = Connect(insGet(uis,"InputEnded"),inputendedf)
  395.         end
  396.     end
  397.     Connect(insGet(obj,"MouseEnter"),function()
  398.         if inputbegancon then Disconnect(inputbegancon) end
  399.         inputbegancon = Connect(insGet(uis,"InputBegan"),inputbeganf)
  400.     end)
  401.     Connect(insGet(obj,"MouseLeave"),function()
  402.         Disconnect(inputbegancon)
  403.     end)
  404.     local function ondes(d)
  405.         if IsA(d,"GuiObject") then
  406.             local thisEntered = false
  407.             local thisAdded = false
  408.             local con0 = Connect(insGet(d,"MouseEnter"),function()
  409.                 thisEntered = true
  410.                 if (not thisAdded) and insGet(d,"Active") then
  411.                     activeEntered = activeEntered + 1
  412.                     thisAdded = true
  413.                 end
  414.             end)
  415.             local con1 = Connect(insGet(d,"MouseLeave"),function()
  416.                 thisEntered = false
  417.                 if thisAdded then
  418.                     activeEntered = activeEntered - 1
  419.                     thisAdded = false
  420.                 end
  421.             end)
  422.             local con2 = Connect(GetPropertyChangedSignal(d,"Active"),function()
  423.                 if thisEntered then
  424.                     if thisAdded and not insGet(d,"Active") then
  425.                         activeEntered = activeEntered - 1
  426.                         thisAdded = false
  427.                     elseif insGet(d,"Active") and not thisAdded then
  428.                         activeEntered = activeEntered + 1
  429.                         thisAdded = true
  430.                     end
  431.                 end
  432.             end)
  433.             local con3 = nil
  434.             con3 = Connect(insGet(d,"AncestryChanged"),function()
  435.                 if not IsDescendantOf(d,window) then
  436.                     if thisEntered then
  437.                         activeEntered = activeEntered - 1
  438.                     end
  439.                     Disconnect(con0)
  440.                     Disconnect(con1)
  441.                     Disconnect(con2)
  442.                     Disconnect(con3)
  443.                 end
  444.             end)
  445.         end
  446.     end
  447.     Connect(insGet(window,"DescendantAdded"),ondes)
  448.     for i,v in next,GetDescendants(window) do
  449.         ondes(v)
  450.     end
  451. end
  452. local function btn(txt, f)
  453.     local i1=i("TextBox")
  454.     local i2=i("TextButton")
  455.     insSet(i1,"Font",e.Font.SourceSans)
  456.     insSet(i1,"FontSize",e.FontSize.Size14)
  457.     insSet(i1,"Text",txt)
  458.     insSet(i1,"ClearTextOnFocus",false)
  459.     insSet(i1,"Position",u2(0.5,0,0.5,0))
  460.     insSet(i1,"TextColor3",guiTheme.buttonsTextColor)
  461.     insSet(i1,"Name",rs())
  462.     insSet(i1,"Parent",i2)
  463.     insSet(i2,"BackgroundTransparency",0)
  464.     insSet(i2,"TextTransparency",1)
  465.     insSet(i2,"Size",u2(1,0,0,14))
  466.     insSet(i2,"Name",rs())
  467.     if f then
  468.         Connect(insGet(i2,"MouseButton1Click"),f)
  469.     end
  470.     insSet(i2,"Parent",i4)
  471.     return i1
  472. end
  473. local function lbl(txt)
  474.     local i1=i("TextBox")
  475.     local i2=i("Frame")
  476.     insSet(i1,"Font",e.Font.SourceSans)
  477.     insSet(i1,"FontSize",e.FontSize.Size14)
  478.     insSet(i1,"Text",txt)
  479.     insSet(i1,"ClearTextOnFocus",false)
  480.     insSet(i1,"TextColor3",guiTheme.labelsTextColor)
  481.     insSet(i1,"Position",u2(0.5,0,0.5))
  482.     insSet(i1,"BackgroundTransparency",1)
  483.     insSet(i1,"Name",rs())
  484.     insSet(i1,"Parent",i2)
  485.     insSet(i2,"Size",u2(1,0,0,14))
  486.     insSet(i2,"BackgroundTransparency",1)
  487.     insSet(i2,"Name",rs())
  488.     insSet(i2,"Parent",i4)
  489.     return i1
  490. end
  491.  
  492. Draggable(i1)
  493.  
  494. lbl("by MyWorld owns the script")
  495. lbl("discord.gg/QMy5f6DrbH")
  496.  
  497. local allowshiftlock=nil
  498. local ctrltp=nil
  499. local placeholders=nil
  500. local clickfling=nil
  501. local highlightflingtargets=nil
  502. local discharscripts=nil
  503. local flingchangestate=nil
  504. local respawntp=nil
  505. local breakjointsmethod=nil
  506. local simrad=false
  507.  
  508. local c=nil
  509. local function stopreanimate()
  510.     if c then
  511.         c=nil
  512.         return true
  513.     end
  514.     return false
  515. end
  516. local function reanimate()
  517.     --[[
  518.         FDless reanimate by MyWorld
  519.         aka no client sided instances
  520.         "what else do i optimize here"
  521.     ]]
  522.  
  523.     local novoid = true --prevents parts from going under workspace.FallenPartsDestroyHeight if you control them
  524.     local speedlimit = 3000 --makes your parts move slower if the magnitude of their velocity is higher than this
  525.     local retVelTime = 0.51 --time that claimed parts have velocity to reclaim in case u lose them
  526.     local walkSpeed = 16 --your walkspeed (can be changed at runtime)
  527.     local jumpPower = 50 --your jump power (can be changed at runtime)
  528.     local gravity = 196.2 --how fast the characters velocity decreases while falling (can be changed at runtime)
  529.     local ctrlclicktp = ctrltp --makes you teleport where u point ur mouse cursor at when click and hold ctrl down
  530.     local clickfling = clickfling --makes you fling the person you clicked when its available to do so
  531.     local flingvel = v3(15000,16000,15000) --the rotation velocity that ur character will have while flinging
  532.  
  533.     if stopreanimate() then return end
  534.     c=insGet(lp,"Character")
  535.     if not (c and IsDescendantOf(c,ws)) then return end
  536.  
  537.     local rootpart=gp(c,"HumanoidRootPart","BasePart") or gp(c,"Torso","BasePart") or gp(c,"UpperTorso","BasePart") or timegp(c,"HumanoidRootPart","BasePart",0.5) or FindFirstChildWhichIsA(c,"BasePart")
  538.     if not rootpart then return end
  539.  
  540.     local cam=nil
  541.     --theres a way to have ws.currentcamera nil on heartbeat and still have the game run normally
  542.     local function refcam()
  543.         local newcam=insGet(ws,"CurrentCamera")
  544.         while not newcam do
  545.             Wait(GetPropertyChangedSignal(ws,"CurrentCamera"))
  546.             newcam=insGet(ws,"CurrentCamera")
  547.         end
  548.         cam=newcam
  549.     end
  550.     refcam()
  551.     local camcf=insGet(cam,"CFrame")
  552.     local enumCamS=e.CameraType.Scriptable
  553.     local camt=insGet(cam,"CameraType")
  554.     local camcon0=nil
  555.     local camcon1=nil
  556.     local camcon2=nil
  557.     local function onnewcamera()
  558.         refcam()
  559.         if camcon0 then
  560.             Disconnect(camcon0)
  561.             Disconnect(camcon1)
  562.             camcon0=nil
  563.         end
  564.         if not c then
  565.             if insGet(cam,"CameraType")==enumCamS then
  566.                 insSet(cam,"CameraType",camt)
  567.             end
  568.             return Disconnect(camcon2)
  569.         end
  570.         camcon0=Connect(GetPropertyChangedSignal(cam,"CFrame"),function()
  571.             if insGet(cam,"CFrame")~=camcf then
  572.                 insSet(cam,"CFrame",camcf)
  573.             end
  574.         end)
  575.         camcon1=Connect(GetPropertyChangedSignal(cam,"CameraType"),function()
  576.             if insGet(cam,"CameraType")~=enumCamS then
  577.                 insSet(cam,"CameraType",enumCamS)
  578.             end
  579.         end)
  580.         if insGet(cam,"CameraType")~=enumCamS then
  581.             insSet(cam,"CameraType",enumCamS)
  582.         end
  583.         if insGet(cam,"CFrame")~=camcf then
  584.             insSet(cam,"CFrame",camcf)
  585.         end
  586.     end
  587.     camcon2=Connect(GetPropertyChangedSignal(ws,"CurrentCamera"),onnewcamera)
  588.     onnewcamera()
  589.  
  590.     local velYdelta=insGet(ws,"Gravity")*0.025
  591.     Connect(GetPropertyChangedSignal(ws,"Gravity"),function()
  592.         velYdelta=insGet(ws,"Gravity")*0.025
  593.     end)
  594.  
  595.     local fpdh=insGet(ws,"FallenPartsDestroyHeight")
  596.     novoid=novoid and (fpdh+1)
  597.  
  598.     local Yvel=0
  599.     local cfr=insGet(rootpart,"CFrame")
  600.     local pos=cfGet(cfr,"Position")
  601.     cfr=cfl(pos,pos+cfGet(cfr,"LookVector")*v3_101)
  602.     local primarypart=nil
  603.     local shiftlock=false
  604.     local firstperson=false
  605.     local xzvel=v3_0
  606.     local v3_0150=v3_010*1.5
  607.     local camcfLV=cfGet(camcf,"LookVector")
  608.     local camrot=cfl(v3_0,camcfLV)
  609.     local camcfRV=cfGet(camrot,"RightVector")
  610.     local cammag=-v3Get((cfGet(camcf,"Position")-(pos+v3_0150)),"Magnitude")
  611.  
  612.     local R6parts={
  613.         head={Name="Head"},
  614.         torso={Name="Torso"},
  615.         root={Name="HumanoidRootPart"},
  616.         leftArm={Name="Left Arm"},
  617.         rightArm={Name="Right Arm"},
  618.         leftLeg={Name="Left Leg"},
  619.         rightLeg={Name="Right Leg"}
  620.     }
  621.     rootpart=R6parts.root
  622.     local cframes={}
  623.     for i,v in next,R6parts do
  624.         cframes[v]=cfr
  625.     end
  626.     local joints={
  627.         {
  628.             Name="Neck",
  629.             Part0=R6parts.torso,Part1=R6parts.head,
  630.             C0=cf(0,1,0,-1,0,0,0,0,1,0,1,-0),
  631.             C1=cf(0,-0.5,0,-1,0,0,0,0,1,0,1,-0)
  632.         },
  633.         {
  634.             Name="RootJoint",
  635.             Part0=rootpart,Part1=R6parts.torso,
  636.             C0=cf(0,0,0,-1,0,0,0,0,1,0,1,-0),
  637.             C1=cf(0,0,0,-1,0,0,0,0,1,0,1,-0)
  638.         },
  639.         {
  640.             Name="Right Shoulder",
  641.             Part0=R6parts.torso,Part1=R6parts.rightArm,
  642.             C0=cf(1,0.5,0,0,0,1,0,1,-0,-1,0,0),
  643.             C1=cf(-0.5,0.5,0,0,0,1,0,1,-0,-1,0,0)
  644.         },
  645.         {
  646.             Name="Left Shoulder",
  647.             Part0=R6parts.torso,Part1=R6parts.leftArm,
  648.             C0=cf(-1,0.5,0,0,0,-1,0,1,0,1,0,0),
  649.             C1=cf(0.5,0.5,0,0,0,-1,0,1,0,1,0,0)
  650.         },
  651.         {
  652.             Name="Right Hip",
  653.             Part0=R6parts.torso,Part1=R6parts.rightLeg,
  654.             C0=cf(1,-1,0,0,0,1,0,1,-0,-1,0,0),
  655.             C1=cf(0.5,1,0,0,0,1,0,1,-0,-1,0,0)
  656.         },
  657.         {
  658.             Name="Left Hip",
  659.             Part0=R6parts.torso,Part1=R6parts.leftLeg,
  660.             C0=cf(-1,-1,0,0,0,-1,0,1,0,1,0,0),
  661.             C1=cf(-0.5,1,0,0,0,-1,0,1,0,1,0,0)
  662.         }
  663.     }
  664.  
  665.     local refreshedjoints={}
  666.     local refreshjointsI=nil
  667.     refreshjointsI=function(part)
  668.         tinsert(refreshedjoints,part)
  669.         for i,v in next,joints do
  670.             local part0=v.Part0
  671.             local part1=v.Part1
  672.             if part1 and (part0==part) then
  673.                 cframes[part1]=cfMul(cframes[part],cfMul(v.C0,Inverse(v.C1)))
  674.                 if not tfind(refreshedjoints,part1) then
  675.                     refreshjointsI(part1)
  676.                 end
  677.             elseif part0 and (part1==part) then
  678.                 cframes[part0]=cfMul(cframes[part],cfMul(v.C1,Inverse(v.C0)))
  679.                 if not tfind(refreshedjoints,part0) then
  680.                     refreshjointsI(part0)
  681.                 end
  682.             end
  683.         end
  684.     end
  685.     refreshjointsI(rootpart)
  686.     tclear(refreshedjoints)
  687.  
  688.     local attachments={
  689.         RightShoulderAttachment={R6parts.rightArm,cf(0,1,0,1,0,0,0,1,0,0,0,1)},
  690.         RightGripAttachment={R6parts.rightArm,cf(0,-1,0,1,0,0,0,1,0,0,0,1)},
  691.         LeftFootAttachment={R6parts.leftLeg,cf(0,-1,0,1,0,0,0,1,0,0,0,1)},
  692.         LeftShoulderAttachment={R6parts.leftArm,cf(0,1,0,1,0,0,0,1,0,0,0,1)},
  693.         LeftGripAttachment={R6parts.leftArm,cf(0,-1,0,1,0,0,0,1,0,0,0,1)},
  694.         RootAttachment={rootpart,cf(0,0,0,1,0,0,0,1,0,0,0,1)},
  695.         RightFootAttachment={R6parts.rightLeg,cf(0,-1,0,1,0,0,0,1,0,0,0,1)},
  696.         NeckAttachment={R6parts.torso,cf(0,1,0,1,0,0,0,1,0,0,0,1)},
  697.         BodyFrontAttachment={R6parts.torso,cf(0,0,-0.5,1,0,0,0,1,0,0,0,1)},
  698.         BodyBackAttachment={R6parts.torso,cf(0,0,0.5,1,0,0,0,1,0,0,0,1)},
  699.         LeftCollarAttachment={R6parts.torso,cf(-1,1,0,1,0,0,0,1,0,0,0,1)},
  700.         RightCollarAttachment={R6parts.torso,cf(1,1,0,1,0,0,0,1,0,0,0,1)},
  701.         WaistFrontAttachment={R6parts.torso,cf(0,-1,-0.5,1,0,0,0,1,0,0,0,1)},
  702.         WaistCenterAttachment={R6parts.torso,cf(0,-1,0,1,0,0,0,1,0,0,0,1)},
  703.         WaistBackAttachment={R6parts.torso,cf(0,-1,0.5,1,0,0,0,1,0,0,0,1)},
  704.         HairAttachment={R6parts.head,cf(0,0.6,0,1,0,0,0,1,0,0,0,1)},
  705.         HatAttachment={R6parts.head,cf(0,0.6,0,1,0,0,0,1,0,0,0,1)},
  706.         FaceFrontAttachment={R6parts.head,cf(0,0,-0.6,1,0,0,0,1,0,0,0,1)},
  707.         FaceCenterAttachment={R6parts.head,cf(0,0,0,1,0,0,0,1,0,0,0,1)}
  708.     }
  709.  
  710.     local function getPart(name,blacklist)
  711.         for i,v in next,cframes do
  712.             if (i.Name==name) and not (blacklist and tfind(blacklist,i)) then
  713.                 return i
  714.             end
  715.         end
  716.         return nil
  717.     end
  718.  
  719.     local function getJoint(name)
  720.         for i,v in next,joints do
  721.             if v.Name==name then
  722.                 return v
  723.             end
  724.         end
  725.         return {C0=cf_0,C1=cf_0}
  726.     end
  727.  
  728.     local function getPartFromMesh(m,t,blacklist)
  729.         if blacklist then
  730.             for v,_ in next,cframes do
  731.                 if v.m and (not tfind(blacklist,v)) and sfind(v.m,m) and sfind(v.t,t) then
  732.                     return v
  733.                 end
  734.             end
  735.         else
  736.             for v,_ in next,cframes do
  737.                 if v.m and sfind(v.m,m) and sfind(v.t,t) then
  738.                     return v
  739.                 end
  740.             end
  741.         end
  742.         local p={m=m,t=t}
  743.         cframes[p]=cfr
  744.         local j={C0=cf_0,C1=cf_0,Part0=p}
  745.         p.j=j
  746.         return p
  747.     end
  748.  
  749.     local function getPartJoint(p)
  750.         if cframes[p] then
  751.             local j=p.j
  752.             if j then
  753.                 return j
  754.             end
  755.             for i,v in next,joints do
  756.                 if v.Part0==p then
  757.                     return v
  758.                 end
  759.             end
  760.             for i,v in next,joints do
  761.                 if v.Part1==p then
  762.                     return v
  763.                 end
  764.             end
  765.         end
  766.         return nil
  767.     end
  768.  
  769.     local function getAccWeldFromMesh(m,t)
  770.         return getPartJoint(getPartFromMesh(m,t))
  771.     end
  772.  
  773.     local raycastparams=rp()
  774.     raycastparams.FilterType=e.RaycastFilterType.Blacklist
  775.     raycastparams.RespectCanCollide=true
  776.     local rayfilter={}
  777.     local characters={}
  778.     local function refreshrayfilter()
  779.         tclear(rayfilter)
  780.         for i,v in next,characters do
  781.             tinsert(rayfilter,v)
  782.         end
  783.         raycastparams.FilterDescendantsInstances=rayfilter
  784.     end
  785.     local flingtable={}
  786.     local rootparts={}
  787.     for i,v in next,accessorylimbs do
  788.         v.p=getPart(v.Name)
  789.     end
  790.     local function makePartCons(p,t)
  791.         if (t.p==p) and insGet(p,"Anchored") then
  792.             t.p=nil
  793.         end
  794.         local con0=Connect(GetPropertyChangedSignal(p,"Anchored"),function()
  795.             if insGet(p,"Anchored") then
  796.                 if t.p==p then
  797.                     t.c=nil
  798.                     t.p=nil
  799.                 end
  800.             elseif not t.p then
  801.                 t.p=p
  802.             end
  803.         end)
  804.         local con1=nil
  805.         con1=Connect(insGet(p,"AncestryChanged"),function()
  806.             if not IsDescendantOf(p,ws) then
  807.                 Disconnect(con0)
  808.                 Disconnect(con1)
  809.                 if t.p==p then
  810.                     t.p=nil
  811.                 end
  812.             end
  813.         end)
  814.     end
  815.     local ondes=nil
  816.     ondes=function(v)
  817.         if c and IsA(v,"Attachment") and IsDescendantOf(c,ws) then
  818.             local v1=attachments[insGet(v,"Name")]
  819.             if v1 then
  820.                 local p=insGet(v,"Parent")
  821.                 if insGet(p,"Parent")~=c then
  822.                     local meshid,textureid=getMeshOfPart(p)
  823.                     if meshid then
  824.                         local found=false
  825.                         for i,_ in next,cframes do
  826.                             if (meshid==i.m) and (textureid==i.t) then
  827.                                 local p1=i.p
  828.                                 if p1 and IsDescendantOf(p1,c) then
  829.                                     if p1==p then
  830.                                         found=true
  831.                                         break
  832.                                     end
  833.                                 else
  834.                                     found=true
  835.                                     i.p=p
  836.                                     makePartCons(p,i)
  837.                                     break
  838.                                 end
  839.                             else
  840.                                 local j=i.j
  841.                                 if j and sfind(meshid,i.m) and sfind(textureid,i.t) then
  842.                                     i.m=meshid
  843.                                     i.t=textureid
  844.                                     i.l=insGet(p,"Position")
  845.                                     i.p=p
  846.                                     makePartCons(p,i)
  847.                                     i.j=nil
  848.                                     i.Name=insGet(p,"Name")
  849.                                     j.C0=insGet(v,"CFrame")
  850.                                     j.C1=v1[2]
  851.                                     j.Part1=v1[1]
  852.                                     tinsert(joints,j)
  853.                                     found=true
  854.                                     break
  855.                                 end
  856.                             end
  857.                         end
  858.                         if not found then
  859.                             for i,l in next,accessorylimbs do
  860.                                 if l.p and sfind(meshid,l.meshid) and sfind(textureid,l.textureid) then
  861.                                     local t={Name=insGet(p,"Name"),l=insGet(p,"Position"),m=meshid,t=textureid,p=p}
  862.                                     makePartCons(p,t)
  863.                                     if placeholders then
  864.                                         t.v=makeplaceholder(p)
  865.                                     end
  866.                                     cframes[t]=insGet(p,"CFrame")
  867.                                     tinsert(joints,{Part0=t,Part1=l.p,C0=l.C0,C1=cf_0})
  868.                                     l.p=nil
  869.                                     found=true
  870.                                     break
  871.                                 end
  872.                             end
  873.                             if not found then
  874.                                 local t={Name=insGet(p,"Name"),l=insGet(p,"Position"),m=meshid,t=textureid,p=p}
  875.                                 makePartCons(p,t)
  876.                                 if placeholders then
  877.                                     t.v=makeplaceholder(p)
  878.                                 end
  879.                                 cframes[t]=insGet(p,"CFrame")
  880.                                 tinsert(joints,{Part0=t,Part1=v1[1],C0=insGet(v,"CFrame"),C1=v1[2]})
  881.                             end
  882.                         end
  883.                     end
  884.                 end
  885.             end
  886.         end
  887.     end
  888.  
  889.     local simradv=0
  890.     local charcons={}
  891.     local function onplayer(v)
  892.         simradv=simradv+1000
  893.         local lastc=nil
  894.         local function oncharacter()
  895.             local newc=insGet(v,"Character")
  896.             if c and newc and (newc~=lastc) then
  897.                 lastc=newc
  898.                 characters[v]=newc
  899.                 refreshrayfilter()
  900.                 if v==lp then
  901.                     if discharscripts then
  902.                         Connect(insGet(newc,"DescendantAdded"),discharscripts)
  903.                         for i,v in next,GetDescendants(newc) do
  904.                             if IsA(v,"Script") then
  905.                                 insSet(v,"Disabled",true)
  906.                             end
  907.                         end
  908.                     end
  909.                     local hrp=timegp(newc,"HumanoidRootPart","BasePart",10)
  910.                     if not (hrp and c and IsDescendantOf(newc,ws)) then return end
  911.                     c=newc
  912.                     local fi,fv=next(flingtable)
  913.                     if fi then
  914.                         if flingchangestate then
  915.                             local hum=FindFirstChildOfClass(c,"Humanoid")
  916.                             if hum then
  917.                                 insGet(hum,"ChangeState")(hum,e.HumanoidStateType.Physics)
  918.                             end
  919.                         end
  920.                         for i,v in next,tclone(flingtable) do
  921.                             if not c then
  922.                                 return
  923.                             end
  924.                             local startpos=insGet(i,"Position")
  925.                             local stoptime=sine+3
  926.                             while true do
  927.                                 twait()
  928.                                 if sine>stoptime then
  929.                                     break
  930.                                 end
  931.                                 if insGet(i,"Anchored") or not IsDescendantOf(i,ws) then
  932.                                     break
  933.                                 end
  934.                                 if v3Get((startpos-insGet(i,"Position")),"Magnitude")>200 then
  935.                                     break
  936.                                 end
  937.                                 local tcf=cfAdd(insGet(i,"CFrame"),insGet(i,"AssemblyLinearVelocity")*(sin(sine*15)+1))
  938.                                 if novoid and (cfGet(tcf,"Y")<novoid) then
  939.                                     tcf=cfAdd(tcf,v3_010*(novoid-cfGet(tcf,"Y")))
  940.                                 end
  941.                                 insSet(hrp,"CFrame",tcf)
  942.                                 insSet(hrp,"AssemblyLinearVelocity",insGet(i,"AssemblyLinearVelocity")*v3_101*75)
  943.                                 insSet(hrp,"AssemblyAngularVelocity",flingvel)
  944.                             end
  945.                             if v then
  946.                                 Destroy(v)
  947.                             end
  948.                             flingtable[i]=nil
  949.                         end
  950.                         insSet(hrp,"AssemblyLinearVelocity",v3_0)
  951.                         insSet(hrp,"AssemblyAngularVelocity",v3_0)
  952.                         insSet(hrp,"CFrame",cfr)
  953.                         twait(0.2501)
  954.                     end
  955.                     if respawntp==1 then
  956.                         local startpos=pos+v3(mrandom(-32,32),0,mrandom(-32,32))
  957.                         local dir=nil
  958.                         local poscheck=true
  959.                         while poscheck do
  960.                             poscheck=false
  961.                             for i,v in next,rootparts do
  962.                                 local diff=(startpos-insGet(v,"Position"))*v3_101
  963.                                 if v3Get(diff,"Magnitude")<10 then
  964.                                     poscheck=true
  965.                                     dir=dir or (v3Get(diff,"Unit")*3)
  966.                                     startpos=startpos+dir
  967.                                 end
  968.                             end
  969.                             local diff=(startpos-pos)*v3_101
  970.                             if v3Get(diff,"Magnitude")<10 then
  971.                                 poscheck=true
  972.                                 dir=dir or (v3Get(diff,"Unit")*3)
  973.                                 startpos=startpos+dir
  974.                             end
  975.                         end
  976.                         startpos=cfAdd(cfGet(cfr,"Rotation"),startpos)
  977.                         insSet(hrp,"CFrame",startpos)
  978.                         insSet(hrp,"AssemblyLinearVelocity",v3_0)
  979.                         insSet(hrp,"AssemblyAngularVelocity",v3_0)
  980.                         twait(0.2501)
  981.                     elseif respawntp==2 then
  982.                         insSet(hrp,"CFrame",cfAdd(cfr,cfGet(cfr,"RightVector")*3.5-cfGet(cfr,"LookVector")*3.5))
  983.                         insSet(hrp,"AssemblyLinearVelocity",v3_0)
  984.                         insSet(hrp,"AssemblyAngularVelocity",v3_0)
  985.                         twait(0.2501)
  986.                     elseif respawntp==3 then
  987.                         local t=osclock()+0.2501
  988.                         local startcf=cfAdd(cfMul(cfGet(cfr,"Rotation"),angles(1.5707963267948966,0,0)),pos*v3_101+v3_010*(fpdh+30))
  989.                         while twait() do
  990.                             insSet(hrp,"CFrame",startcf)
  991.                             insSet(hrp,"AssemblyLinearVelocity",v3_0)
  992.                             insSet(hrp,"AssemblyAngularVelocity",v3_0)
  993.                             if osclock()>t then
  994.                                 break
  995.                             end
  996.                         end
  997.                     end
  998.                     if newc~=c then
  999.                         return
  1000.                     end
  1001.                     primarypart=insGet(newc,"PrimaryPart") or hrp
  1002.                     if breakjointsmethod==1 then
  1003.                         insGet(newc,"BreakJoints")(newc)
  1004.                         local h=FindFirstChildOfClass(newc,"Humanoid")
  1005.                         if h then
  1006.                             insSet(h,"Health",0)
  1007.                         end
  1008.                     elseif breakjointsmethod==2 then
  1009.                         local h=FindFirstChildOfClass(newc,"Humanoid")
  1010.                         if h then
  1011.                             insSet(h,"Health",0)
  1012.                         else
  1013.                             insGet(newc,"BreakJoints")(newc)
  1014.                         end
  1015.                     else
  1016.                         insGet(newc,"BreakJoints")(newc)
  1017.                     end
  1018.                     Connect(insGet(newc,"DescendantAdded"),ondes)
  1019.                     for i,v in next,GetDescendants(newc) do
  1020.                         ondes(v)
  1021.                     end
  1022.                 else
  1023.                     local hrp=timegp(newc,"HumanoidRootPart","BasePart",10)
  1024.                     if hrp and c and IsDescendantOf(newc,ws) then
  1025.                         rootparts[v]=hrp
  1026.                     end
  1027.                 end
  1028.             end
  1029.         end
  1030.         charcons[v]=Connect(GetPropertyChangedSignal(v,"Character"),oncharacter)
  1031.         oncharacter()
  1032.     end
  1033.     for i,v in next,GetPlayers(plrs) do simradv=simradv+1000 if v~=lp then tspawn(onplayer,v) end end
  1034.     Connect(insGet(plrs,"PlayerAdded"),onplayer)
  1035.     onplayer(lp)
  1036.     Connect(insGet(plrs,"PlayerRemoving"),function(v)
  1037.         simradv=simradv-1000
  1038.         local charcon=charcons[v]
  1039.         if charcon then
  1040.             Disconnect(charcon)
  1041.         end
  1042.         characters[v]=nil
  1043.         rootparts[v]=nil
  1044.     end)
  1045.     local setsimrad=emptyfunction
  1046.     if simrad then
  1047.         setsimrad=function()
  1048.             local canset,_=pcall(function()
  1049.                 insSet(lp,"SimulationRadius",simradv)
  1050.             end)
  1051.             if canset then
  1052.                 setsimrad=function()
  1053.                     insSet(lp,"SimulationRadius",simradv)
  1054.                 end
  1055.             else
  1056.                 setsimrad=emptyfunction
  1057.             end
  1058.         end
  1059.     end
  1060.  
  1061.     local mradN05=rad(-0.5)
  1062.     local KeyCode=e.KeyCode
  1063.     local enumMB2=e.UserInputType.MouseButton2
  1064.     local enumMLCP=e.MouseBehavior.LockCurrentPosition
  1065.     local enumMLC=(insGet(uis,"TouchEnabled") and enumMLCP) or e.MouseBehavior.LockCenter
  1066.     local enumMD=e.MouseBehavior.Default
  1067.     local enumMW=e.UserInputType.MouseWheel
  1068.     local enumMM=e.UserInputType.MouseMovement
  1069.  
  1070.     local mouseBehavior=nil
  1071.     local lastMouseBehavior=insGet(uis,"MouseBehavior")
  1072.     Connect(GetPropertyChangedSignal(uis,"MouseBehavior"),function()
  1073.         if mouseBehavior and (insGet(uis,"MouseBehavior")~=mouseBehavior) then
  1074.             insSet(uis,"MouseBehavior",mouseBehavior)
  1075.         end
  1076.     end)
  1077.  
  1078.     local mode="default"
  1079.     local defaultmode={}
  1080.     local modes={default=defaultmode}
  1081.  
  1082.     local lerpsIdle=emptyfunction
  1083.     local lerpsWalk=emptyfunction
  1084.     local lerpsJump=emptyfunction
  1085.     local lerpsFall=emptyfunction
  1086.  
  1087.     local function addmode(key,mode)
  1088.         if (type(key)~="string") or (type(mode)~="table") then
  1089.             return
  1090.         end
  1091.         for i,v in next,mode do
  1092.             if type(v)~="function" then
  1093.                 mode[i]=nil
  1094.             end
  1095.         end
  1096.         if key=="default" then
  1097.             defaultmode=mode
  1098.             modes.default=mode
  1099.             lerpsIdle=mode.idle or emptyfunction
  1100.             lerpsWalk=mode.walk or emptyfunction
  1101.             lerpsJump=mode.jump or emptyfunction
  1102.             lerpsFall=mode.fall or emptyfunction
  1103.             if mode.modeEntered then
  1104.                 mode.modeEntered()
  1105.             end
  1106.         elseif #key==1 then
  1107.             key=KeyCode[supper(ssub(key,1,1))]
  1108.             modes[key]=mode
  1109.         end
  1110.     end
  1111.  
  1112.     local keyW=KeyCode.W
  1113.     local Wpressed=IsKeyDown(uis,keyW)
  1114.     local keyA=KeyCode.A
  1115.     local Apressed=IsKeyDown(uis,keyA)
  1116.     local keyS=KeyCode.S
  1117.     local Spressed=IsKeyDown(uis,keyS)
  1118.     local keyD=KeyCode.D
  1119.     local Dpressed=IsKeyDown(uis,keyD)
  1120.     local keySpace=KeyCode.Space
  1121.     local jumpingInput=IsKeyDown(uis,keySpace)
  1122.  
  1123.     local FWmovement=0
  1124.     local RTmovement=0
  1125.     local isWalking=false
  1126.     local function refreshKeyboardMovement()
  1127.         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
  1128.     end
  1129.     refreshKeyboardMovement()
  1130.  
  1131.     local keyShift=KeyCode.LeftShift
  1132.     Connect(insGet(uis,"InputBegan"),function(a)
  1133.         if insGet(gs,"MenuIsOpen") or GetFocusedTextBox(uis) then
  1134.             return
  1135.         end
  1136.         a=insGet(a,"KeyCode")
  1137.         if a==keyW then
  1138.             Wpressed=true
  1139.             refreshKeyboardMovement()
  1140.         elseif a==keyA then
  1141.             Apressed=true
  1142.             refreshKeyboardMovement()
  1143.         elseif a==keyS then
  1144.             Spressed=true
  1145.             refreshKeyboardMovement()
  1146.         elseif a==keyD then
  1147.             Dpressed=true
  1148.             refreshKeyboardMovement()
  1149.         elseif a==keySpace then
  1150.             jumpingInput=true
  1151.         elseif a==keyShift then
  1152.             shiftlock=allowshiftlock and not shiftlock
  1153.         elseif modes[a] then
  1154.             if modes[mode].modeLeft then
  1155.                 modes[mode].modeLeft()
  1156.             end
  1157.             if mode==a then
  1158.                 mode="default"
  1159.             else
  1160.                 mode=a
  1161.             end
  1162.             local modet=modes[mode]
  1163.             lerpsIdle=modet.idle or defaultmode.idle or emptyfunction
  1164.             lerpsWalk=modet.walk or defaultmode.walk or emptyfunction
  1165.             lerpsJump=modet.jump or defaultmode.jump or emptyfunction
  1166.             lerpsFall=modet.fall or defaultmode.fall or emptyfunction
  1167.             if modes[mode].modeEntered then
  1168.                 modes[mode].modeEntered()
  1169.             end
  1170.         end
  1171.     end)
  1172.     Connect(insGet(uis,"InputEnded"),function(a)
  1173.         a=insGet(a,"KeyCode")
  1174.         if a==keyW then
  1175.             Wpressed=false
  1176.             refreshKeyboardMovement()
  1177.         elseif a==keyA then
  1178.             Apressed=false
  1179.             refreshKeyboardMovement()
  1180.         elseif a==keyS then
  1181.             Spressed=false
  1182.             refreshKeyboardMovement()
  1183.         elseif a==keyD then
  1184.             Dpressed=false
  1185.             refreshKeyboardMovement()
  1186.         elseif a==keySpace then
  1187.             jumpingInput=false
  1188.         end
  1189.     end)
  1190.  
  1191.     local thumbstickEndX=0
  1192.     local thumbstickStartY=0
  1193.  
  1194.     local thumbstickSizeMultiplier=0
  1195.  
  1196.     local jumpStartX=0
  1197.     local jumpStartY=0
  1198.     local jumpEndX=0
  1199.     local jumpEndY=0
  1200.  
  1201.     local thumbstickInputObject=nil
  1202.     local jumpInputObject=nil
  1203.     local cameraRotateInputObject=nil
  1204.     local cameraZoomInputObject=nil
  1205.  
  1206.     local thumbstickTouchStart=v3_0
  1207.     local cameraZoomInputMagnitude=0
  1208.  
  1209.     Connect(insGet(uis,"TouchStarted"),function(inputObject)
  1210.         if insGet(gs,"MenuIsOpen") or GetFocusedTextBox(uis) then
  1211.             return
  1212.         end
  1213.  
  1214.         local touchPos=insGet(inputObject,"Position")
  1215.         local touchX=v3Get(touchPos,"X")
  1216.         local touchY=v3Get(touchPos,"Y")
  1217.  
  1218.         if (not thumbstickInputObject) and touchX<thumbstickEndX and touchY>thumbstickStartY then
  1219.             thumbstickInputObject=inputObject
  1220.             thumbstickTouchStart=insGet(inputObject,"Position")
  1221.             isWalking=false
  1222.         elseif (not jumpInputObject) and touchY>jumpStartY and touchX>jumpStartX and touchX<jumpEndX and touchY<jumpEndY then
  1223.             jumpInputObject=inputObject
  1224.             jumpingInput=true
  1225.         elseif not cameraRotateInputObject then
  1226.             cameraRotateInputObject=inputObject
  1227.         else
  1228.             cameraZoomInputObject=inputObject
  1229.             cameraZoomInputMagnitude=v3Get(insGet(cameraRotateInputObject,"Position")-insGet(cameraZoomInputObject,"Position"),"Magnitude")
  1230.         end
  1231.     end)
  1232.     Connect(insGet(uis,"TouchMoved"),function(inputObject)
  1233.         local touchPos=insGet(inputObject,"Position")
  1234.         local touchX=v3Get(touchPos,"X")
  1235.         local touchY=v3Get(touchPos,"Y")
  1236.         if inputObject==thumbstickInputObject then
  1237.             local direction=insGet(inputObject,"Position")-thumbstickTouchStart
  1238.             local directionMag=v3Get(direction,"Magnitude")/thumbstickSizeMultiplier
  1239.             if directionMag>0.05 then
  1240.                 isWalking=true
  1241.                 direction=v3Get(direction,"Unit")*min(1,(directionMag-0.05)/0.95)
  1242.                 FWmovement=-v3Get(direction,"Y")
  1243.                 RTmovement=v3Get(direction,"X")
  1244.             else
  1245.                 isWalking=false
  1246.             end
  1247.         elseif inputObject==jumpInputObject then
  1248.             jumpingInput=touchY>jumpStartY and touchX>jumpStartX and touchX<jumpEndX and touchY<jumpEndY
  1249.         else
  1250.             if cameraZoomInputObject then
  1251.                 local newMagnitude=v3Get(insGet(cameraRotateInputObject,"Position")-insGet(cameraZoomInputObject,"Position"),"Magnitude")                  
  1252.                 cammag=cammag+(newMagnitude-cameraZoomInputMagnitude)*0.04*(0.75-cammag/4)
  1253.                 cameraZoomInputMagnitude=newMagnitude
  1254.                 if cammag<0 then
  1255.                     firstperson=false
  1256.                 else
  1257.                     cammag=0
  1258.                     firstperson=true
  1259.                 end
  1260.             elseif inputObject==cameraRotateInputObject then
  1261.                 local rotation=GetMouseDelta(uis)*mradN05
  1262.                 camcfLV=cfGet(cfMul(camrot,angles(rotation.Y,rotation.X,0)),"LookVector")
  1263.                 camrot=cfl(v3_0,camcfLV)
  1264.                 camcfRV=cfGet(camrot,"RightVector")
  1265.             end
  1266.         end
  1267.     end)
  1268.     Connect(insGet(uis,"TouchEnded"),function(inputObject)
  1269.         if inputObject==thumbstickInputObject then
  1270.             thumbstickInputObject=nil
  1271.             isWalking=false
  1272.         elseif inputObject==jumpInputObject then
  1273.             jumpInputObject=nil
  1274.             jumpingInput=false
  1275.         elseif inputObject==cameraRotateInputObject then
  1276.             cameraRotateInputObject=nil
  1277.             cameraZoomInputObject=nil
  1278.         elseif inputObject==cameraZoomInputObject then
  1279.             cameraZoomInputObject=nil
  1280.         end
  1281.     end)
  1282.  
  1283.     local function refreshTouchRegions()
  1284.         local sX=insGet(mouse,"ViewSizeX")
  1285.         local sY=insGet(mouse,"ViewSizeY")
  1286.         local isSmallScreen=min(sX,sY)<=500
  1287.  
  1288.         sY=sY+insGet(gs,"TopbarInset").Height
  1289.  
  1290.         thumbstickEndX=sX*0.4
  1291.         thumbstickStartY=(sY+0)*0.333
  1292.  
  1293.         if isSmallScreen then
  1294.             thumbstickSizeMultiplier=35
  1295.             jumpStartX=sX-95
  1296.             jumpStartY=sY-90
  1297.             jumpEndX=jumpStartX+70
  1298.             jumpEndY=jumpStartY+70
  1299.         else
  1300.             thumbstickSizeMultiplier=60
  1301.             jumpStartX=sX-170
  1302.             jumpStartY=sY-210
  1303.             jumpEndX=jumpStartX+120
  1304.             jumpEndY=jumpStartY+120
  1305.         end
  1306.     end
  1307.     Connect(GetPropertyChangedSignal(mouse,"ViewSizeX"),refreshTouchRegions)
  1308.     Connect(GetPropertyChangedSignal(mouse,"ViewSizeY"),refreshTouchRegions)
  1309.     Connect(GetPropertyChangedSignal(gs,"TopbarInset"),refreshTouchRegions)
  1310.     refreshTouchRegions()
  1311.  
  1312.     local mouseCameraMove=false
  1313.     Connect(insGet(uis,"InputChanged"),function(a,b)
  1314.         if b then return end
  1315.         local inputType=insGet(a,"UserInputType")
  1316.         if mouseCameraMove and inputType==enumMM then
  1317.             local rotation=GetMouseDelta(uis)*mradN05
  1318.             camcfLV=cfGet(cfMul(camrot,angles(rotation.Y,rotation.X,0)),"LookVector")
  1319.             camrot=cfl(v3_0,camcfLV)
  1320.             camcfRV=cfGet(camrot,"RightVector")
  1321.         elseif inputType==enumMW then
  1322.             cammag=cammag+v3Get(insGet(a,"Position"),"Z")*(0.75-cammag/4)
  1323.             if cammag<0 then
  1324.                 firstperson=false
  1325.             else
  1326.                 cammag=0
  1327.                 firstperson=true
  1328.             end
  1329.         end
  1330.     end)
  1331.  
  1332.     local function predictionfling(target)
  1333.         if not c then
  1334.             return false
  1335.         end
  1336.         if typeof(target)~="Instance" then
  1337.             target=insGet(mouse,"Target")
  1338.             if not target then
  1339.                 return false
  1340.             end
  1341.         end
  1342.         if not IsDescendantOf(target,ws) then
  1343.             return false
  1344.         end
  1345.         if IsA(target,"Humanoid") or IsA(target,"BasePart") then
  1346.             target=insGet(target,"Parent")
  1347.             if IsA(target,"Accessory") then
  1348.                 target=insGet(target,"Parent")
  1349.             end
  1350.         end
  1351.         if (target==c) or (not IsA(target,"Model")) then
  1352.             return false
  1353.         end
  1354.         local targetpart=gp(target,"HumanoidRootPart","BasePart") or gp(target,"Torso","BasePart") or gp(target,"UpperTorso","BasePart")
  1355.         if (not targetpart) or (flingtable[targetpart]~=nil) then
  1356.             return false
  1357.         end
  1358.         if highlightflingtargets then
  1359.             local h=i("Highlight")
  1360.             insSet(h,"Name",rs())
  1361.             insSet(h,"Adornee",target)
  1362.             insSet(h,"FillColor",c3(1,0,0))
  1363.             insSet(h,"OutlineColor",c3(1,0,0))
  1364.             insSet(h,"FillTransparency",0.5)
  1365.             insSet(h,"OutlineTransparency",0)
  1366.             insSet(h,"Parent",i10)
  1367.             flingtable[targetpart]=h
  1368.         else
  1369.             flingtable[targetpart]=false
  1370.         end
  1371.         return true
  1372.     end
  1373.  
  1374.     local clickConnection=nil
  1375.     if ctrlclicktp then
  1376.         ctrlclicktp=KeyCode.LeftControl
  1377.         local tpoff=v3_010*3
  1378.         if clickfling then
  1379.             clickConnection=Connect(insGet(mouse,"Button1Down"),function()
  1380.                 if insGet(mouse,"Target") then
  1381.                     if IsKeyDown(uis,ctrlclicktp) then
  1382.                         pos=cfGet(insGet(mouse,"Hit"),"Position")+tpoff
  1383.                         cfr=cfl(pos,pos+camcfLV*v3_101)
  1384.                         xzvel=v3_0
  1385.                         Yvel=0
  1386.                     else
  1387.                         predictionfling()
  1388.                     end
  1389.                 end
  1390.             end)
  1391.         else
  1392.             clickConnection=Connect(insGet(mouse,"Button1Down"),function()
  1393.                 if insGet(mouse,"Target") and IsKeyDown(uis,ctrlclicktp) then
  1394.                     pos=cfGet(insGet(mouse,"Hit"),"Position")+tpoff
  1395.                     cfr=cfl(pos,pos+camcfLV*v3_101)
  1396.                     xzvel=v3_0
  1397.                     Yvel=0
  1398.                 end
  1399.             end)
  1400.         end
  1401.     elseif clickfling then
  1402.         clickConnection=Connect(insGet(mouse,"Button1Down"),predictionfling)
  1403.     end
  1404.  
  1405.     local noYvelTime=1
  1406.     local lastsine=sine
  1407.     local con=nil
  1408.     local function mainFunction()
  1409.         if not c then
  1410.             for i,v in next,cframes do
  1411.                 local p=i.v
  1412.                 if p then
  1413.                     Destroy(p)
  1414.                 end
  1415.             end
  1416.             for i,v in next,flingtable do
  1417.                 if v then --it could be false
  1418.                     Destroy(v)
  1419.                 end
  1420.             end
  1421.             for i,v in next,charcons do
  1422.                 Disconnect(v)
  1423.             end
  1424.             if clickConnection then
  1425.                 Disconnect(clickConnection)
  1426.             end
  1427.             mouseBehavior=nil
  1428.             insSet(uis,"MouseBehavior",enumMD)
  1429.             onnewcamera()
  1430.             local c=insGet(lp,"Character")
  1431.             if c then
  1432.                 insSet(cam,"CameraSubject",FindFirstChildOfClass(c,"Humanoid"))
  1433.             end
  1434.             return con and Disconnect(con)
  1435.         end
  1436.  
  1437.         sine=osclock()
  1438.         local delta=sine-lastsine
  1439.         deltaTime=min(delta*10,1)
  1440.         lastsine=sine
  1441.  
  1442.         if shiftlock then
  1443.             if allowshiftlock then
  1444.                 mouseBehavior=enumMLC
  1445.                 mouseCameraMove=true
  1446.             else
  1447.                 shiftlock=false
  1448.             end
  1449.         elseif firstperson then
  1450.             mouseBehavior=enumMLC
  1451.             mouseCameraMove=true
  1452.         elseif IsMouseButtonPressed(uis,enumMB2) then
  1453.             mouseBehavior=enumMLCP
  1454.             mouseCameraMove=true
  1455.         else
  1456.             mouseBehavior=enumMD
  1457.             mouseCameraMove=false
  1458.         end
  1459.         if lastMouseBehavior~=mouseBehavior then
  1460.             lastMouseBehavior=mouseBehavior
  1461.             insSet(uis,"MouseBehavior",mouseBehavior)
  1462.         end
  1463.  
  1464.         local raycastresult=Raycast(ws,pos,v3_010*(fpdh-v3Get(pos,"Y")),raycastparams)
  1465.         local onground=nil
  1466.         if raycastresult then
  1467.             raycastresult=v3Get(raycastresult.Position,"Y")
  1468.             onground=v3Get(pos,"Y")-raycastresult<3.01
  1469.             if onground then
  1470.                 Yvel=0
  1471.                 pos=pos+v3_010*(raycastresult+3-v3Get(pos,"Y"))*min(delta*20,1)
  1472.                 if jumpingInput and (jumpPower>0) then
  1473.                     Yvel=jumpPower
  1474.                     onground=false
  1475.                 end
  1476.             else
  1477.                 Yvel=Yvel-gravity*delta
  1478.                 if v3Get(pos,"Y")+Yvel*delta<raycastresult then
  1479.                     Yvel=0
  1480.                     pos=pos+v3_010*(raycastresult+3-v3Get(pos,"Y"))
  1481.                 end
  1482.             end
  1483.         else
  1484.             Yvel=0
  1485.             onground=false
  1486.         end
  1487.  
  1488.         if firstperson then
  1489.             if isWalking then
  1490.                 if walkSpeed==0 then
  1491.                     xzvel=v3_0
  1492.                     if onground then
  1493.                         cfr=cfl(pos,pos+camcfLV*v3_101)
  1494.                         camcf=cfAdd(camrot,pos+v3_0150)
  1495.                         cframes[rootpart]=cfr
  1496.                         insSet(cam,"CFrame",camcf)
  1497.                         lerpsIdle()
  1498.                         noYvelTime=min(noYvelTime+delta*0.3,1)
  1499.                         xzvel=xzvel*(1-noYvelTime)
  1500.                     elseif Yvel>0 then
  1501.                         pos=pos+v3_010*Yvel*delta
  1502.                         cfr=cfl(pos,pos+camcfLV*v3_101)
  1503.                         camcf=cfAdd(camrot,pos+v3_0150)
  1504.                         cframes[rootpart]=cfr
  1505.                         insSet(cam,"CFrame",camcf)
  1506.                         lerpsJump()
  1507.                         noYvelTime=0
  1508.                     else
  1509.                         pos=pos+v3_010*Yvel*delta
  1510.                         cfr=cfl(pos,pos+camcfLV*v3_101)
  1511.                         camcf=cfAdd(camrot,pos+v3_0150)
  1512.                         cframes[rootpart]=cfr
  1513.                         insSet(cam,"CFrame",camcf)
  1514.                         lerpsFall()
  1515.                         noYvelTime=0
  1516.                     end
  1517.                 else
  1518.                     xzvel=v3Get(v3Get(camcfLV*v3_101,"Unit")*FWmovement+v3Get(camcfRV*v3_101,"Unit")*RTmovement,"Unit")*walkSpeed
  1519.                     if onground then
  1520.                         pos=pos+xzvel*delta
  1521.                         cfr=cfl(pos,pos+camcfLV*v3_101)
  1522.                         camcf=cfAdd(camrot,pos+v3_0150)
  1523.                         cframes[rootpart]=cfr
  1524.                         insSet(cam,"CFrame",camcf)
  1525.                         lerpsWalk()
  1526.                         noYvelTime=min(noYvelTime+delta*0.3,1)
  1527.                         xzvel=xzvel*(1-noYvelTime)
  1528.                     elseif Yvel>0 then
  1529.                         pos=pos+(xzvel+v3_010*Yvel)*delta
  1530.                         cfr=cfl(pos,pos+camcfLV*v3_101)
  1531.                         camcf=cfAdd(camrot,pos+v3_0150)
  1532.                         cframes[rootpart]=cfr
  1533.                         insSet(cam,"CFrame",camcf)
  1534.                         lerpsJump()
  1535.                         noYvelTime=0
  1536.                     else
  1537.                         pos=pos+(xzvel+v3_010*Yvel)*delta
  1538.                         cfr=cfl(pos,pos+camcfLV*v3_101)
  1539.                         camcf=cfAdd(camrot,pos+v3_0150)
  1540.                         cframes[rootpart]=cfr
  1541.                         insSet(cam,"CFrame",camcf)
  1542.                         lerpsFall()
  1543.                         noYvelTime=0
  1544.                     end
  1545.                 end
  1546.             else
  1547.                 xzvel=v3_0
  1548.                 if onground then
  1549.                     cfr=cfl(pos,pos+camcfLV*v3_101)
  1550.                     camcf=cfAdd(camrot,pos+v3_0150)
  1551.                     cframes[rootpart]=cfr
  1552.                     insSet(cam,"CFrame",camcf)
  1553.                     lerpsIdle()
  1554.                     noYvelTime=min(noYvelTime+delta*0.3,1)
  1555.                     xzvel=xzvel*(1-noYvelTime)
  1556.                 elseif Yvel>0 then
  1557.                     pos=pos+v3_010*Yvel*delta
  1558.                     cfr=cfl(pos,pos+camcfLV*v3_101)
  1559.                     camcf=cfAdd(camrot,pos+v3_0150)
  1560.                     cframes[rootpart]=cfr
  1561.                     insSet(cam,"CFrame",camcf)
  1562.                     lerpsJump()
  1563.                     noYvelTime=0
  1564.                 else
  1565.                     pos=pos+v3_010*Yvel*delta
  1566.                     cfr=cfl(pos,pos+camcfLV*v3_101)
  1567.                     camcf=cfAdd(camrot,pos+v3_0150)
  1568.                     cframes[rootpart]=cfr
  1569.                     insSet(cam,"CFrame",camcf)
  1570.                     lerpsFall()
  1571.                     noYvelTime=0
  1572.                 end
  1573.             end
  1574.         elseif shiftlock then  
  1575.             if isWalking then
  1576.                 if walkSpeed==0 then
  1577.                     xzvel=v3_0
  1578.                     if onground then
  1579.                         cfr=cfl(pos,pos+camcfLV*v3_101)
  1580.                         camcf=cfAdd(camrot,pos+v3_0150+camcfRV*1.75+camcfLV*cammag)
  1581.                         cframes[rootpart]=cfr
  1582.                         insSet(cam,"CFrame",camcf)
  1583.                         lerpsIdle()
  1584.                         noYvelTime=min(noYvelTime+delta*0.3,1)
  1585.                         xzvel=xzvel*(1-noYvelTime)
  1586.                     elseif Yvel>0 then
  1587.                         pos=pos+v3_010*Yvel*delta
  1588.                         cfr=cfl(pos,pos+camcfLV*v3_101)
  1589.                         camcf=cfAdd(camrot,pos+v3_0150+camcfRV*1.75+camcfLV*cammag)
  1590.                         cframes[rootpart]=cfr
  1591.                         insSet(cam,"CFrame",camcf)
  1592.                         lerpsJump()
  1593.                         noYvelTime=0
  1594.                     else
  1595.                         pos=pos+v3_010*Yvel*delta
  1596.                         cfr=cfl(pos,pos+camcfLV*v3_101)
  1597.                         camcf=cfAdd(camrot,pos+v3_0150+camcfRV*1.75+camcfLV*cammag)
  1598.                         cframes[rootpart]=cfr
  1599.                         insSet(cam,"CFrame",camcf)
  1600.                         lerpsFall()
  1601.                         noYvelTime=0
  1602.                     end
  1603.                 else
  1604.                     xzvel=v3Get(v3Get(camcfLV*v3_101,"Unit")*FWmovement+v3Get(camcfRV*v3_101,"Unit")*RTmovement,"Unit")*walkSpeed
  1605.                     if onground then
  1606.                         pos=pos+xzvel*delta
  1607.                         cfr=cfl(pos,pos+camcfLV*v3_101)
  1608.                         camcf=cfAdd(camrot,pos+v3_0150+camcfRV*1.75+camcfLV*cammag)
  1609.                         cframes[rootpart]=cfr
  1610.                         insSet(cam,"CFrame",camcf)
  1611.                         lerpsWalk()
  1612.                         noYvelTime=min(noYvelTime+delta*0.3,1)
  1613.                         xzvel=xzvel*(1-noYvelTime)
  1614.                     elseif Yvel>0 then
  1615.                         pos=pos+(xzvel+v3_010*Yvel)*delta
  1616.                         cfr=cfl(pos,pos+camcfLV*v3_101)
  1617.                         camcf=cfAdd(camrot,pos+v3_0150+camcfRV*1.75+camcfLV*cammag)
  1618.                         cframes[rootpart]=cfr
  1619.                         insSet(cam,"CFrame",camcf)
  1620.                         lerpsJump()
  1621.                         noYvelTime=0
  1622.                     else
  1623.                         pos=pos+(xzvel+v3_010*Yvel)*delta
  1624.                         cfr=cfl(pos,pos+camcfLV*v3_101)
  1625.                         camcf=cfAdd(camrot,pos+v3_0150+camcfRV*1.75+camcfLV*cammag)
  1626.                         cframes[rootpart]=cfr
  1627.                         insSet(cam,"CFrame",camcf)
  1628.                         lerpsFall()
  1629.                         noYvelTime=0
  1630.                     end
  1631.                 end
  1632.             else
  1633.                 xzvel=v3_0
  1634.                 if onground then
  1635.                     cfr=cfl(pos,pos+camcfLV*v3_101)
  1636.                     camcf=cfAdd(camrot,pos+v3_0150+camcfRV*1.75+camcfLV*cammag)
  1637.                     cframes[rootpart]=cfr
  1638.                     insSet(cam,"CFrame",camcf)
  1639.                     lerpsIdle()
  1640.                     noYvelTime=min(noYvelTime+delta*0.3,1)
  1641.                     xzvel=xzvel*(1-noYvelTime)
  1642.                 elseif Yvel>0 then
  1643.                     pos=pos+v3_010*Yvel*delta
  1644.                     cfr=cfl(pos,pos+camcfLV*v3_101)
  1645.                     camcf=cfAdd(camrot,pos+v3_0150+camcfRV*1.75+camcfLV*cammag)
  1646.                     cframes[rootpart]=cfr
  1647.                     insSet(cam,"CFrame",camcf)
  1648.                     lerpsJump()
  1649.                     noYvelTime=0
  1650.                 else
  1651.                     pos=pos+v3_010*Yvel*delta
  1652.                     cfr=cfl(pos,pos+camcfLV*v3_101)
  1653.                     camcf=cfAdd(camrot,pos+v3_0150+camcfRV*1.75+camcfLV*cammag)
  1654.                     cframes[rootpart]=cfr
  1655.                     insSet(cam,"CFrame",camcf)
  1656.                     lerpsFall()
  1657.                     noYvelTime=0
  1658.                 end
  1659.             end
  1660.         else
  1661.             if isWalking then
  1662.                 if walkSpeed==0 then
  1663.                     xzvel=v3_0
  1664.                     if onground then
  1665.                         cfr=cfAdd(cfGet(cfr,"Rotation"),pos)
  1666.                         camcf=cfAdd(camrot,pos+v3_0150+camcfLV*cammag)
  1667.                         cframes[rootpart]=cfr
  1668.                         insSet(cam,"CFrame",camcf)
  1669.                         lerpsIdle()
  1670.                         noYvelTime=min(noYvelTime+delta*0.3,1)
  1671.                         xzvel=xzvel*(1-noYvelTime)
  1672.                     elseif Yvel>0 then
  1673.                         pos=pos+v3_010*Yvel*delta
  1674.                         cfr=cfAdd(cfGet(cfr,"Rotation"),pos)
  1675.                         camcf=cfAdd(camrot,pos+v3_0150+camcfLV*cammag)
  1676.                         cframes[rootpart]=cfr
  1677.                         insSet(cam,"CFrame",camcf)
  1678.                         lerpsJump()
  1679.                         noYvelTime=0
  1680.                     else
  1681.                         pos=pos+v3_010*Yvel*delta
  1682.                         cfr=cfAdd(cfGet(cfr,"Rotation"),pos)
  1683.                         camcf=cfAdd(camrot,pos+v3_0150+camcfLV*cammag)
  1684.                         cframes[rootpart]=cfr
  1685.                         insSet(cam,"CFrame",camcf)
  1686.                         lerpsFall()
  1687.                         noYvelTime=0
  1688.                     end
  1689.                 else
  1690.                     xzvel=v3Get(v3Get(camcfLV*v3_101,"Unit")*FWmovement+v3Get(camcfRV*v3_101,"Unit")*RTmovement,"Unit")*walkSpeed
  1691.                     if onground then
  1692.                         pos=pos+xzvel*delta
  1693.                         cfr=cfAdd(Lerp(cfGet(cfr,"Rotation"),cfl(v3_0,xzvel),deltaTime),pos)
  1694.                         camcf=cfAdd(camrot,pos+v3_0150+camcfLV*cammag)
  1695.                         cframes[rootpart]=cfr
  1696.                         insSet(cam,"CFrame",camcf)
  1697.                         lerpsWalk()
  1698.                         noYvelTime=min(noYvelTime+delta*0.3,1)
  1699.                         xzvel=xzvel*(1-noYvelTime)
  1700.                     elseif Yvel>0 then
  1701.                         pos=pos+(xzvel+(v3_010*Yvel))*delta
  1702.                         cfr=cfAdd(Lerp(cfGet(cfr,"Rotation"),cfl(v3_0,xzvel),deltaTime),pos)
  1703.                         camcf=cfAdd(camrot,pos+v3_0150+camcfLV*cammag)
  1704.                         cframes[rootpart]=cfr
  1705.                         insSet(cam,"CFrame",camcf)
  1706.                         lerpsJump()
  1707.                         noYvelTime=0
  1708.                     else
  1709.                         pos=pos+(xzvel+(v3_010*Yvel))*delta
  1710.                         cfr=cfAdd(Lerp(cfGet(cfr,"Rotation"),cfl(v3_0,xzvel),deltaTime),pos)
  1711.                         camcf=cfAdd(camrot,pos+v3_0150+camcfLV*cammag)
  1712.                         cframes[rootpart]=cfr
  1713.                         insSet(cam,"CFrame",camcf)
  1714.                         lerpsFall()
  1715.                         noYvelTime=0
  1716.                     end
  1717.                 end
  1718.             else
  1719.                 xzvel=v3_0
  1720.                 if onground then
  1721.                     cfr=cfAdd(cfGet(cfr,"Rotation"),pos)
  1722.                     camcf=cfAdd(camrot,pos+v3_0150+camcfLV*cammag)
  1723.                     cframes[rootpart]=cfr
  1724.                     insSet(cam,"CFrame",camcf)
  1725.                     lerpsIdle()
  1726.                     noYvelTime=min(noYvelTime+delta*0.3,1)
  1727.                     xzvel=xzvel*(1-noYvelTime)
  1728.                 elseif Yvel>0 then
  1729.                     pos=pos+v3_010*Yvel*delta
  1730.                     cfr=cfAdd(cfGet(cfr,"Rotation"),pos)
  1731.                     camcf=cfAdd(camrot,pos+v3_0150+camcfLV*cammag)
  1732.                     cframes[rootpart]=cfr
  1733.                     insSet(cam,"CFrame",camcf)
  1734.                     lerpsJump()
  1735.                     noYvelTime=0
  1736.                 else
  1737.                     pos=pos+v3_010*Yvel*delta
  1738.                     cfr=cfAdd(cfGet(cfr,"Rotation"),pos)
  1739.                     camcf=cfAdd(camrot,pos+v3_0150+camcfLV*cammag)
  1740.                     cframes[rootpart]=cfr
  1741.                     insSet(cam,"CFrame",camcf)
  1742.                     lerpsFall()
  1743.                     noYvelTime=0
  1744.                 end
  1745.             end
  1746.         end
  1747.  
  1748.         refreshjointsI(rootpart)
  1749.         tclear(refreshedjoints)
  1750.  
  1751.         local idlerv=v3(sin((sine-0.0375)*16),sin(sine*16),sin((sine+0.075)*16))
  1752.         local idleoff=idlerv*0.0015
  1753.  
  1754.         local claimpos=insGet(primarypart,"Position")
  1755.         local claimposY=v3Get(claimpos,"Y")
  1756.         for i,v in next,cframes do
  1757.             local part=i.p
  1758.            
  1759.             if part then
  1760.                 if insGet(part,"ReceiveAge")==0 then
  1761.                     local placeholder=i.v
  1762.                     if novoid and (cfGet(v,"Y")<novoid) then
  1763.                         v=cfAdd(v,v3_010*(novoid-cfGet(v,"Y")))
  1764.                     end
  1765.                     local lastpos=i.l
  1766.                     local vel=(cfGet(v,"Position")-lastpos)/delta
  1767.                     local mag=v3Get(vel,"Magnitude")
  1768.                     if mag<0.15 then
  1769.                         if placeholder then
  1770.                             insSet(placeholder,"Parent",nil)
  1771.                         end
  1772.                         i.l=cfGet(v,"Position")
  1773.                         v=cfAdd(v,idleoff)
  1774.                     elseif mag>speedlimit then
  1775.                         if placeholder then
  1776.                             insSet(placeholder,"CFrame",v)
  1777.                             insSet(placeholder,"Parent",ws)
  1778.                         end
  1779.                         vel=v3Get(vel,"Unit")*speedlimit
  1780.                         local newpos=lastpos+vel*delta
  1781.                         v=cfAdd(cfGet(v,"Rotation"),newpos)
  1782.                         i.l=newpos
  1783.                     elseif placeholder then
  1784.                         insSet(placeholder,"Parent",nil)
  1785.                         i.l=cfGet(v,"Position")
  1786.                     end
  1787.                     local claimtime=i.c
  1788.                     if claimtime then
  1789.                         if sine-claimtime<retVelTime then
  1790.                             local Ydiff=cfGet(v,"Y")-claimposY
  1791.                             local velY=25.01
  1792.                             local fallingTime=0
  1793.                             while (Ydiff>0) or (velY>0) do
  1794.                                 fallingTime=fallingTime+0.025
  1795.                                 if fallingTime>0.6 then
  1796.                                     break
  1797.                                 end
  1798.                                 velY=velY-velYdelta
  1799.                                 Ydiff=Ydiff+(velY*0.025)
  1800.                             end
  1801.                             insSet(part,"AssemblyLinearVelocity",(claimpos-cfGet(v,"Position"))*v3_101/fallingTime+v3_net)
  1802.                         else
  1803.                             insSet(part,"AssemblyLinearVelocity",getNetlessVelocity(vel*noYvelTime+xzvel))
  1804.                         end
  1805.                     else
  1806.                         i.c=sine
  1807.                         insSet(part,"AssemblyLinearVelocity",getNetlessVelocity(vel*noYvelTime+xzvel))
  1808.                     end
  1809.                     insSet(part,"CFrame",v)
  1810.                     insSet(part,"AssemblyAngularVelocity",idlerv)
  1811.                 else
  1812.                     i.c=nil
  1813.                     i.l=insGet(part,"Position")
  1814.                     local placeholder=i.v
  1815.                     if placeholder then
  1816.                         insSet(placeholder,"CFrame",v)
  1817.                         insSet(placeholder,"Parent",ws)
  1818.                     end
  1819.                 end
  1820.             else
  1821.                 local placeholder=i.v
  1822.                 if placeholder then
  1823.                     insSet(placeholder,"CFrame",v)
  1824.                     insSet(placeholder,"Parent",ws)
  1825.                 end
  1826.             end
  1827.         end
  1828.         setsimrad()
  1829.     end
  1830.  
  1831.     sine=osclock()
  1832.     lastsine=sine
  1833.     con=Connect(heartbeat,mainFunction)
  1834.     mainFunction()
  1835.  
  1836.     local function refreshjoints(v) --use this on the main part if u have parts that
  1837.         refreshjointsI(v) --are connected with each other but arent connected to rootpart
  1838.         tclear(refreshedjoints)
  1839.     end
  1840.  
  1841.     local legcfR=cf(1,-1,0)
  1842.     local legcfL=cf(-1,-1,0)
  1843.     local raydir=v3_010*-2
  1844.     local function raycastlegs() --this returns 2 values: right leg raycast offset, left leg raycast offset
  1845.         local rY=Raycast(ws,cfGet(cfMul(cfr,legcfR),"Position"),raydir,raycastparams)
  1846.         local lY=Raycast(ws,cfGet(cfMul(cfr,legcfL),"Position"),raydir,raycastparams)
  1847.         return rY and (v3Get(rY.Position,"Y")-(v3Get(pos,"Y")-3)) or 0,lY and (v3Get(lY.Position,"Y")-(v3Get(pos,"Y")-3)) or 0
  1848.     end
  1849.  
  1850.     local function velbycfrvec() --this returns 2 values: forward/backwards movement (from -1 to 1), right/left movement (from -1 to 1)
  1851.         local fw=cfGet(cfr,"LookVector")*xzvel/walkSpeed
  1852.         local rt=cfGet(cfr,"RightVector")*xzvel/walkSpeed
  1853.         return v3Get(fw,"X")+v3Get(fw,"Z"),v3Get(rt,"X")+v3Get(rt,"Z")
  1854.     end
  1855.  
  1856.     local lastvel=v3_0
  1857.     local velchg1=v3_0
  1858.     local function velchgbycfrvec() --this returns 2 values: forward/backwards velocity change, right/left velocity change
  1859.         velchg1=velchg1+(lastvel-xzvel) --i recommend setting velchg1 to v3_0 when u start using this function or it will look worse
  1860.         lastvel=xzvel
  1861.         velchg1=velchg1-velchg1*(deltaTime/2)
  1862.         local fw=cfGet(cfr,"LookVector")*velchg1/32
  1863.         local rt=cfGet(cfr,"RightVector")*velchg1/32
  1864.         return v3Get(fw,"X")+v3Get(fw,"Z"),v3Get(rt,"X")+v3Get(rt,"Z")
  1865.     end
  1866.  
  1867.     local lastYvel=0
  1868.     local velYchg1=0
  1869.     local function velYchg() --this returns Y axis velocity change
  1870.         velYchg1=clamp(velYchg1+(lastYvel-Yvel),-50,50) --i recommend setting velYchg1 to 0 when u start using this function or it will look worse
  1871.         lastYvel=Yvel
  1872.         velYchg1=velYchg1-velYchg1*(deltaTime/2)
  1873.         return velYchg1
  1874.     end
  1875.  
  1876.     local function rotToMouse(alpha) --this rotates ur character towards your mouse hit position
  1877.         cfr=Lerp(cfr,cfl(pos,pos*v3_010+cfGet(insGet(mouse,"Hit"),"Position")*v3_101),alpha or deltaTime)
  1878.     end
  1879.  
  1880.     local function glitchJoint(joint,targetGlitchTime,delayFrom,delayTo,radiansFrom,radiansTo)
  1881.         if sine>targetGlitchTime then --local glitchtime=0 addMode("x",{idle=function() glitchtime=glitchJoint(joint,glitchtime,0.2,0.4,-0.1,0.1) end})
  1882.             radiansFrom=radiansFrom*100
  1883.             radiansTo=radiansTo*100
  1884.             joint.C0=cfMul(joint.C0,angles(mrandom(radiansFrom,radiansTo)/100,mrandom(radiansFrom,radiansTo)/100,mrandom(radiansFrom,radiansTo)/100))
  1885.             return sine+mrandom(delayFrom*100,delayTo*100)/100
  1886.         end
  1887.         return targetGlitchTime
  1888.     end
  1889.  
  1890.     local function setWalkSpeed(n)
  1891.         if type(n)~="number" then
  1892.             n=16
  1893.         end
  1894.         walkSpeed=n
  1895.     end
  1896.     local function setJumpPower(n)
  1897.         if type(n)~="number" then
  1898.             n=50
  1899.         end
  1900.         jumpPower=n
  1901.     end
  1902.     local function setGravity(n)
  1903.         if type(n)~="number" then
  1904.             n=196.2
  1905.         end
  1906.         gravity=n
  1907.     end
  1908.     local function setCfr(v) --sets character cframe
  1909.         if typeof(v)=="CFrame" then
  1910.             local newpos=cfGet(v,"Position")
  1911.             camcf=cfAdd(camcf,newpos-pos)
  1912.             insSet(cam,"CFrame",camcf)
  1913.             cfr=v
  1914.             pos=newpos
  1915.         elseif typeof(v)=="Vector3" then
  1916.             camcf=cfAdd(camcf,v-pos)
  1917.             insSet(cam,"CFrame",camcf)
  1918.             cfr=cfAdd(cfGet(cfr,"Rotation"),v)
  1919.             pos=v
  1920.         end
  1921.     end
  1922.     local function getVel() --returns character velocity
  1923.         return xzvel+v3_010*Yvel --important: use only in lerps or it might not work
  1924.     end
  1925.     local function getCamCF() --returns camera cframe
  1926.         return camcf
  1927.     end
  1928.     local function isFirstPerson() --returns true if user is in first person camera mode
  1929.         return firstperson
  1930.     end
  1931.  
  1932.     return {
  1933.         cframes=cframes,
  1934.         joints=joints,
  1935.         fling=predictionfling,
  1936.         predictionfling=predictionfling,
  1937.         refreshjoints=refreshjoints,
  1938.         raycastlegs=raycastlegs,
  1939.         velbycfrvec=velbycfrvec,
  1940.         velchgbycfrvec=velchgbycfrvec,
  1941.         velYchg=velYchg,
  1942.         addmode=addmode,
  1943.         getPart=getPart,
  1944.         getPartFromMesh=getPartFromMesh,
  1945.         getAccWeldFromMesh=getAccWeldFromMesh,
  1946.         getJoint=getJoint,
  1947.         getPartJoint=getPartJoint,
  1948.         rotToMouse=rotToMouse,
  1949.         glitchJoint=glitchJoint,
  1950.         setWalkSpeed=setWalkSpeed,
  1951.         setJumpPower=setJumpPower,
  1952.         setGravity=setGravity,
  1953.         setCfr=setCfr,
  1954.         getVel=getVel,
  1955.         getCamCF=getCamCF,
  1956.         isFirstPerson=isFirstPerson
  1957.     }
  1958. end
  1959.  
  1960. btn("SCP 096", function()
  1961.     local t=reanimate()
  1962.     if type(t)~="table" then return end
  1963.     local raycastlegs=t.raycastlegs
  1964.     local velbycfrvec=t.velbycfrvec
  1965.     local addmode=t.addmode
  1966.     local getJoint=t.getJoint
  1967.     local getPartFromMesh=t.getPartFromMesh
  1968.     local getPartJoint=t.getPartJoint
  1969.     local velYchg=t.velYchg
  1970.     local setWalkSpeed=t.setWalkSpeed
  1971.     local RootJoint=getJoint("RootJoint")
  1972.     local RightShoulder=getJoint("Right Shoulder")
  1973.     local LeftShoulder=getJoint("Left Shoulder")
  1974.     local RightHip=getJoint("Right Hip")
  1975.     local LeftHip=getJoint("Left Hip")
  1976.     local Neck=getJoint("Neck")
  1977.  
  1978.  
  1979.     addmode("default", {
  1980.         idle = function()
  1981.             local rY, lY = raycastlegs()
  1982.  
  1983.             local Ychg=velYchg()/20
  1984.  
  1985.  
  1986. Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966,0,3.141592653589793)),deltaTime)
  1987. RightHip.C0=Lerp(RightHip.C0,cfMul(cf(0.6,0.2-0.2*sin(sine*5),-2),angles(0.4363323129985824-0.08726646259971647*sin(sine*5),3.141592653589793,-0.17453292519943295)),deltaTime)
  1988. LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,1,0),angles(-0.5235987755982988,-2.9670597283903604,-2.0943951023931953-0.17453292519943295*sin(sine*5))),deltaTime)
  1989. RootJoint.C0=Lerp(RootJoint.C0,cfMul(cf(0,-1,0),angles(-1.7453292519943295+0.08726646259971647*sin(sine*5),0,3.141592653589793)),deltaTime)
  1990. RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1.2,1,0),angles(-0.5235987755982988,2.9670597283903604,2.0943951023931953+0.17453292519943295*sin(sine*5))),deltaTime)
  1991. LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-0.6,0.2-0.2*sin(sine*5),-2),angles(0.4363323129985824-0.08726646259971647*sin(sine*5),3.141592653589793,0.17453292519943295)),deltaTime)
  1992.  
  1993. end,
  1994.         walk = function()
  1995.             local Vfw, Vrt = velbycfrvec()
  1996.  
  1997.             local rY, lY = raycastlegs()
  1998.  
  1999.             local Ychg=velYchg()/20
  2000.  
  2001.  
  2002. RootJoint.C0=Lerp(RootJoint.C0,cfMul(cf(0,2+0.05*sin(sine*5),0),angles(-1.7453292519943295,0,3.141592653589793)),deltaTime)
  2003. Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966,0,3.141592653589793)),deltaTime)
  2004. RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-3,1 * sin(sine*5)),angles(0,1.5707963267948966,-0.2617993877991494*sin(sine*5))),deltaTime)
  2005. LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,-0.5,1 * sin(sine*5)),angles(0,-1.5707963267948966,0.2617993877991494*sin(sine*5))),deltaTime)
  2006. LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-3,-1 * sin(sine*5)),angles(0,-1.5707963267948966,-0.2617993877991494*sin(sine*5))),deltaTime)
  2007. RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,-0.5,-1 * sin(sine*5)),angles(0,1.5707963267948966,0.2617993877991494*sin(sine*5))),deltaTime)
  2008. end,
  2009.         jump = function()
  2010.             velYchg()
  2011.             local Vfw, Vrt = velbycfrvec()
  2012.  
  2013. RootJoint.C0=Lerp(RootJoint.C0,cfMul(cf(0,2+0.05*sin(sine*5),0),angles(-1.7453292519943295,0,3.141592653589793)),deltaTime)
  2014. Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966,0,3.141592653589793)),deltaTime)
  2015. RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-3,1 * sin(sine*5)),angles(0,1.5707963267948966,-0.2617993877991494*sin(sine*5))),deltaTime)
  2016. LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,-0.5,1 * sin(sine*5)),angles(0,-1.5707963267948966,0.2617993877991494*sin(sine*5))),deltaTime)
  2017. LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-3,-1 * sin(sine*5)),angles(0,-1.5707963267948966,-0.2617993877991494*sin(sine*5))),deltaTime)
  2018. RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,-0.5,-1 * sin(sine*5)),angles(0,1.5707963267948966,0.2617993877991494*sin(sine*5))),deltaTime)
  2019. end,
  2020.         fall = function()
  2021.             velYchg()
  2022.             local Vfw, Vrt = velbycfrvec()
  2023.  
  2024. RootJoint.C0=Lerp(RootJoint.C0,cfMul(cf(0,2+0.05*sin(sine*5),0),angles(-1.7453292519943295,0,3.141592653589793)),deltaTime)
  2025. Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966,0,3.141592653589793)),deltaTime)
  2026. RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-3,1 * sin(sine*5)),angles(0,1.5707963267948966,-0.2617993877991494*sin(sine*5))),deltaTime)
  2027. LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,-0.5,1 * sin(sine*5)),angles(0,-1.5707963267948966,0.2617993877991494*sin(sine*5))),deltaTime)
  2028. LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-3,-1 * sin(sine*5)),angles(0,-1.5707963267948966,-0.2617993877991494*sin(sine*5))),deltaTime)
  2029. RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,-0.5,-1 * sin(sine*5)),angles(0,1.5707963267948966,0.2617993877991494*sin(sine*5))),deltaTime)
  2030. end
  2031.     })
  2032.  
  2033.     addmode(" ", {
  2034.         idle = function()
  2035.             velYchg()
  2036.  
  2037. LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-1,0),angles(0,-1.5707963267948966,0)),deltaTime)
  2038. RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-1,0),angles(0,1.5707963267948966,0)),deltaTime)
  2039. RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,0.5,0),angles(0,1.5707963267948966,0)),deltaTime)
  2040. RootJoint.C0=Lerp(RootJoint.C0,angles(-1.5707963267948966,0,3.141592653589793),deltaTime)
  2041. LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0.5,0),angles(0,-1.5707963267948966,0)),deltaTime)
  2042. Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966,0,3.141592653589793)),deltaTime) end
  2043.     })
  2044.     addmode(" ", {
  2045.         idle = function()
  2046.             velYchg()
  2047.  
  2048. LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-1,0),angles(0,-1.5707963267948966,0)),deltaTime)
  2049. RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-1,0),angles(0,1.5707963267948966,0)),deltaTime)
  2050. RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,0.5,0),angles(0,1.5707963267948966,0)),deltaTime)
  2051. RootJoint.C0=Lerp(RootJoint.C0,angles(-1.5707963267948966,0,3.141592653589793),deltaTime)
  2052. LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0.5,0),angles(0,-1.5707963267948966,0)),deltaTime)
  2053. Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966,0,3.141592653589793)),deltaTime) end
  2054.     })
  2055.     addmode(" ", {
  2056.         idle = function()
  2057.             local Ychg=velYchg()/20
  2058.  
  2059. LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-1,0),angles(0,-1.5707963267948966,0)),deltaTime)
  2060. RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-1,0),angles(0,1.5707963267948966,0)),deltaTime)
  2061. RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,0.5,0),angles(0,1.5707963267948966,0)),deltaTime)
  2062. RootJoint.C0=Lerp(RootJoint.C0,angles(-1.5707963267948966,0,3.141592653589793),deltaTime)
  2063. LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0.5,0),angles(0,-1.5707963267948966,0)),deltaTime)
  2064. Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966,0,3.141592653589793)),deltaTime) end
  2065.     })
  2066.     addmode(" ", {
  2067.         idle = function()
  2068.             local Ychg=velYchg()/20
  2069.  
  2070. LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-1,0),angles(0,-1.5707963267948966,0)),deltaTime)
  2071. RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-1,0),angles(0,1.5707963267948966,0)),deltaTime)
  2072. RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,0.5,0),angles(0,1.5707963267948966,0)),deltaTime)
  2073. RootJoint.C0=Lerp(RootJoint.C0,angles(-1.5707963267948966,0,3.141592653589793),deltaTime)
  2074. LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0.5,0),angles(0,-1.5707963267948966,0)),deltaTime)
  2075. Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966,0,3.141592653589793)),deltaTime) end
  2076.     })
  2077.     addmode(" ", {
  2078.         idle = function()
  2079.             local Ychg=velYchg()/20
  2080.  
  2081. LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-1,0),angles(0,-1.5707963267948966,0)),deltaTime)
  2082. RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-1,0),angles(0,1.5707963267948966,0)),deltaTime)
  2083. RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,0.5,0),angles(0,1.5707963267948966,0)),deltaTime)
  2084. RootJoint.C0=Lerp(RootJoint.C0,angles(-1.5707963267948966,0,3.141592653589793),deltaTime)
  2085. LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0.5,0),angles(0,-1.5707963267948966,0)),deltaTime)
  2086. Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966,0,3.141592653589793)),deltaTime) end
  2087.     })
  2088.     addmode(" ", {
  2089.         idle = function()
  2090.             velYchg()
  2091.  
  2092. LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-1,0),angles(0,-1.5707963267948966,0)),deltaTime)
  2093. RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-1,0),angles(0,1.5707963267948966,0)),deltaTime)
  2094. RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,0.5,0),angles(0,1.5707963267948966,0)),deltaTime)
  2095. RootJoint.C0=Lerp(RootJoint.C0,angles(-1.5707963267948966,0,3.141592653589793),deltaTime)
  2096. LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0.5,0),angles(0,-1.5707963267948966,0)),deltaTime)
  2097. Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966,0,3.141592653589793)),deltaTime) end
  2098.     })
  2099.     addmode(" ", {
  2100.         idle = function()
  2101.  
  2102. LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-1,0),angles(0,-1.5707963267948966,0)),deltaTime)
  2103. RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-1,0),angles(0,1.5707963267948966,0)),deltaTime)
  2104. RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,0.5,0),angles(0,1.5707963267948966,0)),deltaTime)
  2105. RootJoint.C0=Lerp(RootJoint.C0,angles(-1.5707963267948966,0,3.141592653589793),deltaTime)
  2106. LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0.5,0),angles(0,-1.5707963267948966,0)),deltaTime)
  2107. Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966,0,3.141592653589793)),deltaTime) end,
  2108.     })
  2109.     addmode(" ", {
  2110.         idle = function()
  2111.             local Ychg=velYchg()/20
  2112.             local rY, lY = raycastlegs()
  2113.  
  2114.  
  2115. LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-1,0),angles(0,-1.5707963267948966,0)),deltaTime)
  2116. RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-1,0),angles(0,1.5707963267948966,0)),deltaTime)
  2117. RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,0.5,0),angles(0,1.5707963267948966,0)),deltaTime)
  2118. RootJoint.C0=Lerp(RootJoint.C0,angles(-1.5707963267948966,0,3.141592653589793),deltaTime)
  2119. LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0.5,0),angles(0,-1.5707963267948966,0)),deltaTime)
  2120. Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966,0,3.141592653589793)),deltaTime) end,
  2121.         walk = function()
  2122.             local Ychg=velYchg()/20
  2123.             local Vfw, Vrt = velbycfrvec()
  2124.  
  2125.             local rY, lY = raycastlegs()
  2126.  
  2127.  
  2128. LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-1,0),angles(0,-1.5707963267948966,0)),deltaTime)
  2129. RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-1,0),angles(0,1.5707963267948966,0)),deltaTime)
  2130. RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,0.5,0),angles(0,1.5707963267948966,0)),deltaTime)
  2131. RootJoint.C0=Lerp(RootJoint.C0,angles(-1.5707963267948966,0,3.141592653589793),deltaTime)
  2132. LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0.5,0),angles(0,-1.5707963267948966,0)),deltaTime)
  2133. Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966,0,3.141592653589793)),deltaTime) end
  2134.     })
  2135.     addmode(" ", {
  2136.         idle = function()
  2137.             local Ychg=velYchg()/20
  2138.  
  2139. LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-1,0),angles(0,-1.5707963267948966,0)),deltaTime)
  2140. RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-1,0),angles(0,1.5707963267948966,0)),deltaTime)
  2141. RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,0.5,0),angles(0,1.5707963267948966,0)),deltaTime)
  2142. RootJoint.C0=Lerp(RootJoint.C0,angles(-1.5707963267948966,0,3.141592653589793),deltaTime)
  2143. LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0.5,0),angles(0,-1.5707963267948966,0)),deltaTime)
  2144. Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966,0,3.141592653589793)),deltaTime) end
  2145.     })
  2146.     addmode(" ", {
  2147.         modeEntered = function()
  2148.             setWalkSpeed(25)
  2149.         end,
  2150.         idle = function()
  2151.             velYchg()
  2152.  
  2153. LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-1,0),angles(0,-1.5707963267948966,0)),deltaTime)
  2154. RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-1,0),angles(0,1.5707963267948966,0)),deltaTime)
  2155. RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,0.5,0),angles(0,1.5707963267948966,0)),deltaTime)
  2156. RootJoint.C0=Lerp(RootJoint.C0,angles(-1.5707963267948966,0,3.141592653589793),deltaTime)
  2157. LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0.5,0),angles(0,-1.5707963267948966,0)),deltaTime)
  2158. Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966,0,3.141592653589793)),deltaTime) end,
  2159.         walk = function()
  2160.             velYchg()
  2161.             local Vfw, Vrt = velbycfrvec()
  2162.  
  2163. LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-1,0),angles(0,-1.5707963267948966,0)),deltaTime)
  2164. RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-1,0),angles(0,1.5707963267948966,0)),deltaTime)
  2165. RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,0.5,0),angles(0,1.5707963267948966,0)),deltaTime)
  2166. RootJoint.C0=Lerp(RootJoint.C0,angles(-1.5707963267948966,0,3.141592653589793),deltaTime)
  2167. LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0.5,0),angles(0,-1.5707963267948966,0)),deltaTime)
  2168. Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966,0,3.141592653589793)),deltaTime) end,
  2169.         modeLeft = function()
  2170.             setWalkSpeed(16)
  2171.         end,
  2172.     })
  2173.     addmode(" ", {
  2174.         idle = function()
  2175.             local Ychg=velYchg()/20
  2176.  
  2177. LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-1,0),angles(0,-1.5707963267948966,0)),deltaTime)
  2178. RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-1,0),angles(0,1.5707963267948966,0)),deltaTime)
  2179. RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,0.5,0),angles(0,1.5707963267948966,0)),deltaTime)
  2180. RootJoint.C0=Lerp(RootJoint.C0,angles(-1.5707963267948966,0,3.141592653589793),deltaTime)
  2181. LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0.5,0),angles(0,-1.5707963267948966,0)),deltaTime)
  2182. Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966,0,3.141592653589793)),deltaTime) end
  2183.     })
  2184.     addmode(" ", {
  2185.         idle = function()
  2186.             local Ychg=velYchg()/20
  2187.  
  2188. LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-1,0),angles(0,-1.5707963267948966,0)),deltaTime)
  2189. RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-1,0),angles(0,1.5707963267948966,0)),deltaTime)
  2190. RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,0.5,0),angles(0,1.5707963267948966,0)),deltaTime)
  2191. RootJoint.C0=Lerp(RootJoint.C0,angles(-1.5707963267948966,0,3.141592653589793),deltaTime)
  2192. LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0.5,0),angles(0,-1.5707963267948966,0)),deltaTime)
  2193. Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966,0,3.141592653589793)),deltaTime) end
  2194.     })
  2195.     addmode(" ", {
  2196.         idle = function()
  2197.             local Ychg=velYchg()/20
  2198.  
  2199. LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-1,0),angles(0,-1.5707963267948966,0)),deltaTime)
  2200. RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-1,0),angles(0,1.5707963267948966,0)),deltaTime)
  2201. RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,0.5,0),angles(0,1.5707963267948966,0)),deltaTime)
  2202. RootJoint.C0=Lerp(RootJoint.C0,angles(-1.5707963267948966,0,3.141592653589793),deltaTime)
  2203. LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0.5,0),angles(0,-1.5707963267948966,0)),deltaTime)
  2204. Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966,0,3.141592653589793)),deltaTime) end
  2205.     })
  2206.     addmode(" ", {
  2207.         idle = function()
  2208.             local Ychg=velYchg()/20
  2209.  
  2210. LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-1,0),angles(0,-1.5707963267948966,0)),deltaTime)
  2211. RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-1,0),angles(0,1.5707963267948966,0)),deltaTime)
  2212. RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,0.5,0),angles(0,1.5707963267948966,0)),deltaTime)
  2213. RootJoint.C0=Lerp(RootJoint.C0,angles(-1.5707963267948966,0,3.141592653589793),deltaTime)
  2214. LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0.5,0),angles(0,-1.5707963267948966,0)),deltaTime)
  2215. Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966,0,3.141592653589793)),deltaTime) end
  2216.     })
  2217.     local function idleL()
  2218.         local Ychg=velYchg()/20
  2219.  
  2220. LeftHip.C0=Lerp(LeftHip.C0,cfMul(cf(-1,-1,0),angles(0,-1.5707963267948966,0)),deltaTime)
  2221. RightHip.C0=Lerp(RightHip.C0,cfMul(cf(1,-1,0),angles(0,1.5707963267948966,0)),deltaTime)
  2222. RightShoulder.C0=Lerp(RightShoulder.C0,cfMul(cf(1,0.5,0),angles(0,1.5707963267948966,0)),deltaTime)
  2223. RootJoint.C0=Lerp(RootJoint.C0,angles(-1.5707963267948966,0,3.141592653589793),deltaTime)
  2224. LeftShoulder.C0=Lerp(LeftShoulder.C0,cfMul(cf(-1,0.5,0),angles(0,-1.5707963267948966,0)),deltaTime)
  2225. Neck.C0=Lerp(Neck.C0,cfMul(cf(0,1,0),angles(-1.5707963267948966,0,3.141592653589793)),deltaTime) end
  2226.     addmode(" ", {
  2227.         modeEntered = function()
  2228.             setWalkSpeed(10)
  2229.         end,
  2230.         idle = idleL,
  2231.         walk = idleL,
  2232.         modeLeft = function()
  2233.             setWalkSpeed(16)
  2234.         end
  2235.     })
  2236. end)
  2237.  
  2238.  
  2239. local function swtc(txt,options,onchanged)
  2240.     local current=0
  2241.     local swtcbtn=nil
  2242.     local function btnpressed()
  2243.         current=current+1
  2244.         if current>#options then
  2245.             current=1
  2246.         end
  2247.         local option=options[current]
  2248.         insSet(swtcbtn,"Text",txt..": "..option.text)
  2249.         onchanged(option.value)
  2250.     end
  2251.     swtcbtn=btn("change",btnpressed)
  2252.     btnpressed()
  2253.     return swtcbtn
  2254. end
  2255.  
  2256. swtc("client sided placeholders",{
  2257.     {value=true,text="yes"},
  2258.     {value=false,text="no"}
  2259. },function(v)
  2260.     placeholders=v
  2261. end)
  2262.  
  2263. swtc("highlight fling targets",{
  2264.     {value=true,text="yes"},
  2265.     {value=false,text="no"}
  2266. },function(v)
  2267.     highlightflingtargets=v
  2268. end)
  2269.  
  2270. swtc("allow shiftlock",{
  2271.     {value=true,text="yes"},
  2272.     {value=false,text="no"}
  2273. },function(v)
  2274.     allowshiftlock=v
  2275. end)
  2276.  
  2277. swtc("ctrl click tp",{
  2278.     {value=true,text="yes"},
  2279.     {value=false,text="no"}
  2280. },function(v)
  2281.     ctrltp=v
  2282. end)
  2283.  
  2284. swtc("click fling",{
  2285.     {value=true,text="yes"},
  2286.     {value=false,text="no"}
  2287. },function(v)
  2288.     clickfling=v
  2289. end)
  2290.  
  2291. swtc("changestate when fling",{
  2292.     {value=true,text="yes"},
  2293.     {value=false,text="no"}
  2294. },function(v)
  2295.     flingchangestate=v
  2296. end)
  2297.  
  2298.  
  2299. swtc("respawn tp",{
  2300.     {value=3,text="hide body"},
  2301.     {value=0,text="stay at spawn"},
  2302.     {value=1,text="random tp close"},
  2303.     {value=2,text="behind char"}
  2304. },function(v)
  2305.     respawntp=v
  2306. end)
  2307.  
  2308. local disguiscripts=nil
  2309. swtc("new gui scripts",{
  2310.     {value=true,text="disable"},
  2311.     {value=false,text="keep"}
  2312. },function(v)
  2313.     disguiscripts=v
  2314. end)
  2315. Connect(insGet(pg,"DescendantAdded"),function(v)
  2316.     if c and disguiscripts and IsA(v,"Script") then --mind Enum.RunContext.Client
  2317.         insSet(v,"Disabled",true)
  2318.     end
  2319. end)
  2320.  
  2321. swtc("new character scripts",{
  2322.     {value=function(v)
  2323.         if IsA(v,"Script") then --mind Enum.RunContext.Client
  2324.             insSet(v,"Disabled",true)
  2325.         end
  2326.     end,text="disable"},
  2327.     {value=false,text="keep"}
  2328. },function(v)
  2329.     discharscripts=v
  2330. end)
  2331.  
  2332. swtc("breakjoints",{
  2333.     {value=1,text="breakjoints+health"},
  2334.     {value=2,text="health or breakjoints"},
  2335.     {value=3,text="breakjoints"}
  2336. },function(v)
  2337.     breakjointsmethod=v
  2338. end)
  2339.  
  2340. swtc("set simulation radius",{
  2341.     {value=true,text="yes"},
  2342.     {value=false,text="no"},
  2343. },function(v)
  2344.     simrad=v
  2345. end)
  2346.  
  2347. local iscg,_=pcall(insSet,i10,"Parent",FindFirstChildOfClass(game,"CoreGui"))
  2348. if not iscg then
  2349.     insSet(i7,"Text","PLAYERGUI MODE")
  2350.     insSet(i10,"Parent",pg)
  2351.     twait(3)
  2352.     insSet(i7,"Text",guiTheme.guiTitle)
  2353. end
Advertisement
Comments
  • sdsdfsdfeff
    215 days
    # text 0.77 KB | 0 0
    1. https://www.roblox.com/catalog/3438342658/International-Fedora-Argentina
    2.  
    3. https://www.roblox.com/catalog/4819740796/Robox
    4.  
    5. https://www.roblox.com/catalog/3033910400/International-Fedora-Germany
    6.  
    7. https://www.roblox.com/catalog/3409612660/International-Fedora-USA
    8.  
    9. https://www.roblox.com/catalog/3398308134/International-Fedora-Canada
    10.  
    11. https://www.roblox.com/catalog/4154538250/International-Fedora-Chile
    12.  
    13. https://www.roblox.com/catalog/3822880197/International-Fedora-Ukraine
    14.  
    15. https://www.roblox.com/catalog/3443038622/International-Fedora-Peru
    16.  
    17. https://www.roblox.com/catalog/4324158403/International-Fedora-Japan
    18.  
    19. https://www.roblox.com/catalog/617605556/Medieval-Hood-of-Mystery
    20.  
    21. Or
    22.  
    23. https://www.roblox.com/catalog/3302593407/Rodans-Head
    24. you need thees hats ^^^^
Add Comment
Please, Sign In to add comment
Advertisement