dannthebesttt

fssa

Jan 12th, 2020
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.34 KB | None | 0 0
  1. local lPlayer = game.Players.LocalPlayer;
  2. local lTeam = lPlayer.TeamColor;
  3. local mode = 1;
  4. local speed = .7; -- CFrame interpolation every second.
  5. local aimToggle = false;
  6. local enemyColor = BrickColor.Red();
  7. local friendlyColor = BrickColor.Blue();
  8.  
  9. function onKeyPress(inputObject, gameProcessedEvent)
  10. if inputObject.KeyCode == Enum.KeyCode.RightAlt then
  11. if aimToggle == false then
  12. --aimToggle = true;
  13. else
  14. --aimToggle = false;
  15. end
  16. end
  17. if inputObject.KeyCode == Enum.KeyCode.RightControl then
  18. if mode == 1 then
  19. mode = 0;
  20. for i,v in pairs(game.Players:GetChildren()) do
  21. if v ~= lPlayer then
  22. if game.Workspace:FindFirstChild(v.Name) ~= nil then
  23. if v.Character:FindFirstChild("Torso") ~= nil then
  24. v.Character.Torso.eP.Frame.Visible = false;
  25. end
  26. for t,x in pairs(v.Character:GetChildren()) do
  27. if x.ClassName == "Part" then
  28. if v.Character:FindFirstChild("Head") ~= nil then
  29. if v.Character.Head:FindFirstChild("1") ~= nil then
  30. for l=1,6 do
  31. x:FindFirstChild(l).Frame.Visible = true;
  32. end
  33. end
  34. end
  35. end
  36. end
  37. end
  38. end
  39. end
  40. elseif mode == 0 then
  41. mode = 1;
  42. for i,v in pairs(game.Players:GetChildren()) do
  43. if v ~= lPlayer then
  44. if game.Workspace:FindFirstChild(v.Name) ~= nil then
  45. if v.Character:FindFirstChild("Torso") ~= nil then
  46. v.Character.Torso.eP.Frame.Visible = true;
  47. end
  48. for t,x in pairs(v.Character:GetChildren()) do
  49. if x.ClassName == "Part" then
  50. if v.Character:FindFirstChild("Head") ~= nil then
  51. if v.Character.Head:FindFirstChild("1") ~= nil then
  52. for l=1,6 do
  53. x:FindFirstChild(l).Frame.Visible = false;
  54. end
  55. end
  56. end
  57. end
  58. end
  59. end
  60. end
  61. end
  62. end
  63. end
  64. end
  65.  
  66. game:GetService("UserInputService").InputBegan:connect(onKeyPress)
  67.  
  68. local function ClosestPlayer(point)
  69. local OnTarget = false;
  70. local CurDis = nil;
  71. local CurPlayer = nil;
  72. for i,v in pairs(game.Players:GetChildren()) do
  73. if v ~= lPlayer then
  74. if CurDis == nil then
  75. CurDis = v:DistanceFromCharacter(lPlayer.Character.Torso.Position);
  76. CurPlayer = v;
  77. else
  78. if v:DistanceFromCharacter(lPlayer.Character.Torso.Position) < CurDis then
  79. CurDis = v:DistanceFromCharacter(lPlayer.Character.Torso.Position);
  80. CurPlayer = v;
  81. end
  82. end
  83. end
  84. end
  85. while aimToggle == true do
  86. for i = 0, 1, .01 do
  87. game.Workspace.CurrentCamera.CFrame = CFrame.new(Vector3.new(game.Workspace.CurrentCamera.CFrame.X,game.Workspace.CurrentCamera.CFrame.Y,game.Workspace.CurrentCamera.CFrame.Z), CurPlayer.Character.Torso.Position);
  88. end
  89. end
  90. end
  91.  
  92. while true do
  93. for i,v in pairs(game.Players:GetChildren()) do
  94. local vChar = game.Workspace:WaitForChild(v.Name);
  95. if vChar.Torso:FindFirstChild("eP") == nil and v ~= lPlayer then
  96. local fLayer = Instance.new("BillboardGui");
  97. fLayer.Name = "eP";
  98. fLayer.Size = UDim2.new(8,0,8,0);
  99. fLayer.SizeOffset = Vector2.new(.5,-.55);
  100. fLayer.LightInfluence = 0;
  101. fLayer.AlwaysOnTop = true;
  102. fLayer.Adornee = vChar:WaitForChild("Torso");
  103. fLayer.Parent = vChar.Torso;
  104. local sLayer = Instance.new("Frame");
  105. sLayer.BackgroundTransparency = .5;
  106. sLayer.AnchorPoint = Vector2.new(.5,.5);
  107. if v.TeamColor == lTeam then
  108. sLayer.BackgroundColor = BrickColor.Blue();
  109. else
  110. sLayer.BackgroundColor = BrickColor.Red();
  111. end
  112. sLayer.BorderSizePixel = 0;
  113. sLayer.Size = UDim2.new(.5,0,.7,0);
  114. sLayer.Parent = fLayer;
  115. if mode == 0 then
  116. sLayer.Visible = false;
  117. end
  118. local fhLayer = Instance.new("BillboardGui");
  119. fhLayer.Name = "ePh";
  120. fhLayer.Size = UDim2.new(8,0,8,0);
  121. fhLayer.SizeOffset = Vector2.new(.25,-.13);
  122. fhLayer.LightInfluence = 0;
  123. fhLayer.AlwaysOnTop = true;
  124. fhLayer.Adornee = vChar:WaitForChild("Torso");
  125. fhLayer.Parent = vChar.Torso;
  126. local health = Instance.new("Frame");
  127. health.AnchorPoint = Vector2.new(0,.5);
  128. health.Name = "health";
  129. health.BorderSizePixel = 0;
  130. health.BackgroundColor3 = Color3.fromRGB(255,0,0);
  131. health.Size = UDim2.new((v.Character.Humanoid.Health/v.Character.Humanoid.MaxHealth)/2,0,.05,0);
  132. health.Parent = fhLayer;
  133. local fnLayer = Instance.new("BillboardGui");
  134. fnLayer.Name = "ePn";
  135. fnLayer.Size = UDim2.new(8,0,8,0);
  136. fnLayer.SizeOffset = Vector2.new(.25,0);
  137. fnLayer.LightInfluence = 0;
  138. fnLayer.AlwaysOnTop = true;
  139. fnLayer.Adornee = vChar:WaitForChild("Torso");
  140. fnLayer.Parent = vChar.Torso;
  141. local name = Instance.new("TextLabel");
  142. name.AnchorPoint = Vector2.new(0,.5);
  143. name.Name = "txtlabel";
  144. name.BorderSizePixel = 0;
  145. name.BackgroundTransparency = 1;
  146. name.Size = UDim2.new(.5,0,.05,0);
  147. name.Position = UDim2.new(0,0,0,0);
  148. name.TextScaled = true;
  149. name.Text = v.Name;
  150. name.TextColor3 = Color3.fromRGB(sLayer.BackgroundColor.r,sLayer.BackgroundColor.g,sLayer.BackgroundColor.b);
  151. name.Parent = fnLayer;
  152. for x,t in pairs(vChar:GetChildren()) do
  153. if t.ClassName == "Part" then
  154. for l = 1, 6 do
  155. local headLayer = Instance.new("SurfaceGui");
  156. headLayer.Name = l;
  157. headLayer.LightInfluence = 0;
  158. headLayer.AlwaysOnTop = true;
  159. headLayer.Adornee = vChar:WaitForChild(t.Name);
  160. headLayer.Parent = t;
  161. if l==1 then
  162. headLayer.Face = "Front";
  163. elseif l==2 then
  164. headLayer.Face = "Right";
  165. elseif l==3 then
  166. headLayer.Face = "Left";
  167. elseif l==4 then
  168. headLayer.Face = "Back";
  169. elseif l==5 then
  170. headLayer.Face = "Top";
  171. elseif l==6 then
  172. headLayer.Face = "Bottom";
  173. end
  174. local xLayer = Instance.new("Frame");
  175. xLayer.BackgroundTransparency = .5;
  176. xLayer.AnchorPoint = Vector2.new(0,0);
  177. if v.TeamColor == lTeam then
  178. xLayer.BackgroundColor = BrickColor.Blue();
  179. else
  180. xLayer.BackgroundColor = BrickColor.Red();
  181. end
  182. xLayer.BorderSizePixel = 0;
  183. xLayer.Size = UDim2.new(1,0,1,0);
  184. xLayer.Parent = headLayer;
  185. if mode == 1 then
  186. xLayer.Visible = false;
  187. end
  188. end
  189. end
  190. end
  191. else
  192. if v ~= lPlayer then
  193. v.Character.Torso.ePh.health.Size = UDim2.new((v.Character.Humanoid.Health/v.Character.Humanoid.MaxHealth)/2,0,.05,0);
  194. end
  195. end
  196. end
  197. wait(.3);
  198. end
Add Comment
Please, Sign In to add comment