Advertisement
bmrx13

a new paste? wow

Apr 25th, 2020
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.90 KB | None | 0 0
  1. --By Rufus14
  2. owner = game:GetService("Players").LocalPlayer
  3. wait(0.1)
  4. owner.Character:WaitForChild("Head")
  5. mouse = owner:GetMouse()
  6. --owner.CameraMode = "LockFirstPerson"
  7. local part = Instance.new("Part", owner.Character.Head)
  8. part.Size = Vector3.new(0.1,0.1,0.1)
  9. part.Transparency = 1
  10. part.CanCollide = false
  11. part.Name = "camera"
  12. part:BreakJoints()
  13. local weld = Instance.new("Weld", part)
  14. weld.Part0 = owner.Character.Head
  15. weld.Part1 = part
  16. weld.C0 = CFrame.new(0,0,-1)
  17. cangoup = true
  18. rolling = false
  19. while game:GetService("RunService").RenderStepped:wait() do
  20. if (workspace.CurrentCamera.CFrame.p - part.Position).magnitude <= 1.7 then
  21. 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))
  22. workspace.CurrentCamera.FieldOfView = 80
  23. for i,v in pairs(owner.Character:GetChildren()) do
  24. if v.ClassName == "Part" or v.ClassName == "MeshPart" and v.Name ~= "Head" then
  25. v.LocalTransparencyModifier = 0
  26. end
  27. if v.ClassName == "Accessory" then
  28. v.Handle.Transparency = 1
  29. end
  30. end
  31. if owner.Character.Head:findFirstChildOfClass("Decal") then
  32. owner.Character.Head:findFirstChildOfClass("Decal").Transparency = 1
  33. end
  34. owner.Character.Head.Transparency = 1
  35. workspace.CurrentCamera.CameraSubject = part
  36. else
  37. for i,v in pairs(owner.Character:GetChildren()) do
  38. if v.ClassName == "Accessory" then
  39. v.Handle.Transparency = 0
  40. end
  41. end
  42. workspace.CurrentCamera.FieldOfView = 70
  43. owner.Character.Head.Transparency = 0
  44. if owner.Character.Head:findFirstChildOfClass("Decal") then
  45. owner.Character.Head:findFirstChildOfClass("Decal").Transparency = 0
  46. end
  47. workspace.CurrentCamera.CameraSubject = owner.Character
  48. end
  49. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement