Advertisement
ForkFullFight

Skeds VR script

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