Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --By Rufus14
- owner = game:GetService("Players").LocalPlayer
- wait(0.1)
- owner.Character:WaitForChild("Head")
- mouse = owner:GetMouse()
- --owner.CameraMode = "LockFirstPerson"
- local part = Instance.new("Part", owner.Character.Head)
- part.Size = Vector3.new(0.1,0.1,0.1)
- part.Transparency = 1
- part.CanCollide = false
- part.Name = "camera"
- part:BreakJoints()
- local weld = Instance.new("Weld", part)
- weld.Part0 = owner.Character.Head
- weld.Part1 = part
- weld.C0 = CFrame.new(0,0,-1)
- cangoup = true
- rolling = false
- while game:GetService("RunService").RenderStepped:wait() do
- if (workspace.CurrentCamera.CFrame.p - part.Position).magnitude <= 1.7 then
- game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position,Vector3.new(mouse.Hit.p.x,game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position.y,mouse.Hit.p.z))
- workspace.CurrentCamera.FieldOfView = 80
- for i,v in pairs(owner.Character:GetChildren()) do
- if v.ClassName == "Part" or v.ClassName == "MeshPart" and v.Name ~= "Head" then
- v.LocalTransparencyModifier = 0
- end
- if v.ClassName == "Accessory" then
- v.Handle.Transparency = 1
- end
- end
- if owner.Character.Head:findFirstChildOfClass("Decal") then
- owner.Character.Head:findFirstChildOfClass("Decal").Transparency = 1
- end
- owner.Character.Head.Transparency = 1
- workspace.CurrentCamera.CameraSubject = part
- else
- for i,v in pairs(owner.Character:GetChildren()) do
- if v.ClassName == "Accessory" then
- v.Handle.Transparency = 0
- end
- end
- workspace.CurrentCamera.FieldOfView = 70
- owner.Character.Head.Transparency = 0
- if owner.Character.Head:findFirstChildOfClass("Decal") then
- owner.Character.Head:findFirstChildOfClass("Decal").Transparency = 0
- end
- workspace.CurrentCamera.CameraSubject = owner.Character
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement