RoSPLOITkrnl

Roblox mobile vr script v.2

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