Advertisement
RoSPLOITkrnl

Roblox Vr Script V.4

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