Advertisement
lafur

Untitled

Sep 8th, 2018
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 41.65 KB | None | 0 0
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  4. local RealPlayer = Player
  5. do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end local player=game:service'Players'.LocalPlayer
  6. local char=player.Character
  7. local mouse=player:GetMouse()
  8. local tpressed = false
  9. local tpressed2 = 0
  10. local epressed = false
  11. local epressed2 = 0
  12. local ra = char['Right Arm']
  13. local la = char['Left Arm']
  14. local v3 = Vector3.new
  15. local cfn = CFrame.new
  16. local ang = CFrame.Angles
  17. local mr = math.rad
  18. local canfire = false
  19. local camera = game.Workspace.CurrentCamera
  20. local tor = char.Torso
  21. local Ammo = 99999
  22. local firin = false
  23. Smp = "SmoothPlastic"
  24. Sm = "Smooth"
  25. function makepart(parent,color,size,name,anchored,cancollide)
  26. local part = Instance.new("Part")
  27. part.Parent = parent
  28. part.Size = size
  29. part.Name = name
  30. part.Anchored = anchored
  31. part.CanCollide = cancollide
  32. part.TopSurface = "Smooth"
  33. part.BottomSurface = "Smooth"
  34. part.BrickColor = BrickColor.new(color)
  35. part:BreakJoints()
  36. return part
  37. end
  38. function weld(p0,p1,c0)
  39. local w=Instance.new("Weld",p0)
  40. w.Part0=p0
  41. w.Part1=p1
  42. w.C0=c0
  43. return w
  44. end
  45.  
  46. ---Clothing------------------------------------------------------
  47. if char:findFirstChild("Shirt") then
  48. char.Shirt:Remove()
  49. end
  50.  
  51. if char:findFirstChild("Pants") then
  52. char.Pants:Remove()
  53. end
  54.  
  55. if char:findFirstChild("Shirt Graphic") then
  56. char["Shirt Graphic"]:Remove()
  57. end
  58.  
  59. if char.Torso:findFirstChild("roblox") then
  60. char.Torso.roblox:Remove()
  61. end
  62.  
  63. local Shirt = Instance.new("Shirt",char)
  64. local Pants = Instance.new("Pants",char)
  65. Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=15947510"
  66. Pants.PantsTemplate = "http://www.roblox.com/asset/?id=32389160"
  67. -----------------------------------------------------------------
  68.  
  69. ---Hat-----------------------------------------------------------------------------
  70. for _,v in pairs(char:GetChildren()) do if v.ClassName=="Hat" then v:remove() end end
  71.  
  72. local hat = Instance.new("Part",char.Head)
  73. hat.Size = Vector3.new(2, 0.8, 1)
  74. hat.Locked = true
  75. hat.FormFactor = "Plate"
  76. hat.Material = "Metal"
  77. hat.TopSurface = Sm
  78. hat.BottomSurface = Sm
  79. hat.Name = "Helmet"
  80. hat.Position = Vector3.new(0,-.5,0)
  81. hat.Transparency = 0.005
  82. local hatmesh = Instance.new("SpecialMesh",hat)
  83. hatmesh.MeshType="FileMesh"
  84. hatmesh.MeshId = "http://www.roblox.com/asset/?id=24102128"
  85. hatmesh.TextureId = "http://www.roblox.com/asset/?id=71541827"
  86. hatmesh.Scale = Vector3.new(1.05, 1.25, 1.05)
  87. weld(hat, char.Head, CFrame.new(0,-.30,.15)*CFrame.Angles(math.rad(0),0,0))
  88.  
  89. char.Head.face.Texture = "http://www.roblox.com/asset/?id=187335055"
  90. -------------------------------------------------------------------------------------------
  91.  
  92. ---Backpack---
  93. local m1 = Instance.new("Model")
  94. m1.Name = "Backpack"
  95. p1 = Instance.new("Part", m1)
  96. p1.BrickColor = BrickColor.new("Dark stone grey")
  97. p1.FormFactor = Enum.FormFactor.Plate
  98. p1.Size = Vector3.new(2, 2, 1)
  99. p1.CFrame = CFrame.new(4.59994984, 2.69995689, -11.1000042, -1, 0, 0, 0, 1, 0, 0, 0, -1)
  100. p1.Anchored = false
  101. p1.CanCollide = true
  102. p1.BottomSurface = Enum.SurfaceType.Smooth
  103. p1.TopSurface = Enum.SurfaceType.Smooth
  104. b1 = Instance.new("SpecialMesh", p1)
  105. b1.MeshType = Enum.MeshType.Brick
  106. b1.Name = "Mesh"
  107. b1.Scale = Vector3.new(1.00999999, 1, 1.10000002)
  108. p2 = Instance.new("Part", m1)
  109. p2.BrickColor = BrickColor.new("Earth green")
  110. p2.Name = "part"
  111. p2.FormFactor = Enum.FormFactor.Plate
  112. p2.Size = Vector3.new(1, 2, 1)
  113. p2.CFrame = CFrame.new(4.59994984, 4.19989109, -11.1000042, 0, 1, 0, 1, 0, 0, 0, 0, -1)
  114. p2.Anchored = false
  115. p2.CanCollide = true
  116. p2.BottomSurface = Enum.SurfaceType.Smooth
  117. p2.TopSurface = Enum.SurfaceType.Smooth
  118. b2 = Instance.new("CylinderMesh", p2)
  119. b2.Name = "Mesh"
  120. m1.Parent = char
  121. m1:MakeJoints()
  122. local prev
  123. local parts1 = char.Backpack:GetChildren()
  124.  
  125. for i = 1,#parts1 do
  126. if (parts1[i].className == "Part") or (parts1[i].className == "WedgePart") or (parts1[i].className == "Seat") or (parts1[i].className == "VehicleSeat") or (parts1[i].className == "CornerWedgePart") then
  127. if (prev ~= nil)then
  128. local weld = Instance.new("Weld")
  129. weld.Part0 = prev
  130. weld.Part1 = parts1[i]
  131. weld.C0 = prev.CFrame:inverse()
  132. weld.C1 = parts1[i].CFrame:inverse()
  133. weld.Parent = prev
  134. end
  135. prev = parts1[i]
  136. end
  137. end
  138. weld(char.Backpack.Part, char.Torso, CFrame.new(0,0,-1)*CFrame.Angles(math.rad(0),0,0))
  139. --------------------
  140.  
  141. ---AmmoPouch---
  142.  
  143. local m2 = Instance.new("Model")
  144. m2.Name = "AmmoPouch"
  145. p1 = Instance.new("Part", m2)
  146. p1.BrickColor = BrickColor.new("Dark stone grey")
  147. p1.Material = Enum.Material.Metal
  148. p1.FormFactor = Enum.FormFactor.Plate
  149. p1.Size = Vector3.new(1, 0.400000006, 1)
  150. p1.CFrame = CFrame.new(4.16492414, 2.56973791, -9.53467369, 1, 0, 0, 0, 0, 1, 0, -1, 0)
  151. p1.BottomSurface = Enum.SurfaceType.Smooth
  152. p1.TopSurface = Enum.SurfaceType.Smooth
  153. p1.LeftParamA = 0
  154. p1.LeftParamB = 0
  155. p1.RightParamA = 0
  156. p1.RightParamB = 0
  157. b1 = Instance.new("SpecialMesh", p1)
  158. b1.MeshType = Enum.MeshType.Brick
  159. b1.Name = "Mesh"
  160. b1.Scale = Vector3.new(0.800000012, 0.5, 0.400000006)
  161. p2 = Instance.new("Part", m2)
  162. p2.BrickColor = BrickColor.new("Brown")
  163. p2.FormFactor = Enum.FormFactor.Plate
  164. p2.Size = Vector3.new(1, 0.400000006, 1)
  165. p2.CFrame = CFrame.new(4.15620995, 2.47011304, -9.53478336, 0.999999821, 3.7252903e-009, 2.95694882e-008, 2.95694882e-008, 5.58793545e-009, 0.999999821, -3.7252903e-009, -1, -5.58793545e-009)
  166. p2.BottomSurface = Enum.SurfaceType.Smooth
  167. p2.TopSurface = Enum.SurfaceType.Smooth
  168. p2.LeftParamA = 0
  169. p2.LeftParamB = 0
  170. p2.RightParamA = 0
  171. p2.RightParamB = 0
  172. b2 = Instance.new("SpecialMesh", p2)
  173. b2.MeshType = Enum.MeshType.Brick
  174. b2.Name = "Mesh"
  175. b2.Scale = Vector3.new(0.5, 0.699999988, 0.400000006)
  176. p3 = Instance.new("Part", m2)
  177. p3.BrickColor = BrickColor.new("Brown")
  178. p3.FormFactor = Enum.FormFactor.Plate
  179. p3.Size = Vector3.new(1, 0.400000006, 1)
  180. p3.CFrame = CFrame.new(4.36416483, 2.55231404, -9.53467369, 0.999999881, 5.58793545e-009, 1.961598e-008, 1.97906029e-008, 5.58793545e-009, 0.999999881, 1.11022302e-016, -1, -1.86264504e-009)
  181. p3.BottomSurface = Enum.SurfaceType.Smooth
  182. p3.TopSurface = Enum.SurfaceType.Smooth
  183. p3.LeftParamA = 0
  184. p3.LeftParamB = 0
  185. p3.RightParamA = 0
  186. p3.RightParamB = 0
  187. b3 = Instance.new("SpecialMesh", p3)
  188. b3.MeshType = Enum.MeshType.Brick
  189. b3.Name = "Mesh"
  190. b3.Scale = Vector3.new(0.800000012, 0.600000024, 0.5)
  191. w1 = Instance.new("Weld", p1)
  192. w2 = Instance.new("Weld", p1)
  193. w3 = Instance.new("Weld", p2)
  194. w4 = Instance.new("Weld", p2)
  195. w5 = Instance.new("Weld", p3)
  196. w6 = Instance.new("Weld", p3)
  197. m2.Parent = char
  198. m2:MakeJoints()
  199. local prev
  200. local parts1 = char.AmmoPouch:GetChildren()
  201.  
  202. for i = 1,#parts1 do
  203. if (parts1[i].className == "Part") or (parts1[i].className == "WedgePart") or (parts1[i].className == "Seat") or (parts1[i].className == "VehicleSeat") or (parts1[i].className == "CornerWedgePart") then
  204. if (prev ~= nil)then
  205. local weld = Instance.new("Weld")
  206. weld.Part0 = prev
  207. weld.Part1 = parts1[i]
  208. weld.C0 = prev.CFrame:inverse()
  209. weld.C1 = parts1[i].CFrame:inverse()
  210. weld.Parent = prev
  211. end
  212. prev = parts1[i]
  213. end
  214. end
  215. weld(char.AmmoPouch.Part, char.Torso, CFrame.new(-.50,.54,-.40)*CFrame.Angles(math.rad(270),0,0))
  216. ----------------------------------------
  217.  
  218. ---MP40---
  219. local m = Instance.new("Model")
  220. m.Name = "MP40"
  221. p1 = Instance.new("Part", m)
  222. p1.BrickColor = BrickColor.new("Dark stone grey")
  223. p1.Material = Enum.Material.Metal
  224. p1.FormFactor = Enum.FormFactor.Custom
  225. p1.Size = Vector3.new(0.30361411, 0.30361405, 0.30361408)
  226. p1.CFrame = CFrame.new(16.7652016, 4.23980618, 13.4252539, 0, 0, 1, -1, 0, 0, 0, -1, 0)
  227. p1.BottomSurface = Enum.SurfaceType.Smooth
  228. p1.TopSurface = Enum.SurfaceType.Smooth
  229. b1 = Instance.new("CylinderMesh", p1)
  230. b1.Name = "Mesh"
  231. b1.Scale = Vector3.new(1, 0.5, 0.75)
  232. p2 = Instance.new("Part", m)
  233. p2.BrickColor = BrickColor.new("Dark stone grey")
  234. p2.Material = Enum.Material.Metal
  235. p2.FormFactor = Enum.FormFactor.Custom
  236. p2.Size = Vector3.new(0.30361411, 1.44216657, 0.30361408)
  237. p2.CFrame = CFrame.new(16.006134, 4.00602818, 13.5012341, 0.0832513124, 0.996528745, 0, -0.996528745, 0.0832513124, 0, 0, 0, 1)
  238. p2.BottomSurface = Enum.SurfaceType.Smooth
  239. p2.TopSurface = Enum.SurfaceType.Smooth
  240. b2 = Instance.new("CylinderMesh", p2)
  241. b2.Name = "Mesh"
  242. b2.Scale = Vector3.new(0.25, 1, 0.25)
  243. p3 = Instance.new("Part", m)
  244. p3.BrickColor = BrickColor.new("Dark stone grey")
  245. p3.Material = Enum.Material.Metal
  246. p3.FormFactor = Enum.FormFactor.Custom
  247. p3.Size = Vector3.new(0.30361411, 0.30361405, 0.30361408)
  248. p3.CFrame = CFrame.new(16.8033848, 4.27775908, 13.4252539, 0, 1, 0, -1, 0, 0, 0, 0, 1)
  249. p3.BottomSurface = Enum.SurfaceType.Smooth
  250. p3.TopSurface = Enum.SurfaceType.Smooth
  251. b3 = Instance.new("SpecialMesh", p3)
  252. b3.MeshType = Enum.MeshType.Head
  253. b3.Name = "Mesh"
  254. b3.Scale = Vector3.new(0.75, 0.5, 1)
  255. p4 = Instance.new("Part", m)
  256. p4.BrickColor = BrickColor.new("Dark stone grey")
  257. p4.Material = Enum.Material.Metal
  258. p4.FormFactor = Enum.FormFactor.Custom
  259. p4.Size = Vector3.new(0.30361411, 0.30361405, 0.30361408)
  260. p4.CFrame = CFrame.new(16.8033848, 3.44283009, 13.4252539, 0, -1, 0, 0, 0, 1, -1, 0, 0)
  261. p4.BottomSurface = Enum.SurfaceType.Smooth
  262. p4.TopSurface = Enum.SurfaceType.Smooth
  263. b4 = Instance.new("SpecialMesh", p4)
  264. b4.MeshType = Enum.MeshType.Wedge
  265. b4.Name = "Mesh"
  266. b4.Scale = Vector3.new(0.5, 1, 0.25)
  267. p5 = Instance.new("Part", m)
  268. p5.BrickColor = BrickColor.new("Dark stone grey")
  269. p5.Material = Enum.Material.Metal
  270. p5.FormFactor = Enum.FormFactor.Custom
  271. p5.Size = Vector3.new(0.30361411, 0.30361405, 0.30361408)
  272. p5.CFrame = CFrame.new(16.7270355, 3.9741509, 13.4252539, 0, 0, 1, 0, -1, 0, 1, 0, 0)
  273. p5.BottomSurface = Enum.SurfaceType.Smooth
  274. p5.TopSurface = Enum.SurfaceType.Smooth
  275. b5 = Instance.new("SpecialMesh", p5)
  276. b5.MeshType = Enum.MeshType.Wedge
  277. b5.Name = "Mesh"
  278. b5.Scale = Vector3.new(0.5, 0.25, 0.5)
  279. p6 = Instance.new("Part", m)
  280. p6.BrickColor = BrickColor.new("Dark stone grey")
  281. p6.Material = Enum.Material.Metal
  282. p6.FormFactor = Enum.FormFactor.Custom
  283. p6.Size = Vector3.new(0.30361411, 0.30361405, 0.30361408)
  284. p6.CFrame = CFrame.new(16.7270355, 4.12595415, 13.4252539, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  285. p6.BottomSurface = Enum.SurfaceType.Smooth
  286. p6.TopSurface = Enum.SurfaceType.Smooth
  287. b6 = Instance.new("BlockMesh", p6)
  288. b6.Name = "Mesh"
  289. b6.Scale = Vector3.new(0.5, 0.75, 0.5)
  290. p7 = Instance.new("Part", m)
  291. p7.BrickColor = BrickColor.new("Dark stone grey")
  292. p7.Material = Enum.Material.Metal
  293. p7.Name = "Handle"
  294. p7.FormFactor = Enum.FormFactor.Custom
  295. p7.Size = Vector3.new(0.30361411, 0.45542106, 0.30361408)
  296. p7.CFrame = CFrame.new(16.8789787, 3.70848393, 13.4252539, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  297. p7.BottomSurface = Enum.SurfaceType.Smooth
  298. p7.TopSurface = Enum.SurfaceType.Smooth
  299. b7 = Instance.new("BlockMesh", p7)
  300. b7.Name = "Mesh"
  301. b7.Scale = Vector3.new(0.5, 0.99999994, 0.5)
  302. p8 = Instance.new("Part", m)
  303. p8.BrickColor = BrickColor.new("Dark stone grey")
  304. p8.Material = Enum.Material.Metal
  305. p8.FormFactor = Enum.FormFactor.Custom
  306. p8.Size = Vector3.new(0.30361411, 0.45542106, 0.30361408)
  307. p8.CFrame = CFrame.new(16.7270355, 3.70848393, 13.4252539, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  308. p8.BottomSurface = Enum.SurfaceType.Smooth
  309. p8.TopSurface = Enum.SurfaceType.Smooth
  310. b8 = Instance.new("SpecialMesh", p8)
  311. b8.MeshType = Enum.MeshType.Wedge
  312. b8.Name = "Mesh"
  313. b8.Scale = Vector3.new(0.5, 0.99999994, 0.5)
  314. p9 = Instance.new("Part", m)
  315. p9.BrickColor = BrickColor.new("Dark stone grey")
  316. p9.Material = Enum.Material.Metal
  317. p9.FormFactor = Enum.FormFactor.Custom
  318. p9.Size = Vector3.new(0.30361411, 0.30361405, 0.30361408)
  319. p9.CFrame = CFrame.new(16.7270355, 4.0880022, 13.4252539, 1, 0, 0, 0, 0, 1, 0, -1, 0)
  320. p9.BottomSurface = Enum.SurfaceType.Smooth
  321. p9.TopSurface = Enum.SurfaceType.Smooth
  322. b9 = Instance.new("CylinderMesh", p9)
  323. b9.Name = "Mesh"
  324. b9.Scale = Vector3.new(0.5, 0.75, 0.5)
  325. p10 = Instance.new("Part", m)
  326. p10.BrickColor = BrickColor.new("Dark stone grey")
  327. p10.Material = Enum.Material.Metal
  328. p10.FormFactor = Enum.FormFactor.Custom
  329. p10.Size = Vector3.new(0.30361411, 0.30361405, 0.30361408)
  330. p10.CFrame = CFrame.new(16.7729683, 3.93619299, 13.4252539, 0, 0, 1, 0, -1, 0, 1, 0, 0)
  331. p10.BottomSurface = Enum.SurfaceType.Smooth
  332. p10.TopSurface = Enum.SurfaceType.Smooth
  333. b10 = Instance.new("SpecialMesh", p10)
  334. b10.MeshType = Enum.MeshType.Wedge
  335. b10.Name = "Mesh"
  336. b10.Scale = Vector3.new(0.5, 1, 0.5)
  337. p11 = Instance.new("Part", m)
  338. p11.BrickColor = BrickColor.new("Dark stone grey")
  339. p11.Material = Enum.Material.Metal
  340. p11.FormFactor = Enum.FormFactor.Custom
  341. p11.Size = Vector3.new(0.30361411, 0.30361405, 0.30361408)
  342. p11.CFrame = CFrame.new(15.2852917, 3.93619299, 13.4252539, 0, 0, -0.999999166, 0.999998868, 0, 0, 0, -0.999998748, 0)
  343. p11.BottomSurface = Enum.SurfaceType.Smooth
  344. p11.TopSurface = Enum.SurfaceType.Smooth
  345. b11 = Instance.new("SpecialMesh", p11)
  346. b11.MeshId = "http://www.roblox.com/asset/?id=3270017"
  347. b11.TextureId = ""
  348. b11.MeshType = Enum.MeshType.FileMesh
  349. b11.Name = "Mesh"
  350. b11.Scale = Vector3.new(0.683131754, 0.189758763, 0.45542112)
  351. p12 = Instance.new("Part", m)
  352. p12.BrickColor = BrickColor.new("Dark stone grey")
  353. p12.Material = Enum.Material.Metal
  354. p12.FormFactor = Enum.FormFactor.Custom
  355. p12.Size = Vector3.new(0.30361411, 0.30361405, 0.30361408)
  356. p12.CFrame = CFrame.new(17.2674007, 3.83751893, 13.4252539, 0, 0.980619848, -0.195917353, 0, -0.195917353, -0.980619848, -1, 0, 0)
  357. p12.BottomSurface = Enum.SurfaceType.Smooth
  358. p12.TopSurface = Enum.SurfaceType.Smooth
  359. b12 = Instance.new("SpecialMesh", p12)
  360. b12.MeshType = Enum.MeshType.Wedge
  361. b12.Name = "Mesh"
  362. b12.Scale = Vector3.new(0.25, 0.1875, 0.25)
  363. p13 = Instance.new("Part", m)
  364. p13.BrickColor = BrickColor.new("Dark stone grey")
  365. p13.Material = Enum.Material.Metal
  366. p13.FormFactor = Enum.FormFactor.Custom
  367. p13.Size = Vector3.new(0.30361411, 0.30361405, 0.30361408)
  368. p13.CFrame = CFrame.new(17.2481251, 3.88913608, 13.4252539, 0, 0.281835884, -0.959462643, 0, -0.959462643, -0.281835884, -1, 0, 0)
  369. p13.BottomSurface = Enum.SurfaceType.Smooth
  370. p13.TopSurface = Enum.SurfaceType.Smooth
  371. b13 = Instance.new("SpecialMesh", p13)
  372. b13.MeshType = Enum.MeshType.Wedge
  373. b13.Name = "Mesh"
  374. b13.Scale = Vector3.new(0.25, 0.5, 0.25)
  375. p14 = Instance.new("Part", m)
  376. p14.BrickColor = BrickColor.new("Dark stone grey")
  377. p14.Material = Enum.Material.Metal
  378. p14.FormFactor = Enum.FormFactor.Custom
  379. p14.Size = Vector3.new(0.30361411, 0.30361405, 0.30361408)
  380. p14.CFrame = CFrame.new(17.675827, 4.4295702, 13.4634256, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  381. p14.BottomSurface = Enum.SurfaceType.Smooth
  382. p14.TopSurface = Enum.SurfaceType.Smooth
  383. b14 = Instance.new("BlockMesh", p14)
  384. b14.Name = "Mesh"
  385. b14.Offset = Vector3.new(0.00625000009, -0.0125000002, 0.0187500007)
  386. b14.Scale = Vector3.new(0.1875, 0.125, 0.125)
  387. p15 = Instance.new("Part", m)
  388. p15.BrickColor = BrickColor.new("Dark stone grey")
  389. p15.Material = Enum.Material.Metal
  390. p15.FormFactor = Enum.FormFactor.Custom
  391. p15.Size = Vector3.new(0.30361411, 0.30361405, 0.30361408)
  392. p15.CFrame = CFrame.new(18.0935135, 4.0880022, 13.4252539, 0, 0, 1, -1, 0, 0, 0, -1, 0)
  393. p15.BottomSurface = Enum.SurfaceType.Smooth
  394. p15.TopSurface = Enum.SurfaceType.Smooth
  395. b15 = Instance.new("CylinderMesh", p15)
  396. b15.Name = "Mesh"
  397. b15.Scale = Vector3.new(1, 0.5, 1)
  398. p16 = Instance.new("Part", m)
  399. p16.BrickColor = BrickColor.new("Dark stone grey")
  400. p16.Material = Enum.Material.Metal
  401. p16.FormFactor = Enum.FormFactor.Custom
  402. p16.Size = Vector3.new(0.30361411, 0.45542106, 0.30361408)
  403. p16.CFrame = CFrame.new(17.030941, 3.70848393, 13.4252539, 0, 0, -1, 0, -1, 0, -1, 0, 0)
  404. p16.BottomSurface = Enum.SurfaceType.Smooth
  405. p16.TopSurface = Enum.SurfaceType.Smooth
  406. b16 = Instance.new("SpecialMesh", p16)
  407. b16.MeshType = Enum.MeshType.Wedge
  408. b16.Name = "Mesh"
  409. b16.Scale = Vector3.new(0.5, 0.99999994, 0.5)
  410. p17 = Instance.new("Part", m)
  411. p17.BrickColor = BrickColor.new("Dark stone grey")
  412. p17.Material = Enum.Material.Metal
  413. p17.FormFactor = Enum.FormFactor.Custom
  414. p17.Size = Vector3.new(0.30361411, 0.30361405, 0.30361408)
  415. p17.CFrame = CFrame.new(18.5868168, 4.16390419, 13.4252539, 0, 0, -1, 0, -1, 0, -1, 0, 0)
  416. p17.BottomSurface = Enum.SurfaceType.Smooth
  417. p17.TopSurface = Enum.SurfaceType.Smooth
  418. b17 = Instance.new("SpecialMesh", p17)
  419. b17.MeshType = Enum.MeshType.Wedge
  420. b17.Name = "Mesh"
  421. b17.Scale = Vector3.new(0.5, 0.5, 0.25)
  422. p18 = Instance.new("Part", m)
  423. p18.BrickColor = BrickColor.new("Dark stone grey")
  424. p18.Material = Enum.Material.Metal
  425. p18.FormFactor = Enum.FormFactor.Custom
  426. p18.Size = Vector3.new(0.30361411, 0.30361405, 1.29035985)
  427. p18.CFrame = CFrame.new(17.4482613, 4.0880022, 13.4252539, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  428. p18.BottomSurface = Enum.SurfaceType.Smooth
  429. p18.TopSurface = Enum.SurfaceType.Smooth
  430. b18 = Instance.new("BlockMesh", p18)
  431. b18.Name = "Mesh"
  432. b18.Scale = Vector3.new(0.5, 1, 1)
  433. p19 = Instance.new("Part", m)
  434. p19.BrickColor = BrickColor.new("Dark stone grey")
  435. p19.Material = Enum.Material.Metal
  436. p19.FormFactor = Enum.FormFactor.Custom
  437. p19.Size = Vector3.new(0.30361411, 0.45542106, 0.30361408)
  438. p19.CFrame = CFrame.new(18.4348583, 4.01210117, 13.4252539, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  439. p19.BottomSurface = Enum.SurfaceType.Smooth
  440. p19.TopSurface = Enum.SurfaceType.Smooth
  441. b19 = Instance.new("BlockMesh", p19)
  442. b19.Name = "Mesh"
  443. b19.Scale = Vector3.new(0.5, 0.99999994, 0.75)
  444. p20 = Instance.new("Part", m)
  445. p20.BrickColor = BrickColor.new("Dark stone grey")
  446. p20.Material = Enum.Material.Metal
  447. p20.FormFactor = Enum.FormFactor.Custom
  448. p20.Size = Vector3.new(0.30361411, 0.30361405, 0.30361408)
  449. p20.CFrame = CFrame.new(18.1694927, 4.16390419, 13.4252539, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  450. p20.BottomSurface = Enum.SurfaceType.Smooth
  451. p20.TopSurface = Enum.SurfaceType.Smooth
  452. b20 = Instance.new("BlockMesh", p20)
  453. b20.Name = "Mesh"
  454. b20.Scale = Vector3.new(0.5, 0.5, 0.5)
  455. p21 = Instance.new("Part", m)
  456. p21.BrickColor = BrickColor.new("Dark stone grey")
  457. p21.Material = Enum.Material.Metal
  458. p21.FormFactor = Enum.FormFactor.Custom
  459. p21.Size = Vector3.new(0.30361411, 0.30361405, 0.30361408)
  460. p21.CFrame = CFrame.new(18.359251, 4.0880022, 13.4252539, 0, 0, 1, -1, 0, 0, 0, -1, 0)
  461. p21.BottomSurface = Enum.SurfaceType.Smooth
  462. p21.TopSurface = Enum.SurfaceType.Smooth
  463. b21 = Instance.new("CylinderMesh", p21)
  464. b21.Name = "Mesh"
  465. b21.Scale = Vector3.new(1, 0.5, 0.75)
  466. p22 = Instance.new("Part", m)
  467. p22.BrickColor = BrickColor.new("Dark stone grey")
  468. p22.Material = Enum.Material.Metal
  469. p22.FormFactor = Enum.FormFactor.Custom
  470. p22.Size = Vector3.new(0.30361411, 0.30361405, 0.30361408)
  471. p22.CFrame = CFrame.new(17.6380196, 4.4295702, 13.4252539, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  472. p22.BottomSurface = Enum.SurfaceType.Smooth
  473. p22.TopSurface = Enum.SurfaceType.Smooth
  474. b22 = Instance.new("BlockMesh", p22)
  475. b22.Name = "Mesh"
  476. b22.Offset = Vector3.new(0, -0.0500000007, 0)
  477. b22.Scale = Vector3.new(0.5, 0.25, 0.5)
  478. p23 = Instance.new("Part", m)
  479. p23.BrickColor = BrickColor.new("Dark stone grey")
  480. p23.Material = Enum.Material.Metal
  481. p23.FormFactor = Enum.FormFactor.Custom
  482. p23.Size = Vector3.new(0.30361411, 2.20120168, 0.30361408)
  483. p23.CFrame = CFrame.new(17.9037533, 4.27775908, 13.4252539, 0, 1, 0, -1, 0, 0, 0, 0, 1)
  484. p23.BottomSurface = Enum.SurfaceType.Smooth
  485. p23.TopSurface = Enum.SurfaceType.Smooth
  486. b23 = Instance.new("CylinderMesh", p23)
  487. b23.Name = "Mesh"
  488. b23.Scale = Vector3.new(0.75, 1, 1)
  489. p24 = Instance.new("Part", m)
  490. p24.BrickColor = BrickColor.new("Dark stone grey")
  491. p24.Material = Enum.Material.Metal
  492. p24.FormFactor = Enum.FormFactor.Custom
  493. p24.Size = Vector3.new(0.30361411, 0.30361405, 0.30361408)
  494. p24.CFrame = CFrame.new(18.321455, 3.82234693, 13.4252539, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  495. p24.BottomSurface = Enum.SurfaceType.Smooth
  496. p24.TopSurface = Enum.SurfaceType.Smooth
  497. b24 = Instance.new("SpecialMesh", p24)
  498. b24.MeshType = Enum.MeshType.Wedge
  499. b24.Name = "Mesh"
  500. b24.Scale = Vector3.new(0.5, 0.25, 0.25)
  501. p25 = Instance.new("Part", m)
  502. p25.BrickColor = BrickColor.new("Dark stone grey")
  503. p25.Material = Enum.Material.Metal
  504. p25.FormFactor = Enum.FormFactor.Custom
  505. p25.Size = Vector3.new(0.30361411, 0.30361405, 0.30361408)
  506. p25.CFrame = CFrame.new(19.0423069, 4.27775908, 13.4252539, 0, 1, 0, -1, 0, 0, 0, 0, 1)
  507. p25.BottomSurface = Enum.SurfaceType.Smooth
  508. p25.TopSurface = Enum.SurfaceType.Smooth
  509. b25 = Instance.new("CylinderMesh", p25)
  510. b25.Name = "Mesh"
  511. b25.Scale = Vector3.new(0.5, 0.25, 0.5)
  512. p26 = Instance.new("Part", m)
  513. p26.BrickColor = BrickColor.new("Dark stone grey")
  514. p26.Material = Enum.Material.Metal
  515. p26.FormFactor = Enum.FormFactor.Custom
  516. p26.Size = Vector3.new(0.30361411, 0.30361405, 0.30361408)
  517. p26.CFrame = CFrame.new(17.675827, 4.4295702, 13.387084, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  518. p26.BottomSurface = Enum.SurfaceType.Smooth
  519. p26.TopSurface = Enum.SurfaceType.Smooth
  520. b26 = Instance.new("BlockMesh", p26)
  521. b26.Name = "Mesh"
  522. b26.Offset = Vector3.new(-0.00625000009, -0.0125000002, 0.0187500007)
  523. b26.Scale = Vector3.new(0.1875, 0.125, 0.125)
  524. p27 = Instance.new("Part", m)
  525. p27.BrickColor = BrickColor.new("Dark stone grey")
  526. p27.Material = Enum.Material.Metal
  527. p27.Name = "Magazine"
  528. p27.FormFactor = Enum.FormFactor.Custom
  529. p27.Size = Vector3.new(0.30361411, 1.06264901, 0.30361408)
  530. p27.CFrame = CFrame.new(18.4348583, 3.40487504, 13.4252539, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  531. p27.BottomSurface = Enum.SurfaceType.Smooth
  532. p27.TopSurface = Enum.SurfaceType.Smooth
  533. b27 = Instance.new("BlockMesh", p27)
  534. b27.Name = "Mesh"
  535. b27.Scale = Vector3.new(0.375, 1, 0.625)
  536. p28 = Instance.new("Part", m)
  537. p28.BrickColor = BrickColor.new("Dark stone grey")
  538. p28.Material = Enum.Material.Metal
  539. p28.FormFactor = Enum.FormFactor.Custom
  540. p28.Size = Vector3.new(0.30361411, 0.30361405, 0.30361408)
  541. p28.CFrame = CFrame.new(18.5490112, 3.86029696, 13.4252539, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  542. p28.BottomSurface = Enum.SurfaceType.Smooth
  543. p28.TopSurface = Enum.SurfaceType.Smooth
  544. b28 = Instance.new("SpecialMesh", p28)
  545. b28.MeshType = Enum.MeshType.Wedge
  546. b28.Name = "Mesh"
  547. b28.Scale = Vector3.new(0.5, 0.5, 0.25)
  548. p29 = Instance.new("Part", m)
  549. p29.BrickColor = BrickColor.new("Dark stone grey")
  550. p29.Material = Enum.Material.Metal
  551. p29.FormFactor = Enum.FormFactor.Custom
  552. p29.Size = Vector3.new(0.30361411, 0.30361405, 0.30361408)
  553. p29.CFrame = CFrame.new(18.2832718, 4.16390419, 13.4252539, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  554. p29.BottomSurface = Enum.SurfaceType.Smooth
  555. p29.TopSurface = Enum.SurfaceType.Smooth
  556. b29 = Instance.new("BlockMesh", p29)
  557. b29.Name = "Mesh"
  558. b29.Scale = Vector3.new(0.5, 0.5, 0.25)
  559. p30 = Instance.new("Part", m)
  560. p30.BrickColor = BrickColor.new("Dark stone grey")
  561. p30.Material = Enum.Material.Metal
  562. p30.FormFactor = Enum.FormFactor.Custom
  563. p30.Size = Vector3.new(0.30361411, 0.30361405, 0.30361408)
  564. p30.CFrame = CFrame.new(17.2585068, 3.89824891, 13.4252539, -0.99999994, 0, 0, 0, -0.99999994, 0, 0, 0, 1)
  565. p30.BottomSurface = Enum.SurfaceType.Smooth
  566. p30.TopSurface = Enum.SurfaceType.Smooth
  567. b30 = Instance.new("SpecialMesh", p30)
  568. b30.MeshId = "http://www.roblox.com/asset/?id=3270017"
  569. b30.TextureId = ""
  570. b30.MeshType = Enum.MeshType.FileMesh
  571. b30.Name = "Mesh"
  572. b30.Scale = Vector3.new(0.379517615, 0.30361405, 0.22771056)
  573. p31 = Instance.new("Part", m)
  574. p31.BrickColor = BrickColor.new("Dark stone grey")
  575. p31.Material = Enum.Material.Metal
  576. p31.Name = "Barrel"
  577. p31.FormFactor = Enum.FormFactor.Custom
  578. p31.Size = Vector3.new(0.30361411, 0.986745656, 0.30361408)
  579. p31.CFrame = CFrame.new(19.57341, 4.27775908, 13.4252539, 0, 1, 0, -1, 0, 0, 0, 0, 1)
  580. p31.BottomSurface = Enum.SurfaceType.Smooth
  581. p31.TopSurface = Enum.SurfaceType.Smooth
  582. b31 = Instance.new("CylinderMesh", p31)
  583. b31.Name = "Mesh"
  584. b31.Scale = Vector3.new(0.375, 0.99999994, 0.375)
  585. d1 = Instance.new("Decal", p31)
  586. d1.Texture = "http://www.roblox.com/asset/?id=85448092"
  587. d1.Face = Enum.NormalId.Top
  588. p32 = Instance.new("Part", m)
  589. p32.BrickColor = BrickColor.new("Dark stone grey")
  590. p32.Material = Enum.Material.Metal
  591. p32.FormFactor = Enum.FormFactor.Custom
  592. p32.Size = Vector3.new(0.30361411, 1.44216657, 0.30361408)
  593. p32.CFrame = CFrame.new(16.006134, 4.00602818, 13.3492861, 0.0832513124, 0.996528745, 0, -0.996528745, 0.0832513124, 0, 0, 0, 1)
  594. p32.BottomSurface = Enum.SurfaceType.Smooth
  595. p32.TopSurface = Enum.SurfaceType.Smooth
  596. b32 = Instance.new("CylinderMesh", p32)
  597. b32.Name = "Mesh"
  598. b32.Scale = Vector3.new(0.25, 1, 0.25)
  599. m.Parent = char
  600. m:MakeJoints()
  601. local prev
  602. local parts = char.MP40:GetChildren()
  603.  
  604. for i = 1,#parts do
  605. if (parts[i].className == "Part") or (parts[i].className == "WedgePart") or (parts[i].className == "Seat") or (parts[i].className == "VehicleSeat") or (parts[i].className == "CornerWedgePart") then
  606. if (prev ~= nil)then
  607. local weld = Instance.new("Weld")
  608. weld.Part0 = prev
  609. weld.Part1 = parts[i]
  610. weld.C0 = prev.CFrame:inverse()
  611. weld.C1 = parts[i].CFrame:inverse()
  612. weld.Parent = prev
  613. end
  614. prev = parts[i]
  615. end
  616. end
  617. char.MP40.Handle.Weld.Name = "Weld2"
  618.  
  619.  
  620. weld(char.MP40.Handle, char.Torso, CFrame.new(1.6,0,-.80)*CFrame.Angles(math.rad(0),29.8,0))
  621. --------------------------------------
  622.  
  623. ---Taunts/German
  624. local t1=Instance.new("Sound",char.Head)
  625. t1.SoundId="http://www.roblox.com/asset/?id=176893156"
  626. t1.PlayOnRemove=false
  627. t1.Volume=1
  628. t1.Looped=false
  629. t1.Pitch = 1
  630. t1.Parent=char.Head
  631. local t2=Instance.new("Sound",char.Head)
  632. t2.SoundId="http://www.roblox.com/asset/?id=176893156"
  633. t2.PlayOnRemove=false
  634. t2.Volume=1
  635. t2.Looped=false
  636. t2.Pitch = 1
  637. t2.Parent=char.Head
  638. local t3=Instance.new("Sound",char.Head)
  639. t3.SoundId="http://www.roblox.com/asset/?id=156508971"
  640. t3.PlayOnRemove=false
  641. t3.Volume=1
  642. t3.Looped=false
  643. t3.Pitch = 1
  644. t3.Parent=char.Head
  645. local t4=Instance.new("Sound",char.Head)
  646. t4.SoundId="http://www.roblox.com/asset/?id=156508971"
  647. t4.PlayOnRemove=false
  648. t4.Volume=1
  649. t4.Looped=false
  650. t4.Pitch = 1
  651. t4.Parent=char.Head
  652. mouse.KeyDown:connect(function(key)
  653. if key == "t" then
  654. tpressed = true
  655. wait(4)
  656. tpressed = false
  657. end
  658. end)
  659.  
  660. mouse.KeyDown:connect(function(key)
  661. if key == "t" and tpressed == false then
  662. tpressed2 = tpressed2 + 1
  663. if tpressed2 == 1 then
  664. t1:Play()
  665. wait(3.44)
  666. t1:Stop()
  667. print(tpressed2)
  668. end
  669. if tpressed2 == 2 then
  670. t2.Parent = game.Lighting
  671. wait()
  672. t2.TimePosition = 3.44
  673. wait()
  674. t2.Parent = char.Head
  675. t2:Play()
  676. wait(2.60)
  677. t2:Stop()
  678. print(tpressed2)
  679. end
  680. if tpressed2 == 3 then
  681. t3.Parent = game.Lighting
  682. wait()
  683. t3.TimePosition = 1.60
  684. wait()
  685. t3.Parent = char.Head
  686. t3:Play()
  687. wait(1.76)
  688. t3:Stop()
  689. print(tpressed2)
  690. end
  691. if tpressed2 == 4 then
  692. t4.Parent = game.Lighting
  693. wait()
  694. t4.TimePosition = 4.70
  695. wait()
  696. t4.Parent = char.Head
  697. t4:Play()
  698. wait(3.20)
  699. t4:Stop()
  700. print(tpressed2)
  701. end
  702. if tpressed2 == 5 then
  703. tpressed2 = 0
  704. t1:Stop()
  705. t2:Stop()
  706. t3:Stop()
  707. t4:Stop()
  708. print(tpressed2)
  709. end
  710. end
  711. end)
  712.  
  713. --MP40--
  714. local Barrel2 = Instance.new("Part",char.MP40)
  715. Barrel2.Size = Vector3.new(0.6, 0.6, 0.6)
  716. Barrel2.formFactor = "Custom"
  717. Barrel2.Locked = true
  718. Barrel2.Name = "Barrel2"
  719. Barrel2.Anchored = false
  720. Barrel2.CanCollide = false
  721. Barrel2.Transparency = 1
  722. Barrel2:BreakJoints()
  723.  
  724. weld(Barrel2, char.MP40.Barrel, CFrame.new(0,-.55,0))
  725.  
  726. local guiMain = Instance.new("BillboardGui",Barrel2)
  727. guiMain.AlwaysOnTop = false
  728. guiMain.Size = UDim2.new(1.3, 0,1.3, 0)
  729. guiMain.Name = "guiMain"
  730. local SD = Instance.new("ImageLabel")
  731. SD.Position = UDim2.new(0,0,0)
  732. SD.Size = UDim2.new(1,0,1,0)
  733. SD.Parent = guiMain;
  734. SD.BackgroundColor3 = Color3.new(255/255,255/255,255/255)
  735. SD.BorderColor3 = Color3.new(27/255,42/255,53/255)
  736. SD.BackgroundTransparency = 1
  737. SD.BorderSizePixel = 1
  738. SD.Image = "http://www.roblox.com/asset/?id=156580315"
  739. SD.Visible = false
  740. SD.Name = "SD"
  741. local light = Instance.new("PointLight",Barrel2)
  742. light.Brightness = 2.5
  743. light.Color = Color3.new(255/255,183/255,0/255)
  744. light.Range = 5
  745. light.Enabled = false
  746. light.Name = "Light"
  747.  
  748. mouse.KeyDown:connect(function(key)
  749. if key == "e" then
  750. epressed = true
  751. wait(2.4)
  752. epressed = false
  753. end
  754. end)
  755.  
  756. mouse.KeyDown:connect(function(key)
  757. if key == "e" and tpressed == false then
  758. epressed2 = epressed2 + 1
  759. if epressed2 == 1 then
  760. if ra:FindFirstChild("Weld") then ra.Weld:Destroy() end
  761. weld(ra, tor, CFrame.new(-1.5,0,-.10)*CFrame.Angles(math.rad(10),0,0))
  762. wait(.03)
  763. ra.Weld:Destroy()
  764. weld(ra, tor, CFrame.new(-1.5,0,-.15)*CFrame.Angles(math.rad(15),0,0))
  765. wait(.03)
  766. ra.Weld:Destroy()
  767. weld(ra, tor, CFrame.new(-1.5,0,-.20)*CFrame.Angles(math.rad(20),0,0))
  768. wait(.03)
  769. ra.Weld:Destroy()
  770. weld(ra, tor, CFrame.new(-1.5,0,-.25)*CFrame.Angles(math.rad(25),0,0))
  771. wait(.03)
  772. ra.Weld:Destroy()
  773. weld(ra, tor, CFrame.new(-1.5,0,-.30)*CFrame.Angles(math.rad(30),.10,0))
  774. wait(.03)
  775. ra.Weld:Destroy()
  776. weld(ra, tor, CFrame.new(-1.5,0,-.35)*CFrame.Angles(math.rad(35),.20,0))
  777. wait(.03)
  778. ra.Weld:Destroy()
  779. weld(ra, tor, CFrame.new(-1.5,0,-.40)*CFrame.Angles(math.rad(40),.30,0))
  780. wait(.03)
  781. ra.Weld:Destroy()
  782. weld(ra, tor, CFrame.new(-1.5,0,-.45)*CFrame.Angles(math.rad(40),.40,0))
  783. char.MP40.Handle.Weld:Destroy()
  784. weld(char.MP40.Handle, char["Right Arm"], CFrame.new(0,.50,0)*CFrame.Angles(math.rad(0),29.8,0))
  785. wait(.03)
  786. char.MP40.Handle.Weld:Destroy()
  787. weld(char.MP40.Handle, char["Right Arm"], CFrame.new(0,1,0)*CFrame.Angles(math.rad(0),29.8,0))
  788. wait(.03)
  789. ra.Weld:Destroy()
  790. weld(ra, tor, CFrame.new(-1.5,0,-.40)*CFrame.Angles(math.rad(40),.30,0))
  791. wait(.03)
  792. ra.Weld:Destroy()
  793. weld(ra, tor, CFrame.new(-1.5,0,-.35)*CFrame.Angles(math.rad(35),.20,0))
  794. wait(.03)
  795. ra.Weld:Destroy()
  796. weld(ra, tor, CFrame.new(-1.5,0,-.30)*CFrame.Angles(math.rad(30),.10,0))
  797. wait(.03)
  798. ra.Weld:Destroy()
  799. weld(ra, tor, CFrame.new(-1.5,0,-.25)*CFrame.Angles(math.rad(25),0,0))
  800. wait(.03)
  801. ra.Weld:Destroy()
  802. weld(ra, tor, CFrame.new(-1.5,0,-.20)*CFrame.Angles(math.rad(20),0,0))
  803. wait(.03)
  804. ra.Weld:Destroy()
  805. weld(ra, tor, CFrame.new(-1.5,0,-.15)*CFrame.Angles(math.rad(15),0,0))
  806. wait(.03)
  807. ra.Weld:Destroy()
  808. weld(ra, tor, CFrame.new(-1.5,0,-.10)*CFrame.Angles(math.rad(10),0,0))
  809. wait(.03)
  810. ra.Weld:Destroy()
  811. weld(ra, tor, CFrame.new(-1.5,0,-.10)*CFrame.Angles(math.rad(-5),0,0))
  812. wait(.03)
  813. ra.Weld:Destroy()
  814. weld(ra, tor, CFrame.new(-1.5,0,-.10)*CFrame.Angles(math.rad(-10),0,0))
  815. wait(.03)
  816. ra.Weld:Destroy()
  817. weld(ra, tor, CFrame.new(-1.5,0,-.10)*CFrame.Angles(math.rad(-15),0,0))
  818. wait(.03)
  819. ra.Weld:Destroy()
  820. weld(ra, tor, CFrame.new(-1.5,0,-.10)*CFrame.Angles(math.rad(-20),0,0))
  821. wait(.03)
  822. ra.Weld:Destroy()
  823. weld(ra, tor, CFrame.new(-1.5,0,-.10)*CFrame.Angles(math.rad(-25),0,0))
  824. wait(.03)
  825. ra.Weld:Destroy()
  826. weld(ra, tor, CFrame.new(-1.5,0,.5)*CFrame.Angles(math.rad(-30),0,0))
  827. wait(.03)
  828. ra.Weld:Destroy()
  829. weld(ra, tor, CFrame.new(-1.5,.10,.10)*CFrame.Angles(math.rad(-35),0,0))
  830. wait(.03)
  831. ra.Weld:Destroy()
  832. weld(ra, tor, CFrame.new(-1.5,.20,.20)*CFrame.Angles(math.rad(-40),0,0))
  833. wait(.03)
  834. ra.Weld:Destroy()
  835. weld(ra, tor, CFrame.new(-1.5,.30,.30)*CFrame.Angles(math.rad(-45),0,0))
  836. wait(.03)
  837. ra.Weld:Destroy()
  838. weld(ra, tor, CFrame.new(-1.5,.40,.40)*CFrame.Angles(math.rad(-50),0,0))
  839. wait(.03)
  840. ra.Weld:Destroy()
  841. weld(ra, tor, CFrame.new(-1.5,.50,.50)*CFrame.Angles(math.rad(-55),0,0))
  842. wait(.03)
  843. ra.Weld:Destroy()
  844. weld(ra, tor, CFrame.new(-1.5,.55,.50)*CFrame.Angles(math.rad(-60),0,0))
  845. wait(.03)
  846. ra.Weld:Destroy()
  847. weld(ra, tor, CFrame.new(-1.5,.55,.50)*CFrame.Angles(math.rad(-65),0,0))
  848. wait(.03)
  849. ra.Weld:Destroy()
  850. weld(ra, tor, CFrame.new(-1.5,.55,.50)*CFrame.Angles(math.rad(-70),0,0))
  851. wait(.03)
  852. ra.Weld:Destroy()
  853. weld(ra, tor, CFrame.new(-1.5,.55,.50)*CFrame.Angles(math.rad(-75),0,0))
  854. char.MP40.Handle.Weld:Destroy()
  855. weld(char.MP40.Handle, char["Right Arm"], CFrame.new(0,-.10,-.20)*CFrame.Angles(math.rad(90),0,0))
  856. wait(.03)
  857. ra.Weld:Destroy()
  858. weld(ra, tor, CFrame.new(-1.5,.55,.50)*CFrame.Angles(math.rad(-80),0,0))
  859. wait(.03)
  860. ra.Weld:Destroy()
  861. weld(ra, tor, CFrame.new(-1.5,.55,.50)*CFrame.Angles(math.rad(-85),0,0))
  862. wait(.03)
  863. ra.Weld:Destroy()
  864. weld(ra, tor, CFrame.new(-1.5,.60,.25)*CFrame.Angles(math.rad(-90),0,0))
  865. wait(.03)
  866. if la:FindFirstChild("Weld") then la.Weld:Destroy() end
  867. weld(la, tor, CFrame.new(-1,0,-.10)*CFrame.Angles(math.rad(90),10,0))
  868. wait(.08)
  869. la.Weld:Destroy()
  870. weld(la, tor, CFrame.new(-.80,.50,-.10)*CFrame.Angles(math.rad(90),10,0))
  871. wait(.08)
  872. la.Weld:Destroy()
  873. weld(la, tor, CFrame.new(-.60,.50,-.10)*CFrame.Angles(math.rad(90),10,0))
  874. wait(.08)
  875. la.Weld:Destroy()
  876. weld(la, tor, CFrame.new(-.40,.50,-.10)*CFrame.Angles(math.rad(90),10,0))
  877. wait(.08)
  878. la.Weld:Destroy()
  879. weld(la, tor, CFrame.new(-.20,.50,-.10)*CFrame.Angles(math.rad(90),10,0))
  880. wait(.03)
  881. la.Weld:Destroy()
  882. weld(la, tor, CFrame.new(-.10,.80,-.10)*CFrame.Angles(math.rad(90),10,0))
  883. wait(.03)
  884. la.Weld:Destroy()
  885. weld(la, tor, CFrame.new(.05,1.10,-.10)*CFrame.Angles(math.rad(90),10,0))
  886. wait(.03)
  887. la.Weld:Destroy()
  888. weld(la, tor, CFrame.new(.05,1.20,-.10)*CFrame.Angles(math.rad(90),10,0))
  889. wait(.03)
  890. la.Weld:Destroy()
  891. weld(la, tor, CFrame.new(.05,1.30,-.10)*CFrame.Angles(math.rad(90),10,0))
  892. wait(.03)
  893. la.Weld:Destroy()
  894. weld(la, tor, CFrame.new(.10,1.3,-.10)*CFrame.Angles(math.rad(90),10,0))
  895. canfire = true
  896. end
  897. if epressed2 == 2 then
  898. epressed2 = 0
  899. end
  900. end
  901. end)
  902.  
  903.  
  904. function computeDirection(pos)
  905. local invrtDir = 1 / math.sqrt((pos.magnitude * pos.magnitude))
  906. local dir = Vector3.new(pos.x * invrtDir, pos.y * invrtDir, pos.z * invrtDir)
  907. return dir
  908. end
  909.  
  910. local bullet = Instance.new("Part")
  911. bullet.Name = "Bullet"
  912. bullet.Shape = 0
  913. bullet.BrickColor = BrickColor.new(103)
  914. bullet.FormFactor = "Custom"
  915. bullet.Size = Vector3.new(0.32, 0.33, 0.45)
  916. bullet.Locked = true
  917. local mesh = Instance.new("SpecialMesh",bullet)
  918. mesh.MeshType="FileMesh"
  919. mesh.MeshId = "http://www.roblox.com/asset?id=123881156"
  920. mesh.TextureId = "http://www.roblox.com/asset?id=123881235"
  921. mesh.VertexColor = Vector3.new(1, 1, 1)
  922. mesh.Scale = Vector3.new(0.5, 0.5, 1.1)
  923.  
  924. function fire()
  925.  
  926. local cam_rot = camera.CoordinateFrame - camera.CoordinateFrame.p
  927. local cam_scroll = (camera.CoordinateFrame.p - camera.Focus.p).magnitude
  928. local ncf = CFrame.new(camera.Focus.p)*cam_rot*CFrame.fromEulerAnglesXYZ(0.0025+math.random()/100, math.random(-10,10)/1000, 0)
  929. camera.CoordinateFrame = ncf*CFrame.new(10, 50, cam_scroll)
  930. local gun=Instance.new("Sound",char.MP40.Handle)
  931. game:service'Debris':AddItem(gun,.2)
  932. gun.SoundId="rbxassetid://132456050"
  933. gun.Volume=2
  934. gun:play()
  935.  
  936. local b = bullet:Clone()
  937. b.Parent = workspace
  938. b.CanCollide = true
  939. b.Name = "Bullet"
  940. game.Debris:AddItem(b,4)
  941. local target = mouse.Hit.p - char.MP40.Barrel.Position
  942. local dir = computeDirection(target)
  943. local pos = char.MP40.Barrel.Position + (dir * 2)
  944. local bcframe = CFrame.new(pos, pos + dir)
  945. local foirc = bcframe * CFrame.fromEulerAnglesXYZ(math.random(0,60) / 500, math.random(-5,10) / 100, 100) -- Lower values here will make it more accurate; higher, less accurate
  946. b.CFrame = foirc
  947. local bv = Instance.new("BodyVelocity")
  948. bv.maxForce = Vector3.new(math.huge,math.huge,math.huge)
  949. bv.velocity = foirc.lookVector * math.random(153, 200) -- Change this if you want the bullet to go faster or slower
  950. bv.Parent = b
  951. b.Touched:connect(function(hit)
  952. if hit and hit.Parent:FindFirstChild("Humanoid") then
  953. local isPlayer = hit.Parent:FindFirstChild("Humanoid")
  954. isPlayer:TakeDamage(math.random(6,14))
  955. b:Destroy()
  956. if isPlayer.Parent:FindFirstChild("ForceField") then isPlayer.Parent.ForceField:Destroy() b:Destroy() end
  957. end
  958. if hit and hit.Parent and hit.Parent.Parent and hit.Parent.Parent:FindFirstChild("Humanoid") then
  959. local isPlayer = hit.Parent.Parent:FindFirstChild("Humanoid")
  960. isPlayer:TakeDamage(math.random(6,14))
  961. b:Destroy()
  962. if isPlayer.Parent:FindFirstChild("ForceField") then isPlayer.Parent.ForceField:Destroy() end
  963. end
  964. if hit.Parent:FindFirstChild("Humanoid") == nil then
  965. local p = Instance.new("Part")
  966. p.formFactor = "Custom"
  967. p.Size = Vector3.new(0.5,0.5,0.5)
  968. p.Transparency = 1
  969. p.CanCollide = false
  970. p.Locked = true
  971. p.CFrame = hit.CFrame+(b.Position-hit.Position)
  972. local w = Instance.new("Weld")
  973. w.Part0 = mouse.Target
  974. w.Part1 = p
  975. w.C0 = mouse.Target.CFrame:inverse()
  976. w.C1 = p.CFrame:inverse()
  977. w.Parent = p
  978. local d = Instance.new("Decal")
  979. d.Parent = p
  980. d.Face = mouse.TargetSurface
  981. d.Texture = "http://www.roblox.com/asset/?id=2078626"
  982. p.Parent = game.Workspace
  983. game.Debris:AddItem(p,10)
  984. b:Destroy()
  985. end
  986. end)
  987. end
  988. function fire2()
  989. if la:FindFirstChild("Weld") then la.Weld:Destroy() end
  990. if ra:FindFirstChild("Weld") then ra.Weld:Destroy() end
  991. weld(la, tor, CFrame.new(.10,.95,-.10)*CFrame.Angles(math.rad(90),10,0))
  992. weld(ra, tor, CFrame.new(-1.5,.55,.25)*CFrame.Angles(math.rad(-90),0,0))
  993. SD.Visible = true
  994. light.Enabled = true
  995. wait()
  996. ra.Weld:Destroy()
  997. la.Weld:Destroy()
  998. weld(la, tor, CFrame.new(.10,.90,-.10)*CFrame.Angles(math.rad(90),10,0))
  999. weld(ra, tor, CFrame.new(-1.5,.50,.25)*CFrame.Angles(math.rad(-90),0,0))
  1000. SD.ImageTransparency = .10
  1001. wait()
  1002. ra.Weld:Destroy()
  1003. la.Weld:Destroy()
  1004. weld(la, tor, CFrame.new(.10,.85,-.10)*CFrame.Angles(math.rad(90),10,0))
  1005. weld(ra, tor, CFrame.new(-1.5,.45,.25)*CFrame.Angles(math.rad(-90),0,0))
  1006. SD.ImageTransparency = .20
  1007. wait()
  1008. ra.Weld:Destroy()
  1009. la.Weld:Destroy()
  1010. weld(la, tor, CFrame.new(.10,.80,-.10)*CFrame.Angles(math.rad(90),10,0))
  1011. weld(ra, tor, CFrame.new(-1.5,.40,.25)*CFrame.Angles(math.rad(-90),0,0))
  1012. SD.ImageTransparency = .30
  1013. wait()
  1014. ra.Weld:Destroy()
  1015. la.Weld:Destroy()
  1016. weld(la, tor, CFrame.new(.10,.85,-.10)*CFrame.Angles(math.rad(90),10,0))
  1017. weld(ra, tor, CFrame.new(-1.5,.45,.25)*CFrame.Angles(math.rad(-90),0,0))
  1018. SD.ImageTransparency = .40
  1019. wait()
  1020. ra.Weld:Destroy()
  1021. la.Weld:Destroy()
  1022. weld(la, tor, CFrame.new(.10,.90,-.10)*CFrame.Angles(math.rad(90),10,0))
  1023. weld(ra, tor, CFrame.new(-1.5,.50,.25)*CFrame.Angles(math.rad(-90),0,0))
  1024. SD.ImageTransparency = .50
  1025. wait()
  1026. ra.Weld:Destroy()
  1027. la.Weld:Destroy()
  1028. weld(la, tor, CFrame.new(.10,.95,-.10)*CFrame.Angles(math.rad(90),10,0))
  1029. weld(ra, tor, CFrame.new(-1.5,.55,.25)*CFrame.Angles(math.rad(-90),0,0))
  1030. SD.ImageTransparency = .60
  1031. wait()
  1032. ra.Weld:Destroy()
  1033. la.Weld:Destroy()
  1034. weld(la, tor, CFrame.new(.10,1,-.10)*CFrame.Angles(math.rad(90),10,0))
  1035. weld(ra, tor, CFrame.new(-1.5,.55,.25)*CFrame.Angles(math.rad(-90),0,0))
  1036. SD.ImageTransparency = .70
  1037. wait()
  1038. ra.Weld:Destroy()
  1039. la.Weld:Destroy()
  1040. weld(la, tor, CFrame.new(.10,1.3,-.10)*CFrame.Angles(math.rad(90),10,0))
  1041. weld(ra, tor, CFrame.new(-1.5,.60,.25)*CFrame.Angles(math.rad(-90),0,0))
  1042. SD.ImageTransparency = .80
  1043. light.Enabled = false
  1044. SD.Visible = false
  1045. end
  1046.  
  1047.  
  1048.  
  1049. mouse.Button1Down:connect(function()
  1050. if Ammo>=0 and canfire == true and firin == true then
  1051. pcall(function()
  1052. while firin == true do
  1053. wait()
  1054. fire2()
  1055. end
  1056. end)
  1057. end
  1058. end)
  1059.  
  1060. mouse.Button1Down:connect(function()
  1061. if Ammo >= 0 and canfire == true then
  1062. firin = true
  1063. pcall(function()
  1064. while firin == true do
  1065. wait(.16)
  1066. fire()
  1067. Ammo = Ammo - 1
  1068. end end)
  1069.  
  1070. end
  1071.  
  1072. end)
  1073.  
  1074. mouse.Button1Up:connect(function()
  1075. firin = false
  1076. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement