Advertisement
TheUnknownDiscord

fps

Oct 17th, 2021 (edited)
312
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.91 KB | None | 0 0
  1. NLS([[ -- thank rufus for head look and stuf
  2. owner = game:GetService("Players").LocalPlayer
  3. owner.Character:WaitForChild("Head")
  4. mouse = owner:GetMouse()
  5. local remote = owner.Character:WaitForChild("lookremote")
  6. local remote2 = owner.Character:WaitForChild("crouch remote")
  7. local part = Instance.new("Part", owner.Character.Head)
  8. part.Size = Vector3.new(0.1,0.1,0.1)
  9. part.Transparency = 1
  10. part.CanCollide = false
  11. part.Name = "camera"
  12. part:BreakJoints()
  13. local weld = Instance.new("Weld", part)
  14. weld.Part0 = owner.Character.Head
  15. weld.Part1 = part
  16. weld.C0 = CFrame.new(0,0,-1)
  17. count = 0
  18. function crouchinglol(key)
  19. key = key:lower()
  20. if key:byte() == 48 then
  21. count = count + 1
  22. if count == 1 then
  23. owner.Character:findFirstChildOfClass("Humanoid").WalkSpeed = 8
  24. remote2:FireServer("Crouching")
  25. elseif count == 2 then
  26. owner.Character:findFirstChildOfClass("Humanoid").WalkSpeed = 16
  27. remote2:FireServer("NotCrouching")
  28. wait()
  29. count = 0
  30. end
  31. end
  32. end
  33. mouse.KeyDown:connect(crouchinglol)
  34.  
  35. local E = owner.Character:WaitForChild("The")
  36. mouse.Button1Down:Connect(function()
  37. E:FireServer("s")
  38. end)
  39.  
  40. while game:GetService("RunService").RenderStepped:wait() do
  41. remote:FireServer(mouse.Hit.p, mouse.Origin.p, workspace.CurrentCamera.CFrame)
  42. if (workspace.CurrentCamera.CFrame.p - part.Position).magnitude <= 1.7 then
  43. game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position,Vector3.new(mouse.Hit.p.x,game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position.y,mouse.Hit.p.z))
  44. workspace.CurrentCamera.FieldOfView = 100
  45. for i,v in pairs(owner.Character:GetChildren()) do
  46. if v.ClassName == "Part" or v.ClassName == "MeshPart" and v.Name ~= "Head" then
  47. v.LocalTransparencyModifier = 0
  48. end
  49. if v.ClassName == "Accessory" then
  50. v.Handle.Transparency = 1
  51. end
  52. end
  53. if owner.Character.Head:findFirstChildOfClass("Decal") then
  54. owner.Character.Head:findFirstChildOfClass("Decal").Transparency = 1
  55. end
  56. owner.Character.Head.Transparency = 1
  57. workspace.CurrentCamera.CameraSubject = part
  58. else
  59. for i,v in pairs(owner.Character:GetChildren()) do
  60. if v.ClassName == "Accessory" then
  61. v.Handle.Transparency = 0
  62. end
  63. end
  64. workspace.CurrentCamera.FieldOfView = 70
  65. owner.Character.Head.Transparency = 0
  66. if owner.Character.Head:findFirstChildOfClass("Decal") then
  67. owner.Character.Head:findFirstChildOfClass("Decal").Transparency = 0
  68. end
  69. workspace.CurrentCamera.CameraSubject = owner.Character
  70. end
  71. end
  72. ]], owner.Character)
  73. function isplatformstand(PC)
  74. coroutine.wrap(function()
  75. PC.Character.Humanoid.PlatformStand = true
  76. wait(3)
  77. for i,v in pairs(PC.Character:GetDescendants()) do
  78. if v:IsA("Motor6D") and v.Parent.Name ~= "HumanoidRootPart" then
  79. v.Enabled = true
  80. end
  81. end
  82. PC.Character.Humanoid.PlatformStand = false
  83. end)()
  84. end
  85. local debris = game:GetService("Debris")
  86. function killfunction(part)
  87. local Model = part:FindFirstAncestorOfClass("Model")
  88. if Model then
  89. local PC = game:GetService("Players"):GetPlayerFromCharacter(Model)
  90. if PC then
  91. if PC ~= owner then
  92. local limbcollider = Instance.new("Part", PC.Character:findFirstChild("Right Arm"))
  93. limbcollider.Size = Vector3.new(1.4,1,1)
  94. limbcollider.Shape = "Cylinder"
  95. limbcollider.Transparency = 1
  96. limbcollider.Name = "LimbCollider"
  97. local limbcolliderweld = Instance.new("Weld", limbcollider)
  98. limbcolliderweld.Part0 = PC.Character:findFirstChild("Right Arm")
  99. limbcolliderweld.Part1 = limbcollider
  100. limbcolliderweld.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  101. local limbcollider2 = Instance.new("Part", PC.Character:findFirstChild("Left Arm"))
  102. limbcollider2.Size = Vector3.new(1.4,1,1)
  103. limbcollider2.Shape = "Cylinder"
  104. limbcollider2.Transparency = 1
  105. limbcollider2.Name = "LimbCollider"
  106. local limbcolliderweld2 = Instance.new("Weld", limbcollider)
  107. limbcolliderweld2.Part0 = PC.Character:findFirstChild("Left Arm")
  108. limbcolliderweld2.Part1 = limbcollider2
  109. limbcolliderweld2.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  110. local limbcollider3 = Instance.new("Part", PC.Character:findFirstChild("Right Leg"))
  111. limbcollider3.Size = Vector3.new(1.3,1,1)
  112. limbcollider3.Shape = "Cylinder"
  113. limbcollider3.Transparency = 1
  114. limbcollider3.Name = "LimbCollider"
  115. local limbcolliderweld3 = Instance.new("Weld", limbcollider)
  116. limbcolliderweld3.Part0 = PC.Character:findFirstChild("Right Leg")
  117. limbcolliderweld3.Part1 = limbcollider3
  118. limbcolliderweld3.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  119. local limbcollider4 = Instance.new("Part", PC.Character:findFirstChild("Left Leg"))
  120. limbcollider4.Size = Vector3.new(1.3,1,1)
  121. limbcollider4.Shape = "Cylinder"
  122. limbcollider4.Transparency = 1
  123. limbcollider4.Name = "LimbCollider"
  124. local limbcolliderweld4 = Instance.new("Weld", limbcollider)
  125. limbcolliderweld4.Part0 = PC.Character:findFirstChild("Left Leg")
  126. limbcolliderweld4.Part1 = limbcollider4
  127. limbcolliderweld4.C0 = CFrame.fromEulerAnglesXYZ(0,0,math.pi/2) * CFrame.new(-0.3,0,0)
  128. debris:AddItem(limbcollider, 3)
  129. debris:AddItem(limbcollider2, 3)
  130. debris:AddItem(limbcollider3, 3)
  131. debris:AddItem(limbcollider4, 3)
  132. isplatformstand(PC)
  133. for i,v in pairs(PC.Character:GetDescendants()) do
  134. if v:IsA("Motor6D") and v.Parent.Name ~= "HumanoidRootPart" then
  135. local Socket = Instance.new("BallSocketConstraint")
  136. local a1 = Instance.new("Attachment")
  137. local a2 = Instance.new("Attachment")
  138. a1.Parent = v.Part0
  139. a2.Parent = v.Part1
  140. Socket.Parent = v.Parent
  141. Socket.Attachment0 = a1
  142. Socket.Attachment1 = a2
  143. a1.CFrame = v.C0
  144. a2.CFrame = v.C1
  145. Socket.LimitsEnabled = true
  146. Socket.TwistLimitsEnabled = true
  147. v.Enabled = false
  148. debris:AddItem(a1, 3)
  149. debris:AddItem(a2, 3)
  150. debris:AddItem(Socket, 3)
  151. end
  152. end
  153. end
  154. end
  155. end
  156. end
  157. Bullet = Instance.new("Part", owner.Character)
  158. Bullet.Position = Vector3.new(1000000,1000000,1000000)
  159. Bullet.Anchored = true
  160. Bullet.CanCollide = false
  161. Part = Instance.new("Part")
  162. Part.Name = "Gun"
  163. Part.Parent = owner.Character
  164. Part.Size = Vector3.new(0.47466666666,1.67733333333,3.77766666667)
  165. Part.CanCollide = false
  166. Weld4 = Instance.new("Weld", owner.Character)
  167. Weld4.Part0 = Part
  168. Weld4.Part1 = owner.Character["Right Arm"]
  169. Weld4.C0 = CFrame.new(0,0,2.63883333334) * CFrame.Angles(math.rad(90),0,0)
  170. local E = Instance.new("RemoteEvent", owner.Character)
  171. E.Name = "The"
  172. Bullet.BrickColor = BrickColor.new("Bright yellow")
  173. Mesh = Instance.new("SpecialMesh")
  174. Mesh.Parent = Part
  175. Mesh.MeshId = "http://www.roblox.com/asset/?id=553398821"
  176. Mesh.TextureId = "http://www.roblox.com/asset/?id=553398915"
  177. Mesh.Scale = Vector3.new(0.333333333333, 0.333333333333, 0.333333333333)
  178. local Pow = Instance.new("Sound", owner.Character.Head)
  179. Pow.SoundId = "rbxassetid://3810328903"
  180. Pow.Volume = 2
  181.  
  182. E.OnServerEvent:Connect(function()
  183. Pow:Play()
  184. local origin = Part.Position
  185. local position = Part.CFrame.lookVector * 300
  186. local direction = (position - origin).Unit*300
  187. local result = game.Workspace:Raycast(origin, direction)
  188.  
  189. local intersection = result and result.Position or origin + direction
  190. local distance = (origin - intersection).Magnitude + 2.5
  191.  
  192. local bullet_clone = Bullet:Clone()
  193. bullet_clone.Size = Vector3.new(0.1, 0.1, distance)
  194. bullet_clone.CFrame = CFrame.new(origin, intersection)*CFrame.new(0, 0, -distance/2)
  195. bullet_clone.Parent = game.Workspace
  196.  
  197. if result then
  198. local part = result.Instance
  199. wait(0.1)
  200. killfunction(part)
  201. local humanoid = part.Parent:FindFirstChild("Humanoid") or part.Parent.Parent:FindFirstChild("Humanoid")
  202.  
  203. if humanoid then
  204. if humanoid ~= owner.Character.Humanoid then
  205. wait(0.1)
  206. humanoid.Health = humanoid.Health - 45
  207. local velocity = Instance.new("BodyVelocity", part)
  208. velocity.Velocity = bullet_clone.CFrame.lookVector * 20
  209. velocity.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  210. wait(0.125)
  211. velocity:Destroy()
  212. velocity = nil
  213. end
  214. end
  215. end
  216. wait(0.25)
  217. bullet_clone:Destroy()
  218. end)
  219.  
  220. local remote = Instance.new("RemoteEvent", owner.Character)
  221. remote.Name = "lookremote"
  222. local remote2 = Instance.new("RemoteEvent", owner.Character)
  223. remote2.Name = "crouch remote"
  224. local headd = Instance.new("Weld", owner.Character.Torso)
  225. headd.Part0 = owner.Character.Torso
  226. headd.Part1 = owner.Character.Head
  227. headd.C0 = CFrame.new(0,1,0)
  228. headd.Name = "HeaddWeld"
  229. local armm = Instance.new("Weld", owner.Character.Torso)
  230. armm.Part0 = owner.Character.Torso
  231. armm.Part1 = owner.Character["Right Arm"]
  232. armm.C0 = CFrame.new(2,2,-1)
  233. armm.Name = "armmWeld"
  234. local armm2 = Instance.new("Weld", owner.Character.Torso)
  235. armm2.Part0 = Part
  236. armm2.Part1 = owner.Character["Left Arm"]
  237. armm2.C0 = CFrame.new(-1.25,0,2) * CFrame.Angles(0,math.rad(45),math.rad(90))
  238. armm2.Name = "armmWeld"
  239. local rightleg = Instance.new("Weld", owner.Character.Torso)
  240. rightleg.Part0 = owner.Character.Torso
  241. rightleg.Part1 = owner.Character["Right Leg"]
  242. rightleg.C0 = CFrame.new(0.5,-0.5,-0.5)
  243. rightleg.C1 = CFrame.new(0,1,0)
  244. rightleg.Name = "RightLegWeld"
  245. local leftleg = Instance.new("Weld", owner.Character.Torso)
  246. leftleg.Part0 = owner.Character.Torso
  247. leftleg.Part1 = owner.Character["Left Leg"]
  248. leftleg.C0 = CFrame.new(-0.5,-0.5,-0.5) * CFrame.Angles(math.rad(-25),0,0)
  249. leftleg.C1 = CFrame.new(0,1,0)
  250. leftleg.Name = "LeftLegWeld"
  251. local humanoidrootpart = Instance.new("Weld", owner.Character.HumanoidRootPart)
  252. humanoidrootpart.Part0 = owner.Character.HumanoidRootPart
  253. humanoidrootpart.Part1 = owner.Character.Torso
  254. humanoidrootpart.Name = "HumanoidRootPartWeld"
  255. humanoidrootpart.C0 = CFrame.new(0,-0.75,0)
  256. leftleg.Enabled = false
  257. rightleg.Enabled = false
  258. humanoidrootpart.Enabled = false
  259. function look(plr, where, origin, cameracf)
  260. if plr == owner then
  261. local lookvector = owner.Character.Torso.CFrame:toObjectSpace(cameracf).lookVector.unit
  262. headd.C0 = CFrame.new(0,1,0) * CFrame.Angles(lookvector.y,0,0)
  263. headd.C0 = headd.C0 * CFrame.Angles(0,-lookvector.x,0)
  264. headd.C0 = headd.C0 * CFrame.new(0,0.5,0)
  265. armm.C0 = CFrame.new(1.75,1,-1) * CFrame.Angles(lookvector.y,0,0) * CFrame.Angles(math.rad(90),0,0)
  266. armm.C0 = armm.C0 * CFrame.Angles(0,0,lookvector.x)
  267. armm.C0 = armm.C0 * CFrame.new(-0.5,-0.25,0.5)
  268. end
  269. end
  270. remote.OnServerEvent:connect(look)
  271. walkin = false
  272. function crouchlol(plr, Action)
  273. if Action == "Crouching" then
  274. leftleg.Enabled = true
  275. rightleg.Enabled = true
  276. humanoidrootpart.Enabled = true
  277. walkin = true
  278. elseif Action == "NotCrouching" then
  279. leftleg.Enabled = false
  280. rightleg.Enabled = false
  281. humanoidrootpart.Enabled = false
  282. walkin = false
  283. end
  284. end
  285. remote2.OnServerEvent:connect(crouchlol)
  286. local tweenService = game:GetService("TweenService")
  287. local timeToFade = 0.25
  288. local object = leftleg
  289. local tweenInfo = TweenInfo.new(timeToFade)
  290. local goal = {}
  291. goal.C0 = CFrame.new(-0.5,-0.15,-0.5) * CFrame.Angles(math.rad(0.1),0,0)
  292.  
  293. local tween = tweenService:Create(object, tweenInfo, goal)
  294. local timeToFade2 = 0.25
  295. local object2 = rightleg
  296. local tweenInfo2 = TweenInfo.new(timeToFade2)
  297. local goal2 = {}
  298. goal2.C0 = CFrame.new(0.5,-0.5,-0.5) * CFrame.Angles(math.rad(-25),0,0)
  299.  
  300. local tween2 = tweenService:Create(object2, tweenInfo2, goal2)
  301.  
  302. local timeToFade3 = 0.25
  303. local object3 = leftleg
  304. local tweenInfo3 = TweenInfo.new(timeToFade3)
  305. local goal3 = {}
  306. goal3.C0 = CFrame.new(-0.5,-0.5,-0.5) * CFrame.Angles(math.rad(-25),0,0)
  307.  
  308. local tween3 = tweenService:Create(object3, tweenInfo3, goal3)
  309. local timeToFade4 = 0.25
  310. local object4 = rightleg
  311. local tweenInfo4 = TweenInfo.new(timeToFade4)
  312. local goal4 = {}
  313. goal4.C0 = CFrame.new(0.5,-0.15,-0.5) * CFrame.Angles(math.rad(0.1),0,0)
  314.  
  315. local tween4 = tweenService:Create(object4, tweenInfo4, goal4)
  316.  
  317. while true do
  318. task.wait()
  319. while walkin do
  320. task.wait()
  321. if owner.Character.HumanoidRootPart.Velocity.x <= -4 or owner.Character.HumanoidRootPart.Velocity.x >= 4 or owner.Character.HumanoidRootPart.Velocity.z <= -4 or owner.Character.HumanoidRootPart.Velocity.z >= 4 and owner.Character.Humanoid.FloorMaterial ~= Enum.Material.Air then
  322. tween:Play()
  323. tween2:Play()
  324. wait(0.25)
  325. tween3:Play()
  326. tween4:Play()
  327. wait(0.25)
  328. end
  329. end
  330. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement