Advertisement
Guest User

Fake Vr Script

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