1. --[[
  2. _
  3. | |
  4. __ ___ __ __ _ _ __ _ ___ _| |__ ___ _ __ ___
  5. \ \ / / '__| / _` | '_ \| | | \ \ /\ / / '_ \ / _ \ '__/ _ \
  6. \ V /| | | (_| | | | | |_| |\ V V /| | | | __/ | | __/
  7. \_/ |_| \__,_|_| |_|\__, | \_/\_/ |_| |_|\___|_| \___|
  8. __/ |
  9. |___/
  10. _ _ _
  11. | | | | | |
  12. | |__ _ _ ___| | _____ __| |
  13. | '_ \| | | | / __| |/ / _ \/ _` |
  14. | |_) | |_| | \__ \ < __/ (_| |
  15. |_.__/ \__, | |___/_|\_\___|\__,_|
  16. __/ |
  17. |___/
  18. __ _ _
  19. / _(_) | |
  20. | |_ ___ _____ __| |
  21. | _| \ \/ / _ \/ _` |
  22. | | | |> < __/ (_| |
  23. |_| |_/_/\_\___|\__,_|
  24. (Credit to 64Will64 for first managing to fix the script before I did!)
  25. ]]
  26. spawn(function()
  27. while true do
  28. settings().Physics.AllowSleep = false
  29. setsimulationradius(math.huge*math.huge,math.huge*math.huge)
  30. game:GetService("RunService").Heartbeat:wait()
  31. end
  32. end)
  33. local options = {}
  34. -- OPTIONS:
  35. options.headscale = 3 -- how big you are in vr, 1 is default, 3 is recommended for max comfort in vr
  36. options.forcebubblechat = true -- decide if to force bubblechat so you can see peoples messages
  37. options.headhat = "MediHood" -- name of the accessory which you are using as a head
  38. options.righthandhat = "Pal Hair" -- name of the accessory which you are using as your right hand
  39. options.lefthandhat = "LavanderHair" -- name of the accessory which you are using as your left hand
  40. options.righthandrotoffset = Vector3.new(0,0,0)
  41. options.lefthandrotoffset = Vector3.new(0,0,0)
  42. --
  43. local plr = game:GetService("Players").LocalPlayer
  44. local char = plr.Character
  45. --local backpack = plr.Backpack
  46. local VR = game:GetService("VRService")
  47. local input = game:GetService("UserInputService")
  48. local cam = workspace.CurrentCamera
  49. cam.CameraType = "Scriptable"
  50. cam.HeadScale = options.headscale
  51. game:GetService("StarterGui"):SetCore("VRLaserPointerMode", 0)
  52. game:GetService("StarterGui"):SetCore("VREnableControllerModels", false)
  53. local function createpart(size, name)
  54. local Part = Instance.new("Part", char)
  55. Part.CFrame = char.HumanoidRootPart.CFrame
  56. Part.Size = size
  57. Part.Transparency = 1
  58. Part.CanCollide = false
  59. Part.Anchored = true
  60. Part.Name = name
  61. return Part
  62. end
  63. local moveHandL = createpart(Vector3.new(1,1,2), "moveRH")
  64. local moveHandR = createpart(Vector3.new(1,1,2), "moveLH")
  65. local moveHead = createpart(Vector3.new(1,1,1), "moveH")
  66. local handL
  67. local handR
  68. local head
  69. local R1down = false
  70. for i,v in pairs(char.Humanoid:GetAccessories()) do
  71. if v:FindFirstChild("Handle") then
  72. local handle = v.Handle
  73. if v.Name == options.righthandhat and not handR then
  74. handle:FindFirstChildOfClass("SpecialMesh"):Destroy()
  75. handR = v
  76. elseif v.Name == options.lefthandhat and not handL then
  77. handle:FindFirstChildOfClass("SpecialMesh"):Destroy()
  78. handL = v
  79. elseif v.Name == options.headhat and not head then
  80. handle.Transparency = 1
  81. head = v
  82. end
  83. end
  84. end
  85. char.Humanoid.AnimationPlayed:connect(function(anim)
  86. anim:Stop()
  87. end)
  88. for i,v in pairs(char.Humanoid:GetPlayingAnimationTracks()) do
  89. v:AdjustSpeed(0)
  90. end
  91. local torso = char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso")
  92. torso.Anchored = true
  93. char.HumanoidRootPart.Anchored = true
  94. workspace.CurrentCamera.CFrame = CFrame.new(workspace.CurrentCamera.CFrame.Position)
  95. input.UserCFrameChanged:connect(function(part,move)
  96. if part == Enum.UserCFrame.Head then
  97. --move(head,cam.CFrame*move)
  98. moveHead.CFrame = cam.CFrame*(CFrame.new(move.p*(cam.HeadScale-1))*move)
  99. elseif part == Enum.UserCFrame.LeftHand then
  100. --move(handL,cam.CFrame*move)
  101. moveHandL.CFrame = cam.CFrame*(CFrame.new(move.p*(cam.HeadScale-1))*move*CFrame.Angles(math.rad(options.righthandrotoffset.X),math.rad(options.righthandrotoffset.Y),math.rad(options.righthandrotoffset.Z)))
  102. elseif part == Enum.UserCFrame.RightHand then
  103. --move(handR,cam.CFrame*move)
  104. moveHandR.CFrame = cam.CFrame*(CFrame.new(move.p*(cam.HeadScale-1))*move*CFrame.Angles(math.rad(options.righthandrotoffset.X),math.rad(options.righthandrotoffset.Y),math.rad(options.righthandrotoffset.Z)))
  105. end
  106. end)
  107. local function Align(Part1,Part0,CFrameOffset) -- i dont know who made this function but 64will64 sent it to me so credit to whoever made it
  108. local AlignPos = Instance.new('AlignPosition', Part1);
  109. AlignPos.Parent.CanCollide = false;
  110. AlignPos.ApplyAtCenterOfMass = true;
  111. AlignPos.MaxForce = 67752;
  112. AlignPos.MaxVelocity = math.huge/9e110;
  113. AlignPos.ReactionForceEnabled = false;
  114. AlignPos.Responsiveness = 200;
  115. AlignPos.RigidityEnabled = false;
  116. local AlignOri = Instance.new('AlignOrientation', Part1);
  117. AlignOri.MaxAngularVelocity = math.huge/9e110;
  118. AlignOri.MaxTorque = 67752;
  119. AlignOri.PrimaryAxisOnly = false;
  120. AlignOri.ReactionTorqueEnabled = false;
  121. AlignOri.Responsiveness = 200;
  122. AlignOri.RigidityEnabled = false;
  123. local AttachmentA=Instance.new('Attachment',Part1);
  124. local AttachmentB=Instance.new('Attachment',Part0);
  125. AttachmentB.CFrame = AttachmentB.CFrame * CFrameOffset
  126. AlignPos.Attachment0 = AttachmentA;
  127. AlignPos.Attachment1 = AttachmentB;
  128. AlignOri.Attachment0 = AttachmentA;
  129. AlignOri.Attachment1 = AttachmentB;
  130. end
  131. head.Handle:BreakJoints()
  132. handR.Handle:BreakJoints()
  133. handL.Handle:BreakJoints()
  134. Align(head.Handle,moveHead,CFrame.new(0,0,0))
  135. Align(handR.Handle,moveHandR,CFrame.new(0,0,0))
  136. Align(handL.Handle,moveHandL,CFrame.new(0,0,0))
  137. input.InputChanged:connect(function(key)
  138. if key.KeyCode == Enum.KeyCode.ButtonR1 then
  139. if key.Position.Z > 0.9 then
  140. R1down = true
  141. else
  142. R1down = false
  143. end
  144. end
  145. end)
  146. input.InputBegan:connect(function(key)
  147. if key.KeyCode == Enum.KeyCode.ButtonR1 then
  148. R1down = true
  149. end
  150. end)
  151. input.InputEnded:connect(function(key)
  152. if key.KeyCode == Enum.KeyCode.ButtonR1 then
  153. R1down = false
  154. end
  155. end)
  156. game:GetService("RunService").RenderStepped:connect(function()
  157. if R1down then
  158. cam.CFrame = cam.CFrame:Lerp(cam.CoordinateFrame + (moveHandR.CFrame*CFrame.Angles(-math.rad(options.righthandrotoffset.X),-math.rad(options.righthandrotoffset.Y),math.rad(180-options.righthandrotoffset.X))).LookVector * cam.HeadScale/2, 0.5)
  159. end
  160. end)
  161. local function bubble(plr,msg)
  162. game:GetService("Chat"):Chat(plr.Character.Head,msg,Enum.ChatColor.White)
  163. end
  164. if options.forcebubblechat == true then
  165. game.Players.PlayerAdded:connect(function(plr)
  166. plr.Chatted:connect(function(msg)
  167. game:GetService("Chat"):Chat(plr.Character.Head,msg,Enum.ChatColor.White)
  168. end)
  169. end)
  170. for i,v in pairs(game.Players:GetPlayers()) do
  171. v.Chatted:connect(function(msg)
  172. game:GetService("Chat"):Chat(v.Character.Head,msg,Enum.ChatColor.White)
  173. end)
  174. end
  175. end