Advertisement
Sami83094

converted

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