EFTPMC

Pulse Rifle

Jun 26th, 2020
664
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.01 KB | None | 0 0
  1. sethiddenproperty(game.Players.LocalPlayer,"MaximumSimulationRadius",math.pow(math.huge,math.huge)*math.huge)
  2. sethiddenproperty(game.Players.LocalPlayer,"SimulationRadius",math.pow(math.huge,math.huge)*math.huge)
  3. plr = game.Players.LocalPlayer
  4. dead = false
  5. char = plr.Character
  6.  
  7. gun = char["Black Type-37 Pulse Rifle"]
  8. ghandle = gun.Handle
  9. ghandle.AccessoryWeld:Destroy()
  10.  
  11. bullet = char["MeshPartAccessory"]
  12. bhandle = bullet.Handle
  13. bhandle.SpecialMesh:Destroy()
  14. wait()
  15. bullet.Parent = workspace
  16.  
  17. mouse = plr:GetMouse()
  18. head = char.Head
  19. camera = workspace.CurrentCamera
  20. lt = true
  21. ltt = false
  22.  
  23. local function IsFirstPerson()
  24. return (head.CFrame.p - camera.CFrame.p).Magnitude < 1
  25. end
  26.  
  27. bbv = Instance.new("BodyVelocity",bhandle)
  28.  
  29. rarm = char["Right Arm"]
  30. larm = char["Left Arm"]
  31. torso = char.Torso
  32.  
  33. torso["Right Shoulder"]:Destroy()
  34. torso["Left Shoulder"]:Destroy()
  35.  
  36. larm.LeftShoulderAttachment:Destroy()
  37. rarm.RightShoulderAttachment:Destroy()
  38.  
  39. l = Instance.new("Attachment",larm)
  40. l.Rotation = Vector3.new(-90,20,0)
  41. l.Position = Vector3.new(1,1,0.5)
  42.  
  43. r = Instance.new("Attachment",rarm)
  44. r.Rotation = Vector3.new(-90,-25,0)
  45. r.Position = Vector3.new(-1,0.5,0.5)
  46.  
  47. t = Instance.new("Attachment",torso)
  48. --rarm
  49. rap = Instance.new("AlignPosition",rarm)
  50. rap.Attachment0 = r
  51. rap.Attachment1 = t
  52. rap.RigidityEnabled = true
  53.  
  54. rao = Instance.new("AlignOrientation",rarm)
  55. rao.Attachment0 = r
  56. rao.Attachment1 = t
  57. rao.RigidityEnabled = true
  58.  
  59. --larm
  60.  
  61.  
  62.  
  63.  
  64. lap = Instance.new("AlignPosition",larm)
  65. lap.Attachment0 = l
  66. lap.Attachment1 = t
  67. lap.RigidityEnabled = true
  68.  
  69. lao = Instance.new("AlignOrientation",larm)
  70. lao.Attachment0 = l
  71. lao.Attachment1 = t
  72. lao.RigidityEnabled = true
  73.  
  74. -- gun
  75.  
  76. h = Instance.new("Attachment",ghandle)
  77. h.Rotation = Vector3.new(-90,130,110)
  78. h.Position = Vector3.new(0.5,0,0.5)
  79.  
  80. lg = Instance.new("Attachment",larm)
  81. lg.Rotation = Vector3.new(0,0,0)
  82. lg.Position = Vector3.new(0,0,0)
  83.  
  84. gap = Instance.new("AlignPosition",ghandle)
  85. gap.Attachment0 = h
  86. gap.Attachment1 = lg
  87. gap.RigidityEnabled = true
  88.  
  89. gao = Instance.new("AlignOrientation",ghandle)
  90. gao.Attachment0 = h
  91. gao.Attachment1 = lg
  92. gao.RigidityEnabled = true
  93.  
  94.  
  95. mouse.Button1Down:Connect(function()
  96. if dead == false then
  97. lt = false
  98. ltt = true
  99.  
  100.  
  101. h.Rotation = Vector3.new(-90,125,115)
  102.  
  103. l.Position = Vector3.new(1,0.5,0.5)
  104. l.Rotation = Vector3.new(-95,25,0)
  105.  
  106. r.Position = Vector3.new(-1,0,0.5)
  107. r.Rotation = Vector3.new(-95,-33,0)
  108. wait(0.13)
  109. h.Rotation = Vector3.new(-90,130,110)
  110.  
  111. l.Position = Vector3.new(1,1,0.5)
  112. l.Rotation = Vector3.new(-90,20,0)
  113.  
  114. r.Position = Vector3.new(-1,0.5,0.5)
  115. r.Rotation = Vector3.new(-90,-25,0)
  116. ltt = false
  117. bbav = Instance.new("BodyAngularVelocity",bhandle)
  118. bbav.MaxTorque = Vector3.new(math.huge,math.huge,math.huge)
  119. bbav.P = 1000000000000000000000000000
  120. bbav.AngularVelocity = Vector3.new(10000000000000000000000000000000,100000000000000000000000000,100000000000000000)
  121. if game.Players:GetPlayerFromCharacter(mouse.Target.Parent) then
  122. repeat
  123. game:GetService("RunService").RenderStepped:Wait()
  124. bhandle.Position = mouse.Target.Parent.HumanoidRootPart.CFrame.p
  125. wait(0.23)
  126. until char.Humanoid.Health == 100 or char.Humanoid.Health == 0
  127. elseif game.Players:GetPlayerFromCharacter(mouse.Target.Parent.Parent) then
  128. repeat
  129. game:GetService("RunService").RenderStepped:Wait()
  130. bhandle.Position = mouse.Target.Parent.Parent.HumanoidRootPart.CFrame.p
  131. wait(0.23)
  132. until char.Humanoid.Health == 100 or char.Humanoid.Health == 0
  133.  
  134. else
  135. repeat
  136. game:GetService("RunService").RenderStepped:Wait()
  137. bhandle.Position = mouse.Hit.p
  138. wait(0.23)
  139. until char.Humanoid.Health == 100 or char.Humanoid.Health == 0
  140. end
  141. wait()
  142. lt = true
  143. end
  144. end)
  145.  
  146. char.Humanoid.Died:Connect(function()
  147. dead = true
  148. end)
  149. repeat
  150. game:GetService("RunService").RenderStepped:Wait()
  151. if dead == false and bhandle.CanCollide == true then
  152. bhandle.CanCollide = false
  153. end
  154. if lt == true and dead == false then
  155. bhandle.CFrame = char.Head.CFrame + Vector3.new(0,-15,0)
  156. elseif ltt == true and dead == false then
  157. bhandle.CFrame = ghandle.CFrame * CFrame.new(-1.7,-2,0)
  158. bhandle.Rotation = char.HumanoidRootPart.Rotation
  159. end
  160. until char.Humanoid.Health == 0
Advertisement
Add Comment
Please, Sign In to add comment