Advertisement
SCRIPTCUSTOMIZER

tests

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