Advertisement
waconline

dual pistols

Oct 27th, 2019
302
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. function clerp(c1,c2,al)
  153. local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
  154. local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  155. for i,v in pairs(com1) do
  156. com1[i] = v+(com2[i]-v)*al
  157. end
  158. return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1)))
  159. end
  160.  
  161. plr = owner
  162. plrgui = plr:findFirstChild'PlayerGui'
  163. plrmouse = plr:GetMouse()
  164. char = plr.Character
  165. humanoid = char:findFirstChild("Humanoid")
  166. torso = char:findFirstChild("Torso")
  167. head = char.Head
  168. ra = char:findFirstChild("Right Arm")
  169. la = char:findFirstChild("Left Arm")
  170. rl = char:findFirstChild("Right Leg")
  171. ll = char:findFirstChild("Left Leg")
  172. rs = torso:findFirstChild("Right Shoulder")
  173. ls = torso:findFirstChild("Left Shoulder")
  174. rh = torso:findFirstChild("Right Hip")
  175. lh = torso:findFirstChild("Left Hip")
  176. neck = torso:findFirstChild("Neck")
  177. rj = char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
  178. rootpart = char:findFirstChild("HumanoidRootPart")
  179. camera = workspace.CurrentCamera
  180. anim = char:findFirstChild("Animate")
  181.  
  182. local rm = Instance.new("Weld")
  183. rm.C0 = CFrame.new(1.5, 0.5, 0)
  184. rm.C1 = CFrame.new(0, 0.5, 0)
  185. rm.Part0 = torso
  186. rm.Part1 = ra
  187. rm.Name = 'Right Shoulder'
  188.  
  189. local lm = Instance.new("Weld")
  190. lm.C0 = CFrame.new(-1.5, 0.5, 0)
  191. lm.C1 = CFrame.new(0, 0.5, 0)
  192. lm.Part0 = torso
  193. lm.Part1 = la
  194. lm.Name = 'Left Shoulder'
  195.  
  196. local tool = Instance.new('HopperBin', plr.Backpack)
  197. tool.Name = 'Dual M1911'
  198.  
  199. function scan(parent)
  200. local parts,last = {}
  201. for _,v in pairs(parent:GetChildren()) do
  202. if (v:IsA("BasePart")) then
  203. v.Anchored = true
  204. if (last) then
  205. local w = Instance.new("Weld")
  206. w.Name = ("%s_Weld"):format(v.Name)
  207. w.Part0,w.Part1 = last,v
  208. w.C0 = last.CFrame:inverse()
  209. w.C1 = v.CFrame:inverse()
  210. w.Parent = last
  211. end
  212. last = v
  213. table.insert(parts,v)
  214. end
  215. scan(v)
  216. end
  217. for _,v in pairs(parts) do
  218. v.Anchored = false
  219. v.Locked = true
  220. v.CanCollide = false
  221. end
  222. end
  223.  
  224. --1-Torso
  225. holsters=Instance.new("Model")
  226. holsters.Name="Torso"
  227. holsters.Parent=char
  228. --2-HolsterWeldTo2
  229. obj2=Instance.new("Part")
  230. obj2.CFrame=CFrame.new(Vector3.new(14.8519955,1.44200003,35.6479988)) * CFrame.Angles(1.8325955867767,-1.4901161193848e-008,-3.1415927410126)
  231. obj2.FormFactor=Enum.FormFactor.Custom
  232. obj2.LeftSurface=10
  233. obj2.Transparency=1
  234. obj2.TopSurface=10
  235. obj2.RightSurface=10
  236. obj2.Material="SmoothPlastic"
  237. obj2.Size=Vector3.new(0.200000003,0.200000003,1.60000014)
  238. obj2.FrontSurface=10
  239. obj2.BottomSurface=10
  240. obj2.BackSurface=10
  241. obj2.BrickColor=BrickColor.new("Dark stone grey")
  242. obj2.Name="HolsterWeldTo2"
  243. obj2.Parent=holsters
  244. --3-Mesh
  245. obj3=Instance.new("BlockMesh")
  246. obj3.Scale=Vector3.new(0.999499977,1,1)
  247. obj3.Parent=obj2
  248. --4-Belt
  249. obj4=Instance.new("Part")
  250. obj4.CFrame=CFrame.new(Vector3.new(13.6000061,1.49000156,35.8999977)) * CFrame.Angles(-1.4901162970204e-008,0,-0)
  251. obj4.FormFactor=Enum.FormFactor.Custom
  252. obj4.LeftSurface=10
  253. obj4.TopSurface=10
  254. obj4.RightSurface=10
  255. obj4.Material="SmoothPlastic"
  256. obj4.Size=Vector3.new(2,0.200000003,1)
  257. obj4.FrontSurface=10
  258. obj4.BottomSurface=10
  259. obj4.BackSurface=10
  260. obj4.BrickColor=BrickColor.new("Dark stone grey")
  261. obj4.Name="Belt"
  262. obj4.Parent=holsters
  263. --5-Mesh
  264. obj5=Instance.new("BlockMesh")
  265. obj5.Scale=Vector3.new(1.10000002,1,1.10000002)
  266. obj5.Parent=obj4
  267. --6-Hold2
  268. obj6=Instance.new("Part")
  269. obj6.CFrame=CFrame.new(Vector3.new(14.8000011,1.0950017,35.6999893)) * CFrame.Angles(0.26179936528206,0,-0)
  270. obj6.FormFactor=Enum.FormFactor.Custom
  271. obj6.LeftSurface=10
  272. obj6.TopSurface=10
  273. obj6.RightSurface=10
  274. obj6.Material="SmoothPlastic"
  275. obj6.Size=Vector3.new(0.400000006,1.00999999,0.600000024)
  276. obj6.FrontSurface=10
  277. obj6.BottomSurface=10
  278. obj6.BackSurface=10
  279. obj6.BrickColor=BrickColor.new("Dark stone grey")
  280. obj6.Name="Hold2"
  281. obj6.Parent=holsters
  282. --7-TorsoWeld
  283. obj7=Instance.new("Part")
  284. obj7.CFrame=CFrame.new(Vector3.new(13.6000061,1.99000168,35.8999939)) * CFrame.Angles(-0,0,-0)
  285. obj7.FormFactor=Enum.FormFactor.Custom
  286. obj7.LeftSurface=10
  287. obj7.Transparency=1
  288. obj7.TopSurface=10
  289. obj7.RightSurface=10
  290. obj7.Size=Vector3.new(2,2,1)
  291. obj7.FrontSurface=10
  292. obj7.BottomSurface=10
  293. obj7.BackSurface=10
  294. obj7.BrickColor=BrickColor.new("Bright blue")
  295. obj7.Name="TorsoWeld"
  296. obj7.Parent=holsters
  297. --8-HolsterWeldTo
  298. obj8=Instance.new("Part")
  299. obj8.CFrame=CFrame.new(Vector3.new(12.342,1.44200003,35.6479988)) * CFrame.Angles(1.8325955867767,-1.4901161193848e-008,-3.1415927410126)
  300. obj8.FormFactor=Enum.FormFactor.Custom
  301. obj8.LeftSurface=10
  302. obj8.Transparency=1
  303. obj8.TopSurface=10
  304. obj8.RightSurface=10
  305. obj8.Material="SmoothPlastic"
  306. obj8.Size=Vector3.new(0.200000003,0.200000003,1.60000014)
  307. obj8.FrontSurface=10
  308. obj8.BottomSurface=10
  309. obj8.BackSurface=10
  310. obj8.BrickColor=BrickColor.new("Dark stone grey")
  311. obj8.Name="HolsterWeldTo"
  312. obj8.Parent=holsters
  313. --9-Mesh
  314. obj9=Instance.new("BlockMesh")
  315. obj9.Scale=Vector3.new(0.999499977,1,1)
  316. obj9.Parent=obj8
  317. --10-Hold
  318. obj10=Instance.new("Part")
  319. obj10.CFrame=CFrame.new(Vector3.new(12.4000053,1.09500158,35.6999893)) * CFrame.Angles(0.26179936528206,0,-0)
  320. obj10.FormFactor=Enum.FormFactor.Custom
  321. obj10.LeftSurface=10
  322. obj10.TopSurface=10
  323. obj10.RightSurface=10
  324. obj10.Material="SmoothPlastic"
  325. obj10.Size=Vector3.new(0.400000006,1.00999999,0.600000024)
  326. obj10.FrontSurface=10
  327. obj10.BottomSurface=10
  328. obj10.BackSurface=10
  329. obj10.BrickColor=BrickColor.new("Dark stone grey")
  330. obj10.Name="Hold"
  331. obj10.Parent=holsters
  332. holsters:MakeJoints()
  333. scan(holsters)
  334.  
  335. --1-M1911
  336. gun=Instance.new("Model")
  337. gun.Name="M1911"
  338. gun.Parent=char
  339. --2-Handle
  340. obj2=Instance.new("Part")
  341. obj2.CFrame=CFrame.new(Vector3.new(12.3420238,1.86332655,36.3927727)) * CFrame.Angles(1.5707963705063,-4.4703483581543e-008,3.1415927410126)
  342. obj2.FormFactor=Enum.FormFactor.Custom
  343. obj2.LeftSurface=10
  344. obj2.TopSurface=10
  345. obj2.RightSurface=10
  346. obj2.Material=Enum.Material.Wood
  347. obj2.Size=Vector3.new(0.200000003,0.99999994,0.400000036)
  348. obj2.FrontSurface=10
  349. obj2.BottomSurface=10
  350. obj2.BackSurface=10
  351. obj2.BrickColor=BrickColor.new("Brown")
  352. obj2.Name="Handle"
  353. obj2.Parent=gun
  354. --3-Decor
  355. obj3=Instance.new("Part")
  356. obj3.CFrame=CFrame.new(Vector3.new(12.3420143,2.28510284,35.9773712)) * CFrame.Angles(1.832595705986,0,-3.1415927410126)
  357. obj3.FormFactor=Enum.FormFactor.Custom
  358. obj3.LeftSurface=10
  359. obj3.TopSurface=10
  360. obj3.RightSurface=10
  361. obj3.Material="SmoothPlastic"
  362. obj3.Size=Vector3.new(0.200000003,0.200000003,0.200000003)
  363. obj3.FrontSurface=10
  364. obj3.BottomSurface=10
  365. obj3.BackSurface=10
  366. obj3.BrickColor=BrickColor.new("Dark stone grey")
  367. obj3.Name="Decor"
  368. obj3.Parent=gun
  369. --4-Mesh
  370. obj4=Instance.new("BlockMesh")
  371. obj4.Offset=Vector3.new(0,0.00999999978,0.0399999991)
  372. obj4.Scale=Vector3.new(0.699999988,0.200000003,0.800000012)
  373. obj4.Parent=obj3
  374. --5-Decor
  375. obj5=Instance.new("Part")
  376. obj5.CFrame=CFrame.new(Vector3.new(12.3420143,1.46716928,35.8617401)) * CFrame.Angles(1.8325955867767,-1.4901161193848e-008,-3.1415927410126)
  377. obj5.FormFactor=Enum.FormFactor.Custom
  378. obj5.LeftSurface=10
  379. obj5.TopSurface=10
  380. obj5.RightSurface=10
  381. obj5.Material="SmoothPlastic"
  382. obj5.Size=Vector3.new(0.200000003,0.400000006,0.200000003)
  383. obj5.FrontSurface=10
  384. obj5.BottomSurface=10
  385. obj5.BackSurface=10
  386. obj5.BrickColor=BrickColor.new("Dark stone grey")
  387. obj5.Name="Decor"
  388. obj5.Parent=gun
  389. --6-Mesh
  390. obj6=Instance.new("BlockMesh")
  391. obj6.Scale=Vector3.new(0.600000024,1,0.200000003)
  392. obj6.Parent=obj5
  393. --7-Decor
  394. obj7=Instance.new("Part")
  395. obj7.CFrame=CFrame.new(Vector3.new(12.3420124,1.55429673,36.0928192)) * CFrame.Angles(0.45686540007591,-1.1175870895386e-008,3.141592502594)
  396. obj7.FormFactor=Enum.FormFactor.Custom
  397. obj7.LeftSurface=10
  398. obj7.TopSurface=10
  399. obj7.RightSurface=10
  400. obj7.Material="SmoothPlastic"
  401. obj7.Size=Vector3.new(0.200000003,0.310000002,0.200000003)
  402. obj7.FrontSurface=10
  403. obj7.BottomSurface=10
  404. obj7.BackSurface=10
  405. obj7.BrickColor=BrickColor.new("Dark stone grey")
  406. obj7.Name="Decor"
  407. obj7.Parent=gun
  408. --8-Mesh
  409. obj8=Instance.new("BlockMesh")
  410. obj8.Scale=Vector3.new(0.600000024,1,0.200000003)
  411. obj8.Parent=obj7
  412. --9-Decor
  413. obj9=Instance.new("Part")
  414. obj9.CFrame=CFrame.new(Vector3.new(12.3420258,2.21372294,35.8965569)) * CFrame.Angles(0.76370096206665,-1.4901161193848e-008,-3.1415927410126)
  415. obj9.FormFactor=Enum.FormFactor.Custom
  416. obj9.LeftSurface=10
  417. obj9.TopSurface=10
  418. obj9.RightSurface=10
  419. obj9.Material="SmoothPlastic"
  420. obj9.Size=Vector3.new(0.200000003,0.200000003,0.200000003)
  421. obj9.FrontSurface=10
  422. obj9.BottomSurface=10
  423. obj9.BackSurface=10
  424. obj9.BrickColor=BrickColor.new("Dark stone grey")
  425. obj9.Name="Decor"
  426. obj9.Parent=gun
  427. --10-Mesh
  428. obj10=Instance.new("BlockMesh")
  429. obj10.Scale=Vector3.new(0.400000006,0.200000003,1)
  430. obj10.Parent=obj9
  431. --11-Decor
  432. obj11=Instance.new("Part")
  433. obj11.CFrame=CFrame.new(Vector3.new(12.3420229,1.8633275,36.2927704)) * CFrame.Angles(1.5707963705063,-4.4703483581543e-008,3.1415927410126)
  434. obj11.FormFactor=Enum.FormFactor.Custom
  435. obj11.LeftSurface=10
  436. obj11.TopSurface=10
  437. obj11.RightSurface=10
  438. obj11.Material="SmoothPlastic"
  439. obj11.Size=Vector3.new(0.200000003,1.20000005,0.400000036)
  440. obj11.FrontSurface=10
  441. obj11.BottomSurface=10
  442. obj11.BackSurface=10
  443. obj11.BrickColor=BrickColor.new("Dark stone grey")
  444. obj11.Name="Decor"
  445. obj11.Parent=gun
  446. --12-Mesh
  447. obj12=Instance.new("BlockMesh")
  448. obj12.Offset=Vector3.new(0,-0.0700000003,0)
  449. obj12.Scale=Vector3.new(0.995000005,0.949999988,1.20000005)
  450. obj12.Parent=obj11
  451. --13-Decor
  452. obj13=Instance.new("Part")
  453. obj13.CFrame=CFrame.new(Vector3.new(12.3420258,2.30202365,35.8373909)) * CFrame.Angles(1.756756901741,-1.0430812835693e-007,3.1415927410126)
  454. obj13.FormFactor=Enum.FormFactor.Custom
  455. obj13.LeftSurface=10
  456. obj13.TopSurface=10
  457. obj13.RightSurface=10
  458. obj13.Material="SmoothPlastic"
  459. obj13.Size=Vector3.new(0.200000003,0.200000003,0.200000003)
  460. obj13.FrontSurface=10
  461. obj13.BottomSurface=10
  462. obj13.BackSurface=10
  463. obj13.BrickColor=BrickColor.new("Dark stone grey")
  464. obj13.Name="Decor"
  465. obj13.Parent=gun
  466. --14-Mesh
  467. obj14=Instance.new("BlockMesh")
  468. obj14.Scale=Vector3.new(0.400000006,0.200000003,0.400000006)
  469. obj14.Parent=obj13
  470. --15-BulletCase
  471. obj15=Instance.new("Part")
  472. obj15.CFrame=CFrame.new(Vector3.new(12.3420229,1.44165683,35.6482697)) * CFrame.Angles(1.8325955867767,-1.4901161193848e-008,-3.1415927410126)
  473. obj15.FormFactor=Enum.FormFactor.Custom
  474. obj15.LeftSurface=10
  475. obj15.TopSurface=10
  476. obj15.RightSurface=10
  477. obj15.Material="SmoothPlastic"
  478. obj15.Size=Vector3.new(0.200000003,0.200000003,1.60000014)
  479. obj15.FrontSurface=10
  480. obj15.BottomSurface=10
  481. obj15.BackSurface=10
  482. obj15.BrickColor=BrickColor.new("Dark stone grey")
  483. obj15.Name="BulletCase"
  484. obj15.Parent=gun
  485. --16-Mesh
  486. obj16=Instance.new("BlockMesh")
  487. obj16.Scale=Vector3.new(0.999499977,1,1)
  488. obj16.Parent=obj15
  489. --17-Flashlight
  490. obj17=Instance.new("Part")
  491. obj17.CFrame=CFrame.new(Vector3.new(12.3420115,0.729269207,35.601902)) * CFrame.Angles(-2.8797931671143,-1.7763568394003e-015,-3.1415927410126)
  492. obj17.FormFactor=Enum.FormFactor.Custom
  493. obj17.LeftSurface=10
  494. obj17.TopSurface=10
  495. obj17.RightSurface=10
  496. obj17.Material="SmoothPlastic"
  497. obj17.Size=Vector3.new(0.200000003,0.200000003,0.200000003)
  498. obj17.FrontSurface=10
  499. obj17.BottomSurface=10
  500. obj17.BackSurface=10
  501. obj17.BrickColor=BrickColor.new("Pastel yellow")
  502. obj17.Name="Flashlight"
  503. obj17.Parent=gun
  504. --18-Mesh
  505. obj18=Instance.new("CylinderMesh")
  506. obj18.Offset=Vector3.new(0,0,0.0500000007)
  507. obj18.Scale=Vector3.new(0.5,1.01999998,0.5)
  508. obj18.Parent=obj17
  509. --19-Decor
  510. obj19=Instance.new("Part")
  511. obj19.CFrame=CFrame.new(Vector3.new(12.3420143,2.1178081,35.8290215)) * CFrame.Angles(1.832595705986,0,-3.1415927410126)
  512. obj19.FormFactor=Enum.FormFactor.Custom
  513. obj19.LeftSurface=10
  514. obj19.TopSurface=10
  515. obj19.RightSurface=10
  516. obj19.Material="SmoothPlastic"
  517. obj19.Size=Vector3.new(0.200000003,0.400000036,0.200000003)
  518. obj19.FrontSurface=10
  519. obj19.BottomSurface=10
  520. obj19.BackSurface=10
  521. obj19.BrickColor=BrickColor.new("Black")
  522. obj19.Name="Decor"
  523. obj19.Parent=gun
  524. --20-Mesh
  525. obj20=Instance.new("BlockMesh")
  526. obj20.Scale=Vector3.new(0.5,0.5,1.10000002)
  527. obj20.Parent=obj19
  528. --21-Decor
  529. obj21=Instance.new("Part")
  530. obj21.CFrame=CFrame.new(Vector3.new(12.2895117,2.05304575,35.6843338)) * CFrame.Angles(1.832595705986,1.5699505805969,-3.1415927410126)
  531. obj21.FormFactor=Enum.FormFactor.Custom
  532. obj21.LeftSurface=10
  533. obj21.TopSurface=10
  534. obj21.RightSurface=10
  535. obj21.Material="SmoothPlastic"
  536. obj21.Size=Vector3.new(0.399999976,0.200000003,0.200000003)
  537. obj21.FrontSurface=10
  538. obj21.BottomSurface=10
  539. obj21.BackSurface=10
  540. obj21.BrickColor=BrickColor.new("Dark stone grey")
  541. obj21.Name="Decor"
  542. obj21.Parent=gun
  543. --22-Mesh
  544. obj22=Instance.new("SpecialMesh")
  545. obj22.MeshType=Enum.MeshType.Wedge
  546. obj22.Scale=Vector3.new(1,0.25,0.50999999)
  547. obj22.Parent=obj21
  548. --23-Decor
  549. obj23=Instance.new("Part")
  550. obj23.CFrame=CFrame.new(Vector3.new(12.3420172,1.41577363,35.744442)) * CFrame.Angles(-2.8797931671143,-1.7763568394003e-015,-3.1415927410126)
  551. obj23.FormFactor=Enum.FormFactor.Custom
  552. obj23.LeftSurface=10
  553. obj23.TopSurface=10
  554. obj23.RightSurface=10
  555. obj23.Material="SmoothPlastic"
  556. obj23.Size=Vector3.new(0.200000003,1.60000002,0.200000003)
  557. obj23.FrontSurface=10
  558. obj23.BottomSurface=10
  559. obj23.BackSurface=10
  560. obj23.BrickColor=BrickColor.new("Dark stone grey")
  561. obj23.Name="Decor"
  562. obj23.Parent=gun
  563. --24-Mesh
  564. obj24=Instance.new("CylinderMesh")
  565. obj24.Parent=obj23
  566. --25-ShellCaseSpawner
  567. obj25=Instance.new("Part")
  568. obj25.CFrame=CFrame.new(Vector3.new(12.3420172,1.75731552,35.6289024)) * CFrame.Angles(-2.8797931671143,-1.7763568394003e-015,-3.1415927410126)
  569. obj25.FormFactor=Enum.FormFactor.Custom
  570. obj25.LeftSurface=10
  571. obj25.TopSurface=10
  572. obj25.RightSurface=10
  573. obj25.Material="SmoothPlastic"
  574. obj25.Size=Vector3.new(0.200000003,0.200000003,0.200000003)
  575. obj25.FrontSurface=10
  576. obj25.BottomSurface=10
  577. obj25.BackSurface=10
  578. obj25.Name="ShellCaseSpawner"
  579. obj25.Parent=gun
  580. --26-Mesh
  581. obj26=Instance.new("CylinderMesh")
  582. obj26.Offset=Vector3.new(0.0149999997,0,-0.0350000001)
  583. obj26.Scale=Vector3.new(0.75,1,0.75)
  584. obj26.Parent=obj25
  585. --27-Decor
  586. obj27=Instance.new("Part")
  587. obj27.CFrame=CFrame.new(Vector3.new(12.3420115,0.765501678,35.4666672)) * CFrame.Angles(-2.8797931671143,-1.7763568394003e-015,-3.1415927410126)
  588. obj27.FormFactor=Enum.FormFactor.Custom
  589. obj27.LeftSurface=10
  590. obj27.TopSurface=10
  591. obj27.RightSurface=10
  592. obj27.Material="SmoothPlastic"
  593. obj27.Size=Vector3.new(0.200000003,0.200000003,0.200000003)
  594. obj27.FrontSurface=10
  595. obj27.BottomSurface=10
  596. obj27.BackSurface=10
  597. obj27.BrickColor=BrickColor.new("Black")
  598. obj27.Name="Decor"
  599. obj27.Parent=gun
  600. --28-Mesh
  601. obj28=Instance.new("CylinderMesh")
  602. obj28.Offset=Vector3.new(0,0,0.0500000007)
  603. obj28.Scale=Vector3.new(0.5,1.01999998,0.5)
  604. obj28.Parent=obj27
  605. --29-Decor
  606. obj29=Instance.new("Part")
  607. obj29.CFrame=CFrame.new(Vector3.new(12.3920164,1.4734931,35.5290413)) * CFrame.Angles(-1.3089969158173,-1.5701057910919,-0)
  608. obj29.FormFactor=Enum.FormFactor.Custom
  609. obj29.LeftSurface=10
  610. obj29.TopSurface=10
  611. obj29.RightSurface=10
  612. obj29.Material="SmoothPlastic"
  613. obj29.Size=Vector3.new(1.60000002,0.200000003,0.200000003)
  614. obj29.FrontSurface=10
  615. obj29.BottomSurface=10
  616. obj29.BackSurface=10
  617. obj29.BrickColor=BrickColor.new("Dark stone grey")
  618. obj29.Name="Decor"
  619. obj29.Parent=gun
  620. --30-Mesh
  621. obj30=Instance.new("SpecialMesh")
  622. obj30.MeshType=Enum.MeshType.Wedge
  623. obj30.Scale=Vector3.new(1,0.25,0.5)
  624. obj30.Parent=obj29
  625. --31-Decor
  626. obj31=Instance.new("Part")
  627. obj31.CFrame=CFrame.new(Vector3.new(12.2895117,1.18371284,35.4513969)) * CFrame.Angles(1.832595705986,1.5699505805969,-3.1415927410126)
  628. obj31.FormFactor=Enum.FormFactor.Custom
  629. obj31.LeftSurface=10
  630. obj31.TopSurface=10
  631. obj31.RightSurface=10
  632. obj31.Material="SmoothPlastic"
  633. obj31.Size=Vector3.new(1,0.200000003,0.200000003)
  634. obj31.FrontSurface=10
  635. obj31.BottomSurface=10
  636. obj31.BackSurface=10
  637. obj31.BrickColor=BrickColor.new("Dark stone grey")
  638. obj31.Name="Decor"
  639. obj31.Parent=gun
  640. --32-Mesh
  641. obj32=Instance.new("SpecialMesh")
  642. obj32.MeshType=Enum.MeshType.Wedge
  643. obj32.Scale=Vector3.new(1,0.25,0.50999999)
  644. obj32.Parent=obj31
  645. gun:MakeJoints()
  646. scan(gun)
  647.  
  648. local gun2 = gun:clone()
  649. gun2.Parent = char
  650.  
  651. local torsoweld = Instance.new('Weld', char)
  652. torsoweld.Part0 = torso
  653. torsoweld.Part1 = holsters.TorsoWeld
  654. torsoweld.C1 = CFrame.Angles(0,math.pi,0)
  655.  
  656. local gunweld = Instance.new('Weld', char)
  657. gunweld.Part0 = gun.BulletCase
  658. gunweld.Part1 = holsters.HolsterWeldTo
  659.  
  660. local gunweld2 = Instance.new('Weld', char)
  661. gunweld2.Part0 = gun2.BulletCase
  662. gunweld2.Part1 = holsters.HolsterWeldTo2
  663.  
  664. local bodygyro = Instance.new('BodyGyro')
  665. bodygyro.maxTorque = Vector3.new(14e16,14e16,14e16)
  666. bodygyro.P = 15000
  667.  
  668. local rsc0 = rm.C0
  669. local lsc0 = lm.C0
  670. local angle = 0
  671. local anglespeed = .5
  672. local speed = .3
  673. local side = 0
  674. local Equipped = false
  675. local origneckc0 = neck.C0
  676. local origneckc1 = neck.C1
  677. local neckc0 = CFrame.new(0, 1, 0)
  678. local firing = false
  679. local pistol = 1
  680. local light = false
  681.  
  682. local gunlight = Instance.new('SpotLight', gun.Flashlight)
  683. gunlight.Range = 40
  684. gunlight.Angle = 60
  685. gunlight.Face = 'Bottom'
  686. gunlight.Shadows = true
  687. gunlight.Enabled = false
  688.  
  689. local gunlight2 = gunlight:clone()
  690. gunlight2.Parent = gun2.Flashlight
  691.  
  692. local fire = Instance.new('Sound', head)
  693. fire.SoundId = "rbxassetid://132373536"
  694. fire.Volume = 1
  695.  
  696. local reload = Instance.new('Sound', head)
  697. reload.SoundId = "rbxassetid://138109513"
  698. reload.Volume = 1
  699.  
  700. local ammo = 14
  701. local scrgui = Instance.new('ScreenGui', plrgui)
  702. scrgui.Name = 'DualGunsGui'
  703.  
  704. local ammonution = Instance.new('TextLabel', scrgui)
  705. ammonution.Size = UDim2.new(0,150,0,50)
  706. ammonution.Position = UDim2.new(1, -250, 1, -70)
  707. ammonution.BackgroundTransparency = 1
  708. ammonution.TextColor3 = Color3.new(1,1,1)
  709. ammonution.TextStrokeTransparency = .1
  710. ammonution.Text = ('| '):rep(ammo)
  711. ammonution.TextXAlignment = 'Right'
  712. ammonution.ZIndex = 2
  713. ammonution.FontSize = 'Size18'
  714.  
  715. local ammonution2 = Instance.new('TextLabel', scrgui)
  716. ammonution2.Size = UDim2.new(0,150,0,50)
  717. ammonution2.Position = UDim2.new(1, -250, 1, -70)
  718. ammonution2.BackgroundTransparency = 1
  719. ammonution2.TextColor3 = Color3.new(.5,.5,.5)
  720. ammonution2.TextStrokeTransparency = .1
  721. ammonution2.TextXAlignment = 'Right'
  722. ammonution2.Text = ('| '):rep(ammo)
  723. ammonution2.FontSize = 'Size18'
  724.  
  725. local rel = Instance.new('TextButton', scrgui)
  726. rel.Size = UDim2.new(0,500,0,250)
  727. rel.Position = UDim2.new(.5, -250, .8, -250)
  728. rel.BackgroundTransparency = 1
  729. rel.TextColor3 = Color3.new(.7,0,0)
  730. rel.Visible = false
  731. rel.Text = 'Reload (r)'
  732. rel.FontSize = 'Size24'
  733.  
  734. rel.MouseButton1Down:connect(function()
  735. if ammo >= 14 or firing then return end
  736. dontclerpneck = true
  737. firing = true
  738. local dropammo = gun.Handle:clone()
  739. dropammo:ClearAllChildren()
  740. dropammo.CanCollide = true
  741. dropammo.BrickColor = BrickColor.Black()
  742. dropammo.Parent = workspace
  743. dropammo.CFrame = gun.Handle.CFrame
  744. local dropammo2 = dropammo:clone()
  745. dropammo2.Parent = workspace
  746. dropammo2.CFrame = gun2.Handle.CFrame * CFrame.new(0, -.5, 0)
  747. game:service'Debris':AddItem(dropammo,15)
  748. game:service'Debris':AddItem(dropammo2,15)
  749. wait(.5)
  750. reload:play()
  751. for i = 1, 65 do
  752. firing = true
  753. rscf = rsc0 * CFrame.Angles(math.pi/2, 0, 0)
  754. lscf = lsc0 * CFrame.new(1.2, 0, -.4) * CFrame.Angles(math.pi/4 + math.sin(angle)*math.random()/20, math.rad(30), math.pi/3.2)
  755. lm.C0 = clerp(lm.C0,lscf,speed)
  756. rm.C0 = clerp(rm.C0,rscf,speed)
  757. game:service'RunService'.RenderStepped:wait()
  758. end
  759. reload:play()
  760. for i = 1, 65 do
  761. firing = true
  762. rscf = rsc0 * CFrame.new(-1.2, 0, -.4) * CFrame.Angles(math.pi/4 + math.sin(angle)*math.random()/20, -math.rad(30), -math.pi/3.2)
  763. lscf = lsc0 * CFrame.Angles(math.pi/2, 0, 0)
  764. lm.C0 = clerp(lm.C0,lscf,speed)
  765. rm.C0 = clerp(rm.C0,rscf,speed)
  766. game:service'RunService'.RenderStepped:wait()
  767. end
  768. dontclerpneck = false
  769. firing = false
  770. ammo = 14
  771. ammonution.Text = ('| '):rep(ammo)
  772. end)
  773. tool.Selected:connect(function(mouse)
  774. Equipped = true
  775. bodygyro.Parent = torso
  776. bodygyro.cframe = torso.CFrame
  777. rs.Parent = nil
  778. ls.Parent = nil
  779. rm.Parent = torso
  780. lm.Parent = torso
  781. neck.C0 = CFrame.new(0, 1, 0)
  782. neck.C1 = CFrame.new(0, -0.5, 0)
  783. gunweld.Part0 = gun.Handle
  784. gunweld2.Part0 = gun2.Handle
  785. gunweld.Part1 = ra
  786. gunweld2.Part1 = la
  787. gunweld.C1 = CFrame.new(0, -.8, 0)
  788. gunweld.C0 = CFrame.Angles(math.pi/2-math.rad(15), 0, math.pi)
  789. gunweld2.C1 = CFrame.new(0, -.8, 0)
  790. gunweld2.C0 = CFrame.Angles(math.pi/2-math.rad(15), 0, math.pi)
  791. mouse.KeyDown:connect(function(k)
  792. if k == "r" then
  793. if ammo >= 14 or firing then return end
  794. dontclerpneck = true
  795. firing = true
  796. local dropammo = gun.Handle:clone()
  797. dropammo:ClearAllChildren()
  798. dropammo.CanCollide = true
  799. dropammo.BrickColor = BrickColor.Black()
  800. dropammo.Parent = workspace
  801. dropammo.CFrame = gun.Handle.CFrame
  802. local dropammo2 = dropammo:clone()
  803. dropammo2.Parent = workspace
  804. dropammo2.CFrame = gun2.Handle.CFrame * CFrame.new(0, -.5, 0)
  805. game:service'Debris':AddItem(dropammo,15)
  806. game:service'Debris':AddItem(dropammo2,15)
  807. wait(.5)
  808. reload:play()
  809. for i = 1, 65 do
  810. firing = true
  811. rscf = rsc0 * CFrame.Angles(math.pi/2, 0, 0)
  812. lscf = lsc0 * CFrame.new(1.2, 0, -.4) * CFrame.Angles(math.pi/4 + math.sin(angle)*math.random()/20, math.rad(30), math.pi/3.2)
  813. lm.C0 = clerp(lm.C0,lscf,speed)
  814. rm.C0 = clerp(rm.C0,rscf,speed)
  815. game:service'RunService'.RenderStepped:wait()
  816. end
  817. reload:play()
  818. for i = 1, 65 do
  819. firing = true
  820. rscf = rsc0 * CFrame.new(-1.2, 0, -.4) * CFrame.Angles(math.pi/4 + math.sin(angle)*math.random()/20, -math.rad(30), -math.pi/3.2)
  821. lscf = lsc0 * CFrame.Angles(math.pi/2, 0, 0)
  822. lm.C0 = clerp(lm.C0,lscf,speed)
  823. rm.C0 = clerp(rm.C0,rscf,speed)
  824. game:service'RunService'.RenderStepped:wait()
  825. end
  826. dontclerpneck = false
  827. firing = false
  828. ammo = 14
  829. ammonution.Text = ('| '):rep(ammo)
  830. end
  831. if k == "f" then
  832. light = not light
  833. local sound = Instance.new('Sound', head)
  834. sound.SoundId = "rbxassetid://115959318"
  835. sound.Volume = 1
  836. sound:play()
  837. game:service'Debris':AddItem(sound,1)
  838. end
  839. end)
  840. mouse.Button1Down:connect(function()
  841. if ammo <= 0 then
  842. local sound = Instance.new('Sound', head)
  843. sound.SoundId = "rbxassetid://132464034"
  844. sound.Volume = 1
  845. sound:play()
  846. game:service'Debris':AddItem(sound,1)
  847. end
  848. if firing or ammo <= 0 then return end
  849. ammo = ammo - 1
  850. ammonution.Text = ('| '):rep(ammo)
  851. firing = true
  852. local pa = Instance.new('Part')
  853. pa.CanCollide = false
  854. pa.Anchored = true
  855. pa.Locked = true
  856. pa.FormFactor = 'Custom'
  857. pa.BrickColor = BrickColor.new('New Yeller')
  858. pa.Size = Vector3.new(.2,3,.2)
  859. Instance.new('BlockMesh', pa).Scale = Vector3.new(.2,3,.2)
  860. local thegun
  861. if pistol == 1 then
  862. thegun = gun.BulletCase
  863. elseif pistol == 2 then
  864. thegun = gun2.BulletCase
  865. end
  866. local muzzle = Instance.new('PointLight', thegun)
  867. muzzle.Range = 12
  868. muzzle.Color = Color3.new(1,.6,.1)
  869. game:service'Debris':AddItem(muzzle, .05)
  870. local shell = pa:clone()
  871. shell:ClearAllChildren()
  872. shell.Anchored = false
  873. shell.CFrame = thegun.Parent.ShellCaseSpawner.CFrame
  874. shell.Size = Vector3.new(.2,.5,.2)
  875. shell.Parent = workspace
  876. shell.BrickColor = BrickColor.new('Bright yellow')
  877. shell.CanCollide = true
  878. game:service'Debris':AddItem(shell, 5)
  879. local bulletpos = thegun.Position
  880. local bulletvelocity = (mouse.Hit.p - bulletpos).unit*15
  881. local lastbulletpos = thegun.Position
  882. fire:play()
  883. coroutine.wrap(function()
  884. while game:service'RunService'.Stepped:wait() do
  885. lastbulletpos = bulletpos
  886. bulletpos = bulletpos + bulletvelocity
  887. local RayCast = Ray.new(lastbulletpos, (bulletpos - lastbulletpos))
  888. local hit, hitpos = workspace:FindPartOnRay(RayCast, char)
  889. if (torso.Position - pa.Position).magnitude > 800 then
  890. pa:Destroy()
  891. break
  892. end
  893. pa.Anchored = true
  894. pa.CFrame = CFrame.new(bulletpos, bulletpos+bulletvelocity) * CFrame.Angles(math.pi/2, 0, 0)
  895. if hit then
  896. local damage
  897. local sound = Instance.new('Sound', pa)
  898. sound.SoundId = "rbxassetid://166423137"
  899. sound.Pitch = 1.2+math.random()/3
  900. sound.Volume = 1
  901. sound:play()
  902. pa:Destroy()
  903. game:service'Debris':AddItem(sound,4)
  904. local ray = Ray.new(rootpart.Position, Vector3.new(0, -6, 0))
  905. local hitz, enz = workspace:FindPartOnRay(ray, char)
  906. local hum = hit and hit.Parent and hit.Parent:findFirstChild'Humanoid'
  907. if hum then
  908. damage = math.random(5,10)
  909. hum:TakeDamage(damage)
  910. end
  911. local hum = hit and hit.Parent and hit.Parent.Parent and hit.Parent.Parent:findFirstChild'Humanoid'
  912. if hum then
  913. damage = math.random(5,10)
  914. hum:TakeDamage(damage)
  915. end
  916. break
  917. end
  918. pa.Anchored = true
  919. pa.Parent = char
  920. pa.CFrame = CFrame.new(bulletpos, bulletpos+bulletvelocity) * CFrame.Angles(math.pi/2, 0, 0)
  921. end
  922. end)()
  923.  
  924. if pistol == 1 then
  925. pistol = 2
  926. for i = 1, 4 do
  927. rscf = CFrame.new(Vector3.new(rsc0.x, rsc0.y, rsc0.z), torso.CFrame:pointToObjectSpace(plrmouse.Hit.p)) * CFrame.new(0, 0, .5) * CFrame.Angles(math.pi/1.5 + math.sin(angle)*math.random()/20, 0, math.cos(angle)*math.random()/20)
  928. lscf = CFrame.new(Vector3.new(lsc0.x, lsc0.y, lsc0.z), torso.CFrame:pointToObjectSpace(plrmouse.Hit.p)) * CFrame.Angles(math.pi/2 + math.sin(angle)*math.random()/20, 0, -math.cos(angle)*math.random()/20)
  929. lm.C0 = clerp(lm.C0,lscf,speed)
  930. rm.C0 = clerp(rm.C0,rscf,speed)
  931. game:service'RunService'.RenderStepped:wait()
  932. end
  933. elseif pistol == 2 then
  934. for i = 1, 4 do
  935. rscf = CFrame.new(Vector3.new(rsc0.x, rsc0.y, rsc0.z), torso.CFrame:pointToObjectSpace(plrmouse.Hit.p)) * CFrame.Angles(math.pi/2 + math.sin(angle)*math.random()/20, 0, math.cos(angle)*math.random()/20)
  936. lscf = CFrame.new(Vector3.new(lsc0.x, lsc0.y, lsc0.z), torso.CFrame:pointToObjectSpace(plrmouse.Hit.p)) * CFrame.new(0, 0, .5) * CFrame.Angles(math.pi/1.5 + math.sin(angle)*math.random()/20, 0, -math.cos(angle)*math.random()/20)
  937. lm.C0 = clerp(lm.C0,lscf,speed)
  938. rm.C0 = clerp(rm.C0,rscf,speed)
  939. game:service'RunService'.RenderStepped:wait()
  940. end
  941. pistol = 1
  942. end
  943. firing = false
  944. end)
  945. end)
  946. tool.Deselected:connect(function()
  947. Equipped = false
  948. rm.Parent = nil
  949. lm.Parent = nil
  950. rs.Parent = torso
  951. ls.Parent = torso
  952. neck.C0 = origneckc0
  953. neck.C1 = origneckc1
  954. lm.C0 = lsc0
  955. rm.C0 = rsc0
  956. gunweld.Part0 = gun.BulletCase
  957. gunweld.Part1 = holsters.HolsterWeldTo
  958. gunweld.C0 = CFrame.new()
  959. gunweld.C1 = CFrame.new()
  960. gunweld2.Part0 = gun2.BulletCase
  961. gunweld2.Part1 = holsters.HolsterWeldTo2
  962. gunweld2.C0 = CFrame.new()
  963. gunweld2.C1 = CFrame.new()
  964. bodygyro.Parent = nil
  965. end)
  966.  
  967. game:service'RunService'.RenderStepped:connect(function()
  968. if Equipped then
  969. if ammo <= 0 then
  970. rel.Visible = true
  971. else
  972. rel.Visible = false
  973. end
  974. if light then
  975. gunlight.Enabled = true
  976. gunlight2.Enabled = true
  977. else
  978. gunlight.Enabled = false
  979. gunlight2.Enabled = false
  980. end
  981. angle = angle + (0.05+math.random()/20)
  982. local rscf = rsc0
  983. local lscf = lsc0
  984. local ncf = neckc0
  985. local rmx,rmy,rmz = rm.C0:toEulerAnglesXYZ()
  986. if rmz >= 1 then
  987. bodygyro.cframe = bodygyro.cframe * CFrame.Angles(0, -rmz/5, 0)
  988. elseif rmz <= -1 then
  989. bodygyro.cframe = bodygyro.cframe * CFrame.Angles(0, -rmz/5, 0)
  990. end
  991. rscf = CFrame.new(Vector3.new(rsc0.x, rsc0.y, rsc0.z), torso.CFrame:pointToObjectSpace(plrmouse.Hit.p)) * CFrame.Angles(math.pi/2 + math.sin(angle)*math.random()/20, 0, math.cos(angle)*math.random()/20)
  992. lscf = CFrame.new(Vector3.new(lsc0.x, lsc0.y, lsc0.z), torso.CFrame:pointToObjectSpace(plrmouse.Hit.p)) * CFrame.Angles(math.pi/2 + math.sin(angle)*math.random()/20, 0, -math.cos(angle)*math.random()/20)
  993. ncf = neckc0 * CFrame.new(Vector3.new(), torso.CFrame:pointToObjectSpace(plrmouse.Hit.p))
  994. if not firing then
  995. lm.C0 = clerp(lm.C0,lscf,speed)
  996. rm.C0 = clerp(rm.C0,rscf,speed)
  997. end
  998. if not dontclerpneck then
  999. neck.C0 = clerp(neck.C0,ncf,speed)
  1000. end
  1001. end
  1002. if light and not Equipped then
  1003. gunlight.Enabled = false
  1004. gunlight2.Enabled = false
  1005. end
  1006. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement