Advertisement
RoSPLOITkrnl

ROBLOX VR GUN AND KNIFE [FE]

Sep 17th, 2022
3,528
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 159.83 KB | None | 1 0
  1. --[[
  2. _______________________________________________________________
  3. // \\
  4. || CLOVR - Modified by: ONEReverseCard and ShownApe ||
  5. || Original VR script made by Abacaxl on YouTube ||
  6. || NOTE: Everything that I put into this script wasn't made by me ||
  7. || I will give credit where credit is due ||
  8. || Here's my discord server ||
  9. || ------------------------------- ||
  10. || | https://discord.gg/Hbq3TgAJbB | ||
  11. || ------------------------------- ||
  12. || Have Fun :) ||
  13. \\________________________________________________________________//
  14.  
  15. ____________ __ ____________ ___ ___ ____________ ___
  16. / __________/ / / / __________ \ / / / / / _______ / | /\/\
  17. / / / / / / \ \ / / / / / / / / ------
  18. / / / / / / \ \ / / / / / /______/ /
  19. / / / / / / \ \ / / / / / _____/
  20. / / / / \ \ / / / / / / / \
  21. / / / / \ \ / / / / / / / /\ \
  22. / /____________ / /___________ \ \__________/ / / \/ / / / \ \
  23. \_____________/ /_____________/ \____________/ \______/ /____/ \___\
  24. ----------------------------------------------------------------------------------------
  25. __________ __ __ __ __ __ __ ____________ _____________
  26. / ________/ / / / / / \ / / / \ / \ / __________ \ / _________ /
  27. / / / / / / / /\ \ / / / /\ \ / /\ \ / / \ \ / / / /
  28. / / / / / / / / \ \ / / / / \ \ / / \ \ / / \ \ / / / /
  29. / / ______ / / / / / / \ \ / / / / \ \ / / \ \ / / / / / / / /
  30. / / /___ / / / / / / / \ \ / / / / \ \/ / \ \ \ \ / / / / / /
  31. / /______/ / / /_____/ / / / \ \/ / / / \__/ \ \ \ \__________/ / / /__________/ /
  32. /__________/ /_________/ /_/ \__/ /_/ \_\ \____________/ /_____________/
  33. -----------------------------------------------------------------------------------------------------------
  34. ]]
  35. -----------Settings-----------
  36. --[--VR Only--]--
  37. _G.gunAutoEquip = false --If this is true, instead of holding down the grip button to hold the gun, you just have to press it to equip and unequip it.
  38. _G.swordAutoEquip = false --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.
  39. _G.changeSomeStuff = true
  40. --(Recommended to be true if leftHand is true) If this is true, it will lock your camera to first person, change the sprint keybind to the right thumbstick, and change the crouch keybind to the left thumbstick.
  41. _G.knifeMode = false --If this is true, you will hold your sword/knife to where the blade is pointing inward towards your body and will be holstered on the side of your body.
  42.  
  43. --[--Universal--]--
  44. _G.leftHand = true --If you're left handed and are using VR, put this to true (or if you want the gun to be held on your left hand). Can also be used to switch which weapon goes on which hand when dual wielding.
  45. _G.flinging = true --If this is true, you'll be able to fling people.
  46. _G.toolHolding = true --If this is true, you'll be able to hold tools.
  47. _G.bodyTransparency = 0 --How transparent you want your body to be. (Least 0 - 1 Most)
  48. _G.hatTransparency = 0 --How transparent you want your hats to be. (Least 0 - 1 Most)
  49. --Hat CLOVR
  50. _G.hideCharacter = false --If this and hatCLOVR is true, then it will hide your character.
  51. _G.hideCharacterPosition = {50000000, 0, 50000000} --The position at which your character will be hid at. (X-Value, Y-Value, Z-Value)
  52. _G.hatCLOVR = false --You will use hats instead of your body parts if this is true.
  53. --HATS REQUIRED FOR HAT CLOVR:
  54. -- Head:
  55. -- Any Accessory That Goes On Your Head
  56. -- Torso:
  57. -- Lavender Updo - https://www.roblox.com/catalog/451220849/Lavender-Updo
  58. -- ROBLOX Girl - Hair - https://www.roblox.com/catalog/48474294/ROBLOX-Girl-Hair
  59. -- Right Arm:
  60. -- Brown Hair - https://www.roblox.com/catalog/62234425/Brown-Hair
  61. -- Left Arm:
  62. -- Red Roblox Cap - https://www.roblox.com/catalog/48474313/Red-Roblox-Cap
  63. -- Right Leg:
  64. -- Chestnut Bun - https://www.roblox.com/catalog/62724852/Chestnut-Bun
  65. -- Left Leg:
  66. -- Pal Hair - https://www.roblox.com/catalog/63690008/Pal-Hair
  67. --Loadout
  68. _G.primaryWeapon = true --If this is true, you'll be required to have a primary weapon (one of the supported guns).
  69. _G.secondaryWeapon = true --If this is true, you'll be required to have a secondary weapon (one of the supported swords/knives).
  70. _G.dualWieldGuns = false --If this is true, you'll be able to dual wield guns.
  71. _G.dualWieldMelee = false --If this is true, you'll be able to dual wield swords/knives.
  72. --Cooldown
  73. _G.sniperShootCooldown = 0.5 --How much time do you want to wait after shooting to shoot again (snipers only).
  74. _G.pistolShootCooldown = 0.25 --How much time do you want to wait after shooting to shoot again (pistols only).
  75. --Bullet Stuff
  76. _G.bulletColor = {255, 255, 255} --The color of the bullets (in RGB form).
  77. _G.sniperLifetime = 10 --The amount of time the bullet will last before getting deleted (snipers).
  78. _G.automaticLifetime = 5 --The amount of time the bullet will last before getting deleted (automatics).
  79. _G.pistolLifetime = 2.5 --The amount of time the bullet will last before getting deleted (pistols).
  80.  
  81. --[--Velocity--]--
  82. _G.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.
  83. _G.flingPartVelocity = {-17.7, 0, -17.7} --Change your hrp's velocity. First number value is the X value. Second number value is the Y value. Third number value is the Z value.
  84. _G.hatVelocity = {-17.7, 0, -17.7} --Change all of your accessories' velocity. First number value is the X value. Second number value is the Y value. Third number value is the Z value.
  85. _G.toolVelocity = {-17.7, 0, -17.7} --Change all of your tools' velocity. First number value is the X value. Second number value is the Y value. Third number value is the Z value.
  86. --Velocity is not recommended to be (-17.7, 0, -17.7) in R15 since body parts often fall in R15.
  87. ------------------------------
  88.  
  89.  
  90.  
  91. --[[------Hats Supported------]]--
  92. -- --[--Guns--]-- (Primary Weapons)
  93. -- (Works with all cyberpunk snipers)
  94. -- | Cyberpunk Sniper - https://www.roblox.com/catalog/5063578607/Cyberpunk-Sniper
  95. -- | Toxic Cyberpunk Sniper - https://www.roblox.com/catalog/5131883666/Toxic-Cyberpunk-Sniper
  96. -- | Blue Cyberpunk Sniper - https://www.roblox.com/catalog/5131898377/Blue-Cyberpunk-Sniper
  97. -- | Red Cyberpunk Sniper - https://www.roblox.com/catalog/5230863216/Red-Cyberpunk-Sniper
  98. -- | Pink Cyberpunk Sniper - https://www.roblox.com/catalog/5099663350/Pink-Cyberpunk-Sniper
  99. -- | Tactical Cyberpunk Sniper - https://www.roblox.com/catalog/5164293775/Tactical-Cyberpunk-Sniper
  100. -- | Noob Cyberpunk Sniper - https://www.roblox.com/catalog/5164703810/Noob-Cyberpunk-Sniper
  101. -- | Pink Cow Cyberpunk Sniper - https://www.roblox.com/catalog/5765105171/Pink-Cow-Cyberpunk-Sniper
  102. -- | Purple Cyberpunk Sniper - https://www.roblox.com/catalog/5505951511/Purple-Cyberpunk-Sniper
  103. -- | Rainbow Cyberpunk Sniper - https://www.roblox.com/catalog/5318857837/Rainbow-Cyberpunk-Sniper
  104. -- | Wavy Cyberpunk Sniper - https://www.roblox.com/catalog/5410381017/Wavy-Cyberpunk-Sniper
  105. -- | Festive Cyberpunk Sniper - https://www.roblox.com/catalog/6005601627/Festive-Cyberpunk-Sniper
  106. -- | Spooky Cyberpunk Sniper - https://www.roblox.com/catalog/5699860995/Spooky-Cyberpunk-Sniper
  107. --
  108. -- Type-49 The Abomination - https://www.roblox.com/catalog/4962455546/Type-49-The-Abomination
  109. -- Blox Rifle 5000 - https://www.roblox.com/catalog/5168118559/Blox-Rifle-5000
  110. -- --[--Pistols--]--
  111. -- LEO Mk.45 [Right Hip] - https://www.roblox.com/catalog/6995534747/LEO-Mk-45-Right-Hip
  112. -- Halloween Gun - https://www.roblox.com/catalog/7542631784/Halloween-Gun
  113. -- White Mk.45 [Left Hip] - https://www.roblox.com/catalog/7604371176/White-Mk-45-Left-Hip
  114. -- White Mk.45 [Right Hip] - https://www.roblox.com/catalog/7168000945/White-Mk-45-Right-Hip
  115. --
  116. -- --[--Swords--]-- (Secondary Weapons)
  117. -- Galaxy Sword - https://www.roblox.com/catalog/5355685721/Galaxy-Sword
  118. -- Russo’s Sword of Truth - https://www.roblox.com/catalog/5909776064/Russo-s-Sword-of-Truth
  119. -- --[--Greatswords--]--
  120. -- Demonic Greatsword - https://www.roblox.com/catalog/4315489767/Demonic-Greatsword
  121. -- Corrupt Demonic Greatsword - https://www.roblox.com/catalog/4506945409/Corrupt-Demonic-Greatsword
  122. -- Frozen Demonic Greatsword - https://www.roblox.com/catalog/4458601937/Frozen-Demonic-Greatsword
  123. -- Golden Demonic Greatsword - https://www.roblox.com/catalog/4794315940/Golden-Demonic-Greatsword
  124. -- --[--Knifes--]--
  125. -- UMAD? - https://www.roblox.com/catalog/743692483/UMAD
  126. -- Red Swag Knife - https://www.roblox.com/catalog/7170689370/Red-Swag-Knife
  127. -- White Swag Knife - https://www.roblox.com/catalog/7170680556/White-Swag-Knife
  128. --[[--------------------------]]--
  129.  
  130. --[[---------KeyBinds---------]]--
  131. -- --[--Non VR--]--
  132. -- F to equip and unequip the gun/sword/knife
  133. -- G to equip and unequip the sword/kinfe/sword
  134. -- E to shoot the gun while holding it
  135. -- Q to shoot the second gun if you're dual wielding
  136. -- --[--VR--]--
  137. -- Grip Button to equip and unequip the sword/gun/kinfe
  138. -- Trigger button to shoot the gun while holding it
  139. --[[--------------------------]]--
  140.  
  141.  
  142. local character = game.Players.LocalPlayer.Character
  143. local tools = {}
  144. if _G.toolHolding == true then
  145. for i, v in pairs(game.Players.LocalPlayer.Backpack:GetChildren()) do
  146. if v:IsA("Tool")
  147. then v.Parent = character
  148. table.insert(tools,v)
  149. end
  150. end
  151. wait()
  152. for i, v in pairs(tools) do
  153. v.Parent = game.Players.LocalPlayer.Backpack
  154. end
  155. end
  156.  
  157. --if _G.hatCLOVR == true then
  158. --_G.primaryWeapon = false
  159. --_G.secondaryWeapon = false
  160. --_G.dualWieldGuns = false
  161. --_G.dualWieldMelee = false
  162. --end
  163.  
  164. if _G.dualWieldGuns == true then
  165. if _G.secondaryWeapon == true then
  166. _G.secondaryWeapon = false
  167. end
  168. if _G.primaryWeapon == false then
  169. _G.primaryWeapon = true
  170. end
  171. end
  172.  
  173. if _G.dualWieldMelee == true then
  174. if _G.secondaryWeapon == false then
  175. _G.secondaryWeapon = true
  176. end
  177. if _G.primaryWeapon == true then
  178. _G.primaryWeapon = false
  179. end
  180. end
  181.  
  182. local player1 = game.Players.LocalPlayer
  183. local character1 = player1.Character
  184. local StarterGUI = game:GetService("StarterGui")
  185. --settings().Physics.AllowSleep = false
  186.  
  187. --Guns
  188. local snipers = {"Sniper", "Meshes/Sniper_rbxAccessory", "Meshes/SniperAccessory", "Meshes/cowsniperAccessory", "Meshes/RainbowSniperAccessory", "WavySniper", "Meshes/GiftsniperAccessory", "HalloweenSniperAccessory", "Blox Rifle 5000"}
  189. local automaticGuns = {"Type-49 Abomindation Back Accessory"}
  190. local pistols = {"Meshes/1911RightAccessory", "Meshes/恶魔枪Accessory", "Meshes/1911RightAccessory 1"}
  191.  
  192. --Melee Weapons
  193. local swords = {"Dark Matter Sword", "Russo's Sword", "MeshPartAccessory"}
  194. local knives = {"UMAD", "Red SS", "White SS"}
  195.  
  196. --Hats
  197. local hats = {}
  198. local originalHats = {"Robloxclassicred", "Hat1", "Pal Hair", "Kate Hair", "LavanderHair", "Pink Hair"}
  199.  
  200. --Loops
  201. local netlessLoop = nil
  202. local collisionLoop = nil
  203.  
  204. --Dual Guns
  205. local rightGun = nil
  206. local leftGun = nil
  207.  
  208. --Dual Melee
  209. local rightMelee = nil
  210. local leftMelee = nil
  211.  
  212.  
  213. --Checks to see if you have both dual wield settings on--
  214. if _G.dualWieldGuns == true and _G.dualWieldMelee == true then
  215. local errorSound = Instance.new("Sound")
  216. errorSound.SoundId = "rbxassetid://3041205264"
  217. errorSound.PlaybackSpeed = 1
  218. errorSound.Looped = false
  219. errorSound.RollOffMaxDistance = 1000
  220. errorSound.RollOffMinDistance = 0
  221. errorSound.Volume = 1
  222. errorSound.Parent = game.Workspace
  223. errorSound.Name = "Error"
  224. errorSound:Play()
  225.  
  226. StarterGUI:SetCore("SendNotification",
  227. {
  228. Title = "Turn One To False",
  229. Text = "You can't have both dual wield settings to true. Turn one of them to false."
  230. }
  231. )
  232.  
  233. wait(1.4)
  234. errorSound:Destroy()
  235. error("You can't have both dual wield settings to true")
  236. end
  237. ---------------------------------------------------------
  238.  
  239. --Checks to see if you have one of the swords--
  240. local meleeWeaponFound = false
  241.  
  242. if _G.dualWieldMelee == false then
  243. for i,v in pairs(character1:GetChildren()) do
  244. if v:IsA("Accessory") then
  245. if table.find(swords, v.Name) or table.find(knives, v.Name) then
  246. if character1.Humanoid.RigType == Enum.HumanoidRigType.R6 then
  247. local specialMesh = v.Handle:FindFirstChildWhichIsA("SpecialMesh")
  248. if v.Name == "MeshPartAccessory" then
  249. if specialMesh.MeshId == "rbxassetid://4315410540" or specialMesh.MeshId == "rbxassetid://4315410540" or specialMesh.MeshId == "rbxassetid://4315410540" or specialMesh.MeshId == "rbxassetid://4315410540" then
  250. meleeWeaponFound = true
  251. break
  252. end
  253. else
  254. meleeWeaponFound = true
  255. break
  256. end
  257. else
  258. local meshId = v.Handle.MeshId
  259. if v.Name == "MeshPartAccessory" then
  260. if meshId == "rbxassetid://4315410540" or meshId == "rbxassetid://4315410540" or meshId == "rbxassetid://4315410540" or meshId == "rbxassetid://4315410540" then
  261. meleeWeaponFound = true
  262. break
  263. end
  264. else
  265. meleeWeaponFound = true
  266. break
  267. end
  268. end
  269. end
  270. end
  271. end
  272. else
  273. for i,v in pairs(character1:GetChildren()) do
  274. if v:IsA("Accessory") then
  275. if table.find(swords, v.Name) or table.find(knives, v.Name) then
  276. if character1.Humanoid.RigType == Enum.HumanoidRigType.R6 then
  277. local specialMesh = v.Handle:FindFirstChildWhichIsA("SpecialMesh")
  278. if v.Name == "MeshPartAccessory" then
  279. if specialMesh.MeshId == "rbxassetid://4315410540" or specialMesh.MeshId == "rbxassetid://4315410540" or specialMesh.MeshId == "rbxassetid://4315410540" or specialMesh.MeshId == "rbxassetid://4315410540" then
  280. if _G.leftHand == false then
  281. rightMelee = v
  282. else
  283. leftMelee = v
  284. end
  285. break
  286. end
  287. else
  288. if _G.leftHand == false then
  289. rightMelee = v
  290. else
  291. leftMelee = v
  292. end
  293. break
  294. end
  295. else
  296. local meshId = v.Handle.MeshId
  297. if v.Name == "MeshPartAccessory" then
  298. if meshId == "rbxassetid://4315410540" or meshId == "rbxassetid://4315410540" or meshId == "rbxassetid://4315410540" or meshId == "rbxassetid://4315410540" then
  299. if _G.leftHand == false then
  300. rightMelee = v
  301. else
  302. leftMelee = v
  303. end
  304. break
  305. end
  306. else
  307. if _G.leftHand == false then
  308. rightMelee = v
  309. else
  310. leftMelee = v
  311. end
  312. break
  313. end
  314. end
  315. end
  316. end
  317. end
  318.  
  319. for i,v in pairs(character1:GetChildren()) do
  320. if v:IsA("Accessory") then
  321. if (table.find(swords, v.Name) or table.find(knives, v.Name)) and v ~= rightMelee then
  322. if character1.Humanoid.RigType == Enum.HumanoidRigType.R6 then
  323. local specialMesh = v.Handle:FindFirstChildWhichIsA("SpecialMesh")
  324. if v.Name == "MeshPartAccessory" then
  325. if specialMesh.MeshId == "rbxassetid://4315410540" or specialMesh.MeshId == "rbxassetid://4315410540" or specialMesh.MeshId == "rbxassetid://4315410540" or specialMesh.MeshId == "rbxassetid://4315410540" then
  326. if _G.leftHand == false then
  327. leftMelee = v
  328. else
  329. rightMelee = v
  330. end
  331. break
  332. end
  333. else
  334. if _G.leftHand == false then
  335. leftMelee = v
  336. else
  337. rightMelee = v
  338. end
  339. break
  340. end
  341. else
  342. local meshId = v.Handle.MeshId
  343. if v.Name == "MeshPartAccessory" then
  344. if meshId == "rbxassetid://4315410540" or meshId == "rbxassetid://4315410540" or meshId == "rbxassetid://4315410540" or meshId == "rbxassetid://4315410540" then
  345. if _G.leftHand == false then
  346. leftMelee = v
  347. else
  348. rightMelee = v
  349. end
  350. break
  351. end
  352. else
  353. if _G.leftHand == false then
  354. leftMelee = v
  355. else
  356. rightMelee = v
  357. end
  358. break
  359. end
  360. end
  361. end
  362. end
  363. end
  364. if rightMelee ~= nil and leftMelee ~= nil then
  365. meleeWeaponFound = true
  366. end
  367. end
  368.  
  369. if _G.secondaryWeapon == true and meleeWeaponFound == false then
  370. local errorSound = Instance.new("Sound")
  371. errorSound.SoundId = "rbxassetid://3041205264"
  372. errorSound.PlaybackSpeed = 1
  373. errorSound.Looped = false
  374. errorSound.RollOffMaxDistance = 1000
  375. errorSound.RollOffMinDistance = 0
  376. errorSound.Volume = 1
  377. errorSound.Parent = game.Workspace
  378. errorSound.Name = "Error"
  379. errorSound:Play()
  380.  
  381. StarterGUI:SetCore("SendNotification",
  382. {
  383. Title = "Sword Needed",
  384. Text = "You need one of the supported swords to use this script."
  385. }
  386. )
  387. wait(0.5)
  388. StarterGUI:SetCore("SendNotification",
  389. {
  390. Title = "Other Option",
  391. Text = [[Or, make "secondaryWeapon" false in the settings.]]
  392. }
  393. )
  394.  
  395. wait(0.9)
  396. errorSound:Destroy()
  397. error("You don't have a sword")
  398. end
  399. -----------------------------------------------
  400.  
  401. --Checks to see if you have one of the guns--
  402. local rangedWeaponFound = false
  403.  
  404. if _G.dualWieldGuns == false then
  405. for i,v in pairs(character1:GetChildren()) do
  406. if v:IsA("Accessory") then
  407. if table.find(snipers, v.Name) or table.find(automaticGuns, v.Name) or table.find(pistols, v.Name) then
  408. rangedWeaponFound = true
  409. break
  410. end
  411. end
  412. end
  413. else
  414. for i,v in pairs(character1:GetChildren()) do
  415. if v:IsA("Accessory") then
  416. if table.find(snipers, v.Name) or table.find(automaticGuns, v.Name) or table.find(pistols, v.Name) then
  417. if v.Name == "Meshes/1911RightAccessory" then
  418. v.Name = v.Name.." 1"
  419. end
  420. if _G.leftHand == false then
  421. rightGun = v
  422. else
  423. leftGun = v
  424. end
  425. break
  426. end
  427. end
  428. end
  429.  
  430. for i,v in pairs(character1:GetChildren()) do
  431. if v:IsA("Accessory") then
  432. if (table.find(snipers, v.Name) or table.find(automaticGuns, v.Name) or table.find(pistols, v.Name)) and v.Name ~= rightGun.Name then
  433. if _G.leftHand == false then
  434. leftGun = v
  435. else
  436. rightGun = v
  437. end
  438. rangedWeaponFound = true
  439. break
  440. end
  441. end
  442. end
  443. end
  444.  
  445. if rangedWeaponFound == false and _G.primaryWeapon == true then
  446. local errorSound = Instance.new("Sound")
  447. errorSound.SoundId = "rbxassetid://3041205264"
  448. errorSound.PlaybackSpeed = 1
  449. errorSound.Looped = false
  450. errorSound.RollOffMaxDistance = 1000
  451. errorSound.RollOffMinDistance = 0
  452. errorSound.Volume = 1
  453. errorSound.Parent = game.Workspace
  454. errorSound.Name = "Error"
  455. errorSound:Play()
  456.  
  457. StarterGUI:SetCore("SendNotification",
  458. {
  459. Title = "Gun Needed",
  460. Text = "You need one of the supported guns to use this script."
  461. }
  462. )
  463. wait(0.5)
  464. StarterGUI:SetCore("SendNotification",
  465. {
  466. Title = "Other Option",
  467. Text = [[Or make "primaryWeapon" false in the settings.]]
  468. }
  469. )
  470.  
  471. wait(0.9)
  472. errorSound:Destroy()
  473. error("You don't have a gun")
  474. end
  475. ---------------------------------------------
  476.  
  477. --Checks to see if you have the hats required for Hat CLOVR or if you're R6--
  478. if _G.hatCLOVR == true then
  479. local allHatsFound = false
  480.  
  481. for i,v in pairs(character1:GetChildren()) do
  482. if v:IsA("Accessory") then
  483. if v.Name == "Robloxclassicred" or v.Name == "Hat1" or v.Name == "Pal Hair" or v.Name == "Kate Hair" or v.Name == "LavanderHair" or v.Name == "Pink Hair" then
  484. table.insert(hats, v.Name)
  485. end
  486. end
  487. end
  488.  
  489. if table.getn(hats) == 6 then
  490. allHatsFound = true
  491. else
  492. local errorSound = Instance.new("Sound")
  493. errorSound.SoundId = "rbxassetid://3041205264"
  494. errorSound.PlaybackSpeed = 1
  495. errorSound.Looped = false
  496. errorSound.RollOffMaxDistance = 1000
  497. errorSound.RollOffMinDistance = 0
  498. errorSound.Volume = 1
  499. errorSound.Parent = game.Workspace
  500. errorSound.Name = "Error"
  501. errorSound:Play()
  502.  
  503. StarterGUI:SetCore("SendNotification",
  504. {
  505. Title = "Hats Needed",
  506. Text = "You don't have all the required hats to use Hat CLOVR."
  507. }
  508. )
  509.  
  510. wait(1.4)
  511. errorSound:Destroy()
  512. error("You don't have all the required hats for Hat CLOVR")
  513. end
  514.  
  515. if character1.Humanoid.RigType == Enum.HumanoidRigType.R15 then
  516. local errorSound = Instance.new("Sound")
  517. errorSound.SoundId = "rbxassetid://3041205264"
  518. errorSound.PlaybackSpeed = 1
  519. errorSound.Looped = false
  520. errorSound.RollOffMaxDistance = 1000
  521. errorSound.RollOffMinDistance = 0
  522. errorSound.Volume = 1
  523. errorSound.Parent = game.Workspace
  524. errorSound.Name = "Error"
  525. errorSound:Play()
  526.  
  527. StarterGUI:SetCore("SendNotification",
  528. {
  529. Title = "Need To Be R6",
  530. Text = "Hat CLOVR can't work in R15. Either turn off the setting or go into R6."
  531. }
  532. )
  533.  
  534. wait(1.4)
  535. errorSound:Destroy()
  536. error("Hat CLOVR can't work in R15")
  537. end
  538. end
  539.  
  540. -----------------------------------------------------------------------------
  541.  
  542. if _G.primaryWeapon == false and _G.secondaryWeapon == false then
  543. _G.flinging = false
  544. end
  545.  
  546. if _G.primaryWeapon == false then
  547. _G.leftHand = not _G.leftHand
  548. end
  549.  
  550. --Fake Character--
  551. --Create Attachment Function
  552. local function CreateAttachment(parent, position, orientation, axis, secondaryAxis, name)
  553. local newAttchment = Instance.new("Attachment", parent)
  554. newAttchment.Position = position
  555. newAttchment.Orientation = orientation
  556. newAttchment.Axis = axis
  557. newAttchment.SecondaryAxis = secondaryAxis
  558. newAttchment.Name = name
  559. end
  560.  
  561. --Variables
  562. local player1 = game:GetService("Players").LocalPlayer
  563. local character1 = player1.Character
  564. local hrp = character1.HumanoidRootPart
  565. --local torso = character.Torso
  566.  
  567. local camera = workspace.CurrentCamera
  568.  
  569. local reanimFolder = Instance.new("Folder", character1)
  570. reanimFolder.Name = "FakeCharacter"
  571.  
  572. local model = Instance.new("Model", reanimFolder)
  573. model.Name = "Reanimation"
  574.  
  575. local userInputService = game:GetService("UserInputService")
  576. local movingW, movingA, movingS, movingD, jumping = false
  577.  
  578. --Body Parts--
  579. --Head
  580. local cHead = Instance.new("Part", model)
  581. cHead.Size = Vector3.new(2, 1, 1)
  582. cHead.Name = "Head"
  583.  
  584. --Torso
  585. local cTorso = Instance.new("Part", model)
  586. cTorso.Size = Vector3.new(2, 2, 1)
  587. cTorso.Name = "Torso"
  588.  
  589. --Left Arm
  590. local cLArm = Instance.new("Part", model)
  591. cLArm.Size = Vector3.new(1, 2, 1)
  592. cLArm.Name = "Left Arm"
  593.  
  594. --Right Arm
  595. local cRArm = Instance.new("Part", model)
  596. cRArm.Size = Vector3.new(1, 2, 1)
  597. cRArm.Name = "Right Arm"
  598.  
  599. --Left Leg
  600. local cLLeg = Instance.new("Part", model)
  601. cLLeg.Size = Vector3.new(1, 2, 1)
  602. cLLeg.Name = "Left Leg"
  603.  
  604. --Right Leg
  605. local cRLeg = Instance.new("Part", model)
  606. cRLeg.Size = Vector3.new(1, 2, 1)
  607. cRLeg.Name = "Right Leg"
  608.  
  609. --HumanoidRootPart
  610. local cHRP = Instance.new("Part", model)
  611. cHRP.Size = Vector3.new(2, 2, 1)
  612. cHRP.Name = "HumanoidRootPart"
  613. cHRP.Transparency = 1
  614. cHRP.CanCollide = false
  615.  
  616. --Transparency
  617. for i,v in pairs(model:GetChildren()) do
  618. if v:IsA("Part") and v.Name ~= "HumanoidRootPart" then
  619. v.Transparency = 1
  620. end
  621. end
  622.  
  623. --Joints--
  624. --Right Shoulder
  625. local rShoulder = Instance.new("Motor6D", cTorso)
  626. rShoulder.Part0 = cTorso
  627. rShoulder.Part1 = cRArm
  628. rShoulder.Name = "Right Shoulder"
  629. rShoulder.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  630. rShoulder.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  631.  
  632. --Left Shoulder
  633. local lShoulder = Instance.new("Motor6D", cTorso)
  634. lShoulder.Part0 = cTorso
  635. lShoulder.Part1 = cLArm
  636. lShoulder.Name = "Left Shoulder"
  637. lShoulder.C0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  638. lShoulder.C1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  639.  
  640. --Right Hip
  641. local rHip = Instance.new("Motor6D", cTorso)
  642. rHip.Part0 = cTorso
  643. rHip.Part1 = cRLeg
  644. rHip.Name = "Right Hip"
  645. rHip.C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  646. rHip.C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  647.  
  648. --Left Hip
  649. local lHip = Instance.new("Motor6D", cTorso)
  650. lHip.Part0 = cTorso
  651. lHip.Part1 = cLLeg
  652. lHip.Name = "Left Hip"
  653. lHip.C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  654. lHip.C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  655.  
  656. --Neck
  657. local neck = Instance.new("Motor6D", cTorso)
  658. neck.Part0 = cTorso
  659. neck.Part1 = cHead
  660. neck.Name = "Neck"
  661. neck.C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  662. neck.C1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  663.  
  664. --RootJoint
  665. local rootJoint = Instance.new("Motor6D", cHRP)
  666. rootJoint.Part0 = cHRP
  667. rootJoint.Part1 = cTorso
  668. rootJoint.Name = "RootJoint"
  669. rootJoint.C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  670. rootJoint.C1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  671.  
  672. --Humanoid--
  673. local cHumanoid = Instance.new("Humanoid", model)
  674. cHumanoid.DisplayDistanceType = "None"
  675.  
  676. --Head Mesh--
  677. local headMesh = Instance.new("SpecialMesh", cHead)
  678. headMesh.Scale = Vector3.new(1.25, 1.25, 1.25)
  679.  
  680. --Attachments
  681. --for i,v in pairs(character1:GetDescendants()) do
  682. --if v:IsA("Attachment") then
  683. --print([[CreateAttachment(]]..v.Parent.Name..[[, Vector3.new(]]..v.Position.X..","..v.Position.Y..","..v.Position.Z..[[), Vector3.new(]]..v.Orientation.X..","..v.Orientation.Y..","..v.Orientation.Z..[[), Vector3.new(]]..v.Axis.X..","..v.Axis.Y..","..v.Axis.Z..[[), Vector3.new(]]..v.SecondaryAxis.X..","..v.SecondaryAxis.Y..","..v.SecondaryAxis.Z..[[), "]]..v.Name..[[")]])
  684. --game.Players:Chat([[CreateAttachment(]]..v.Parent.Name..[[, Vector3.new(]]..v.Position.X..","..v.Position.Y..","..v.Position.Z..[[), Vector3.new(]]..v.Orientation.X..","..v.Orientation.Y..","..v.Orientation.Z..[[), Vector3.new(]]..v.Axis.X..","..v.Axis.Y..","..v.Axis.Z..[[), Vector3.new(]]..v.SecondaryAxis.X..","..v.SecondaryAxis.Y..","..v.SecondaryAxis.Z..[[), "]]..v.Name..[[")]])
  685. --end
  686. --end
  687.  
  688. --CreateAttachment(cHead, CFrame.new(0, 0.600000024, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), Vector3.new(1, 0, 0), Vector3.new(0, 1, 0), "HairAttachment")
  689. --CreateAttachment(cHead, CFrame.new(0, 0.600000024, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), Vector3.new(1, 0, 0), Vector3.new(0, 1, 0), "")
  690.  
  691. local reanimation = model
  692. reanimation.Humanoid.BreakJointsOnDeath = false
  693.  
  694. --Creating Attachments
  695. CreateAttachment(cHead, Vector3.new(0,0.60000002384186,0), Vector3.new(-0,0,0), Vector3.new(1,0,0), Vector3.new(0,1,0), "HairAttachment")
  696. CreateAttachment(cHead, Vector3.new(0,0.60000002384186,0), Vector3.new(-0,0,0), Vector3.new(1,0,0), Vector3.new(0,1,0), "HatAttachment")
  697. CreateAttachment(cHead, Vector3.new(0,0,-0.60000002384186), Vector3.new(-0,0,0), Vector3.new(1,0,0), Vector3.new(0,1,0), "FaceFrontAttachment")
  698. CreateAttachment(cHead, Vector3.new(0,0,0), Vector3.new(-0,0,0), Vector3.new(1,0,0), Vector3.new(0,1,0), "FaceCenterAttachment")
  699. CreateAttachment(cTorso, Vector3.new(0,1,0), Vector3.new(-0,0,0), Vector3.new(1,0,0), Vector3.new(0,1,0), "NeckAttachment")
  700. CreateAttachment(cTorso, Vector3.new(0,0,-0.5), Vector3.new(-0,0,0), Vector3.new(1,0,0), Vector3.new(0,1,0), "BodyFrontAttachment")
  701. CreateAttachment(cTorso, Vector3.new(0,0,0.5), Vector3.new(-0,0,0), Vector3.new(1,0,0), Vector3.new(0,1,0), "BodyBackAttachment")
  702. CreateAttachment(cTorso, Vector3.new(-1,1,0), Vector3.new(-0,0,0), Vector3.new(1,0,0), Vector3.new(0,1,0), "LeftCollarAttachment")
  703. CreateAttachment(cTorso, Vector3.new(1,1,0), Vector3.new(-0,0,0), Vector3.new(1,0,0), Vector3.new(0,1,0), "RightCollarAttachment")
  704. CreateAttachment(cTorso, Vector3.new(0,-1,-0.5), Vector3.new(-0,0,0), Vector3.new(1,0,0), Vector3.new(0,1,0), "WaistFrontAttachment")
  705. CreateAttachment(cTorso, Vector3.new(0,-1,0), Vector3.new(-0,0,0), Vector3.new(1,0,0), Vector3.new(0,1,0), "WaistCenterAttachment")
  706. CreateAttachment(cTorso, Vector3.new(0,-1,0.5), Vector3.new(-0,0,0), Vector3.new(1,0,0), Vector3.new(0,1,0), "WaistBackAttachment")
  707. CreateAttachment(cLArm, Vector3.new(0,1,0), Vector3.new(-0,0,0), Vector3.new(1,0,0), Vector3.new(0,1,0), "LeftShoulderAttachment")
  708. CreateAttachment(cLArm, Vector3.new(0,-1,0), Vector3.new(-0,0,0), Vector3.new(1,0,0), Vector3.new(0,1,0), "LeftGripAttachment")
  709. CreateAttachment(cRArm, Vector3.new(0,1,0), Vector3.new(-0,0,0), Vector3.new(1,0,0), Vector3.new(0,1,0), "RightShoulderAttachment")
  710. CreateAttachment(cRArm, Vector3.new(0,-1,0), Vector3.new(-0,0,0), Vector3.new(1,0,0), Vector3.new(0,1,0), "RightGripAttachment")
  711. CreateAttachment(cLLeg, Vector3.new(0,-1,0), Vector3.new(-0,0,0), Vector3.new(1,0,0), Vector3.new(0,1,0), "LeftFootAttachment")
  712. CreateAttachment(cRLeg, Vector3.new(0,-1,0), Vector3.new(-0,0,0), Vector3.new(1,0,0), Vector3.new(0,1,0), "RightFootAttachment")
  713. CreateAttachment(cHRP, Vector3.new(0,0,0), Vector3.new(-0,0,0), Vector3.new(1,0,0), Vector3.new(0,1,0), "RootAttachment")
  714.  
  715. --Cloning Hats (For Netless)
  716. local function cloningHats(v)
  717. local clone = v:Clone()
  718. local weld = v.Handle:FindFirstChildWhichIsA("Weld")
  719. local weldPart1 = weld.Part1
  720. local newWeld = Instance.new("Weld", clone.Handle)
  721. local CFrame0 = v.Handle.AccessoryWeld.C0
  722. local CFrame1 = v.Handle.AccessoryWeld.C1
  723.  
  724. clone.Handle:FindFirstChild("AccessoryWeld"):Destroy()
  725. clone.Parent = reanimation
  726. newWeld.Name = "AccessoryWeld"
  727. newWeld.C0 = CFrame0
  728. newWeld.C1 = CFrame1
  729. newWeld.Part0 = clone.Handle
  730. newWeld.Part1 = character1:FindFirstChild(weldPart1.Name)
  731. clone.Handle.Transparency = 1
  732. end
  733.  
  734. for i,v in pairs(character1:GetChildren()) do
  735. if v:IsA("Accessory") then
  736. if _G.hatCLOVR == false then
  737. cloningHats(v)
  738. elseif not table.find(hats, v.Name) then
  739. cloningHats(v)
  740. end
  741. end
  742. end
  743.  
  744. cHRP.CFrame = hrp.CFrame
  745. ----------------------------------------
  746.  
  747. --Deleting all LocalScripts in your character
  748. for i,v in pairs(character1:GetChildren()) do
  749. if v:IsA("LocalScript") then
  750. v:Destroy()
  751. end
  752. end
  753.  
  754. --Making The Flinger
  755. local flingVelocity = Vector3.new(10000, 10000, 10000)
  756. local flingPart = nil
  757. local flinger = Instance.new("BodyAngularVelocity")
  758. if _G.hatCLOVR == false then
  759. flinger.Parent = character1.HumanoidRootPart
  760. flingPart = character1.HumanoidRootPart
  761. else
  762. flinger.Parent = character1["Left Leg"]
  763. flingPart = character1["Left Leg"]
  764. end
  765. if _G.flinging == true then
  766. flinger.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
  767. else
  768. flinger.MaxTorque = Vector3.new(0, 0, 0)
  769. end
  770. flinger.P = 1000000000000000000000000000
  771. flinger.AngularVelocity = Vector3.new(0, 0, 0)
  772.  
  773. local gun = nil
  774. local gun2 = nil
  775. local gunPositionsReady = false
  776. local sword = nil
  777. local sword2 = nil
  778. local swordPositionsReady = false
  779. local rArm1 = reanimation["Right Arm"]
  780. local lArm1 = reanimation["Left Arm"]
  781. local rGrip1 = rArm1.RightGripAttachment
  782. local lGrip1 = lArm1.LeftGripAttachment
  783. --local hrp = character1.HumanoidRootPart
  784. local mouse = player1:GetMouse()
  785. local touchedFunction = nil
  786.  
  787. --Holstered Values
  788. local gHolstPos = nil
  789. local gHolstRot = nil
  790. local sHolstPos = nil
  791. local sHolstRot = nil
  792.  
  793. --Holding Values
  794. local gHoldPos = nil
  795. local gHoldRot = nil
  796. local sHoldPos = nil
  797. local sHoldRot = nil
  798.  
  799. --Holstered Values 2
  800. local gHolstPos2 = nil
  801. local gHolstRot2 = nil
  802. local sHolstPos2 = nil
  803. local sHolstRot2 = nil
  804.  
  805. --Holding Values 2
  806. local gHoldPos2 = nil
  807. local gHoldRot2 = nil
  808. local sHoldPos2 = nil
  809. local sHoldRot2 = nil
  810.  
  811. --local flinging = false
  812. local shooting = false
  813. local shooting2 = false
  814. local holdingGun = false
  815. local holdingSword = false
  816. local holdingSword2 = false
  817. local scriptLoaded = false
  818. local holdingGun2 = false
  819.  
  820. --Default Camera Stuff
  821. local maxZoom = player1.CameraMaxZoomDistance
  822. local minZoom = player1.CameraMinZoomDistance
  823. local cameraMode = player1.CameraMode
  824.  
  825. --Services
  826. local userInputService = game:GetService("UserInputService")
  827. local vrService = game:GetService("VRService")
  828. local debris = game:GetService("Debris")
  829.  
  830. if _G.primaryWeapon == true then
  831. if reanimation:FindFirstChild("Meshes/Sniper_rbxAccessory") then --Multiple Snipers
  832. game.Players.LocalPlayer.Character["Meshes/Sniper_rbxAccessory"].Name = "Sniper"
  833. reanimation["Meshes/Sniper_rbxAccessory"].Name = "Sniper"
  834. elseif reanimation:FindFirstChild("Meshes/cowsniperAccessory") then --Pink Cow Cyberpunk Sniper
  835. game.Players.LocalPlayer.Character["Meshes/cowsniperAccessory"].Name = "Meshes/SniperAccessory"
  836. reanimation["Meshes/cowsniperAccessory"].Name = "Meshes/SniperAccessory"
  837. elseif reanimation:FindFirstChild("WavySniper") then --Wavy Cyberpunk Sniper
  838. game.Players.LocalPlayer.Character.WavySniper.Name = "Meshes/RainbowSniperAccessory"
  839. reanimation.WavySniper.Name = "Meshes/RainbowSniperAccessory"
  840. end
  841. end
  842.  
  843. if _G.dualWieldGuns == true then
  844. if rightGun.Name == "Meshes/Sniper_rbxAccessory" then --Multiple Snipers
  845. game.Players.LocalPlayer.Character["Meshes/Sniper_rbxAccessory"].Name = "Sniper"
  846. reanimation["Meshes/Sniper_rbxAccessory"].Name = "Sniper"
  847. elseif rightGun.Name == "Meshes/cowsniperAccessory" then --Pink Cow Cyberpunk Sniper
  848. game.Players.LocalPlayer.Character["Meshes/cowsniperAccessory"].Name = "Meshes/SniperAccessory"
  849. reanimation["Meshes/cowsniperAccessory"].Name = "Meshes/SniperAccessory"
  850. elseif rightGun.Name == "WavySniper" then --Wavy Cyberpunk Sniper
  851. game.Players.LocalPlayer.Character.WavySniper.Name = "Meshes/RainbowSniperAccessory"
  852. reanimation.WavySniper.Name = "Meshes/RainbowSniperAccessory"
  853. end
  854.  
  855. if leftGun.Name == "Meshes/Sniper_rbxAccessory" then --Multiple Snipers
  856. game.Players.LocalPlayer.Character["Meshes/Sniper_rbxAccessory"].Name = "Sniper"
  857. reanimation["Meshes/Sniper_rbxAccessory"].Name = "Sniper"
  858. elseif leftGun.Name == "Meshes/cowsniperAccessory" then --Pink Cow Cyberpunk Sniper
  859. game.Players.LocalPlayer.Character["Meshes/cowsniperAccessory"].Name = "Meshes/SniperAccessory"
  860. reanimation["Meshes/cowsniperAccessory"].Name = "Meshes/SniperAccessory"
  861. elseif leftGun.Name == "WavySniper" then --Wavy Cyberpunk Sniper
  862. game.Players.LocalPlayer.Character.WavySniper.Name = "Meshes/RainbowSniperAccessory"
  863. reanimation.WavySniper.Name = "Meshes/RainbowSniperAccessory"
  864. end
  865. end
  866.  
  867. --Swords
  868. if _G.secondaryWeapon == true then
  869. if reanimation:FindFirstChild("Dark Matter Sword") then
  870. sword = reanimation["Dark Matter Sword"].Handle
  871. elseif reanimation:FindFirstChild("Russo's Sword") then
  872. sword = reanimation["Russo's Sword"].Handle
  873. elseif reanimation:FindFirstChild("MeshPartAccessory") then
  874. local specialMesh = reanimation:FindFirstChild("MeshPartAccessory").Handle:FindFirstChildWhichIsA("SpecialMesh")
  875. if (specialMesh.MeshId == "rbxassetid://4315410540" or specialMesh.MeshId == "rbxassetid://4315410540" or specialMesh.MeshId == "rbxassetid://4315410540" or specialMesh.MeshId == "rbxassetid://4315410540") then
  876. sword = reanimation.MeshPartAccessory.Handle
  877. end
  878. elseif reanimation:FindFirstChild("UMAD") then --Knifes
  879. sword = reanimation.UMAD.Handle
  880. elseif reanimation:FindFirstChild("Red SS") then
  881. sword = reanimation["Red SS"].Handle
  882. elseif reanimation:FindFirstChild("White SS") then
  883. sword = reanimation["White SS"].Handle
  884. end
  885. end
  886.  
  887. if _G.dualWieldGuns == false and _G.dualWieldMelee == false then
  888. if _G.primaryWeapon == true then
  889. --Snipers
  890. if reanimation:FindFirstChild("Sniper") then
  891. gun = reanimation.Sniper.Handle
  892. elseif reanimation:FindFirstChild("Meshes/SniperAccessory") then
  893. gun = reanimation["Meshes/SniperAccessory"].Handle
  894. elseif reanimation:FindFirstChild("Meshes/RainbowSniperAccessory") then
  895. gun = reanimation["Meshes/RainbowSniperAccessory"].Handle
  896. elseif reanimation:FindFirstChild("Meshes/GiftsniperAccessory") then
  897. gun = reanimation["Meshes/GiftsniperAccessory"].Handle
  898. elseif reanimation:FindFirstChild("HalloweenSniperAccessory") then
  899. gun = reanimation.HalloweenSniperAccessory.Handle
  900. elseif reanimation:FindFirstChild("Blox Rifle 5000") then
  901. gun = reanimation["Blox Rifle 5000"].Handle
  902. elseif reanimation:FindFirstChild("Type-49 Abomindation Back Accessory") then
  903. --Other Guns
  904. --Automatic
  905. gun = reanimation["Type-49 Abomindation Back Accessory"].Handle
  906. elseif reanimation:FindFirstChild("Meshes/1911RightAccessory") then
  907. --Pistols
  908. gun = reanimation["Meshes/1911RightAccessory"].Handle
  909. elseif reanimation:FindFirstChild("Meshes/恶魔枪Accessory") then
  910. gun = reanimation["Meshes/恶魔枪Accessory"].Handle
  911. end
  912. end
  913. else
  914. if _G.dualWieldGuns == true then
  915. gun = reanimation:FindFirstChild(rightGun.Name).Handle
  916. gun2 = reanimation:FindFirstChild(leftGun.Name).Handle
  917. elseif _G.dualWieldMelee == true then
  918. sword = reanimation:FindFirstChild(rightMelee.Name).Handle
  919. sword2 = reanimation:FindFirstChild(leftMelee.Name).Handle
  920. end
  921. end
  922.  
  923. --The Part That Will Determine Where The Bullet Is Shot From--
  924. local vrAimer = nil
  925. local vrAimer2 = nil
  926.  
  927. local function VRAimerPlacement(SIZE, POSITION, ORIENTATION, gun)
  928. --Aimer
  929. local part = Instance.new("Part")
  930. part.Parent = game.Workspace
  931. part.CanCollide = false
  932. part.Anchored = false
  933. part.Massless = true
  934. part.Size = SIZE
  935. part.Transparency = 1
  936. part.Orientation = gun.Orientation
  937. if vrAimer == nil then
  938. part.Name = "VRAimer"
  939. else
  940. part.Name = "VRAimer2"
  941. end
  942.  
  943. local VRAimer = part
  944.  
  945. --Aim Weld
  946. local weld = Instance.new("Weld")
  947. weld.Parent = VRAimer
  948. weld.Part0 = VRAimer
  949. weld.Part1 = gun
  950.  
  951. local savePos = gun.Position
  952. local saveRot = gun.Orientation
  953.  
  954. --Gun Pos and Rot
  955. gun.Position = Vector3.new(0, 0, 0)
  956. gun.Orientation = Vector3.new (0, 0, 0)
  957.  
  958. --Aimer Pos and Rot
  959. VRAimer.Position = POSITION
  960. VRAimer.Orientation = ORIENTATION
  961.  
  962. --Gun Pos and Rot
  963. gun.Position = savePos
  964. gun.Orientation = saveRot
  965.  
  966. VRAimer.CanTouch = false
  967.  
  968. if vrAimer == nil then
  969. vrAimer = VRAimer
  970. else
  971. vrAimer2 = VRAimer
  972. end
  973. end
  974.  
  975. local function findingGunForVRAimer(gun)
  976. if gun.Parent.Name == "Sniper" then
  977. VRAimerPlacement(Vector3.new(0.25, 0.25, 0.25), Vector3.new(3.205, 0.15, 0), Vector3.new(0, -90, 0), gun)
  978. elseif gun.Parent.Name == "Meshes/SniperAccessory" then
  979. VRAimerPlacement(Vector3.new(0.25, 0.25, 0.25), Vector3.new(-1.9025, 2.6, 0), Vector3.new(51, 90, 0), gun)
  980. elseif gun.Parent.Name == "Meshes/RainbowSniperAccessory" then
  981. VRAimerPlacement(Vector3.new(0.25, 0.25, 0.25), Vector3.new(-2.125, 2.46, 0.0675), Vector3.new(51, 90, 0), gun)
  982. elseif gun.Parent.Name == "Meshes/GiftsniperAccessory" then
  983. VRAimerPlacement(Vector3.new(0.25, 0.25, 0.25), Vector3.new(2.063, 2.185, 0.918), Vector3.new(45.15, -107, -89), gun)
  984. elseif gun.Parent.Name == "HalloweenSniperAccessory" then
  985. VRAimerPlacement(Vector3.new(0.25, 0.25, 0.25), Vector3.new(2.188, 2.3475, 0.005), Vector3.new(45, -90, 0), gun)
  986. elseif gun.Parent.Name == "Type-49 Abomindation Back Accessory" then
  987. VRAimerPlacement(Vector3.new(0.25, 0.25, 0.25), Vector3.new(-1.6, -1.75, -0.288), Vector3.new(-50, 90, 90), gun)
  988.  
  989. --Laser
  990. local laser = Instance.new("Part")
  991. laser.Parent = game.Workspace
  992. laser.CanCollide = false
  993. laser.Anchored = false
  994. laser.Massless = true
  995. laser.Size = Vector3.new(10, 0.1, 0.1)
  996. laser.Transparency = 0
  997. laser.Material = "Neon"
  998. laser.BrickColor = BrickColor.new("Really red")
  999. laser.Shape = "Cylinder"
  1000. laser.Name = "VRLaser"
  1001.  
  1002. --Laser Weld
  1003. local lWeld = Instance.new("Weld")
  1004. lWeld.Parent = laser
  1005. lWeld.Part0 = laser
  1006. lWeld.Part1 = gun
  1007.  
  1008. local savePos = gun.Position
  1009. local saveRot = gun.Orientation
  1010.  
  1011. --Gun Pos and Rot
  1012. gun.Position = Vector3.new(0, 0, 0)
  1013. gun.Orientation = Vector3.new (0, 0, 0)
  1014.  
  1015. --Laser Pos and Rot
  1016. laser.Position = gun.Position + Vector3.new(-4.585, -5.255, -0.286)
  1017. laser.Orientation = gun.Orientation + Vector3.new(0, 0, 48)
  1018.  
  1019. --Gun Pos and Rot
  1020. gun.Position = savePos
  1021. gun.Orientation = saveRot
  1022. elseif gun.Parent.Name == "Blox Rifle 5000" then
  1023. VRAimerPlacement(Vector3.new(0.25, 0.25, 0.25), Vector3.new(0, 2.163, -2.017), Vector3.new(45, 0, 0), gun)
  1024. elseif gun.Parent.Name == "Meshes/1911RightAccessory" or gun.Parent.Name == "Meshes/1911RightAccessory 1" then
  1025. if gun:FindFirstChild("SpecialMesh").MeshId == "rbxassetid://6995200499" then
  1026. VRAimerPlacement(Vector3.new(0.25, 0.25, 0.25), Vector3.new(0, -0.75, 0.3), Vector3.new(-90, 0, 0), gun)
  1027. elseif gun:FindFirstChildWhichIsA("SpecialMesh").MeshId == "rbxassetid://6995561576" then
  1028. VRAimerPlacement(Vector3.new(0.25, 0.25, 0.25), Vector3.new(-0.3, -0.75, 0), Vector3.new(-90, 0, 0), gun)
  1029. end
  1030. elseif gun.Parent.Name == "Meshes/恶魔枪Accessory" then
  1031. VRAimerPlacement(Vector3.new(0.25, 0.25, 0.25), Vector3.new(0, -0.125, 0.8), Vector3.new(-21, 180, 180), gun)
  1032. end
  1033. end
  1034.  
  1035. if _G.primaryWeapon == true then
  1036. findingGunForVRAimer(gun)
  1037. if _G.dualWieldGuns == true then
  1038. findingGunForVRAimer(gun2)
  1039. end
  1040. end
  1041. ----------------------------------------------------------------------------
  1042.  
  1043. local function hrpAlignment(torso)
  1044. flingPart.Position = torso.Position
  1045.  
  1046. --Checking For Other Alignments
  1047. if flingPart:FindFirstChild("AlignPosition") then
  1048. flingPart:FindFirstChild("AlignPosition"):Destroy()
  1049. end
  1050. if flingPart:FindFirstChild("PosAtt0") then
  1051. flingPart:FindFirstChild("PosAtt0"):Destroy()
  1052. end
  1053.  
  1054. --Creating AlignPosition
  1055. local alignPosition = Instance.new("AlignPosition")
  1056.  
  1057. --Creating PosAtt0
  1058. local posAtt0 = Instance.new("Attachment", flingPart)
  1059. posAtt0.Name = "PosAtt0"
  1060.  
  1061. --Creating PosAtt1
  1062. local posAtt1 = Instance.new("Attachment", torso)
  1063. posAtt1.Name = "PosAtt1"
  1064.  
  1065. --AlignPosition Properties--
  1066. alignPosition.Attachment0 = posAtt0
  1067. alignPosition.Attachment1 = posAtt1
  1068. alignPosition.RigidityEnabled = false
  1069. alignPosition.ReactionForceEnabled = false
  1070. alignPosition.MaxForce = 99999999999999999999999999
  1071. alignPosition.Responsiveness = 200
  1072. alignPosition.Parent = flingPart
  1073.  
  1074. --Debris
  1075. debris:AddItem(alignPosition, 1)
  1076. debris:AddItem(posAtt0, 1)
  1077. debris:AddItem(posAtt1, 1)
  1078. end
  1079.  
  1080. local function touchedToFling(touchedPart, touchingPart)
  1081. if touchedPart.Name ~= "VRAimer" and touchedPart.Name ~= "VRLaser" then
  1082. if touchedPart.Parent.ClassName == "Model" then
  1083. if touchedPart.Parent.Name ~= "VirtualRig" and touchedPart.Parent.Name ~= "VirtualBody" and touchedPart.Parent.Name ~= player1.Name and touchedPart.Parent.Name ~= reanimation.Name then
  1084. if touchedPart.Parent:FindFirstChild("Humanoid") then
  1085. if touchedPart.Parent:FindFirstChild("Humanoid").RigType == Enum.HumanoidRigType.R6 then
  1086. hrpAlignment(touchedPart.Parent:FindFirstChild("Torso"))
  1087. else
  1088. hrpAlignment(touchedPart.Parent:FindFirstChild("UpperTorso"))
  1089. end
  1090. end
  1091. --wait(0.1)
  1092. if touchingPart.Name == "Bullet" then
  1093. touchingPart:Destroy()
  1094. end
  1095. end
  1096. elseif touchedPart.ClassName == "Accessory" then
  1097. if touchedPart.Parent.Parent.Name ~= "VirtualRig" and touchedPart.Parent.Parent.Name ~= "VirtualBody" and touchedPart.Parent.Parent.Name ~= player1.Name and touchedPart.Parent.Parent.Name ~= reanimation.Name then
  1098. if touchedPart.Parent.Parent:FindFirstChild("Humanoid") then
  1099. if touchedPart.Parent.Parent:FindFirstChild("Humanoid").RigType == Enum.HumanoidRigType.R6 then
  1100. hrpAlignment(touchedPart.Parent.Parent:FindFirstChild("Torso"))
  1101. else
  1102. hrpAlignment(touchedPart.Parent.Parent:FindFirstChild("UpperTorso"))
  1103. end
  1104. end
  1105. --wait(0.1)
  1106. if touchingPart == "Bullet" then
  1107. touchingPart:Destroy()
  1108. end
  1109. end
  1110. end
  1111.  
  1112. if touchedPart.Parent == workspace and touchedPart.CanCollide == true and touchingPart.Name == "Bullet" then
  1113. --wait(0.1)
  1114. touchingPart:Destroy()
  1115. end
  1116. end
  1117. end
  1118.  
  1119. --Making The Bullet
  1120. function Bullet(lifetime, Gun)
  1121. --Bullet
  1122. local bullet = Instance.new("Part", workspace)
  1123. bullet.Color = Color3.fromRGB(_G.bulletColor[1], _G.bulletColor[2], _G.bulletColor[3])
  1124. bullet.Name = "Bullet"
  1125. if not vrService.VREnabled then
  1126. if Gun == gun then
  1127. bullet.CFrame = CFrame.new(vrAimer.CFrame.Position + ((bullet.Size.Z/2) * vrAimer.CFrame.LookVector), mouse.Hit.Position)
  1128. else
  1129. bullet.CFrame = CFrame.new(vrAimer2.CFrame.Position + ((bullet.Size.Z/2) * vrAimer2.CFrame.LookVector), mouse.Hit.Position)
  1130. end
  1131. else
  1132. if Gun == gun then
  1133. bullet.CFrame = vrAimer.CFrame
  1134. else
  1135. bullet.CFrame = vrAimer2.CFrame
  1136. end
  1137. end
  1138. bullet.Material = Enum.Material.Neon
  1139. bullet.Size = Vector3.new(0.25, 0.25, 7)
  1140. bullet.CanCollide = false
  1141. debris:AddItem(bullet, lifetime)
  1142.  
  1143. --BodyVelocity
  1144. local bulletBodyVelocity = Instance.new("BodyVelocity", bullet)
  1145. bulletBodyVelocity.MaxForce = Vector3.new(10000, 10000, 10000)
  1146. if not vrService.VREnabled then
  1147. bulletBodyVelocity.Velocity = mouse.Hit.LookVector * 500
  1148. else
  1149. if Gun == gun then
  1150. bulletBodyVelocity.Velocity = vrAimer.CFrame.LookVector * 500
  1151. else
  1152. bulletBodyVelocity.Velocity = vrAimer2.CFrame.LookVector * 500
  1153. end
  1154. end
  1155.  
  1156. --[[Recoil
  1157. if _G.leftHand == false then
  1158. local bodyForce = Instance.new("BodyForce", reanimation["Right Arm"])
  1159. bodyForce.Force = vrAimer.CFrame.LookVector * -50
  1160. debris:AddItem(bodyForce, 0.1)
  1161. --gun.Velocity = (vrAimer.CFrame.LookVector * -50) * reanimation["Right Arm"].Position
  1162. else
  1163. reanimation["Left Arm"].Velocity = -vrAimer.CFrame.LookVector * 10
  1164. end]]
  1165.  
  1166. --Touched
  1167. bullet.Touched:Connect(function(part)
  1168. touchedToFling(part, bullet)
  1169. end)
  1170. end
  1171.  
  1172. --Sword Flinging
  1173. if _G.secondaryWeapon == true then
  1174. sword.Touched:Connect(function(part)
  1175. if holdingSword == true then
  1176. touchedToFling(part, sword)
  1177. end
  1178. end)
  1179.  
  1180. if _G.dualWieldMelee == true then
  1181. sword2.Touched:Connect(function(part)
  1182. if holdingSword2 == true then
  1183. touchedToFling(part, sword2)
  1184. end
  1185. end)
  1186. end
  1187. end
  1188.  
  1189. --Setting The Gun's Position And Orientation Function
  1190. local function gunPosRot(changeName, holsteredRot, holsteredPos, holdingRot, holdingPos)
  1191. if changeName == true then
  1192. gun:FindFirstChildWhichIsA("Attachment").Name = "BodyBackAttachment"
  1193. end
  1194.  
  1195. gun.BodyBackAttachment.Orientation = holsteredRot --Orientation
  1196. gun.BodyBackAttachment.Position = holsteredPos --Position
  1197.  
  1198. --Holster
  1199. gHolstRot = holsteredRot --Orientation
  1200. gHolstPos = holsteredPos --Position
  1201.  
  1202. --Holding
  1203. gHoldRot = holdingRot --Orientation
  1204. gHoldPos = holdingPos --Position
  1205.  
  1206. gunPositionsReady = true
  1207. end
  1208.  
  1209. --Setting The Gun2's Position And Orientation Function
  1210. local function gunPosRot2(changeName, holsteredRot, holsteredPos, holdingRot, holdingPos)
  1211. if changeName == true then
  1212. gun2:FindFirstChildWhichIsA("Attachment").Name = "BodyBackAttachment"
  1213. end
  1214.  
  1215. gun2.BodyBackAttachment.Orientation = holsteredRot --Orientation
  1216. gun2.BodyBackAttachment.Position = holsteredPos --Position
  1217.  
  1218. --Holster
  1219. gHolstRot2 = holsteredRot --Orientation
  1220. gHolstPos2 = holsteredPos --Position
  1221.  
  1222. --Holding
  1223. gHoldRot2 = holdingRot --Orientation
  1224. gHoldPos2 = holdingPos --Position
  1225. end
  1226.  
  1227. --Setting The Melee Weapon's Position And Orientation
  1228. local function meleePosRot(changeName, holsteredRot, holsteredPos, holdingRot, holdingPos)
  1229. if changeName == true then
  1230. sword:FindFirstChildWhichIsA("Attachment").Name = "BodyBackAttachment"
  1231. end
  1232.  
  1233. sword.BodyBackAttachment.Orientation = holsteredRot --Orientation
  1234. sword.BodyBackAttachment.Position = holsteredPos --Position
  1235.  
  1236. --Holster
  1237. sHolstRot = holsteredRot --Orientation
  1238. sHolstPos = holsteredPos --Position
  1239.  
  1240. --Holding
  1241. sHoldRot = holdingRot --Orientation
  1242. sHoldPos = holdingPos --Position
  1243.  
  1244. swordPositionsReady = true
  1245. end
  1246.  
  1247. --Setting The Second Melee Weapon's Position And Orientation
  1248. local function meleePosRot2(changeName, holsteredRot, holsteredPos, holdingRot, holdingPos)
  1249. if changeName == true then
  1250. sword2:FindFirstChildWhichIsA("Attachment").Name = "BodyBackAttachment"
  1251. end
  1252.  
  1253. sword2.BodyBackAttachment.Orientation = holsteredRot --Orientation
  1254. sword2.BodyBackAttachment.Position = holsteredPos --Position
  1255.  
  1256. --Holster
  1257. sHolstRot2 = holsteredRot --Orientation
  1258. sHolstPos2 = holsteredPos --Position
  1259.  
  1260. --Holding
  1261. sHoldRot2 = holdingRot --Orientation
  1262. sHoldPos2 = holdingPos --Position
  1263. end
  1264.  
  1265. --Setting Camera To First Person (VR)
  1266. if vrService.VREnabled and _G.changeSomeStuff == true then
  1267. player1.CameraMode = Enum.CameraMode.LockFirstPerson
  1268. end
  1269.  
  1270. if _G.leftHand == false or _G.dualWieldGuns == true or _G.dualWieldMelee == true then --Right Hand
  1271. --Gun
  1272. if _G.primaryWeapon == true then
  1273. if gun.Parent.Name == "Sniper" then --Sniper
  1274. gunPosRot(false, Vector3.new(180, 0, 133.1329), Vector3.new(-0.5, -0.3, 0.2), Vector3.new(90, -90, 0), Vector3.new(-1.8, -0.6, 0))
  1275. elseif gun.Parent.Name == "Meshes/SniperAccessory" or gun.Parent.Name == "Meshes/RainbowSniperAccessory" then --Tactical Cyberpunk Sniper and Rainbow Cyberpunk Sniper
  1276. if gun.Parent.Name == "Meshes/SniperAccessory" then
  1277. gunPosRot(false, Vector3.new(180, 180, 94.25939), Vector3.new(0.18, -0.70, -0.26), Vector3.new(40, -90, 180), Vector3.new(0.6, -1.7, 0))
  1278. elseif gun.Parent.Name == "Meshes/RainbowSniperAccessory" then
  1279. gunPosRot(false, Vector3.new(180, 180, 94.25939), Vector3.new(0.18, -0.70, -0.26), Vector3.new(40, -90, 180), Vector3.new(0.8, -1.6, 0))
  1280. end
  1281. elseif gun.Parent.Name == "Meshes/GiftsniperAccessory" then --Festive Cyberpunk Sniper
  1282. gunPosRot(false, Vector3.new(-43.86, -107.33, -135.7), Vector3.new(-0.3, -0.9, -0.3), Vector3.new(-1, 164, -135), Vector3.new(-1.05, -1.3, -0.7))
  1283. elseif gun.Parent.Name == "HalloweenSniperAccessory" then --Spooky Cyberpunk Sniper
  1284. gunPosRot(false, Vector3.new(-0, -180, -90), Vector3.new(-0.5, -0.3, 0.2), Vector3.new(45, 86.75, -180), Vector3.new(-0.8, -1.6, 0.05))
  1285. elseif gun.Parent.Name == "Type-49 Abomindation Back Accessory" then --Type-49 The Abomination
  1286. gunPosRot(false, Vector3.new(0, 0, 0), Vector3.new(-0.08, -0.18, -0.53), Vector3.new(40, 90, 0), Vector3.new(1, 0.2, -0.3))
  1287. elseif gun.Parent.Name == "Blox Rifle 5000" then --Blox Rifle 5000
  1288. gunPosRot(false, Vector3.new(-0, -90, -90), Vector3.new(0.2, -0.14, 0.0009), Vector3.new(45, 180, 180), Vector3.new(0, -1.3, 0.5))
  1289. elseif gun.Parent.Name == "Meshes/1911RightAccessory" or gun.Parent.Name == "Meshes/1911RightAccessory 1" then --Sidearms
  1290. --LEO Mk.45 [Right Hip]
  1291. if gun:FindFirstChildWhichIsA("SpecialMesh").MeshId == "rbxassetid://6995200499" then
  1292. gunPosRot(true, Vector3.new(-180, 0, -180), Vector3.new(1.10212, 1.1, -0.5), Vector3.new(-180, 0, -180), Vector3.new(0, 0.45, -0.25))
  1293. elseif gun:FindFirstChildWhichIsA("SpecialMesh").MeshId == "rbxassetid://6995561576" then
  1294. gunPosRot(true, Vector3.new(-180, -90, -180), Vector3.new(0.5, 1.1, 1.1), Vector3.new(-180, -90, -180), Vector3.new(0.25, 0.45, 0))
  1295. end
  1296. elseif gun.Parent.Name == "Meshes/恶魔枪Accessory" then --Halloween Gun
  1297. gunPosRot(true, Vector3.new(60, 180, 0), Vector3.new(1.16053, -0.1, -1.2), Vector3.new(69, -180, 0), Vector3.new(0, -0.175, -0.6))
  1298. end
  1299. end
  1300.  
  1301. --Knife
  1302. --UMAD?
  1303. if _G.secondaryWeapon == true and sword.Parent.Name == "UMAD" then
  1304. meleePosRot(false, Vector3.new(-20, -180, 0), Vector3.new(-1.08, 0.9, -0.5), Vector3.new(40, 0, 0), Vector3.new(0, -0.4, 0.7))
  1305. end
  1306.  
  1307. --Sword/Knifes
  1308. --VR
  1309. if _G.secondaryWeapon == true then
  1310. if _G.dualWieldMelee == false then
  1311. if vrService.VREnabled and _G.knifeMode == true then
  1312. if sword.Parent.Name == "Dark Matter Sword" then --Dark Matter Sword
  1313. meleePosRot(false, Vector3.new(50, -90, 0), Vector3.new(0, 1, 1.2), Vector3.new(50, -90, 0), Vector3.new(1.3, 1.6, 0))
  1314. elseif sword.Parent.Name == "Russo's Sword" then --Russo's Sword
  1315. meleePosRot(false, Vector3.new(-90, -90, 0), Vector3.new(0.7, -0.5, 1.1), Vector3.new(-90, 90, 0), Vector3.new(0, -1.9, 0))
  1316. elseif sword.Parent.Name == "MeshPartAccessory" then --Greatswords
  1317. meleePosRot(false, Vector3.new(45, -90, 0), Vector3.new(0.3, 1.2, 1.2), Vector3.new(45, -90, 0), Vector3.new(1.8, 1.8, 0))
  1318. elseif sword.Parent.Name == "Red SS" or sword.Parent.Name == "White SS" then --Red Swag Knife
  1319. meleePosRot(true, Vector3.new(0, 180, 0), Vector3.new(-1.07686, 1, -0.5), Vector3.new(135, 0, -180), Vector3.new(0, 0.455, 0.555))
  1320. end
  1321. else --No VR
  1322. if sword.Parent.Name == "Dark Matter Sword" or sword.Parent.Name == "MeshPartAccessory" then --Dark Matter Sword
  1323. if sword.Parent.Name == "Dark Matter Sword" then
  1324. meleePosRot(false, Vector3.new(0, 0, -90), sword.BodyBackAttachment.Position, Vector3.new(-100, -90, 0), Vector3.new(1.2, 1.4, 0))
  1325. elseif sword.Parent.Name == "MeshPartAccessory" then
  1326. meleePosRot(false, Vector3.new(0, 0, -90), sword.BodyBackAttachment.Position, Vector3.new(-100, -90, 0), Vector3.new(1.7, 1.6, 0))
  1327. end
  1328. elseif sword.Parent.Name == "Russo's Sword" then --Russo's Sword
  1329. meleePosRot(false, Vector3.new(-0, 180, 125.002), Vector3.new(-0.17, 0.23, 0.21), Vector3.new(45, 90, -180), Vector3.new(-0.1, -1.7, 0))
  1330. elseif sword.Parent.Name == "Red SS" or sword.Parent.Name == "White SS" then --Red Swag Knife
  1331. meleePosRot(true, Vector3.new(0, 180, 0), Vector3.new(-1.07686, 1, -0.5), Vector3.new(-45, 0, 0), Vector3.new(0, 0.455, 0.555))
  1332. end
  1333. end
  1334. else
  1335. if vrService.VREnabled and _G.knifeMode == true then
  1336. if sword2.Parent.Name == "Dark Matter Sword" then --Dark Matter Sword
  1337. meleePosRot2(false, Vector3.new(50, -90, 0), Vector3.new(0, 1, 1.2), Vector3.new(50, -90, 0), Vector3.new(1.3, 1.6, 0))
  1338. elseif sword2.Parent.Name == "Russo's Sword" then --Russo's Sword
  1339. meleePosRot2(false, Vector3.new(-90, -90, 0), Vector3.new(0.7, -0.5, 1.1), Vector3.new(-90, 90, 0), Vector3.new(0, -1.9, 0))
  1340. elseif sword2.Parent.Name == "MeshPartAccessory" then --Greatswords
  1341. meleePosRot2(false, Vector3.new(45, -90, 0), Vector3.new(0.3, 1.2, 1.2), Vector3.new(45, -90, 0), Vector3.new(1.8, 1.8, 0))
  1342. elseif sword2.Parent.Name == "Red SS" or sword2.Parent.Name == "White SS" then --Red Swag Knife
  1343. meleePosRot2(true, Vector3.new(0, 180, 0), Vector3.new(-1.07686, 1, -0.5), Vector3.new(135, 0, -180), Vector3.new(0, 0.455, 0.555))
  1344. end
  1345. else --No VR
  1346. if sword2.Parent.Name == "Dark Matter Sword" or sword2.Parent.Name == "MeshPartAccessory" then --Dark Matter Sword
  1347. if sword2.Parent.Name == "Dark Matter Sword" then
  1348. meleePosRot2(false, Vector3.new(0, 0, -90), sword2.BodyBackAttachment.Position, Vector3.new(-100, -90, 0), Vector3.new(1.2, 1.4, 0))
  1349. elseif sword2.Parent.Name == "MeshPartAccessory" then
  1350. meleePosRot2(false, Vector3.new(0, 0, -90), sword2.BodyBackAttachment.Position, Vector3.new(-100, -90, 0), Vector3.new(1.7, 1.6, 0))
  1351. end
  1352. elseif sword2.Parent.Name == "Russo's Sword" then --Russo's Sword
  1353. meleePosRot2(false, Vector3.new(-0, 180, 125.002), Vector3.new(-0.17, 0.23, 0.21), Vector3.new(45, 90, -180), Vector3.new(-0.1, -1.7, 0))
  1354. elseif sword2.Parent.Name == "Red SS" or sword2.Parent.Name == "White SS" then --Red Swag Knife
  1355. meleePosRot2(true, Vector3.new(0, 180, 0), Vector3.new(-1.07686, 1, -0.5), Vector3.new(-45, 0, 0), Vector3.new(0, 0.455, 0.555))
  1356. end
  1357. end
  1358. end
  1359. end
  1360. end
  1361. if _G.leftHand == true or _G.dualWieldGuns == true or _G.dualWieldMelee == true then
  1362. --Gun
  1363. if _G.primaryWeapon == true then
  1364. if gunPositionsReady == false then
  1365. if gun.Parent.Name == "Sniper" then --Sniper
  1366. gunPosRot(false, Vector3.new(0, 0, 43.1329), Vector3.new(0.07, 0.08, -0.19), Vector3.new(90, -90, 0), Vector3.new(-1.8, -0.6, 0))
  1367. elseif gun.Parent.Name == "Meshes/SniperAccessory" or gun.Parent.Name == "Meshes/RainbowSniperAccessory" then --Tactical Cyberpunk Sniper and Rainbow Cyberpunk Sniper
  1368. if gun.Parent.Name == "Meshes/SniperAccessory" then
  1369. gunPosRot(false, Vector3.new(-0, 180, 94.25939), Vector3.new(0.18, -0.70, 0.27), Vector3.new(40, -90, 180), Vector3.new(0.6, -1.7, 0))
  1370. elseif gun.Parent.Name == "Meshes/RainbowSniperAccessory" then
  1371. gunPosRot(false, Vector3.new(-0, 180, 94.25939), Vector3.new(0.18, -0.70, 0.27), Vector3.new(40, -90, 180), Vector3.new(0.8, -1.6, 0))
  1372. end
  1373. elseif gun.Parent.Name == "Meshes/GiftsniperAccessory" then --Festive Cyberpunk Sniper
  1374. gunPosRot(false, Vector3.new(46.14, 72.67, 134.3), Vector3.new(-0.6, -0.3, -0.3), Vector3.new(-1, 164, -135), Vector3.new(-1.05, -1.3, -0.7))
  1375. elseif gun.Parent.Name == "HalloweenSniperAccessory" then --Spooky Cyberpunk Sniper
  1376. gunPosRot(false, Vector3.new(0, 0, 90), Vector3.new(-0.36, -0.66, -0.21), Vector3.new(45, 86.75, -180), Vector3.new(-0.8, -1.6, 0.05))
  1377. elseif gun.Parent.Name == "Type-49 Abomindation Back Accessory" then --Type-49 The Abomination
  1378. gunPosRot(false, Vector3.new(0, 180, 0), Vector3.new(-0.08, -0.18, -0.05), Vector3.new(40, 90, 0), Vector3.new(1, 0.2, -0.3))
  1379. elseif gun.Parent.Name == "Blox Rifle 5000" then --Blox Rifle 5000
  1380. gunPosRot(false, Vector3.new(-0, 90, 90), Vector3.new(-0.24, -0.14, 0.0009), Vector3.new(45, 180, 180), Vector3.new(0, -1.3, 0.5))
  1381. elseif gun.Parent.Name == "Meshes/1911RightAccessory" or gun.Parent.Name == "Meshes/1911RightAccessory 1" then --Sidearms
  1382. --LEO Mk.45 [Right Hip]
  1383. if gun:FindFirstChildWhichIsA("SpecialMesh").MeshId == "rbxassetid://6995200499" then
  1384. gunPosRot(true, Vector3.new(-180, 0, -180), Vector3.new(-1.10212, 1.1, -0.5), Vector3.new(-180, 0, -180), Vector3.new(0, 0.45, -0.25))
  1385. elseif gun:FindFirstChildWhichIsA("SpecialMesh").MeshId == "rbxassetid://6995561576" then
  1386. gunPosRot(true, Vector3.new(-180, -90, -180), Vector3.new(0.5, 1.1, -1.1), Vector3.new(-180, -90, -180), Vector3.new(0.25, 0.45, 0))
  1387. end
  1388. elseif gun.Parent.Name == "Meshes/恶魔枪Accessory" then
  1389. --Halloween Gun
  1390. gunPosRot(true, Vector3.new(60, 180, 0), Vector3.new(-1.16053, -0.1, -1.2), Vector3.new(69, -180, 0), Vector3.new(0, -0.175, -0.6))
  1391. end
  1392. end
  1393.  
  1394. if _G.dualWieldGuns == true then
  1395. if _G.primaryWeapon == true then
  1396. if gun2.Parent.Name == "Sniper" then --Sniper
  1397. gunPosRot2(false, Vector3.new(0, 0, 43.1329), Vector3.new(0.07, 0.08, -0.19), Vector3.new(90, -90, 0), Vector3.new(-1.8, -0.6, 0))
  1398. elseif gun2.Parent.Name == "Meshes/SniperAccessory" or gun2.Parent.Name == "Meshes/RainbowSniperAccessory" then --Tactical Cyberpunk Sniper and Rainbow Cyberpunk Sniper
  1399. if gun2.Parent.Name == "Meshes/SniperAccessory" then
  1400. gunPosRot2(false, Vector3.new(-0, 180, 94.25939), Vector3.new(0.18, -0.70, 0.27), Vector3.new(40, -90, 180), Vector3.new(0.6, -1.7, 0))
  1401. elseif gun2.Parent.Name == "Meshes/RainbowSniperAccessory" then
  1402. gunPosRot2(false, Vector3.new(-0, 180, 94.25939), Vector3.new(0.18, -0.70, 0.27), Vector3.new(40, -90, 180), Vector3.new(0.8, -1.6, 0))
  1403. end
  1404. elseif gun2.Parent.Name == "Meshes/GiftsniperAccessory" then --Festive Cyberpunk Sniper
  1405. gunPosRot2(false, Vector3.new(46.14, 72.67, 134.3), Vector3.new(-0.6, -0.3, -0.3), Vector3.new(-1, 164, -135), Vector3.new(-1.05, -1.3, -0.7))
  1406. elseif gun2.Parent.Name == "HalloweenSniperAccessory" then --Spooky Cyberpunk Sniper
  1407. gunPosRot2(false, Vector3.new(0, 0, 90), Vector3.new(-0.36, -0.66, -0.21), Vector3.new(45, 86.75, -180), Vector3.new(-0.8, -1.6, 0.05))
  1408. elseif gun2.Parent.Name == "Type-49 Abomindation Back Accessory" then --Type-49 The Abomination
  1409. gunPosRot2(false, Vector3.new(0, 180, 0), Vector3.new(-0.08, -0.18, -0.05), Vector3.new(40, 90, 0), Vector3.new(1, 0.2, -0.3))
  1410. elseif gun2.Parent.Name == "Blox Rifle 5000" then --Blox Rifle 5000
  1411. gunPosRot2(false, Vector3.new(-0, 90, 90), Vector3.new(-0.24, -0.14, 0.0009), Vector3.new(45, 180, 180), Vector3.new(0, -1.3, 0.5))
  1412. elseif gun2.Parent.Name == "Meshes/1911RightAccessory" or gun.Parent.Name == "Meshes/1911RightAccessory 1" then --Sidearms
  1413. --LEO Mk.45 [Right Hip]
  1414. if gun2:FindFirstChildWhichIsA("SpecialMesh").MeshId == "rbxassetid://6995200499" then
  1415. gunPosRot2(true, Vector3.new(-180, 0, -180), Vector3.new(-1.10212, 1.1, -0.5), Vector3.new(-180, 0, -180), Vector3.new(0, 0.45, -0.25))
  1416. elseif gun2:FindFirstChildWhichIsA("SpecialMesh").MeshId == "rbxassetid://6995561576" then
  1417. gunPosRot2(true, Vector3.new(-180, -90, -180), Vector3.new(0.5, 1.1, -1.1), Vector3.new(-180, -90, -180), Vector3.new(0.25, 0.45, 0))
  1418. end
  1419. elseif gun2.Parent.Name == "Meshes/恶魔枪Accessory" then --Halloween Gun
  1420. gunPosRot2(true, Vector3.new(60, 180, 0), Vector3.new(-1.16053, -0.1, -1.2), Vector3.new(69, -180, 0), Vector3.new(0, -0.175, -0.6))
  1421. end
  1422. end
  1423. end
  1424. end
  1425.  
  1426. --Knives
  1427. --UMAD?
  1428. if _G.secondaryWeapon == true and sword.Parent.Name == "UMAD" then
  1429. meleePosRot(false, Vector3.new(-20, -180, 0), Vector3.new(1.08, 0.9, -0.5), Vector3.new(40, 0, 0), Vector3.new(0, -0.4, 0.7))
  1430. end
  1431.  
  1432. --Sword/Knives
  1433. --VR
  1434. if _G.secondaryWeapon == true then
  1435. if swordPositionsReady == false then
  1436. if vrService.VREnabled and _G.knifeMode == true then
  1437. if sword.Parent.Name == "Dark Matter Sword" then --Dark Matter Sword
  1438. meleePosRot(false, Vector3.new(50, -90, 0), Vector3.new(0, 1, -1.2), Vector3.new(50, -90, 0), Vector3.new(1.3, 1.6, 0))
  1439. elseif sword.Parent.Name == "Russo's Sword" then --Russo's Sword
  1440. meleePosRot(false, Vector3.new(-90, 90, 0), Vector3.new(-0.7, -0.5, 1.1), Vector3.new(-90, -90, 0), Vector3.new(-0.1, -1.9, 0))
  1441. elseif sword.Parent.Name == "MeshPartAccessory" then --Greatswords
  1442. meleePosRot(false, Vector3.new(45, -90, 0), Vector3.new(0.3, 1.2, -1.2), Vector3.new(45, -90, 0), Vector3.new(1.8, 1.8, 0))
  1443. elseif sword.Parent.Name == "Red SS" or sword.Parent.Name == "White SS" then --Red Swag Knife
  1444. meleePosRot(true, Vector3.new(0, 180, 0), Vector3.new(1.07686, 1, -0.5), Vector3.new(135, 0, -180), Vector3.new(0, 0.455, 0.555))
  1445. end
  1446. else --No VR/knifeMod is false
  1447. if sword.Parent.Name == "Dark Matter Sword" or sword.Parent.Name == "MeshPartAccessory" then --Dark Matter Sword/Greatswords
  1448. if sword.Parent.Name == "Dark Matter Sword" then
  1449. meleePosRot(false, Vector3.new(0, 0, 0), sword.BodyBackAttachment.Position, Vector3.new(-100, -90, 0), Vector3.new(1.2, 1.4, 0))
  1450. elseif sword.Parent.Name == "MeshPartAccessory" then
  1451. meleePosRot(false, Vector3.new(0, 0, 0), sword.BodyBackAttachment.Position, Vector3.new(-100, -90, 0), Vector3.new(1.7, 1.6, 0))
  1452. end
  1453. elseif sword.Parent.Name == "Russo's Sword" then --Russo's Sword
  1454. meleePosRot(false, Vector3.new(-0, 180, 215.002), Vector3.new(-0.17, 0.23, 0.21), Vector3.new(45, 90, -180), Vector3.new(-0.1, -1.7, 0))
  1455. elseif sword.Parent.Name == "Red SS" or sword.Parent.Name == "White SS" then --Red Swag Knife
  1456. meleePosRot(true, Vector3.new(0, 180, 0), Vector3.new(1.07686, 1, -0.5), Vector3.new(-45, 0, 0), Vector3.new(0, 0.455, 0.555))
  1457. end
  1458. end
  1459. end
  1460. end
  1461. end
  1462.  
  1463. ------------------------------------Functions------------------------------------
  1464. local function Hats(hat)
  1465. --From CLOVR (Modified)------------------------------------------------
  1466. local Attachment1 = hat:FindFirstChildWhichIsA("Attachment")
  1467. local Attachment0 = reanimation:FindFirstChild(tostring(Attachment1), true)
  1468. local Orientation = reanimation["Head"]:FindFirstChild(hat.Parent.Name.."'s AlignRot")
  1469. local Position = reanimation["Head"]:FindFirstChild(hat.Parent.Name.."'s AlignPos")
  1470.  
  1471. Orientation.Attachment1 = Attachment0
  1472. Position.Attachment1 = Attachment0
  1473. -----------------------------------------------------------------------
  1474. end
  1475.  
  1476. --From - The Zenith Battle Rifle 70 by CKbackup (Modified)--
  1477. function GunShot(id, vol, pitch)
  1478. local sou = Instance.new("Sound")
  1479. sou.Parent = vrAimer
  1480. sou.Volume = vol
  1481. sou.Pitch = pitch
  1482. sou.SoundId = "rbxassetid://"..id
  1483. sou.PlayOnRemove = true
  1484. sou:Destroy()
  1485. end
  1486. -----------------------------------------------------
  1487.  
  1488. local function R15Hats()
  1489. --From CLOVR (Modified)-------------------------------
  1490. local attachment0 = Instance.new("Attachment")
  1491. local Orientation = Instance.new("AlignOrientation")
  1492. local Position = Instance.new("AlignPosition")
  1493. attachment0.Name = "Attachment0"
  1494. attachment0.Parent = v
  1495.  
  1496. Orientation.Attachment0 = attachment0
  1497. Orientation.Attachment1 = attachment1
  1498. Orientation.RigidityEnabled = true
  1499. Orientation.ReactionTorqueEnabled = true
  1500. Orientation.MaxTorque = 20000
  1501. Orientation.Responsiveness = 200
  1502. Orientation.Parent = v
  1503.  
  1504. Position.Attachment0 = attachment0
  1505. Position.Attachment1 = Attachment
  1506. Position.RigidityEnabled = true
  1507. Position.ReactionForceEnabled = true
  1508. Position.MaxForce = 40000
  1509. Position.Responsiveness = 200
  1510. Position.Parent = v
  1511. ------------------------------------------------------
  1512. end
  1513. ---------------------------------------------------------------------------------
  1514.  
  1515. --Sizes
  1516. if _G.primaryWeapon == true then
  1517. gun.Size = Vector3.new(1, 1, 1)
  1518. if _G.dualWieldGuns == true then
  1519. gun2.Size = Vector3.new(1, 1, 1)
  1520. end
  1521. end
  1522. if _G.secondaryWeapon == true then
  1523. sword.Size = Vector3.new(1, 1, 1)
  1524. if _G.dualWieldMelee == true then
  1525. sword2.Size = Vector3.new(1, 1, 1)
  1526. end
  1527. end
  1528.  
  1529. if _G.primaryWeapon == true then
  1530. gun.Massless = true
  1531. if _G.dualWieldGuns == true then
  1532. gun2.Massless = true
  1533. end
  1534. end
  1535. if _G.secondaryWeapon == true then
  1536. sword.Massless = true
  1537. if _G.dualWieldMelee == true then
  1538. sword2.Massless = true
  1539. end
  1540. end
  1541.  
  1542. --Functions for Holding and Holstering Weaopons--
  1543. --Gun
  1544. local function EquipGun()
  1545. --Start Flinging
  1546. local hatGrip = gun.BodyBackAttachment
  1547.  
  1548. --Orientation
  1549. if _G.leftHand == true then
  1550. hatGrip.Name = lGrip1.Name
  1551. hatGrip = gun.LeftGripAttachment
  1552. else
  1553. hatGrip.Name = rGrip1.Name
  1554. hatGrip = gun.RightGripAttachment
  1555. end
  1556.  
  1557. hatGrip.Orientation = gHoldRot
  1558. hatGrip.Position = gHoldPos
  1559.  
  1560. --Function
  1561. Hats(gun)
  1562.  
  1563. holdingGun = true
  1564. end
  1565.  
  1566. local function UnequipGun()
  1567. --Stop Flinging
  1568. if _G.leftHand == true then
  1569. gun.LeftGripAttachment.Name = "BodyBackAttachment"
  1570. else
  1571. gun.RightGripAttachment.Name = "BodyBackAttachment"
  1572. end
  1573.  
  1574. local hatGrip = gun.BodyBackAttachment
  1575.  
  1576. hatGrip.Orientation = gHolstRot
  1577. hatGrip.Position = gHolstPos
  1578.  
  1579. --Function
  1580. Hats(gun)
  1581.  
  1582. holdingGun = false
  1583. end
  1584.  
  1585. --Gun2
  1586. local function EquipGun2()
  1587. --Start Flinging
  1588. local hatGrip = gun2.BodyBackAttachment
  1589.  
  1590. --Orientation
  1591. if _G.leftHand == true then
  1592. hatGrip.Name = rGrip1.Name
  1593. hatGrip = gun2.RightGripAttachment
  1594. else
  1595. hatGrip.Name = lGrip1.Name
  1596. hatGrip = gun2.LeftGripAttachment
  1597. end
  1598.  
  1599. hatGrip.Orientation = gHoldRot2
  1600. hatGrip.Position = gHoldPos2
  1601.  
  1602. --Function
  1603. Hats(gun2)
  1604.  
  1605. holdingGun2 = true
  1606. end
  1607.  
  1608. local function UnequipGun2()
  1609. --Stop Flinging
  1610. if _G.leftHand == true then
  1611. gun2.RightGripAttachment.Name = "BodyBackAttachment"
  1612. else
  1613. gun2.LeftGripAttachment.Name = "BodyBackAttachment"
  1614. end
  1615.  
  1616. local hatGrip = gun2.BodyBackAttachment
  1617.  
  1618. hatGrip.Orientation = gHolstRot2
  1619. hatGrip.Position = gHolstPos2
  1620.  
  1621. --Function
  1622. Hats(gun2)
  1623.  
  1624. holdingGun2 = false
  1625. end
  1626.  
  1627. --Sword
  1628. local function EquipSword()
  1629. --Start Holding
  1630. local hatGrip = sword.BodyBackAttachment
  1631.  
  1632. --Orientation
  1633. if _G.leftHand == true then
  1634. hatGrip.Name = rGrip1.Name
  1635. hatGrip = sword.RightGripAttachment
  1636. else
  1637. hatGrip.Name = lGrip1.Name
  1638. hatGrip = sword.LeftGripAttachment
  1639. end
  1640.  
  1641. hatGrip.Orientation = sHoldRot
  1642. hatGrip.Position = sHoldPos
  1643.  
  1644. --Function
  1645. Hats(sword)
  1646.  
  1647. holdingSword = true
  1648. end
  1649.  
  1650. local function UnequipSword()
  1651. --Stop Holding
  1652. if _G.leftHand == true then
  1653. sword.RightGripAttachment.Name = "BodyBackAttachment"
  1654. else
  1655. sword.LeftGripAttachment.Name = "BodyBackAttachment"
  1656. end
  1657.  
  1658. local hatGrip = sword.BodyBackAttachment
  1659.  
  1660. hatGrip.Orientation = sHolstRot
  1661. hatGrip.Position = sHolstPos
  1662.  
  1663. --Function
  1664. Hats(sword)
  1665.  
  1666. holdingSword = false
  1667. end
  1668.  
  1669. --Sword2
  1670. local function EquipSword2()
  1671. --Start Holding
  1672. local hatGrip = sword2.BodyBackAttachment
  1673.  
  1674. --Orientation
  1675. if _G.leftHand == true then
  1676. hatGrip.Name = lGrip1.Name
  1677. hatGrip = sword2.LeftGripAttachment
  1678. else
  1679. hatGrip.Name = rGrip1.Name
  1680. hatGrip = sword2.RightGripAttachment
  1681. end
  1682.  
  1683. hatGrip.Orientation = sHoldRot2
  1684. hatGrip.Position = sHoldPos2
  1685.  
  1686. --Function
  1687. Hats(sword2)
  1688.  
  1689. holdingSword2 = true
  1690. end
  1691.  
  1692. local function UnequipSword2()
  1693. --Stop Holding
  1694. if _G.leftHand == true then
  1695. sword2.LeftGripAttachment.Name = "BodyBackAttachment"
  1696. else
  1697. sword2.RightGripAttachment.Name = "BodyBackAttachment"
  1698. end
  1699.  
  1700. local hatGrip = sword2.BodyBackAttachment
  1701.  
  1702. hatGrip.Orientation = sHolstRot2
  1703. hatGrip.Position = sHolstPos2
  1704.  
  1705. --Function
  1706. Hats(sword2)
  1707.  
  1708. holdingSword2 = false
  1709. end
  1710. -------------------------------------------------
  1711.  
  1712. userInputService.InputBegan:Connect(function(key, gameProcessedEvent)
  1713. if character1.Parent == game.Workspace then
  1714. --No VR-------------------------------------------------------------------------------
  1715. --Gun
  1716. if key.KeyCode == Enum.KeyCode.F and not vrService.VREnabled and scriptLoaded == true and not gameProcessedEvent and _G.primaryWeapon == true then
  1717. if _G.dualWieldMelee == false then
  1718. if holdingGun == false then
  1719. EquipGun()
  1720. else
  1721. UnequipGun()
  1722. end
  1723. else
  1724. if holdingSword2 == false then
  1725. EquipSword2()
  1726. else
  1727. UnequipSword2()
  1728. end
  1729. end
  1730. end
  1731.  
  1732. --Shoot Gun
  1733. if key.KeyCode == Enum.KeyCode.E and shooting == false and holdingGun == true and not vrService.VREnabled and scriptLoaded == true and not gameProcessedEvent and _G.primaryWeapon == true then
  1734. shooting = true
  1735.  
  1736. if table.find(snipers, gun.Parent.Name) then
  1737. --Functions
  1738. GunShot(680140087, 0.7, 1)
  1739. Bullet(_G.sniperLifetime, gun)
  1740.  
  1741. --Wait
  1742. wait(_G.sniperShootCooldown)
  1743.  
  1744. shooting = false
  1745. elseif table.find(pistols, gun.Parent.Name) then
  1746. --Functions
  1747. GunShot(5298232020, 1, math.random(90,110)/100)
  1748. Bullet(_G.pistolLifetime, gun)
  1749.  
  1750. --Wait
  1751. wait(_G.pistolShootCooldown)
  1752.  
  1753. shooting = false
  1754. end
  1755. end
  1756. if key.KeyCode == Enum.KeyCode.Q and shooting2 == false and holdingGun2 == true and not vrService.VREnabled and scriptLoaded == true and not gameProcessedEvent and _G.dualWieldGuns == true then
  1757. shooting2 = true
  1758.  
  1759. if table.find(snipers, gun2.Parent.Name) then
  1760. --Functions
  1761. GunShot(680140087, 0.7, 1)
  1762. Bullet(_G.sniperLifetime, gun2)
  1763.  
  1764. --Wait
  1765. wait(_G.sniperShootCooldown)
  1766.  
  1767. shooting2 = false
  1768. elseif table.find(pistols, gun2.Parent.Name) then
  1769. --Functions
  1770. GunShot(5298232020, 1, math.random(90,110)/100)
  1771. Bullet(_G.pistolLifetime, gun2)
  1772.  
  1773. --Wait
  1774. wait(_G.pistolShootCooldown)
  1775.  
  1776. shooting2 = false
  1777. end
  1778. end
  1779.  
  1780. --Sword/Kinfe/Dual Wielded Gun
  1781. if key.KeyCode == Enum.KeyCode.G and not vrService.VREnabled and scriptLoaded == true and not gameProcessedEvent then
  1782. if _G.dualWieldGuns == false and _G.secondaryWeapon == true then
  1783. if holdingSword == false then
  1784. EquipSword()
  1785. else
  1786. UnequipSword()
  1787. end
  1788. else
  1789. if holdingGun2 == false then
  1790. EquipGun2()
  1791. else
  1792. UnequipGun2()
  1793. end
  1794. end
  1795. end
  1796. --------------------------------------------------------------------------------------
  1797.  
  1798. --VR----------------------------------------------------------------------------------
  1799. --Right Hand
  1800. if key.KeyCode == Enum.KeyCode.ButtonR1 and scriptLoaded == true then
  1801. --Gun
  1802. if _G.primaryWeapon == true then
  1803. if holdingGun == false and _G.leftHand == false then
  1804. EquipGun()
  1805. else
  1806. if holdingGun == true and _G.gunAutoEquip == true and _G.leftHand == false then
  1807. UnequipGun()
  1808. end
  1809. end
  1810. end
  1811.  
  1812. --Sword
  1813. if holdingSword == false and _G.leftHand == true and _G.secondaryWeapon == true then
  1814. EquipSword()
  1815. else
  1816. if holdingSword == true and _G.leftHand == true and _G.swordAutoEquip == true and _G.secondaryWeapon == true then
  1817. UnequipSword()
  1818. end
  1819. end
  1820. end
  1821.  
  1822. --Shoot Gun
  1823. if key.KeyCode == Enum.KeyCode.ButtonR2 and shooting == false and holdingGun == true and _G.leftHand == false and scriptLoaded == true and _G.primaryWeapon == true then
  1824. shooting = true
  1825.  
  1826. if table.find(snipers, gun.Parent.Name) then
  1827. --Functions
  1828. GunShot(680140087, 0.7, 1)
  1829. Bullet(_G.sniperLifetime, gun)
  1830.  
  1831. --Wait
  1832. wait(_G.sniperShootCooldown)
  1833.  
  1834. shooting = false
  1835. elseif table.find(pistols, gun.Parent.Name) then
  1836. --Functions
  1837. GunShot(5298232020, 1, math.random(90,110)/100)
  1838. Bullet(_G.pistolLifetime, gun)
  1839.  
  1840. --Wait
  1841. wait(_G.pistolShootCooldown)
  1842.  
  1843. shooting = false
  1844. end
  1845. end
  1846.  
  1847. --Left Hand
  1848. if key.KeyCode == Enum.KeyCode.ButtonL1 and scriptLoaded == true and _G.primaryWeapon == true then
  1849. --Gun
  1850. if _G.dualWieldGuns == false then
  1851. if holdingGun == false and _G.leftHand == true then
  1852. EquipGun()
  1853. else
  1854. if holdingGun == true and _G.gunAutoEquip == true and _G.leftHand == true then
  1855. UnequipGun()
  1856. end
  1857. end
  1858. else
  1859. if holdingGun2 == false then
  1860. EquipGun2()
  1861. else
  1862. if holdingGun2 == true and _G.gunAutoEquip == true then
  1863. UnequipGun2()
  1864. end
  1865. end
  1866. end
  1867.  
  1868. --Sword
  1869. if _G.dualWieldMelee == false then
  1870. if _G.secondaryWeapon == true then
  1871. if holdingSword == false and _G.leftHand == false then
  1872. EquipSword()
  1873. else
  1874. if holdingSword == true and _G.leftHand == false and _G.swordAutoEquip == true and _G.secondaryWeapon == true then
  1875. UnequipSword()
  1876. end
  1877. end
  1878. end
  1879. else
  1880. if holdingSword2 == false then
  1881. EquipSword2()
  1882. elseif holdingSword2 == true and _G.swordAutoEquip == true then
  1883. UnequipSword2()
  1884. end
  1885. end
  1886. end
  1887.  
  1888. --Shoot Gun
  1889. if _G.dualWieldGuns == false then
  1890. if key.KeyCode == Enum.KeyCode.ButtonL2 and shooting == false and holdingGun == true and _G.leftHand == true and scriptLoaded == true and _G.primaryWeapon == true then
  1891. shooting = true
  1892.  
  1893. if table.find(snipers, gun.Parent.Name) then
  1894. --Functions
  1895. GunShot(680140087, 0.7, 1)
  1896. Bullet(_G.sniperLifetime, gun)
  1897.  
  1898. --Wait
  1899. wait(_G.sniperShootCooldown)
  1900.  
  1901. shooting = false
  1902. elseif table.find(pistols, gun.Parent.Name) then
  1903. --Functions
  1904. GunShot(5298232020, 1, math.random(90,110)/100)
  1905. Bullet(_G.pistolLifetime, gun)
  1906.  
  1907. --Wait
  1908. wait(_G.pistolShootCooldown)
  1909.  
  1910. shooting = false
  1911. end
  1912. end
  1913. else
  1914. if key.KeyCode == Enum.KeyCode.ButtonL2 and shooting2 == false and holdingGun2 == true and scriptLoaded == true then
  1915. shooting2 = true
  1916.  
  1917. if table.find(snipers, gun2.Parent.Name) then
  1918. --Functions
  1919. GunShot(680140087, 0.7, 1)
  1920. Bullet(_G.sniperLifetime, gun2)
  1921.  
  1922. --Wait
  1923. wait(_G.sniperShootCooldown)
  1924.  
  1925. shooting2 = false
  1926. elseif table.find(pistols, gun2.Parent.Name) then
  1927. --Functions
  1928. GunShot(5298232020, 1, math.random(90,110)/100)
  1929. Bullet(_G.pistolLifetime, gun2)
  1930.  
  1931. --Wait
  1932. wait(_G.pistolShootCooldown)
  1933.  
  1934. shooting2 = false
  1935. end
  1936. end
  1937. end
  1938. --------------------------------------------------------------------------------------
  1939. end
  1940. end)
  1941.  
  1942. userInputService.InputEnded:Connect(function(key)
  1943. if character1.Parent == game.Workspace then
  1944. --Non VR Stop Shooting----------------------------------------------------------------
  1945. if key.KeyCode == Enum.KeyCode.E and shooting == true and scriptLoaded == true and table.find(automaticGuns, gun.Parent.Name) and _G.primaryWeapon == true then
  1946. shooting = false
  1947. end
  1948. if key.KeyCode == Enum.KeyCode.Q and shooting2 == true and scriptLoaded == true and table.find(automaticGuns, gun2.Parent.Name) and _G.dualWieldGuns == true then
  1949. shooting2 = false
  1950. end
  1951. --------------------------------------------------------------------------------------
  1952.  
  1953. --VR----------------------------------------------------------------------------------
  1954. --Unequip
  1955. --Right Hand
  1956. if key.KeyCode == Enum.KeyCode.ButtonR1 and scriptLoaded == true then
  1957. --Gun
  1958. if holdingGun == true and _G.gunAutoEquip == false and _G.leftHand == false and _G.primaryWeapon == true then
  1959. UnequipGun()
  1960. end
  1961.  
  1962. --Sword
  1963. if holdingSword == true and _G.leftHand == true and _G.swordAutoEquip == false and _G.secondaryWeapon == true then
  1964. UnequipSword()
  1965. end
  1966. end
  1967.  
  1968. --Stop Shooting
  1969. if key.KeyCode == Enum.KeyCode.ButtonR2 and shooting == true and _G.leftHand == false and scriptLoaded == true and table.find(automaticGuns, gun.Parent.Name) and _G.primaryWeapon == true then
  1970. shooting = false
  1971. end
  1972.  
  1973. --Unequip
  1974. --Left Hand
  1975. if key.KeyCode == Enum.KeyCode.ButtonL1 and scriptLoaded == true and _G.primaryWeapon == true then
  1976. --Gun
  1977. if _G.dualWieldGuns == false then
  1978. if holdingGun == true and _G.gunAutoEquip == false and _G.leftHand == true then
  1979. UnequipGun()
  1980. end
  1981. elseif holdingGun2 == true and _G.gunAutoEquip == false then
  1982. UnequipGun2()
  1983. end
  1984.  
  1985. --Sword
  1986. if _G.dualWieldMelee == false then
  1987. if holdingSword == true and _G.leftHand == false and _G.swordAutoEquip == false and _G.secondaryWeapon == true then
  1988. UnequipSword()
  1989. end
  1990. elseif holdingSword2 == true and _G.swordAutoEquip == false then
  1991. UnequipSword2()
  1992. end
  1993. end
  1994.  
  1995. --Stop Shooting
  1996. if _G.dualWieldGuns == false then
  1997. if key.KeyCode == Enum.KeyCode.ButtonL2 and shooting == true and _G.leftHand == true and scriptLoaded == true and table.find(automaticGuns, gun.Parent.Name) and _G.primaryWeapon == true then
  1998. shooting = false
  1999. end
  2000. else
  2001. if key.KeyCode == Enum.KeyCode.ButtonL2 and shooting2 == true and scriptLoaded == true and table.find(automaticGuns, gun2.Parent.Name) and _G.primaryWeapon == true then
  2002. shooting2 = false
  2003. end
  2004. end
  2005. --------------------------------------------------------------------------------------
  2006. end
  2007. end)
  2008.  
  2009. -- CLOVR - FE FULL-BODY VR SCRIPT
  2010.  
  2011. -- April 21st Update - TOOL HOLDING ADDED
  2012.  
  2013. -- | made by 0866 and Abacaxl
  2014. -- | tysm unverified
  2015.  
  2016. --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
  2017.  
  2018. --|| Settings:
  2019. local StudsOffset = 0 -- Character height (negative if you're too high)
  2020. local Smoothness = .5 -- Character interpolation (0.1 - 1 = smooth - rigid)
  2021. local AnchorCharacter = false -- Prevent physics from causing inconsistencies
  2022. local HideCharacter = false -- Hide character on a platform
  2023. local NoCollision = false -- Disable player collision
  2024. local ChatEnabled = true -- See chat on your left hand in-game
  2025. local ChatLocalRange = 75 -- Local chat range
  2026. local ViewportEnabled = true -- View nearby players in a frame
  2027. local ViewportRange = 30 -- Maximum distance players are updated
  2028. local RagdollEnabled = true -- Use your character instead of hats (NetworkOwner vulnerability)
  2029. local RagdollHeadMovement = true -- Move your head separately from your body (+9 second wait)
  2030. local AutoRun = false -- Run script on respawn
  2031. local AutoRespawn = true -- Kill your real body when your virtual body dies
  2032. local WearAllAccessories = true -- Use all leftover hats for the head
  2033. local AccurateHandPosition = true -- Move your Roblox hands according to your real hands
  2034. local AccessorySettings = {
  2035. LeftArm = "",
  2036. RightArm = "",
  2037. LeftLeg = "",
  2038. RightLeg = "",
  2039. Torso = "",
  2040. Head = true,
  2041. BlockArms = true,
  2042. BlockLegs = true,
  2043. BlockTorso = true,
  2044. LimbOffset = CFrame.Angles(math.rad(90), 0, 0)
  2045. }
  2046. local FootPlacementSettings = {
  2047. RightOffset = Vector3.new(.5, 0, 0),
  2048. LeftOffset = Vector3.new(-.5, 0, 0)
  2049. }
  2050. --|| Script:
  2051. local Script = nil
  2052. Script = function()
  2053. --[[
  2054. Variables
  2055. --]]
  2056. local Players = game:GetService("Players")
  2057. local Client = Players.LocalPlayer
  2058. local Character = Client.Character or Client.CharacterAdded:Wait()
  2059. local WeldBase = reanimation:WaitForChild("HumanoidRootPart")
  2060. local ArmBase = Character:FindFirstChild("RightHand") or Character:FindFirstChild("Right Arm") or WeldBase
  2061. local Backpack = Client:WaitForChild("Backpack")
  2062. local Mouse = Client:GetMouse()
  2063. local Camera = workspace.CurrentCamera
  2064. local VRService = game:GetService("VRService")
  2065. local VRReady = VRService.VREnabled
  2066. local UserInputService = game:GetService("UserInputService")
  2067. local RunService = game:GetService("RunService")
  2068. local HttpService = game:GetService("HttpService")
  2069. local StarterGui = game:GetService("StarterGui")
  2070. local HeadAccessories = {}
  2071. local UsedAccessories = {}
  2072. local Pointer = false
  2073. local Point1 = false
  2074. local Point2 = false
  2075. local VirtualRig = game:GetObjects("rbxassetid://4468539481")[1]
  2076. local VirtualBody = game:GetObjects("rbxassetid://4464983829")[1]
  2077. local Anchor = Instance.new("Part")
  2078. if _G.hatCLOVR == true then
  2079. VirtualRig.Parent = workspace
  2080. VirtualRig.HumanoidRootPart.CFrame = hrp.CFrame
  2081. wait()
  2082. end
  2083. Anchor.Anchored = true
  2084. Anchor.Transparency = 1
  2085. Anchor.CanCollide = false
  2086. Anchor.Parent = workspace
  2087. if RagdollEnabled then
  2088. print("RagdollEnabled, thank you for using CLOVR!")
  2089. local NetworkAccess =
  2090. coroutine.create(
  2091. function()
  2092. settings().Physics.AllowSleep = false
  2093. --[[
  2094. while true do
  2095. game:GetService("RunService").RenderStepped:Wait()
  2096. for _, Players in next, game:GetService("Players"):GetChildren() do
  2097. if Players ~= game:GetService("Players").LocalPlayer then
  2098. Players.MaximumSimulationRadius = 0.1
  2099. Players.SimulationRadius = 0
  2100. end
  2101. end
  2102. game:GetService("Players").LocalPlayer.MaximumSimulationRadius = math.pow(math.huge, math.huge)
  2103. game:GetService("Players").LocalPlayer.SimulationRadius = math.huge * math.huge
  2104. end
  2105. ]]
  2106. end
  2107. )
  2108. coroutine.resume(NetworkAccess)
  2109. end
  2110. StarterGui:SetCore("VRLaserPointerMode", 3)
  2111. --[[
  2112. Character Protection
  2113. --]]
  2114. local CharacterCFrame = WeldBase.CFrame
  2115. if not RagdollEnabled then
  2116. Character.Humanoid.AnimationPlayed:Connect(
  2117. function(Animation)
  2118. Animation:Stop()
  2119. end
  2120. )
  2121. for _, Track in next, Character.Humanoid:GetPlayingAnimationTracks() do
  2122. Track:Stop()
  2123. end
  2124. if HideCharacter then
  2125. local Platform = Instance.new("Part")
  2126. Platform.Anchored = true
  2127. Platform.Size = Vector3.new(100, 5, 100)
  2128. Platform.CFrame = CFrame.new(0, 10000, 0)
  2129. Platform.Transparency = 1
  2130. Platform.Parent = workspace
  2131. Character:MoveTo(Platform.Position + Vector3.new(0, 5, 0))
  2132. wait(.5)
  2133. end
  2134. if AnchorCharacter then
  2135. for _, Part in pairs(Character:GetChildren()) do
  2136. if Part:IsA("BasePart") then
  2137. Part.Anchored = true
  2138. end
  2139. end
  2140. end
  2141. end
  2142. --[[
  2143. Functions
  2144. --]]
  2145. function Tween(Object, Style, Direction, Time, Goal)
  2146. local tweenInfo = TweenInfo.new(Time, Enum.EasingStyle[Style], Enum.EasingDirection[Direction])
  2147. local tween = game:GetService("TweenService"):Create(Object, tweenInfo, Goal)
  2148. tween.Completed:Connect(
  2149. function()
  2150. tween:Destroy()
  2151. end
  2152. )
  2153. tween:Play()
  2154. return tween
  2155. end
  2156. local function GetMotorForLimb(Limb)
  2157. for _, Motor in next, Character:GetDescendants() do
  2158. if Motor:IsA("Motor6D") and Motor.Part1 == Limb then
  2159. return Motor
  2160. end
  2161. end
  2162. end
  2163. local function CreateAlignment(Limb, Part0)
  2164. local Attachment0 = Instance.new("Attachment", Part0 or Anchor)
  2165. local Attachment1 = Instance.new("Attachment", Limb)
  2166. local Orientation = Instance.new("AlignOrientation")
  2167. local Position = Instance.new("AlignPosition")
  2168. Orientation.Attachment0 = Attachment1
  2169. Orientation.Attachment1 = Attachment0
  2170. Orientation.RigidityEnabled = false
  2171. Orientation.MaxTorque = 20000
  2172. Orientation.Responsiveness = 40
  2173. Orientation.Parent = reanimation["HumanoidRootPart"]
  2174.  
  2175. Orientation.Name = Limb.Name.."'s AlignRot"
  2176. Orientation.MaxAngularVelocity = 100
  2177.  
  2178. Position.Attachment0 = Attachment1
  2179. Position.Attachment1 = Attachment0
  2180. Position.RigidityEnabled = false
  2181. Position.MaxForce = 40000
  2182. Position.Responsiveness = 40
  2183. Position.Parent = reanimation["HumanoidRootPart"]
  2184.  
  2185. Position.Name = Limb.Name.."'s AlignPos"
  2186. Position.MaxVelocity = 100
  2187.  
  2188. Limb.Massless = false
  2189. local Motor = GetMotorForLimb(Limb)
  2190. if Motor then
  2191. Motor:Destroy()
  2192. end
  2193. return function(CF, Local)
  2194. if Local then
  2195. Attachment0.CFrame = CF
  2196. else
  2197. Attachment0.WorldCFrame = CF
  2198. end
  2199. end
  2200. end
  2201. local function GetExtraTool()
  2202. for _, Tool in next, Character:GetChildren() do
  2203. if Tool:IsA("Tool") and not Tool.Name:match("LIMB_TOOL") then
  2204. return Tool
  2205. end
  2206. end
  2207. end
  2208. local function GetGripForHandle(Handle)
  2209. for _, Weld in next, Character:GetDescendants() do
  2210. if Weld:IsA("Weld") and (Weld.Part0 == Handle or Weld.Part1 == Handle) then
  2211. return Weld
  2212. end
  2213. end
  2214. wait(.2)
  2215. for _, Weld in next, Character:GetDescendants() do
  2216. if Weld:IsA("Weld") and (Weld.Part0 == Handle or Weld.Part1 == Handle) then
  2217. return Weld
  2218. end
  2219. end
  2220. end
  2221. local function CreateRightGrip(Handle)
  2222. local RightGrip = Instance.new("Weld")
  2223. RightGrip.Name = "RightGrip"
  2224. RightGrip.Part1 = Handle
  2225. RightGrip.Part0 = WeldBase
  2226. RightGrip.Parent = WeldBase
  2227. return RightGrip
  2228. end
  2229. local function CreateAccessory(Accessory, DeleteMeshes)
  2230. if not Accessory then
  2231. return
  2232. end
  2233. local HatAttachment = Accessory.Handle:FindFirstChildWhichIsA("Attachment")
  2234. local HeadAttachment = VirtualRig:FindFirstChild(HatAttachment.Name, true)
  2235. local BasePart = HeadAttachment.Parent
  2236. local HatAtt = HatAttachment.CFrame
  2237. local HeadAtt = HeadAttachment.CFrame
  2238. if DeleteMeshes then
  2239. if Accessory.Handle:FindFirstChild("Mesh") then
  2240. Accessory.Handle.Mesh:Destroy()
  2241. end
  2242. end
  2243. wait()
  2244. local Handle = Accessory:WaitForChild("Handle")
  2245. if Handle:FindFirstChildWhichIsA("Weld", true) then
  2246. Handle:FindFirstChildWhichIsA("Weld", true):Destroy()
  2247. Handle:BreakJoints()
  2248. else
  2249. Handle:BreakJoints()
  2250. end
  2251. Handle.Massless = true
  2252. Handle.Transparency = 0.5
  2253. UsedAccessories[Accessory] = true
  2254. local RightGrip = CreateRightGrip(Handle)
  2255. wait()
  2256. for _, Object in pairs(Handle:GetDescendants()) do
  2257. if not Object:IsA("BasePart") then
  2258. pcall(
  2259. function()
  2260. Object.Transparency = 1
  2261. end
  2262. )
  2263. pcall(
  2264. function()
  2265. Object.Enabled = false
  2266. end
  2267. )
  2268. end
  2269. end
  2270. return Handle, RightGrip, HatAtt, HeadAtt, BasePart
  2271. end
  2272. local function GetHeadAccessories()
  2273. for _, Accessory in next, Character:GetChildren() do
  2274. if Accessory:IsA("Accessory") and not UsedAccessories[Accessory] then
  2275. local Handle, RightGrip, HatAtt, HeadAtt, BasePart = CreateAccessory(Accessory)
  2276. table.insert(HeadAccessories, {Handle, RightGrip, HatAtt, HeadAtt, BasePart})
  2277. do
  2278. Handle.Transparency = 1
  2279. end
  2280. if not WearAllAccessories then
  2281. break
  2282. end
  2283. end
  2284. end
  2285. end
  2286. --[[
  2287. VR Replication Setup
  2288. --]]
  2289. if not RagdollEnabled then
  2290. LeftHandle, LeftHandGrip =
  2291. CreateAccessory(Character:FindFirstChild(AccessorySettings.LeftArm), AccessorySettings.BlockArms)
  2292. RightHandle, RightHandGrip =
  2293. CreateAccessory(Character:FindFirstChild(AccessorySettings.RightArm), AccessorySettings.BlockArms)
  2294. LeftHipHandle, LeftLegGrip =
  2295. CreateAccessory(Character:FindFirstChild(AccessorySettings.LeftLeg), AccessorySettings.BlockLegs)
  2296. RightHipHandle, RightLegGrip =
  2297. CreateAccessory(Character:FindFirstChild(AccessorySettings.RightLeg), AccessorySettings.BlockLegs)
  2298. TorsoHandle, TorsoGrip =
  2299. CreateAccessory(Character:FindFirstChild(AccessorySettings.Torso), AccessorySettings.BlockTorso)
  2300. GetHeadAccessories()
  2301. elseif RagdollEnabled then
  2302. if RagdollHeadMovement then
  2303. Permadeath()
  2304. --if _G.
  2305. MoveHead = CreateAlignment(reanimation["Head"])
  2306. end
  2307. --if _G.hatCLOVR == false then
  2308. MoveRightArm = CreateAlignment(reanimation["Right Arm"])
  2309. MoveLeftArm = CreateAlignment(reanimation["Left Arm"])
  2310. MoveRightLeg = CreateAlignment(reanimation["Right Leg"])
  2311. MoveLeftLeg = CreateAlignment(reanimation["Left Leg"])
  2312. MoveTorso = CreateAlignment(reanimation["Torso"])
  2313. MoveRoot = CreateAlignment(reanimation["HumanoidRootPart"])
  2314. --else
  2315. --end
  2316. --
  2317. local function alignHats(Accessory)
  2318. local Attachment1 = Accessory.Handle:FindFirstChildWhichIsA("Attachment")
  2319. local Attachment0 = reanimation:FindFirstChild(tostring(Attachment1), true)
  2320. local Orientation = Instance.new("AlignOrientation")
  2321. local Position = Instance.new("AlignPosition")
  2322. print(Attachment1, Attachment0, Accessory)
  2323.  
  2324. Orientation.Attachment0 = Attachment1
  2325. Orientation.Attachment1 = Attachment0
  2326. Orientation.RigidityEnabled = false
  2327. Orientation.ReactionTorqueEnabled = true
  2328. Orientation.MaxTorque = 20000
  2329. Orientation.Responsiveness = 40
  2330. Orientation.Parent = reanimation["Head"]
  2331. Orientation.Name = (Accessory.Name.."'s AlignRot")
  2332.  
  2333. Position.Attachment0 = Attachment1
  2334. Position.Attachment1 = Attachment0
  2335. Position.RigidityEnabled = false
  2336. Position.ReactionForceEnabled = true
  2337. Position.MaxForce = 40000
  2338. Position.Responsiveness = 40
  2339. Position.Parent = reanimation["Head"]
  2340. Position.Name = (Accessory.Name.."'s AlignPos")
  2341.  
  2342. Accessory.Handle:FindFirstChildWhichIsA("Weld"):Destroy()
  2343. end
  2344. if RagdollHeadMovement then
  2345. for _, Accessory in next, reanimation:GetChildren() do
  2346. if Accessory:IsA("Accessory") and Accessory:FindFirstChild("Handle") then
  2347. if _G.hatCLOVR == false then
  2348. alignHats(Accessory)
  2349. elseif not table.find(hats, Accessory.Name) then
  2350. alignHats(Accessory)
  2351. end
  2352. end
  2353. end
  2354. end
  2355.  
  2356. end
  2357. --[[
  2358. Movement
  2359. --]]
  2360. VirtualRig.Name = "VirtualRig"
  2361. VirtualRig.RightFoot.BodyPosition.Position = CharacterCFrame.p
  2362. VirtualRig.LeftFoot.BodyPosition.Position = CharacterCFrame.p
  2363. if _G.hatCLOVR == false then
  2364. VirtualRig.Parent = workspace
  2365. end
  2366. VirtualRig:SetPrimaryPartCFrame(CharacterCFrame)
  2367. VirtualRig.Humanoid.Health = 0
  2368. VirtualRig:BreakJoints()
  2369. if _G.hatCLOVR == false then
  2370. for i,v in pairs(VirtualRig:GetChildren()) do
  2371. if v:IsA("BasePart") then
  2372. v.CFrame = character1.HumanoidRootPart.CFrame
  2373. end
  2374. end
  2375. end
  2376. --
  2377. VirtualBody.Parent = workspace
  2378. VirtualBody.Name = "VirtualBody"
  2379. VirtualBody.Humanoid.WalkSpeed = 8
  2380. VirtualBody.Humanoid.CameraOffset = Vector3.new(0, StudsOffset, 0)
  2381. VirtualBody:SetPrimaryPartCFrame(CharacterCFrame)
  2382. VirtualBody.Humanoid.Died:Connect(
  2383. function()
  2384. print("Virtual death")
  2385. if AutoRespawn then
  2386. Character:BreakJoints()
  2387. if RagdollHeadMovement and RagdollEnabled then
  2388. --Network:Unclaim()
  2389. Respawn()
  2390. end
  2391. end
  2392. end
  2393. )
  2394. --
  2395. Camera.CameraSubject = VirtualBody.Humanoid
  2396.  
  2397. if _G.hatCLOVR == true then
  2398. character1.Humanoid:ChangeState(16)
  2399. character1.Torso["Left Hip"]:Destroy()
  2400. if _G.hideCharacter == true then
  2401. character1.Torso.CFrame = CFrame.new(_G.hideCharacterPosition[1], _G.hideCharacterPosition[2], _G.hideCharacterPosition[3])
  2402. wait(0.1)
  2403. character1.Torso.Anchored = true
  2404. for i,v in pairs(character1:GetChildren()) do
  2405. if v:IsA("BasePart") then
  2406. v.Transparency = 1
  2407. end
  2408. end
  2409. else
  2410. character1.Torso.Anchored = true
  2411. hrp:FindFirstChildWhichIsA("Motor6D"):Destroy()
  2412. end
  2413. end
  2414.  
  2415. Character.Humanoid.WalkSpeed = 0
  2416. Character.Humanoid.JumpPower = 1
  2417. for _, Part in next, VirtualBody:GetChildren() do
  2418. if Part:IsA("BasePart") then
  2419. Part.Transparency = 1
  2420. end
  2421. end
  2422. for _, Part in next, VirtualRig:GetChildren() do
  2423. if Part:IsA("BasePart") then
  2424. Part.Transparency = 1
  2425. end
  2426. end
  2427. if not VRReady then
  2428. VirtualRig.RightUpperArm.ShoulderConstraint.RigidityEnabled = true
  2429. VirtualRig.LeftUpperArm.ShoulderConstraint.RigidityEnabled = true
  2430. end
  2431. local OnMoving =
  2432. RunService.Stepped:Connect(
  2433. function()
  2434. local Direction = Character.Humanoid.MoveDirection
  2435. local Start = VirtualBody.HumanoidRootPart.Position
  2436. local Point = Start + Direction * 6
  2437. VirtualBody.Humanoid:MoveTo(Point)
  2438. end
  2439. )
  2440. Character.Humanoid.Jumping:Connect(
  2441. function()
  2442. VirtualBody.Humanoid.Jump = true
  2443. end
  2444. )
  2445. UserInputService.JumpRequest:Connect(
  2446. function()
  2447. VirtualBody.Humanoid.Jump = true
  2448. end
  2449. )
  2450. --[[
  2451. VR Replication
  2452. --]]
  2453. if RagdollEnabled then
  2454. for _, Part in pairs(Character:GetDescendants()) do
  2455. if Part:IsA("BasePart") and Part.Name == "Handle" and Part.Parent:IsA("Accessory") then
  2456. Part.LocalTransparencyModifier = _G.hatTransparency
  2457.  
  2458. if Part:FindFirstChild("HatAttachment") or Part:FindFirstChild("HairAttachment") or Part:FindFirstChild("FaceFrontAttachment") or Part:FindFirstChild("FaceCenterAttachment") then
  2459. if _G.hatCLOVR == false then
  2460. Part.LocalTransparencyModifier = 1
  2461. elseif not table.find(hats, Part.Parent.Name) then
  2462. Part.LocalTransparencyModifier = 1
  2463. else
  2464. Part.LocalTransparencyModifier = _G.bodyTransparency
  2465. end
  2466. end
  2467.  
  2468. elseif Part:IsA("BasePart") and Part.Transparency < 0.5 and Part.Name ~= "Head" then
  2469. if _G.hatCLOVR == false then
  2470. Part.LocalTransparencyModifier = _G.bodyTransparency
  2471. end
  2472. elseif Part:IsA("BasePart") and Part.Name == "Head" then
  2473. if _G.hatCLOVR == false then
  2474. Part.LocalTransparencyModifier = 1
  2475. end
  2476. end
  2477. if not Part:IsA("BasePart") and not Part:IsA("AlignPosition") and not Part:IsA("AlignOrientation") then
  2478. pcall(
  2479. function()
  2480. Part.Transparency = 1
  2481. end
  2482. )
  2483. pcall(
  2484. function()
  2485. if _G.hatCLOVR == false then
  2486. Part.Enabled = false
  2487. end
  2488. end
  2489. )
  2490. end
  2491. end
  2492. end
  2493. local FootUpdateDebounce = tick()
  2494. local function FloorRay(Part, Distance)
  2495. local Position = Part.CFrame.p
  2496. local Target = Position - Vector3.new(0, Distance, 0)
  2497. local Line = Ray.new(Position, (Target - Position).Unit * Distance)
  2498. local FloorPart, FloorPosition, FloorNormal =
  2499. workspace:FindPartOnRayWithIgnoreList(Line, {VirtualRig, VirtualBody, Character})
  2500. if FloorPart then
  2501. return FloorPart, FloorPosition, FloorNormal, (FloorPosition - Position).Magnitude
  2502. else
  2503. return nil, Target, Vector3.new(), Distance
  2504. end
  2505. end
  2506. local function Flatten(CF)
  2507. local X, Y, Z = CF.X, CF.Y, CF.Z
  2508. local LX, LZ = CF.lookVector.X, CF.lookVector.Z
  2509. return CFrame.new(X, Y, Z) * CFrame.Angles(0, math.atan2(LX, LZ), 0)
  2510. end
  2511. local FootTurn = 1
  2512. local function FootReady(Foot, Target)
  2513. local MaxDist
  2514. if Character.Humanoid.MoveDirection.Magnitude > 0 then
  2515. MaxDist = .5
  2516. else
  2517. MaxDist = 1
  2518. end
  2519. local PastThreshold = (Foot.Position - Target.Position).Magnitude > MaxDist
  2520. local PastTick = tick() - FootUpdateDebounce >= 2
  2521. if PastThreshold or PastTick then
  2522. FootUpdateDebounce = tick()
  2523. end
  2524. return PastThreshold or PastTick
  2525. end
  2526. local function FootYield()
  2527. local RightFooting = VirtualRig.RightFoot.BodyPosition
  2528. local LeftFooting = VirtualRig.LeftFoot.BodyPosition
  2529. local LowerTorso = VirtualRig.LowerTorso
  2530. local Yield = tick()
  2531. repeat
  2532. RunService.Stepped:Wait()
  2533. if
  2534. (LowerTorso.Position - RightFooting.Position).Y > 4 or
  2535. (LowerTorso.Position - LeftFooting.Position).Y > 4 or
  2536. ((LowerTorso.Position - RightFooting.Position) * Vector3.new(1, 0, 1)).Magnitude > 4 or
  2537. ((LowerTorso.Position - LeftFooting.Position) * Vector3.new(1, 0, 1)).Magnitude > 4
  2538. then
  2539. break
  2540. end
  2541. until tick() - Yield >= .17
  2542. end
  2543. local function UpdateFooting()
  2544. if not VirtualRig:FindFirstChild("LowerTorso") then
  2545. wait()
  2546. return
  2547. end
  2548. local Floor, FloorPosition, FloorNormal, Dist = FloorRay(VirtualRig.LowerTorso, 3)
  2549. Dist = math.clamp(Dist, 0, 5)
  2550. local FootTarget =
  2551. VirtualRig.LowerTorso.CFrame * CFrame.new(FootPlacementSettings.RightOffset) - Vector3.new(0, Dist, 0) +
  2552. Character.Humanoid.MoveDirection * (VirtualBody.Humanoid.WalkSpeed / 8) * 2
  2553. if FootReady(VirtualRig.RightFoot, FootTarget) then
  2554. VirtualRig.RightFoot.BodyPosition.Position = FootTarget.p
  2555. VirtualRig.RightFoot.BodyGyro.CFrame = Flatten(VirtualRig.LowerTorso.CFrame)
  2556. end
  2557. FootYield()
  2558. local FootTarget =
  2559. VirtualRig.LowerTorso.CFrame * CFrame.new(FootPlacementSettings.LeftOffset) - Vector3.new(0, Dist, 0) +
  2560. Character.Humanoid.MoveDirection * (VirtualBody.Humanoid.WalkSpeed / 8) * 2
  2561. if FootReady(VirtualRig.LeftFoot, FootTarget) then
  2562. VirtualRig.LeftFoot.BodyPosition.Position = FootTarget.p
  2563. VirtualRig.LeftFoot.BodyGyro.CFrame = Flatten(VirtualRig.LowerTorso.CFrame)
  2564. end
  2565. end
  2566. local function UpdateTorsoPosition()
  2567. if not RagdollEnabled then
  2568. if TorsoHandle then
  2569. local Positioning = VirtualRig.UpperTorso.CFrame
  2570. if not TorsoGrip or not TorsoGrip.Parent then
  2571. TorsoGrip = CreateRightGrip(TorsoHandle)
  2572. end
  2573. local Parent = TorsoGrip.Parent
  2574. TorsoGrip.C1 = CFrame.new()
  2575. TorsoGrip.C0 =
  2576. TorsoGrip.C0:Lerp(
  2577. WeldBase.CFrame:ToObjectSpace(Positioning * CFrame.new(0, -0.25, 0) * AccessorySettings.LimbOffset),
  2578. Smoothness
  2579. )
  2580. TorsoGrip.Parent = nil
  2581. TorsoGrip.Parent = Parent
  2582. end
  2583. else
  2584. local Positioning = VirtualRig.UpperTorso.CFrame
  2585. MoveTorso(Positioning * CFrame.new(0, -0.25, 0))
  2586. MoveRoot(Positioning * CFrame.new(0, -0.25, 0))
  2587. end
  2588. end
  2589. local function UpdateLegPosition()
  2590. if not RagdollEnabled then
  2591. if RightHipHandle then
  2592. local Positioning =
  2593. VirtualRig.RightLowerLeg.CFrame:Lerp(VirtualRig.RightFoot.CFrame, 0.5) + Vector3.new(0, 0.5, 0)
  2594. if not RightHipHandle or not RightHipHandle.Parent then
  2595. RightLegGrip = CreateRightGrip(RightHipHandle)
  2596. end
  2597. local Parent = RightLegGrip.Parent
  2598. RightLegGrip.C1 = CFrame.new()
  2599. RightLegGrip.C0 =
  2600. RightLegGrip.C0:Lerp(
  2601. WeldBase.CFrame:ToObjectSpace(Positioning * AccessorySettings.LimbOffset),
  2602. Smoothness
  2603. )
  2604. RightLegGrip.Parent = nil
  2605. RightLegGrip.Parent = Parent
  2606. end
  2607. if LeftHipHandle then
  2608. local Positioning =
  2609. VirtualRig.LeftLowerLeg.CFrame:Lerp(VirtualRig.LeftFoot.CFrame, 0.5) + Vector3.new(0, 0.5, 0)
  2610. if not LeftLegGrip or not LeftLegGrip.Parent then
  2611. LeftLegGrip = CreateRightGrip(LeftHipHandle)
  2612. end
  2613. local Parent = LeftLegGrip.Parent
  2614. LeftLegGrip.C1 = CFrame.new()
  2615. LeftLegGrip.C0 =
  2616. LeftLegGrip.C0:Lerp(
  2617. WeldBase.CFrame:ToObjectSpace(Positioning * AccessorySettings.LimbOffset),
  2618. Smoothness
  2619. )
  2620. LeftLegGrip.Parent = nil
  2621. LeftLegGrip.Parent = Parent
  2622. end
  2623. else
  2624. do
  2625. local Positioning =
  2626. VirtualRig.RightLowerLeg.CFrame:Lerp(VirtualRig.RightFoot.CFrame, 0.5) *
  2627. CFrame.Angles(0, math.rad(180), 0) +
  2628. Vector3.new(0, 0.5, 0)
  2629. MoveRightLeg(Positioning)
  2630. end
  2631. do
  2632. local Positioning =
  2633. VirtualRig.LeftLowerLeg.CFrame:Lerp(VirtualRig.LeftFoot.CFrame, 0.5) *
  2634. CFrame.Angles(0, math.rad(180), 0) +
  2635. Vector3.new(0, 0.5, 0)
  2636. MoveLeftLeg(Positioning)
  2637. end
  2638. end
  2639. end
  2640. warn("VRReady is", VRReady)
  2641. local function OnUserCFrameChanged(UserCFrame, Positioning, IgnoreTorso)
  2642. local Positioning = Camera.CFrame * Positioning
  2643. if not IgnoreTorso then
  2644. UpdateTorsoPosition()
  2645. UpdateLegPosition()
  2646. end
  2647. if not RagdollEnabled then
  2648. if UserCFrame == Enum.UserCFrame.Head and AccessorySettings.Head then
  2649. for _, Table in next, HeadAccessories do
  2650. local Handle, RightGrip, HatAtt, HeadAtt, BasePart = unpack(Table)
  2651. local LocalPositioning = Positioning
  2652. if not RightGrip or not RightGrip.Parent then
  2653. RightGrip = CreateRightGrip(Handle)
  2654. Table[2] = RightGrip
  2655. end
  2656. local Parent = RightGrip.Parent
  2657. if BasePart then
  2658. LocalPositioning = BasePart.CFrame * HeadAtt
  2659. end
  2660. RightGrip.C1 = HatAtt
  2661. RightGrip.C0 = RightGrip.C0:Lerp(WeldBase.CFrame:ToObjectSpace(LocalPositioning), Smoothness)
  2662. RightGrip.Parent = nil
  2663. RightGrip.Parent = Parent
  2664. end
  2665. elseif RightHandle and UserCFrame == Enum.UserCFrame.RightHand and AccessorySettings.RightArm then
  2666. local HandPosition = Positioning
  2667. local LocalPositioning = Positioning
  2668. if not RightHandGrip or not RightHandGrip.Parent then
  2669. RightHandGrip = CreateRightGrip(RightHandle)
  2670. end
  2671. if AccurateHandPosition then
  2672. HandPosition = HandPosition * CFrame.new(0, 0, 1)
  2673. end
  2674. if not VRReady then
  2675. local HeadRotation = Camera.CFrame - Camera.CFrame.p
  2676. HandPosition =
  2677. VirtualRig.RightUpperArm.CFrame:Lerp(VirtualRig.RightLowerArm.CFrame, 0.5) *
  2678. AccessorySettings.LimbOffset
  2679. --LocalPositioning = (HeadRotation + (HandPosition * CFrame.new(0, 0, 1)).p) * CFrame.Angles(math.rad(-45), 0, 0)
  2680. LocalPositioning = HandPosition * CFrame.new(0, 0, 1) * CFrame.Angles(math.rad(-180), 0, 0)
  2681. if Point2 then
  2682. VirtualRig.RightUpperArm.Aim.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
  2683. VirtualRig.RightUpperArm.Aim.CFrame = Camera.CFrame * AccessorySettings.LimbOffset
  2684. elseif VirtualRig.RightUpperArm.Aim.MaxTorque ~= Vector3.new(0, 0, 0) then
  2685. VirtualRig.RightUpperArm.Aim.MaxTorque = Vector3.new(0, 0, 0)
  2686. end
  2687. elseif AccurateHandPosition then
  2688. LocalPositioning = HandPosition
  2689. end
  2690. local Parent = RightHandGrip.Parent
  2691. RightHandGrip.C1 = CFrame.new()
  2692. RightHandGrip.C0 = RightHandGrip.C0:Lerp(WeldBase.CFrame:ToObjectSpace(HandPosition), Smoothness)
  2693. RightHandGrip.Parent = nil
  2694. RightHandGrip.Parent = Parent
  2695. --
  2696. local EquippedTool = GetExtraTool()
  2697. if EquippedTool and EquippedTool:FindFirstChild("Handle") then
  2698. local EquippedGrip = GetGripForHandle(EquippedTool.Handle)
  2699. local Parent = EquippedGrip.Parent
  2700. local ArmBaseCFrame = ArmBase.CFrame
  2701. if ArmBase.Name == "Right Arm" then
  2702. ArmBaseCFrame = ArmBaseCFrame
  2703. end
  2704. EquippedGrip.C1 = EquippedTool.Grip
  2705. EquippedGrip.C0 = EquippedGrip.C0:Lerp(ArmBaseCFrame:ToObjectSpace(LocalPositioning), Smoothness)
  2706. EquippedGrip.Parent = nil
  2707. EquippedGrip.Parent = Parent
  2708. end
  2709. elseif LeftHandle and UserCFrame == Enum.UserCFrame.LeftHand and AccessorySettings.LeftArm then
  2710. local HandPosition = Positioning
  2711. if not LeftHandGrip or not LeftHandGrip.Parent then
  2712. LeftHandGrip = CreateRightGrip(LeftHandle)
  2713. end
  2714. if AccurateHandPosition then
  2715. HandPosition = HandPosition * CFrame.new(0, 0, 1)
  2716. end
  2717. if not VRReady then
  2718. HandPosition =
  2719. VirtualRig.LeftUpperArm.CFrame:Lerp(VirtualRig.LeftLowerArm.CFrame, 0.5) *
  2720. AccessorySettings.LimbOffset
  2721. --warn("Setting HandPosition to hands")
  2722. if Point1 then
  2723. VirtualRig.LeftUpperArm.Aim.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
  2724. VirtualRig.LeftUpperArm.Aim.CFrame = Camera.CFrame * AccessorySettings.LimbOffset
  2725. elseif VirtualRig.LeftUpperArm.Aim.MaxTorque ~= Vector3.new(0, 0, 0) then
  2726. VirtualRig.LeftUpperArm.Aim.MaxTorque = Vector3.new(0, 0, 0)
  2727. end
  2728. end
  2729. local Parent = LeftHandGrip.Parent
  2730. LeftHandGrip.C1 = CFrame.new()
  2731. LeftHandGrip.C0 = LeftHandGrip.C0:Lerp(WeldBase.CFrame:ToObjectSpace(HandPosition), Smoothness)
  2732. LeftHandGrip.Parent = nil
  2733. LeftHandGrip.Parent = Parent
  2734. end
  2735. end
  2736. if RagdollEnabled then
  2737. if UserCFrame == Enum.UserCFrame.Head and RagdollHeadMovement then
  2738. MoveHead(Positioning)
  2739. elseif UserCFrame == Enum.UserCFrame.RightHand then
  2740. local Positioning = Positioning
  2741. if not VRReady then
  2742. Positioning = VirtualRig.RightUpperArm.CFrame:Lerp(VirtualRig.RightLowerArm.CFrame, 0.5)
  2743. elseif AccurateHandPosition then
  2744. Positioning = Positioning * CFrame.new(0, 0, 1)
  2745. end
  2746. if VRReady then
  2747. Positioning = Positioning * AccessorySettings.LimbOffset
  2748. end
  2749. MoveRightArm(Positioning)
  2750. if Point2 then
  2751. VirtualRig.RightUpperArm.Aim.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
  2752. VirtualRig.RightUpperArm.Aim.CFrame = Camera.CFrame * AccessorySettings.LimbOffset
  2753. elseif VirtualRig.RightUpperArm.Aim.MaxTorque ~= Vector3.new(0, 0, 0) then
  2754. VirtualRig.RightUpperArm.Aim.MaxTorque = Vector3.new(0, 0, 0)
  2755. end
  2756. elseif UserCFrame == Enum.UserCFrame.LeftHand then
  2757. local Positioning = Positioning
  2758. if not VRReady then
  2759. Positioning = VirtualRig.LeftUpperArm.CFrame:Lerp(VirtualRig.LeftLowerArm.CFrame, 0.5)
  2760. elseif AccurateHandPosition then
  2761. Positioning = Positioning * CFrame.new(0, 0, 1)
  2762. end
  2763. if VRReady then
  2764. Positioning = Positioning * AccessorySettings.LimbOffset
  2765. end
  2766. MoveLeftArm(Positioning)
  2767. if Point1 then
  2768. VirtualRig.LeftUpperArm.Aim.MaxTorque = Vector3.new(math.huge, math.huge, math.huge)
  2769. VirtualRig.LeftUpperArm.Aim.CFrame = Camera.CFrame * AccessorySettings.LimbOffset
  2770. elseif VirtualRig.LeftUpperArm.Aim.MaxTorque ~= Vector3.new(0, 0, 0) then
  2771. VirtualRig.LeftUpperArm.Aim.MaxTorque = Vector3.new(0, 0, 0)
  2772. end
  2773. end
  2774. end
  2775. if UserCFrame == Enum.UserCFrame.Head then
  2776. VirtualRig.Head.CFrame = Positioning
  2777. elseif UserCFrame == Enum.UserCFrame.RightHand and VRReady then
  2778. VirtualRig.RightHand.CFrame = Positioning
  2779. elseif UserCFrame == Enum.UserCFrame.LeftHand and VRReady then
  2780. VirtualRig.LeftHand.CFrame = Positioning
  2781. end
  2782. if not VRReady and VirtualRig.LeftHand.Anchored then
  2783. VirtualRig.RightHand.Anchored = false
  2784. VirtualRig.LeftHand.Anchored = false
  2785. elseif VRReady and not VirtualRig.LeftHand.Anchored then
  2786. VirtualRig.RightHand.Anchored = true
  2787. VirtualRig.LeftHand.Anchored = true
  2788. end
  2789. end
  2790. local CFrameChanged = VRService.UserCFrameChanged:Connect(OnUserCFrameChanged)
  2791. local OnStepped =
  2792. RunService.Stepped:Connect(
  2793. function()
  2794. for _, Part in pairs(VirtualRig:GetChildren()) do
  2795. if Part:IsA("BasePart") then
  2796. Part.CanCollide = false
  2797. end
  2798. end
  2799. if RagdollEnabled then
  2800. for _, Part in pairs(Character:GetChildren()) do
  2801. if Part:IsA("BasePart") then
  2802. Part.CanCollide = false
  2803. end
  2804. end
  2805. end
  2806. if NoCollision then
  2807. for _, Player in pairs(Players:GetPlayers()) do
  2808. if Player ~= Client and Player.Character then
  2809. local Descendants = Player.Character:GetDescendants()
  2810. for i = 1, #Descendants do
  2811. local Part = Descendants[i]
  2812. if Part:IsA("BasePart") then
  2813. Part.CanCollide = false
  2814. Part.Velocity = Vector3.new()
  2815. Part.RotVelocity = Vector3.new()
  2816. end
  2817. end
  2818. end
  2819. end
  2820. end
  2821. end
  2822. )
  2823. local OnRenderStepped =
  2824. RunService.Stepped:Connect(
  2825. function()
  2826. Camera.CameraSubject = VirtualBody.Humanoid
  2827. if RagdollEnabled then
  2828. reanimation["HumanoidRootPart"].CFrame = VirtualRig.UpperTorso.CFrame
  2829. reanimation["HumanoidRootPart"].Velocity = Vector3.new(0, 0, 0)
  2830. end
  2831. if not VRReady then
  2832. OnUserCFrameChanged(Enum.UserCFrame.Head, CFrame.new(0, 0, 0))
  2833. OnUserCFrameChanged(Enum.UserCFrame.RightHand, CFrame.new(0, 0, 0), true)
  2834. OnUserCFrameChanged(Enum.UserCFrame.LeftHand, CFrame.new(0, 0, 0), true)
  2835. end
  2836. end
  2837. )
  2838. spawn(
  2839. function()
  2840. while Character and Character.Parent do
  2841. FootYield()
  2842. UpdateFooting()
  2843. end
  2844. end
  2845. )
  2846. --[[
  2847. Non-VR Support + VR Mechanics
  2848. --]]
  2849. local OnInput =
  2850. UserInputService.InputBegan:Connect(
  2851. function(Input, Processed)
  2852. if not Processed then
  2853. if _G.dualWieldGuns == false then
  2854. if _G.changeSomeStuff == false then
  2855. if Input.KeyCode == Enum.KeyCode.LeftControl or Input.KeyCode == Enum.KeyCode.ButtonL2 then
  2856. Tween(
  2857. VirtualBody.Humanoid,
  2858. "Elastic",
  2859. "Out",
  2860. 1,
  2861. {
  2862. CameraOffset = Vector3.new(0, StudsOffset - 1.5, 0)
  2863. }
  2864. )
  2865. end
  2866. else
  2867. if Input.KeyCode == Enum.KeyCode.LeftControl or Input.KeyCode == Enum.KeyCode.ButtonL3 then
  2868. Tween(
  2869. VirtualBody.Humanoid,
  2870. "Elastic",
  2871. "Out",
  2872. 1,
  2873. {
  2874. CameraOffset = Vector3.new(0, StudsOffset - 1.5, 0)
  2875. }
  2876. )
  2877. end
  2878. end
  2879. end
  2880. if Input.KeyCode == Enum.KeyCode.X then
  2881. if RagdollEnabled and RagdollHeadMovement then
  2882. --Network:Unclaim()
  2883. Respawn()
  2884. end
  2885. end
  2886. if Input.KeyCode == Enum.KeyCode.C then
  2887. VirtualBody:MoveTo(Mouse.Hit.p)
  2888. VirtualRig:MoveTo(Mouse.Hit.p)
  2889. end
  2890. end
  2891. if _G.changeSomeStuff == false then
  2892. if Input.KeyCode == Enum.KeyCode.LeftShift or Input.KeyCode == Enum.KeyCode.ButtonR2 then
  2893. Tween(
  2894. VirtualBody.Humanoid,
  2895. "Sine",
  2896. "Out",
  2897. 1,
  2898. {
  2899. WalkSpeed = 16
  2900. }
  2901. )
  2902. end
  2903. else
  2904. if Input.KeyCode == Enum.KeyCode.LeftShift or Input.KeyCode == Enum.KeyCode.ButtonR3 then
  2905. Tween(
  2906. VirtualBody.Humanoid,
  2907. "Sine",
  2908. "Out",
  2909. 1,
  2910. {
  2911. WalkSpeed = 16
  2912. }
  2913. )
  2914. end
  2915. end
  2916. if not VRReady and Input.UserInputType == Enum.UserInputType.MouseButton1 then
  2917. Point1 = true
  2918. end
  2919. if not VRReady and Input.UserInputType == Enum.UserInputType.MouseButton2 then
  2920. Point2 = true
  2921. end
  2922. if VRReady and Input.KeyCode == Enum.KeyCode.ButtonY then
  2923. Character:BreakJoints()
  2924. if RagdollEnabled and RagdollHeadMovement then
  2925. if _G.changeSomeStuff == true then
  2926. player1.CameraMaxZoomDistance = maxZoom
  2927. player1.CameraMinZoomDistance = minZoom
  2928. player1.CameraMode = cameraMode
  2929. end
  2930. --Network:Unclaim()
  2931. Respawn()
  2932. end
  2933. end
  2934. end
  2935. )
  2936. local OnInputEnded =
  2937. UserInputService.InputEnded:Connect(
  2938. function(Input, Processed)
  2939. if not Processed then
  2940. if _G.changeSomeStuff == false then
  2941. if Input.KeyCode == Enum.KeyCode.LeftControl or Input.KeyCode == Enum.KeyCode.ButtonL2 then
  2942. Tween(
  2943. VirtualBody.Humanoid,
  2944. "Elastic",
  2945. "Out",
  2946. 1,
  2947. {
  2948. CameraOffset = Vector3.new(0, StudsOffset, 0)
  2949. }
  2950. )
  2951. end
  2952. else
  2953. if Input.KeyCode == Enum.KeyCode.LeftControl or Input.KeyCode == Enum.KeyCode.ButtonL3 then
  2954. Tween(
  2955. VirtualBody.Humanoid,
  2956. "Elastic",
  2957. "Out",
  2958. 1,
  2959. {
  2960. CameraOffset = Vector3.new(0, StudsOffset, 0)
  2961. }
  2962. )
  2963. end
  2964. end
  2965. end
  2966. if _G.changeSomeStuff == false then
  2967. if Input.KeyCode == Enum.KeyCode.LeftShift or Input.KeyCode == Enum.KeyCode.ButtonR2 then
  2968. Tween(
  2969. VirtualBody.Humanoid,
  2970. "Sine",
  2971. "Out",
  2972. 1,
  2973. {
  2974. WalkSpeed = 8
  2975. }
  2976. )
  2977. end
  2978. else
  2979. if Input.KeyCode == Enum.KeyCode.LeftShift or Input.KeyCode == Enum.KeyCode.ButtonR3 then
  2980. Tween(
  2981. VirtualBody.Humanoid,
  2982. "Sine",
  2983. "Out",
  2984. 1,
  2985. {
  2986. WalkSpeed = 8
  2987. }
  2988. )
  2989. end
  2990. end
  2991. if not VRReady and Input.UserInputType == Enum.UserInputType.MouseButton1 then
  2992. Point1 = false
  2993. end
  2994. if not VRReady and Input.UserInputType == Enum.UserInputType.MouseButton2 then
  2995. Point2 = false
  2996. end
  2997. end
  2998. )
  2999. --[[
  3000. Proper Cleanup
  3001. --]]
  3002. local OnReset
  3003. OnReset =
  3004. Client.CharacterAdded:Connect(
  3005. function()
  3006. OnReset:Disconnect()
  3007. CFrameChanged:Disconnect()
  3008. OnStepped:Disconnect()
  3009. OnRenderStepped:Disconnect()
  3010. OnMoving:Disconnect()
  3011. OnInput:Disconnect()
  3012. OnInputEnded:Disconnect()
  3013. netlessLoop:Disconnect()
  3014. collisionLoop:Disconnect()
  3015. VirtualRig:Destroy()
  3016. VirtualBody:Destroy()
  3017. if vrAimer ~= nil then
  3018. vrAimer:Destroy()
  3019. end
  3020. if vrAimer2 ~= nil then
  3021. vrAimer2:Destroy()
  3022. end
  3023. if workspace:FindFirstChild("VRLaser") then
  3024. workspace:FindFirstChild("VRLaser"):Destroy()
  3025. end
  3026. if RagdollEnabled then
  3027. --Network:Unclaim()
  3028. end
  3029. if AutoRun then
  3030. delay(
  3031. 2,
  3032. function()
  3033. Script()
  3034. end
  3035. )
  3036. end
  3037. end
  3038. )
  3039. if ChatEnabled then
  3040. spawn(ChatHUDFunc)
  3041. end
  3042. if ViewportEnabled then
  3043. spawn(ViewHUDFunc)
  3044. end
  3045. do
  3046. --[[
  3047. Functions
  3048. --]]
  3049. local Players = game:GetService("Players")
  3050. local Client = Players.LocalPlayer
  3051. local VRService = game:GetService("VRService")
  3052. local VRReady = VRService.VREnabled
  3053. local UserInputService = game:GetService("UserInputService")
  3054. local RunService = game:GetService("RunService")
  3055. local Camera = workspace.CurrentCamera
  3056. --[[
  3057. Code
  3058. --]]
  3059. if VRReady then
  3060. local Pointer = game:GetObjects("rbxassetid://4476173280")[1]
  3061. Pointer.Parent = workspace
  3062. Pointer.Beam.Enabled = false
  3063. Pointer.Target.ParticleEmitter.Enabled = false
  3064. local RenderStepped =
  3065. RunService.RenderStepped:Connect(
  3066. function()
  3067. if Pointer.Beam.Enabled then
  3068. local RightHand = Camera.CFrame * VRService:GetUserCFrame(Enum.UserCFrame.RightHand)
  3069. local Target = RightHand * CFrame.new(0, 0, -10)
  3070. local Line = Ray.new(RightHand.p, (Target.p - RightHand.p).Unit * 128)
  3071. local Part, Position =
  3072. workspace:FindPartOnRayWithIgnoreList(Line, {VirtualRig, VirtualBody, Character, Pointer})
  3073. local Distance = (Position - RightHand.p).Magnitude
  3074. Pointer.Target.Position = Vector3.new(0, 0, -Distance)
  3075. Pointer.CFrame = RightHand
  3076. end
  3077. end
  3078. )
  3079. local Input =
  3080. UserInputService.InputBegan:Connect(
  3081. function(Input)
  3082. if Input.KeyCode == Enum.KeyCode.ButtonB then
  3083. Pointer.Beam.Enabled = not Pointer.Beam.Enabled
  3084. Pointer.Target.ParticleEmitter.Enabled = not Pointer.Target.ParticleEmitter.Enabled
  3085. end
  3086. end
  3087. )
  3088. --
  3089. local CharacterAdded
  3090. CharacterAdded =
  3091. Client.CharacterAdded:Connect(
  3092. function()
  3093. RenderStepped:Disconnect()
  3094. Input:Disconnect()
  3095. CharacterAdded:Disconnect()
  3096. Pointer:Destroy()
  3097. Pointer = nil
  3098. end
  3099. )
  3100. else
  3101. return
  3102. end
  3103. end
  3104. end
  3105. Permadeath = function()
  3106. if _G.hatCLOVR == false then
  3107. local ch = game.Players.LocalPlayer.Character
  3108. local prt = Instance.new("Model", workspace)
  3109. local z1 = Instance.new("Part", prt)
  3110. z1.Name = "Torso"
  3111. z1.CanCollide = false
  3112. z1.Anchored = true
  3113. local z2 = Instance.new("Part", prt)
  3114. z2.Name = "Head"
  3115. z2.Anchored = true
  3116. z2.CanCollide = false
  3117. local z3 = Instance.new("Humanoid", prt)
  3118. z3.Name = "Humanoid"
  3119. z1.Position = Vector3.new(0, 9999, 0)
  3120. z2.Position = Vector3.new(0, 9991, 0)
  3121. game.Players.LocalPlayer.Character = prt
  3122. wait(game.Players.RespawnTime/2)
  3123. warn("50%")
  3124. game.Players.LocalPlayer.Character = ch
  3125. wait(game.Players.RespawnTime/2 + 0.5)
  3126. warn("100%")
  3127. end
  3128. end
  3129. Respawn = function()
  3130. if _G.hatCLOVR == false then
  3131. local ch = game.Players.LocalPlayer.Character
  3132. local prt = Instance.new("Model", workspace)
  3133. local z1 = Instance.new("Part", prt)
  3134. z1.Name = "Torso"
  3135. z1.CanCollide = false
  3136. z1.Anchored = true
  3137. local z2 = Instance.new("Part", prt)
  3138. z2.Name = "Head"
  3139. z2.Anchored = true
  3140. z2.CanCollide = false
  3141. local z3 = Instance.new("Humanoid", prt)
  3142. z3.Name = "Humanoid"
  3143. z1.Position = Vector3.new(0, 9999, 0)
  3144. z2.Position = Vector3.new(0, 9991, 0)
  3145. game.Players.LocalPlayer.Character = prt
  3146. wait(game.Players.RespawnTime)
  3147. game.Players.LocalPlayer.Character = ch
  3148. else
  3149. character1:BreakJoints()
  3150. player1.Character = reanimation
  3151. if character1.Torso.Anchored == true then
  3152. character1.Torso.Anchored = false
  3153. end
  3154. end
  3155. end
  3156. ChatHUDFunc = function()
  3157. --[[
  3158. Variables
  3159. --]]
  3160. local UserInputService = game:GetService("UserInputService")
  3161. local RunService = game:GetService("RunService")
  3162. local VRService = game:GetService("VRService")
  3163. local VRReady = VRService.VREnabled
  3164. local Players = game:GetService("Players")
  3165. local Client = Players.LocalPlayer
  3166. local ChatHUD = game:GetObjects("rbxassetid://4476067885")[1]
  3167. local GlobalFrame = ChatHUD.GlobalFrame
  3168. local Template = GlobalFrame.Template
  3169. local LocalFrame = ChatHUD.LocalFrame
  3170. local Global = ChatHUD.Global
  3171. local Local = ChatHUD.Local
  3172. local Camera = workspace.CurrentCamera
  3173. Template.Parent = nil
  3174. ChatHUD.Parent = game:GetService("CoreGui")
  3175. --[[
  3176. Code
  3177. --]]
  3178. local Highlight = Global.Frame.BackgroundColor3
  3179. local Deselected = Local.Frame.BackgroundColor3
  3180. local OpenGlobalTab = function()
  3181. Global.Frame.BackgroundColor3 = Highlight
  3182. Local.Frame.BackgroundColor3 = Deselected
  3183. Global.Font = Enum.Font.SourceSansBold
  3184. Local.Font = Enum.Font.SourceSans
  3185. GlobalFrame.Visible = true
  3186. LocalFrame.Visible = false
  3187. end
  3188. local OpenLocalTab = function()
  3189. Global.Frame.BackgroundColor3 = Deselected
  3190. Local.Frame.BackgroundColor3 = Highlight
  3191. Global.Font = Enum.Font.SourceSans
  3192. Local.Font = Enum.Font.SourceSansBold
  3193. GlobalFrame.Visible = false
  3194. LocalFrame.Visible = true
  3195. end
  3196. Global.MouseButton1Down:Connect(OpenGlobalTab)
  3197. Local.MouseButton1Down:Connect(OpenLocalTab)
  3198. Global.MouseButton1Click:Connect(OpenGlobalTab)
  3199. Local.MouseButton1Click:Connect(OpenLocalTab)
  3200. OpenLocalTab()
  3201. --
  3202. local function GetPlayerDistance(Sender)
  3203. if Sender.Character and Sender.Character:FindFirstChild("Head") then
  3204. return math.floor((Sender.Character.Head.Position - Camera:GetRenderCFrame().p).Magnitude + 0.5)
  3205. end
  3206. end
  3207. local function NewGlobal(Message, Sender, Color)
  3208. local Frame = Template:Clone()
  3209. Frame.Text = ("[%s]: %s"):format(Sender.Name, Message)
  3210. Frame.User.Text = ("[%s]:"):format(Sender.Name)
  3211. Frame.User.TextColor3 = Color
  3212. Frame.BackgroundColor3 = Color
  3213. Frame.Parent = GlobalFrame
  3214. delay(
  3215. 60,
  3216. function()
  3217. Frame:Destroy()
  3218. end
  3219. )
  3220. end
  3221. local function NewLocal(Message, Sender, Color, Dist)
  3222. local Frame = Template:Clone()
  3223. Frame.Text = ("(%s) [%s]: %s"):format(tostring(Dist), Sender.Name, Message)
  3224. Frame.User.Text = ("(%s) [%s]:"):format(tostring(Dist), Sender.Name)
  3225. Frame.User.TextColor3 = Color
  3226. Frame.BackgroundColor3 = Color
  3227. Frame.Parent = LocalFrame
  3228. delay(
  3229. 60,
  3230. function()
  3231. Frame:Destroy()
  3232. end
  3233. )
  3234. end
  3235. local function OnNewChat(Message, Sender, Color)
  3236. if not ChatHUD or not ChatHUD.Parent then
  3237. return
  3238. end
  3239. NewGlobal(Message, Sender, Color)
  3240. local Distance = GetPlayerDistance(Sender)
  3241. if Distance and Distance <= ChatLocalRange then
  3242. NewLocal(Message, Sender, Color, Distance)
  3243. end
  3244. end
  3245. local function OnPlayerAdded(Player)
  3246. if not ChatHUD or not ChatHUD.Parent then
  3247. return
  3248. end
  3249. local Color = BrickColor.Random().Color
  3250. Player.Chatted:Connect(
  3251. function(Message)
  3252. OnNewChat(Message, Player, Color)
  3253. end
  3254. )
  3255. end
  3256. Players.PlayerAdded:Connect(OnPlayerAdded)
  3257. for _, Player in pairs(Players:GetPlayers()) do
  3258. OnPlayerAdded(Player)
  3259. end
  3260. --
  3261. local ChatPart = ChatHUD.Part
  3262. ChatHUD.Adornee = ChatPart
  3263. if VRReady then
  3264. ChatHUD.Parent = game:GetService("CoreGui")
  3265. ChatHUD.Enabled = true
  3266. ChatHUD.AlwaysOnTop = true
  3267. local OnInput =
  3268. UserInputService.InputBegan:Connect(
  3269. function(Input, Processed)
  3270. if not Processed then
  3271. if Input.KeyCode == Enum.KeyCode.ButtonX then
  3272. ChatHUD.Enabled = not ChatHUD.Enabled
  3273. end
  3274. end
  3275. end
  3276. )
  3277. local RenderStepped =
  3278. RunService.RenderStepped:Connect(
  3279. function()
  3280. local LeftHand = VRService:GetUserCFrame(Enum.UserCFrame.LeftHand)
  3281. ChatPart.CFrame = Camera.CFrame * LeftHand
  3282. end
  3283. )
  3284. local CharacterAdded
  3285. CharacterAdded =
  3286. Client.CharacterAdded:Connect(
  3287. function()
  3288. OnInput:Disconnect()
  3289. RenderStepped:Disconnect()
  3290. CharacterAdded:Disconnect()
  3291. ChatHUD:Destroy()
  3292. ChatHUD = nil
  3293. end
  3294. )
  3295. end
  3296. wait(9e9)
  3297. end
  3298. ViewHUDFunc = function()
  3299. --[[
  3300. Variables
  3301. --]]
  3302. local ViewportRange = ViewportRange or 32
  3303. local UserInputService = game:GetService("UserInputService")
  3304. local RunService = game:GetService("RunService")
  3305. local VRService = game:GetService("VRService")
  3306. local VRReady = VRService.VREnabled
  3307. local Players = game:GetService("Players")
  3308. local Client = Players.LocalPlayer
  3309. local Mouse = Client:GetMouse()
  3310. local Camera = workspace.CurrentCamera
  3311. local CameraPort = Camera.CFrame
  3312. local ViewHUD = script:FindFirstChild("ViewHUD") or game:GetObjects("rbxassetid://4480405425")[1]
  3313. local Viewport = ViewHUD.Viewport
  3314. local Viewcam = Instance.new("Camera")
  3315. local ViewPart = ViewHUD.Part
  3316. ViewHUD.Parent = game:GetService("CoreGui")
  3317. Viewcam.Parent = Viewport
  3318. Viewcam.CameraType = Enum.CameraType.Scriptable
  3319. Viewport.CurrentCamera = Viewcam
  3320. Viewport.BackgroundTransparency = 1
  3321. --[[
  3322. Code
  3323. --]]
  3324. local function Clone(Character)
  3325. local Arc = Character.Archivable
  3326. local Clone
  3327. Character.Archivable = true
  3328. Clone = Character:Clone()
  3329. Character.Archivable = Arc
  3330. return Clone
  3331. end
  3332. local function GetPart(Name, Parent, Descendants)
  3333. for i = 1, #Descendants do
  3334. local Part = Descendants[i]
  3335. if Part.Name == Name and Part.Parent.Name == Parent then
  3336. return Part
  3337. end
  3338. end
  3339. end
  3340. local function OnPlayerAdded(Player)
  3341. if not ViewHUD or not ViewHUD.Parent then
  3342. return
  3343. end
  3344. local function CharacterAdded(Character)
  3345. if not ViewHUD or not ViewHUD.Parent then
  3346. return
  3347. end
  3348. Character:WaitForChild("Head")
  3349. Character:WaitForChild("Humanoid")
  3350. wait(3)
  3351. local FakeChar = Clone(Character)
  3352. local Root = FakeChar:FindFirstChild("HumanoidRootPart") or FakeChar:FindFirstChild("Head")
  3353. local RenderConnection
  3354. local Descendants = FakeChar:GetDescendants()
  3355. local RealDescendants = Character:GetDescendants()
  3356. local Correspondents = {}
  3357. FakeChar.Humanoid.DisplayDistanceType = "None"
  3358. for i = 1, #Descendants do
  3359. local Part = Descendants[i]
  3360. local Real = Part:IsA("BasePart") and GetPart(Part.Name, Part.Parent.Name, RealDescendants)
  3361. if Part:IsA("BasePart") and Real then
  3362. Part.Anchored = true
  3363. Part:BreakJoints()
  3364. if Part.Parent:IsA("Accessory") then
  3365. Part.Transparency = 0
  3366. end
  3367. table.insert(Correspondents, {Part, Real})
  3368. end
  3369. end
  3370. RenderConnection =
  3371. RunService.RenderStepped:Connect(
  3372. function()
  3373. if not Character or not Character.Parent then
  3374. RenderConnection:Disconnect()
  3375. FakeChar:Destroy()
  3376. return
  3377. end
  3378. if
  3379. (Root and (Root.Position - Camera.CFrame.p).Magnitude <= ViewportRange) or Player == Client or
  3380. not Root
  3381. then
  3382. for i = 1, #Correspondents do
  3383. local Part, Real = unpack(Correspondents[i])
  3384. if Part and Real and Part.Parent and Real.Parent then
  3385. Part.CFrame = Real.CFrame
  3386. elseif Part.Parent and not Real.Parent then
  3387. Part:Destroy()
  3388. end
  3389. end
  3390. end
  3391. end
  3392. )
  3393. FakeChar.Parent = Viewcam
  3394. end
  3395. Player.CharacterAdded:Connect(CharacterAdded)
  3396. if Player.Character then
  3397. spawn(
  3398. function()
  3399. CharacterAdded(Player.Character)
  3400. end
  3401. )
  3402. end
  3403. end
  3404. local PlayerAdded = Players.PlayerAdded:Connect(OnPlayerAdded)
  3405. for _, Player in pairs(Players:GetPlayers()) do
  3406. OnPlayerAdded(Player)
  3407. end
  3408. ViewPart.Size = Vector3.new()
  3409. if VRReady then
  3410. Viewport.Position = UDim2.new(.62, 0, .89, 0)
  3411. Viewport.Size = UDim2.new(.3, 0, .3, 0)
  3412. Viewport.AnchorPoint = Vector2.new(.5, 1)
  3413. else
  3414. Viewport.Size = UDim2.new(0.3, 0, 0.3, 0)
  3415. end
  3416. local RenderStepped =
  3417. RunService.RenderStepped:Connect(
  3418. function()
  3419. local Render = Camera.CFrame
  3420. local Scale = Camera.ViewportSize
  3421. if VRReady then
  3422. Render = Render * VRService:GetUserCFrame(Enum.UserCFrame.Head)
  3423. end
  3424. CameraPort = CFrame.new(Render.p + Vector3.new(5, 2, 0), Render.p)
  3425. Viewport.Camera.CFrame = CameraPort
  3426. ViewPart.CFrame = Render * CFrame.new(0, 0, -16)
  3427. ViewHUD.Size = UDim2.new(0, Scale.X - 6, 0, Scale.Y - 6)
  3428. end
  3429. )
  3430. --
  3431. local CharacterAdded
  3432. CharacterAdded =
  3433. Client.CharacterAdded:Connect(
  3434. function()
  3435. RenderStepped:Disconnect()
  3436. CharacterAdded:Disconnect()
  3437. PlayerAdded:Disconnect()
  3438. ViewHUD:Destroy()
  3439. ViewHUD = nil
  3440. end
  3441. )
  3442.  
  3443. ------------------------Part of modification------------------------
  3444. if _G.hatCLOVR == false then
  3445. for i,v in pairs(character1:GetDescendants()) do
  3446. if v:IsA("Motor6D") then
  3447. v:Destroy()
  3448. end
  3449.  
  3450. if v:IsA("Weld") and v.Parent.Parent.Parent ~= reanimation then
  3451. v:Destroy()
  3452. end
  3453. end
  3454. end
  3455.  
  3456. if _G.hatCLOVR == true and _G.hideCharacter == true then
  3457. character1.Humanoid.Died:Connect(function()
  3458. for i,v in pairs(character1:GetChildren()) do
  3459. if v:IsA("BasePart") then
  3460. v:Destroy()
  3461. end
  3462. end
  3463. end)
  3464. end
  3465.  
  3466. if _G.hatCLOVR == true then
  3467. for i,v in pairs(character1:GetChildren()) do
  3468. if v:IsA("Accessory") then
  3469. v.Handle:FindFirstChildWhichIsA("Weld"):Destroy()
  3470.  
  3471. if table.find(originalHats, v.Name) then
  3472. v.Handle:FindFirstChildWhichIsA("SpecialMesh"):Destroy()
  3473. if v.Name == "Robloxclassicred" then
  3474. v.Name = "Left Arm"
  3475. hats[1] = v.Name
  3476. elseif v.Name == "Hat1" then
  3477. v.Name = "Right Arm"
  3478. hats[2] = v.Name
  3479. elseif v.Name == "Pal Hair" then
  3480. v.Name = "Left Leg"
  3481. hats[3] = v.Name
  3482. elseif v.Name == "Kate Hair" then
  3483. v.Name = "Right Leg"
  3484. hats[4] = v.Name
  3485. elseif v.Name == "LavanderHair" then
  3486. v.Name = "Torso1"
  3487. hats[5] = v.Name
  3488. elseif v.Name == "Pink Hair" then
  3489. v.Name = "Torso2"
  3490. hats[6] = v.Name
  3491. end
  3492. end
  3493. end
  3494. end
  3495. --player1.Character = reanimation
  3496. end
  3497. --wait()
  3498. --print(hats[1], ",", hats[2], ",", hats[3], ",", hats[4], ",", hats[5], ",", hats[6])
  3499. --Netless
  3500. netlessLoop = game:GetService("RunService").Heartbeat:Connect(function()
  3501. if character1.Humanoid.RigType == Enum.HumanoidRigType.R15 and _G.hatCLOVR == false then
  3502. --Head
  3503. if character1:FindFirstChild("Head") then
  3504. character1.Head.CFrame = reanimation.Head.CFrame
  3505. end
  3506.  
  3507. --Torso
  3508. if character1:FindFirstChild("UpperTorso") then
  3509. character1.UpperTorso.CFrame = reanimation.Torso.CFrame * CFrame.new(0, 0.185, 0)
  3510. end
  3511. if character1:FindFirstChild("LowerTorso") then
  3512. character1.LowerTorso.CFrame = reanimation.Torso.CFrame * CFrame.new(0, -0.8, 0)
  3513. end
  3514.  
  3515. --HumanoidRootPart
  3516. --if character1:FindFirstChild("HumanoidRootPart") then
  3517. --character1.HumanoidRootPart.CFrame = cHRP.CFrame
  3518. --end
  3519.  
  3520. --Left Arm
  3521. if character1:FindFirstChild("LeftUpperArm") then
  3522. character1.LeftUpperArm.CFrame = reanimation["Left Arm"].CFrame * CFrame.new(0, 0.4, 0)
  3523. end
  3524. if character1:FindFirstChild("LeftLowerArm") then
  3525. character1.LeftLowerArm.CFrame = reanimation["Left Arm"].CFrame * CFrame.new(0, -0.19, 0)
  3526. end
  3527. if character1:FindFirstChild("LeftHand") then
  3528. character1.LeftHand.CFrame = reanimation["Left Arm"].CFrame * CFrame.new(0, -0.84, 0)
  3529. end
  3530.  
  3531. --Right Arm
  3532. if character1:FindFirstChild("RightUpperArm") then
  3533. character1.RightUpperArm.CFrame = reanimation["Right Arm"].CFrame * CFrame.new(0, 0.4, 0)
  3534. end
  3535. if character1:FindFirstChild("RightLowerArm") then
  3536. character1.RightLowerArm.CFrame = reanimation["Right Arm"].CFrame * CFrame.new(0, -0.19, 0)
  3537. end
  3538. if character1:FindFirstChild("RightHand") then
  3539. character1.RightHand.CFrame = reanimation["Right Arm"].CFrame * CFrame.new(0, -0.84, 0)
  3540. end
  3541.  
  3542. --Left Leg
  3543. if character1:FindFirstChild("LeftUpperLeg") then
  3544. character1.LeftUpperLeg.CFrame = reanimation["Left Leg"].CFrame * CFrame.new(0, 0.55, 0)
  3545. end
  3546. if character1:FindFirstChild("LeftLowerLeg") then
  3547. character1.LeftLowerLeg.CFrame = reanimation["Left Leg"].CFrame * CFrame.new(0, -0.19, 0)
  3548. end
  3549. if character1:FindFirstChild("LeftFoot") then
  3550. character1.LeftFoot.CFrame = reanimation["Left Leg"].CFrame * CFrame.new(0, -0.85, 0)
  3551. end
  3552.  
  3553. --Right Leg
  3554. if character1:FindFirstChild("RightUpperLeg") then
  3555. character1.RightUpperLeg.CFrame = reanimation["Right Leg"].CFrame * CFrame.new(0, 0.55, 0)
  3556. end
  3557. if character1:FindFirstChild("RightLowerLeg") then
  3558. character1.RightLowerLeg.CFrame = reanimation["Right Leg"].CFrame * CFrame.new(0, -0.19, 0)
  3559. end
  3560. if character1:FindFirstChild("RightFoot") then
  3561. character1.RightFoot.CFrame = reanimation["Right Leg"].CFrame * CFrame.new(0, -0.85, 0)
  3562. end
  3563. end
  3564.  
  3565. --Velocity and CFrame
  3566. for i,v in pairs(character1:GetChildren()) do
  3567. --Body Parts
  3568. if v:IsA("BasePart") and v.Name ~= "HumanoidRootPart" and v.Name ~= "fake" and reanimation:FindFirstChild(v.Name) then
  3569. if _G.hatCLOVR == false then
  3570. v.Velocity = Vector3.new(_G.bodyVelocity[1], _G.bodyVelocity[2], _G.bodyVelocity[3])
  3571. if character1.Humanoid.RigType == Enum.HumanoidRigType.R6 then
  3572. v.CFrame = reanimation:FindFirstChild(v.Name).CFrame
  3573. end
  3574. elseif v.Name == "Torso" and v.Anchored == true and _G.hideCharacter == true then
  3575. v.CFrame = reanimation.Torso.CFrame
  3576. end
  3577. end
  3578.  
  3579. --HumanoidRootPart
  3580. if (v.Name == "HumanoidRootPart" or v.Name == "Left Leg") and v:IsA("BasePart") then
  3581. if v.Name == "HumanoidRootPart" then
  3582. v.Velocity = Vector3.new(_G.flingPartVelocity[1], _G.flingPartVelocity[2], _G.flingPartVelocity[3])
  3583. end
  3584. if _G.hatCLOVR == true and v.Name == "Left Leg" then
  3585. v.Velocity = Vector3.new(_G.flingPartVelocity[1], _G.flingPartVelocity[2], _G.flingPartVelocity[3])
  3586. end
  3587. end
  3588.  
  3589. --Accessories
  3590. if v:IsA("Accessory") then
  3591. v.Handle.Velocity = Vector3.new(_G.hatVelocity[1], _G.hatVelocity[2], _G.hatVelocity[3])
  3592. if _G.hatCLOVR == false then
  3593. v.Handle.CFrame = reanimation:FindFirstChild(v.Name).Handle.CFrame
  3594. else
  3595. if not table.find(hats, v.Name) then
  3596. --print(v.Name)
  3597. v.Handle.CFrame = reanimation:FindFirstChild(v.Name).Handle.CFrame
  3598. else
  3599. --Positioning The Body Hats
  3600. --Arms and Legs
  3601. if reanimation:FindFirstChild(v.Name) then
  3602. v.Handle.CFrame = reanimation:FindFirstChild(v.Name).CFrame * CFrame.Angles(1.5708, 0, 0)
  3603. end
  3604.  
  3605. --Left Half Of The Torso
  3606. if v.Name == "Torso1" then
  3607. v.Handle.CFrame = reanimation.Torso.CFrame * CFrame.new(-0.5, 0, 0) * CFrame.Angles(math.rad(90), 0, 0)
  3608. end
  3609.  
  3610. --Right Half Of The Torso
  3611. if v.Name == "Torso2" then
  3612. v.Handle.CFrame = reanimation.Torso.CFrame * CFrame.new(0.5, 0, 0) * CFrame.Angles(math.rad(90), 0, 0)
  3613. end
  3614. end
  3615. end
  3616. end
  3617.  
  3618. --fake
  3619. if v.Name == "fake" then
  3620. v.Velocity = Vector3.new(0,0,0)
  3621. end
  3622.  
  3623. --Tools
  3624. if v:IsA("Tool") and _G.toolHolding == true then
  3625. v.Handle.Velocity = Vector3.new(_G.toolVelocity[1], _G.toolVelocity[2], _G.toolVelocity[3])
  3626. if v.Handle.CanCollide == true then
  3627. v.Handle.CanCollide = false
  3628. end
  3629. if character1:FindFirstChild("fake") then
  3630. v.Handle.CFrame = character1.fake.CFrame
  3631. end
  3632. end
  3633. end
  3634. end)
  3635.  
  3636. --Collision
  3637. collisionLoop = game:GetService("RunService").Stepped:Connect(function()
  3638. for i,v in pairs(reanimation:GetChildren()) do
  3639. if v:IsA("BasePart") then
  3640. v.CanCollide = false
  3641. end
  3642. end
  3643. end)
  3644.  
  3645. scriptLoaded = true
  3646.  
  3647. while character1.Parent == game.Workspace do
  3648. if not flingPart:FindFirstChild("AlignPosition") then
  3649. if flingPart == hrp then
  3650. flingPart.Position = reanimation.Torso.Position
  3651. else
  3652. flingPart.Position = Vector3.new(0, -50, 0)
  3653. end
  3654.  
  3655. if hrp.Transparency ~= 1 and flingPart == hrp then
  3656. hrp.Transparency = 1
  3657. end
  3658.  
  3659. if flinger.AngularVelocity == flingVelocity and _G.flinging == true then
  3660. flinger.AngularVelocity = Vector3.new(0, 0, 0)
  3661. end
  3662. else
  3663. if hrp.Transparency ~= 0 and flingPart == hrp then
  3664. hrp.Transparency = 0
  3665. end
  3666.  
  3667. if flinger.AngularVelocity == Vector3.new(0, 0, 0) and _G.flinging == true then
  3668. flinger.AngularVelocity = flingVelocity
  3669. end
  3670. end
  3671. if shooting == true or shooting2 == true then
  3672. if _G.primaryWeapon == true then
  3673. if table.find(automaticGuns, gun.Parent.Name) and shooting == true and _G.primaryWeapon == true then
  3674. GunShot(1583819337, 1, math.random(90,110)/100)
  3675. Bullet(_G.automaticLifetime, gun)
  3676. wait(0.1)
  3677. end
  3678. if _G.dualWieldGuns == true then
  3679. if table.find(automaticGuns, gun2.Parent.Name) and shooting2 == true then
  3680. GunShot(1583819337, 1, math.random(90,110)/100)
  3681. Bullet(_G.automaticLifetime, gun2)
  3682. wait(0.1)
  3683. end
  3684. end
  3685. end
  3686. end
  3687.  
  3688. if _G.hatCLOVR == true then
  3689. hrp.CFrame = reanimation.Torso.CFrame
  3690. end
  3691. game:GetService("RunService").Heartbeat:wait()
  3692. end
  3693. --------------------------------------------------------------------
  3694. end
  3695. Script()
  3696.  
  3697. if _G.toolHolding == true then
  3698. local character = game.Players.LocalPlayer.Character
  3699. print(character.Humanoid:GetFullName())
  3700. character.Humanoid.BreakJointsOnDeath = false
  3701. --[[
  3702. local function Align(Part1,Part0,CFrameOffset)
  3703. local AlignPos = Instance.new('AlignPosition', Part1);
  3704. AlignPos.Parent.CanCollide = false;
  3705. AlignPos.ApplyAtCenterOfMass = false;
  3706. AlignPos.MaxForce = 67752;
  3707. AlignPos.MaxVelocity = math.huge/9e110;
  3708. AlignPos.ReactionForceEnabled = false;
  3709. AlignPos.Responsiveness = 200;
  3710. AlignPos.RigidityEnabled = true;
  3711. local AlignOri = Instance.new('AlignOrientation', Part1);
  3712. AlignOri.MaxAngularVelocity = math.huge/9e110;
  3713. AlignOri.MaxTorque = 67752;
  3714. AlignOri.PrimaryAxisOnly = false;
  3715. AlignOri.ReactionTorqueEnabled = false;
  3716. AlignOri.Responsiveness = 200;
  3717. AlignOri.RigidityEnabled = true;
  3718. local AttachmentA=Instance.new('Attachment',Part1);
  3719. local AttachmentB=Instance.new('Attachment',Part0);
  3720. AttachmentB.CFrame = AttachmentA.CFrame * CFrameOffset
  3721. AlignPos.Attachment0 = AttachmentA;
  3722. AlignPos.Attachment1 = AttachmentB;
  3723. AlignOri.Attachment0 = AttachmentA;
  3724. AlignOri.Attachment1 = AttachmentB;
  3725. end
  3726. ]]
  3727. character.ChildAdded:Connect(function(v)
  3728. if not v:IsA("Tool") then
  3729. return
  3730. end
  3731.  
  3732. if _G.hatCLOVR == true then
  3733. character["Right Arm"]:WaitForChild("RightGrip"):Destroy()
  3734. end
  3735.  
  3736. local fake = v.Handle:Clone()
  3737. fake.Name = "fake"
  3738. fake.Parent = character
  3739. fake.Massless = true
  3740. fake.Transparency = 0.5
  3741. wait()
  3742.  
  3743. local weld = Instance.new("Weld",fake)
  3744. weld.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, -0)
  3745. weld.C1 = v.Grip
  3746. weld.Part0 = cRArm
  3747. weld.Part1 = fake
  3748.  
  3749. for i,v in pairs(v.Handle:GetChildren()) do
  3750. if v:IsA("AlignPosition") or v:IsA("AlignOrientation") or v:IsA("Attachment") then
  3751. v:remove()
  3752. end
  3753. end
  3754.  
  3755. --Align(v.Handle, fake, CFrame.new(0,0,0))
  3756.  
  3757. v.AncestryChanged:Connect(function()
  3758. fake:remove()
  3759. end)
  3760. end)
  3761.  
  3762. cRArm.Touched:Connect(function(t)
  3763. if t:IsA("BasePart") and t.Parent.Parent == workspace and t.Parent:IsA("Tool") then
  3764. game.Players.LocalPlayer.Character.Humanoid:EquipTool(t.Parent)
  3765. end
  3766. end)
  3767. elseif _G.hatCLOVR == true then
  3768. character1["Right Arm"].Name = "RightArm"
  3769. end
  3770.  
  3771. wait(2)
  3772. local Players = game:GetService("Players")
  3773. local lp = Players.LocalPlayer
  3774. local character = reanimation--lp.Character
  3775. local A0LL = Instance.new("Attachment", character["Left Leg"])
  3776. A0LL.Position = Vector3.new(0, 1, 0)
  3777. local A1LL = Instance.new("Attachment", character["Torso"])
  3778. A1LL.Position = Vector3.new(-0.5, -1, 0)
  3779. local socket1 = Instance.new("BallSocketConstraint", character["Left Leg"])
  3780. socket1.Attachment0 = A0LL
  3781. socket1.Attachment1 = A1LL
  3782. local A0RL = Instance.new("Attachment", character["Right Leg"])
  3783. A0RL.Position = Vector3.new(0, 1, 0)
  3784. local A1RL = Instance.new("Attachment", character["Torso"])
  3785. A1RL.Position = Vector3.new(0.5, -1, 0)
  3786. local socket2 = Instance.new("BallSocketConstraint", character["Right Leg"])
  3787. socket2.Attachment0 = A0RL
  3788. socket2.Attachment1 = A1RL
  3789. local A0H = Instance.new("Attachment", character["Head"])
  3790. A0H.Position = Vector3.new(0, -0.5, 0)
  3791. local A1H = Instance.new("Attachment", character["Torso"])
  3792. A1H.Position = Vector3.new(0, 1, 0)
  3793. local socket5 = Instance.new("BallSocketConstraint", character["Head"])
  3794. socket5.Attachment0 = A0H
  3795. socket5.Attachment1 = A1H
  3796. -----------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement