Advertisement
WellSumo

FE-VR-like script

May 13th, 2020
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.97 KB | None | 0 0
  1. wait(3)
  2.  
  3. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  4.  
  5.  
  6.  
  7. for i,v in pairs(Player.Character:GetDescendants()) do
  8. if v:IsA("BasePart") and v ~= Player.Character.HumanoidRootPart then
  9. v.CustomPhysicalProperties = PhysicalProperties.new(0,0,0)
  10. v:SetNetworkOwner(game.Players:GetPlayerFromCharacter(Player.Character))
  11. local nc = Instance.new("NoCollisionConstraint",v)
  12. nc.Part0 = v
  13. nc.Part1 = Player.Character.HumanoidRootPart
  14. v.Massless = true
  15.  
  16. if string.match(v.Name,"Leg") or string.match(v.Name,"Arm") then
  17. local collider = Instance.new("Part",v)
  18. collider.CFrame = v.CFrame
  19. collider.Transparency = 1
  20. collider.CustomPhysicalProperties = PhysicalProperties.new(0,2,0,100,0)
  21. collider.Size = v.Size
  22. local weld = Instance.new("Weld",v)
  23. weld.Part0 = collider
  24. weld.Part1 = v
  25. local noc1 = Instance.new("NoCollisionConstraint",v)
  26. noc1.Part0 = Player.Character.HumanoidRootPart
  27. noc1.Part1 = collider
  28. local noc2 = Instance.new("NoCollisionConstraint",v)
  29. noc2.Part0 = Player.Character.Torso
  30. noc2.Part1 = collider
  31. if string.match(v.Name,"Arm") then
  32. local noc3 = Instance.new("NoCollisionConstraint",v)
  33. noc3.Part0 = Player.Character.Head
  34. noc3.Part1 = collider
  35. end
  36. end
  37.  
  38. elseif v:IsA("Motor6D") and v.Parent ~= Player.Character.HumanoidRootPart then
  39.  
  40. if string.match(v.Part1.Name,"Arm") then
  41. if string.match(v.Name,"Left") then
  42. v.C0 = v.C0 * CFrame.new(0,0,0.5)
  43. v.C1 = v.C1 * CFrame.new(0,0.5,0.5)
  44. elseif string.match(v.Name,"Right") then
  45. v.C0 = v.C0 * CFrame.new(0,0,0.5)
  46. v.C1 = v.C1 * CFrame.new(0,0.5,0.5)
  47. end
  48. end
  49. if string.match(v.Part1.Name,"Leg") then
  50. if string.match(v.Name,"Left") then
  51. v.C0 = v.C0 * CFrame.new(0,0,-0.5)
  52. v.C1 = v.C1 * CFrame.new(0,0,-0.5)
  53. elseif string.match(v.Name,"Right") then
  54. v.C0 = v.C0 * CFrame.new(0,0,-0.5)
  55. v.C1 = v.C1 * CFrame.new(0,0,-0.5)
  56. end
  57. end
  58.  
  59. local attA = Instance.new("Attachment",v.Part0)
  60. attA.CFrame = v.C0
  61. attA.Name = v.Name .. "A"
  62. local attB = Instance.new("Attachment",v.Part1)
  63. attB.CFrame = v.C1
  64. attB.Name = v.Name .. "B"
  65. local Rot = Instance.new("BallSocketConstraint",v.Parent)
  66. Rot.Attachment0 = attB
  67. Rot.Attachment1 = attA
  68. Rot.Name = v.Name .. "Connection"
  69.  
  70.  
  71.  
  72. --[[Rot.LimitsEnabled = true
  73. Rot.TwistLimitsEnabled = true
  74. Rot.UpperAngle = 90
  75. Rot.TwistLowerAngle = -25
  76. Rot.TwistUpperAngleAngle = 25--]]
  77. v.Enabled = false--.Part1 = nil
  78.  
  79.  
  80. elseif v:IsA("Motor6D") and v.Parent == Player.Character.HumanoidRootPart then
  81.  
  82.  
  83. v.Enabled = false--.Part1 = nil
  84.  
  85.  
  86. end
  87. end
  88.  
  89. local attA = Instance.new("Attachment",Player.Character.Head)
  90. attA.CFrame = CFrame.new(0,0,0)
  91. attA.Name = "CamA"
  92. local attB = Instance.new("Attachment",Player.Character.HumanoidRootPart)
  93. attB.CFrame = CFrame.new(0,1.5,0)
  94. attB.Name = "CamB"
  95. local Rot = Instance.new("AlignPosition",Player.Character.HumanoidRootPart.Parent)
  96. Rot.Attachment0 = attA
  97. Rot.Attachment1 = attB
  98. Rot.Responsiveness = 200
  99. Rot.Name = "CameraConnection"
  100. --Player.Character.Humanoid.PlatformStand = true
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107. local bg = Instance.new("BodyGyro",Player.Character.Head)
  108. bg.MaxTorque = Vector3.new(999999,999999,999999)
  109. local tbg = Instance.new("BodyGyro",Player.Character.Torso)
  110. tbg.MaxTorque = Vector3.new(999999,999999,999999)
  111. local la = Instance.new("BodyGyro",Player.Character["Left Arm"])
  112. la.MaxTorque = Vector3.new(100,100,100)
  113. local ra = Instance.new("BodyGyro",Player.Character["Right Arm"])
  114. ra.MaxTorque = Vector3.new(100,100,100)
  115. local l = false
  116. local r = false
  117. local mouse = game.Players.LocalPlayer:GetMouse()
  118. game:GetService("RunService").Stepped:Connect(function()
  119. if Player.Character:FindFirstChild("Head") and Player.Character:FindFirstChild("HumanoidRootPart") then
  120. local calc = CFrame.Angles(Mouse.Hit:ToOrientation())
  121. local x,y,z = calc:ToOrientation()
  122. tbg.CFrame = CFrame.Angles(0,y,0)
  123. bg.CFrame = CFrame.Angles(0,y,0) * CFrame.Angles(Mouse.Hit.LookVector.Y*0.6,0,0)
  124.  
  125. if l == true then
  126. la.CFrame = Mouse.Hit * CFrame.Angles(math.rad(90),0,0)
  127. else
  128. la.CFrame = CFrame.new(0,y,0)
  129. end
  130.  
  131. if r == true then
  132. ra.CFrame = Mouse.Hit * CFrame.Angles(math.rad(90),0,0)
  133. else
  134. ra.CFrame = CFrame.new(0,y,0)
  135. end
  136. for _,v in pairs(Player.Character:GetChildren()) do
  137. if v.Name == "Left Arm" or v.Name == "Right Arm" or v.Name == "Torso" or v.Name == "Left Leg" or v.Name == "Right Leg" then
  138. if v:IsA("BasePart") or v:IsA("Decal") then
  139. v.LocalTransparencyModifier = 0.25
  140. end
  141. end
  142. end
  143. end
  144. end)
  145. mouse.Button1Down:Connect(function()
  146. la.MaxTorque = Vector3.new(999999,999999,999999)
  147. l = true
  148. end)
  149. mouse.Button1Up:Connect(function()
  150. la.MaxTorque = Vector3.new(100,100,100)
  151. l = false
  152. end)
  153.  
  154. mouse.Button2Down:Connect(function()
  155. ra.MaxTorque = Vector3.new(999999,999999,999999)
  156. r = true
  157. end)
  158. mouse.Button2Up:Connect(function()
  159. ra.MaxTorque = Vector3.new(100,100,100)
  160. r = false
  161. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement