Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- xpcall(function()
- while true do
- settings().Physics.AllowSleep = false
- settings().Physics.ThrottleAdjustTime = 0
- setsimulationradius(1000)
- shp(game.Players.LocalPlayer,"SimulationRadius",1000)
- game:GetService("RunService").Heartbeat:wait()
- end
- end)
- local options = {}
- -- OPTIONS:
- options.headscale = 3 -- how big you are in vr, 1 is default, 3 is recommended for max comfort in vr
- options.forcebubblechat = true -- decide if to force bubblechat so you can see peoples messages
- options.headhat = "MediHood" -- name of the accessory which you are using as a head
- options.righthandhat = "HandleAccessory" -- name of the accessory which you are using as your right hand
- options.lefthandhat = "MeshPartAccessory" -- name of the accessory which you are using as your left hand
- options.righthandrotoffset = Vector3.new(-20.832, -28.808, 15.464)
- options.lefthandrotoffset = Vector3.new(25.69, 154.448, 174.696)
- --
- local plr = game:GetService("Players").LocalPlayer
- local char = plr.Character
- --local backpack = plr.Backpack
- local VR = game:GetService("VRService")
- local input = game:GetService("UserInputService")
- local cam = workspace.CurrentCamera
- cam.CameraType = "Scriptable"
- cam.HeadScale = options.headscale
- game:GetService("StarterGui"):SetCore("VRLaserPointerMode", 0)
- game:GetService("StarterGui"):SetCore("VREnableControllerModels", false)
- local function createpart(size, name)
- local Part = Instance.new("Part", char)
- Part.CFrame = char.HumanoidRootPart.CFrame
- Part.Size = size
- Part.Transparency = 1
- Part.CanCollide = false
- Part.Anchored = true
- Part.Name = name
- return Part
- end
- local moveHandL = createpart(Vector3.new(1,1,2), "moveRH")
- local moveHandR = createpart(Vector3.new(1,1,2), "moveLH")
- local moveHead = createpart(Vector3.new(1,1,1), "moveH")
- local handL
- local handR
- local head
- local R1down = false
- for i,v in pairs(char.Humanoid:GetAccessories()) do
- if v:FindFirstChild("Handle") then
- local handle = v.Handle
- if v.Name == options.righthandhat and not handR then
- handR = v
- elseif v.Name == options.lefthandhat and not handL then
- handL = v
- elseif v.Name == options.headhat and not head then
- handle.Transparency = 1
- head = v
- end
- end
- end
- char.Humanoid.AnimationPlayed:connect(function(anim)
- anim:Stop()
- end)
- for i,v in pairs(char.Humanoid:GetPlayingAnimationTracks()) do
- v:AdjustSpeed(0)
- end
- local torso = char:FindFirstChild("Torso") or char:FindFirstChild("UpperTorso")
- torso.Anchored = true
- char.HumanoidRootPart.Anchored = true
- workspace.CurrentCamera.CFrame = CFrame.new(workspace.CurrentCamera.CFrame.Position)
- input.UserCFrameChanged:connect(function(part,move)
- if part == Enum.UserCFrame.Head then
- --move(head,cam.CFrame*move)
- moveHead.CFrame = cam.CFrame*(CFrame.new(move.p*(cam.HeadScale-1))*move)
- elseif part == Enum.UserCFrame.LeftHand then
- --move(handL,cam.CFrame*move)
- 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)))
- elseif part == Enum.UserCFrame.RightHand then
- --move(handR,cam.CFrame*move)
- 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)))
- end
- end)
- local function Permadeath()
- local Fake = Instance.new("Model",char)
- Fake.Name = "FakeBody"
- local Tors = Instance.new("Part",Fake)
- Tors.Name = "Torso"
- local Root = Instance.new("Part",Fake)
- Root.Name = "HumanoidRootPart"
- local Hum = Instance.new("Humanoid",Fake)
- plr.Character = Fake
- wait(3)
- plr.Character = char
- wait(3)
- plr.Character:FindFirstChildOfClass("Humanoid").Health = 0
- end
- 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
- local AlignPos = Instance.new('AlignPosition', Part1);
- AlignPos.Parent.CanCollide = false;
- AlignPos.ApplyAtCenterOfMass = true;
- AlignPos.MaxForce = 67752;
- AlignPos.MaxVelocity = math.huge/9e110;
- AlignPos.ReactionForceEnabled = false;
- AlignPos.Responsiveness = 200;
- AlignPos.RigidityEnabled = false;
- local AlignOri = Instance.new('AlignOrientation', Part1);
- AlignOri.MaxAngularVelocity = math.huge/9e110;
- AlignOri.MaxTorque = 67752;
- AlignOri.PrimaryAxisOnly = false;
- AlignOri.ReactionTorqueEnabled = false;
- AlignOri.Responsiveness = 200;
- AlignOri.RigidityEnabled = false;
- local AttachmentA=Instance.new('Attachment',Part1);
- local AttachmentB=Instance.new('Attachment',Part0);
- AttachmentB.CFrame = AttachmentB.CFrame * CFrameOffset
- AlignPos.Attachment0 = AttachmentA;
- AlignPos.Attachment1 = AttachmentB;
- AlignOri.Attachment0 = AttachmentA;
- AlignOri.Attachment1 = AttachmentB;
- local Handle = Part1
- local velo = Instance.new("BodyVelocity", Part1)
- velo.Velocity = Vector3.new(-0.0006,90,-0.0006)
- velo.P = math.huge
- velo.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
- velo = Instance.new("BodyThrust", Part1)
- velo.Force = Vector3.new(0.00455,0.000455,0.000455)
- velo.Location = Part1.Position
- game:GetService("RunService").Heartbeat:connect(function()
- if Part1 then
- Handle.Velocity = Vector3.new(-0.524524161, 27.515423852, 0.512789952)
- Handle.CFrame = Part0.CFrame
- Handle.Velocity = Vector3.new(-0.524524161, 27.515423852, 0.512789952)
- Handle.CFrame = Part0.CFrame*CFrame.new(math.random(0.01, 0.001),0.0001,0.001)
- Handle.Massless = true
- Handle.Velocity = Vector3.new(-0.524524161, 27.515423852, 0.512789952)
- Handle.Massless = false
- Handle.Velocity = Vector3.new(-0.524524161, 27.515423852, 0.512789952)
- Handle.CFrame = Part0.CFrame*CFrame.new(math.random(0.01, 0.001),0.0001,0.001)
- Handle.Velocity = Vector3.new(-0.524524161, 27.515423852, 0.512789952)
- end
- end)
- end
- Permadeath()
- --head.Handle:BreakJoints()
- --handR.Handle:BreakJoints()
- --handL.Handle:BreakJoints()
- Align(head.Handle,moveHead,CFrame.new(0,0,0))
- Align(handR.Handle,moveHandR,CFrame.new(0,0,0))
- Align(handL.Handle,moveHandL,CFrame.new(0,0,0))
- input.InputChanged:connect(function(key)
- if key.KeyCode == Enum.KeyCode.ButtonR1 then
- if key.Position.Z > 0.9 then
- R1down = true
- else
- R1down = false
- end
- end
- end)
- input.InputBegan:connect(function(key)
- if key.KeyCode == Enum.KeyCode.ButtonR1 then
- R1down = true
- end
- end)
- input.InputEnded:connect(function(key)
- if key.KeyCode == Enum.KeyCode.ButtonR1 then
- R1down = false
- end
- end)
- game:GetService("RunService").RenderStepped:connect(function()
- if R1down then
- 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)
- end
- end)
- local function bubble(plr,msg)
- game:GetService("Chat"):Chat(plr.Character.Head,msg,Enum.ChatColor.White)
- end
- if options.forcebubblechat == true then
- game.Players.PlayerAdded:connect(function(plr)
- plr.Chatted:connect(function(msg)
- game:GetService("Chat"):Chat(plr.Character.Head,msg,Enum.ChatColor.White)
- end)
- end)
- for i,v in pairs(game.Players:GetPlayers()) do
- v.Chatted:connect(function(msg)
- game:GetService("Chat"):Chat(v.Character.Head,msg,Enum.ChatColor.White)
- end)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement