Advertisement
ForkFullFight

VR SCRIPT ROBLOX NEW

Jul 29th, 2023
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- [[ Name: Archangel ]] --
  2. -- [[ Converted: Melon’s converter ]] --
  3. -- [[ Description: I don’t own this converter and the credits are melon for making the convert and my world for the reanimate]] --
  4. -- [[ Do not use ANYTHING without crediting melon or myworld. ]] --
  5.  
  6. --[[
  7. Hats:
  8. https://www.roblox.com/catalog/3033908130/International-Fedora-France
  9. https://www.roblox.com/catalog/3398308134/International-Fedora-Canada
  10. https://www.roblox.com/catalog/3033910400/International-Fedora-Germany
  11. https://www.roblox.com/catalog/3409612660/International-Fedora-USA
  12. https://www.roblox.com/catalog/5552252553/Kinetic-Staff
  13. https://www.roblox.com/catalog/4819740796/Robox
  14. ]]--
  15.  
  16.  
  17. game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage",{Text="Welcome to Melon's FE Scripts",Color=Color3.fromRGB(255, 255, 255)})
  18. game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage",{Text="You are using: Glock 17",Color=Color3.fromRGB(255, 255, 255)})
  19.  
  20.  
  21. player = game.Players.LocalPlayer
  22. cplayer = player.Character
  23.  
  24. game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage",{Text="Status: Loading Reanimate...",Color=Color3.fromRGB(255, 255, 255)})
  25.  
  26. loadstring(game:HttpGet("https://raw.githubusercontent.com/MelonsStuff/ReanimatesAndAlignCode/main/omgitskorn_reanimate1"))()
  27.  
  28. for i,v in pairs (cplayer:GetChildren()) do
  29. if v:IsA("Accessory") then
  30. v.Handle.Massless = true
  31. v.Handle.CustomPhysicalProperties = PhysicalProperties.new(0,0,0,0,0)
  32. end
  33. end
  34.  
  35. local function gp(parent, name, className)
  36. if typeof(parent) == "Instance" then
  37. for i, v in pairs(parent:GetChildren()) do
  38. if (v.Name == name) and v:IsA(className) then
  39. return v
  40. end
  41. end
  42. end
  43. return nil
  44. end
  45.  
  46. game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage",{Text="Status: Aligning...",Color=Color3.fromRGB(255, 255, 255)})
  47.  
  48. task.wait(0.5)
  49.  
  50. local hat2 = gp(cplayer, "MeshPartAccessory", "Accessory")
  51. local handle2 = gp(hat2, "Handle", "BasePart")
  52. local att2 = gp(handle2, "att1_Handle", "Attachment")
  53. att2.Parent = cplayer["Torso"]
  54. att2.Position = Vector3.new(0, 0, 0)
  55. att2.Rotation = Vector3.new(180, 0, -15)
  56.  
  57. local hat2 = gp(cplayer, "InternationalFedora", "Accessory")
  58. local handle2 = gp(hat2, "Handle", "BasePart")
  59. local att2 = gp(handle2, "att1_Handle", "Attachment")
  60. att2.Parent = cplayer["Left Arm"]
  61. att2.Position = Vector3.new(-0, -0.2, -0)
  62. att2.Rotation = Vector3.new(-90, 0, 90)
  63.  
  64. local hat2 = gp(cplayer, "InternationalFedora1", "Accessory")
  65. local handle2 = gp(hat2, "Handle", "BasePart")
  66. local att2 = gp(handle2, "att1_Handle", "Attachment")
  67. att2.Parent = cplayer["Right Arm"]
  68. att2.Position = Vector3.new(0, -0.2, -0)
  69. att2.Rotation = Vector3.new(-90, 0, -90)
  70.  
  71. local hat2 = gp(cplayer, "Crystal Staff", "Accessory")
  72. local handle2 = gp(hat2, "Handle", "BasePart")
  73. local att2 = gp(handle2, "att1_Handle", "Attachment")
  74. att2.Parent = cplayer["Right Arm"]
  75. att2.Position = Vector3.new(-0.35, -1.25, -0)
  76. att2.Rotation = Vector3.new(180, 245, -145)
  77.  
  78. local hat2 = gp(cplayer, "InternationalFedora2", "Accessory")
  79. local handle2 = gp(hat2, "Handle", "BasePart")
  80. local att2 = gp(handle2, "att1_Handle", "Attachment")
  81. att2.Parent = cplayer["Left Leg"]
  82. att2.Position = Vector3.new(-0, -0.2, -0)
  83. att2.Rotation = Vector3.new(-90, 0, 90)
  84.  
  85. local hat2 = gp(cplayer, "InternationalFedora3", "Accessory")
  86. local handle2 = gp(hat2, "Handle", "BasePart")
  87. local att2 = gp(handle2, "att1_Handle", "Attachment")
  88. att2.Parent = cplayer["Right Leg"]
  89. att2.Position = Vector3.new(0, -0.2, -0)
  90. att2.Rotation = Vector3.new(-90, 0, -90)
  91.  
  92. task.wait(1)
  93.  
  94. game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage",{Text="Status: Loaded!",Color=Color3.fromRGB(255, 255, 255)})
  95.  
  96. wait(2)
  97. local InputService=game:GetService("UserInputService")
  98. local Camera=game.Workspace.CurrentCamera
  99. local Player=game.Players.LocalPlayer
  100. local Character=Player.Character
  101. local Head=Character.Head
  102. local Torso=Character.Torso
  103. local RootPart=Character.HumanoidRootPart
  104. local RootJoint=RootPart.RootJoint
  105. local Neck=Torso.Neck
  106. Camera.FieldOfView=90
  107. Camera.CameraType="Scriptable"
  108. InputService.MouseBehavior = Enum.MouseBehavior.LockCenter
  109.  
  110.  
  111.  
  112. local v3=Vector3.new
  113. local cf=CFrame.new
  114. local components=cf().components
  115. local inverse=cf().inverse
  116. local fromAxisAngle=CFrame.fromAxisAngle
  117. local atan,atan2=math.atan,math.atan2
  118. local acos=math.acos
  119.  
  120. local function toAxisAngleFromVector(v)
  121. local z=v.z
  122. return z*z<0.99999 and v3(v.y,-v.x,0).unit*acos(-z) or v3()
  123. end
  124.  
  125. local function AxisAngleLookOrientation(c,v,t)--CFrame,Vector,Tween
  126. local c=c-c.p
  127. local rv=(inverse(c)*v).unit
  128. local rz=rv.z
  129. return rz*rz<0.99999 and c*fromAxisAngle(v3(rv.y,-rv.x,0),acos(-rz)*(t or 1)) or c
  130. end
  131.  
  132. local function AxisAngleLookNew(v,t)--CFrame,Vector,Tween
  133. local rv=v.unit
  134. local rz=rv.z
  135. return rz*rz<0.99999 and fromAxisAngle(v3(rv.y,-rv.x,0),acos(-rz)*(t or 1)) or cf()
  136. end
  137.  
  138. local function AxisAngleLook(c,v,t)--CFrame,Vector,Tween
  139. local rv=(inverse(c)*v).unit
  140. local rz=rv.z
  141. return rz*rz<0.99999 and c*fromAxisAngle(v3(rv.y,-rv.x,0),acos(-rz)*(t or 1)) or c
  142. end
  143.  
  144.  
  145.  
  146.  
  147. local Sensitivity=0.005
  148.  
  149.  
  150. local CameraDirection=Vector3.new(0,0,1)
  151.  
  152. local function EulerAnglesYX(l)
  153. local x,z=l.x,l.z
  154. return atan(l.y/(x*x+z*z)^0.5),-atan2(x,-z)
  155. end
  156.  
  157. local function AnglesXY(l)
  158. local z=l.z
  159. return atan2(l.y,-z),-atan2(l.x,-z)
  160. end
  161.  
  162. local function MouseMoved(Input)
  163. if Input.UserInputType==Enum.UserInputType.MouseMovement then
  164. local dx,dy=Input.Delta.x*Sensitivity,Input.Delta.y*Sensitivity
  165. local m2=dx*dx+dy*dy
  166. if m2>0 then
  167. CameraDirection=(AxisAngleLookOrientation(RootPart.CFrame,CameraDirection)*fromAxisAngle(v3(-dy,-dx,0),m2^0.5)).lookVector
  168. end
  169. local RootOrientation=RootPart.CFrame-RootPart.Position
  170. local RelativeDirection=RootOrientation:inverse()*CameraDirection
  171. local AngX,AngY=AnglesXY(RelativeDirection)--RootOrientation:inverse()*
  172. if AngX<-1.57*11/12 then
  173. local y,z,c,s=RelativeDirection.y,RelativeDirection.z,math.cos(-1.57*11/12-AngX),-math.sin(-1.57*11/12-AngX)
  174. z,y=z*c-y*s,z*s+y*c
  175. CameraDirection=RootOrientation*v3(RelativeDirection.x<0 and -(1-y*y-z*z)^0.5 or (1-y*y-z*z)^0.5,y,z)
  176. elseif AngX>1.57*11/12 then
  177. local y,z,c,s=RelativeDirection.y,RelativeDirection.z,math.cos(1.57*11/12-AngX),-math.sin(1.57*11/12-AngX)
  178. z,y=z*c-y*s,z*s+y*c
  179. CameraDirection=RootOrientation*v3(RelativeDirection.x<0 and -(1-y*y-z*z)^0.5 or (1-y*y-z*z)^0.5,y,z)
  180. end
  181. end
  182. end
  183.  
  184. local Mouse=Player:GetMouse()
  185.  
  186. local Zoom=-0.5
  187.  
  188. Mouse.KeyDown:connect(function(k)
  189. if k=="e" then
  190. Zoom=-0.5
  191. elseif k=="q" then
  192. Zoom=-0.5
  193. end
  194. end)
  195.  
  196. InputService.InputChanged:connect(MouseMoved)
  197.  
  198. Neck.C1=cf()
  199.  
  200. local _
  201. local DirectionBound=3.14159/3
  202. local CurrentAngY=0
  203.  
  204. local function CameraUpdate()
  205. Camera.CameraType="Scriptable"
  206. local cx,cz=CameraDirection.x,CameraDirection.z
  207. local rvx,rvz=RootPart.Velocity.x,RootPart.Velocity.z
  208. if rvx*rvx+rvz*rvz>4 and cx*rvx+cz*rvz<-0.5*(cx*cx+cz*cz)^0.5*(rvx*rvx+rvz*rvz)^0.5 then
  209. DirectionBound=math.min(DirectionBound*0.9,math.abs(CurrentAngY*0.9))
  210. else
  211. DirectionBound=DirectionBound*0.1+3.14159/3*0.9
  212. end
  213. local AngX,AngY=EulerAnglesYX((RootPart.CFrame-RootPart.Position):inverse()*CameraDirection)
  214. if AngY>DirectionBound then
  215. RootPart.CFrame=RootPart.CFrame*CFrame.Angles(0,AngY-DirectionBound,0)
  216. elseif AngY<-DirectionBound then
  217. RootPart.CFrame=RootPart.CFrame*CFrame.Angles(0,AngY+DirectionBound,0)
  218. end
  219. _,CurrentAngY=EulerAnglesYX((RootPart.CFrame-RootPart.Position):inverse()*CameraDirection)
  220. local CameraOrientation=AxisAngleLookNew((RootPart.CFrame-RootPart.Position):inverse()*CameraDirection,1)
  221. Neck.C0=CFrame.new(0,1,0)*CameraOrientation*CFrame.new(0,0.5,0)
  222. local PreCam=AxisAngleLook(RootPart.CFrame*cf(0,1,0),RootPart.CFrame*v3(0,1,0)+CameraDirection)*CFrame.new(0,0.825,0)
  223. if Zoom==8 then
  224. local Part,Position=Workspace:findPartOnRay(Ray.new(PreCam.p,PreCam.lookVector*-8),Character)
  225. Camera.CoordinateFrame=PreCam*CFrame.new(0,0,(Position-PreCam.p).magnitude)
  226. else
  227. Camera.CoordinateFrame=PreCam*CFrame.new(0,0,Zoom)
  228. end
  229. end
  230.  
  231. game:GetService("RunService").RenderStepped:connect(CameraUpdate)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement