It's a fly script but it seems to error with CFrame isn't a memeber of playermouse
local uis = game:GetService("UserInputService") local rs = game:GetService("RunService") local DigAnimation = Instance.new('Animation') DigAnimation.AnimationId = "rbxassetid://4332175810" DAnimation = game.Players.LocalPlayer.Character:WaitForChild("Humanoid", 10):LoadAnimation(DigAnimation) local button_clicked = false local myPlayer = game.Players.LocalPlayer local myChar = myPlayer.Character local myHRP = myChar:WaitForChild("HumanoidRootPart") local camera = myPlayer:GetMouse() local button = script.Parent local flying = false local bp = Instance.new("BodyPosition", myHRP) bp.MaxForce = Vector3.new() bp.D = 10 bp.P = 10000 local bg = Instance.new("BodyGyro", myHRP) bg.MaxTorque = Vector3.new() bg.D = 10 local Forward = Instance.new("BodyGyro",myHRP) function fly() wait() myPlayer.CameraMinZoomDistance = (5) myPlayer.CameraMaxZoomDistance = (20) flying = true local button_clicked = false DAnimation:Play() bp.MaxForce = Vector3.new(10000,10000,10000) bg.MaxTorque = Vector3.new(10000,10000,10000) while flying do wait() bp.Position = myHRP.Position +((myHRP.Position - camera.CFrame.p).unit) bg.CFrame = CFrame.new(camera.CFrame.p, myHRP.Position) Forward.Velocity = camera.Hit.lookVector*150 end end function endFlying() wait() myPlayer.CameraMinZoomDistance = (0.5) myPlayer.CameraMaxZoomDistance = (40) local button_clicked = false DAnimation:Stop() bp.MaxForce = Vector3.new() bg.MaxTorque = Vector3.new() flying = false end button.MouseButton1Down:Connect (function() if not flying then local button_clicked = false fly() else local button_clicked = false endFlying() end end)