ForeverDev

Untitled

Sep 7th, 2014
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. wait(2)
  3.  
  4. local mouse2 = script.Parent.Parent:GetMouse()
  5. Tool=script.Parent
  6. CP,Head,g=nil,nil,nil
  7. necko=CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  8. armo1=CFrame.new(1, 0.5, 0, 0, 0, 1, -6.48200512e-007, 1.00000274, 0, -1.00000274, -6.48200512e-007, 0)
  9. head = game.Players.LocalPlayer.Character.Head
  10. getPos=function(Pos,HeadPos)
  11.         return Vector3.new(Pos.x,HeadPos.y,Pos.z)
  12. end
  13. Turn=function(mouse2,Head,Gyro)
  14.                 local Direction = mouse2.Hit.p
  15.                 local b = head.Position.Y-Direction.Y
  16.                 local dist = (head.Position-Direction).magnitude
  17.                 local answer = math.asin(b/dist)/2
  18.                
  19.                 local Direction2 = mouse2.Hit.p
  20.                 local b2 = head.Position.X-Direction2.X
  21.                 local dist2 = (head.Position-Direction2).magnitude
  22.                 local answer2 = math.asin(b2/dist2)/2
  23.                 local neg = head.Rotation.X
  24.                 oldx = head.Rotation.X
  25.         print(answer2)
  26.         neck=Tool.Parent.Character.Torso.Neck
  27.         neck.C0=necko*CFrame.fromEulerAnglesXYZ(answer,0,answer2)
  28.         end
  29.         CP=Tool.Parent.Character
  30.         Head=CP.Head
  31.         g=Instance.new("BodyGyro")
  32.         g.P=180
  33.         g.D=60
  34.         g.maxTorque=Vector3.new(800,800,800)*500000
  35.         g.cframe=Head.CFrame
  36.  
  37.  
  38.  
  39.  
  40. game.StarterGui:SetCoreGuiEnabled("All",false)
  41. repeat wait() until game.Players.LocalPlayer.Character ~= nil
  42. game:GetService('Players').LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson
  43.         if(game.Players.LocalPlayer.Character:FindFirstChild("ForceField") ~= nil) then
  44.         game.Players.LocalPlayer.Character:FindFirstChild("ForceField"):Destroy()
  45.         end
  46.         local char = game.Players.LocalPlayer.Character
  47.         char:WaitForChild("Head")
  48.         game.Workspace.CurrentCamera.CameraType = "Scriptable"
  49.         char.Head.Transparency = 1
  50.         char.Torso.Transparency = 1
  51.                 for i,v in pairs(char:GetChildren()) do
  52.                         if(v.ClassName == "Hat") then
  53.                         v:remove()
  54.                         end
  55.                 end
  56.         while wait() do
  57.         game.Workspace.CurrentCamera.CameraSubject = char.Head
  58.         game.Workspace.CurrentCamera.CoordinateFrame = char.Head.CFrame
  59.                 if Tool.Parent.Character.className~="Model" then
  60.                         break
  61.                 end
  62.                 Turn(mouse2,Torso,g)
  63.         end
  64.        
  65.         g:Remove()
Advertisement
Add Comment
Please, Sign In to add comment