Advertisement
Animescapetower

Gun

Mar 16th, 2018
308
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.16 KB | None | 0 0
  1.  
  2. --Converted with ttyyuu12345's model to script plugin v4
  3. function sandbox(var,func)
  4. local env = getfenv(func)
  5. local newenv = setmetatable({},{
  6. __index = function(self,k)
  7. if k=="script" then
  8. return var
  9. else
  10. return env[k]
  11. end
  12. end,
  13. })
  14. setfenv(func,newenv)
  15. return func
  16. end
  17. cors = {}
  18. mas = Instance.new("Model",game:GetService("Lighting"))
  19. Tool0 = Instance.new("Tool")
  20. ScreenGui1 = Instance.new("ScreenGui")
  21. ImageLabel2 = Instance.new("ImageLabel")
  22. LocalScript3 = Instance.new("LocalScript")
  23. Frame4 = Instance.new("Frame")
  24. Frame5 = Instance.new("Frame")
  25. BoolValue6 = Instance.new("BoolValue")
  26. NumberValue7 = Instance.new("NumberValue")
  27. LocalScript8 = Instance.new("LocalScript")
  28. Model9 = Instance.new("Model")
  29. Part10 = Instance.new("Part")
  30. Sound11 = Instance.new("Sound")
  31. Fire12 = Instance.new("Fire")
  32. SpecialMesh13 = Instance.new("SpecialMesh")
  33. Sound14 = Instance.new("Sound")
  34. PointLight15 = Instance.new("PointLight")
  35. Script16 = Instance.new("Script")
  36. ScreenGui17 = Instance.new("ScreenGui")
  37. Frame18 = Instance.new("Frame")
  38. Frame19 = Instance.new("Frame")
  39. Frame20 = Instance.new("Frame")
  40. Frame21 = Instance.new("Frame")
  41. Frame22 = Instance.new("Frame")
  42. ImageLabel23 = Instance.new("ImageLabel")
  43. ImageLabel24 = Instance.new("ImageLabel")
  44. Frame25 = Instance.new("Frame")
  45. TextLabel26 = Instance.new("TextLabel")
  46. TextLabel27 = Instance.new("TextLabel")
  47. TextLabel28 = Instance.new("TextLabel")
  48. TextLabel29 = Instance.new("TextLabel")
  49. Script30 = Instance.new("Script")
  50. Tool0.Name = "Revolver"
  51. Tool0.Parent = mas
  52. Tool0.GripForward = Vector3.new(-0, 1, -0)
  53. Tool0.GripPos = Vector3.new(0.0500000007, -0.5, -0.200000003)
  54. Tool0.GripUp = Vector3.new(0, 0, 1)
  55. Tool0.CanBeDropped = false
  56. ScreenGui1.Name = "ZoomGui"
  57. ScreenGui1.Parent = Tool0
  58. ImageLabel2.Name = "Scope"
  59. ImageLabel2.Parent = ScreenGui1
  60. ImageLabel2.Transparency = 1
  61. ImageLabel2.Size = UDim2.new(0, 20, 0, 20)
  62. ImageLabel2.Position = UDim2.new(0.5, -10, 0, -10)
  63. ImageLabel2.BackgroundColor3 = Color3.new(0, 0, 0)
  64. ImageLabel2.BackgroundTransparency = 1
  65. ImageLabel2.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  66. ImageLabel2.Image = "rbxassetid://82437809"
  67. LocalScript3.Parent = ScreenGui1
  68. table.insert(cors,sandbox(LocalScript3,function()
  69. --Stickmasterluke
  70.  
  71.  
  72. sp=script.Parent
  73.  
  74.  
  75. while sp:FindFirstChild("Scope")==nil or sp:FindFirstChild("Frame1")==nil or sp:FindFirstChild("Frame2")==nil do
  76. wait()
  77. end
  78.  
  79. function update()
  80. sp.Scope.Position=UDim2.new(.5,-10-(sp.AbsoluteSize.y/2),0,-10)
  81. sp.Scope.Size=UDim2.new(0,20+sp.AbsoluteSize.y,0,20+sp.AbsoluteSize.y)
  82. sp.Frame1.Size=UDim2.new(0,20+((sp.AbsoluteSize.x-sp.AbsoluteSize.y)/2),1,20)
  83. sp.Frame2.Size=UDim2.new(0,20+((sp.AbsoluteSize.x-sp.AbsoluteSize.y)/2),1,20)
  84. sp.Frame2.Position=UDim2.new(1,-10-((sp.AbsoluteSize.x-sp.AbsoluteSize.y)/2),0,-10)
  85. end
  86.  
  87. sp.Changed:connect(update)
  88.  
  89.  
  90. end))
  91. Frame4.Name = "Frame2"
  92. Frame4.Parent = ScreenGui1
  93. Frame4.Size = UDim2.new(0, 0, 1, 20)
  94. Frame4.Position = UDim2.new(0, -10, 0, -10)
  95. Frame4.BackgroundColor3 = Color3.new(0, 0, 0)
  96. Frame4.BorderColor3 = Color3.new(0, 0, 0)
  97. Frame4.BorderSizePixel = 0
  98. Frame5.Name = "Frame1"
  99. Frame5.Parent = ScreenGui1
  100. Frame5.Size = UDim2.new(0, 0, 1, 20)
  101. Frame5.Position = UDim2.new(0, -10, 0, -10)
  102. Frame5.BackgroundColor3 = Color3.new(0, 0, 0)
  103. Frame5.BorderColor3 = Color3.new(0, 0, 0)
  104. Frame5.BorderSizePixel = 0
  105. BoolValue6.Name = "HitTarget"
  106. BoolValue6.Parent = Tool0
  107. NumberValue7.Name = "Spread"
  108. NumberValue7.Parent = Tool0
  109. LocalScript8.Name = "GunScript"
  110. LocalScript8.Parent = Tool0
  111. table.insert(cors,sandbox(LocalScript8,function()
  112. --Made by Stickmasterluke
  113.  
  114.  
  115. sp=script.Parent
  116.  
  117.  
  118. rate=1/30
  119. spreadpercentoffset=.5
  120.  
  121.  
  122. ----Gun statistics----
  123. automatic=false
  124. burst=false
  125. shotgun=false
  126. canzoom=0
  127.  
  128. firerate=.58
  129.  
  130. reloadtime=3
  131. startingammo=1000
  132. maxammo=2000
  133. clipsize=50
  134. noclip=false
  135. unlimitedammo=true
  136.  
  137. minspread=.03
  138. maxspread=.25
  139. spreadincrease=.1
  140. spreadcooldowntime=1
  141. zoomspread=0
  142.  
  143. function gunUp()
  144. sp.GripPos=Vector3.new(.05,-.3,-.2)
  145. end
  146. function gunOut()
  147. sp.GripPos=Vector3.new(.05,-.5,-.2)
  148. end
  149. ----------------------
  150.  
  151. function waitfor(a,b)
  152. while a:FindFirstChild(b)==nil do
  153. wait()
  154. end
  155. end
  156.  
  157. waitfor(sp,"Aim")
  158. waitfor(sp,"Spread")
  159. waitfor(sp,"HitTarget")
  160. waitfor(sp,"WeaponHud")
  161. waitfor(sp,"Handle")
  162. local gun=sp.Handle
  163. waitfor(gun,"Fire")
  164. waitfor(gun,"FireSound")
  165.  
  166. ammo=startingammo
  167. ammoinclip=clipsize
  168. originalminspread=minspread
  169. spread=minspread
  170. equipped=false
  171. reloading=false
  172. down=false
  173. ready=true
  174. local gui=sp.WeaponHud
  175. local zoomgui=sp.ZoomGui
  176. local debris=game:GetService("Debris")
  177. while plr==nil do
  178. plr=game.Players.LocalPlayer
  179. end
  180.  
  181. function unzoom()
  182. minspread=originalminspread
  183. local cam=game.Workspace.CurrentCamera
  184. if cam then
  185. cam.FieldOfView=70
  186. end
  187. zoomgui.Parent=sp
  188. end
  189.  
  190. function updateammo(additional)
  191. additional=additional or 0
  192. if noclip then
  193. if not unlimitedammo then
  194. ammo=ammo+additional
  195. if ammo<0 then
  196. ammo=0
  197. elseif ammo>maxammo then
  198. ammo=maxammo
  199. end
  200. end
  201. else
  202. ammoinclip=ammoinclip+additional
  203. if ammoinclip<0 then
  204. ammoinclip=0
  205. elseif ammoinclip>clipsize then
  206. ammoinclip=clipsize
  207. end
  208. end
  209. if gui then
  210. if noclip and unlimitedammo then
  211. gui.AmmoHud.TotalAmmo.Visible=false
  212. gui.AmmoHud.ForwardSlash.Visible=false
  213. gui.AmmoHud.ClipAmmo.Visible=false
  214. elseif noclip then
  215. gui.AmmoHud.TotalAmmo.Visible=true
  216. gui.AmmoHud.ForwardSlash.Visible=false
  217. gui.AmmoHud.ClipAmmo.Visible=false
  218. gui.AmmoHud.TotalAmmo.Text=tostring(ammo)
  219. elseif unlimitedammo then
  220. gui.AmmoHud.TotalAmmo.Visible=true
  221. gui.AmmoHud.ForwardSlash.Visible=true
  222. gui.AmmoHud.ClipAmmo.Visible=true
  223. gui.AmmoHud.TotalAmmo.Text=tostring(clipsize)
  224. gui.AmmoHud.ClipAmmo.Text=tostring(ammoinclip)
  225. else
  226. gui.AmmoHud.TotalAmmo.Visible=true
  227. gui.AmmoHud.ForwardSlash.Visible=true
  228. gui.AmmoHud.ClipAmmo.Visible=true
  229. gui.AmmoHud.TotalAmmo.Text=tostring(ammo)
  230. gui.AmmoHud.ClipAmmo.Text=tostring(ammoinclip)
  231. end
  232. end
  233. end
  234.  
  235. function reload()
  236. if not reloading and ready and equipped then
  237. unzoom()
  238. reloading=true
  239. if gui then
  240. gui.ReloadingLabel.Visible=true
  241. end
  242. --run an animation or sound here
  243. script.Parent.Handle.Reload:Play()
  244. wait(reloadtime)
  245. if unlimitedammo then
  246. ammoinclip=clipsize
  247. else
  248. local extraammo=clipsize-ammoinclip
  249. if ammo>=extraammo then
  250. ammo=ammo-extraammo
  251. ammoinclip=clipsize
  252. else
  253. ammoinclip=ammo
  254. ammo=0
  255. end
  256. end
  257. if gui then
  258. gui.ReloadingLabel.Visible=false
  259. end
  260. reloading=false
  261. end
  262. updateammo(0)
  263. end
  264.  
  265. function hittarget()
  266. if gui then
  267. delay(0,function()
  268. if gui:FindFirstChild("TargetHitImage") then
  269. gui.TargetHitImage.Visible=true
  270. local lth=tick()
  271. lasttargethit=lth
  272. wait(.5)
  273. if lasttargethit<=lth then
  274. gui.TargetHitImage.Visible=false
  275. end
  276. end
  277. end)
  278. end
  279. end
  280. sp.HitTarget.Changed:connect(hittarget)
  281.  
  282. function updatespread()
  283. local spreadvalue=sp:FindFirstChild("Spread")
  284. if spreadvalue then
  285. spreadvalue.Value=spread
  286. end
  287. if spread>maxspread then
  288. spread=maxspread
  289. elseif spread<minspread then
  290. spread=minspread
  291. end
  292. if gui then
  293. local absoluteY=gui.AbsoluteSize.Y
  294. gui.Crosshair.Position=UDim2.new(.5,(1-(spread*absoluteY))/2,.5,(1-(spread*absoluteY))/2)
  295. gui.Crosshair.Size=UDim2.new(0,spread*absoluteY,0,spread*absoluteY)
  296. end
  297. end
  298.  
  299. function fire(pos)
  300. if pos then
  301. local newaim=Instance.new("Vector3Value")
  302. newaim.Value=pos
  303. newaim.Parent=sp.Aim
  304. end
  305. end
  306.  
  307. function ammocheck(thismuch)
  308. return (noclip and (unlimitedammo or ammo>=thismuch)) or (noclip==false and ammoinclip>=thismuch)
  309. end
  310.  
  311. function onEquipped(mouse)
  312. plr=game.Players.LocalPlayer
  313. equipped=true
  314. if mouse~=nil then
  315. mouse.Icon="http://www.roblox.com/asset/?id=18662154"--"rbxasset://textures\\GunCursor.png"
  316. mouse.KeyDown:connect(function(key)
  317. if key then
  318. key=string.lower(key)
  319. if key=="r" then
  320. reload()
  321. elseif key=="z" and canzoom~=0 and not reloading and equipped then
  322. local cam=game.Workspace.CurrentCamera
  323. if cam then
  324. zoomed=math.floor(math.deg(cam.FieldOfView)+.5)
  325. if zoomed==70 and canzoom>=1 then
  326. minspread=zoomspread
  327. cam.FieldOfView=40
  328. zoomgui.Parent=plr.PlayerGui
  329. elseif zoomed==40 and canzoom>=2 then
  330. minspread=zoomspread
  331. cam.FieldOfView=20
  332. zoomgui.Parent=plr.PlayerGui
  333. else
  334. unzoom()
  335. end
  336. end
  337. end
  338. end
  339. end)
  340. mouse.Button1Down:connect(function()
  341. if not down then
  342. down=true
  343. local chr=plr.Character
  344. if chr~=nil then
  345. local h=chr:FindFirstChild("Humanoid")
  346. if h then
  347. while equipped and down and ready and reloading==false and ammocheck(1) and h.Health>0 and mouse do
  348. ready=false
  349. gunUp()
  350. gun.Fire.Enabled=true
  351. sp.Handle.FireSound:Play()
  352. updateammo(-1)
  353. local aimpos=mouse.Hit.p
  354. if shotgun then
  355. for i=1,10 do
  356. fire(aimpos)
  357. end
  358. elseif burst then
  359. fire(aimpos)
  360. if ammocheck(1) then
  361. wait(rate*1.5)
  362. sp.Handle.FireSound:Play()
  363. updateammo(-1)
  364. fire(aimpos)
  365. if ammocheck(1) then
  366. wait(rate*1.5)
  367. sp.Handle.FireSound:Play()
  368. updateammo(-1)
  369. fire(aimpos)
  370. end
  371. end
  372. else
  373. fire(aimpos)
  374. end
  375. wait(2/30)
  376. spread=spread+spreadincrease
  377. updatespread()
  378. gun.Fire.Enabled=false
  379. gunOut()
  380. if firerate>(2/30) then
  381. wait(firerate-(2/30))
  382. end
  383. ready=true
  384. if not automatic then
  385. break
  386. end
  387. end
  388. end
  389. end
  390. down=false
  391. if not ammocheck(1) then
  392. reload()
  393. end
  394. end
  395. end)
  396. mouse.Button1Up:connect(function()
  397. down=false
  398. end)
  399. end
  400. if gui and plr:FindFirstChild("PlayerGui") then
  401. gui.Parent=plr.PlayerGui
  402. end
  403. updateammo(0)
  404. unzoom()
  405. end
  406.  
  407. function onUnequipped()
  408. equipped=false
  409. sp.Handle.FireSound:Stop()
  410. if gui then
  411. gui.Parent=sp
  412. end
  413. unzoom()
  414. end
  415.  
  416. sp.Equipped:connect(onEquipped)
  417. sp.Unequipped:connect(onUnequipped)
  418.  
  419.  
  420. while true do
  421. wait(rate)
  422. if spread>minspread then
  423. spread=spread-((rate/spreadcooldowntime)*(maxspread-minspread))
  424. end
  425. updatespread()
  426. end
  427.  
  428.  
  429.  
  430.  
  431. end))
  432. Model9.Name = "Aim"
  433. Model9.Parent = Tool0
  434. Part10.Name = "Handle"
  435. Part10.Parent = Tool0
  436. Part10.BrickColor = BrickColor.new("New Yeller")
  437. Part10.Rotation = Vector3.new(-90, 0, 90)
  438. Part10.FormFactor = Enum.FormFactor.Custom
  439. Part10.Size = Vector3.new(0.200000003, 1.80000019, 0.899999917)
  440. Part10.CFrame = CFrame.new(26.8299866, 0.450028002, -19.8000107, 7.4505806e-08, -0.999994874, 1.15582939e-10, 6.2930724e-12, 1.17447246e-10, 1, -0.999994636, -1.49011612e-08, 5.8262957e-11)
  441. Part10.Color = Color3.new(1, 1, 0)
  442. Part10.Position = Vector3.new(26.8299866, 0.450028002, -19.8000107)
  443. Part10.Orientation = Vector3.new(-90, 90, 0)
  444. Part10.Color = Color3.new(1, 1, 0)
  445. Sound11.Name = "FireSound"
  446. Sound11.Parent = Part10
  447. Sound11.SoundId = "rbxassetid://438149153"
  448. Sound11.Volume = 1
  449. Fire12.Parent = Part10
  450. Fire12.Size = 30
  451. Fire12.Color = Color3.new(1, 1, 0)
  452. Fire12.Enabled = false
  453. Fire12.Heat = 0
  454. Fire12.SecondaryColor = Color3.new(0, 0, 0)
  455. Fire12.Color = Color3.new(1, 1, 0)
  456. SpecialMesh13.Parent = Part10
  457. SpecialMesh13.MeshId = "http://www.roblox.com/asset/?id=79401392 "
  458. SpecialMesh13.Scale = Vector3.new(1.5, 1.5, 1.5)
  459. SpecialMesh13.VertexColor = Vector3.new(9, 0.899999976, 0)
  460. SpecialMesh13.MeshType = Enum.MeshType.FileMesh
  461. SpecialMesh13.Scale = Vector3.new(1.5, 1.5, 1.5)
  462. Sound14.Name = "Reload"
  463. Sound14.Parent = Part10
  464. Sound14.Pitch = 0.30000001192093
  465. Sound14.SoundId = "rbxassetid://438149153"
  466. Sound14.Volume = 1
  467. PointLight15.Parent = Part10
  468. PointLight15.Color = Color3.new(1, 1, 0)
  469. PointLight15.Brightness = 12
  470. PointLight15.Range = 60
  471. PointLight15.Color = Color3.new(1, 1, 0)
  472. Script16.Parent = Tool0
  473. table.insert(cors,sandbox(Script16,function()
  474. --Made by Stickmasterluke
  475.  
  476.  
  477. sp=script.Parent
  478.  
  479.  
  480. range=100 --can be any realistic number, even over 1000
  481. damage=10
  482. headshotmultiplier=2
  483. piercing=false
  484. splat=true
  485.  
  486.  
  487. spreadpercentoffset=.5
  488. targetshit={}
  489. local debris=game:GetService("Debris")
  490.  
  491.  
  492. function waitfor(a,b)
  493. while a:FindFirstChild(b)==nil do
  494. wait()
  495. end
  496. end
  497.  
  498. waitfor(sp,"Aim")
  499. waitfor(sp,"Spread")
  500. waitfor(sp,"HitTarget")
  501.  
  502.  
  503. function tagHumanoid(humanoid,player,didheadshot)
  504. if humanoid and player then
  505. for i,v in ipairs(humanoid:GetChildren()) do
  506. if v and v.Parent~=nil then
  507. if v.Name=="creator" then
  508. v:remove()
  509. end
  510. end
  511. end
  512. local creatortag=Instance.new("ObjectValue")
  513. creatortag.Value=player
  514. creatortag.Name="creator"
  515. local weapontag=Instance.new("StringValue")
  516. weapontag.Name="weaponIcon"
  517. weapontag.Value="rbxassetid://76256898"
  518. weapontag.Parent=creatortag
  519. creatortag.Parent=humanoid
  520. debris:AddItem(creatortag,3)
  521. end
  522. end
  523.  
  524. function hittarget()
  525. local hittargetvalue=sp:FindFirstChild("HitTarget")
  526. if hittargetvalue then
  527. hittargetvalue.Value=not hittargetvalue.Value
  528. end
  529. end
  530.  
  531. function rayignorecheck(hit3)
  532. if hit3 then
  533. if hit3.Transparency>=1 or string.lower(hit3.Name)=="water" or hit3.Name=="Effect" or hit3.Name=="Rocket" or hit3.Name=="Handle" or hit3:IsDescendantOf(sp.Parent) then
  534. return true
  535. end
  536. for i,v in ipairs(targetshit) do
  537. if v and v.Parent~=nil then
  538. if hit3:IsDescendantOf(v) then
  539. return true
  540. end
  541. end
  542. end
  543. end
  544. return false
  545. end
  546.  
  547. function raycast(spos,vec,dist)
  548. local hit2,pos2=game.Workspace:FindPartOnRay(Ray.new(spos+(vec*.01),vec*dist),sp)
  549. if hit2~=nil and pos2 then
  550. local dist2=dist-(pos2-spos).magnitude
  551. if rayignorecheck(hit2) and dist2>0 then
  552. return raycast(pos2,vec,dist2)
  553. end
  554. end
  555. return hit2,pos2
  556. end
  557.  
  558. function fire(targetpos)
  559. local chr=sp.Parent
  560. if chr==nil then
  561. return
  562. end
  563. local plr=game.Players:GetPlayerFromCharacter(chr)
  564. if plr==nil then
  565. return
  566. end
  567.  
  568. local head=chr:findFirstChild("Head")
  569. local humanoid=chr:findFirstChild("Humanoid")
  570. if head==nil or humanoid==nil then
  571. return
  572. end
  573.  
  574. local spread=sp:FindFirstChild("Spread")
  575. if humanoid.Health>0 and spread then
  576. local startpos=head.Position
  577. local targetdist=(targetpos-startpos).magnitude
  578. local flawedpos=Vector3.new(spread.Value*((math.random()*2)-1),spread.Value*((math.random()*2)-1),spread.Value*((math.random()*2)-1))*targetdist*spreadpercentoffset
  579. local vec=((targetpos+flawedpos)-startpos).unit
  580.  
  581. targetshit={}
  582. hitsolid=false
  583. while not hitsolid do
  584. hitsolid=true
  585. local hit,pos=raycast(startpos,vec,range)
  586. if hit~=nil and hit.Parent~=nil then
  587. chr=sp.Parent
  588. local h=hit.Parent:FindFirstChild("Humanoid")
  589. if h~=nil then
  590. if game.Players:GetPlayerFromCharacter(h.Parent) and game.Players:GetPlayerFromCharacter(h.Parent).TeamColor == plr.TeamColor then return end
  591. if h.Parent:FindFirstChild("IsABuilding") and h.Parent.Torso.tc.Value == plr.TeamColor then return end
  592. finaldamage=damage
  593. if hit.Name=="Head" then
  594. finaldamage=finaldamage*headshotmultiplier
  595. elseif hit.Name=="Torso" then
  596. finaldamage=finaldamage--*1.1
  597. end
  598. tagHumanoid(h,plr,hit.Name=="Head")
  599. h:TakeDamage(finaldamage)
  600. hittarget(hit.Parent)
  601. if piercing then
  602. hitsolid=false
  603. table.insert(targetshit,hit.Parent)
  604. end
  605. elseif hit.Name=="Target" then
  606. hittarget(hit.Parent)
  607. if piercing then
  608. hitsolid=false
  609. table.insert(targetshit,hit.Parent)
  610. end
  611. end
  612. end
  613.  
  614. local missile=Instance.new("Part")
  615. missile.Name="Effect"
  616. missile.formFactor="Custom"
  617. missile.Size=Vector3.new(.1,.1,.1)
  618. missile.Material=Enum.Material.Plastic
  619. missile.BrickColor=BrickColor.new("Really black")
  620. missile.Locked=true
  621. missile.TopSurface=0
  622. missile.BottomSurface=0
  623. missile.CFrame=CFrame.new(pos)
  624. missile.Transparency=1
  625. missile.Anchored=true
  626.  
  627. local mesh=Instance.new("SpecialMesh")
  628. mesh.MeshType="Sphere"
  629. mesh.Scale=Vector3.new(1.8,1.8,1.8)
  630. mesh.Parent=missile
  631.  
  632. local paint=Instance.new("Fire")
  633. paint.Color=BrickColor.new("Bright yellow").Color
  634. paint.SecondaryColor=BrickColor.new("Bright yellow").Color
  635. paint.Size=5
  636. paint.Heat=0
  637. paint.Parent=missile
  638. game.Debris:AddItem(paint, 0.24)
  639.  
  640. local hitsound=Instance.new("Sound")
  641. hitsound.Name="HitSound"
  642. hitsound.SoundId="http://www.roblox.com/asset/?id=108553991"
  643. hitsound.Volume=1
  644. hitsound.Parent=missile
  645. missile.Parent=game.Workspace
  646. hitsound:Play()
  647.  
  648. thisreached=false
  649. if hit~=nil then
  650. if hit.Name=="Target" or (hit.Anchored and splat) then
  651. --hittarget()
  652. missile.Transparency=0
  653. debris:AddItem(missile,5)
  654. thisreached=true
  655. end
  656. end
  657. if not thisreached then
  658. delay(2/30,function()
  659. if missile then
  660. missile:Remove()
  661. missile=nil
  662. end
  663. end)
  664. debris:AddItem(missile,1)
  665. end
  666. end
  667. end
  668. end
  669.  
  670.  
  671. sp.Aim.ChildAdded:connect(function(item)
  672. if item~=nil and item.Parent~=nil then
  673. if item.ClassName=="Vector3Value" then
  674. fire(item.Value)
  675. end
  676. item:remove()
  677. end
  678. end)
  679.  
  680.  
  681.  
  682. end))
  683. ScreenGui17.Name = "WeaponHud"
  684. ScreenGui17.Parent = Tool0
  685. Frame18.Name = "Crosshair"
  686. Frame18.Parent = ScreenGui17
  687. Frame18.Transparency = 1
  688. Frame18.Size = UDim2.new(0, 21, 0, 21)
  689. Frame18.Position = UDim2.new(0.5, -10, 0.5, -10)
  690. Frame18.BackgroundColor3 = Color3.new(0, 0, 0)
  691. Frame18.BackgroundTransparency = 1
  692. Frame18.BorderColor3 = Color3.new(0.956863, 1, 0.133333)
  693. Frame18.BorderSizePixel = 0
  694. Frame19.Name = "TopFrame"
  695. Frame19.Parent = Frame18
  696. Frame19.Size = UDim2.new(0, 2, 0, 15)
  697. Frame19.Position = UDim2.new(0.5, -1, 0, -15)
  698. Frame19.Visible = false
  699. Frame19.BackgroundColor3 = Color3.new(0, 0, 0)
  700. Frame19.BorderColor3 = Color3.new(0, 1, 0)
  701. Frame20.Name = "BottomFrame"
  702. Frame20.Parent = Frame18
  703. Frame20.Size = UDim2.new(0, 2, 0, 15)
  704. Frame20.Position = UDim2.new(0.5, -1, 1, 0)
  705. Frame20.Visible = false
  706. Frame20.BackgroundColor3 = Color3.new(0, 0, 0)
  707. Frame20.BorderColor3 = Color3.new(0, 1, 0)
  708. Frame21.Name = "LeftFrame"
  709. Frame21.Parent = Frame18
  710. Frame21.Size = UDim2.new(0, 15, 0, 2)
  711. Frame21.Position = UDim2.new(0, -15, 0.5, -1)
  712. Frame21.Visible = false
  713. Frame21.BackgroundColor3 = Color3.new(0, 0, 0)
  714. Frame21.BorderColor3 = Color3.new(0, 1, 0)
  715. Frame22.Name = "RightFrame"
  716. Frame22.Parent = Frame18
  717. Frame22.Size = UDim2.new(0, 15, 0, 2)
  718. Frame22.Position = UDim2.new(1, 0, 0.5, -1)
  719. Frame22.Visible = false
  720. Frame22.BackgroundColor3 = Color3.new(0, 0, 0)
  721. Frame22.BorderColor3 = Color3.new(0, 1, 0)
  722. ImageLabel23.Name = "Middle"
  723. ImageLabel23.Parent = Frame18
  724. ImageLabel23.Transparency = 1
  725. ImageLabel23.Size = UDim2.new(10, 0, 10, 0)
  726. ImageLabel23.Position = UDim2.new(-4.5, 0, -4.5, 0)
  727. ImageLabel23.BackgroundTransparency = 1
  728. ImageLabel23.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  729. ImageLabel23.BorderSizePixel = 0
  730. ImageLabel23.Image = "http://www.roblox.com/asset/?id=72344959"
  731. ImageLabel24.Name = "TargetHitImage"
  732. ImageLabel24.Parent = ScreenGui17
  733. ImageLabel24.Transparency = 1
  734. ImageLabel24.Size = UDim2.new(0, 50, 0, 50)
  735. ImageLabel24.Position = UDim2.new(0.5, -25, 0.5, -25)
  736. ImageLabel24.Visible = false
  737. ImageLabel24.BackgroundTransparency = 1
  738. ImageLabel24.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  739. ImageLabel24.BorderSizePixel = 0
  740. ImageLabel24.Image = "rbxassetid://69368028"
  741. Frame25.Name = "AmmoHud"
  742. Frame25.Parent = ScreenGui17
  743. Frame25.Transparency = 1
  744. Frame25.Size = UDim2.new(0.300000012, 0, 0.100000001, 0)
  745. Frame25.Position = UDim2.new(0.689999998, 0, 0.889999986, 0)
  746. Frame25.BackgroundTransparency = 1
  747. Frame25.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  748. Frame25.BorderSizePixel = 0
  749. TextLabel26.Name = "ForwardSlash"
  750. TextLabel26.Parent = Frame25
  751. TextLabel26.Transparency = 1
  752. TextLabel26.Size = UDim2.new(0.200000003, 0, 0.600000024, 0)
  753. TextLabel26.Text = "/"
  754. TextLabel26.Position = UDim2.new(0.600000024, 0, 0.400000006, 0)
  755. TextLabel26.BackgroundTransparency = 1
  756. TextLabel26.BorderColor3 = Color3.new(1, 1, 0.207843)
  757. TextLabel26.BorderSizePixel = 3
  758. TextLabel26.Font = Enum.Font.SciFi
  759. TextLabel26.FontSize = Enum.FontSize.Size18
  760. TextLabel26.TextColor3 = Color3.new(0, 1, 1)
  761. TextLabel26.TextScaled = true
  762. TextLabel26.TextStrokeColor3 = Color3.new(0.0941176, 0.0823529, 0.0784314)
  763. TextLabel26.TextStrokeTransparency = 0
  764. TextLabel26.TextTransparency = 0.5
  765. TextLabel26.TextWrapped = true
  766. TextLabel26.TextXAlignment = Enum.TextXAlignment.Right
  767. TextLabel27.Name = "ClipAmmo"
  768. TextLabel27.Parent = Frame25
  769. TextLabel27.Transparency = 1
  770. TextLabel27.Size = UDim2.new(0.200000003, 0, 0.600000024, 0)
  771. TextLabel27.Text = "13"
  772. TextLabel27.Position = UDim2.new(0.519999981, 0, 0.400000006, 0)
  773. TextLabel27.BackgroundTransparency = 1
  774. TextLabel27.BorderColor3 = Color3.new(1, 1, 0.207843)
  775. TextLabel27.BorderSizePixel = 3
  776. TextLabel27.Font = Enum.Font.SciFi
  777. TextLabel27.FontSize = Enum.FontSize.Size18
  778. TextLabel27.TextColor3 = Color3.new(0, 1, 1)
  779. TextLabel27.TextScaled = true
  780. TextLabel27.TextStrokeColor3 = Color3.new(0.0941176, 0.0823529, 0.0784314)
  781. TextLabel27.TextStrokeTransparency = 0
  782. TextLabel27.TextTransparency = 0.5
  783. TextLabel27.TextWrapped = true
  784. TextLabel27.TextXAlignment = Enum.TextXAlignment.Right
  785. TextLabel28.Name = "TotalAmmo"
  786. TextLabel28.Parent = Frame25
  787. TextLabel28.Transparency = 1
  788. TextLabel28.Size = UDim2.new(0.200000003, 0, 0.600000024, 0)
  789. TextLabel28.Text = "14"
  790. TextLabel28.Position = UDim2.new(0.800000012, 0, 0.400000006, 0)
  791. TextLabel28.BackgroundTransparency = 1
  792. TextLabel28.BorderColor3 = Color3.new(1, 1, 0.207843)
  793. TextLabel28.BorderSizePixel = 3
  794. TextLabel28.Font = Enum.Font.SciFi
  795. TextLabel28.FontSize = Enum.FontSize.Size18
  796. TextLabel28.TextColor3 = Color3.new(0, 1, 1)
  797. TextLabel28.TextScaled = true
  798. TextLabel28.TextStrokeColor3 = Color3.new(0.0941176, 0.0823529, 0.0784314)
  799. TextLabel28.TextStrokeTransparency = 0
  800. TextLabel28.TextTransparency = 0.5
  801. TextLabel28.TextWrapped = true
  802. TextLabel28.TextXAlignment = Enum.TextXAlignment.Right
  803. TextLabel29.Name = "ReloadingLabel"
  804. TextLabel29.Parent = ScreenGui17
  805. TextLabel29.Transparency = 1
  806. TextLabel29.Text = "Reloading"
  807. TextLabel29.Position = UDim2.new(0.5, 20, 0.5, -20)
  808. TextLabel29.Visible = false
  809. TextLabel29.BackgroundTransparency = 1
  810. TextLabel29.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  811. TextLabel29.BorderSizePixel = 0
  812. TextLabel29.Font = Enum.Font.ArialBold
  813. TextLabel29.FontSize = Enum.FontSize.Size18
  814. TextLabel29.TextColor3 = Color3.new(0, 0, 0)
  815. TextLabel29.TextStrokeColor3 = Color3.new(1, 0, 0)
  816. TextLabel29.TextStrokeTransparency = 0
  817. TextLabel29.TextXAlignment = Enum.TextXAlignment.Left
  818. TextLabel29.TextYAlignment = Enum.TextYAlignment.Bottom
  819. Script30.Name = "sb_equip"
  820. Script30.Parent = Tool0
  821. table.insert(cors,sandbox(Script30,function()
  822. gun = script.Parent.Handle
  823.  
  824. local Equip = Instance.new("Sound")
  825. Equip.SoundId = "http://www.roblox.com/asset/?ID=367453005"
  826. Equip.Parent = gun
  827. Equip.Volume = 0.7
  828.  
  829. function onEquipped()
  830. Equip:play()
  831. end
  832.  
  833. script.Parent.Equipped:connect(onEquipped)
  834. end))
  835. for i,v in pairs(mas:GetChildren()) do
  836. v.Parent = game:GetService("Players").LocalPlayer.Backpack
  837. pcall(function() v:MakeJoints() end)
  838. end
  839. mas:Destroy()
  840. for i,v in pairs(cors) do
  841. spawn(function()
  842. pcall(v)
  843. end)
  844. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement