pencilvania

skedvr fixed AGAIN

Feb 28th, 2021
1,081
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.  | | | |>  <  __/ (_| |
  25.  |_| |_/_/\_\___|\__,_|
  26.  
  27.  (AGAIN)
  28.  
  29. ]]
  30.  
  31. spawn(function()
  32.     while true do
  33.         game:GetService("RunService").Heartbeat:wait()
  34.         settings().Physics.AllowSleep = false
  35.         settings().Physics.ThrottleAdjustTime = math.huge-math.huge
  36.         setsimulationradius(1e9, 1e9)
  37.         game:GetService("RunService").Stepped:wait()
  38.     end
  39. end)
  40.  
  41. local options = {}
  42.  
  43. -- OPTIONS:
  44.  
  45. options.headscale = 3 -- how big you are in vr, 1 is default, 3 is recommended for max comfort in vr
  46. options.forcebubblechat = true -- decide if to force bubblechat so you can see peoples messages
  47.  
  48. options.headhat = "MediHood" -- name of the accessory which you are using as a head
  49. options.righthandhat = "Pal Hair" -- name of the accessory which you are using as your right hand
  50. options.lefthandhat = "LavanderHair" -- name of the accessory which you are using as your left hand
  51.  
  52. options.righthandrotoffset = Vector3.new(0,0,0)
  53. options.lefthandrotoffset = Vector3.new(0,0,0)
  54.  
  55. --
  56.  
  57. local plr = game:GetService("Players").LocalPlayer
  58. local char = plr.Character
  59. --local backpack = plr.Backpack
  60.  
  61. local VR = game:GetService("VRService")
  62. local input = game:GetService("UserInputService")
  63.  
  64. local cam = workspace.CurrentCamera
  65.  
  66. cam.CameraType = "Scriptable"
  67.  
  68. cam.HeadScale = options.headscale
  69.  
  70. game:GetService("StarterGui"):SetCore("VRLaserPointerMode", 0)
  71. game:GetService("StarterGui"):SetCore("VREnableControllerModels", false)
  72.  
  73.  
  74. local function createpart(size, name)
  75.     local Part = Instance.new("Part", char)
  76.     Part.CFrame = char.HumanoidRootPart.CFrame
  77.     Part.Size = size
  78.     Part.Transparency = 1
  79.     Part.CanCollide = false
  80.     Part.Anchored = true
  81.     Part.Name = name
  82.     return Part
  83. end
  84.  
  85. local moveHandL = createpart(Vector3.new(1,1,2), "moveRH")
  86. local moveHandR = createpart(Vector3.new(1,1,2), "moveLH")
  87. local moveHead = createpart(Vector3.new(1,1,1), "moveH")
  88.  
  89. local handL
  90. local handR
  91. local head
  92. local R1down = false
  93.  
  94. for i,v in pairs(char.Humanoid:GetAccessories()) do
  95.     if v:FindFirstChild("Handle") then
  96.         local handle = v.Handle
  97.        
  98.         if v.Name == options.righthandhat and not handR then
  99.             handle:FindFirstChildOfClass("SpecialMesh"):Destroy()
  100.             handR = v
  101.         elseif v.Name == options.lefthandhat and not handL then
  102.             handle:FindFirstChildOfClass("SpecialMesh"):Destroy()
  103.             handL = v
  104.         elseif v.Name == options.headhat and not head then
  105.             handle.Transparency = 1
  106.             head = v
  107.         end
  108.     end
  109. end
  110.  
  111. char.Humanoid.AnimationPlayed:connect(function(anim)
  112.     anim:Stop()
  113. end)
  114.  
  115. for i,v in pairs(char.Humanoid:GetPlayingAnimationTracks()) do
  116.     v:AdjustSpeed(0)
  117. end
  118.  
  119. local torso = char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso")
  120. torso.Anchored = true
  121. char.HumanoidRootPart.Anchored = true
  122.  
  123. workspace.CurrentCamera.CFrame = CFrame.new(workspace.CurrentCamera.CFrame.Position)
  124.  
  125. input.UserCFrameChanged:connect(function(part,move)
  126.     if part == Enum.UserCFrame.Head then
  127.         --move(head,cam.CFrame*move)
  128.         moveHead.CFrame = cam.CFrame*(CFrame.new(move.p*(cam.HeadScale-1))*move)
  129.     elseif part == Enum.UserCFrame.LeftHand then
  130.         --move(handL,cam.CFrame*move)
  131.         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)))
  132.     elseif part == Enum.UserCFrame.RightHand then
  133.         --move(handR,cam.CFrame*move)
  134.         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)))
  135.     end
  136. end)
  137.  
  138. 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
  139.     local AlignPos = Instance.new('AlignPosition', Part1);
  140.     AlignPos.Parent.CanCollide = false;
  141.     AlignPos.ApplyAtCenterOfMass = true;
  142.     AlignPos.MaxForce = 67752;
  143.     AlignPos.MaxVelocity = math.huge/9e110;
  144.     AlignPos.ReactionForceEnabled = false;
  145.     AlignPos.Responsiveness = 200;
  146.     AlignPos.RigidityEnabled = false;
  147.     local AlignOri = Instance.new('AlignOrientation', Part1);
  148.     AlignOri.MaxAngularVelocity = math.huge/9e110;
  149.     AlignOri.MaxTorque = 67752;
  150.     AlignOri.PrimaryAxisOnly = false;
  151.     AlignOri.ReactionTorqueEnabled = false;
  152.     AlignOri.Responsiveness = 200;
  153.     AlignOri.RigidityEnabled = false;
  154.     local AttachmentA=Instance.new('Attachment',Part1);
  155.     local AttachmentB=Instance.new('Attachment',Part0);
  156.     AttachmentB.CFrame = AttachmentB.CFrame * CFrameOffset
  157.     AlignPos.Attachment0 = AttachmentA;
  158.     AlignPos.Attachment1 = AttachmentB;
  159.     AlignOri.Attachment0 = AttachmentA;
  160.     AlignOri.Attachment1 = AttachmentB;
  161. end
  162.  
  163. head.Handle:BreakJoints()
  164. handR.Handle:BreakJoints()
  165. handL.Handle:BreakJoints()
  166.  
  167. Align(head.Handle,moveHead,CFrame.new(0,0,0))
  168. Align(handR.Handle,moveHandR,CFrame.new(0,0,0))
  169. Align(handL.Handle,moveHandL,CFrame.new(0,0,0))
  170.  
  171. input.InputChanged:connect(function(key)
  172.     if key.KeyCode == Enum.KeyCode.ButtonR1 then
  173.         if key.Position.Z > 0.9 then
  174.             R1down = true
  175.         else
  176.             R1down = false
  177.         end
  178.     end
  179. end)
  180.  
  181. input.InputBegan:connect(function(key)
  182.     if key.KeyCode == Enum.KeyCode.ButtonR1 then
  183.         R1down = true
  184.     end
  185. end)
  186.  
  187. input.InputEnded:connect(function(key)
  188.     if key.KeyCode == Enum.KeyCode.ButtonR1 then
  189.         R1down = false
  190.     end
  191. end)
  192.  
  193. game:GetService("RunService").RenderStepped:connect(function()
  194.     if R1down then
  195.         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)
  196.     end
  197. end)
  198.  
  199. local function bubble(plr,msg)
  200.     game:GetService("Chat"):Chat(plr.Character.Head,msg,Enum.ChatColor.White)
  201. end
  202.  
  203. if options.forcebubblechat == true then
  204.     game.Players.PlayerAdded:connect(function(plr)
  205.         plr.Chatted:connect(function(msg)
  206.             game:GetService("Chat"):Chat(plr.Character.Head,msg,Enum.ChatColor.White)
  207.         end)
  208.     end)
  209.    
  210.     for i,v in pairs(game.Players:GetPlayers()) do
  211.         v.Chatted:connect(function(msg)
  212.             game:GetService("Chat"):Chat(v.Character.Head,msg,Enum.ChatColor.White)
  213.         end)
  214.     end
  215. end
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×