Advertisement
SCRIPTCUSTOMIZER

yeassiuer

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