Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Plr = game.Players.LocalPlayer
- local Mouse = Plr:GetMouse()
- local Ball
- local Tracking = false
- local Char = Plr.Character
- local here
- local Toilet = "{03C5F46F-E773-4A5C-A964-69A071CE3CE2}"
- local Tracking2 = false
- function FindNet()
- local lowest = math.huge
- for i,v in pairs (workspace.MainStadium.Courtz["New_Hoop13"].Backboard:children()) do
- if v.Name == "here" then
- local dist = (workspace.gvyard.Torso.CFrame.p-v.CFrame.p).magnitude
- if dist < lowest then
- lowest = dist
- here = v
- end
- end
- end
- for i,v in pairs (workspace.MainStadium.Courtz["New_Hoop14"].Backboard:children()) do
- if v.Name == "here" then
- local dist = (workspace.gvyard.Torso.CFrame.p-v.CFrame.p).magnitude
- if dist < lowest then
- lowest = dist
- here = v
- end
- end
- end
- return here
- end
- function FindBall()
- local lowest = math.huge
- for i,v in pairs (game.Players:GetPlayers()) do
- local Char = v.Character
- if Char:FindFirstChild("NotHandle") then
- local Torso = Char.Torso
- local dist = (workspace.gvyard.Torso.CFrame.p-Torso.CFrame.p).magnitude
- if dist < lowest then
- lowest = dist
- Ball = Char.NotHandle
- end
- end
- end
- return Ball
- end
- print(FindNet())
- Mouse.KeyDown:connect(function(key)
- if key == "z" then
- here = FindNet()
- print(here)
- local dist = (here.CFrame.p-workspace.gvyard.Torso.CFrame.p).magnitude
- local A_1 = game:GetService("Workspace").gvyard.Humanoid
- local pow = 84.5
- local eq = dist*1.375-dist/60
- local A_2 = here.CFrame.p+Vector3.new(0,(math.sqrt(math.abs(pow-dist))*(11.85+(math.abs(pow-dist)/11.85))),0) local p = Instance.new("Part", workspace)
- p.Anchored = true
- local p = Instance.new("Part", workspace)
- p.Anchored = true
- p.CanCollide = false
- p.CFrame = CFrame.new(A_2)
- local A_4 = false
- workspace.gvyard.NotHandle.Remotes.ShootTargetRemote:FireServer(A_2, game:GetService("Workspace").gvyard.Head, Toilet, "Shoot")
- elseif key == "c" then
- here = FindNet()
- local dist = (here.CFrame.p-workspace.gvyard.Torso.CFrame.p).magnitude
- local A_1 = game:GetService("Workspace").gvyard.Humanoid
- if dist < 70 then
- pow = 54
- eq = dist*1.375-dist/60
- A_2 = here.CFrame.p+Vector3.new(0,(math.sqrt(math.abs(pow-dist))*(4+(math.abs(pow-dist)/4))),0) p = Instance.new("Part", workspace)
- elseif dist > 70 then
- pow = 74.5
- eq = dist*1.375-dist/60
- A_2 = here.CFrame.p+Vector3.new(0,(math.sqrt(math.abs(pow-dist))*(32+(math.abs(pow-dist)/6))),0) p = Instance.new("Part", workspace)
- end
- p.Anchored = true
- local p = Instance.new("Part", workspace)
- p.Anchored = true
- p.CanCollide = false
- p.CFrame = CFrame.new(A_2)
- local A_4 = false
- workspace.gvyard.NotHandle.Remotes.ShootTargetRemote:FireServer(A_2, game:GetService("Workspace").gvyard.Head, Toilet, "Shoot")
- elseif key == "x" and Tracking == false then
- Tracking = true
- while Tracking == true do
- Ball = FindBall()
- if Ball and Ball.Parent ~= nil then
- local Tors = Ball.Parent.Torso
- print(Tors.Parent.Name)
- Char.Humanoid:MoveTo(Tors.CFrame.p+Tors.Velocity.unit*7)
- end
- wait()
- end
- elseif key == "v" then
- here = FindNet()
- local dist = (here.CFrame.p-workspace.gvyard.Torso.CFrame.p).magnitude
- local A_1 = game:GetService("Workspace").gvyard.Humanoid
- local pow = 84.5
- local eq = dist*1.375-dist/60
- local A_2 = here.CFrame.p+Vector3.new(0,(math.sqrt(math.abs(pow-dist))*(16+(math.abs(pow-dist)/16))),0) local p = Instance.new("Part", workspace)
- p.Anchored = true
- local p = Instance.new("Part", workspace)
- p.Anchored = true
- p.CanCollide = false
- p.CFrame = CFrame.new(A_2)
- local A_4 = false
- workspace.gvyard.NotHandle.Remotes.ShootTargetRemote:FireServer(A_2, game:GetService("Workspace").gvyard.Head, Toilet, "Shoot")
- elseif key == "x" and Tracking == true then
- Tracking = false
- elseif key == "n" and Tracking2 == false then
- Tracking2 = true
- for i,v in pairs(game.Players:children()) do
- if (v.Character.Torso.CFrame.p-Char.Torso.CFrame.p).magnitude<4 and v.Name ~= "gvyard" then
- while Tracking2 == true do
- if v.Character.Torso.Velocity.magnitude > 0.5 then
- Char.Humanoid:MoveTo(v.Character.Torso.CFrame.p+v.Character.Torso.Velocity.unit*7)
- else
- Char.Humanoid:MoveTo(v.Character.Torso.CFrame.p)
- end
- wait()
- end
- end
- end
- elseif key == "n" and Tracking2 == true then
- Tracking2 = false
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement