Advertisement
CaliberMag

Untitled

Nov 10th, 2020 (edited)
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.71 KB | None | 0 0
  1. local plr = game.Players.LocalPlayer;
  2. local chr = plr.Character;
  3. local hum = chr.Humanoid;
  4. local mov = {};
  5. local mov2 = {};
  6.  
  7. --[[Network]]
  8. coroutine.resume(coroutine.create(function()
  9. settings().Physics.AllowSleep = false;
  10. game.RunService.RenderStepped:Connect(function()
  11. setsimulationradius(math.huge)
  12. end)
  13. end))
  14.  
  15. function ftp(str)
  16. local pt = {};
  17. if str ~= 'me' and str ~= 'random' then
  18. for i, v in pairs(game.Players:GetPlayers()) do
  19. if v.Name:lower():find(str:lower()) then
  20. table.insert(pt, v);
  21. end
  22. end
  23. elseif str == 'me' then
  24. table.insert(pt, plr);
  25. elseif str == 'random' then
  26. table.insert(pt, game.Players:GetPlayers()[math.random(1, #game.Players:GetPlayers())]);
  27. end
  28. return pt;
  29. end
  30.  
  31. local grabbed = {}
  32. local NewThread = coroutine.create(function()
  33. for _, b in pairs(_G.Path:GetDescendants()) do
  34. pcall(function()
  35. if b.Anchored == false and not b:IsDescendantOf(plr.Character) and not table.find(grabbed, b) then
  36. if (b.Position - plr.Character.HumanoidRootPart.Position).Magnitude <= _G.Radius then
  37. table.insert(grabbed, b)
  38. b.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0);
  39. b.CanCollide = false;
  40. b:BreakJoints();
  41. for _, k in pairs(b:GetChildren()) do
  42. if not k:IsA'SpecialMesh' and not k:IsA'Part' then
  43. k:Destroy();
  44. end
  45. end
  46.  
  47. local still = Instance.new('BodyAngularVelocity', b);
  48. still.MaxTorque = Vector3.new(math.huge, math.huge, math.huge);
  49. still.AngularVelocity = Vector3.new(0, 0, 0);
  50. local align = Instance.new('AlignPosition', b);
  51. align.MaxForce = 1000000;
  52. align.MaxVelocity = math.huge;
  53. align.RigidityEnabled = false;
  54. align.ApplyAtCenterOfMass = true;
  55. align.Responsiveness = 200;
  56. local a0 = Instance.new('Attachment', b);
  57. local a1 = Instance.new('Attachment', chr.Head);
  58. align.Attachment0 = a0;
  59. align.Attachment1 = a1;
  60. table.insert(mov, a1);
  61. table.insert(mov2, still);
  62. end
  63. end
  64. end)
  65. end
  66. end)
  67. coroutine.resume(NewThread)
  68.  
  69. local par = {};
  70. for _, v in pairs(mov) do
  71. local parr = Instance.new('Part', workspace);
  72. parr.Anchored = true;
  73. parr.Size = Vector3.new(1, 1, 1);
  74. parr.Transparency = 1;
  75. parr.CanCollide = false;
  76. table.insert(par, parr);
  77. end
  78.  
  79. local rotx = 0;
  80. local rotz = math.pi / 2;
  81. local height = 0;
  82. local heighti = 1;
  83. local offset = 10;
  84. local speed = 2;
  85. local mode = 4;
  86. local angular = Vector3.new(0, 0, 0);
  87. local l = 1;
  88. game['Run Service'].RenderStepped:Connect(function()
  89. rotx = rotx + speed / 100;
  90. rotz = rotz + speed / 100;
  91. l = (l >= 360 and 1 or l + speed);
  92.  
  93. for i, v in pairs(par) do
  94. v.CFrame = CFrame.new(chr.HumanoidRootPart.Position) * CFrame.fromEulerAnglesXYZ(0, math.rad(l + (360 / #par) * i + speed), 0) * CFrame.new(offset, 0, 0);
  95. end
  96.  
  97. if heighti == 1 then
  98. height = height + speed / 100;
  99. elseif heighti == 2 then
  100. height = height - speed / 100;
  101. end
  102. if height > 2 then
  103. heighti = 2;
  104. end
  105. if height < -1 then
  106. heighti = 1;
  107. end
  108.  
  109. if mode == 1 then
  110. for _, v in pairs(mov) do
  111. v.Position = Vector3.new(math.sin(rotx) * offset, 0, math.sin(rotz) * offset);
  112. end
  113. elseif mode == 2 then
  114. for _, v in pairs(mov) do
  115. v.Position = Vector3.new(offset, height, offset);
  116. end
  117. elseif mode == 3 then
  118. for _, v in pairs(mov) do
  119. v.Position = Vector3.new(math.sin(rotx) * offset, height, math.sin(rotz) * offset);
  120. end
  121. elseif mode == 4 then
  122. for i, v in pairs(mov) do
  123. v.Position = Vector3.new(chr.HumanoidRootPart.CFrame:ToObjectSpace(CFrame.new(par[i].Position)).X, chr.HumanoidRootPart.CFrame:ToObjectSpace(CFrame.new(par[i].Position)).Y, chr.HumanoidRootPart.CFrame:ToObjectSpace(CFrame.new(par[i].Position)).Z);
  124. end
  125. elseif mode == 5 then
  126. for i, v in pairs(mov) do
  127. v.Position = Vector3.new((math.sin(rotx)) * offset, height, (math.cos(rotz) - i) * offset);
  128. end
  129. elseif mode == 6 then
  130. for i, v in pairs(mov) do
  131. v.Position = Vector3.new((math.sin(rotx)) * offset, height, (math.tan(rotz) - i) * offset);
  132. end
  133. elseif mode == 7 then
  134. for i, v in pairs(mov) do
  135. v.Position = Vector3.new(math.cos(rotx * i) * offset, 0, math.cos(rotz * i) * offset);
  136. end
  137. elseif mode == 8 then
  138. for i, v in pairs(mov) do
  139. v.Position = Vector3.new(math.sin(rotx) * i * offset, 0, math.sin(rotz) * i * offset);
  140. end
  141. elseif mode == 9 then
  142. pcall(function()
  143. local so = nil;
  144. for k, b in pairs(chr:GetChildren()) do
  145. if b:IsA'Tool' then
  146. for h, j in pairs(b:GetDescendants()) do
  147. if j:IsA'Sound' then
  148. so = j;
  149. end
  150. end
  151. end
  152. end
  153. if so ~= nil then
  154. offset = so.PlaybackLoudness / 35;
  155. speed = so.PlaybackLoudness / 500;
  156. angular = Vector3.new(0, so.PlaybackLoudness / 75, 0);
  157. end
  158. end)
  159. for i, v in pairs(mov) do
  160. v.Position = Vector3.new(chr.HumanoidRootPart.CFrame:ToObjectSpace(CFrame.new(par[i].Position)).X, chr.HumanoidRootPart.CFrame:ToObjectSpace(CFrame.new(par[i].Position)).Y, chr.HumanoidRootPart.CFrame:ToObjectSpace(CFrame.new(par[i].Position)).Z);
  161. end
  162. elseif mode == 10 then
  163. offset = height * 15;
  164. for i, v in pairs(mov) do
  165. v.Position = Vector3.new(chr.HumanoidRootPart.CFrame:ToObjectSpace(CFrame.new(par[i].Position)).X, chr.HumanoidRootPart.CFrame:ToObjectSpace(CFrame.new(par[i].Position)).Y, chr.HumanoidRootPart.CFrame:ToObjectSpace(CFrame.new(par[i].Position)).Z);
  166. end
  167. elseif mode == 11 then
  168. for i, v in pairs(mov) do
  169. v.Position = Vector3.new(chr.HumanoidRootPart.CFrame:ToObjectSpace(CFrame.new(plr:GetMouse().Hit.p)).X, chr.HumanoidRootPart.CFrame:ToObjectSpace(CFrame.new(plr:GetMouse().Hit.p)).Y, chr.HumanoidRootPart.CFrame:ToObjectSpace(CFrame.new(plr:GetMouse().Hit.p)).Z) + Vector3.new(chr.HumanoidRootPart.CFrame:ToObjectSpace(CFrame.new(par[i].Position)).X, chr.HumanoidRootPart.CFrame:ToObjectSpace(CFrame.new(par[i].Position)).Y, chr.HumanoidRootPart.CFrame:ToObjectSpace(CFrame.new(par[i].Position)).Z);
  170. end
  171. end
  172. for _, v in pairs(mov2) do
  173. v.AngularVelocity = angular;
  174. end
  175. end)
  176. game.Players.LocalPlayer.Chatted:Connect(function(c)
  177. if c:split(' ')[1] == '.orbit' then
  178. for _, v in pairs(mov) do
  179. chr = ftp(c:split(' ')[2])[1].Character;
  180. v.Parent = ftp(c:split(' ')[2])[1].Character.HumanoidRootPart;
  181. end
  182. end
  183. if c:split(' ')[1] == '.speed' then
  184. speed = tonumber(c:split(' ')[2]);
  185. end
  186. if c:split(' ')[1] == '.mode' then
  187. mode = tonumber(c:split(' ')[2]);
  188. end
  189. if c:split(' ')[1] == '.offset' then
  190. offset = tonumber(c:split(' ')[2]);
  191. end
  192. if c:split(' ')[1] == '.angular' then
  193. angular = Vector3.new(tonumber(c:split(' ')[2]), tonumber(c:split(' ')[3]), tonumber(c:split(' ')[4]));
  194. end
  195. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement