Advertisement
samuelrichter66

german solda

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