Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- params : ...
- local Player = script.Parent.Parent
- local Mouse = Player:GetMouse()
- local Remotes = workspace:WaitForChild("Remotes.")
- local Animations = (workspace:WaitForChild("Animations."))
- local Hoop = nil
- repeat
- wait()
- until Player.Character
- local Humanoid = Player.Character:WaitForChild("Zombie")
- local RootPart = Player.Character.HumanoidRootPart
- wait(1)
- local LShooting = Humanoid:LoadAnimation(Animations.LShoot)
- local RShooting = Humanoid:LoadAnimation(Animations.RShoot)
- local LSprintShot = Humanoid:LoadAnimation(Animations.LSprintShot)
- local RSprintShot = Humanoid:LoadAnimation(Animations.RSprintShot)
- local LFadeShot = Humanoid:LoadAnimation(Animations.LFadeShoot)
- local RFadeShot = Humanoid:LoadAnimation(Animations.RFadeShoot)
- local LLayup = Humanoid:LoadAnimation(Animations.LLayup)
- local RLayup = Humanoid:LoadAnimation(Animations.RLayup)
- local Pushed = Humanoid:LoadAnimation(Animations.Pushed)
- local Fall = Humanoid:LoadAnimation(Animations.Fall)
- local Screen = Humanoid:LoadAnimation(Animations.Screen)
- local Steal = Humanoid:LoadAnimation(Animations.Steal)
- local Block = Humanoid:LoadAnimation(Animations.Block)
- local PostStop = Humanoid:LoadAnimation(Animations.PostStop)
- local PostSpinL = Humanoid:LoadAnimation(Animations.PostSpinL)
- local PostSpinR = Humanoid:LoadAnimation(Animations.PostSpinR)
- local DropBall = Humanoid:LoadAnimation(Animations.DropBall)
- local RegPass = Humanoid:LoadAnimation(Animations.RegPass)
- local HighPass = Humanoid:LoadAnimation(Animations.HighPass)
- local Dunk = Humanoid:LoadAnimation(Animations.Dunk)
- local LegDunk = Humanoid:LoadAnimation(Animations.LegDunk)
- local SpinDunk = Humanoid:LoadAnimation(Animations.SpinDunk)
- local HoldDunk = Humanoid:LoadAnimation(Animations.HoldDunk)
- local HoldLegDunk = Humanoid:LoadAnimation(Animations.HoldLegDunk)
- local debounce = true
- local shotdebounce = true
- local issprinting = false
- local shotsprint = false
- local ispassing = false
- local spindebounce = true
- local dropdebounce = true
- local madedunk = false
- local wasposting = false
- local combo = false
- local current = ""
- local run = "0"
- local shoot = "e"
- local handle = "h"
- local guard = "g"
- local steal = "r"
- local post = "z"
- local block = "b"
- local screen = "t"
- local dropball = "p"
- local dunk = "f"
- local spindunk = "g"
- local poststop = "x"
- local postspinleft = "c"
- local postspinright = "v"
- local pass = "q"
- local faceway = ""
- local holder = "m"
- local fallspeed = -8
- local pushedspeed = -5
- local spinspeed = 9
- local fadespeed = -3.5
- local layupspeed = 12
- local postspeed = 4.5
- local poststopspeed = -9
- local dunkspeed = 13
- local layuptime = 0.15
- local fadetime = 0.21
- local shottime = 0.19
- local spintime = 0.18
- local droptime = 0.15
- local dunktime = 0.33
- local shotY = 24
- local layupY = 16
- local fadeY = 14
- local shottimes = {0.55, 0.6, 0.65}
- local fadetimes = {0.65, 0.7, 0.75}
- local layuptimes = {0.45, 0.5, 0.55}
- playanim = function(anim)
- anim:Play()
- end
- stopanim = function(anim)
- anim:Stop()
- end
- lookat = function(x)
- if x:IsA("Part") or x:IsA("UnionOperation") then
- Remotes.Change:FireServer(RootPart, "CFrame", CFrame.new(RootPart.Position, Vector3.new(x.Position.X, RootPart.Position.Y, x.Position.Z)))
- end
- end
- checkhoops = function()
- local done = false
- for _,v in pairs(workspace:GetChildren()) do
- if not done and v.Name:sub(1, 9) == "Game_Hoop" and v:FindFirstChild("Hoop") and v.Net.Position - RootPart.Position.magnitude < 50 then
- Hoop = v
- done = true
- end
- end
- end
- checkrange = function()
- return Hoop.Net.Position - RootPart.Position.magnitude
- end
- checkaccuracy = function(gui, ball, type)
- local Court = Hoop.Parent
- local corner = false
- for _,v in pairs(Court:GetChildren()) do
- if v.Name == "Corner" and v.Position - RootPart.Position.magnitude < 9 then
- corner = true
- end
- end
- if corner then
- if checkrange() > 37 then
- Remotes.Change:FireServer(Court.Pointer, "Value", 3)
- else
- Remotes.Change:FireServer(Court.Pointer, "Value", 2)
- end
- else
- if checkrange() > 38 then
- Remotes.Change:FireServer(Court.Pointer, "Value", 3)
- else
- Remotes.Change:FireServer(Court.Pointer, "Value", 2)
- end
- end
- local accurate = true
- local open = true
- local green = false
- if type == "Fade" then
- if gui.Frame.Line.Position.Y.Scale >= 0.28 and gui.Frame.Line.Position.Y.Scale <= 0.35 then
- gui.Frame.Line.BackgroundColor3 = BrickColor.Green().Color
- green = true
- local number = math.random(1, 10)
- if number == 1 then
- accurate = false
- end
- else
- do
- if gui.Frame.Line.Position.Y.Scale >= 0.35 and gui.Frame.Line.Position.Y.Scale <= 0.5 then
- gui.Frame.Line.BackgroundColor3 = BrickColor.Yellow().Color
- local number = math.random(1, 5)
- if number == 1 then
- accurate = false
- end
- else
- do
- gui.Frame.Line.BackgroundColor3 = BrickColor.Red().Color
- do
- local number = math.random(1, 3)
- if number ~= 1 then
- accurate = false
- end
- if type == "Layup" then
- if gui.Frame.Line.Position.Y.Scale >= 0.3 and gui.Frame.Line.Position.Y.Scale <= 0.35 then
- gui.Frame.Line.BackgroundColor3 = BrickColor.Green().Color
- green = true
- local number = math.random(1, 9)
- if number == 1 then
- accurate = false
- end
- else
- do
- if gui.Frame.Line.Position.Y.Scale >= 0.35 and gui.Frame.Line.Position.Y.Scale <= 0.5 then
- gui.Frame.Line.BackgroundColor3 = BrickColor.Yellow().Color
- local number = math.random(1, 6)
- if number == 1 then
- accurate = false
- end
- else
- do
- gui.Frame.Line.BackgroundColor3 = BrickColor.Red().Color
- do
- local number = math.random(1, 5)
- if number ~= 1 then
- accurate = false
- end
- if gui.Frame.Line.Position.Y.Scale >= 0.3 and gui.Frame.Line.Position.Y.Scale <= 0.35 then
- gui.Frame.Line.BackgroundColor3 = BrickColor.Green().Color
- green = true
- local number = math.random(1, 10)
- if number == 1 then
- accurate = false
- end
- else
- do
- if gui.Frame.Line.Position.Y.Scale >= 0.35 and gui.Frame.Line.Position.Y.Scale <= 0.5 then
- gui.Frame.Line.BackgroundColor3 = BrickColor.Yellow().Color
- local number = math.random(1, 5)
- if number == 1 then
- accurate = false
- end
- else
- do
- gui.Frame.Line.BackgroundColor3 = BrickColor.Red().Color
- do
- local number = math.random(1, 5)
- if number ~= 1 then
- accurate = false
- end
- for _,v in pairs(game.Players:GetChildren()) do
- if v:IsA("Player") and v.TeamColor ~= Player.TeamColor and v.Character and v.Character:FindFirstChild("HumanoidRootPart") and v ~= Player and v.Character.HumanoidRootPart.Position - RootPart.Position.magnitude < 7 then
- open = false
- end
- end
- print(open)
- return accurate, open, green
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- shootball = function()
- if checkrange() < 45 then
- shootdebounce = true
- Remotes.Change:FireServer(Player.Character.Hold, "Value", true)
- Remotes.Change:FireServer(Player.Character.Post, "Value", false)
- local gui = Player.Character.Torso.ShootGui
- gui.Frame.Line.Position = UDim2.new(0, 0, 1, 0)
- gui.Frame.Line.BackgroundColor3 = BrickColor.White().Color
- if Player.Character.Handle.Value == "R" then
- if wasposting then
- lookat(Hoop.Net)
- gui.Enabled = true
- wait()
- playanim(RFadeShot)
- wait()
- lookat(Hoop.Net)
- gui.Frame.Line:TweenPosition(UDim2.new(0, 0, 0.02, 0), "In", "Quad", fadetimes[math.random(1, 3)], true)
- local timer = fadetime
- repeat
- wait(0.01)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(40000, 40000, 40000))
- Remotes.Change:FireServer(RootPart.BV, "velocity", RootPart.CFrame.lookVector * fadespeed)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- timer = timer - 0.01
- until timer <= 0 or not shootdebounce or gui.Frame.Line.Position.Y.Scale < 0.04
- gui.Frame.Line:TweenPosition(gui.Frame.Line.Position, "Out", "Linear", 0.1, true)
- wait(0.12)
- local accurate, open, green = checkaccuracy(gui, "Ball")
- lookat(Hoop.Net)
- repeat
- wait(0.01)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(40000, 40000, 40000))
- Remotes.Change:FireServer(RootPart.BV, "velocity", RootPart.CFrame.lookVector * fadespeed)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- timer = timer - 0.01
- until timer <= 0
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(0, 0, 0))
- local ball = Player.Character.Ball.Value
- Remotes.Change:FireServer(Player.Character.Hold, "Value", false)
- Remotes.Change:FireServer(Player.Character.Ball, "Value", nil)
- gui.Enabled = false
- Remotes.ShootBall:FireServer(ball, Hoop, shotY, accurate, open, green)
- wait(0.5)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 16)
- else
- do
- if checkrange() < 14 then
- lookat(Hoop.Net)
- gui.Enabled = true
- gui.Frame.Line.Position = UDim2.new(0, 0, 1, 0)
- wait()
- playanim(RFadeShot)
- wait()
- lookat(Hoop.Net)
- gui.Frame.Line:TweenPosition(UDim2.new(0, 0, 0.02, 0), "In", "Quad", fadetimes[math.random(1, 3)], true)
- local timer = fadetime
- repeat
- wait(0.01)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(40000, 40000, 40000))
- Remotes.Change:FireServer(RootPart.BV, "velocity", RootPart.CFrame.lookVector * fadespeed)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- timer = timer - 0.01
- until timer <= 0 or not shootdebounce or gui.Frame.Line.Position.Y.Scale < 0.04
- gui.Frame.Line:TweenPosition(gui.Frame.Line.Position, "Out", "Linear", 0.1, true)
- wait(0.12)
- local accurate, open, green = checkaccuracy(gui, "Fade")
- lookat(Hoop.Net)
- repeat
- wait(0.01)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(40000, 40000, 40000))
- Remotes.Change:FireServer(RootPart.BV, "velocity", RootPart.CFrame.lookVector * fadespeed)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- timer = timer - 0.01
- until timer <= 0
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(0, 0, 0))
- local ball = Player.Character.Ball.Value
- Remotes.Change:FireServer(Player.Character.Hold, "Value", false)
- Remotes.Change:FireServer(Player.Character.Ball, "Value", nil)
- Remotes.ShootBall:FireServer(ball, Hoop, fadeY, accurate, open, green)
- wait(0.5)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 16)
- else
- do
- if checkrange() > 19 and checkrange() < 26 and issprinting then
- gui.Enabled = true
- gui.Frame.Line.Position = UDim2.new(0, 0, 1, 0)
- wait()
- playanim(RLayup)
- wait()
- lookat(Hoop.Net)
- gui.Frame.Line:TweenPosition(UDim2.new(0, 0, 0.02, 0), "In", "Quad", layuptimes[math.random(1, 3)], true)
- local timer = layuptime
- repeat
- wait(0.01)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(40000, 40000, 40000))
- Remotes.Change:FireServer(RootPart.BV, "velocity", RootPart.CFrame.lookVector * layupspeed)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- timer = timer - 0.01
- until timer <= 0 or not shootdebounce or gui.Frame.Line.Position.Y.Scale < 0.04
- gui.Frame.Line:TweenPosition(gui.Frame.Line.Position, "Out", "Linear", 0.1, true)
- wait(0.12)
- local accurate, open, green = checkaccuracy(gui, "Layup")
- lookat(Hoop.Net)
- repeat
- wait(0.01)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(40000, 40000, 40000))
- Remotes.Change:FireServer(RootPart.BV, "velocity", RootPart.CFrame.lookVector * layupspeed)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- timer = timer - 0.01
- until timer <= 0
- local ball = Player.Character.Ball.Value
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(0, 0, 0))
- Remotes.Change:FireServer(Player.Character.Hold, "Value", false)
- Remotes.Change:FireServer(Player.Character.Ball, "Value", nil)
- Remotes.ShootBall:FireServer(ball, Hoop, layupY, accurate, open, green)
- wait(0.1)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 16)
- else
- do
- gui.Enabled = true
- gui.Frame.Line.Position = UDim2.new(0, 0, 1, 0)
- wait()
- if shotsprint then
- playanim(RSprintShot)
- else
- playanim(RShooting)
- end
- wait()
- gui.Frame.Line:TweenPosition(UDim2.new(0, 0, 0.02, 0), "In", "Quad", shottimes[math.random(1, 3)], true)
- local timer = shottime
- repeat
- wait(0.01)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- lookat(Hoop.Net)
- timer = timer - 0.01
- until timer <= 0 or not shootdebounce or gui.Frame.Line.Position.Y.Scale < 0.04
- gui.Frame.Line:TweenPosition(gui.Frame.Line.Position, "Out", "Linear", 0.1, true)
- wait(0.12)
- local accurate, open, green = checkaccuracy(gui)
- wait(timer - 0.1)
- do
- local ball = Player.Character.Ball.Value
- Remotes.Change:FireServer(Player.Character.Hold, "Value", false)
- Remotes.Change:FireServer(Player.Character.Ball, "Value", nil)
- Remotes.ShootBall:FireServer(ball, Hoop, shotY, accurate, open, green)
- wait(1)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 16)
- gui.Enabled = false
- if Player.Character.Handle.Value == "L" then
- if wasposting then
- lookat(Hoop.Net)
- gui.Enabled = true
- gui.Frame.Line.Position = UDim2.new(0, 0, 1, 0)
- wait()
- playanim(LFadeShot)
- wait()
- lookat(Hoop.Net)
- gui.Frame.Line:TweenPosition(UDim2.new(0, 0, 0.02, 0), "In", "Quad", fadetimes[math.random(1, 3)], true)
- local timer = fadetime
- repeat
- wait(0.01)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(40000, 40000, 40000))
- Remotes.Change:FireServer(RootPart.BV, "velocity", RootPart.CFrame.lookVector * fadespeed)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- timer = timer - 0.01
- until timer <= 0 or not shootdebounce or gui.Frame.Line.Position.Y.Scale < 0.04
- gui.Frame.Line:TweenPosition(gui.Frame.Line.Position, "Out", "Linear", 0.1, true)
- wait(0.12)
- local accurate, open, green = checkaccuracy(gui, "Fade")
- lookat(Hoop.Net)
- repeat
- wait(0.01)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(40000, 40000, 40000))
- Remotes.Change:FireServer(RootPart.BV, "velocity", RootPart.CFrame.lookVector * fadespeed)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- timer = timer - 0.01
- until timer <= 0
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(0, 0, 0))
- local ball = Player.Character.Ball.Value
- Remotes.Change:FireServer(Player.Character.Hold, "Value", false)
- Remotes.Change:FireServer(Player.Character.Ball, "Value", nil)
- gui.Enabled = false
- Remotes.ShootBall:FireServer(ball, Hoop, shotY, accurate, open, green)
- wait(0.5)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 16)
- else
- do
- if checkrange() < 14 then
- lookat(Hoop.Net)
- gui.Enabled = true
- gui.Frame.Line.Position = UDim2.new(0, 0, 1, 0)
- wait()
- playanim(LFadeShot)
- wait()
- lookat(Hoop.Net)
- gui.Frame.Line:TweenPosition(UDim2.new(0, 0, 0.02, 0), "In", "Quad", fadetimes[math.random(1, 3)], true)
- local timer = fadetime
- repeat
- wait(0.01)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(40000, 40000, 40000))
- Remotes.Change:FireServer(RootPart.BV, "velocity", RootPart.CFrame.lookVector * fadespeed)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- timer = timer - 0.01
- until timer <= 0 or not shootdebounce or gui.Frame.Line.Position.Y.Scale < 0.04
- gui.Frame.Line:TweenPosition(gui.Frame.Line.Position, "Out", "Linear", 0.1, true)
- wait(0.12)
- local accurate, open, green = checkaccuracy(gui, "Fade")
- lookat(Hoop.Net)
- repeat
- wait(0.01)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(40000, 40000, 40000))
- Remotes.Change:FireServer(RootPart.BV, "velocity", RootPart.CFrame.lookVector * fadespeed)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- timer = timer - 0.01
- until timer <= 0
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(0, 0, 0))
- local ball = Player.Character.Ball.Value
- Remotes.Change:FireServer(Player.Character.Hold, "Value", false)
- Remotes.Change:FireServer(Player.Character.Ball, "Value", nil)
- Remotes.ShootBall:FireServer(ball, Hoop, fadeY, accurate, open, green)
- wait(0.5)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 16)
- else
- do
- if checkrange() > 19 and checkrange() < 26 and issprinting then
- gui.Enabled = true
- gui.Frame.Line.Position = UDim2.new(0, 0, 1, 0)
- wait()
- playanim(LLayup)
- wait()
- lookat(Hoop.Net)
- gui.Frame.Line:TweenPosition(UDim2.new(0, 0, 0.02, 0), "In", "Quad", layuptimes[math.random(1, 3)], true)
- local timer = layuptime
- repeat
- wait(0.01)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(40000, 40000, 40000))
- Remotes.Change:FireServer(RootPart.BV, "velocity", RootPart.CFrame.lookVector * layupspeed)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- timer = timer - 0.01
- until timer <= 0 or not shootdebounce or gui.Frame.Line.Position.Y.Scale < 0.04
- gui.Frame.Line:TweenPosition(gui.Frame.Line.Position, "Out", "Linear", 0.1, true)
- wait(0.12)
- local accurate, open, green = checkaccuracy(gui, "Layup")
- lookat(Hoop.Net)
- repeat
- wait(0.01)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(40000, 40000, 40000))
- Remotes.Change:FireServer(RootPart.BV, "velocity", RootPart.CFrame.lookVector * layupspeed)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- timer = timer - 0.01
- until timer <= 0
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(0, 0, 0))
- local ball = Player.Character.Ball.Value
- Remotes.Change:FireServer(Player.Character.Hold, "Value", false)
- Remotes.Change:FireServer(Player.Character.Ball, "Value", nil)
- Remotes.ShootBall:FireServer(ball, Hoop, 20, accurate, open, green)
- wait(0.1)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 16)
- else
- do
- gui.Enabled = true
- gui.Frame.Line.Position = UDim2.new(0, 0, 1, 0)
- wait()
- if shotsprint then
- playanim(LSprintShot)
- else
- playanim(LShooting)
- end
- wait()
- gui.Frame.Line:TweenPosition(UDim2.new(0, 0, 0.02, 0), "In", "Quad", shottimes[math.random(1, 3)], true)
- local timer = shottime
- repeat
- wait(0.01)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- lookat(Hoop.Net)
- timer = timer - 0.01
- until timer <= 0 or not shootdebounce or gui.Frame.Line.Position.Y.Scale < 0.04
- gui.Frame.Line:TweenPosition(gui.Frame.Line.Position, "Out", "Linear", 0.1, true)
- wait(0.12)
- local accurate, open, green = checkaccuracy(gui)
- wait(timer - 0.1)
- do
- local ball = Player.Character.Ball.Value
- Remotes.Change:FireServer(Player.Character.Hold, "Value", false)
- Remotes.Change:FireServer(Player.Character.Ball, "Value", nil)
- Remotes.ShootBall:FireServer(ball, Hoop, shotY, accurate, open, green)
- wait(1)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 16)
- gui.Enabled = false
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- Remotes.CreateValues:FireServer(Player.Character)
- Remotes.Change:FireServer(Humanoid, "JumpPower", 0)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- wait(1)
- Remotes.Change:FireServer(Player.Character.Animate, "Disabled", true)
- wait()
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 16)
- Player.Character["Right Arm"].Touched:connect(function(hit)
- if hit.Name == "Basketball" and hit:FindFirstChild("GameBall") and Player.Character.Block.Value == true then
- for _,v in pairs(game.Players:GetChildren()) do
- if v:IsA("Player") and v.Character and v.Character:FindFirstChild("Ball") and v.Character.Ball.Value == hit and v.Character.Dunk.Value == true then
- Remotes.Change:FireServer(v.Character.Ball, "Value", nil)
- break
- end
- end
- do
- wait()
- Remotes.Change:FireServer(hit, "Velocity", RootPart.CFrame.lookVector * math.random(5, 20) + Vector3.new(0, math.random(0, 30), 0))
- if hit.Name == "Basketball" and hit:FindFirstChild("GameBall") and Player.Character.Steal.Value == true then
- wait(0.3)
- for _,v in pairs(game.Players:GetChildren()) do
- if v:IsA("Player") and v.Character and v.Character:FindFirstChild("Ball") and v.Character.Ball.Value == hit then
- Remotes.Change:FireServer(v.Character.Ball, "Value", nil)
- break
- end
- end
- do
- wait()
- Remotes.Change:FireServer(hit, "Velocity", RootPart.CFrame.lookVector * math.random(5, 20) + Vector3.new(0, math.random(0, 30), 0))
- if hit.Name == "Rim" and hit.Parent:FindFirstChild("Hoop") and Player.Character.Dunk.Value == true then
- madedunk = true
- local ball = Player.Character.Ball.Value
- Remotes.Change:FireServer(Player.Character.Ball, "Value", nil)
- wait()
- if ball then
- Remotes.Change:FireServer(ball.Shoot, "Value", true)
- Remotes.Change:FireServer(ball, "CFrame", hit.CFrame + Vector3.new(0, 1.5, 0))
- end
- end
- end
- end
- end
- end
- end)
- Player.Character["Right Arm"].Touched:connect(function(hit)
- local person = hit.Parent
- if debounce and person:FindFirstChild("Zombie") and person:FindFirstChild("Steal") and person.Steal.Value == true and Player.Character.Ball.Value ~= nil and Player.Character.Handle.Value == "R" then
- debounce = false
- Remotes.Change:FireServer(Player.Character.PickUp, "Value", false)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- wait()
- local ball = Player.Character.Ball.Value
- if ball then
- playanim(Pushed)
- Remotes.Change:FireServer(Player.Character.Ball, "Value", nil)
- wait()
- Remotes.Change:FireServer(ball, "Velocity", RootPart.CFrame.lookVector * -10 + Vector3.new(0, 10, 0))
- end
- wait(1)
- stopanim(Pushed)
- debounce = true
- Remotes.Change:FireServer(Player.Character.PickUp, "Value", true)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 16)
- end
- end)
- Player.Character["Left Arm"].Touched:connect(function(hit)
- local person = hit.Parent
- if debounce and person:FindFirstChild("Zombie") and person:FindFirstChild("Steal") and person.Steal.Value == true and Player.Character.Ball.Value ~= nil and Player.Character.Handle.Value == "L" then
- debounce = false
- Remotes.Change:FireServer(Player.Character.PickUp, "Value", false)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- wait()
- local ball = Player.Character.Ball.Value
- if ball then
- playanim(Pushed)
- Remotes.Change:FireServer(Player.Character.Ball, "Value", nil)
- wait()
- Remotes.Change:FireServer(ball, "Velocity", RootPart.CFrame.lookVector * -10 + Vector3.new(0, 10, 0))
- end
- wait(1)
- stopanim(Pushed)
- debounce = true
- Remotes.Change:FireServer(Player.Character.PickUp, "Value", true)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 16)
- end
- end)
- RootPart.Touched:connect(function(hit)
- local person = hit.Parent
- if debounce and person:FindFirstChild("Zombie") and Player.Character.Screen.Value == true and Player.Character.ScreenTime.Value < 0.15 and game.Players[person.Name].TeamColor ~= Player.TeamColor then
- debounce = false
- Remotes.Change:FireServer(Player.Character.PickUp, "Value", false)
- wait()
- local ball = Player.Character.Ball.Value
- if ball then
- Remotes.Change:FireServer(Player.Character.Ball, "Value", nil)
- wait()
- Remotes.Change:FireServer(ball, "Velocity", RootPart.CFrame.lookVector * 10 + Vector3.new(0, 30, 0))
- end
- local number = math.random(1, 7)
- if number ~= 1 then
- debounce = false
- wait()
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- wait()
- lookat(person.HumanoidRootPart)
- playanim(Fall)
- wait()
- local timer = 0.2
- repeat
- wait(0.01)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(40000, 40000, 40000))
- Remotes.Change:FireServer(RootPart.BV, "velocity", RootPart.CFrame.lookVector * fallspeed)
- timer = timer - 0.01
- until timer <= 0 or debounce
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(0, 0, 0))
- wait(3.25)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 16)
- debounce = true
- else
- do
- debounce = false
- wait()
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- wait()
- lookat(person.HumanoidRootPart)
- playanim(Pushed)
- wait()
- do
- do
- local timer = 0.17
- repeat
- wait(0.01)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(40000, 40000, 40000))
- Remotes.Change:FireServer(RootPart.BV, "velocity", RootPart.CFrame.lookVector * pushedspeed)
- timer = timer - 0.01
- until timer <= 0 or debounce
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(0, 0, 0))
- wait(0.5)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 16)
- debounce = true
- Remotes.Change:FireServer(Player.Character.PickUp, "Value", true)
- debounce = true
- if debounce and person:FindFirstChild("Zombie") and Player.Character.Ball.Value ~= nil and Player.Character.Sprinting.Value == true and game.Players[person.Name].TeamColor ~= Player.TeamColor then
- debounce = false
- Remotes.Change:FireServer(Player.Character.PickUp, "Value", false)
- wait()
- local ball = Player.Character.Ball.Value
- if ball then
- Remotes.Change:FireServer(Player.Character.Ball, "Value", nil)
- wait()
- Remotes.Change:FireServer(ball, "Velocity", RootPart.CFrame.lookVector * 10 + Vector3.new(0, 30, 0))
- end
- local number = math.random(1, 5)
- if number ~= 1 then
- debounce = false
- wait()
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- wait()
- lookat(person.HumanoidRootPart)
- playanim(Fall)
- wait()
- local timer = 0.2
- repeat
- wait(0.01)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(40000, 40000, 40000))
- Remotes.Change:FireServer(RootPart.BV, "velocity", RootPart.CFrame.lookVector * fallspeed)
- timer = timer - 0.01
- until timer <= 0 or debounce
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(0, 0, 0))
- wait(3.25)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 16)
- debounce = true
- else
- do
- debounce = false
- wait()
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- wait()
- lookat(person.HumanoidRootPart)
- playanim(Pushed)
- wait()
- do
- do
- local timer = 0.17
- repeat
- wait(0.01)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(40000, 40000, 40000))
- Remotes.Change:FireServer(RootPart.BV, "velocity", RootPart.CFrame.lookVector * pushedspeed)
- timer = timer - 0.01
- until timer <= 0 or debounce
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(0, 0, 0))
- wait(0.5)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 16)
- debounce = true
- Remotes.Change:FireServer(Player.Character.PickUp, "Value", true)
- debounce = true
- if debounce and person:FindFirstChild("Zombie") and person:FindFirstChild("Guard") and Player.Character.Post.Value == true and Player.Character.Ball.Value ~= nil and game.Players[person.Name].TeamColor ~= Player.TeamColor then
- if person.Guard.Value == true then
- Remotes.Change:FireServer(RootPart, "CFrame", RootPart.CFrame - RootPart.CFrame.lookVector * math.random(2, 4))
- else
- Remotes.Change:FireServer(RootPart, "CFrame", RootPart.CFrame - RootPart.CFrame.lookVector * math.random(0, 2))
- end
- else
- if debounce and person:FindFirstChild("Zombie") and person:FindFirstChild("Screen") and person.Screen.Value == true and person.ScreenTime.Value > 0.15 and Player.Character.Ball.Value == nil and game.Players[person.Name].TeamColor ~= Player.TeamColor then
- Remotes.Change:FireServer(Player.Character.PickUp, "Value", false)
- if Player.Character.Sprinting.Value == true then
- local number = math.random(1, 5)
- if number ~= 1 then
- debounce = false
- wait()
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- wait()
- lookat(person.HumanoidRootPart)
- playanim(Fall)
- wait()
- local timer = 0.2
- repeat
- wait(0.01)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(40000, 40000, 40000))
- Remotes.Change:FireServer(RootPart.BV, "velocity", RootPart.CFrame.lookVector * fallspeed)
- timer = timer - 0.01
- until timer <= 0 or debounce
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(0, 0, 0))
- wait(3.25)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 16)
- debounce = true
- else
- do
- debounce = false
- wait()
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- wait()
- lookat(person.HumanoidRootPart)
- playanim(Pushed)
- wait()
- do
- local timer = 0.17
- repeat
- wait(0.01)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(40000, 40000, 40000))
- Remotes.Change:FireServer(RootPart.BV, "velocity", RootPart.CFrame.lookVector * pushedspeed)
- timer = timer - 0.01
- until timer <= 0 or debounce
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(0, 0, 0))
- wait(0.5)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 16)
- debounce = true
- local number = math.random(1, 5)
- if number == 1 then
- debounce = false
- wait()
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- wait()
- lookat(person.HumanoidRootPart)
- playanim(Fall)
- wait()
- local timer = 0.2
- repeat
- wait(0.01)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(40000, 40000, 40000))
- Remotes.Change:FireServer(RootPart.BV, "velocity", RootPart.CFrame.lookVector * fallspeed)
- timer = timer - 0.01
- until timer <= 0 or debounce
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(0, 0, 0))
- wait(3.25)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 16)
- debounce = true
- else
- do
- debounce = false
- wait()
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- wait()
- lookat(person.HumanoidRootPart)
- playanim(Pushed)
- wait()
- do
- local timer = 0.17
- repeat
- wait(0.01)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(40000, 40000, 40000))
- Remotes.Change:FireServer(RootPart.BV, "velocity", RootPart.CFrame.lookVector * pushedspeed)
- timer = timer - 0.01
- until timer <= 0 or debounce
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(0, 0, 0))
- wait(0.5)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 16)
- debounce = true
- Remotes.Change:FireServer(Player.Character.PickUp, "Value", true)
- if debounce and person:FindFirstChild("Zombie") and person:FindFirstChild("Ball") and person.Post.Value == true and Player.Character.Ball.Value == nil and person.Ball.Value ~= nil then
- if Player.Character.Guard.Value == true then
- Remotes.Change:FireServer(Player.Character.PickUp, "Value", false)
- Remotes.Change:FireServer(Player.Character.Ball, "Value", nil)
- local number = math.random(1, 10)
- if number == 1 then
- debounce = false
- wait()
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- wait()
- lookat(person.HumanoidRootPart)
- playanim(Fall)
- wait()
- local timer = 0.2
- repeat
- wait(0.01)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(40000, 40000, 40000))
- Remotes.Change:FireServer(RootPart.BV, "velocity", RootPart.CFrame.lookVector * fallspeed)
- timer = timer - 0.01
- until timer <= 0 or debounce
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(0, 0, 0))
- wait(3.25)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 16)
- debounce = true
- else
- do
- debounce = false
- wait()
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- wait()
- lookat(person.HumanoidRootPart)
- playanim(Pushed)
- wait()
- do
- local timer = 0.1
- repeat
- wait(0.01)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(40000, 40000, 40000))
- Remotes.Change:FireServer(RootPart.BV, "velocity", RootPart.CFrame.lookVector * (pushedspeed + 1))
- timer = timer - 0.01
- until timer <= 0 or debounce
- stopanim(Pushed)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(0, 0, 0))
- wait()
- debounce = true
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 16)
- Remotes.Change:FireServer(Player.Character.PickUp, "Value", false)
- Remotes.Change:FireServer(Player.Character.Ball, "Value", nil)
- local number = math.random(1, 4)
- if number == 1 then
- debounce = false
- wait()
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- wait()
- lookat(person.HumanoidRootPart)
- playanim(Fall)
- wait()
- local timer = 0.2
- repeat
- wait(0.01)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(40000, 40000, 40000))
- Remotes.Change:FireServer(RootPart.BV, "velocity", RootPart.CFrame.lookVector * fallspeed)
- timer = timer - 0.01
- until timer <= 0 or debounce
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(0, 0, 0))
- wait(3.25)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 16)
- debounce = true
- else
- do
- debounce = false
- wait()
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- wait()
- lookat(person.HumanoidRootPart)
- playanim(Pushed)
- wait()
- do
- local timer = 0.14
- repeat
- wait(0.01)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(40000, 40000, 40000))
- Remotes.Change:FireServer(RootPart.BV, "velocity", RootPart.CFrame.lookVector * pushedspeed)
- timer = timer - 0.01
- until timer <= 0 or debounce
- stopanim(Pushed)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(0, 0, 0))
- wait(0.5)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 16)
- debounce = true
- Remotes.Change:FireServer(Player.Character.PickUp, "Value", true)
- if debounce and person:FindFirstChild("Zombie") and person:FindFirstChild("Guard") and person.Guard.Value == true and Player.Character.Ball.Value ~= nil and game.Players[person.Name].TeamColor ~= Player.TeamColor then
- Remotes.Change:FireServer(Player.Character.PickUp, "Value", false)
- local number = math.random(1, 10)
- if number == 1 then
- Remotes.Change:FireServer(Player.Character.Ball, "Value", nil)
- debounce = false
- wait()
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- wait()
- lookat(person.HumanoidRootPart)
- playanim(Fall)
- wait()
- local timer = 0.2
- repeat
- wait(0.01)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(40000, 40000, 40000))
- Remotes.Change:FireServer(RootPart.BV, "velocity", RootPart.CFrame.lookVector * fallspeed)
- timer = timer - 0.01
- until timer <= 0 or debounce
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(0, 0, 0))
- wait(3.25)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 16)
- debounce = true
- else
- do
- local pnumber = math.random(1, 5)
- if pnumber == 1 then
- Remotes.Change:FireServer(Player.Character.Ball, "Value", nil)
- end
- debounce = false
- wait()
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- wait()
- lookat(person.HumanoidRootPart)
- playanim(Pushed)
- wait()
- do
- local timer = 0.08
- repeat
- wait(0.01)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(40000, 40000, 40000))
- Remotes.Change:FireServer(RootPart.BV, "velocity", RootPart.CFrame.lookVector * (pushedspeed - 7))
- timer = timer - 0.01
- until timer <= 0 or debounce
- stopanim(Pushed)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(0, 0, 0))
- debounce = true
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 16)
- Remotes.Change:FireServer(Player.Character.PickUp, "Value", true)
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end)
- Mouse.KeyDown:connect(function(key)
- if debounce then
- if key == run and Player.Character.Post.Value == false then
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 18)
- Remotes.Change:FireServer(Player.Character.Look, "Value", false)
- Remotes.Change:FireServer(Player.Character.Sprinting, "Value", true)
- wait(0.5)
- repeat
- wait()
- until not debounce or Player.Character.Stamina.Value == 0 or Player.Character.Sprinting.Value == false
- Remotes.Change:FireServer(Player.Character.Sprinting, "Value", false)
- if debounce then
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 16)
- end
- Remotes.Change:FireServer(Player.Character.Look, "Value", true)
- else
- if key == handle then
- if Player.Character.Handle.Value == "R" then
- Remotes.Change:FireServer(Player.Character.Handle, "Value", "L")
- else
- Remotes.Change:FireServer(Player.Character.Handle, "Value", "R")
- end
- else
- if key == shoot and Player.Character.Ball.Value ~= nil then
- issprinting = Player.Character.Sprinting.Value
- shotsprint = Player.Character.Sprinting.Value
- wasposting = Player.Character.Post.Value
- debounce = false
- shootball()
- debounce = true
- else
- if Player.userId == 4925605 and key == dunk and combo and Player.Character.Sprinting.Value == true and Player.Character.Ball.Value ~= nil and checkrange() > 19 and checkrange() < 21 then
- madedunk = false
- debounce = false
- wait(0.1)
- local Court = workspace:FindFirstChild("Court_" .. Player.Court.Value)
- if Court then
- Remotes.Change:FireServer(Court.Pointer, "Value", 2)
- end
- Remotes.Change:FireServer(Player.Character.Hold, "Value", true)
- Remotes.Change:FireServer(Player.Character.PickUp, "Value", false)
- Remotes.Change:FireServer(Player.Character.Dunk, "Value", true)
- Remotes.Change:FireServer(Player.Character.Handle, "Value", "L")
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- lookat(Hoop.Net)
- playanim(LegDunk)
- local timer = dunktime
- repeat
- wait(0.01)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(40000, 40000, 40000))
- Remotes.Change:FireServer(RootPart.BV, "velocity", RootPart.CFrame.lookVector * dunkspeed)
- if timer < 0.19 then
- Remotes.Change:FireServer(Player.Character.Handle, "Value", "R")
- end
- timer = timer - 0.01
- until timer <= 0 or debounce or madedunk
- wait()
- if madedunk then
- stopanim(LegDunk)
- playanim(HoldLegDunk)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(0, 0, 0))
- wait(2)
- else
- Remotes.Change:FireServer(Player.Character.Ball, "Value", nil)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(0, 0, 0))
- wait(1.5)
- end
- Remotes.Change:FireServer(Player.Character.Ball, "Value", nil)
- wait(0.2)
- Remotes.Change:FireServer(Player.Character.Dunk, "Value", false)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(0, 0, 0))
- wait(0.5)
- stopanim(LegDunk)
- debounce = true
- Remotes.Change:FireServer(Player.Character.Hold, "Value", false)
- Remotes.Change:FireServer(Player.Character.PickUp, "Value", true)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 16)
- else
- do
- if key == dunk and Player.Character.Sprinting.Value == true and Player.Character.Ball.Value ~= nil and checkrange() > 19 and checkrange() < 21 then
- madedunk = false
- debounce = false
- wait(0.1)
- local Court = workspace:FindFirstChild("Court_" .. Player.Court.Value)
- if Court then
- Remotes.Change:FireServer(Court.Pointer, "Value", 2)
- end
- Remotes.Change:FireServer(Player.Character.Hold, "Value", true)
- Remotes.Change:FireServer(Player.Character.PickUp, "Value", false)
- Remotes.Change:FireServer(Player.Character.Dunk, "Value", true)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- lookat(Hoop.Net)
- playanim(Dunk)
- local timer = dunktime
- repeat
- wait(0.01)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(40000, 40000, 40000))
- Remotes.Change:FireServer(RootPart.BV, "velocity", RootPart.CFrame.lookVector * dunkspeed)
- timer = timer - 0.01
- until timer <= 0 or debounce or madedunk
- wait()
- if madedunk then
- stopanim(Dunk)
- playanim(HoldDunk)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(0, 0, 0))
- wait(2)
- else
- Remotes.Change:FireServer(Player.Character.Ball, "Value", nil)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(0, 0, 0))
- wait(1.5)
- end
- Remotes.Change:FireServer(Player.Character.Ball, "Value", nil)
- wait(0.2)
- Remotes.Change:FireServer(Player.Character.Dunk, "Value", false)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(0, 0, 0))
- wait(0.5)
- stopanim(Dunk)
- debounce = true
- Remotes.Change:FireServer(Player.Character.Hold, "Value", false)
- Remotes.Change:FireServer(Player.Character.PickUp, "Value", true)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 16)
- else
- do
- if key == spindunk and Player.Character.Sprinting.Value == true and Player.Character.Ball.Value ~= nil and checkrange() > 19 and checkrange() < 21 then
- madedunk = false
- debounce = false
- wait(0.1)
- local Court = workspace:FindFirstChild("Court_" .. Player.Court.Value)
- if Court then
- Remotes.Change:FireServer(Court.Pointer, "Value", 2)
- end
- Remotes.Change:FireServer(Player.Character.Hold, "Value", true)
- Remotes.Change:FireServer(Player.Character.PickUp, "Value", false)
- Remotes.Change:FireServer(Player.Character.Dunk, "Value", true)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- lookat(Hoop.Net)
- playanim(SpinDunk)
- local timer = dunktime
- repeat
- wait(0.01)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(40000, 40000, 40000))
- Remotes.Change:FireServer(RootPart.BV, "velocity", RootPart.CFrame.lookVector * dunkspeed)
- timer = timer - 0.01
- until timer <= 0 or debounce or madedunk
- wait()
- if madedunk then
- stopanim(Dunk)
- playanim(HoldDunk)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(0, 0, 0))
- wait(2)
- else
- Remotes.Change:FireServer(Player.Character.Ball, "Value", nil)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(0, 0, 0))
- wait(1.5)
- end
- Remotes.Change:FireServer(Player.Character.Ball, "Value", nil)
- wait(0.2)
- Remotes.Change:FireServer(Player.Character.Dunk, "Value", false)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(0, 0, 0))
- wait(0.5)
- stopanim(SpinDunk)
- debounce = true
- Remotes.Change:FireServer(Player.Character.Hold, "Value", false)
- Remotes.Change:FireServer(Player.Character.PickUp, "Value", true)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 16)
- else
- do
- if Player.InGame.Value == true and key == guard and Player.Character.Ball.Value == nil and Player.Character.Stamina.MaxValue / 1.2 < Player.Character.Stamina.Value then
- Remotes.Change:FireServer(Humanoid, "AutoRotate", false)
- Remotes.Change:FireServer(Player.Character.PickUp, "Value", false)
- Remotes.Change:FireServer(Player.Character.Guard, "Value", true)
- wait(0.1)
- repeat
- wait()
- until Player.Character.Guard.Value == false or Player.Character.Ball.Value ~= nil or Player.Character.Sprinting.Value == true
- Remotes.Change:FireServer(Humanoid, "AutoRotate", true)
- Remotes.Change:FireServer(Player.Character.Guard, "Value", false)
- Remotes.Change:FireServer(Player.Character.PickUp, "Value", true)
- else
- if key == faceway then
- Remotes.Change:FireServer(Humanoid, "AutoRotate", false)
- else
- if Player.InGame.Value == true and key == dropball and Player.Character.Ball.Value ~= nil then
- debounce = false
- wait()
- Remotes.Change:FireServer(Player.Character.PickUp, "Value", false)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- playanim(DropBall)
- wait(0.5)
- local ball = Player.Character.Ball.Value
- if ball then
- Remotes.Change:FireServer(Player.Character.Ball, "Value", nil)
- wait()
- Remotes.Change:FireServer(ball, "CFrame", RootPart.CFrame + RootPart.CFrame.lookVector * 3.5 + Vector3.new(0, -2, 0))
- end
- wait(0.3)
- stopanim(DropBall)
- debounce = true
- Remotes.Change:FireServer(Player.Character.PickUp, "Value", true)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 16)
- else
- do
- if Player.InGame.Value == true and key == screen and Player.Character.Ball.Value == nil then
- debounce = false
- Remotes.Change:FireServer(Player.Character.PickUp, "Value", false)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0.1)
- Remotes.Change:FireServer(Player.Character.Screen, "Value", true)
- wait(0.2)
- playanim(Screen)
- repeat
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0.1)
- wait()
- until Player.Character.Screen.Value == false or debounce
- stopanim(Screen)
- Remotes.Change:FireServer(Player.Character.Screen, "Value", false)
- debounce = true
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 16)
- Remotes.Change:FireServer(Player.Character.PickUp, "Value", true)
- else
- if Player.InGame.Value == true and key == block and Player.Character.Ball.Value == nil then
- debounce = false
- wait()
- Remotes.Change:FireServer(Player.Character.PickUp, "Value", false)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 5)
- wait()
- playanim(Block)
- wait(0.2)
- Remotes.Change:FireServer(Player.Character.Block, "Value", true)
- wait(0.35)
- Remotes.Change:FireServer(Player.Character.Block, "Value", false)
- wait(1.15)
- stopanim(Block)
- debounce = true
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 16)
- Remotes.Change:FireServer(Player.Character.PickUp, "Value", true)
- else
- if Player.InGame.Value == true and key == steal and Player.Character.Ball.Value == nil then
- debounce = false
- wait()
- Remotes.Change:FireServer(Player.Character.PickUp, "Value", false)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 9)
- playanim(Steal)
- wait(0.1)
- Remotes.Change:FireServer(Player.Character.Steal, "Value", true)
- wait(0.4)
- Remotes.Change:FireServer(Player.Character.Steal, "Value", false)
- wait(1)
- stopanim(Steal)
- debounce = true
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 16)
- Remotes.Change:FireServer(Player.Character.PickUp, "Value", true)
- else
- if key == post and Player.Character.Ball.Value ~= nil and checkrange() < 38 and Player.Character.Sprinting.Value == false then
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- lookat(Hoop.Net)
- Remotes.Change:FireServer(Player.Character.Post, "Value", true)
- wait(0.1)
- repeat
- wait()
- if checkrange() > 17 then
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(40000, 40000, 40000))
- Remotes.Change:FireServer(RootPart.BV, "velocity", RootPart.CFrame.lookVector * postspeed)
- else
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(0, 0, 0))
- Remotes.Change:FireServer(RootPart.BV, "velocity", RootPart.CFrame.lookVector * postspeed)
- end
- until Player.Character.Post.Value == false or not debounce or Player.Character.Ball.Value == nil
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(0, 0, 0))
- Remotes.Change:FireServer(Player.Character.Post, "Value", false)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 16)
- else
- if dropdebounce and key == poststop and Player.Character.Ball.Value ~= nil then
- dropdebounce = false
- debounce = false
- lookat(Hoop.Net)
- playanim(PostStop)
- wait()
- local timer = droptime
- repeat
- wait(0.01)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(40000, 40000, 40000))
- Remotes.Change:FireServer(RootPart.BV, "velocity", RootPart.CFrame.lookVector * poststopspeed)
- timer = timer - 0.01
- until timer <= 0 or Player.Character.Ball.Value == nil or debounce
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(0, 0, 0))
- Remotes.Change:FireServer(Player.Character.Post, "Value", false)
- stopanim(PostStop)
- debounce = true
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 16)
- wait(2)
- dropdebounce = true
- else
- do
- if spindebounce and key == postspinleft and Player.Character.Ball.Value ~= nil then
- spindebounce = false
- debounce = false
- playanim(PostSpinL)
- wait()
- Remotes.Change:FireServer(Player.Character.Hold, "Value", true)
- local timer = spintime
- repeat
- wait(0.01)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(40000, 40000, 40000))
- Remotes.Change:FireServer(RootPart.BV, "velocity", RootPart.CFrame.lookVector * spinspeed)
- timer = timer - 0.01
- until timer <= 0 or Player.Character.Ball.Value == nil or debounce
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(0, 0, 0))
- Remotes.Change:FireServer(Player.Character.Post, "Value", false)
- Remotes.Change:FireServer(Player.Character.Hold, "Value", false)
- stopanim(PostSpinL)
- debounce = true
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 16)
- wait(2.5)
- spindebounce = true
- else
- do
- if spindebounce and key == postspinright and Player.Character.Ball.Value ~= nil then
- spindebounce = false
- debounce = false
- Remotes.Change:FireServer(Player.Character.Hold, "Value", true)
- playanim(PostSpinR)
- wait()
- local timer = spintime
- repeat
- wait(0.01)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 0)
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(40000, 40000, 40000))
- Remotes.Change:FireServer(RootPart.BV, "velocity", RootPart.CFrame.lookVector * spinspeed)
- timer = timer - 0.01
- until timer <= 0 or Player.Character.Ball.Value == nil or debounce
- Remotes.Change:FireServer(RootPart.BV, "MaxForce", Vector3.new(0, 0, 0))
- stopanim(PostSpinR)
- Remotes.Change:FireServer(Player.Character.Post, "Value", false)
- Remotes.Change:FireServer(Player.Character.Hold, "Value", false)
- debounce = true
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 16)
- wait(2.5)
- spindebounce = true
- else
- do
- if key == pass and Player.Character.Ball.Value ~= nil then
- Remotes.Change:FireServer(Player.Character.Hold, "Value", true)
- Remotes.Change:FireServer(Player.Character.PickUp, "Value", false)
- ispassing = true
- if Player.Character.Sprinting.Value == true then
- debounce = false
- wait()
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 2)
- playanim(RegPass)
- wait()
- local timer = 0.05
- local power = 40
- repeat
- wait(0.005)
- Remotes.Change:FireServer(RootPart, "CFrame", CFrame.new(RootPart.Position, Vector3.new(Mouse.Hit.X, RootPart.Position.Y, Mouse.Hit.Z)))
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 2)
- timer = timer - 0.01
- power = power + 10
- until timer <= 0 or Player.Character.Ball.Value == nil or debounce or not ispassing
- print(power .. "%")
- wait()
- local ball = Player.Character.Ball.Value
- if ball then
- Remotes.Change:FireServer(Player.Character.Ball, "Value", nil)
- wait()
- Remotes.Change:FireServer(ball, "CFrame", RootPart.CFrame + RootPart.CFrame.lookVector * 3 + Vector3.new(0, 2, 0))
- wait(0.1)
- Remotes.Change:FireServer(ball, "Velocity", RootPart.CFrame.lookVector * (power) + Vector3.new(0, 15 + (power) / 4, 0))
- end
- wait(0.4)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 16)
- else
- do
- debounce = false
- wait()
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 2)
- playanim(HighPass)
- wait()
- local timer = 0.05
- local power = 40
- repeat
- wait(0.005)
- Remotes.Change:FireServer(RootPart, "CFrame", CFrame.new(RootPart.Position, Vector3.new(Mouse.Hit.X, RootPart.Position.Y, Mouse.Hit.Z)))
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 2)
- timer = timer - 0.01
- power = power + 9
- until timer <= 0 or Player.Character.Ball.Value == nil or debounce or not ispassing
- print(power .. "%")
- wait()
- do
- local ball = Player.Character.Ball.Value
- if ball then
- Remotes.Change:FireServer(Player.Character.Ball, "Value", nil)
- wait()
- Remotes.Change:FireServer(ball, "CFrame", RootPart.CFrame + RootPart.CFrame.lookVector * 1 + Vector3.new(0, 3, 0))
- wait(0.1)
- Remotes.Change:FireServer(ball, "Velocity", RootPart.CFrame.lookVector * (power) + Vector3.new(0, 30 + (power) / 3.5, 0))
- end
- wait(0.4)
- Remotes.Change:FireServer(Humanoid, "WalkSpeed", 16)
- Remotes.Change:FireServer(Player.Character.Hold, "Value", false)
- Remotes.Change:FireServer(Player.Character.PickUp, "Value", true)
- debounce = true
- if key == holder then
- combo = true
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end)
- Mouse.KeyUp:connect(function(key)
- if key == run then
- Remotes.Change:FireServer(Player.Character.Sprinting, "Value", false)
- issprinting = false
- else
- if key == shoot then
- shootdebounce = false
- else
- if key == guard then
- Remotes.Change:FireServer(Player.Character.Guard, "Value", false)
- else
- if key == pass then
- ispassing = false
- else
- if key == screen then
- Remotes.Change:FireServer(Player.Character.Screen, "Value", false)
- else
- if key == faceway then
- Remotes.Change:FireServer(Humanoid, "AutoRotate", true)
- else
- if key == holder then
- combo = false
- end
- end
- end
- end
- end
- end
- end
- end)
- Mouse.Button1Down:connect(function()
- if Player.Character.Guard.Value == true and workspace:FindFirstChild("Court_" .. Player.Court.Value) and workspace["Court_" .. Player.Court.Value].Ready.Value == true then
- Remotes.Change:FireServer(RootPart, "CFrame", CFrame.new(RootPart.Position, Vector3.new(Mouse.Hit.X, RootPart.Position.Y, Mouse.Hit.Z)))
- end
- end)
- Remotes.Loop:FireServer()
- Remotes.Change:FireServer(Player.Character.Save, "Value", true)
- while 1 do
- while 1 do
- wait(1)
- checkhoops()
- Remotes.Change:FireServer(Player.Character.Debounc, "Value", debounce)
- Remotes.Change:FireServer(Player.Character.Head.StaminaGui.TextLabe, "TextColor3", Player.TeamColor.Color)
- for _,v in pairs(workspace:GetChildren()) do
- if v.Name:sub(1, 6) == "Court_" and v:FindFirstChild("Court") then
- if Player.Court.Value == v.Court.Value and Player.TeamColor == BrickColor.Red() then
- Hoop = v.Game_Hoop1
- else
- if Player.Court.Value == v.Court.Value and Player.TeamColor == BrickColor.Blue() then
- Hoop = v.Game_Hoop2
- end
- end
- end
- end
- if Player.Character.Screen.Value == true then
- Player.Character.ScreenTime.Value = Player.Character.ScreenTime.Value + 0.01
- -- DECOMPILER ERROR at PC401: LeaveBlock: unexpected jumping out IF_THEN_STMT
- -- DECOMPILER ERROR at PC401: LeaveBlock: unexpected jumping out IF_STMT
- end
- end
- Player.Character.ScreenTime.Value = 0
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement