vr script - Pastebin.com
Advertisement
sIendytubble

vr script

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