Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _G.Team = true
- game:GetService("UserInputService").InputBegan:connect(function(inputObject, gameProcessedEvent)
- if inputObject.KeyCode == Enum.KeyCode.T then
- for i, v in pairs(game.Players:GetPlayers()) do
- if v.Name ~= game.Players.LocalPlayer.Name then
- if _G.Team == true then
- if v.TeamColor ~= game.Players.LocalPlayer.TeamColor then
- print((v.Character.HumanoidRootPart.Position - game.Players.LocalPlayer.Character.HumanoidRootPart.Position).magnitude)
- if (v.Character.HumanoidRootPart.Position - game.Players.LocalPlayer.Character.HumanoidRootPart.Position).magnitude <= (45) then
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = v.Character.HumanoidRootPart.CFrame + v.Character.HumanoidRootPart.CFrame.lookVector * -5
- end
- end
- elseif _G.Team == false then
- print((v.Character.HumanoidRootPart.Position - game.Players.LocalPlayer.Character.HumanoidRootPart.Position).magnitude)
- if (v.Character.HumanoidRootPart.Position - game.Players.LocalPlayer.Character.HumanoidRootPart.Position).magnitude <= (45) then
- game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = v.Character.HumanoidRootPart.CFrame + v.Character.HumanoidRootPart.CFrame.lookVector * -5
- end
- end
- end
- end
- end
- end)
- game:GetService("UserInputService").InputBegan:connect(function(inputObject, gameProcessedEvent)
- if inputObject.KeyCode == Enum.KeyCode.Semicolon then
- _G.Team = true
- game:GetService("StarterGui"):SetCore("SendNotification", {Title = "Team Mode", Text = "On"})
- elseif inputObject.KeyCode == Enum.KeyCode.Quote then
- _G.Team = false
- game:GetService("StarterGui"):SetCore("SendNotification", {Title = "FFA Mode", Text = "On"})
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement