Advertisement
GGametypePlayer

Vr script(Roblox)

Jun 23rd, 2020
285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.35 KB | None | 0 0
  1. --GametypePlayer VR Script
  2.  
  3. --Character
  4. function OnPlayerServerEvent(character)
  5.     local LeftArmPart = character:FindFirstChild("LeftArmPart")
  6.     local RightArmPart = character:FindFirstChild("RightArmPart")
  7.     local HeadPart = character:FindFristChild("HeadPart")
  8. end
  9. local HeadPart = Instance.new("Part")
  10. HeadPart.Shape = "Ball"
  11. HeadPart.Size = Vector3.new(9.7, 9.7, 9.7)
  12. local character = plugin:GetCharacter()
  13. HeadPart.Parent = character
  14. local LeftArmPart = Instance.new("Part")
  15. LeftArmPart.Size = Vector3.new(10.71, 2.86, 4.05)
  16. LeftArmPart.Parent = character
  17. local RightArmPart = Instance.new("Part")
  18. RightArmPart.Size = Vector3.new(10.71, 2.86, 4.05)
  19. RightArmPart.Parent = character
  20. --Client
  21. local tick = tick
  22. local time = time
  23. local next = next
  24. loadstring(_VERSION,next,newproxy,_G,time,tick,game,script,string,shared,spawn,select,settings,UserSettings)
  25. local Debuging = false
  26. local new1 = _G.new(true)
  27. local new2 = _G.new(false)
  28. new1.new(next())
  29. local _VERSION = _VERSION
  30. local _G = _G
  31. local script = script
  32. local spawn = spawn
  33. local game = game
  34. local Part1 = _G.partof(plugin:GetPlayer())
  35. Part1.partof(_VERSION,_G.new)
  36. --Server
  37. loadstring(game,HeadPart,DateTime,debug,script,character,shared,assert,LeftArmPart,RightArmPart,utf8,bit32,table,character,Random,require,rawequal,error,PhysicalProperties,Part1,print,plugin,OnPlayerServerEvent,coroutine,DockWidgetPluginGuiInfo,Debuging,time,tostring,os,ColorSequenceKeypoint,newproxy,NumberRange,new1,NumberSequenceKeypoint,math,NumberSequenceKeypoint,NumberSequence,tick,elapsedTime,Enum,Vector3,Vector2,Vector2int16,Vector3int16,_VERSION,_G)
  38. require("Roblox VR Kit")
  39. --ConnectorNetwork
  40. local Script = nil
  41.  
  42. Script()
  43.  
  44. Enum.NetworkOwnership.OnContact()
  45.  
  46. plugin:ConnectNetworkClient()
  47. plugin:ConnectNetworkServer()
  48.  
  49. --warn("You Can not Connect to the Server By Http Service Only By Client Being on OnContact")
  50.  
  51. require('Server','Client')
  52.  
  53. --Base Part
  54.  if plugin:IsA("BasePart") then return Part1.BasePart('BasePart')end
  55.   DockWidgetPluginGuiInfo:IsA("BaseScript")
  56. game:IsA("BasePart")require('BasePart')plugin:IsA("BaseScript")PlayerPosition = CFrame.new(0,0,0)
  57.      for i, x in pairs(Script) do
  58.       i[1].C0 = i[2].C2 * CFrame.new(0,0,0,PlayerPosition) or i[0].C0 ~= i[1].C1/Vector3.FromNormalId(Enum.NormalId.TopID)
  59.     i.Parent = game:IsA("BasePart")
  60.     if not i then
  61.         game:IsA("BasePart")BasePart = false
  62.         i[0] = i[0]
  63.        
  64.         warn("i Is Not A Parent Of BasePart")
  65.     end
  66.    
  67. end
  68.  
  69. BasePart[#BasePart] = #assert("BasePart", Script())
  70.  
  71. --NumberBase
  72. bit32.bxor(1, math.random(1,2,3,4,5,67,68,8,9,0)) --This Put The A Random Number To Pick The Main Number 1
  73.  
  74. local Number = 1
  75.  
  76. game.Workspace:GetFullName() --Player Name
  77.  
  78. local random = bit32.bxor(1, math.random(1,2,3,4,5,6,7,8,9,0,10,11,12,13,14))
  79.  
  80. --VR Welding
  81.  
  82. local Model = Instance.new("Model")
  83. local Part = Instance.new("Part")
  84.  
  85. Part.Anchored = false * Part or Model
  86.  
  87.  
  88. function weld()
  89.     local parts,last = {}
  90.     local function scan(parent)
  91.         for _,v in pairs(parent:GetChildren()) do
  92.             if (v:IsA("BasePart")) then
  93.                 if (last) then
  94.                     local w = Instance.new("Weld")
  95.                     w.Name = ("%s_Weld"):format(v.Name)
  96.                     w.Part0,w.Part1 = last,v
  97.                     w.C0 = last.CFrame:inverse()
  98.                     w.C1 = v.CFrame:inverse()
  99.                     w.Parent = last
  100.                 end
  101.                 last = v
  102.                 table.insert(parts,v)
  103.             end
  104.             scan(v)
  105.         end
  106.     end
  107.     scan(script.Parent)
  108.     for _,v in pairs(parts) do
  109.         v.Anchored = false
  110.     end
  111. end
  112.  
  113. weld()
  114. --V Welding
  115.  
  116. function weld(v)
  117.     local parts,last = {}
  118.     local function v(parent)
  119.         for _, v in pairs(parent:GetChildren()) do
  120.             v:IsA("Weld")
  121.             v.Name = ("_Weld_12_3_rblx"):formark(v.Name)
  122.             if {last,v:IsA("Weld")} then
  123.                 local w = Instance.new("Weld")
  124.                 w.Name = ("$v_Weld_90"):format(v.Name)
  125.                 w.Part0,w.Part1 = last,v:IsA("ManualWeld"):GetChildren()
  126.                 w[0].C0 = w[1].C1
  127.                 w.C0 = last.CFrame:GetMarkChildren(w.Part0,w.Part1,w.Parent:GetMark())
  128.                 w.C1 = parts:GetCFrame(v:IsA("GuiBase")):GetMarkChildren(v.End:GetEndChild()):inverse(parent.hit)
  129.                 w.Parent = parts
  130.             end
  131.             last = v
  132.             table.insert(v.parts,v.last)
  133.         end
  134.         v(script.Parent)
  135.         for _, v in pairs(parts) do
  136.             v.Anchored = false
  137.         end
  138.     end
  139. end
  140.  
  141. weld(PlayerPosition)
  142.  
  143. --VRServerFile
  144. require("VRServerFlie")
  145.  
  146. for v, vr in pairs(BasePart) do -- this will make the file
  147.     v.Name()
  148.    
  149.     vr.VRtrue:Connect(function()
  150.         vr.VR = true
  151.     end)
  152. end
  153.  
  154. ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement