VR SCRIPT R6 R15 - Pastebin.com (2024)

  1. -- Gui to Lua

  2. -- Version: 3.2

  3. -- Instances:

  4. local ScreenGui = Instance.new("ScreenGui")

  5. local Frame = Instance.new("Frame")

  6. local TextLabel = Instance.new("TextLabel")

  7. local ImageLabel = Instance.new("ImageLabel")

  8. local ImageLabel_2 = Instance.new("ImageLabel")

  9. local TextButton = Instance.new("TextButton")

  10. --Properties:

  11. ScreenGui.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")

  12. ScreenGui.ResetOnSpawn = false

  13. Frame.Parent = ScreenGui

  14. Frame.BackgroundColor3 = Color3.fromRGB(0, 0, 0)

  15. Frame.Position = UDim2.new(0.299015909, 0, 0.178784266, 0)

  16. Frame.Size = UDim2.new(0, 441, 0, 277)

  17. Frame.Active = true

  18. Frame.Draggable = true

  19. TextLabel.Parent = Frame

  20. TextLabel.BackgroundColor3 = Color3.fromRGB(32, 16, 255)

  21. TextLabel.Size = UDim2.new(0, 441, 0, 50)

  22. TextLabel.Font = Enum.Font.SourceSans

  23. TextLabel.Text = "Jake Owns You!"

  24. TextLabel.TextColor3 = Color3.fromRGB(0, 0, 0)

  25. TextLabel.TextSize = 14.000

  26. ImageLabel.Parent = Frame

  27. ImageLabel.BackgroundColor3 = Color3.fromRGB(255, 255, 255)

  28. ImageLabel.Position = UDim2.new(0, 0, 0.18050541, 0)

  29. ImageLabel.Size = UDim2.new(0, 130, 0, 227)

  30. ImageLabel.Image = "rbxassetid://8994055513"

  31. ImageLabel_2.Parent = Frame

  32. ImageLabel_2.BackgroundColor3 = Color3.fromRGB(255, 255, 255)

  33. ImageLabel_2.Position = UDim2.new(0.716553271, 0, 0.18050541, 0)

  34. ImageLabel_2.Size = UDim2.new(0, 125, 0, 227)

  35. ImageLabel_2.Image = "rbxassetid://8994055513"

  36. TextButton.Parent = Frame

  37. TextButton.BackgroundColor3 = Color3.fromRGB(255, 42, 45)

  38. TextButton.Position = UDim2.new(0.294784576, 0, 0.400722027, 0)

  39. TextButton.Size = UDim2.new(0, 186, 0, 105)

  40. TextButton.Font = Enum.Font.SourceSans

  41. TextButton.Text = "RUN VR SCRIPT"

  42. TextButton.TextColor3 = Color3.fromRGB(0, 0, 0)

  43. TextButton.TextSize = 14.000

  44. TextButton.MouseButton1Down:connect(function()

  45. --[[

  46. re-released by discord.gg/dogpower & modified by https://discord.gg/Hbq3TgAJbB

  47. ____________ __ ____________ ___ ___ ____________

  48. / __________/ / / / __________ \ / / / / / _______ /

  49. / / / / / / \ \ / / / / / / / /

  50. / / / / / / \ \ / / / / / /______/ /

  51. / / / / / / \ \ / / / / / _____/

  52. / / / / \ \ / / / / / / / \

  53. / / / / \ \ / / / / / / / /\ \

  54. / /____________ / /___________ \ \__________/ / / \/ / / / \ \

  55. \_____________/ /_____________/ \____________/ \______/ /____/ \___\

  56. ----------------------------------------------------------------------------------------

  57. ]]

  58. --[[---------Settings---------]]--

  59. local bodyTransparency = 0 --Change the transparency of your character (0 - 1)

  60. local bodyVelocity = {-17.7, 0, -17.7} --Change your body parts velocity. First number value is the X value. Second number value is the Y value. Third number value is the Z value.

  61. local hatVelocity = {-17.7, 0, -17.7} --Change your accessory's velocity. First number value is the X value. Second number value is the Y value. Third number value is the Z value.

  62. --Velocity is not recommended to be (-17.7, 0, -17.7) in R15 since body parts often fall in R15.

  63. --[[--------------------------]]--

  64. local player1 = game.Players.LocalPlayer

  65. local character1 = player1.Character

  66. --Fake Character--

  67. --Create Attachment Function

  68. local function CreateAttachment(parent, position, orientation, axis, secondaryAxis, name)

  69. local newAttchment = Instance.new("Attachment", parent)

  70. newAttchment.Position = position

  71. newAttchment.Orientation = orientation

  72. newAttchment.Axis = axis

  73. newAttchment.SecondaryAxis = secondaryAxis

  74. newAttchment.Name = name

  75. end

  76. --Variables

  77. local player1 = game:GetService("Players").LocalPlayer

  78. local character1 = player1.Character

  79. local hrp = character1.HumanoidRootPart

  80. for i,v in pairs(character1:GetChildren()) do

  81. if v:IsA("LocalScript") then

  82. v:Destroy()

  83. end

  84. end

  85. local camera = workspace.CurrentCamera

  86. local reanimFolder = Instance.new("Folder", character1)

  87. reanimFolder.Name = "FakeCharacter"

  88. local model = Instance.new("Model", reanimFolder)

  89. model.Name = "Reanimation"

  90. local userInputService = game:GetService("UserInputService")

  91. local movingW, movingA, movingS, movingD, jumping = false

  92. --Body Parts--

  93. --Head

  94. local cHead = Instance.new("Part", model)

  95. cHead.Size = Vector3.new(2, 1, 1)

  96. cHead.Name = "Head"

  97. --Torso

  98. local cTorso = Instance.new("Part", model)

  99. cTorso.Size = Vector3.new(2, 2, 1)

  100. cTorso.Name = "Torso"

  101. --Left Arm

  102. local cLArm = Instance.new("Part", model)

  103. cLArm.Size = Vector3.new(1, 2, 1)

  104. cLArm.Name = "Left Arm"

  105. --Right Arm

  106. local cRArm = Instance.new("Part", model)

  107. cRArm.Size = Vector3.new(1, 2, 1)

  108. cRArm.Name = "Right Arm"

  109. --Left Leg

  110. local cLLeg = Instance.new("Part", model)

  111. cLLeg.Size = Vector3.new(1, 2, 1)

  112. cLLeg.Name = "Left Leg"

  113. --Right Leg

  114. local cRLeg = Instance.new("Part", model)

  115. cRLeg.Size = Vector3.new(1, 2, 1)

  116. cRLeg.Name = "Right Leg"

  117. --HumanoidRootPart

  118. local cHRP = Instance.new("Part", model)

  119. cHRP.Size = Vector3.new(2, 2, 1)

  120. cHRP.Name = "HumanoidRootPart"

  121. cHRP.Transparency = 1

  122. cHRP.CanCollide = false

  123. --Transparency

  124. for i,v in pairs(model:GetChildren()) do

  125. if v:IsA("Part") and v.Name ~= "HumanoidRootPart" then

  126. v.Transparency = 1--0.5

  127. end

  128. end

  129. --Joints--

  130. --Right Shoulder

  131. local rShoulder = Instance.new("Motor6D", cTorso)

  132. rShoulder.Part0 = cTorso

  133. rShoulder.Part1 = cRArm

  134. rShoulder.Name = "Right Shoulder"

  135. rShoulder.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)

  136. rShoulder.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)

  137. --Left Shoulder

  138. local lShoulder = Instance.new("Motor6D", cTorso)

  139. lShoulder.Part0 = cTorso

  140. lShoulder.Part1 = cLArm

  141. lShoulder.Name = "Left Shoulder"

  142. lShoulder.C0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)

  143. lShoulder.C1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)

  144. --Right Hip

  145. local rHip = Instance.new("Motor6D", cTorso)

  146. rHip.Part0 = cTorso

  147. rHip.Part1 = cRLeg

  148. rHip.Name = "Right Hip"

  149. rHip.C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)

  150. rHip.C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)

  151. --Left Hip

  152. local lHip = Instance.new("Motor6D", cTorso)

  153. lHip.Part0 = cTorso

  154. lHip.Part1 = cLLeg

  155. lHip.Name = "Left Hip"

  156. lHip.C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)

  157. lHip.C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)

  158. --Neck

  159. local neck = Instance.new("Motor6D", cTorso)

  160. neck.Part0 = cTorso

  161. neck.Part1 = cHead

  162. neck.Name = "Neck"

  163. neck.C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)

  164. neck.C1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)

  165. --RootJoint

  166. local rootJoint = Instance.new("Motor6D", cHRP)

  167. rootJoint.Part0 = cHRP

  168. rootJoint.Part1 = cTorso

  169. rootJoint.Name = "RootJoint"

  170. rootJoint.C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)

  171. rootJoint.C1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)

  172. --Humanoid--

  173. local cHumanoid = Instance.new("Humanoid", model)

  174. cHumanoid.DisplayDistanceType = "None"

  175. --Head Mesh--

  176. local headMesh = Instance.new("SpecialMesh", cHead)

  177. headMesh.Scale = Vector3.new(1.25, 1.25, 1.25)

  178. local reanimation = model

  179. --Creating Attachments

  180. CreateAttachment(cHead, Vector3.new(0,0.60000002384186,0), Vector3.new(-0,0,0), Vector3.new(1,0,0), Vector3.new(0,1,0), "HairAttachment")

  181. CreateAttachment(cHead, Vector3.new(0,0.60000002384186,0), Vector3.new(-0,0,0), Vector3.new(1,0,0), Vector3.new(0,1,0), "HatAttachment")

  182. CreateAttachment(cHead, Vector3.new(0,0,-0.60000002384186), Vector3.new(-0,0,0), Vector3.new(1,0,0), Vector3.new(0,1,0), "FaceFrontAttachment")

  183. CreateAttachment(cHead, Vector3.new(0,0,0), Vector3.new(-0,0,0), Vector3.new(1,0,0), Vector3.new(0,1,0), "FaceCenterAttachment")

  184. CreateAttachment(cTorso, Vector3.new(0,1,0), Vector3.new(-0,0,0), Vector3.new(1,0,0), Vector3.new(0,1,0), "NeckAttachment")

  185. CreateAttachment(cTorso, Vector3.new(0,0,-0.5), Vector3.new(-0,0,0), Vector3.new(1,0,0), Vector3.new(0,1,0), "BodyFrontAttachment")

  186. CreateAttachment(cTorso, Vector3.new(0,0,0.5), Vector3.new(-0,0,0), Vector3.new(1,0,0), Vector3.new(0,1,0), "BodyBackAttachment")

  187. CreateAttachment(cTorso, Vector3.new(-1,1,0), Vector3.new(-0,0,0), Vector3.new(1,0,0), Vector3.new(0,1,0), "LeftCollarAttachment")

  188. CreateAttachment(cTorso, Vector3.new(1,1,0), Vector3.new(-0,0,0), Vector3.new(1,0,0), Vector3.new(0,1,0), "RightCollarAttachment")

  189. CreateAttachment(cTorso, Vector3.new(0,-1,-0.5), Vector3.new(-0,0,0), Vector3.new(1,0,0), Vector3.new(0,1,0), "WaistFrontAttachment")

  190. CreateAttachment(cTorso, Vector3.new(0,-1,0), Vector3.new(-0,0,0), Vector3.new(1,0,0), Vector3.new(0,1,0), "WaistCenterAttachment")

  191. CreateAttachment(cTorso, Vector3.new(0,-1,0.5), Vector3.new(-0,0,0), Vector3.new(1,0,0), Vector3.new(0,1,0), "WaistBackAttachment")

  192. CreateAttachment(cLArm, Vector3.new(0,1,0), Vector3.new(-0,0,0), Vector3.new(1,0,0), Vector3.new(0,1,0), "LeftShoulderAttachment")

  193. CreateAttachment(cLArm, Vector3.new(0,-1,0), Vector3.new(-0,0,0), Vector3.new(1,0,0), Vector3.new(0,1,0), "LeftGripAttachment")

  194. CreateAttachment(cRArm, Vector3.new(0,1,0), Vector3.new(-0,0,0), Vector3.new(1,0,0), Vector3.new(0,1,0), "RightShoulderAttachment")

  195. CreateAttachment(cRArm, Vector3.new(0,-1,0), Vector3.new(-0,0,0), Vector3.new(1,0,0), Vector3.new(0,1,0), "RightGripAttachment")

  196. CreateAttachment(cLLeg, Vector3.new(0,-1,0), Vector3.new(-0,0,0), Vector3.new(1,0,0), Vector3.new(0,1,0), "LeftFootAttachment")

  197. CreateAttachment(cRLeg, Vector3.new(0,-1,0), Vector3.new(-0,0,0), Vector3.new(1,0,0), Vector3.new(0,1,0), "RightFootAttachment")

  198. CreateAttachment(cHRP, Vector3.new(0,0,0), Vector3.new(-0,0,0), Vector3.new(1,0,0), Vector3.new(0,1,0), "RootAttachment")

  199. --Cloning Hats (For Netless)

  200. for i,v in pairs(character1:GetChildren()) do

  201. if v:IsA("Accessory") then

  202. local clone = v:Clone()

  203. local weld = v.Handle:FindFirstChildWhichIsA("Weld")

  204. local weldPart1 = weld.Part1

  205. local newWeld = Instance.new("Weld", clone.Handle)

  206. local CFrame0 = v.Handle.AccessoryWeld.C0

  207. local CFrame1 = v.Handle.AccessoryWeld.C1

  208. clone.Handle:FindFirstChild("AccessoryWeld"):Destroy()

  209. clone.Parent = reanimation

  210. newWeld.Name = "AccessoryWeld"

  211. newWeld.C0 = CFrame0

  212. newWeld.C1 = CFrame1

  213. newWeld.Part0 = clone.Handle

  214. newWeld.Part1 = character1:FindFirstChild(weldPart1.Name)

  215. clone.Handle.Transparency = 1

  216. end

  217. end

  218. cHRP.CFrame = hrp.CFrame

  219. -- CLOVR - FE FULL-BODY VR SCRIPT

  220. -- April 21st Update - TOOL HOLDING ADDED

  221. -- | made by 0866 and Abacaxl

  222. -- | tysm unverified

  223. --RagDollEnabled is set to true, DON'T set it to false or CLOVR won't work. Feel free to change the other settings though. -Abacaxl

  224. --|| Settings:

  225. local StudsOffset = 0 -- Character height (negative if you're too high)

  226. local Smoothness = .5 -- Character interpolation (0.1 - 1 = smooth - rigid)

  227. local AnchorCharacter = false -- Prevent physics from causing inconsistencies

  228. local HideCharacter = false -- Hide character on a platform

  229. local NoCollision = false-- Disable player collision

  230. local ChatEnabled = true -- See chat on your left hand in-game

  231. local ChatLocalRange = 75 -- Local chat range

  232. local ViewportEnabled = true -- View nearby players in a frame

  233. local ViewportRange = 30 -- Maximum distance players are updated

  234. local RagdollEnabled = true -- Use your character instead of hats (NetworkOwner vulnerability)

  235. local RagdollHeadMovement = true -- Move your head separately from your body (+9 second wait)

  236. local AutoRun = false -- Run script on respawn

  237. local AutoRespawn = true -- Kill your real body when your virtual body dies

  238. local WearAllAccessories = true -- Use all leftover hats for the head

  239. local AccurateHandPosition = true -- Move your Roblox hands according to your real hands

  240. local AccessorySettings = {

  241. LeftArm = "",

  242. RightArm = "",

  243. LeftLeg = "",

  244. RightLeg = "",

  245. Torso = "",

  246. Head = true,

  247. BlockArms = true,

  248. BlockLegs = true,

  249. BlockTorso = true,

  250. LimbOffset = CFrame.Angles(math.rad(90), 0, 0)

  251. }

  252. local FootPlacementSettings = {

  253. RightOffset = Vector3.new(.5, 0, 0),

  254. LeftOffset = Vector3.new(-.5, 0, 0)

  255. }

  256. --|| Script:

  257. local Script = nil

  258. Script = function()

  259. --[[

  260. Variables

  261. --]]

  262. local Players = game:GetService("Players")

  263. local Client = Players.LocalPlayer

  264. local Character = Client.Character or Client.CharacterAdded:Wait()

  265. local WeldBase = Character:WaitForChild("HumanoidRootPart")

  266. local ArmBase = Character:FindFirstChild("RightHand") or Character:FindFirstChild("Right Arm") or WeldBase

  267. local Backpack = Client:WaitForChild("Backpack")

  268. local Mouse = Client:GetMouse()

  269. local Camera = workspace.CurrentCamera

  270. local VRService = game:GetService("VRService")

  271. local VRReady = VRService.VREnabled

  272. local UserInputService = game:GetService("UserInputService")

  273. local RunService = game:GetService("RunService")

  274. local HttpService = game:GetService("HttpService")

  275. local StarterGui = game:GetService("StarterGui")

  276. local HeadAccessories = {}

  277. local UsedAccessories = {}

  278. local Pointer = false

  279. local Point1 = false

  280. local Point2 = false

  281. local VirtualRig = game:GetObjects("rbxassetid://4468539481")[1]

  282. local VirtualBody = game:GetObjects("rbxassetid://4464983829")[1]

  283. local Anchor = Instance.new("Part")

  284. Anchor.Anchored = true

  285. Anchor.Transparency = 1

  286. Anchor.CanCollide = false

  287. Anchor.Parent = workspace

  288. --[[

  289. if RagdollEnabled then

  290. print("RagdollEnabled, thank you for using CLOVR!")

  291. local NetworkAccess =

  292. coroutine.create(

  293. function()

  294. settings().Physics.AllowSleep = false

  295. while true do

  296. game:GetService("RunService").RenderStepped:Wait()

  297. for _, Players in next, game:GetService("Players"):GetChildren() do

  298. if Players ~= game:GetService("Players").LocalPlayer then

  299. Players.MaximumSimulationRadius = 0.1

  300. Players.SimulationRadius = 0

  301. end

  302. end

  303. game:GetService("Players").LocalPlayer.MaximumSimulationRadius = math.pow(math.huge, math.huge)

  304. game:GetService("Players").LocalPlayer.SimulationRadius = math.huge * math.huge

  305. end

  306. end

  307. )

  308. coroutine.resume(NetworkAccess)

  309. end

  310. ]]

  311. StarterGui:SetCore("VRLaserPointerMode", 3)

  312. --[[

  313. Character Protection

  314. --]]

  315. local CharacterCFrame = WeldBase.CFrame

  316. if not RagdollEnabled then

  317. Character.Humanoid.AnimationPlayed:Connect(

  318. function(Animation)

  319. Animation:Stop()

  320. end

  321. )

  322. for _, Track in next, Character.Humanoid:GetPlayingAnimationTracks() do

  323. Track:Stop()

  324. end

  325. if HideCharacter then

  326. local Platform = Instance.new("Part")

  327. Platform.Anchored = true

  328. Platform.Size = Vector3.new(100, 5, 100)

  329. Platform.CFrame = CFrame.new(0, 10000, 0)

  330. Platform.Transparency = 1

  331. Platform.Parent = workspace

  332. Character:MoveTo(Platform.Position + Vector3.new(0, 5, 0))

  333. wait(.5)

  334. end

  335. if AnchorCharacter then

  336. for _, Part in pairs(Character:GetChildren()) do

  337. if Part:IsA("BasePart") then

  338. Part.Anchored = true

  339. end

  340. end

  341. end

  342. end

  343. --[[

  344. Functions

  345. --]]

  346. function Tween(Object, Style, Direction, Time, Goal)

  347. local tweenInfo = TweenInfo.new(Time, Enum.EasingStyle[Style], Enum.EasingDirection[Direction])

  348. local tween = game:GetService("TweenService"):Create(Object, tweenInfo, Goal)

  349. tween.Completed:Connect(

  350. function()

  351. tween:Destroy()

  352. end

  353. )

  354. tween:Play()

  355. return tween

  356. end

  357. local function GetMotorForLimb(Limb)

  358. for _, Motor in next, Character:GetDescendants() do

  359. if Motor:IsA("Motor6D") and Motor.Part1 == Limb then

  360. return Motor

  361. end

  362. end

  363. end

  364. local function CreateAlignment(Limb, Part0)

  365. local Attachment0 = Instance.new("Attachment", Part0 or Anchor)

  366. local Attachment1 = Instance.new("Attachment", Limb)

  367. local Orientation = Instance.new("AlignOrientation")

  368. local Position = Instance.new("AlignPosition")

  369. Orientation.Attachment0 = Attachment1

  370. Orientation.Attachment1 = Attachment0

  371. Orientation.RigidityEnabled = false

  372. Orientation.MaxTorque = 20000

  373. Orientation.Responsiveness = 40

  374. Orientation.Parent = reanimation["HumanoidRootPart"]

  375. Orientation.Name = Limb.Name.."'s AlignRot"

  376. Orientation.MaxAngularVelocity = 100

  377. Position.Attachment0 = Attachment1

  378. Position.Attachment1 = Attachment0

  379. Position.RigidityEnabled = false

  380. Position.MaxForce = 40000

  381. Position.Responsiveness = 40

  382. Position.Parent = reanimation["HumanoidRootPart"]

  383. Position.Name = Limb.Name.."'s AlignPos"

  384. Position.MaxVelocity = 100

  385. Limb.Massless = false

  386. local Motor = GetMotorForLimb(Limb)

  387. if Motor then

  388. Motor:Destroy()

  389. end

  390. return function(CF, Local)

  391. if Local then

  392. Attachment0.CFrame = CF

  393. else

  394. Attachment0.WorldCFrame = CF

  395. end

  396. end

  397. end

  398. local function GetExtraTool()

  399. for _, Tool in next, Character:GetChildren() do

  400. if Tool:IsA("Tool") and not Tool.Name:match("LIMB_TOOL") then

  401. return Tool

  402. end

  403. end

  404. end

  405. local function GetGripForHandle(Handle)

  406. for _, Weld in next, Character:GetDescendants() do

  407. if Weld:IsA("Weld") and (Weld.Part0 == Handle or Weld.Part1 == Handle) then

  408. return Weld

  409. end

  410. end

  411. wait(.2)

  412. for _, Weld in next, Character:GetDescendants() do

  413. if Weld:IsA("Weld") and (Weld.Part0 == Handle or Weld.Part1 == Handle) then

  414. return Weld

  415. end

  416. end

  417. end

  418. local function CreateRightGrip(Handle)

  419. local RightGrip = Instance.new("Weld")

  420. RightGrip.Name = "RightGrip"

  421. RightGrip.Part1 = Handle

  422. RightGrip.Part0 = WeldBase

  423. RightGrip.Parent = WeldBase

  424. return RightGrip

  425. end

  426. local function CreateAccessory(Accessory, DeleteMeshes)

  427. if not Accessory then

  428. return

  429. end

  430. local HatAttachment = Accessory.Handle:FindFirstChildWhichIsA("Attachment")

  431. local HeadAttachment = VirtualRig:FindFirstChild(HatAttachment.Name, true)

  432. local BasePart = HeadAttachment.Parent

  433. local HatAtt = HatAttachment.CFrame

  434. local HeadAtt = HeadAttachment.CFrame

  435. if DeleteMeshes then

  436. if Accessory.Handle:FindFirstChild("Mesh") then

  437. Accessory.Handle.Mesh:Destroy()

  438. end

  439. end

  440. wait()

  441. local Handle = Accessory:WaitForChild("Handle")

  442. if Handle:FindFirstChildWhichIsA("Weld", true) then

  443. Handle:FindFirstChildWhichIsA("Weld", true):Destroy()

  444. Handle:BreakJoints()

  445. else

  446. Handle:BreakJoints()

  447. end

  448. Handle.Massless = true

  449. Handle.Transparency = 0.5

  450. UsedAccessories[Accessory] = true

  451. local RightGrip = CreateRightGrip(Handle)

  452. wait()

  453. for _, Object in pairs(Handle:GetDescendants()) do

  454. if not Object:IsA("BasePart") then

  455. pcall(

  456. function()

  457. Object.Transparency = 1

  458. end

  459. )

  460. pcall(

  461. function()

  462. Object.Enabled = false

  463. end

  464. )

  465. end

  466. end

  467. return Handle, RightGrip, HatAtt, HeadAtt, BasePart

  468. end

  469. local function GetHeadAccessories()

  470. for _, Accessory in next, Character:GetChildren() do

  471. if Accessory:IsA("Accessory") and not UsedAccessories[Accessory] then

  472. local Handle, RightGrip, HatAtt, HeadAtt, BasePart = CreateAccessory(Accessory)

  473. table.insert(HeadAccessories, {Handle, RightGrip, HatAtt, HeadAtt, BasePart})

  474. do

  475. Handle.Transparency = 1

  476. end

  477. if not WearAllAccessories then

  478. break

  479. end

  480. end

  481. end

  482. end

  483. --[[

  484. VR Replication Setup

  485. --]]

  486. if not RagdollEnabled then

  487. LeftHandle, LeftHandGrip =

  488. CreateAccessory(Character:FindFirstChild(AccessorySettings.LeftArm), AccessorySettings.BlockArms)

  489. RightHandle, RightHandGrip =

  490. CreateAccessory(Character:FindFirstChild(AccessorySettings.RightArm), AccessorySettings.BlockArms)

  491. LeftHipHandle, LeftLegGrip =

  492. CreateAccessory(Character:FindFirstChild(AccessorySettings.LeftLeg), AccessorySettings.BlockLegs)

  493. RightHipHandle, RightLegGrip =

  494. CreateAccessory(Character:FindFirstChild(AccessorySettings.RightLeg), AccessorySettings.BlockLegs)

  495. TorsoHandle, TorsoGrip =

  496. CreateAccessory(Character:FindFirstChild(AccessorySettings.Torso), AccessorySettings.BlockTorso)

  497. GetHeadAccessories()

  498. elseif RagdollEnabled then

  499. if RagdollHeadMovement then

  500. Permadeath()

  501. MoveHead = CreateAlignment(reanimation["Head"])

  502. end

  503. MoveRightArm = CreateAlignment(reanimation["Right Arm"])

  504. MoveLeftArm = CreateAlignment(reanimation["Left Arm"])

  505. MoveRightLeg = CreateAlignment(reanimation["Right Leg"])

  506. MoveLeftLeg = CreateAlignment(reanimation["Left Leg"])

  507. MoveTorso = CreateAlignment(reanimation["Torso"])

  508. MoveRoot = CreateAlignment(reanimation["HumanoidRootPart"])

  509. --

  510. if RagdollHeadMovement then

  511. for _, Accessory in next, reanimation:GetChildren() do

  512. if Accessory:IsA("Accessory") and Accessory:FindFirstChild("Handle") then

  513. local Attachment1 = Accessory.Handle:FindFirstChildWhichIsA("Attachment")

  514. local Attachment0 = reanimation:FindFirstChild(tostring(Attachment1), true)

  515. local Orientation = Instance.new("AlignOrientation")

  516. local Position = Instance.new("AlignPosition")

  517. print(Attachment1, Attachment0, Accessory)

  518. Orientation.Attachment0 = Attachment1

  519. Orientation.Attachment1 = Attachment0

  520. Orientation.RigidityEnabled = false

  521. Orientation.ReactionTorqueEnabled = true

  522. Orientation.MaxTorque = 20000

  523. Orientation.Responsiveness = 40

  524. Orientation.Parent = reanimation["Head"]

  525. Position.Attachment0 = Attachment1

  526. Position.Attachment1 = Attachment0

  527. Position.RigidityEnabled = false

  528. Position.ReactionForceEnabled = true

  529. Position.MaxForce = 40000

  530. Position.Responsiveness = 40

  531. Position.Parent = reanimation["Head"]

  532. end

  533. end

  534. end

  535. end

  536. --[[

  537. Movement

  538. --]]

  539. VirtualRig.Name = "VirtualRig"

  540. VirtualRig.RightFoot.BodyPosition.Position = CharacterCFrame.p

  541. VirtualRig.LeftFoot.BodyPosition.Position = CharacterCFrame.p

  542. VirtualRig.Parent = workspace

  543. VirtualRig:SetPrimaryPartCFrame(CharacterCFrame)

  544. VirtualRig.Humanoid.Health = 0

  545. --VirtualRig:FindFirstChild("HumanoidRootPart").CFrame = character1.HumanoidRootPart.CFrame

  546. VirtualRig:BreakJoints()

  547. for i,v in pairs(VirtualRig:GetChildren()) do

  548. if v:IsA("BasePart") then

  549. v.CFrame = character1.HumanoidRootPart.CFrame

  550. end

  551. end

  552. --

  553. VirtualBody.Parent = workspace

  554. VirtualBody.Name = "VirtualBody"

  555. VirtualBody.Humanoid.WalkSpeed = 8

  556. VirtualBody.Humanoid.CameraOffset = Vector3.new(0, StudsOffset, 0)

  557. VirtualBody:SetPrimaryPartCFrame(CharacterCFrame)

  558. VirtualBody.Humanoid.Died:Connect(

  559. function()

  560. print("Virtual death")

  561. if AutoRespawn then

  562. Character:BreakJoints()

  563. if RagdollHeadMovement and RagdollEnabled then

  564. --Network:Unclaim()

  565. Respawn()

  566. end

  567. end

  568. end

  569. )

  570. --

  571. Camera.CameraSubject = VirtualBody.Humanoid

  572. Character.Humanoid.WalkSpeed = 0

  573. Character.Humanoid.JumpPower = 1

  574. for _, Part in next, VirtualBody:GetChildren() do

  575. if Part:IsA("BasePart") then

  576. Part.Transparency = 1

  577. end

  578. end

  579. for _, Part in next, VirtualRig:GetChildren() do

  580. if Part:IsA("BasePart") then

  581. Part.Transparency = 1

  582. end

  583. end

  584. if not VRReady then

  585. VirtualRig.RightUpperArm.ShoulderConstraint.RigidityEnabled = true

  586. VirtualRig.LeftUpperArm.ShoulderConstraint.RigidityEnabled = true

  587. end

  588. local OnMoving =

  589. RunService.Stepped:Connect(

  590. function()

  591. local Direction = Character.Humanoid.MoveDirection

  592. local Start = VirtualBody.HumanoidRootPart.Position

  593. local Point = Start + Direction * 6

  594. VirtualBody.Humanoid:MoveTo(Point)

  595. end

  596. )

  597. Character.Humanoid.Jumping:Connect(

  598. function()

  599. VirtualBody.Humanoid.Jump = true

  600. end

  601. )

  602. UserInputService.JumpRequest:Connect(

  603. function()

  604. VirtualBody.Humanoid.Jump = true

  605. end

  606. )

  607. --[[

  608. VR Replication

  609. --]]

  610. if RagdollEnabled then

  611. for _, Part in pairs(Character:GetDescendants()) do

  612. if Part:IsA("BasePart") and Part.Name == "Handle" and Part.Parent:IsA("Accessory") then

  613. Part.LocalTransparencyModifier = 1

  614. elseif Part:IsA("BasePart") and Part.Transparency < 0.5 and Part.Name ~= "Head" then

  615. Part.LocalTransparencyModifier = bodyTransparency

  616. elseif Part:IsA("BasePart") and Part.Name == "Head" then

  617. Part.LocalTransparencyModifier = 1

  618. end

  619. if not Part:IsA("BasePart") and not Part:IsA("AlignPosition") and not Part:IsA("AlignOrientation") then

  620. pcall(

  621. function()

  622. Part.Transparency = 1

  623. end

  624. )

  625. pcall(

  626. function()

  627. Part.Enabled = false

  628. end

  629. )

  630. end

  631. end

  632. end

  633. local FootUpdateDebounce = tick()

  634. local function FloorRay(Part, Distance)

  635. local Position = Part.CFrame.p

  636. local Target = Position - Vector3.new(0, Distance, 0)

  637. local Line = Ray.new(Position, (Target - Position).Unit * Distance)

  638. local FloorPart, FloorPosition, FloorNormal =

  639. workspace:FindPartOnRayWithIgnoreList(Line, {VirtualRig, VirtualBody, Character})

  640. if FloorPart then

  641. return FloorPart, FloorPosition, FloorNormal, (FloorPosition - Position).Magnitude

  642. else

  643. return nil, Target, Vector3.new(), Distance

  644. end

  645. end

  646. local function Flatten(CF)

  647. local X, Y, Z = CF.X, CF.Y, CF.Z

  648. local LX, LZ = CF.lookVector.X, CF.lookVector.Z

  649. return CFrame.new(X, Y, Z) * CFrame.Angles(0, math.atan2(LX, LZ), 0)

  650. end

  651. local FootTurn = 1

  652. local function FootReady(Foot, Target)

  653. local MaxDist

  654. if Character.Humanoid.MoveDirection.Magnitude > 0 then

  655. MaxDist = .5

  656. else

  657. MaxDist = 1

  658. end

  659. local PastThreshold = (Foot.Position - Target.Position).Magnitude > MaxDist

  660. local PastTick = tick() - FootUpdateDebounce >= 2

  661. if PastThreshold or PastTick then

  662. FootUpdateDebounce = tick()

  663. end

  664. return PastThreshold or PastTick

  665. end

  666. local function FootYield()

  667. local RightFooting = VirtualRig.RightFoot.BodyPosition

  668. local LeftFooting = VirtualRig.LeftFoot.BodyPosition

  669. local LowerTorso = VirtualRig.LowerTorso

  670. local Yield = tick()

  671. repeat

  672. RunService.Stepped:Wait()

  673. if

  674. (LowerTorso.Position - RightFooting.Position).Y > 4 or

  675. (LowerTorso.Position - LeftFooting.Position).Y > 4 or

  676. ((LowerTorso.Position - RightFooting.Position) * Vector3.new(1, 0, 1)).Magnitude > 4 or

  677. ((LowerTorso.Position - LeftFooting.Position) * Vector3.new(1, 0, 1)).Magnitude > 4

  678. then

  679. break

  680. end

  681. until tick() - Yield >= .17

  682. end

  683. local function UpdateFooting()

  684. if not VirtualRig:FindFirstChild("LowerTorso") then

  685. wait()

  686. return

  687. end

  688. local Floor, FloorPosition, FloorNormal, Dist = FloorRay(VirtualRig.LowerTorso, 3)

  689. Dist = math.clamp(Dist, 0, 5)

  690. local FootTarget =

  691. VirtualRig.LowerTorso.CFrame * CFrame.new(FootPlacementSettings.RightOffset) - Vector3.new(0, Dist, 0) +

  692. Character.Humanoid.MoveDirection * (VirtualBody.Humanoid.WalkSpeed / 8) * 2

  693. if FootReady(VirtualRig.RightFoot, FootTarget) then

  694. VirtualRig.RightFoot.BodyPosition.Position = FootTarget.p

  695. VirtualRig.RightFoot.BodyGyro.CFrame = Flatten(VirtualRig.LowerTorso.CFrame)

  696. end

  697. FootYield()

  698. local FootTarget =

  699. VirtualRig.LowerTorso.CFrame * CFrame.new(FootPlacementSettings.LeftOffset) - Vector3.new(0, Dist, 0) +

  700. Character.Humanoid.MoveDirection * (VirtualBody.Humanoid.WalkSpeed / 8) * 2

  701. if FootReady(VirtualRig.LeftFoot, FootTarget) then

  702. VirtualRig.LeftFoot.BodyPosition.Position = FootTarget.p

  703. VirtualRig.LeftFoot.BodyGyro.CFrame = Flatten(VirtualRig.LowerTorso.CFrame)

  704. end

  705. end

  706. local function UpdateTorsoPosition()

  707. if not RagdollEnabled then

  708. if TorsoHandle then

  709. local Positioning = VirtualRig.UpperTorso.CFrame

  710. if not TorsoGrip or not TorsoGrip.Parent then

  711. TorsoGrip = CreateRightGrip(TorsoHandle)

  712. end

  713. local Parent = TorsoGrip.Parent

  714. TorsoGrip.C1 = CFrame.new()

  715. TorsoGrip.C0 =

  716. TorsoGrip.C0:Lerp(

  717. WeldBase.CFrame:ToObjectSpace(Positioning * CFrame.new(0, -0.25, 0) * AccessorySettings.LimbOffset),

  718. Smoothness

  719. )

  720. TorsoGrip.Parent = nil

  721. TorsoGrip.Parent = Parent

  722. end

  723. else

  724. local Positioning = VirtualRig.UpperTorso.CFrame

  725. MoveTorso(Positioning * CFrame.new(0, -0.25, 0))

  726. MoveRoot(Positioning * CFrame.new(0, -0.25, 0))

  727. end

  728. end

  729. local function UpdateLegPosition()

  730. if not RagdollEnabled then

  731. if RightHipHandle then

  732. local Positioning =

  733. VirtualRig.RightLowerLeg.CFrame:Lerp(VirtualRig.RightFoot.CFrame, 0.5) + Vector3.new(0, 0.5, 0)

  734. if not RightHipHandle or not RightHipHandle.Parent then

  735. RightLegGrip = CreateRightGrip(RightHipHandle)

  736. end

  737. local Parent = RightLegGrip.Parent

  738. RightLegGrip.C1 = CFrame.new()

  739. RightLegGrip.C0 =

  740. RightLegGrip.C0:Lerp(

  741. WeldBase.CFrame:ToObjectSpace(Positioning * AccessorySettings.LimbOffset),

  742. Smoothness

  743. )

  744. RightLegGrip.Parent = nil

  745. RightLegGrip.Parent = Parent

  746. end

  747. if LeftHipHandle then

  748. local Positioning =

  749. VirtualRig.LeftLowerLeg.CFrame:Lerp(VirtualRig.LeftFoot.CFrame, 0.5) + Vector3.new(0, 0.5, 0)

  750. if not LeftLegGrip or not LeftLegGrip.Parent then

  751. LeftLegGrip = CreateRightGrip(LeftHipHandle)

  752. end

  753. local Parent = LeftLegGrip.Parent

  754. LeftLegGrip.C1 = CFrame.new()

  755. LeftLegGrip.C0 =

  756. LeftLegGrip.C0:Lerp(

  757. WeldBase.CFrame:ToObjectSpace(Positioning * AccessorySettings.LimbOffset),

  758. Smoothness

  759. )

  760. LeftLegGrip.Parent = nil

  761. LeftLegGrip.Parent = Parent

  762. end

  763. else

  764. do

  765. local Positioning =

  766. VirtualRig.RightLowerLeg.CFrame:Lerp(VirtualRig.RightFoot.CFrame, 0.5) *

  767. CFrame.Angles(0, math.rad(180), 0) +

  768. Vector3.new(0, 0.5, 0)

  769. MoveRightLeg(Positioning)

  770. end

  771. do

  772. local Positioning =

  773. VirtualRig.LeftLowerLeg.CFrame:Lerp(VirtualRig.LeftFoot.CFrame, 0.5) *

  774. CFrame.Angles(0, math.rad(180), 0) +

  775. Vector3.new(0, 0.5, 0)

  776. MoveLeftLeg(Positioning)

  777. end

  778. end

  779. end

  780. warn("VRReady is", VRReady)

  781. local function OnUserCFrameChanged(UserCFrame, Positioning, IgnoreTorso)

  782. local Positioning = Camera.CFrame * Positioning

  783. if not IgnoreTorso then

  784. UpdateTorsoPosition()

  785. UpdateLegPosition()

  786. end

  787. if not RagdollEnabled then

  788. if UserCFrame == Enum.UserCFrame.Head and AccessorySettings.Head then

  789. for _, Table in next, HeadAccessories do

  790. local Handle, RightGrip, HatAtt, HeadAtt, BasePart = unpack(Table)

  791. local LocalPositioning = Positioning

  792. if not RightGrip or not RightGrip.Parent then

  793. RightGrip = CreateRightGrip(Handle)

  794. Table[2] = RightGrip

  795. end

  796. local Parent = RightGrip.Parent

  797. if BasePart then

  798. LocalPositioning = BasePart.CFrame * HeadAtt

  799. end

  800. RightGrip.C1 = HatAtt

  801. RightGrip.C0 = RightGrip.C0:Lerp(WeldBase.CFrame:ToObjectSpace(LocalPositioning), Smoothness)

  802. RightGrip.Parent = nil

  803. RightGrip.Parent = Parent

  804. end

  805. elseif RightHandle and UserCFrame == Enum.UserCFrame.RightHand and AccessorySettings.RightArm then

  806. local HandPosition = Positioning

  807. local LocalPositioning = Positioning

  808. if not RightHandGrip or not RightHandGrip.Parent then

  809. RightHandGrip = CreateRightGrip(RightHandle)

  810. end

  811. if AccurateHandPosition then

  812. HandPosition = HandPosition * CFrame.new(0, 0, 1)

  813. end

  814. if not VRReady then

  815. local HeadRotation = Camera.CFrame - Camera.CFrame.p

  816. HandPosition =

  817. VirtualRig.RightUpperArm.CFrame:Lerp(VirtualRig.RightLowerArm.CFrame, 0.5) *

  818. AccessorySettings.LimbOffset

  819. --LocalPositioning = (HeadRotation + (HandPosition * CFrame.new(0, 0, 1)).p) * CFrame.Angles(math.rad(-45), 0, 0)

  820. LocalPositioning = HandPosition * CFrame.new(0, 0, 1) * CFrame.Angles(math.rad(-180), 0, 0)

  821. if Point2 then

  822. VirtualRig.RightUpperArm.Aim.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)

  823. VirtualRig.RightUpperArm.Aim.CFrame = Camera.CFrame * AccessorySettings.LimbOffset

  824. elseif VirtualRig.RightUpperArm.Aim.MaxTorque ~= Vector3.new(0, 0, 0) then

  825. VirtualRig.RightUpperArm.Aim.MaxTorque = Vector3.new(0, 0, 0)

  826. end

  827. elseif AccurateHandPosition then

  828. LocalPositioning = HandPosition

  829. end

  830. local Parent = RightHandGrip.Parent

  831. RightHandGrip.C1 = CFrame.new()

  832. RightHandGrip.C0 = RightHandGrip.C0:Lerp(WeldBase.CFrame:ToObjectSpace(HandPosition), Smoothness)

  833. RightHandGrip.Parent = nil

  834. RightHandGrip.Parent = Parent

  835. --

  836. local EquippedTool = GetExtraTool()

  837. if EquippedTool and EquippedTool:FindFirstChild("Handle") then

  838. local EquippedGrip = GetGripForHandle(EquippedTool.Handle)

  839. local Parent = EquippedGrip.Parent

  840. local ArmBaseCFrame = ArmBase.CFrame

  841. if ArmBase.Name == "Right Arm" then

  842. ArmBaseCFrame = ArmBaseCFrame

  843. end

  844. EquippedGrip.C1 = EquippedTool.Grip

  845. EquippedGrip.C0 = EquippedGrip.C0:Lerp(ArmBaseCFrame:ToObjectSpace(LocalPositioning), Smoothness)

  846. EquippedGrip.Parent = nil

  847. EquippedGrip.Parent = Parent

  848. end

  849. elseif LeftHandle and UserCFrame == Enum.UserCFrame.LeftHand and AccessorySettings.LeftArm then

  850. local HandPosition = Positioning

  851. if not LeftHandGrip or not LeftHandGrip.Parent then

  852. LeftHandGrip = CreateRightGrip(LeftHandle)

  853. end

  854. if AccurateHandPosition then

  855. HandPosition = HandPosition * CFrame.new(0, 0, 1)

  856. end

  857. if not VRReady then

  858. HandPosition =

  859. VirtualRig.LeftUpperArm.CFrame:Lerp(VirtualRig.LeftLowerArm.CFrame, 0.5) *

  860. AccessorySettings.LimbOffset

  861. --warn("Setting HandPosition to hands")

  862. if Point1 then

  863. VirtualRig.LeftUpperArm.Aim.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)

  864. VirtualRig.LeftUpperArm.Aim.CFrame = Camera.CFrame * AccessorySettings.LimbOffset

  865. elseif VirtualRig.LeftUpperArm.Aim.MaxTorque ~= Vector3.new(0, 0, 0) then

  866. VirtualRig.LeftUpperArm.Aim.MaxTorque = Vector3.new(0, 0, 0)

  867. end

  868. end

  869. local Parent = LeftHandGrip.Parent

  870. LeftHandGrip.C1 = CFrame.new()

  871. LeftHandGrip.C0 = LeftHandGrip.C0:Lerp(WeldBase.CFrame:ToObjectSpace(HandPosition), Smoothness)

  872. LeftHandGrip.Parent = nil

  873. LeftHandGrip.Parent = Parent

  874. end

  875. end

  876. if RagdollEnabled then

  877. if UserCFrame == Enum.UserCFrame.Head and RagdollHeadMovement then

  878. MoveHead(Positioning)

  879. elseif UserCFrame == Enum.UserCFrame.RightHand then

  880. local Positioning = Positioning

  881. if not VRReady then

  882. Positioning = VirtualRig.RightUpperArm.CFrame:Lerp(VirtualRig.RightLowerArm.CFrame, 0.5)

  883. elseif AccurateHandPosition then

  884. Positioning = Positioning * CFrame.new(0, 0, 1)

  885. end

  886. if VRReady then

  887. Positioning = Positioning * AccessorySettings.LimbOffset

  888. end

  889. MoveRightArm(Positioning)

  890. if Point2 then

  891. VirtualRig.RightUpperArm.Aim.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)

  892. VirtualRig.RightUpperArm.Aim.CFrame = Camera.CFrame * AccessorySettings.LimbOffset

  893. elseif VirtualRig.RightUpperArm.Aim.MaxTorque ~= Vector3.new(0, 0, 0) then

  894. VirtualRig.RightUpperArm.Aim.MaxTorque = Vector3.new(0, 0, 0)

  895. end

  896. elseif UserCFrame == Enum.UserCFrame.LeftHand then

  897. local Positioning = Positioning

  898. if not VRReady then

  899. Positioning = VirtualRig.LeftUpperArm.CFrame:Lerp(VirtualRig.LeftLowerArm.CFrame, 0.5)

  900. elseif AccurateHandPosition then

  901. Positioning = Positioning * CFrame.new(0, 0, 1)

  902. end

  903. if VRReady then

  904. Positioning = Positioning * AccessorySettings.LimbOffset

  905. end

  906. MoveLeftArm(Positioning)

  907. if Point1 then

  908. VirtualRig.LeftUpperArm.Aim.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)

  909. VirtualRig.LeftUpperArm.Aim.CFrame = Camera.CFrame * AccessorySettings.LimbOffset

  910. elseif VirtualRig.LeftUpperArm.Aim.MaxTorque ~= Vector3.new(0, 0, 0) then

  911. VirtualRig.LeftUpperArm.Aim.MaxTorque = Vector3.new(0, 0, 0)

  912. end

  913. end

  914. end

  915. if UserCFrame == Enum.UserCFrame.Head then

  916. VirtualRig.Head.CFrame = Positioning

  917. elseif UserCFrame == Enum.UserCFrame.RightHand and VRReady then

  918. VirtualRig.RightHand.CFrame = Positioning

  919. elseif UserCFrame == Enum.UserCFrame.LeftHand and VRReady then

  920. VirtualRig.LeftHand.CFrame = Positioning

  921. end

  922. if not VRReady and VirtualRig.LeftHand.Anchored then

  923. VirtualRig.RightHand.Anchored = false

  924. VirtualRig.LeftHand.Anchored = false

  925. elseif VRReady and not VirtualRig.LeftHand.Anchored then

  926. VirtualRig.RightHand.Anchored = true

  927. VirtualRig.LeftHand.Anchored = true

  928. end

  929. end

  930. local CFrameChanged = VRService.UserCFrameChanged:Connect(OnUserCFrameChanged)

  931. local OnStepped =

  932. RunService.Stepped:Connect(

  933. function()

  934. for _, Part in pairs(VirtualRig:GetChildren()) do

  935. if Part:IsA("BasePart") then

  936. Part.CanCollide = false

  937. end

  938. end

  939. if RagdollEnabled then

  940. for _, Part in pairs(Character:GetChildren()) do

  941. if Part:IsA("BasePart") then

  942. Part.CanCollide = false

  943. end

  944. end

  945. end

  946. if NoCollision then

  947. for _, Player in pairs(Players:GetPlayers()) do

  948. if Player ~= Client and Player.Character then

  949. local Descendants = Player.Character:GetDescendants()

  950. for i = 1, #Descendants do

  951. local Part = Descendants[i]

  952. if Part:IsA("BasePart") then

  953. Part.CanCollide = false

  954. Part.Velocity = Vector3.new()

  955. Part.RotVelocity = Vector3.new()

  956. end

  957. end

  958. end

  959. end

  960. end

  961. end

  962. )

  963. local OnRenderStepped =

  964. RunService.Stepped:Connect(

  965. function()

  966. Camera.CameraSubject = VirtualBody.Humanoid

  967. if RagdollEnabled then

  968. Character.HumanoidRootPart.CFrame = VirtualRig.UpperTorso.CFrame

  969. --Character.HumanoidRootPart.Velocity = Vector3.new(0, 0, 0)

  970. end

  971. if not VRReady then

  972. OnUserCFrameChanged(Enum.UserCFrame.Head, CFrame.new(0, 0, 0))

  973. OnUserCFrameChanged(Enum.UserCFrame.RightHand, CFrame.new(0, 0, 0), true)

  974. OnUserCFrameChanged(Enum.UserCFrame.LeftHand, CFrame.new(0, 0, 0), true)

  975. end

  976. end

  977. )

  978. spawn(

  979. function()

  980. while Character and Character.Parent do

  981. FootYield()

  982. UpdateFooting()

  983. end

  984. end

  985. )

  986. --[[

  987. Non-VR Support + VR Mechanics

  988. --]]

  989. local OnInput =

  990. UserInputService.InputBegan:Connect(

  991. function(Input, Processed)

  992. if not Processed then

  993. if Input.KeyCode == Enum.KeyCode.LeftControl or Input.KeyCode == Enum.KeyCode.ButtonL2 then

  994. Tween(

  995. VirtualBody.Humanoid,

  996. "Elastic",

  997. "Out",

  998. 1,

  999. {

  1000. CameraOffset = Vector3.new(0, StudsOffset - 1.5, 0)

  1001. }

  1002. )

  1003. end

  1004. if Input.KeyCode == Enum.KeyCode.X then

  1005. if RagdollEnabled and RagdollHeadMovement then

  1006. --Network:Unclaim()

  1007. Respawn()

  1008. end

  1009. end

  1010. if Input.KeyCode == Enum.KeyCode.C then

  1011. VirtualBody:MoveTo(Mouse.Hit.p)

  1012. VirtualRig:MoveTo(Mouse.Hit.p)

  1013. end

  1014. end

  1015. if Input.KeyCode == Enum.KeyCode.LeftShift or Input.KeyCode == Enum.KeyCode.ButtonR2 then

  1016. Tween(

  1017. VirtualBody.Humanoid,

  1018. "Sine",

  1019. "Out",

  1020. 1,

  1021. {

  1022. WalkSpeed = 16

  1023. }

  1024. )

  1025. end

  1026. if not VRReady and Input.UserInputType == Enum.UserInputType.MouseButton1 then

  1027. Point1 = true

  1028. end

  1029. if not VRReady and Input.UserInputType == Enum.UserInputType.MouseButton2 then

  1030. Point2 = true

  1031. end

  1032. if VRReady and Input.KeyCode == Enum.KeyCode.ButtonY then

  1033. Character:BreakJoints()

  1034. if RagdollEnabled and RagdollHeadMovement then

  1035. --Network:Unclaim()

  1036. Respawn()

  1037. end

  1038. end

  1039. end

  1040. )

  1041. local OnInputEnded =

  1042. UserInputService.InputEnded:Connect(

  1043. function(Input, Processed)

  1044. if not Processed then

  1045. if Input.KeyCode == Enum.KeyCode.LeftControl or Input.KeyCode == Enum.KeyCode.ButtonL2 then

  1046. Tween(

  1047. VirtualBody.Humanoid,

  1048. "Elastic",

  1049. "Out",

  1050. 1,

  1051. {

  1052. CameraOffset = Vector3.new(0, StudsOffset, 0)

  1053. }

  1054. )

  1055. end

  1056. end

  1057. if Input.KeyCode == Enum.KeyCode.LeftShift or Input.KeyCode == Enum.KeyCode.ButtonR2 then

  1058. Tween(

  1059. VirtualBody.Humanoid,

  1060. "Sine",

  1061. "Out",

  1062. 1,

  1063. {

  1064. WalkSpeed = 8

  1065. }

  1066. )

  1067. end

  1068. if not VRReady and Input.UserInputType == Enum.UserInputType.MouseButton1 then

  1069. Point1 = false

  1070. end

  1071. if not VRReady and Input.UserInputType == Enum.UserInputType.MouseButton2 then

  1072. Point2 = false

  1073. end

  1074. end

  1075. )

  1076. --[[

  1077. Proper Cleanup

  1078. --]]

  1079. local OnReset

  1080. OnReset =

  1081. Client.CharacterAdded:Connect(

  1082. function()

  1083. OnReset:Disconnect()

  1084. CFrameChanged:Disconnect()

  1085. OnStepped:Disconnect()

  1086. OnRenderStepped:Disconnect()

  1087. OnMoving:Disconnect()

  1088. OnInput:Disconnect()

  1089. OnInputEnded:Disconnect()

  1090. VirtualRig:Destroy()

  1091. VirtualBody:Destroy()

  1092. if RagdollEnabled then

  1093. --Network:Unclaim()

  1094. end

  1095. if AutoRun then

  1096. delay(

  1097. 2,

  1098. function()

  1099. Script()

  1100. end

  1101. )

  1102. end

  1103. end

  1104. )

  1105. if ChatEnabled then

  1106. spawn(ChatHUDFunc)

  1107. end

  1108. if ViewportEnabled then

  1109. spawn(ViewHUDFunc)

  1110. end

  1111. do

  1112. --[[

  1113. Functions

  1114. --]]

  1115. local Players = game:GetService("Players")

  1116. local Client = Players.LocalPlayer

  1117. local VRService = game:GetService("VRService")

  1118. local VRReady = VRService.VREnabled

  1119. local UserInputService = game:GetService("UserInputService")

  1120. local RunService = game:GetService("RunService")

  1121. local Camera = workspace.CurrentCamera

  1122. --[[

  1123. Code

  1124. --]]

  1125. if VRReady then

  1126. local Pointer = game:GetObjects("rbxassetid://4476173280")[1]

  1127. Pointer.Parent = workspace

  1128. Pointer.Beam.Enabled = false

  1129. Pointer.Target.ParticleEmitter.Enabled = false

  1130. local RenderStepped =

  1131. RunService.RenderStepped:Connect(

  1132. function()

  1133. if Pointer.Beam.Enabled then

  1134. local RightHand = Camera.CFrame * VRService:GetUserCFrame(Enum.UserCFrame.RightHand)

  1135. local Target = RightHand * CFrame.new(0, 0, -10)

  1136. local Line = Ray.new(RightHand.p, (Target.p - RightHand.p).Unit * 128)

  1137. local Part, Position =

  1138. workspace:FindPartOnRayWithIgnoreList(Line, {VirtualRig, VirtualBody, Character, Pointer})

  1139. local Distance = (Position - RightHand.p).Magnitude

  1140. Pointer.Target.Position = Vector3.new(0, 0, -Distance)

  1141. Pointer.CFrame = RightHand

  1142. end

  1143. end

  1144. )

  1145. local Input =

  1146. UserInputService.InputBegan:Connect(

  1147. function(Input)

  1148. if Input.KeyCode == Enum.KeyCode.ButtonB then

  1149. Pointer.Beam.Enabled = not Pointer.Beam.Enabled

  1150. Pointer.Target.ParticleEmitter.Enabled = not Pointer.Target.ParticleEmitter.Enabled

  1151. end

  1152. end

  1153. )

  1154. --

  1155. local CharacterAdded

  1156. CharacterAdded =

  1157. Client.CharacterAdded:Connect(

  1158. function()

  1159. RenderStepped:Disconnect()

  1160. Input:Disconnect()

  1161. CharacterAdded:Disconnect()

  1162. Pointer:Destroy()

  1163. Pointer = nil

  1164. end

  1165. )

  1166. else

  1167. return

  1168. end

  1169. end

  1170. end

  1171. Permadeath = function()

  1172. local ch = game.Players.LocalPlayer.Character

  1173. local prt = Instance.new("Model", workspace)

  1174. local z1 = Instance.new("Part", prt)

  1175. z1.Name = "Torso"

  1176. z1.CanCollide = false

  1177. z1.Anchored = true

  1178. local z2 = Instance.new("Part", prt)

  1179. z2.Name = "Head"

  1180. z2.Anchored = true

  1181. z2.CanCollide = false

  1182. local z3 = Instance.new("Humanoid", prt)

  1183. z3.Name = "Humanoid"

  1184. z1.Position = Vector3.new(0, 9999, 0)

  1185. z2.Position = Vector3.new(0, 9991, 0)

  1186. game.Players.LocalPlayer.Character = prt

  1187. wait(game.Players.RespawnTime/2)

  1188. warn("50%")

  1189. game.Players.LocalPlayer.Character = ch

  1190. wait(game.Players.RespawnTime/2 + 0.5)

  1191. warn("100%")

  1192. end

  1193. Respawn = function()

  1194. local ch = game.Players.LocalPlayer.Character

  1195. local prt = Instance.new("Model", workspace)

  1196. local z1 = Instance.new("Part", prt)

  1197. z1.Name = "Torso"

  1198. z1.CanCollide = false

  1199. z1.Anchored = true

  1200. local z2 = Instance.new("Part", prt)

  1201. z2.Name = "Head"

  1202. z2.Anchored = true

  1203. z2.CanCollide = false

  1204. local z3 = Instance.new("Humanoid", prt)

  1205. z3.Name = "Humanoid"

  1206. z1.Position = Vector3.new(0, 9999, 0)

  1207. z2.Position = Vector3.new(0, 9991, 0)

  1208. game.Players.LocalPlayer.Character = prt

  1209. wait(game.Players.RespawnTime)

  1210. game.Players.LocalPlayer.Character = ch

  1211. end

  1212. ChatHUDFunc = function()

  1213. --[[

  1214. Variables

  1215. --]]

  1216. local UserInputService = game:GetService("UserInputService")

  1217. local RunService = game:GetService("RunService")

  1218. local VRService = game:GetService("VRService")

  1219. local VRReady = VRService.VREnabled

  1220. local Players = game:GetService("Players")

  1221. local Client = Players.LocalPlayer

  1222. local ChatHUD = game:GetObjects("rbxassetid://4476067885")[1]

  1223. local GlobalFrame = ChatHUD.GlobalFrame

  1224. local Template = GlobalFrame.Template

  1225. local LocalFrame = ChatHUD.LocalFrame

  1226. local Global = ChatHUD.Global

  1227. local Local = ChatHUD.Local

  1228. local Camera = workspace.CurrentCamera

  1229. Template.Parent = nil

  1230. ChatHUD.Parent = game:GetService("CoreGui")

  1231. --[[

  1232. Code

  1233. --]]

  1234. local Highlight = Global.Frame.BackgroundColor3

  1235. local Deselected = Local.Frame.BackgroundColor3

  1236. local OpenGlobalTab = function()

  1237. Global.Frame.BackgroundColor3 = Highlight

  1238. Local.Frame.BackgroundColor3 = Deselected

  1239. Global.Font = Enum.Font.SourceSansBold

  1240. Local.Font = Enum.Font.SourceSans

  1241. GlobalFrame.Visible = true

  1242. LocalFrame.Visible = false

  1243. end

  1244. local OpenLocalTab = function()

  1245. Global.Frame.BackgroundColor3 = Deselected

  1246. Local.Frame.BackgroundColor3 = Highlight

  1247. Global.Font = Enum.Font.SourceSans

  1248. Local.Font = Enum.Font.SourceSansBold

  1249. GlobalFrame.Visible = false

  1250. LocalFrame.Visible = true

  1251. end

  1252. Global.MouseButton1Down:Connect(OpenGlobalTab)

  1253. Local.MouseButton1Down:Connect(OpenLocalTab)

  1254. Global.MouseButton1Click:Connect(OpenGlobalTab)

  1255. Local.MouseButton1Click:Connect(OpenLocalTab)

  1256. OpenLocalTab()

  1257. --

  1258. local function GetPlayerDistance(Sender)

  1259. if Sender.Character and Sender.Character:FindFirstChild("Head") then

  1260. return math.floor((Sender.Character.Head.Position - Camera:GetRenderCFrame().p).Magnitude + 0.5)

  1261. end

  1262. end

  1263. local function NewGlobal(Message, Sender, Color)

  1264. local Frame = Template:Clone()

  1265. Frame.Text = ("[%s]: %s"):format(Sender.Name, Message)

  1266. Frame.User.Text = ("[%s]:"):format(Sender.Name)

  1267. Frame.User.TextColor3 = Color

  1268. Frame.BackgroundColor3 = Color

  1269. Frame.Parent = GlobalFrame

  1270. delay(

  1271. 60,

  1272. function()

  1273. Frame:Destroy()

  1274. end

  1275. )

  1276. end

  1277. local function NewLocal(Message, Sender, Color, Dist)

  1278. local Frame = Template:Clone()

  1279. Frame.Text = ("(%s) [%s]: %s"):format(tostring(Dist), Sender.Name, Message)

  1280. Frame.User.Text = ("(%s) [%s]:"):format(tostring(Dist), Sender.Name)

  1281. Frame.User.TextColor3 = Color

  1282. Frame.BackgroundColor3 = Color

  1283. Frame.Parent = LocalFrame

  1284. delay(

  1285. 60,

  1286. function()

  1287. Frame:Destroy()

  1288. end

  1289. )

  1290. end

  1291. local function OnNewChat(Message, Sender, Color)

  1292. if not ChatHUD or not ChatHUD.Parent then

  1293. return

  1294. end

  1295. NewGlobal(Message, Sender, Color)

  1296. local Distance = GetPlayerDistance(Sender)

  1297. if Distance and Distance <= ChatLocalRange then

  1298. NewLocal(Message, Sender, Color, Distance)

  1299. end

  1300. end

  1301. local function OnPlayerAdded(Player)

  1302. if not ChatHUD or not ChatHUD.Parent then

  1303. return

  1304. end

  1305. local Color = BrickColor.Random().Color

  1306. Player.Chatted:Connect(

  1307. function(Message)

  1308. OnNewChat(Message, Player, Color)

  1309. end

  1310. )

  1311. end

  1312. Players.PlayerAdded:Connect(OnPlayerAdded)

  1313. for _, Player in pairs(Players:GetPlayers()) do

  1314. OnPlayerAdded(Player)

  1315. end

  1316. --

  1317. local ChatPart = ChatHUD.Part

  1318. ChatHUD.Adornee = ChatPart

  1319. if VRReady then

  1320. ChatHUD.Parent = game:GetService("CoreGui")

  1321. ChatHUD.Enabled = true

  1322. ChatHUD.AlwaysOnTop = true

  1323. local OnInput =

  1324. UserInputService.InputBegan:Connect(

  1325. function(Input, Processed)

  1326. if not Processed then

  1327. if Input.KeyCode == Enum.KeyCode.ButtonX then

  1328. ChatHUD.Enabled = not ChatHUD.Enabled

  1329. end

  1330. end

  1331. end

  1332. )

  1333. local RenderStepped =

  1334. RunService.RenderStepped:Connect(

  1335. function()

  1336. local LeftHand = VRService:GetUserCFrame(Enum.UserCFrame.LeftHand)

  1337. ChatPart.CFrame = Camera.CFrame * LeftHand

  1338. end

  1339. )

  1340. local CharacterAdded

  1341. CharacterAdded =

  1342. Client.CharacterAdded:Connect(

  1343. function()

  1344. OnInput:Disconnect()

  1345. RenderStepped:Disconnect()

  1346. CharacterAdded:Disconnect()

  1347. ChatHUD:Destroy()

  1348. ChatHUD = nil

  1349. end

  1350. )

  1351. end

  1352. wait(9e9)

  1353. end

  1354. ViewHUDFunc = function()

  1355. --[[

  1356. Variables

  1357. --]]

  1358. local ViewportRange = ViewportRange or 32

  1359. local UserInputService = game:GetService("UserInputService")

  1360. local RunService = game:GetService("RunService")

  1361. local VRService = game:GetService("VRService")

  1362. local VRReady = VRService.VREnabled

  1363. local Players = game:GetService("Players")

  1364. local Client = Players.LocalPlayer

  1365. local Mouse = Client:GetMouse()

  1366. local Camera = workspace.CurrentCamera

  1367. local CameraPort = Camera.CFrame

  1368. local ViewHUD = script:FindFirstChild("ViewHUD") or game:GetObjects("rbxassetid://4480405425")[1]

  1369. local Viewport = ViewHUD.Viewport

  1370. local Viewcam = Instance.new("Camera")

  1371. local ViewPart = ViewHUD.Part

  1372. ViewHUD.Parent = game:GetService("CoreGui")

  1373. Viewcam.Parent = Viewport

  1374. Viewcam.CameraType = Enum.CameraType.Scriptable

  1375. Viewport.CurrentCamera = Viewcam

  1376. Viewport.BackgroundTransparency = 1

  1377. --[[

  1378. Code

  1379. --]]

  1380. local function Clone(Character)

  1381. local Arc = Character.Archivable

  1382. local Clone

  1383. Character.Archivable = true

  1384. Clone = Character:Clone()

  1385. Character.Archivable = Arc

  1386. return Clone

  1387. end

  1388. local function GetPart(Name, Parent, Descendants)

  1389. for i = 1, #Descendants do

  1390. local Part = Descendants[i]

  1391. if Part.Name == Name and Part.Parent.Name == Parent then

  1392. return Part

  1393. end

  1394. end

  1395. end

  1396. local function OnPlayerAdded(Player)

  1397. if not ViewHUD or not ViewHUD.Parent then

  1398. return

  1399. end

  1400. local function CharacterAdded(Character)

  1401. if not ViewHUD or not ViewHUD.Parent then

  1402. return

  1403. end

  1404. Character:WaitForChild("Head")

  1405. Character:WaitForChild("Humanoid")

  1406. wait(3)

  1407. local FakeChar = Clone(Character)

  1408. local Root = FakeChar:FindFirstChild("HumanoidRootPart") or FakeChar:FindFirstChild("Head")

  1409. local RenderConnection

  1410. local Descendants = FakeChar:GetDescendants()

  1411. local RealDescendants = Character:GetDescendants()

  1412. local Correspondents = {}

  1413. FakeChar.Humanoid.DisplayDistanceType = "None"

  1414. for i = 1, #Descendants do

  1415. local Part = Descendants[i]

  1416. local Real = Part:IsA("BasePart") and GetPart(Part.Name, Part.Parent.Name, RealDescendants)

  1417. if Part:IsA("BasePart") and Real then

  1418. Part.Anchored = true

  1419. Part:BreakJoints()

  1420. if Part.Parent:IsA("Accessory") then

  1421. Part.Transparency = 0

  1422. end

  1423. table.insert(Correspondents, {Part, Real})

  1424. end

  1425. end

  1426. RenderConnection =

  1427. RunService.RenderStepped:Connect(

  1428. function()

  1429. if not Character or not Character.Parent then

  1430. RenderConnection:Disconnect()

  1431. FakeChar:Destroy()

  1432. return

  1433. end

  1434. if

  1435. (Root and (Root.Position - Camera.CFrame.p).Magnitude <= ViewportRange) or Player == Client or

  1436. not Root

  1437. then

  1438. for i = 1, #Correspondents do

  1439. local Part, Real = unpack(Correspondents[i])

  1440. if Part and Real and Part.Parent and Real.Parent then

  1441. Part.CFrame = Real.CFrame

  1442. elseif Part.Parent and not Real.Parent then

  1443. Part:Destroy()

  1444. end

  1445. end

  1446. end

  1447. end

  1448. )

  1449. FakeChar.Parent = Viewcam

  1450. end

  1451. Player.CharacterAdded:Connect(CharacterAdded)

  1452. if Player.Character then

  1453. spawn(

  1454. function()

  1455. CharacterAdded(Player.Character)

  1456. end

  1457. )

  1458. end

  1459. end

  1460. local PlayerAdded = Players.PlayerAdded:Connect(OnPlayerAdded)

  1461. for _, Player in pairs(Players:GetPlayers()) do

  1462. OnPlayerAdded(Player)

  1463. end

  1464. ViewPart.Size = Vector3.new()

  1465. if VRReady then

  1466. Viewport.Position = UDim2.new(.62, 0, .89, 0)

  1467. Viewport.Size = UDim2.new(.3, 0, .3, 0)

  1468. Viewport.AnchorPoint = Vector2.new(.5, 1)

  1469. else

  1470. Viewport.Size = UDim2.new(0.3, 0, 0.3, 0)

  1471. end

  1472. local RenderStepped =

  1473. RunService.RenderStepped:Connect(

  1474. function()

  1475. local Render = Camera.CFrame

  1476. local Scale = Camera.ViewportSize

  1477. if VRReady then

  1478. Render = Render * VRService:GetUserCFrame(Enum.UserCFrame.Head)

  1479. end

  1480. CameraPort = CFrame.new(Render.p + Vector3.new(5, 2, 0), Render.p)

  1481. Viewport.Camera.CFrame = CameraPort

  1482. ViewPart.CFrame = Render * CFrame.new(0, 0, -16)

  1483. ViewHUD.Size = UDim2.new(0, Scale.X - 6, 0, Scale.Y - 6)

  1484. end

  1485. )

  1486. --

  1487. local CharacterAdded

  1488. CharacterAdded =

  1489. Client.CharacterAdded:Connect(

  1490. function()

  1491. RenderStepped:Disconnect()

  1492. CharacterAdded:Disconnect()

  1493. PlayerAdded:Disconnect()

  1494. ViewHUD:Destroy()

  1495. ViewHUD = nil

  1496. end

  1497. )

  1498. ------------------------Part of modification------------------------

  1499. for i,v in pairs(character1:GetDescendants()) do

  1500. if v:IsA("Motor6D") then

  1501. v:Destroy()

  1502. end

  1503. end

  1504. if character1.Humanoid.RigType == Enum.HumanoidRigType.R15 then

  1505. character1:BreakJoints()

  1506. end

  1507. for i,v in pairs(reanimation:GetChildren()) do

  1508. if v:IsA("BasePart") then

  1509. v.Anchored = false

  1510. end

  1511. end

  1512. game:GetService("RunService").Heartbeat:Connect(function()

  1513. for i,v in pairs(character1:GetChildren()) do

  1514. if v:IsA("BasePart") then

  1515. v.Velocity = Vector3.new(bodyVelocity[1], bodyVelocity[2], bodyVelocity[3])

  1516. if character1.Humanoid.RigType == Enum.HumanoidRigType.R6 then

  1517. v.CFrame = reanimation:FindFirstChild(v.Name).CFrame

  1518. else

  1519. --Head

  1520. if character1:FindFirstChild("Head") then

  1521. character1.Head.CFrame = reanimation.Head.CFrame

  1522. end

  1523. --Torso

  1524. if character1:FindFirstChild("UpperTorso") then

  1525. character1.UpperTorso.CFrame = reanimation.Torso.CFrame * CFrame.new(0, 0.185, 0)

  1526. end

  1527. if character1:FindFirstChild("LowerTorso") then

  1528. character1.LowerTorso.CFrame = reanimation.Torso.CFrame * CFrame.new(0, -0.8, 0)

  1529. end

  1530. --HumanoidRootPart

  1531. if character1:FindFirstChild("HumanoidRootPart") then

  1532. character1.HumanoidRootPart.CFrame = cHRP.CFrame

  1533. end

  1534. --Left Arm

  1535. if character1:FindFirstChild("LeftUpperArm") then

  1536. character1.LeftUpperArm.CFrame = reanimation["Left Arm"].CFrame * CFrame.new(0, 0.4, 0)

  1537. end

  1538. if character1:FindFirstChild("LeftLowerArm") then

  1539. character1.LeftLowerArm.CFrame = reanimation["Left Arm"].CFrame * CFrame.new(0, -0.19, 0)

  1540. end

  1541. if character1:FindFirstChild("LeftHand") then

  1542. character1.LeftHand.CFrame = reanimation["Left Arm"].CFrame * CFrame.new(0, -0.84, 0)

  1543. end

  1544. --Right Arm

  1545. if character1:FindFirstChild("RightUpperArm") then

  1546. character1.RightUpperArm.CFrame = reanimation["Right Arm"].CFrame * CFrame.new(0, 0.4, 0)

  1547. end

  1548. if character1:FindFirstChild("RightLowerArm") then

  1549. character1.RightLowerArm.CFrame = reanimation["Right Arm"].CFrame * CFrame.new(0, -0.19, 0)

  1550. end

  1551. if character1:FindFirstChild("RightHand") then

  1552. character1.RightHand.CFrame = reanimation["Right Arm"].CFrame * CFrame.new(0, -0.84, 0)

  1553. end

  1554. --Left Leg

  1555. if character1:FindFirstChild("LeftUpperLeg") then

  1556. character1.LeftUpperLeg.CFrame = reanimation["Left Leg"].CFrame * CFrame.new(0, 0.55, 0)

  1557. end

  1558. if character1:FindFirstChild("LeftLowerLeg") then

  1559. character1.LeftLowerLeg.CFrame = reanimation["Left Leg"].CFrame * CFrame.new(0, -0.19, 0)

  1560. end

  1561. if character1:FindFirstChild("LeftFoot") then

  1562. character1.LeftFoot.CFrame = reanimation["Left Leg"].CFrame * CFrame.new(0, -0.85, 0)

  1563. end

  1564. --Right Leg

  1565. if character1:FindFirstChild("RightUpperLeg") then

  1566. character1.RightUpperLeg.CFrame = reanimation["Right Leg"].CFrame * CFrame.new(0, 0.55, 0)

  1567. end

  1568. if character1:FindFirstChild("RightLowerLeg") then

  1569. character1.RightLowerLeg.CFrame = reanimation["Right Leg"].CFrame * CFrame.new(0, -0.19, 0)

  1570. end

  1571. if character1:FindFirstChild("RightFoot") then

  1572. character1.RightFoot.CFrame = reanimation["Right Leg"].CFrame * CFrame.new(0, -0.85, 0)

  1573. end

  1574. end

  1575. end

  1576. if v:IsA("Accessory") then

  1577. v.Handle.Velocity = Vector3.new(hatVelocity[1], hatVelocity[2], hatVelocity[3])

  1578. v.Handle.CFrame = reanimation:FindFirstChild(v.Name).Handle.CFrame

  1579. end

  1580. end

  1581. end)

  1582. game:GetService("RunService").Stepped:Connect(function()

  1583. for i,v in pairs(reanimation:GetChildren()) do

  1584. if v:IsA("BasePart") then

  1585. v.CanCollide = false

  1586. end

  1587. end

  1588. end)

  1589. --------------------------------------------------------------------

  1590. wait(9e9)

  1591. end

  1592. Script()

  1593. wait(2)

  1594. local Players = game:GetService("Players")

  1595. local lp = Players.LocalPlayer

  1596. local character = reanimation--lp.Character

  1597. local A0LL = Instance.new("Attachment", character["Left Leg"])

  1598. A0LL.Position = Vector3.new(0, 1, 0)

  1599. local A1LL = Instance.new("Attachment", character["Torso"])

  1600. A1LL.Position = Vector3.new(-0.5, -1, 0)

  1601. local socket1 = Instance.new("BallSocketConstraint", character["Left Leg"])

  1602. socket1.Attachment0 = A0LL

  1603. socket1.Attachment1 = A1LL

  1604. local A0RL = Instance.new("Attachment", character["Right Leg"])

  1605. A0RL.Position = Vector3.new(0, 1, 0)

  1606. local A1RL = Instance.new("Attachment", character["Torso"])

  1607. A1RL.Position = Vector3.new(0.5, -1, 0)

  1608. local socket2 = Instance.new("BallSocketConstraint", character["Right Leg"])

  1609. socket2.Attachment0 = A0RL

  1610. socket2.Attachment1 = A1RL

  1611. local A0H = Instance.new("Attachment", character["Head"])

  1612. A0H.Position = Vector3.new(0, -0.5, 0)

  1613. local A1H = Instance.new("Attachment", character["Torso"])

  1614. A1H.Position = Vector3.new(0, 1, 0)

  1615. local socket5 = Instance.new("BallSocketConstraint", character["Head"])

  1616. socket5.Attachment0 = A0H

  1617. socket5.Attachment1 = A1H

  1618. --loadstring(game:HttpGet("https://ghostbin.co/paste/krmyf/raw", true))()

  1619. -----------------------------------------------------------

  1620. wait(9e9)

  1621. end)

VR SCRIPT R6 R15 - Pastebin.com (2024)
Top Articles
Latest Posts
Article information

Author: Rev. Leonie Wyman

Last Updated:

Views: 6197

Rating: 4.9 / 5 (79 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Rev. Leonie Wyman

Birthday: 1993-07-01

Address: Suite 763 6272 Lang Bypass, New Xochitlport, VT 72704-3308

Phone: +22014484519944

Job: Banking Officer

Hobby: Sailing, Gaming, Basketball, Calligraphy, Mycology, Astronomy, Juggling

Introduction: My name is Rev. Leonie Wyman, I am a colorful, tasty, splendid, fair, witty, gorgeous, splendid person who loves writing and wants to share my knowledge and understanding with you.