Advertisement
Upscalefanatic3

(Roblox) [FE] Gun Script

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