Advertisement
1e_0

Untitled

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