RoSPLOITkrnl

Roblox Vr Script V.2 2st Script

Jan 3rd, 2022 (edited)
14,447
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 40.74 KB | None | 1 0
  1. --Rosploit
  2.  
  3.  
  4. local StudsOffset = 0.1 -- Character height (negative if you're too high)
  5. local Smoothness = 1 -- Character interpolation (0.1 - 1 = smooth - rigid)
  6.  
  7. local AnchorCharacter = false -- Prevent physics from causing inconsistencies
  8. local HideCharacter = false -- Hide character on a platform
  9. local NoCollision = false -- Disable player collision
  10.  
  11. local ChatEnabled = true -- See chat on your left hand in-game
  12. local ChatLocalRange = 75 -- Local chat range
  13.  
  14. local ViewportEnabled = true -- View nearby players in a frame
  15. local ViewportRange = 100 -- Maximum distance players are updated
  16.  
  17. local RagdollEnabled = true -- Use your character instead of hats (NetworkOwner vulnerability)
  18. local RagdollHeadMovement = true -- Move your head separately from your body (+9 second wait)
  19.  
  20. local AutoRun = false -- Run script on respawn
  21. local AutoRespawn = true -- Kill your real body when your virtual body dies
  22.  
  23. local WearAllAccessories = true -- Use all leftover hats for the head
  24. local AccurateHandPosition = true -- Move your Roblox hands according to your real hands
  25.  
  26. local AccessorySettings = {
  27. LeftArm = "";
  28. RightArm = "";
  29. LeftLeg = "";
  30. RightLeg = "";
  31. Torso = "";
  32. Head = true;
  33.  
  34. BlockArms = true;
  35. BlockLegs = true;
  36. BlockTorso = true;
  37.  
  38. LimbOffset = CFrame.Angles(math.rad(90), 0, 0);
  39. }
  40.  
  41. local FootPlacementSettings = {
  42. RightOffset = Vector3.new(.5, 0, 0),
  43. LeftOffset = Vector3.new(-.5, 0, 0),
  44. }
  45.  
  46. --|| Script:
  47.  
  48. local Script = nil;
  49.  
  50. Script = function()
  51.  
  52. --[[
  53. Variables
  54. --]]
  55.  
  56. local Players = game:GetService("Players")
  57. local Client = Players.LocalPlayer
  58. local Character = Client.Character or Client.CharacterAdded:Wait()
  59. local WeldBase = Character:WaitForChild("HumanoidRootPart")
  60. local ArmBase = Character:FindFirstChild("RightHand") or Character:FindFirstChild("Right Arm") or WeldBase
  61. local Backpack = Client:WaitForChild("Backpack")
  62. local Mouse = Client:GetMouse()
  63.  
  64. local Camera = workspace.CurrentCamera
  65.  
  66. local VRService = game:GetService("VRService")
  67. local VRReady = VRService.VREnabled
  68.  
  69. local UserInputService = game:GetService("UserInputService")
  70. local RunService = game:GetService("RunService")
  71. local HttpService = game:GetService("HttpService")
  72. local StarterGui = game:GetService("StarterGui")
  73.  
  74. local HeadAccessories = {};
  75. local UsedAccessories = {};
  76.  
  77. local Pointer = false;
  78. local Point1 = false;
  79. local Point2 = false;
  80.  
  81. local VirtualRig = game:GetObjects("rbxassetid://4468539481")[1]
  82. local VirtualBody = game:GetObjects("rbxassetid://4464983829")[1]
  83.  
  84. local Anchor = Instance.new("Part")
  85.  
  86. Anchor.Anchored = true
  87. Anchor.Transparency = 1
  88. Anchor.CanCollide = false
  89. Anchor.Parent = workspace
  90.  
  91. if RagdollEnabled then
  92. print("RagdollEnabled, thank you for using CLOVR!")
  93. local NetworkAccess = coroutine.create(function()
  94. settings().Physics.AllowSleep = false
  95. while true do game:GetService("RunService").RenderStepped:Wait()
  96. for _,Players in next, game:GetService("Players"):GetChildren() do
  97. if Players ~= game:GetService("Players").LocalPlayer then
  98. Players.MaximumSimulationRadius = 0.1 Players.SimulationRadius = 0 end end
  99. game:GetService("Players").LocalPlayer.MaximumSimulationRadius = math.pow(math.huge,math.huge)
  100. game:GetService("Players").LocalPlayer.SimulationRadius = math.huge*math.huge end end)
  101. coroutine.resume(NetworkAccess)
  102. end
  103.  
  104.  
  105.  
  106. --[[
  107. Character Protection
  108. --]]
  109.  
  110. local CharacterCFrame = WeldBase.CFrame
  111.  
  112. if not RagdollEnabled then
  113. Character.Humanoid.AnimationPlayed:Connect(function(Animation)
  114. Animation:Stop()
  115. end)
  116.  
  117. for _, Track in next, Character.Humanoid:GetPlayingAnimationTracks() do
  118. Track:Stop()
  119. end
  120.  
  121. if HideCharacter then
  122. local Platform = Instance.new("Part")
  123.  
  124. Platform.Anchored = true
  125. Platform.Size = Vector3.new(100, 5, 100)
  126. Platform.CFrame = CFrame.new(0, 10000, 0)
  127. Platform.Transparency = 1
  128. Platform.Parent = workspace
  129.  
  130. Character:MoveTo(Platform.Position + Vector3.new(0, 5, 0))
  131.  
  132. wait(.5)
  133. end
  134.  
  135. if AnchorCharacter then
  136. for _, Part in pairs(Character:GetChildren()) do
  137. if Part:IsA("BasePart") then
  138. Part.Anchored = true
  139. end
  140. end
  141. end
  142. end
  143.  
  144. --[[
  145. Functions
  146. --]]
  147.  
  148. function Tween(Object, Style, Direction, Time, Goal)
  149. local tweenInfo = TweenInfo.new(Time, Enum.EasingStyle[Style], Enum.EasingDirection[Direction])
  150. local tween = game:GetService("TweenService"):Create(Object, tweenInfo, Goal)
  151.  
  152. tween.Completed:Connect(function()
  153. tween:Destroy()
  154. end)
  155.  
  156. tween:Play()
  157.  
  158. return tween
  159. end
  160.  
  161. local function GetMotorForLimb(Limb)
  162. for _, Motor in next, Character:GetDescendants() do
  163. if Motor:IsA("Motor6D") and Motor.Part1 == Limb then
  164. return Motor
  165. end
  166. end
  167. end
  168.  
  169. local function CreateAlignment(Limb, Part0)
  170. local Attachment0 = Instance.new("Attachment", Part0 or Anchor)
  171. local Attachment1 = Instance.new("Attachment", Limb)
  172.  
  173. local Orientation = Instance.new("AlignOrientation")
  174. local Position = Instance.new("AlignPosition")
  175.  
  176. Orientation.Attachment0 = Attachment1
  177. Orientation.Attachment1 = Attachment0
  178. Orientation.RigidityEnabled = false
  179. Orientation.MaxTorque = 20000
  180. Orientation.Responsiveness = 40
  181. Orientation.Parent = Character.HumanoidRootPart
  182.  
  183. Position.Attachment0 = Attachment1
  184. Position.Attachment1 = Attachment0
  185. Position.RigidityEnabled = false
  186. Position.MaxForce = 40000
  187. Position.Responsiveness = 40
  188. Position.Parent = Character.HumanoidRootPart
  189.  
  190. Limb.Massless = false
  191.  
  192. local Motor = GetMotorForLimb(Limb)
  193. if Motor then
  194. Motor:Destroy()
  195. end
  196.  
  197. return function(CF, Local)
  198. if Local then
  199. Attachment0.CFrame = CF
  200. else
  201. Attachment0.WorldCFrame = CF
  202. end
  203. end;
  204. end
  205.  
  206. local function GetExtraTool()
  207. for _, Tool in next, Character:GetChildren() do
  208. if Tool:IsA("Tool") and not Tool.Name:match("LIMB_TOOL") then
  209. return Tool
  210. end
  211. end
  212. end
  213.  
  214. local function GetGripForHandle(Handle)
  215. for _, Weld in next, Character:GetDescendants() do
  216. if Weld:IsA("Weld") and (Weld.Part0 == Handle or Weld.Part1 == Handle) then
  217. return Weld
  218. end
  219. end
  220.  
  221. wait(.2)
  222.  
  223. for _, Weld in next, Character:GetDescendants() do
  224. if Weld:IsA("Weld") and (Weld.Part0 == Handle or Weld.Part1 == Handle) then
  225. return Weld
  226. end
  227. end
  228. end
  229.  
  230. local function CreateRightGrip(Handle)
  231. local RightGrip = Instance.new("Weld")
  232.  
  233. RightGrip.Name = "RightGrip"
  234. RightGrip.Part1 = Handle
  235. RightGrip.Part0 = WeldBase
  236. RightGrip.Parent = WeldBase
  237.  
  238. return RightGrip
  239. end
  240.  
  241. local function CreateAccessory(Accessory, DeleteMeshes)
  242. if not Accessory then
  243. return
  244. end
  245.  
  246. local HatAttachment = Accessory.Handle:FindFirstChildWhichIsA("Attachment")
  247. local HeadAttachment = VirtualRig:FindFirstChild(HatAttachment.Name, true)
  248. local BasePart = HeadAttachment.Parent
  249.  
  250. local HatAtt = HatAttachment.CFrame
  251. local HeadAtt = HeadAttachment.CFrame
  252.  
  253. if DeleteMeshes then
  254. if Accessory.Handle:FindFirstChild("Mesh") then
  255. Accessory.Handle.Mesh:Destroy()
  256. end
  257. end
  258.  
  259. wait()
  260.  
  261. local Handle = Accessory:WaitForChild("Handle")
  262.  
  263. if Handle:FindFirstChildWhichIsA("Weld", true) then
  264. Handle:FindFirstChildWhichIsA("Weld", true):Destroy()
  265. Handle:BreakJoints()
  266. else
  267. Handle:BreakJoints()
  268. end
  269.  
  270. Handle.Massless = true
  271. Handle.Transparency = 0.5
  272.  
  273. UsedAccessories[Accessory] = true
  274.  
  275. local RightGrip = CreateRightGrip(Handle)
  276.  
  277. wait()
  278.  
  279. for _, Object in pairs(Handle:GetDescendants()) do
  280. if not Object:IsA("BasePart") then
  281. pcall(function()
  282. Object.Transparency = 1
  283. end)
  284.  
  285. pcall(function()
  286. Object.Enabled = false
  287. end)
  288. end
  289. end
  290.  
  291. return Handle, RightGrip, HatAtt, HeadAtt, BasePart;
  292. end
  293.  
  294. local function GetHeadAccessories()
  295. for _, Accessory in next, Character:GetChildren() do
  296. if Accessory:IsA("Accessory") and not UsedAccessories[Accessory] then
  297. local Handle, RightGrip, HatAtt, HeadAtt, BasePart = CreateAccessory(Accessory)
  298.  
  299. table.insert(HeadAccessories, {Handle, RightGrip, HatAtt, HeadAtt, BasePart})
  300.  
  301. do
  302. Handle.Transparency = 1
  303. end
  304.  
  305. if not WearAllAccessories then
  306. break
  307. end
  308. end
  309. end
  310. end
  311.  
  312. --[[
  313. VR Replication Setup
  314. --]]
  315.  
  316. if not RagdollEnabled then
  317. LeftHandle, LeftHandGrip = CreateAccessory(Character:FindFirstChild(AccessorySettings.LeftArm), AccessorySettings.BlockArms)
  318. RightHandle, RightHandGrip = CreateAccessory(Character:FindFirstChild(AccessorySettings.RightArm), AccessorySettings.BlockArms)
  319. LeftHipHandle, LeftLegGrip = CreateAccessory(Character:FindFirstChild(AccessorySettings.LeftLeg), AccessorySettings.BlockLegs)
  320. RightHipHandle, RightLegGrip = CreateAccessory(Character:FindFirstChild(AccessorySettings.RightLeg), AccessorySettings.BlockLegs)
  321. TorsoHandle, TorsoGrip = CreateAccessory(Character:FindFirstChild(AccessorySettings.Torso), AccessorySettings.BlockTorso)
  322. GetHeadAccessories()
  323.  
  324. elseif RagdollEnabled then
  325. if RagdollHeadMovement then
  326. Permadeath()
  327. MoveHead = CreateAlignment(Character["Head"])
  328. end
  329.  
  330. MoveRightArm = CreateAlignment(Character["Right Arm"])
  331. MoveLeftArm = CreateAlignment(Character["Left Arm"])
  332. MoveRightLeg = CreateAlignment(Character["Right Leg"])
  333. MoveLeftLeg = CreateAlignment(Character["Left Leg"])
  334. MoveTorso = CreateAlignment(Character["Torso"])
  335. MoveRoot = CreateAlignment(Character.HumanoidRootPart)
  336.  
  337. if RagdollHeadMovement then
  338. for _, Accessory in next, Character:GetChildren() do
  339. if Accessory:IsA("Accessory") and Accessory:FindFirstChild("Handle") then
  340. local Attachment1 = Accessory.Handle:FindFirstChildWhichIsA("Attachment")
  341. local Attachment0 = Character:FindFirstChild(tostring(Attachment1), true)
  342.  
  343. local Orientation = Instance.new("AlignOrientation")
  344. local Position = Instance.new("AlignPosition")
  345.  
  346. print(Attachment1, Attachment0, Accessory)
  347.  
  348. Orientation.Attachment0 = Attachment1
  349. Orientation.Attachment1 = Attachment0
  350. Orientation.RigidityEnabled = false
  351. Orientation.ReactionTorqueEnabled = true
  352. Orientation.MaxTorque = 20000
  353. Orientation.Responsiveness = 40
  354. Orientation.Parent = Character.Head
  355.  
  356. Position.Attachment0 = Attachment1
  357. Position.Attachment1 = Attachment0
  358. Position.RigidityEnabled = false
  359. Position.ReactionForceEnabled = true
  360. Position.MaxForce = 40000
  361. Position.Responsiveness = 40
  362. Position.Parent = Character.Head
  363. end
  364. end
  365. end
  366. end
  367.  
  368. --[[
  369. Movement
  370. --]]
  371.  
  372. VirtualRig.Name = "VirtualRig"
  373. VirtualRig.RightFoot.BodyPosition.Position = CharacterCFrame.p
  374. VirtualRig.LeftFoot.BodyPosition.Position = CharacterCFrame.p
  375. VirtualRig.Parent = workspace
  376. VirtualRig:SetPrimaryPartCFrame(CharacterCFrame)
  377.  
  378. VirtualRig.Humanoid.Health = 0
  379. VirtualRig:BreakJoints()
  380. --
  381.  
  382. VirtualBody.Parent = workspace
  383. VirtualBody.Name = "VirtualBody"
  384. VirtualBody.Humanoid.WalkSpeed = 8
  385. VirtualBody.Humanoid.CameraOffset = Vector3.new(0, StudsOffset, 0)
  386. VirtualBody:SetPrimaryPartCFrame(CharacterCFrame)
  387.  
  388. VirtualBody.Humanoid.Died:Connect(function()
  389. print("Virtual death")
  390. if AutoRespawn then
  391. Character:BreakJoints()
  392.  
  393. if RagdollHeadMovement and RagdollEnabled then
  394. Network:Unclaim()
  395. Respawn()
  396. end
  397. end
  398. end)
  399. --
  400.  
  401. Camera.CameraSubject = VirtualBody.Humanoid
  402.  
  403. Character.Humanoid.WalkSpeed = 0
  404. Character.Humanoid.JumpPower = 1
  405.  
  406. for _, Part in next, VirtualBody:GetChildren() do
  407. if Part:IsA("BasePart") then
  408. Part.Transparency = 1
  409. end
  410. end
  411.  
  412. for _, Part in next, VirtualRig:GetChildren() do
  413. if Part:IsA("BasePart") then
  414. Part.Transparency = 1
  415. end
  416. end
  417.  
  418. if not VRReady then
  419. VirtualRig.RightUpperArm.ShoulderConstraint.RigidityEnabled = true
  420. VirtualRig.LeftUpperArm.ShoulderConstraint.RigidityEnabled = true
  421. end
  422.  
  423.  
  424. local OnMoving = RunService.Stepped:Connect(function()
  425. local Direction = Character.Humanoid.MoveDirection
  426. local Start = VirtualBody.HumanoidRootPart.Position
  427. local Point = Start + Direction * 6
  428.  
  429. VirtualBody.Humanoid:MoveTo(Point)
  430. end)
  431.  
  432. Character.Humanoid.Jumping:Connect(function()
  433. VirtualBody.Humanoid.Jump = true
  434. end)
  435.  
  436. UserInputService.JumpRequest:Connect(function()
  437. VirtualBody.Humanoid.Jump = true
  438. end)
  439.  
  440. --[[
  441. VR Replication
  442. --]]
  443.  
  444. if RagdollEnabled then
  445. for _, Part in pairs(Character:GetDescendants()) do
  446. if Part:IsA("BasePart") and Part.Name == "Handle" and Part.Parent:IsA("Accessory") then
  447. Part.LocalTransparencyModifier = 1
  448. elseif Part:IsA("BasePart") and Part.Transparency < 0.5 and Part.Name ~= "Head" then
  449. Part.LocalTransparencyModifier = 0.5
  450. elseif Part:IsA("BasePart") and Part.Name == "Head" then
  451. Part.LocalTransparencyModifier = 1
  452. end
  453.  
  454. if not Part:IsA("BasePart") and not Part:IsA("AlignPosition") and not Part:IsA("AlignOrientation") then
  455. pcall(function()
  456. Part.Transparency = 1
  457. end)
  458.  
  459. pcall(function()
  460. Part.Enabled = false
  461. end)
  462. end
  463. end
  464. end
  465.  
  466. local FootUpdateDebounce = tick()
  467.  
  468. local function FloorRay(Part, Distance)
  469. local Position = Part.CFrame.p
  470. local Target = Position - Vector3.new(0, Distance, 0)
  471. local Line = Ray.new(Position, (Target - Position).Unit * Distance)
  472.  
  473. local FloorPart, FloorPosition, FloorNormal = workspace:FindPartOnRayWithIgnoreList(Line, {VirtualRig, VirtualBody, Character})
  474.  
  475. if FloorPart then
  476. return FloorPart, FloorPosition, FloorNormal, (FloorPosition - Position).Magnitude
  477. else
  478. return nil, Target, Vector3.new(), Distance
  479. end
  480. end
  481.  
  482. local function Flatten(CF)
  483. local X,Y,Z = CF.X,CF.Y,CF.Z
  484. local LX,LZ = CF.lookVector.X,CF.lookVector.Z
  485.  
  486. return CFrame.new(X,Y,Z) * CFrame.Angles(0,math.atan2(LX,LZ),0)
  487. end
  488.  
  489. local FootTurn = 1
  490.  
  491. local function FootReady(Foot, Target)
  492. local MaxDist
  493.  
  494. if Character.Humanoid.MoveDirection.Magnitude > 0 then
  495. MaxDist = .5
  496. else
  497. MaxDist = 1
  498. end
  499.  
  500. local PastThreshold = (Foot.Position - Target.Position).Magnitude > MaxDist
  501. local PastTick = tick() - FootUpdateDebounce >= 2
  502.  
  503. if PastThreshold or PastTick then
  504. FootUpdateDebounce = tick()
  505. end
  506.  
  507. return
  508. PastThreshold
  509. or
  510. PastTick
  511. end
  512.  
  513. local function FootYield()
  514. local RightFooting = VirtualRig.RightFoot.BodyPosition
  515. local LeftFooting = VirtualRig.LeftFoot.BodyPosition
  516. local LowerTorso = VirtualRig.LowerTorso
  517.  
  518. local Yield = tick()
  519.  
  520. repeat
  521. RunService.Stepped:Wait()
  522. if
  523. (LowerTorso.Position - RightFooting.Position).Y > 4
  524. or
  525. (LowerTorso.Position - LeftFooting.Position).Y > 4
  526. or
  527. ((LowerTorso.Position - RightFooting.Position) * Vector3.new(1, 0, 1)).Magnitude > 4
  528. or
  529. ((LowerTorso.Position - LeftFooting.Position) * Vector3.new(1, 0, 1)).Magnitude > 4
  530. then
  531. break
  532. end
  533. until tick() - Yield >= .17
  534. end
  535.  
  536. local function UpdateFooting()
  537. if not VirtualRig:FindFirstChild("LowerTorso") then
  538. wait()
  539. return
  540. end
  541.  
  542. local Floor, FloorPosition, FloorNormal, Dist = FloorRay(VirtualRig.LowerTorso, 3)
  543.  
  544. Dist = math.clamp(Dist, 0, 5)
  545.  
  546. local FootTarget =
  547. VirtualRig.LowerTorso.CFrame *
  548. CFrame.new(FootPlacementSettings.RightOffset) -
  549. Vector3.new(0, Dist, 0) +
  550. Character.Humanoid.MoveDirection * (VirtualBody.Humanoid.WalkSpeed / 8) * 2
  551.  
  552. if FootReady(VirtualRig.RightFoot, FootTarget) then
  553. VirtualRig.RightFoot.BodyPosition.Position = FootTarget.p
  554. VirtualRig.RightFoot.BodyGyro.CFrame = Flatten(VirtualRig.LowerTorso.CFrame)
  555. end
  556.  
  557. FootYield()
  558.  
  559. local FootTarget =
  560. VirtualRig.LowerTorso.CFrame *
  561. CFrame.new(FootPlacementSettings.LeftOffset) -
  562. Vector3.new(0, Dist, 0) +
  563. Character.Humanoid.MoveDirection * (VirtualBody.Humanoid.WalkSpeed / 8) * 2
  564.  
  565. if FootReady(VirtualRig.LeftFoot, FootTarget) then
  566. VirtualRig.LeftFoot.BodyPosition.Position = FootTarget.p
  567. VirtualRig.LeftFoot.BodyGyro.CFrame = Flatten(VirtualRig.LowerTorso.CFrame)
  568. end
  569. end
  570.  
  571. local function UpdateTorsoPosition()
  572. if not RagdollEnabled then
  573. if TorsoHandle then
  574. local Positioning = VirtualRig.UpperTorso.CFrame
  575.  
  576. if not TorsoGrip or not TorsoGrip.Parent then
  577. TorsoGrip = CreateRightGrip(TorsoHandle)
  578. end
  579.  
  580. local Parent = TorsoGrip.Parent
  581.  
  582. TorsoGrip.C1 = CFrame.new()
  583. TorsoGrip.C0 = TorsoGrip.C0:Lerp(WeldBase.CFrame:ToObjectSpace(Positioning * CFrame.new(0, -0.25, 0) * AccessorySettings.LimbOffset), Smoothness)
  584. TorsoGrip.Parent = nil
  585. TorsoGrip.Parent = Parent
  586. end
  587. else
  588. local Positioning = VirtualRig.UpperTorso.CFrame
  589.  
  590. MoveTorso(Positioning * CFrame.new(0, -0.25, 0))
  591. MoveRoot(Positioning * CFrame.new(0, -0.25, 0))
  592. end
  593. end
  594.  
  595. local function UpdateLegPosition()
  596. if not RagdollEnabled then
  597. if RightHipHandle then
  598. local Positioning =
  599. VirtualRig.RightLowerLeg.CFrame
  600. : Lerp(VirtualRig.RightFoot.CFrame, 0.5)
  601. + Vector3.new(0, 0.5, 0)
  602.  
  603. if not RightHipHandle or not RightHipHandle.Parent then
  604. RightLegGrip = CreateRightGrip(RightHipHandle)
  605. end
  606.  
  607. local Parent = RightLegGrip.Parent
  608.  
  609. RightLegGrip.C1 = CFrame.new()
  610. RightLegGrip.C0 = RightLegGrip.C0:Lerp(WeldBase.CFrame:ToObjectSpace(Positioning * AccessorySettings.LimbOffset), Smoothness)
  611. RightLegGrip.Parent = nil
  612. RightLegGrip.Parent = Parent
  613. end
  614.  
  615. if LeftHipHandle then
  616. local Positioning =
  617. VirtualRig.LeftLowerLeg.CFrame
  618. : Lerp(VirtualRig.LeftFoot.CFrame, 0.5)
  619. + Vector3.new(0, 0.5, 0)
  620.  
  621. if not LeftLegGrip or not LeftLegGrip.Parent then
  622. LeftLegGrip = CreateRightGrip(LeftHipHandle)
  623. end
  624.  
  625. local Parent = LeftLegGrip.Parent
  626.  
  627. LeftLegGrip.C1 = CFrame.new()
  628. LeftLegGrip.C0 = LeftLegGrip.C0:Lerp(WeldBase.CFrame:ToObjectSpace(Positioning * AccessorySettings.LimbOffset), Smoothness)
  629. LeftLegGrip.Parent = nil
  630. LeftLegGrip.Parent = Parent
  631. end
  632. else
  633. do
  634. local Positioning =
  635. VirtualRig.RightLowerLeg.CFrame
  636. : Lerp(VirtualRig.RightFoot.CFrame, 0.5)
  637. * CFrame.Angles(0, math.rad(180), 0)
  638. + Vector3.new(0, 0.5, 0)
  639.  
  640. MoveRightLeg(Positioning)
  641. end
  642.  
  643. do
  644. local Positioning =
  645. VirtualRig.LeftLowerLeg.CFrame
  646. : Lerp(VirtualRig.LeftFoot.CFrame, 0.5)
  647. * CFrame.Angles(0, math.rad(180), 0)
  648. + Vector3.new(0, 0.5, 0)
  649.  
  650. MoveLeftLeg(Positioning)
  651. end
  652. end
  653. end
  654.  
  655. warn("VRReady is", VRReady)
  656.  
  657. local function OnUserCFrameChanged(UserCFrame, Positioning, IgnoreTorso)
  658. local Positioning = Camera.CFrame * Positioning
  659.  
  660. if not IgnoreTorso then
  661. UpdateTorsoPosition()
  662. UpdateLegPosition()
  663. end
  664.  
  665. if not RagdollEnabled then
  666. if UserCFrame == Enum.UserCFrame.Head and AccessorySettings.Head then
  667. for _, Table in next, HeadAccessories do
  668. local Handle, RightGrip, HatAtt, HeadAtt, BasePart = unpack(Table)
  669. local LocalPositioning = Positioning
  670.  
  671. if not RightGrip or not RightGrip.Parent then
  672. RightGrip = CreateRightGrip(Handle)
  673. Table[2] = RightGrip
  674. end
  675.  
  676. local Parent = RightGrip.Parent
  677.  
  678. if BasePart then
  679. LocalPositioning = BasePart.CFrame * HeadAtt
  680. end
  681.  
  682. RightGrip.C1 = HatAtt
  683. RightGrip.C0 = RightGrip.C0:Lerp(WeldBase.CFrame:ToObjectSpace(LocalPositioning), Smoothness)
  684. RightGrip.Parent = nil
  685. RightGrip.Parent = Parent
  686. end
  687.  
  688. elseif RightHandle and UserCFrame == Enum.UserCFrame.RightHand and AccessorySettings.RightArm then
  689. local HandPosition = Positioning
  690. local LocalPositioning = Positioning
  691.  
  692. if not RightHandGrip or not RightHandGrip.Parent then
  693. RightHandGrip = CreateRightGrip(RightHandle)
  694. end
  695.  
  696. if AccurateHandPosition then
  697. HandPosition = HandPosition * CFrame.new(0, 0, 1)
  698. end
  699.  
  700. if not VRReady then
  701. local HeadRotation = Camera.CFrame - Camera.CFrame.p
  702.  
  703. HandPosition = VirtualRig.RightUpperArm.CFrame:Lerp(VirtualRig.RightLowerArm.CFrame, 0.5) * AccessorySettings.LimbOffset
  704.  
  705. --LocalPositioning = (HeadRotation + (HandPosition * CFrame.new(0, 0, 1)).p) * CFrame.Angles(math.rad(-45), 0, 0)
  706. LocalPositioning = HandPosition * CFrame.new(0, 0, 1) * CFrame.Angles(math.rad(-180), 0, 0)
  707.  
  708. if Point2 then
  709. VirtualRig.RightUpperArm.Aim.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
  710. VirtualRig.RightUpperArm.Aim.CFrame = Camera.CFrame * AccessorySettings.LimbOffset
  711. elseif VirtualRig.RightUpperArm.Aim.MaxTorque ~= Vector3.new(0, 0, 0) then
  712. VirtualRig.RightUpperArm.Aim.MaxTorque = Vector3.new(0, 0, 0)
  713. end
  714. elseif AccurateHandPosition then
  715. LocalPositioning = HandPosition
  716. end
  717.  
  718. local Parent = RightHandGrip.Parent
  719.  
  720. RightHandGrip.C1 = CFrame.new()
  721. RightHandGrip.C0 = RightHandGrip.C0:Lerp(WeldBase.CFrame:ToObjectSpace(HandPosition), Smoothness)
  722. RightHandGrip.Parent = nil
  723. RightHandGrip.Parent = Parent
  724.  
  725. --
  726.  
  727. local EquippedTool = GetExtraTool()
  728.  
  729. if EquippedTool and EquippedTool:FindFirstChild("Handle") then
  730. local EquippedGrip = GetGripForHandle(EquippedTool.Handle)
  731. local Parent = EquippedGrip.Parent
  732.  
  733. local ArmBaseCFrame = ArmBase.CFrame
  734. if ArmBase.Name == "Right Arm" then
  735. ArmBaseCFrame = ArmBaseCFrame
  736. end
  737.  
  738. EquippedGrip.C1 = EquippedTool.Grip
  739. EquippedGrip.C0 = EquippedGrip.C0:Lerp(ArmBaseCFrame:ToObjectSpace(LocalPositioning), Smoothness)
  740. EquippedGrip.Parent = nil
  741. EquippedGrip.Parent = Parent
  742. end
  743.  
  744. elseif LeftHandle and UserCFrame == Enum.UserCFrame.LeftHand and AccessorySettings.LeftArm then
  745. local HandPosition = Positioning
  746.  
  747. if not LeftHandGrip or not LeftHandGrip.Parent then
  748. LeftHandGrip = CreateRightGrip(LeftHandle)
  749. end
  750.  
  751. if AccurateHandPosition then
  752. HandPosition = HandPosition * CFrame.new(0, 0, 1)
  753. end
  754.  
  755. if not VRReady then
  756. HandPosition = VirtualRig.LeftUpperArm.CFrame:Lerp(VirtualRig.LeftLowerArm.CFrame, 0.5) * AccessorySettings.LimbOffset
  757. --warn("Setting HandPosition to hands")
  758. if Point1 then
  759. VirtualRig.LeftUpperArm.Aim.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
  760. VirtualRig.LeftUpperArm.Aim.CFrame = Camera.CFrame * AccessorySettings.LimbOffset
  761. elseif VirtualRig.LeftUpperArm.Aim.MaxTorque ~= Vector3.new(0, 0, 0) then
  762. VirtualRig.LeftUpperArm.Aim.MaxTorque = Vector3.new(0, 0, 0)
  763. end
  764. end
  765.  
  766. local Parent = LeftHandGrip.Parent
  767.  
  768. LeftHandGrip.C1 = CFrame.new()
  769. LeftHandGrip.C0 = LeftHandGrip.C0:Lerp(WeldBase.CFrame:ToObjectSpace(HandPosition), Smoothness)
  770. LeftHandGrip.Parent = nil
  771. LeftHandGrip.Parent = Parent
  772.  
  773. end
  774. end
  775.  
  776. if RagdollEnabled then
  777. if UserCFrame == Enum.UserCFrame.Head and RagdollHeadMovement then
  778. MoveHead(Positioning)
  779. elseif UserCFrame == Enum.UserCFrame.RightHand then
  780. local Positioning = Positioning
  781.  
  782. if not VRReady then
  783. Positioning = VirtualRig.RightUpperArm.CFrame:Lerp(VirtualRig.RightLowerArm.CFrame, 0.5)
  784. elseif AccurateHandPosition then
  785. Positioning = Positioning * CFrame.new(0, 0, 1)
  786. end
  787.  
  788. if VRReady then
  789. Positioning = Positioning * AccessorySettings.LimbOffset
  790. end
  791.  
  792. MoveRightArm(Positioning)
  793.  
  794. if Point2 then
  795. VirtualRig.RightUpperArm.Aim.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
  796. VirtualRig.RightUpperArm.Aim.CFrame = Camera.CFrame * AccessorySettings.LimbOffset
  797. elseif VirtualRig.RightUpperArm.Aim.MaxTorque ~= Vector3.new(0, 0, 0) then
  798. VirtualRig.RightUpperArm.Aim.MaxTorque = Vector3.new(0, 0, 0)
  799. end
  800. elseif UserCFrame == Enum.UserCFrame.LeftHand then
  801. local Positioning = Positioning
  802.  
  803. if not VRReady then
  804. Positioning = VirtualRig.LeftUpperArm.CFrame:Lerp(VirtualRig.LeftLowerArm.CFrame, 0.5)
  805. elseif AccurateHandPosition then
  806. Positioning = Positioning * CFrame.new(0, 0, 1)
  807. end
  808.  
  809. if VRReady then
  810. Positioning = Positioning * AccessorySettings.LimbOffset
  811. end
  812.  
  813. MoveLeftArm(Positioning)
  814.  
  815. if Point1 then
  816. VirtualRig.LeftUpperArm.Aim.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
  817. VirtualRig.LeftUpperArm.Aim.CFrame = Camera.CFrame * AccessorySettings.LimbOffset
  818. elseif VirtualRig.LeftUpperArm.Aim.MaxTorque ~= Vector3.new(0, 0, 0) then
  819. VirtualRig.LeftUpperArm.Aim.MaxTorque = Vector3.new(0, 0, 0)
  820. end
  821. end
  822. end
  823.  
  824. if UserCFrame == Enum.UserCFrame.Head then
  825. VirtualRig.Head.CFrame = Positioning
  826.  
  827. elseif UserCFrame == Enum.UserCFrame.RightHand and VRReady then
  828. VirtualRig.RightHand.CFrame = Positioning
  829.  
  830. elseif UserCFrame == Enum.UserCFrame.LeftHand and VRReady then
  831. VirtualRig.LeftHand.CFrame = Positioning
  832.  
  833. end
  834.  
  835. if not VRReady and VirtualRig.LeftHand.Anchored then
  836. VirtualRig.RightHand.Anchored = false
  837. VirtualRig.LeftHand.Anchored = false
  838. elseif VRReady and not VirtualRig.LeftHand.Anchored then
  839. VirtualRig.RightHand.Anchored = true
  840. VirtualRig.LeftHand.Anchored = true
  841. end
  842. end
  843.  
  844. local CFrameChanged = VRService.UserCFrameChanged:Connect(OnUserCFrameChanged)
  845.  
  846. local OnStepped = RunService.Stepped:Connect(function()
  847. for _, Part in pairs(VirtualRig:GetChildren()) do
  848. if Part:IsA("BasePart") then
  849. Part.CanCollide = false
  850. end
  851. end
  852.  
  853. if RagdollEnabled then
  854. for _, Part in pairs(Character:GetChildren()) do
  855. if Part:IsA("BasePart") then
  856. Part.CanCollide = false
  857. end
  858. end
  859. end
  860.  
  861. if NoCollision then
  862. for _, Player in pairs(Players:GetPlayers()) do
  863. if Player ~= Client and Player.Character then
  864. local Descendants = Player.Character:GetDescendants()
  865. for i = 1, #Descendants do
  866. local Part = Descendants[i]
  867. if Part:IsA("BasePart") then
  868. Part.CanCollide = false
  869. Part.Velocity = Vector3.new()
  870. Part.RotVelocity = Vector3.new()
  871. end
  872. end
  873. end
  874. end
  875. end
  876. end)
  877.  
  878. local OnRenderStepped = RunService.Stepped:Connect(function()
  879. Camera.CameraSubject = VirtualBody.Humanoid
  880.  
  881. if RagdollEnabled then
  882. Character.HumanoidRootPart.CFrame = VirtualRig.UpperTorso.CFrame
  883. Character.HumanoidRootPart.Velocity = Vector3.new(0, 0, 0)
  884. end
  885.  
  886. if not VRReady then
  887. OnUserCFrameChanged(Enum.UserCFrame.Head, CFrame.new(0, 0, 0))
  888.  
  889. OnUserCFrameChanged(Enum.UserCFrame.RightHand, CFrame.new(0, 0, 0), true)
  890. OnUserCFrameChanged(Enum.UserCFrame.LeftHand, CFrame.new(0, 0, 0), true)
  891. end
  892. end)
  893.  
  894. spawn(function()
  895. while Character and Character.Parent do
  896. FootYield()
  897. UpdateFooting()
  898. end
  899. end)
  900.  
  901. --[[
  902. Non-VR Support + VR Mechanics
  903. --]]
  904.  
  905. local OnInput = UserInputService.InputBegan:Connect(function(Input, Processed)
  906. if not Processed then
  907. if Input.KeyCode == Enum.KeyCode.LeftControl or Input.KeyCode == Enum.KeyCode.ButtonL2 then
  908. Tween(VirtualBody.Humanoid, "Elastic", "Out", 1, {
  909. CameraOffset = Vector3.new(0, StudsOffset - 1.5, 0)
  910. })
  911. end
  912.  
  913. if Input.KeyCode == Enum.KeyCode.X then
  914. if RagdollEnabled and RagdollHeadMovement then
  915. Network:Unclaim()
  916. Respawn()
  917. end
  918. end
  919.  
  920. if Input.KeyCode == Enum.KeyCode.C then
  921. VirtualBody:MoveTo(Mouse.Hit.p)
  922. VirtualRig:MoveTo(Mouse.Hit.p)
  923. end
  924. end
  925.  
  926. if Input.KeyCode == Enum.KeyCode.LeftShift or Input.KeyCode == Enum.KeyCode.ButtonR2 then
  927. Tween(VirtualBody.Humanoid, "Sine", "Out", 1, {
  928. WalkSpeed = 16
  929. })
  930. end
  931.  
  932. if not VRReady and Input.UserInputType == Enum.UserInputType.MouseButton1 then
  933. Point1 = true
  934. end
  935.  
  936. if not VRReady and Input.UserInputType == Enum.UserInputType.MouseButton2 then
  937. Point2 = true
  938. end
  939.  
  940. if VRReady and Input.KeyCode == Enum.KeyCode.ButtonY then
  941. Character:BreakJoints()
  942.  
  943. if RagdollEnabled and RagdollHeadMovement then
  944. Network:Unclaim()
  945. Respawn()
  946. end
  947. end
  948. end)
  949.  
  950. local OnInputEnded = UserInputService.InputEnded:Connect(function(Input, Processed)
  951. if not Processed then
  952. if Input.KeyCode == Enum.KeyCode.LeftControl or Input.KeyCode == Enum.KeyCode.ButtonL2 then
  953. Tween(VirtualBody.Humanoid, "Elastic", "Out", 1, {
  954. CameraOffset = Vector3.new(0, StudsOffset, 0)
  955. })
  956. end
  957. end
  958.  
  959. if Input.KeyCode == Enum.KeyCode.LeftShift or Input.KeyCode == Enum.KeyCode.ButtonR2 then
  960. Tween(VirtualBody.Humanoid, "Sine", "Out", 1, {
  961. WalkSpeed = 8
  962. })
  963. end
  964.  
  965. if not VRReady and Input.UserInputType == Enum.UserInputType.MouseButton1 then
  966. Point1 = false
  967. end
  968.  
  969. if not VRReady and Input.UserInputType == Enum.UserInputType.MouseButton2 then
  970. Point2 = false
  971. end
  972. end)
  973.  
  974. --[[
  975. Proper Cleanup
  976. --]]
  977.  
  978. local OnReset
  979.  
  980. OnReset = Client.CharacterAdded:Connect(function()
  981. OnReset:Disconnect();
  982. CFrameChanged:Disconnect();
  983. OnStepped:Disconnect();
  984. OnRenderStepped:Disconnect();
  985. OnMoving:Disconnect();
  986. OnInput:Disconnect();
  987. OnInputEnded:Disconnect();
  988.  
  989. VirtualRig:Destroy();
  990. VirtualBody:Destroy();
  991.  
  992. if RagdollEnabled then
  993. Network:Unclaim();
  994. end
  995.  
  996. if AutoRun then
  997. delay(2, function()
  998. Script()
  999. end)
  1000. end
  1001. end)
  1002.  
  1003. if ChatEnabled then
  1004. spawn(ChatHUDFunc)
  1005. end
  1006.  
  1007. if ViewportEnabled then
  1008. spawn(ViewHUDFunc)
  1009. end
  1010.  
  1011. do
  1012. --[[
  1013. Functions
  1014. --]]
  1015.  
  1016. local Players = game:GetService("Players")
  1017. local Client = Players.LocalPlayer
  1018.  
  1019. local VRService = game:GetService("VRService")
  1020. local VRReady = VRService.VREnabled
  1021.  
  1022. local UserInputService = game:GetService("UserInputService")
  1023. local RunService = game:GetService("RunService")
  1024.  
  1025. local Camera = workspace.CurrentCamera
  1026.  
  1027. --[[
  1028. Code
  1029. --]]
  1030.  
  1031. if VRReady then
  1032. local Pointer = game:GetObjects("rbxassetid://4476173280")[1]
  1033.  
  1034. Pointer.Parent = workspace
  1035. Pointer.Beam.Enabled = false
  1036. Pointer.Target.ParticleEmitter.Enabled = false
  1037.  
  1038. local RenderStepped = RunService.RenderStepped:Connect(function()
  1039. if Pointer.Beam.Enabled then
  1040. local RightHand = Camera.CFrame * VRService:GetUserCFrame(Enum.UserCFrame.RightHand)
  1041. local Target = RightHand * CFrame.new(0, 0, -10)
  1042.  
  1043. local Line = Ray.new(RightHand.p, (Target.p - RightHand.p).Unit * 128)
  1044. local Part, Position = workspace:FindPartOnRayWithIgnoreList(Line, {VirtualRig, VirtualBody, Character, Pointer})
  1045.  
  1046. local Distance = (Position - RightHand.p).Magnitude
  1047.  
  1048. Pointer.Target.Position = Vector3.new(0, 0, -Distance)
  1049. Pointer.CFrame = RightHand
  1050. end
  1051. end)
  1052.  
  1053. local Input = UserInputService.InputBegan:Connect(function(Input)
  1054. if Input.KeyCode == Enum.KeyCode.ButtonB then
  1055. Pointer.Beam.Enabled = not Pointer.Beam.Enabled
  1056. Pointer.Target.ParticleEmitter.Enabled = not Pointer.Target.ParticleEmitter.Enabled
  1057. end
  1058. end)
  1059.  
  1060. --
  1061.  
  1062. local CharacterAdded
  1063.  
  1064. CharacterAdded = Client.CharacterAdded:Connect(function()
  1065. RenderStepped:Disconnect()
  1066. Input:Disconnect()
  1067. CharacterAdded:Disconnect()
  1068.  
  1069. Pointer:Destroy()
  1070. Pointer = nil
  1071. end)
  1072. else
  1073. return
  1074. end
  1075. end
  1076.  
  1077. end;
  1078.  
  1079. Permadeath = function()
  1080. local ch = game.Players.LocalPlayer.Character
  1081. local prt=Instance.new("Model", workspace)
  1082. local z1 = Instance.new("Part", prt)
  1083. z1.Name="Torso"
  1084. z1.CanCollide = false
  1085. z1.Anchored = true
  1086. local z2 =Instance.new("Part", prt)
  1087. z2.Name="Head"
  1088. z2.Anchored = true
  1089. z2.CanCollide = false
  1090. local z3 =Instance.new("Humanoid", prt)
  1091. z3.Name="Humanoid"
  1092. z1.Position = Vector3.new(0,9999,0)
  1093. z2.Position = Vector3.new(0,9991,0)
  1094. game.Players.LocalPlayer.Character=prt
  1095. wait(5)
  1096. warn("50%")
  1097. game.Players.LocalPlayer.Character=ch
  1098. wait(6)
  1099. warn("100%")
  1100. end;
  1101.  
  1102. Respawn = function()
  1103. local ch = game.Players.LocalPlayer.Character
  1104.  
  1105. local prt=Instance.new("Model", workspace)
  1106. local z1 = Instance.new("Part", prt)
  1107. z1.Name="Torso"
  1108. z1.CanCollide = false
  1109. z1.Anchored = true
  1110. local z2 =Instance.new("Part", prt)
  1111. z2.Name="Head"
  1112. z2.Anchored = true
  1113. z2.CanCollide = false
  1114. local z3 =Instance.new("Humanoid", prt)
  1115. z3.Name="Humanoid"
  1116. z1.Position = Vector3.new(0,9999,0)
  1117. z2.Position = Vector3.new(0,9991,0)
  1118. game.Players.LocalPlayer.Character=prt
  1119. wait(5)
  1120. game.Players.LocalPlayer.Character=ch
  1121. end;
  1122.  
  1123. ChatHUDFunc = function()
  1124. --[[
  1125. Variables
  1126. --]]
  1127.  
  1128. local UserInputService = game:GetService("UserInputService")
  1129. local RunService = game:GetService("RunService")
  1130.  
  1131. local VRService = game:GetService("VRService")
  1132. local VRReady = VRService.VREnabled
  1133.  
  1134. local Players = game:GetService("Players")
  1135. local Client = Players.LocalPlayer
  1136.  
  1137. local ChatHUD = game:GetObjects("rbxassetid://4476067885")[1]
  1138. local GlobalFrame = ChatHUD.GlobalFrame
  1139. local Template = GlobalFrame.Template
  1140. local LocalFrame = ChatHUD.LocalFrame
  1141. local Global = ChatHUD.Global
  1142. local Local = ChatHUD.Local
  1143.  
  1144. local Camera = workspace.CurrentCamera
  1145.  
  1146. Template.Parent = nil
  1147. ChatHUD.Parent = game:GetService("CoreGui")
  1148.  
  1149. --[[
  1150. Code
  1151. --]]
  1152.  
  1153. local Highlight = Global.Frame.BackgroundColor3
  1154. local Deselected = Local.Frame.BackgroundColor3
  1155.  
  1156. local OpenGlobalTab = function()
  1157. Global.Frame.BackgroundColor3 = Highlight
  1158. Local.Frame.BackgroundColor3 = Deselected
  1159.  
  1160. Global.Font = Enum.Font.SourceSansBold
  1161. Local.Font = Enum.Font.SourceSans
  1162.  
  1163. GlobalFrame.Visible = true
  1164. LocalFrame.Visible = false
  1165. end
  1166.  
  1167. local OpenLocalTab = function()
  1168. Global.Frame.BackgroundColor3 = Deselected
  1169. Local.Frame.BackgroundColor3 = Highlight
  1170.  
  1171. Global.Font = Enum.Font.SourceSans
  1172. Local.Font = Enum.Font.SourceSansBold
  1173.  
  1174. GlobalFrame.Visible = false
  1175. LocalFrame.Visible = true
  1176. end
  1177.  
  1178. Global.MouseButton1Down:Connect(OpenGlobalTab)
  1179. Local.MouseButton1Down:Connect(OpenLocalTab)
  1180. Global.MouseButton1Click:Connect(OpenGlobalTab)
  1181. Local.MouseButton1Click:Connect(OpenLocalTab)
  1182.  
  1183. OpenLocalTab()
  1184.  
  1185. --
  1186.  
  1187. local function GetPlayerDistance(Sender)
  1188. if Sender.Character and Sender.Character:FindFirstChild("Head") then
  1189. return math.floor((Sender.Character.Head.Position - Camera:GetRenderCFrame().p).Magnitude + 0.5)
  1190. end
  1191. end
  1192.  
  1193. local function NewGlobal(Message, Sender, Color)
  1194. local Frame = Template:Clone()
  1195.  
  1196. Frame.Text = ("[%s]: %s"):format(Sender.Name, Message)
  1197. Frame.User.Text = ("[%s]:"):format(Sender.Name)
  1198. Frame.User.TextColor3 = Color
  1199. Frame.BackgroundColor3 = Color
  1200. Frame.Parent = GlobalFrame
  1201.  
  1202. delay(60, function()
  1203. Frame:Destroy()
  1204. end)
  1205. end
  1206.  
  1207. local function NewLocal(Message, Sender, Color, Dist)
  1208. local Frame = Template:Clone()
  1209.  
  1210. Frame.Text = ("(%s) [%s]: %s"):format(tostring(Dist), Sender.Name, Message)
  1211. Frame.User.Text = ("(%s) [%s]:"):format(tostring(Dist), Sender.Name)
  1212. Frame.User.TextColor3 = Color
  1213. Frame.BackgroundColor3 = Color
  1214. Frame.Parent = LocalFrame
  1215.  
  1216. delay(60, function()
  1217. Frame:Destroy()
  1218. end)
  1219. end
  1220.  
  1221. local function OnNewChat(Message, Sender, Color)
  1222. if not ChatHUD or not ChatHUD.Parent then return end
  1223.  
  1224. NewGlobal(Message, Sender, Color)
  1225.  
  1226. local Distance = GetPlayerDistance(Sender)
  1227.  
  1228. if Distance and Distance <= ChatLocalRange then
  1229. NewLocal(Message, Sender, Color, Distance)
  1230. end
  1231. end
  1232.  
  1233. local function OnPlayerAdded(Player)
  1234. if not ChatHUD or not ChatHUD.Parent then return end
  1235.  
  1236. local Color = BrickColor.Random().Color
  1237.  
  1238. Player.Chatted:Connect(function(Message)
  1239. OnNewChat(Message, Player, Color)
  1240. end)
  1241. end
  1242.  
  1243. Players.PlayerAdded:Connect(OnPlayerAdded)
  1244.  
  1245. for _, Player in pairs(Players:GetPlayers()) do
  1246. OnPlayerAdded(Player)
  1247. end
  1248.  
  1249. --
  1250.  
  1251. local ChatPart = ChatHUD.Part
  1252.  
  1253. ChatHUD.Adornee = ChatPart
  1254.  
  1255. if VRReady then
  1256. ChatHUD.Parent = game:GetService("CoreGui")
  1257. ChatHUD.Enabled = true
  1258. ChatHUD.AlwaysOnTop = true
  1259.  
  1260. local OnInput = UserInputService.InputBegan:Connect(function(Input, Processed)
  1261. if not Processed then
  1262. if Input.KeyCode == Enum.KeyCode.ButtonX then
  1263. ChatHUD.Enabled = not ChatHUD.Enabled
  1264. end
  1265. end
  1266. end)
  1267.  
  1268. local RenderStepped = RunService.RenderStepped:Connect(function()
  1269. local LeftHand = VRService:GetUserCFrame(Enum.UserCFrame.LeftHand)
  1270.  
  1271. ChatPart.CFrame = Camera.CFrame * LeftHand
  1272. end)
  1273.  
  1274. local CharacterAdded
  1275.  
  1276. CharacterAdded = Client.CharacterAdded:Connect(function()
  1277. OnInput:Disconnect()
  1278. RenderStepped:Disconnect()
  1279. CharacterAdded:Disconnect()
  1280.  
  1281. ChatHUD:Destroy()
  1282. ChatHUD = nil
  1283. end)
  1284. end
  1285.  
  1286. wait(9e9)
  1287. end;
  1288.  
  1289. ViewHUDFunc = function()
  1290. --[[
  1291. Variables
  1292. --]]
  1293.  
  1294. local ViewportRange = ViewportRange or 32
  1295.  
  1296. local UserInputService = game:GetService("UserInputService")
  1297. local RunService = game:GetService("RunService")
  1298.  
  1299. local VRService = game:GetService("VRService")
  1300. local VRReady = VRService.VREnabled
  1301.  
  1302. local Players = game:GetService("Players")
  1303. local Client = Players.LocalPlayer
  1304. local Mouse = Client:GetMouse()
  1305.  
  1306. local Camera = workspace.CurrentCamera
  1307. local CameraPort = Camera.CFrame
  1308.  
  1309. local ViewHUD = script:FindFirstChild("ViewHUD") or game:GetObjects("rbxassetid://4480405425")[1]
  1310. local Viewport = ViewHUD.Viewport
  1311. local Viewcam = Instance.new("Camera")
  1312. local ViewPart = ViewHUD.Part
  1313.  
  1314. ViewHUD.Parent = game:GetService("CoreGui")
  1315.  
  1316. Viewcam.Parent = Viewport
  1317. Viewcam.CameraType = Enum.CameraType.Scriptable
  1318. Viewport.CurrentCamera = Viewcam
  1319. Viewport.BackgroundTransparency = 1
  1320.  
  1321. --[[
  1322. Code
  1323. --]]
  1324.  
  1325. local function Clone(Character)
  1326. local Arc = Character.Archivable
  1327. local Clone;
  1328.  
  1329. Character.Archivable = true
  1330. Clone = Character:Clone()
  1331. Character.Archivable = Arc
  1332.  
  1333. return Clone
  1334. end
  1335.  
  1336. local function GetPart(Name, Parent, Descendants)
  1337. for i = 1, #Descendants do
  1338. local Part = Descendants[i]
  1339.  
  1340. if Part.Name == Name and Part.Parent.Name == Parent then
  1341. return Part
  1342. end
  1343. end
  1344. end
  1345.  
  1346. local function OnPlayerAdded(Player)
  1347. if not ViewHUD or not ViewHUD.Parent then return end
  1348.  
  1349. local function CharacterAdded(Character)
  1350. if not ViewHUD or not ViewHUD.Parent then return end
  1351.  
  1352. Character:WaitForChild("Head")
  1353. Character:WaitForChild("Humanoid")
  1354.  
  1355. wait(3)
  1356.  
  1357. local FakeChar = Clone(Character)
  1358. local Root = FakeChar:FindFirstChild("HumanoidRootPart") or FakeChar:FindFirstChild("Head")
  1359. local RenderConnection;
  1360.  
  1361. local Descendants = FakeChar:GetDescendants()
  1362. local RealDescendants = Character:GetDescendants()
  1363. local Correspondents = {};
  1364.  
  1365. FakeChar.Humanoid.DisplayDistanceType = "None"
  1366.  
  1367. for i = 1, #Descendants do
  1368. local Part = Descendants[i]
  1369. local Real = Part:IsA("BasePart") and GetPart(Part.Name, Part.Parent.Name, RealDescendants)
  1370.  
  1371. if Part:IsA("BasePart") and Real then
  1372. Part.Anchored = true
  1373. Part:BreakJoints()
  1374.  
  1375. if Part.Parent:IsA("Accessory") then
  1376. Part.Transparency = 0
  1377. end
  1378.  
  1379. table.insert(Correspondents, {Part, Real})
  1380. end
  1381. end
  1382.  
  1383. RenderConnection = RunService.RenderStepped:Connect(function()
  1384. if not Character or not Character.Parent then
  1385. RenderConnection:Disconnect()
  1386. FakeChar:Destroy()
  1387.  
  1388. return
  1389. end
  1390.  
  1391. if (Root and (Root.Position - Camera.CFrame.p).Magnitude <= ViewportRange) or Player == Client or not Root then
  1392. for i = 1, #Correspondents do
  1393. local Part, Real = unpack(Correspondents[i])
  1394.  
  1395. if Part and Real and Part.Parent and Real.Parent then
  1396. Part.CFrame = Real.CFrame
  1397. elseif Part.Parent and not Real.Parent then
  1398. Part:Destroy()
  1399. end
  1400. end
  1401. end
  1402. end)
  1403.  
  1404. FakeChar.Parent = Viewcam
  1405. end
  1406.  
  1407. Player.CharacterAdded:Connect(CharacterAdded)
  1408.  
  1409. if Player.Character then
  1410. spawn(function()
  1411. CharacterAdded(Player.Character)
  1412. end)
  1413. end
  1414. end
  1415.  
  1416. local PlayerAdded = Players.PlayerAdded:Connect(OnPlayerAdded)
  1417.  
  1418. for _, Player in pairs(Players:GetPlayers()) do
  1419. OnPlayerAdded(Player)
  1420. end
  1421.  
  1422. ViewPart.Size = Vector3.new()
  1423.  
  1424. if VRReady then
  1425. Viewport.Position = UDim2.new(.62, 0, .89, 0)
  1426. Viewport.Size = UDim2.new(.3, 0, .3, 0)
  1427. Viewport.AnchorPoint = Vector2.new(.5, 1)
  1428. else
  1429. Viewport.Size = UDim2.new(0.3, 0, 0.3, 0)
  1430. end
  1431.  
  1432. local RenderStepped = RunService.RenderStepped:Connect(function()
  1433. local Render = Camera.CFrame
  1434. local Scale = Camera.ViewportSize
  1435.  
  1436. if VRReady then
  1437. Render = Render * VRService:GetUserCFrame(Enum.UserCFrame.Head)
  1438. end
  1439.  
  1440. CameraPort = CFrame.new(Render.p + Vector3.new(5, 2, 0), Render.p)
  1441.  
  1442. Viewport.Camera.CFrame = CameraPort
  1443.  
  1444. ViewPart.CFrame = Render * CFrame.new(0, 0, -16)
  1445.  
  1446. ViewHUD.Size = UDim2.new(0, Scale.X - 6, 0, Scale.Y - 6)
  1447. end)
  1448.  
  1449. --
  1450.  
  1451. local CharacterAdded
  1452.  
  1453. CharacterAdded = Client.CharacterAdded:Connect(function()
  1454. RenderStepped:Disconnect()
  1455. CharacterAdded:Disconnect()
  1456. PlayerAdded:Disconnect()
  1457.  
  1458. ViewHUD:Destroy()
  1459. ViewHUD = nil
  1460. end)
  1461.  
  1462. wait(9e9)
  1463. end;
  1464.  
  1465. Script()
  1466.  
  1467. wait(2)
  1468.  
  1469. local Players = game:GetService("Players")
  1470. local lp = Players.LocalPlayer
  1471. local character = lp.Character
  1472. local A0LL = Instance.new("Attachment", character["Left Leg"])
  1473. A0LL.Position = Vector3.new(0, 1, 0)
  1474. local A1LL = Instance.new("Attachment", character["Torso"])
  1475. A1LL.Position = Vector3.new(-0.5, -1, 0)
  1476. local socket1 = Instance.new("BallSocketConstraint", character["Left Leg"])
  1477. socket1.Attachment0 = A0LL
  1478. socket1.Attachment1 = A1LL
  1479. local A0RL = Instance.new("Attachment", character["Right Leg"])
  1480. A0RL.Position = Vector3.new(0, 1, 0)
  1481. local A1RL = Instance.new("Attachment", character["Torso"])
  1482. A1RL.Position = Vector3.new(0.5, -1, 0)
  1483. local socket2 = Instance.new("BallSocketConstraint", character["Right Leg"])
  1484. socket2.Attachment0 = A0RL
  1485. socket2.Attachment1 = A1RL
  1486. local A0H = Instance.new("Attachment", character["Head"])
  1487. A0H.Position = Vector3.new(0, -0.5, 0)
  1488. local A1H = Instance.new("Attachment", character["Torso"])
  1489. A1H.Position = Vector3.new(0, 1, 0)
  1490. local socket5 = Instance.new("BallSocketConstraint", character["Head"])
  1491. socket5.Attachment0 = A0H
  1492. socket5.Attachment1 = A1H
  1493. loadstring(game:HttpGet("https://pastebin.com/raw/Byd1PdHn",true))()
  1494. -----------------------------------------------------------
  1495. wait(9e9)
  1496. warn("Rospliot :)")
Add Comment
Please, Sign In to add comment