Advertisement
AimbotMan2022

Roblox shotgun script

Dec 5th, 2020
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.35 KB | None | 0 0
  1.  
  2. --Converted with ttyyuu12345's model to script plugin v4
  3. function sandbox(var,func)
  4. local env = getfenv(func)
  5. local newenv = setmetatable({},{
  6. __index = function(self,k)
  7. if k=="script" then
  8. return var
  9. else
  10. return env[k]
  11. end
  12. end,
  13. })
  14. setfenv(func,newenv)
  15. return func
  16. end
  17. cors = {}
  18. mas = Instance.new("Model",game:GetService("Lighting"))
  19. Tool0 = Instance.new("Tool")
  20. Part1 = Instance.new("Part")
  21. SpecialMesh2 = Instance.new("SpecialMesh")
  22. LocalScript3 = Instance.new("LocalScript")
  23. Part4 = Instance.new("Part")
  24. SpecialMesh5 = Instance.new("SpecialMesh")
  25. Tool0.Name = "Shotgun"
  26. Tool0.Parent = mas
  27. Tool0.TextureId = "http://www.roblox.com/asset/?id=19339420"
  28. Tool0.GripPos = Vector3.new(0, 0, 0.5)
  29. Part1.Name = "Handle"
  30. Part1.Parent = Tool0
  31. Part1.BrickColor = BrickColor.new("Black")
  32. Part1.Rotation = Vector3.new(0, -90, 0)
  33. Part1.FormFactor = Enum.FormFactor.Symmetric
  34. Part1.Size = Vector3.new(1, 1, 5)
  35. Part1.CFrame = CFrame.new(-6.63999891, 0.500003994, -11.4400177, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  36. Part1.BottomSurface = Enum.SurfaceType.Smooth
  37. Part1.TopSurface = Enum.SurfaceType.Smooth
  38. Part1.Color = Color3.new(0.105882, 0.164706, 0.207843)
  39. Part1.Position = Vector3.new(-6.63999891, 0.500003994, -11.4400177)
  40. Part1.Orientation = Vector3.new(0, -90, 0)
  41. Part1.Color = Color3.new(0.105882, 0.164706, 0.207843)
  42. SpecialMesh2.Parent = Part1
  43. SpecialMesh2.MeshId = "http://www.roblox.com/asset/?id=94219391"
  44. SpecialMesh2.Scale = Vector3.new(0.75, 0.75, 0.75)
  45. SpecialMesh2.TextureId = "http://www.roblox.com/asset/?id=94219470"
  46. SpecialMesh2.MeshType = Enum.MeshType.FileMesh
  47. SpecialMesh2.Scale = Vector3.new(0.75, 0.75, 0.75)
  48. LocalScript3.Name = "Main"
  49. LocalScript3.Parent = Tool0
  50. table.insert(cors,sandbox(LocalScript3,function()
  51. --Made by Ahtoh13131423144235
  52. --GUN SETTINGS
  53. local char=nil--Do not change this
  54. local damage=50--Bullet Damage
  55. local maxAmmo=9--Max Ammo
  56. local clip=9
  57. local ammo=32--Stored Ammo
  58. local debounce=true--Do not change this
  59. --WELDS
  60. local rightArmWeld=nil
  61. local leftArmWeld=nil
  62. local flameWeld=Instance.new("Weld")
  63. flameWeld.Parent=script.Parent.Handle
  64. flameWeld.Name="FlameWeld"
  65. flameWeld.Part0=script.Parent.Handle
  66. flameWeld.Part1=script.Parent.Flame
  67. flameWeld.C0=CFrame.new(0,0.3,-3.5)*CFrame.fromEulerAnglesXYZ(0,80.1,0)
  68. --ANIMATIONS
  69. function equip()
  70. for i=1,16 do
  71. rightArmWeld.C0=rightArmWeld.C0*CFrame.fromEulerAnglesXYZ(0.1,0,0)
  72. leftArmWeld.C0=leftArmWeld.C0*CFrame.fromEulerAnglesXYZ(0.1,0,0)
  73. wait()
  74. end
  75. for i=1,7 do
  76. leftArmWeld.C0=leftArmWeld.C0*CFrame.fromEulerAnglesXYZ(0,0,0.1)
  77. wait()
  78. end
  79. for i=1,7 do
  80. leftArmWeld.C0=leftArmWeld.C0*CFrame.new(0.1,0,0)
  81. wait()
  82. end
  83. for i=1,15 do
  84. leftArmWeld.C0=leftArmWeld.C0*CFrame.new(0,-0.1,0)
  85. wait()
  86. end
  87. for i=1,7 do
  88. leftArmWeld.C0=leftArmWeld.C0*CFrame.new(-0.1,-0.1,0)
  89. wait()
  90. end
  91. end
  92.  
  93. function shoot()
  94. for i=1,2 do
  95. rightArmWeld.C0=rightArmWeld.C0*CFrame.fromEulerAnglesXYZ(0.1,0,0)
  96. leftArmWeld.C0=leftArmWeld.C0*CFrame.fromEulerAnglesXYZ(0.1,0,0)
  97. script.Parent.Flame.Transparency=script.Parent.Flame.Transparency-0.4
  98. wait()
  99. end
  100. for i=1,2 do
  101. rightArmWeld.C0=rightArmWeld.C0*CFrame.fromEulerAnglesXYZ(-0.1,0,0)
  102. leftArmWeld.C0=leftArmWeld.C0*CFrame.fromEulerAnglesXYZ(-0.1,0,0)
  103. script.Parent.Flame.Transparency=script.Parent.Flame.Transparency+0.4
  104. wait()
  105. end
  106. for i=1,5 do
  107. leftArmWeld.C0=leftArmWeld.C0*CFrame.new(-0.1,-0.1,0)
  108. wait()
  109. end
  110. for i=1,5 do
  111. leftArmWeld.C0=leftArmWeld.C0*CFrame.new(0.1,0.1,0)
  112. wait()
  113. end
  114. end
  115. function reload()
  116. for i=1,7 do
  117. leftArmWeld.C0=leftArmWeld.C0*CFrame.new(0.1,0.1,0)
  118. wait()
  119. end
  120. for i=1,14 do
  121. leftArmWeld.C0=leftArmWeld.C0*CFrame.fromEulerAnglesXYZ(-0.1,0,-0.1)
  122. wait()
  123. end
  124. wait()
  125. for i=1,14 do
  126. leftArmWeld.C0=leftArmWeld.C0*CFrame.fromEulerAnglesXYZ(0.1,0,0.1)
  127. wait()
  128. end
  129. for i=1,7 do
  130. leftArmWeld.C0=leftArmWeld.C0*CFrame.new(-0.1,-0.1,0)
  131. wait()
  132. end
  133. for i=1,5 do
  134. leftArmWeld.C0=leftArmWeld.C0*CFrame.new(-0.1,-0.1,0)
  135. wait()
  136. end
  137. for i=1,5 do
  138. leftArmWeld.C0=leftArmWeld.C0*CFrame.new(0.1,0.1,0)
  139. wait()
  140. end
  141. end
  142. --SCRIPT
  143. script.Parent.Activated:connect(function()
  144. if debounce==false and clip>0 then
  145. debounce=true
  146. local mouse=game.Players.LocalPlayer:GetMouse()
  147. if mouse.Target~=nil then
  148. if mouse.Target.Parent:FindFirstChild("Humanoid")~=nil then
  149. mouse.Target.Parent.Humanoid.Health=mouse.Target.Parent.Humanoid.Health-damage
  150. end
  151. end
  152. shoot()
  153. local shell=Instance.new("Part")
  154. shell.Parent=game.Workspace
  155. shell.Name="Shell"
  156. shell.Size=Vector3.new(0.1,0.2,0.1)
  157. shell.Position=script.Parent.Handle.Position+Vector3.new(0.4,0,0)
  158. shell.CanCollide=true
  159. shell.BrickColor=BrickColor.new("Bright red")
  160. local mesh=Instance.new("SpecialMesh")
  161. mesh.Parent=shell
  162. mesh.MeshType="Head"
  163. game.Debris:AddItem(shell,4)
  164. clip=clip-1
  165. debounce=false
  166. elseif debounce==false and clip<=0 and ammo>0 then
  167. debounce=true
  168. reload()
  169. clip=maxAmmo
  170. ammo=ammo-maxAmmo
  171. debounce=false
  172. end
  173. end)
  174. script.Parent.Equipped:connect(function()
  175. char=script.Parent.Parent
  176. rightArmWeld=Instance.new("Weld")
  177. rightArmWeld.Parent=char.Torso
  178. rightArmWeld.Part0=char.Torso
  179. rightArmWeld.Part1=char["Right Arm"]
  180. rightArmWeld.Name="RightWeld"
  181. rightArmWeld.C0=CFrame.new(1.5,0.5,0)
  182. rightArmWeld.C1=CFrame.new(0,0.5,0)
  183. leftArmWeld=Instance.new("Weld")
  184. leftArmWeld.Parent=char.Torso
  185. leftArmWeld.Name="LeftWeld"
  186. leftArmWeld.Part0=char.Torso
  187. leftArmWeld.Part1=char["Left Arm"]
  188. leftArmWeld.C0=CFrame.new(-1.5,0.5,0)
  189. leftArmWeld.C1=CFrame.new(0,0.5,0)
  190. equip()
  191. debounce=false
  192. end)
  193. script.Parent.Unequipped:connect(function()
  194. char=nil
  195. rightArmWeld:Remove()
  196. leftArmWeld:Remove()
  197. rightArmWeld=nil
  198. leftArmWeld=nil
  199. end)
  200. end))
  201. Part4.Name = "Flame"
  202. Part4.Parent = Tool0
  203. Part4.BrickColor = BrickColor.new("Bright red")
  204. Part4.Transparency = 1
  205. Part4.Size = Vector3.new(1.97999871, 0.640000284, 0.510000348)
  206. Part4.CFrame = CFrame.new(-3.19277, 0.801472008, -11.4081182, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  207. Part4.Color = Color3.new(0.768628, 0.156863, 0.109804)
  208. Part4.Position = Vector3.new(-3.19277, 0.801472008, -11.4081182)
  209. Part4.Color = Color3.new(0.768628, 0.156863, 0.109804)
  210. SpecialMesh5.Parent = Part4
  211. SpecialMesh5.MeshType = Enum.MeshType.Sphere
  212. for i,v in pairs(mas:GetChildren()) do
  213. v.Parent = game.Players.LocalPlayer.Backpack
  214. pcall(function() v:MakeJoints() end)
  215. end
  216. mas:Destroy()
  217. for i,v in pairs(cors) do
  218. spawn(function()
  219. pcall(v)
  220. end)
  221. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement