Advertisement
samuelrichter66

dual m1911

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