Advertisement
Void_scripter0

soldier

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