Advertisement
Guest User

rb script

a guest
Sep 1st, 2019
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --// MAINVARS //--
  2.  
  3. remotes = game:GetService("ReplicatedStorage").gameplay
  4. mouse = game.Players.LocalPlayer:GetMouse()
  5.  
  6. --// EDITVARS //--
  7.  
  8. _G.accuracy = 99 -- Accuracy; 99 Makes it in almost always; 100 is always a green;
  9. _G.key = "f" -- Key to press to activate;
  10.  
  11. --// SCRIPT //--
  12.  
  13. print("Press f to shoot! \nPress q to toggle accuracy between 99 and 100!")
  14.  
  15. --// ACCURACY SWITCH
  16.  
  17. mouse.KeyDown:connect(function(k)
  18. if k == "q" then
  19. if _G.accuracy == 99 then
  20. _G.accuracy = 100elseif _G.accuracy == 100 then
  21. _G.accuracy = 99
  22. end
  23. print(_G.accuracy)
  24. end
  25. end)
  26.  
  27. --// SHOOT
  28.  
  29. mouse.KeyDown:connect(function(k)
  30. if k == G.key then
  31. for ,v in pairs(game.Workspace:GetChildren()) do
  32. if v.Name == "Basketball" then
  33. if v.controller.Value == game.Players.LocalPlayer.Name then
  34. local oncourt = "Court"..tonumber(game.Players.LocalPlayer.System.OnCourt.Value)
  35. local onhoop = "_Hoop"..tonumber(game.Players.LocalPlayer.System.OnTeam.Value)
  36. remotes.character.value:FireServer("shooting", true)
  37. if game.Workspace[oncourt]:FindFirstChild(onhoop) then
  38. ot:FireServer(game.Workspace[oncourt][onhoop], _G.accuracy, true)
  39. elseif game.Wv.shoorkspace[oncourt]:FindFirstChild("_Hoop1") then
  40. v.shoot:FireServer(game.Workspace[oncourt]["_Hoop1"], _G.accuracy, true)
  41. end
  42. end
  43. end
  44. end
  45. end
  46. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement