Advertisement
Guest User

phenom camlock WORKING

a guest
Apr 22nd, 2022
7,409
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.00 KB | None | 0 0
  1. local Player = game.Players.LocalPlayer
  2. local Camera = workspace.CurrentCamera
  3. Holding = false
  4. e = false
  5. isdoing = false
  6. function findGoals()
  7. for i, v in pairs(workspace:GetDescendants()) do
  8. if v.Name == 'Goal' then
  9. v.Parent = workspace
  10. end
  11. end
  12. end
  13. local function findClosestPart(position)
  14. local closestPart, closestPartMagnitude
  15. local tmpMagnitude
  16. for i, v in pairs(workspace:GetChildren()) do
  17. if v.Name == 'Goal' then
  18. if closestPart then
  19. tmpMagnitude = (position - v.Position).magnitude
  20. if tmpMagnitude < closestPartMagnitude then
  21. closestPart = v
  22. closestPartMagnitude = tmpMagnitude
  23. end
  24. else
  25. closestPart = v
  26. closestPartMagnitude = (position - v.Position).magnitude
  27. end
  28. end
  29. end
  30. return closestPart
  31. end
  32. --//vb
  33. local player = game.Players.LocalPlayer
  34. local camera = game.Workspace.CurrentCamera
  35. local character = player.Character
  36. local head = character.Head
  37. local torso = character.Torso
  38. findGoals()
  39. local function cam()
  40. while wait() do
  41. if isdoing == true then
  42. local pos = head.Position
  43. local partyGoal = findClosestPart(head.Position)
  44. local lookAt = partyGoal.Position + Vector3.new(0,90,0)
  45. local mag = (character.PrimaryPart.Position - partyGoal.Position).magnitude
  46. local cameraCFrame = CFrame.new(pos, lookAt)
  47. Camera.CFrame = cameraCFrame
  48. else
  49. return nil
  50. end
  51. end
  52. end
  53.  
  54. game.Players.LocalPlayer.Character.ChildAdded:Connect(function(child)
  55. local pv = game.Players.LocalPlayer.Character.Basketball
  56. local UIS = game:GetService('UserInputService')
  57.  
  58. game.Players.LocalPlayer.Character:WaitForChild("Humanoid").Jumping:Connect(function()
  59. isdoing = true
  60. if game.Players.LocalPlayer.Character.Basketball then
  61. local lookthat = findClosestPart(game.Players.LocalPlayer.Character.Torso.Position)
  62. local pvm = (lookthat.Position - game.Players.LocalPlayer.Character.Torso.Position).magnitude
  63. if pvm >= 30 then
  64. if pvm <=44 then
  65. pv.PowerValue.Value = 75
  66. cam()
  67. end
  68. end
  69. local lookthat = findClosestPart(game.Players.LocalPlayer.Character.Torso.Position)
  70. local pvm = (lookthat.Position - game.Players.LocalPlayer.Character.Torso.Position).magnitude
  71. if pvm >= 45 then
  72. if pvm <=53 then
  73. pv.PowerValue.Value = 80
  74. cam()
  75. end
  76. end
  77. local lookthat = findClosestPart(game.Players.LocalPlayer.Character.Torso.Position)
  78. local pvm = (lookthat.Position - game.Players.LocalPlayer.Character.Torso.Position).magnitude
  79. if pvm >= 54 then
  80. if pvm <=66 then
  81. pv.PowerValue.Value = 85
  82. cam()
  83.  
  84. end
  85. end
  86. local lookthat = findClosestPart(game.Players.LocalPlayer.Character.Torso.Position)
  87. local pvm = (lookthat.Position - game.Players.LocalPlayer.Character.Torso.Position).magnitude
  88. if pvm >= 67 then
  89. if pvm <=76 then
  90. pv.PowerValue.Value = 90
  91. cam()
  92.  
  93.  
  94. end
  95. end
  96. local lookthat = findClosestPart(game.Players.LocalPlayer.Character.Torso.Position)
  97. local pvm = (lookthat.Position - game.Players.LocalPlayer.Character.Torso.Position).magnitude
  98. if pvm >= 77 then
  99. if pvm <=84 then
  100. pv.PowerValue.Value = 95
  101. cam()
  102.  
  103. end
  104. end
  105. local lookthat = findClosestPart(game.Players.LocalPlayer.Character.Torso.Position)
  106. local pvm = (lookthat.Position - game.Players.LocalPlayer.Character.Torso.Position).magnitude
  107. if pvm >= 85 then
  108. if pvm <=91 then
  109. pv.PowerValue.Value = 100
  110. cam()
  111.  
  112.  
  113. end
  114. end
  115. end
  116. end)
  117. end)
  118.  
  119. local UIS = game:service('UserInputService')
  120. UIS.InputBegan:connect(function(l)
  121. if l.UserInputType == Enum.UserInputType.MouseButton1 then
  122. isdoing = false
  123. end
  124. end)
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement