Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Cam = game.Workspace.Camera
- local Player = game.Players.LocalPlayer
- local Tool = script.Parent
- local breaking = false
- function getBall()
- local Table = {}
- for i, v in pairs(workspace:GetDescendants()) do
- if breaking == true then
- break
- end
- if v.Name == 'Flickball' then
- if v:IsA('Tool') or v:IsA('Part') then
- table.insert(Table, (v:IsA('Tool') and v:FindFirstChild('Handle') or v))
- end
- end
- end
- return Table[1] and Table[1] or nil
- end
- function onSelected(mouse)
- local breaking = false
- wait(.05)
- local Ball = getBall()
- if not Ball then return end
- Cam.CameraSubject = Ball
- wait(0.1)
- onSelected()
- end
- function onDeselected()
- local breaking = true
- Cam.CameraSubject = Player.Character.Humanoid
- Cam.FieldOfView = 70
- end
- Tool.Equipped:connect(onSelected)
- --[[Tool.Equipped:Connect(function(mouse)
- mouse.Button1Down:Connect(onSelected)
- end)]]
- Tool.Unequipped:connect(onDeselected)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement