Advertisement
Guest User

Untitled

a guest
Mar 28th, 2020
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.93 KB | None | 0 0
  1. game.ReplicatedStorage.Remotes.Party:FireServer("Test","create")
  2. game.ReplicatedStorage.Remotes.Party:FireServer("????\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n", "tag")
  3. local players = game:service'Players';
  4. local tweenService = game:service'TweenService';
  5. local runService = game:service'RunService';
  6. local replicatedStorage = game:service'ReplicatedStorage';
  7. local virtualUser = game:service'VirtualUser';
  8. local camera = workspace.CurrentCamera
  9. local player = players.LocalPlayer;
  10. local playerGui = player.PlayerGui;
  11. local vec3New = Vector3.new;
  12. local vec2New = Vector2.new;
  13. local cframeNew = CFrame.new;
  14. local tweenInfoNew = TweenInfo.new;
  15. local constVec = vec3New(0, -5, 0);
  16. local constVec2 = vec2New(0, 0);
  17. local mouse = player:GetMouse();
  18.  
  19. local equipRemote = replicatedStorage.Remotes.E;
  20.  
  21. local function punch()
  22. local A_1 = "Click"
  23. local A_2 = game:GetService("ReplicatedStorage").Weapon.Sword.Nichirin1["Basic_Anim"]["dmg_p2"]
  24. local Event = game:GetService("ReplicatedStorage").Remotes.Damage
  25. Event:FireServer(A_1, A_2)
  26. end
  27.  
  28. local function equip()
  29. if player.Character:WaitForChild('Humanoid').Equip.Value then return end;
  30. local headBillGui = player.Character.Head:FindFirstChild("HeadBillGui");
  31. if headBillGui then
  32. headBillGui:Destroy();
  33. end
  34. equipRemote:FireServer(true);
  35. wait(1.1);
  36. end
  37.  
  38. local function getNearestMob()
  39. local nearestM, nearest = 9e9;
  40. local playerHum = player.Character.HumanoidRootPart;
  41. local workspaceChild = workspace:GetChildren();
  42. for i = 1, #workspaceChild do
  43. local v = workspaceChild[i];
  44. local mobHum = v:FindFirstChild("Humanoid");
  45. if v:IsA'Model' and v.Name:find'Super' and not players:FindFirstChild(v.Name) and mobHum and mobHum.Health > 0 then
  46. local mobRootPart = v.HumanoidRootPart;
  47. local magnitude = (playerHum.Position - mobRootPart.Position).Magnitude;
  48. if magnitude < nearestM then
  49. nearestM = magnitude;
  50. nearest = mobRootPart;
  51. end
  52. end
  53. end
  54. return nearest, nearestM, playerHum
  55. end
  56.  
  57. runService.Stepped:Connect(function()
  58. local humanoid = player.Character:WaitForChild("Humanoid");
  59. humanoid:ChangeState(11);
  60. equip();
  61. punch();
  62. end)
  63.  
  64. while true do
  65. local nearest, distance, playerHum = getNearestMob();
  66. if nearest then
  67. local mob = nearest.Parent;
  68. repeat
  69. mob.Humanoid.Health = 0
  70. local playerCFrame = playerHum.CFrame;
  71. local mobPos = nearest.Position;
  72. local tpCFrame = cframeNew((mobPos - constVec), mobPos)
  73. local tweenBase = tweenService:Create(playerHum, tweenInfoNew(distance / 90), {CFrame = tpCFrame});
  74. tweenBase:Play();
  75. tweenBase.Completed:Wait();
  76. until wait(1)
  77. end
  78. wait(1);
  79. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement