Advertisement
Kitty-Admin

hat

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