Advertisement
Glyoit

Untitled

Jun 7th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.65 KB | None | 0 0
  1. _G.Team = true
  2. game:GetService("UserInputService").InputBegan:connect(function(inputObject, gameProcessedEvent)
  3. if inputObject.KeyCode == Enum.KeyCode.T then
  4. for i, v in pairs(game.Players:GetPlayers()) do
  5. if v.Name ~= game.Players.LocalPlayer.Name then
  6. if _G.Team == true then
  7. if v.TeamColor ~= game.Players.LocalPlayer.TeamColor then
  8. print((v.Character.HumanoidRootPart.Position - game.Players.LocalPlayer.Character.HumanoidRootPart.Position).magnitude)
  9. if (v.Character.HumanoidRootPart.Position - game.Players.LocalPlayer.Character.HumanoidRootPart.Position).magnitude <= (45) then
  10. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = v.Character.HumanoidRootPart.CFrame + v.Character.HumanoidRootPart.CFrame.lookVector * -5
  11. end
  12. end
  13. elseif _G.Team == false then
  14. print((v.Character.HumanoidRootPart.Position - game.Players.LocalPlayer.Character.HumanoidRootPart.Position).magnitude)
  15. if (v.Character.HumanoidRootPart.Position - game.Players.LocalPlayer.Character.HumanoidRootPart.Position).magnitude <= (45) then
  16. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = v.Character.HumanoidRootPart.CFrame + v.Character.HumanoidRootPart.CFrame.lookVector * -5
  17. end
  18. end
  19. end
  20. end
  21. end
  22. end)
  23.  
  24. game:GetService("UserInputService").InputBegan:connect(function(inputObject, gameProcessedEvent)
  25. if inputObject.KeyCode == Enum.KeyCode.Semicolon then
  26. _G.Team = true
  27. game:GetService("StarterGui"):SetCore("SendNotification", {Title = "Team Mode", Text = "On"})
  28. elseif inputObject.KeyCode == Enum.KeyCode.Quote then
  29. _G.Team = false
  30. game:GetService("StarterGui"):SetCore("SendNotification", {Title = "FFA Mode", Text = "On"})
  31. end
  32. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement