Advertisement
filipaopastebins2134

Shooter v1 with overhead

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