TheUnknownDiscord

Untitled

Nov 5th, 2021 (edited)
37
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. NLS([[ -- thank rufus for head look and stuf
  2. owner = game:GetService("Players").LocalPlayer
  3. owner.Character:WaitForChild("Head")
  4. mouse = owner:GetMouse()
  5. local remote = owner.Character:WaitForChild("lookremote")
  6. local remote2 = owner.Character:WaitForChild("lookremote2")
  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. while game:GetService("RunService").RenderStepped:wait() do
  18. remote:FireServer(mouse.Hit.p, mouse.Origin.p, workspace.CurrentCamera.CFrame)
  19. if (workspace.CurrentCamera.CFrame.p - part.Position).magnitude <= 1.7 then
  20. 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))
  21. workspace.CurrentCamera.FieldOfView = 100
  22. for i,v in pairs(owner.Character:GetChildren()) do
  23. if v.ClassName == "Part" or v.ClassName == "MeshPart" and v.Name ~= "Head" then
  24. v.LocalTransparencyModifier = 0
  25. end
  26. if v.ClassName == "Accessory" then
  27. v.Handle.Transparency = 1
  28. end
  29. end
  30. if owner.Character.Head:findFirstChildOfClass("Decal") then
  31. owner.Character.Head:findFirstChildOfClass("Decal").Transparency = 1
  32. end
  33. owner.Character.Head.Transparency = 1
  34. workspace.CurrentCamera.CameraSubject = part
  35. else
  36. for i,v in pairs(owner.Character:GetChildren()) do
  37. if v.ClassName == "Accessory" then
  38. v.Handle.Transparency = 0
  39. end
  40. end
  41. workspace.CurrentCamera.FieldOfView = 70
  42. owner.Character.Head.Transparency = 0
  43. if owner.Character.Head:findFirstChildOfClass("Decal") then
  44. owner.Character.Head:findFirstChildOfClass("Decal").Transparency = 0
  45. end
  46. workspace.CurrentCamera.CameraSubject = owner.Character
  47. end
  48. end
  49. mouse.Button1Down:Connect(function()
  50. remote2:FireServer()
  51. end)
  52. ]], owner.Character)
  53. local remote = Instance.new("RemoteEvent", owner.Character)
  54. remote.Name = "lookremote"
  55. local remote2 = Instance.new("RemoteEvent", owner.Character)
  56. remote2.Name = "lookremote2"
  57. local headd = Instance.new("Weld", owner.Character.Torso)
  58. headd.Part0 = owner.Character.Torso
  59. headd.Part1 = owner.Character.Head
  60. headd.C0 = CFrame.new(0,1,0)
  61. headd.Name = "HeaddWeld"
  62. local armm = Instance.new("Weld", owner.Character.Torso)
  63. armm.Part0 = owner.Character.Torso
  64. armm.Part1 = owner.Character["Right Arm"]
  65. armm.C0 = CFrame.new(2,2,-1)
  66. armm.Name = "armmWeld"
  67. function look(plr, where, origin, cameracf)
  68. if plr == owner then
  69. local lookvector = owner.Character.Torso.CFrame:toObjectSpace(cameracf).lookVector.unit
  70. headd.C0 = CFrame.new(0,1,0) * CFrame.Angles(lookvector.y,0,0)
  71. headd.C0 = headd.C0 * CFrame.Angles(0,-lookvector.x,0)
  72. headd.C0 = headd.C0 * CFrame.new(0,0.5,0)
  73. armm.C0 = CFrame.new(1.75,1,-0.75) * CFrame.Angles(lookvector.y,0,0) * CFrame.Angles(math.rad(90),0,0)
  74. armm.C0 = armm.C0 * CFrame.Angles(0,0,lookvector.x)
  75. armm.C0 = armm.C0 * CFrame.new(-0.5,-0.25,0.5)
  76. end
  77. end
  78. remote.OnServerEvent:connect(look)
  79. function welding()
  80. owner.Character["Right Arm"].Touched:Connect(function(part)
  81. if part ~= owner.Character:GetDescendants() then
  82. local weld = Instance.new("WeldConstraint",owner.Character["Right Arm"])
  83. weld.Part0 = part
  84. weld.Part1 = owner.Character["Right Arm"]
  85. end
  86. end)
  87. end
  88. remote2.OnServerEvent:connect(welding)
RAW Paste Data