Sergeant_SethZP

Stgrsfyt

Sep 16th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 44.22 KB | None | 0 0
  1. -- mediafire -----------------------------------------------------------------------------------------------------------------------------------------------------------------------
  2.  
  3.  
  4. script.Parent = nil
  5.  
  6.  
  7.  
  8.  
  9. it = Instance.new
  10.  
  11.  
  12. v3=Vector3.new
  13.  
  14.  
  15. bc=BrickColor.new
  16.  
  17.  
  18. c3=Color3.new
  19.  
  20.  
  21. cn=CFrame.new
  22.  
  23.  
  24. ca=CFrame.Angles
  25.  
  26.  
  27. ca2=function(a,b,c)
  28.  
  29.  
  30. return ca(math.rad(a),math.rad(b),math.rad(c))
  31.  
  32.  
  33. end
  34.  
  35.  
  36. ti=table.insert
  37.  
  38.  
  39. tr=table.remove
  40.  
  41.  
  42. rn=math.random
  43.  
  44.  
  45. rd=math.rad
  46.  
  47.  
  48. mf=math.floor
  49.  
  50.  
  51. ud = UDim2.new
  52.  
  53.  
  54. inf=math.huge
  55.  
  56.  
  57. dg=math.deg
  58.  
  59.  
  60. mdeg=math.deg
  61.  
  62.  
  63. v310=v3(1/0,1/0,1/0)
  64.  
  65.  
  66. pi=math.pi
  67.  
  68.  
  69. w=wait
  70.  
  71.  
  72. cf=cn
  73.  
  74.  
  75. bn=bc
  76.  
  77.  
  78. ts=tostring
  79.  
  80.  
  81.  
  82.  
  83. Workspace=game:GetService("Workspace")
  84.  
  85.  
  86. Players=game:GetService("Players")
  87.  
  88.  
  89. Player=Players.LocalPlayer
  90.  
  91.  
  92. Lighting=game:GetService("Lighting")
  93.  
  94.  
  95. Debris=game:GetService("Debris")
  96.  
  97.  
  98.  
  99.  
  100. work=Workspace
  101.  
  102.  
  103. server=Players
  104.  
  105.  
  106. tb=Player
  107.  
  108.  
  109. lighting=Lighting
  110.  
  111.  
  112. deb=Debris
  113.  
  114.  
  115.  
  116.  
  117. asset = "http://www.roblox.com/asset/?id="
  118.  
  119.  
  120. Asset=asset
  121.  
  122.  
  123.  
  124.  
  125. ids = {}
  126.  
  127.  
  128. ids.Shoot = 10209633
  129.  
  130.  
  131. ids.Reload = 10209636
  132.  
  133.  
  134. ids.Crown = 20329976
  135.  
  136.  
  137. ids.Crown2 = 1323306
  138.  
  139.  
  140. ids.Icon = 52611635
  141.  
  142.  
  143. ids.Explode = 2697431
  144.  
  145.  
  146. ids.Ring = 3270017
  147.  
  148.  
  149.  
  150.  
  151. for i,v in pairs(ids) do
  152.  
  153.  
  154. if type(v)=='number' then
  155.  
  156.  
  157. ids[i]='http://www.roblox.com/asset/?id='..v
  158.  
  159.  
  160. end
  161.  
  162.  
  163. game:GetService("ContentProvider"):Preload(ids[i])
  164.  
  165.  
  166. end
  167.  
  168.  
  169.  
  170.  
  171. qi = function(ttz)
  172.  
  173.  
  174. local qii = it(ttz[1]) table.foreach(ttz,function(oi,oi2)
  175.  
  176.  
  177. if oi ~= 1 and oi ~= 2 then qii[oi] = oi2 end end) qii.Parent=ttz[2] return qii end
  178.  
  179.  
  180.  
  181.  
  182. q = function(f)
  183.  
  184.  
  185. coroutine.resume(coroutine.create(function() f() end)) end
  186.  
  187.  
  188.  
  189.  
  190.  
  191. ft = function(tablez,item)
  192.  
  193.  
  194. for i=1,#tablez do if tablez[i] == item then return i end end return nil end
  195.  
  196.  
  197.  
  198.  
  199. ft2 = function(tablez,item)
  200.  
  201.  
  202. for i=1,#tablez do if tablez[i][1] == item then return i end end return nil end
  203.  
  204.  
  205.  
  206.  
  207. pa = function(pa,pn,sh,x,y,z,c,a,tr,re,bc2)
  208.  
  209.  
  210. local fp=nil
  211.  
  212.  
  213. if sh ~= "Wedge" and sh ~= "CornerWedge" and sh ~= "VehicleSeat" and sh ~= "Seat" then
  214.  
  215.  
  216. fp=it("Part",pa)
  217.  
  218.  
  219. fp.Shape=sh or "Block"
  220.  
  221.  
  222. fp.formFactor="Custom"
  223.  
  224.  
  225. elseif sh == "Wedge" then
  226.  
  227.  
  228. fp=it("WedgePart",pa)
  229.  
  230.  
  231. fp.formFactor="Custom"
  232.  
  233.  
  234. elseif sh == "CornerWedge" then
  235.  
  236.  
  237. fp=it("CornerWedgePart",pa)
  238.  
  239.  
  240. elseif sh == "VehicleSeat" then
  241.  
  242.  
  243. fp=it("VehicleSeat",pa)
  244.  
  245.  
  246. elseif sh == "Seat" then
  247.  
  248.  
  249. fp=it("Seat",pa)
  250.  
  251.  
  252. end
  253.  
  254.  
  255. fp.Size=v3(x or 4,y or 2,z or 2)
  256.  
  257.  
  258. fp.Friction = 2
  259.  
  260.  
  261. fp.CanCollide=c or true
  262.  
  263.  
  264. fp.Anchored=a or false
  265.  
  266.  
  267. fp.BrickColor=bc(bc2 or "")
  268.  
  269.  
  270. fp.Transparency=tr or 0
  271.  
  272.  
  273. fp.Reflectance=re or 0
  274.  
  275.  
  276. fp.BottomSurface=0
  277.  
  278.  
  279. fp.Name=pn or "TBLib Part"
  280.  
  281.  
  282. fp.Locked = true
  283.  
  284.  
  285. fp.TopSurface=0
  286.  
  287.  
  288. fp.CFrame=cn(0,0,0)
  289.  
  290.  
  291. fp:BreakJoints()
  292.  
  293.  
  294. fp.Anchored = a
  295.  
  296.  
  297. return fp
  298.  
  299.  
  300. end
  301.  
  302.  
  303.  
  304.  
  305. function ClearClass(Object,Class)
  306.  
  307.  
  308. for _,v in pairs(Object:GetChildren()) do
  309.  
  310.  
  311. if v:IsA(Class) then
  312.  
  313.  
  314. v:Destroy()
  315.  
  316.  
  317. end
  318.  
  319.  
  320. end
  321.  
  322.  
  323. end
  324.  
  325.  
  326.  
  327.  
  328. function GetClass(Object,Class)
  329.  
  330.  
  331. for _,v in pairs(Object:GetChildren()) do
  332.  
  333.  
  334. if v:IsA(Class) then
  335.  
  336.  
  337. return v
  338.  
  339.  
  340. end
  341.  
  342.  
  343. end
  344.  
  345.  
  346. end
  347.  
  348.  
  349.  
  350.  
  351. function re(par,obj)
  352.  
  353.  
  354. if par:findFirstChild(obj) then
  355.  
  356.  
  357. par[obj]:Remove''
  358.  
  359.  
  360. end
  361.  
  362.  
  363. end
  364.  
  365.  
  366.  
  367.  
  368. function invis(o)
  369.  
  370.  
  371. for i,v in pairs(o:children()) do
  372.  
  373.  
  374. if v:IsA("BasePart") then
  375.  
  376.  
  377. v.Transparency=1
  378.  
  379.  
  380. end
  381.  
  382.  
  383. invis(v)
  384.  
  385.  
  386. end
  387.  
  388.  
  389. end
  390.  
  391.  
  392.  
  393.  
  394. function newhats(p,o,o2)
  395.  
  396.  
  397. for i,v in pairs(p:children()) do
  398.  
  399.  
  400. if v:IsA("Hat") then
  401.  
  402.  
  403. local np=v.Handle:Clone''
  404.  
  405.  
  406. np.Transparency=0
  407.  
  408.  
  409. np.Mesh.Scale=np.Mesh.Scale*1.04
  410.  
  411.  
  412. np.Parent=o
  413.  
  414.  
  415. np.CFrame=v.Handle.CFrame
  416.  
  417.  
  418. np.Name="Hat"
  419.  
  420.  
  421. stick2(np,o2,o)
  422.  
  423.  
  424. end
  425.  
  426.  
  427. end
  428.  
  429.  
  430. end
  431.  
  432.  
  433.  
  434.  
  435. fade = function(prt,incr)
  436.  
  437.  
  438. q(function()
  439.  
  440.  
  441. for i=prt.Transparency,1,incr do
  442.  
  443.  
  444. prt.Transparency=i
  445.  
  446.  
  447. wait()
  448.  
  449.  
  450. end
  451.  
  452.  
  453. prt:Remove''
  454.  
  455.  
  456. end)
  457.  
  458.  
  459. end
  460.  
  461.  
  462.  
  463.  
  464.  
  465. function weld(pa,p0,p1,x,y,z,a,b,c)
  466.  
  467.  
  468. local fw=it("Weld",pa)
  469.  
  470.  
  471. fw.Part0=p0
  472.  
  473.  
  474. fw.Part1=p1
  475.  
  476.  
  477. fw.C0=cn(x,y,z)*ca(a,b,c)
  478.  
  479.  
  480. return fw
  481.  
  482.  
  483. end
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490. stick = function(hit2,hit)
  491.  
  492.  
  493. return qi({"Weld",hit2,Part0=hit2,Part1=hit,C0=hit2.CFrame:inverse()*cn(hit2.Position),C1=hit.CFrame:inverse()*cn(hit2.Position)})
  494.  
  495.  
  496. end
  497.  
  498.  
  499.  
  500.  
  501. function stick2(hit2,hit,tostick)
  502.  
  503.  
  504. local weld=it("Weld")
  505.  
  506.  
  507. weld.Part0=tostick
  508.  
  509.  
  510. weld.Part1=hit2
  511.  
  512.  
  513. local HitPos=hit.Position
  514.  
  515.  
  516. local CJ=cn(HitPos)
  517.  
  518.  
  519. local C0=hit2.CFrame:inverse() *CJ
  520.  
  521.  
  522. local C1=hit.CFrame:inverse() * CJ weld.C0=C1
  523.  
  524.  
  525. weld.C1=C0
  526.  
  527.  
  528. weld.Parent=hit2
  529.  
  530.  
  531. end
  532.  
  533.  
  534.  
  535.  
  536. ray = function(Pos, Dir,tab)
  537.  
  538.  
  539. return workspace:FindPartOnRay(Ray.new(Pos, Dir.unit *999),tab)
  540.  
  541.  
  542. end
  543.  
  544.  
  545.  
  546.  
  547.  
  548. function rtab(tabz,obj)
  549.  
  550.  
  551. for i=1,#tabz do
  552.  
  553.  
  554. if tabz[i] == obj then
  555.  
  556.  
  557. tr(tabz,i)
  558.  
  559.  
  560. break
  561.  
  562.  
  563. end
  564.  
  565.  
  566. end
  567.  
  568.  
  569. end
  570.  
  571.  
  572.  
  573.  
  574. sTrail={}
  575.  
  576.  
  577. function Trail2(lopz,ob,waitz,col,thickz,ofz) cw(function() ti(sTrail,ob)
  578.  
  579.  
  580. local oldpos=(ob.CFrame *ofz).p local lopz2=0
  581.  
  582.  
  583. local function loltr() local obp=(ob.CFrame *ofz).p lopz2=lopz2 + 1
  584.  
  585.  
  586. local mag=(oldpos - obp).magnitude
  587.  
  588.  
  589. local tr=pa(ob,"trail","Block",0,0,0,false,false,0.5,0.15,col) tr.Anchored=true
  590.  
  591.  
  592. tr.CFrame=cn(oldpos,obp)
  593.  
  594.  
  595. tr.CFrame=tr.CFrame + tr.CFrame.lookVector* (mag/2)
  596.  
  597.  
  598. local trm=it("CylinderMesh",tr) trm.Scale=v3(5*thickz,mag*5,5*thickz)
  599.  
  600.  
  601. cw(function() for i=5*thickz,0,-5*thickz/10 do trm.Scale=v3(i,mag*5,i) w() end tr:Remove'' end)
  602.  
  603.  
  604. tr.CFrame=tr.CFrame *ca(rd(90),0,0) oldpos=obp end
  605.  
  606.  
  607. repeat loltr()
  608.  
  609.  
  610. wait(waitz) until ft(sTrail,ob) == nil or lopz2 == lopz loltr() end) end
  611.  
  612.  
  613.  
  614.  
  615. Trail = function(ob,times,waitz,col,thickz,ofz) -- Brick Trail
  616.  
  617.  
  618. q(function()
  619.  
  620.  
  621. local oldpos=(ob.CFrame *ofz).p
  622.  
  623.  
  624. for i=1,times do
  625.  
  626.  
  627. if effon==true then
  628.  
  629.  
  630. local obp=(ob.CFrame *ofz).p
  631.  
  632.  
  633. local mag=(oldpos - obp).magnitude
  634.  
  635.  
  636. local tr=pa(ob,"trail","Block",0,0,0,false,false,0.5,0.15,col)
  637.  
  638.  
  639. tr.Anchored=true
  640.  
  641.  
  642. tr.CFrame=cn(oldpos,obp)
  643.  
  644.  
  645. tr.CFrame=tr.CFrame + tr.CFrame.lookVector* (mag/2)
  646.  
  647.  
  648. trm=it("CylinderMesh",tr)
  649.  
  650.  
  651. trm.Scale=v3(thickz,mag*5,thickz)
  652.  
  653.  
  654. q(function()
  655.  
  656.  
  657. for i=thickz,0,thickz/10 do
  658.  
  659.  
  660. trm.Scale=v3(i,mag*5,i)
  661.  
  662.  
  663. wait()
  664.  
  665.  
  666. end
  667.  
  668.  
  669. tr:Remove''
  670.  
  671.  
  672. end)
  673.  
  674.  
  675. tr.CFrame=tr.CFrame *ca(rd(90),0,0)
  676.  
  677.  
  678. oldpos=obp wait(waitz)
  679.  
  680.  
  681. end
  682.  
  683.  
  684. end
  685.  
  686.  
  687. end)
  688.  
  689.  
  690. end
  691.  
  692.  
  693.  
  694.  
  695. de = function(it,ti) game:service'Debris':AddItem(it,ti) end -- Debris
  696.  
  697.  
  698.  
  699.  
  700. GlowMesh = function(anch,meshid2,rootz,mv3,colzz,adjus,l1,l2,l3) q(function() -- Glowmesh
  701.  
  702.  
  703. local spi=pa(rootz,"glowmesh","Block",mv3.X,mv3.Y,mv3.Z,false,false,l1,0,colzz) local spim=it("SpecialMesh",spi) spi.CanCollide=false if meshid2:lower()=="sphere" then spim.MeshType="Sphere" elseif meshid2:lower()=="block" then spim=it("BlockMesh",spi) else spim.MeshType="FileMesh" spim.MeshId=meshid2 end
  704.  
  705.  
  706. if anch then local spiw=qi({"Weld",spi,Part0=rootz,Part1=spi}) spiw.C0 =spiw.C0 *adjus else spi.Anchored=true spi.CFrame=adjus end
  707.  
  708.  
  709. for i=l1,l2,l3 do spi.Transparency=i spim.Scale=mv3*(i+0.3) wait() end spi:Remove'' end)
  710.  
  711.  
  712. end
  713.  
  714.  
  715.  
  716.  
  717. DetectSurface = function(pos, part) -- Surface Detector
  718.  
  719.  
  720. local surface = nil local pospos = part.CFrame
  721.  
  722.  
  723. local pos2 = pospos:pointToObjectSpace(pos) local siz = part.Size local shaep = part.Shape
  724.  
  725.  
  726. if shaep == Enum.PartType.Ball or shaep == Enum.PartType.Cylinder then
  727.  
  728.  
  729. surface = {"Anything", cn(pospos.p, pos)*cn(0, 0, -(pospos.p - pos).magnitude+0.12)*ca(rd(-90), 0, 0)}
  730.  
  731.  
  732. else if pos2.Y > ((siz.Y/2)-0.01) then surface = {"Top", ca(0, 0, 0)}
  733.  
  734.  
  735. elseif pos2.Y < -((siz.Y/2)-0.01) then surface = {"Bottom", ca(-math.pi, 0, 0)} elseif pos2.X > ((siz.X/2)-0.01) then surface = {"Right", ca(0, 0, rd(-90))}
  736.  
  737.  
  738. elseif pos2.X < -((siz.X/2)-0.01) then surface = {"Left", ca(0, 0, rd(90))} elseif pos2.Z > ((siz.Z/2)-0.01) then surface = {"Back", ca(rd(90), 0, 0)} elseif pos2.Z < -((siz.Z/2)-0.01) then surface = {"Front", ca(rd(-90), 0, 0)} end end return surface end
  739.  
  740.  
  741.  
  742.  
  743. BulletHole = function(HitPos,HitObj,sc,img,par) -- Bullethole function
  744.  
  745.  
  746. local Surface = DetectSurface(HitPos, HitObj)
  747.  
  748.  
  749. local C = cn(HitPos) * ca(HitObj.CFrame:toEulerAnglesXYZ()) * Surface[2]
  750.  
  751.  
  752. if Surface[1] == "Anything" then C = Surface[2] end local theimg = img or ds.BulletHole
  753.  
  754.  
  755. local bl = pa(workspace or par,"bullethole","Block",sc,0,sc,false,true,1,0,"") qi({"Decal",bl,Face="Top",Texture=theimg})
  756.  
  757.  
  758. bl.CFrame = C*cn(0,-0.1,0) if not HitObj.Anchored then bl.Anchored = false stick(bl,HitObj) bl.ChildRemoved:connect(function() bl:Remove() end) end q(function() wait(5) for i=0,1,0.05 do bl.Size=v3(-i*sc,0,-i*sc) wait() end de(bl,0) end)
  759.  
  760.  
  761. end
  762.  
  763.  
  764.  
  765.  
  766. so = function(id,par,vol,pit) q(function() -- Sound maker
  767.  
  768.  
  769. local sou = qi({"Sound",par or workspace,Volume=vol,Pitch=pit or 1,SoundId=id})
  770.  
  771.  
  772. wait() sou:play() wait(6) sou:Remove() end) end
  773.  
  774.  
  775.  
  776.  
  777. -- local/so(asset..ds.GothicMusic,workspace,1,2.6)
  778.  
  779.  
  780.  
  781.  
  782. function GetRegion(p0,p1,f,f2) q(function()
  783.  
  784.  
  785. for i,v in pairs(workspace:FindPartsInRegion3(Region3.new(p0,p1),c,100) ) do if v.Parent:findFirstChild("Humanoid") and v.Parent.Humanoid.Health > 0 and v.Parent:findFirstChild("Torso") then q(function() f(v.Parent) end) elseif f2 and v.Parent.Parent:findFirstChild("Humanoid") == nil then f2(v) end end
  786.  
  787.  
  788. end) end
  789.  
  790.  
  791.  
  792.  
  793.  
  794. FindGround = function(pos) -- ground finder
  795.  
  796.  
  797. local ax,ay,az = pos:toEulerAnglesXYZ()
  798.  
  799.  
  800. local bhit,bpos=ray(pos.p,pos.p - (pos.p + v3(0,200,0)))
  801.  
  802.  
  803. if bhit and bpos then
  804.  
  805.  
  806. return cn(bpos)*ca(ax,ay,az)
  807.  
  808.  
  809. end
  810.  
  811.  
  812. return nil
  813.  
  814.  
  815. end
  816.  
  817.  
  818.  
  819.  
  820. function NPC(Name, Position) -- npc maker
  821.  
  822.  
  823. local Character = Instance.new("Model")
  824.  
  825.  
  826. Character.Name = Name
  827.  
  828.  
  829. local Humanoid = Instance.new("Humanoid")
  830.  
  831.  
  832. Humanoid.Parent = Character
  833.  
  834.  
  835. local Template = Instance.new("Part")
  836.  
  837.  
  838. Template.FormFactor = "Custom"
  839.  
  840.  
  841. Template.Size = Vector3.new(1, 2, 1)
  842.  
  843.  
  844. Template.Locked = true
  845.  
  846.  
  847. local Head = Template:Clone()
  848.  
  849.  
  850. Head.Name = "Head"
  851.  
  852.  
  853. Head.TopSurface = "Smooth"
  854.  
  855.  
  856. Head.BottomSurface = "Smooth"
  857.  
  858.  
  859. Head.Size = Vector3.new(2, 1, 1)
  860.  
  861.  
  862. Head.Parent = Character
  863.  
  864.  
  865. local Mesh = Instance.new("SpecialMesh")
  866.  
  867.  
  868. Mesh.MeshType = "Head"
  869.  
  870.  
  871. Mesh.Scale = Vector3.new(1.25, 1.25, 1.25)
  872.  
  873.  
  874. Mesh.Parent = Head
  875.  
  876.  
  877. local Face = Instance.new("Decal")
  878.  
  879.  
  880. Face.Name = "face"
  881.  
  882.  
  883. Face.Texture = "rbxasset://textures/face.png"
  884.  
  885.  
  886. Face.Parent = Head
  887.  
  888.  
  889. local Torso = Template:Clone()
  890.  
  891.  
  892. Torso.Name = "Torso"
  893.  
  894.  
  895. Torso.LeftSurface = "Weld"
  896.  
  897.  
  898. Torso.RightSurface = "Weld"
  899.  
  900.  
  901. Torso.CFrame = CFrame.new(0, 10000, 0)
  902.  
  903.  
  904. Torso.Size = Vector3.new(2, 2, 1)
  905.  
  906.  
  907. Torso.Parent = Character
  908.  
  909.  
  910. local TShirt = Instance.new("Decal")
  911.  
  912.  
  913. TShirt.Name = "roblox"
  914.  
  915.  
  916. TShirt.Parent = Torso
  917.  
  918.  
  919. local LeftArm = Template:Clone()
  920.  
  921.  
  922. LeftArm.Name = "Left Arm"
  923.  
  924.  
  925. LeftArm.Parent = Character
  926.  
  927.  
  928. local RightArm = Template:Clone()
  929.  
  930.  
  931. RightArm.Name = "Right Arm"
  932.  
  933.  
  934. RightArm.Parent = Character
  935.  
  936.  
  937. local LeftLeg = Template:Clone()
  938.  
  939.  
  940. LeftLeg.Name = "Left Leg"
  941.  
  942.  
  943. LeftLeg.Parent = Character
  944.  
  945.  
  946. local RightLeg = Template:Clone()
  947.  
  948.  
  949. RightLeg.Name = "Right Leg"
  950.  
  951.  
  952. RightLeg.Parent = Character
  953.  
  954.  
  955. Character:BreakJoints()
  956.  
  957.  
  958. local Neck = Instance.new("Weld")
  959.  
  960.  
  961. Neck.Name = "Neck"
  962.  
  963.  
  964. Neck.Part0 = Torso
  965.  
  966.  
  967. Neck.Part1 = Head
  968.  
  969.  
  970. Neck.C0 = CFrame.new(0, 1.5, 0)
  971.  
  972.  
  973. Neck.Parent = Torso
  974.  
  975.  
  976. local LeftShoulder = Instance.new("Motor")
  977.  
  978.  
  979. LeftShoulder.Name = "Left Shoulder"
  980.  
  981.  
  982. LeftShoulder.Part0 = Torso
  983.  
  984.  
  985. LeftShoulder.Part1 = LeftArm
  986.  
  987.  
  988. LeftShoulder.MaxVelocity = 0.1
  989.  
  990.  
  991. LeftShoulder.C0 = CFrame.new(-Torso.Size.x / 2 - RightArm.Size.x / 2, LeftArm.Size.y / 4, 0) * CFrame.fromEulerAnglesXYZ(0, -math.pi / 2, 0)
  992.  
  993.  
  994. LeftShoulder.C1 = CFrame.new(0, LeftArm.Size.y / 4, 0) * CFrame.fromEulerAnglesXYZ(0, -math.pi / 2, 0)
  995.  
  996.  
  997. LeftShoulder.Parent = Torso
  998.  
  999.  
  1000. local RightShoulder = Instance.new("Motor")
  1001.  
  1002.  
  1003. RightShoulder.Name = "Right Shoulder"
  1004.  
  1005.  
  1006. RightShoulder.Part0 = Torso
  1007.  
  1008.  
  1009. RightShoulder.Part1 = RightArm
  1010.  
  1011.  
  1012. RightShoulder.MaxVelocity = 0.1
  1013.  
  1014.  
  1015. RightShoulder.C0 = CFrame.new(Torso.Size.x / 2 + RightArm.Size.x / 2, RightArm.Size.y / 4, 0) * CFrame.fromEulerAnglesXYZ(0, math.pi / 2, 0)
  1016.  
  1017.  
  1018. RightShoulder.C1 = CFrame.new(0, RightArm.Size.y / 4, 0) * CFrame.fromEulerAnglesXYZ(0, math.pi / 2, 0)
  1019.  
  1020.  
  1021. RightShoulder.Parent = Torso
  1022.  
  1023.  
  1024. local LeftHip = Instance.new("Motor")
  1025.  
  1026.  
  1027. LeftHip.Name = "Left Hip"
  1028.  
  1029.  
  1030. LeftHip.Part0 = Torso
  1031.  
  1032.  
  1033. LeftHip.Part1 = LeftLeg
  1034.  
  1035.  
  1036. LeftHip.MaxVelocity = 0.1
  1037.  
  1038.  
  1039. LeftHip.C0 = CFrame.new(-LeftLeg.Size.x / 2, -LeftLeg.Size.y / 2, 0) * CFrame.fromEulerAnglesXYZ(0, -math.pi / 2, 0)
  1040.  
  1041.  
  1042. LeftHip.C1 = CFrame.new(0, LeftLeg.Size.y / 2, 0) * CFrame.fromEulerAnglesXYZ(0, -math.pi / 2, 0)
  1043.  
  1044.  
  1045. LeftHip.Parent = Torso
  1046.  
  1047.  
  1048. local RightHip = Instance.new("Motor")
  1049.  
  1050.  
  1051. RightHip.Name = "Right Hip"
  1052.  
  1053.  
  1054. RightHip.Part0 = Torso
  1055.  
  1056.  
  1057. RightHip.Part1 = RightLeg
  1058.  
  1059.  
  1060. RightHip.MaxVelocity = 0.1
  1061.  
  1062.  
  1063. RightHip.C0 = CFrame.new(RightLeg.Size.x / 2, -RightLeg.Size.y / 2, 0) * CFrame.fromEulerAnglesXYZ(0, math.pi / 2, 0)
  1064.  
  1065.  
  1066. RightHip.C1 = CFrame.new(0, RightLeg.Size.y / 2, 0) * CFrame.fromEulerAnglesXYZ(0, math.pi / 2, 0)
  1067.  
  1068.  
  1069. RightHip.Parent = Torso
  1070.  
  1071.  
  1072. local BodyColors = Instance.new("BodyColors")
  1073.  
  1074.  
  1075. BodyColors.LeftArmColor = BrickColor.new("Bright yellow")
  1076.  
  1077.  
  1078. BodyColors.RightArmColor = BrickColor.new("Bright yellow")
  1079.  
  1080.  
  1081. BodyColors.LeftLegColor = BrickColor.new("Br. yellowish green")
  1082.  
  1083.  
  1084. BodyColors.RightLegColor = BrickColor.new("Br. yellowish green")
  1085.  
  1086.  
  1087. BodyColors.HeadColor = BrickColor.new("Bright yellow")
  1088.  
  1089.  
  1090. BodyColors.TorsoColor = BrickColor.new("Bright blue")
  1091.  
  1092.  
  1093. BodyColors.Parent = Character
  1094.  
  1095.  
  1096. Character.Parent = Workspace
  1097.  
  1098.  
  1099. Character:MoveTo(Position)
  1100.  
  1101.  
  1102. Character:MoveTo(Torso.Position + Vector3.new(0, 3, 0))
  1103.  
  1104.  
  1105. return Character
  1106.  
  1107.  
  1108. end
  1109.  
  1110.  
  1111.  
  1112.  
  1113. AddBV=function(str,cfr,par,debt)
  1114.  
  1115.  
  1116. if not par then return end
  1117.  
  1118.  
  1119. if par:findFirstChild'LibBV' then par.LibBV:Remove() end
  1120.  
  1121.  
  1122. tbbodyvelocity=qi{'BodyVelocity',par,velocity=cfr.lookVector*str,maxForce=v3(1/0,1/0,1/0),Name='LibBV'} deb:AddItem(tbbodyvelocity,debt)
  1123.  
  1124.  
  1125. end
  1126.  
  1127.  
  1128.  
  1129.  
  1130. AddBG=function(str,par,debt)
  1131.  
  1132.  
  1133. if not par then return end
  1134.  
  1135.  
  1136. if par:findFirstChild'LibBG' then par.LibBG:Remove() end
  1137.  
  1138.  
  1139. tbbodygyro=qi{'BodyGyro',par,maxTorque=v3(1/0,1/0,1/0),P=100000,cframe=str,Name='LibBG'} deb:AddItem(tbbodygyro,debt)
  1140.  
  1141.  
  1142. end
  1143.  
  1144.  
  1145.  
  1146.  
  1147. AddBAV=function(vec3,par,debt)
  1148.  
  1149.  
  1150. if not par then return end
  1151.  
  1152.  
  1153. if par:findFirstChild'LibBAV' then par.LibBAV:Remove() end
  1154.  
  1155.  
  1156. tbbodyangularvelocity=qi{'BodyAngularVelocity',par,maxTorque=v3(1/0,1/0,1/0),angularvelocity=vec3,Name='LibBAV'} deb:AddItem(tbbodyangularvelocity,debt)
  1157.  
  1158.  
  1159. end
  1160.  
  1161.  
  1162.  
  1163.  
  1164. Dmg = function(Hum,Dealt,Critical)
  1165.  
  1166.  
  1167. local HM=Hum.Parent
  1168.  
  1169.  
  1170. local HMT,HMB=HM:findFirstChild'Torso',HM:findFirstChild'Block'
  1171.  
  1172.  
  1173. local Blocks=HMB and HMB.Value>0
  1174.  
  1175.  
  1176. if HMT then
  1177.  
  1178.  
  1179. local mm=qi{'Model',HMT} qi{'Humanoid',mm,MaxHealth=0} deb:AddItem(mm,1)
  1180.  
  1181.  
  1182. local mp= qi{'Part',mm,Name='Head',formFactor="Custom",Anchored=true,CanCollide=false,Size=v3(1,0.2,1),CFrame=HMT.CFrame*cn(rn(-100,100)/50,3,rn(-100,100)/50)} qi{'BlockMesh',mp}
  1183.  
  1184.  
  1185. if Blocks then
  1186.  
  1187.  
  1188. mm.Name='Block!'
  1189.  
  1190.  
  1191. mp.BrickColor=bn'Bright blue'
  1192.  
  1193.  
  1194. HMB.Value=HMB.Value-1
  1195.  
  1196.  
  1197. elseif not Blocks then
  1198.  
  1199.  
  1200. mm.Name=Dealt
  1201.  
  1202.  
  1203. mp.BrickColor=bn'Bright red'
  1204.  
  1205.  
  1206. end
  1207.  
  1208.  
  1209. end
  1210.  
  1211.  
  1212. if not Blocks then
  1213.  
  1214.  
  1215. Hum:TakeDamage(Dealt)
  1216.  
  1217.  
  1218. end
  1219.  
  1220.  
  1221. end
  1222.  
  1223.  
  1224.  
  1225.  
  1226. GetHum = function(part)
  1227.  
  1228.  
  1229. local Hum,HT,block
  1230.  
  1231.  
  1232. for i,v in pairs(part.Parent:children()) do
  1233.  
  1234.  
  1235. if v:IsA("Humanoid") then
  1236.  
  1237.  
  1238. Hum=v
  1239.  
  1240.  
  1241. elseif v.Name=='Torso' then
  1242.  
  1243.  
  1244. HT=v
  1245.  
  1246.  
  1247. elseif v.Name=='Block' and v:IsA("NumberValue") then
  1248.  
  1249.  
  1250. block=v
  1251.  
  1252.  
  1253. end
  1254.  
  1255.  
  1256. end
  1257.  
  1258.  
  1259. return Hum,HT,block
  1260.  
  1261.  
  1262. end
  1263.  
  1264.  
  1265.  
  1266.  
  1267. Lightning = function(p0,p1,tym,ofs,col,th,tra) -- start end times offset color thickness
  1268.  
  1269.  
  1270. local magz = (p0 - p1).magnitude local curpos = p0 local trz = {-ofs,ofs}
  1271.  
  1272.  
  1273. for i=1,tym do
  1274.  
  1275.  
  1276. local li = it("Part",c) li.TopSurface =0 li.BottomSurface = 0 li.Anchored = true li.Transparency = tra or 0.4 li.BrickColor = bc(col)
  1277.  
  1278.  
  1279. li.formFactor = "Custom" li.CanCollide = false li.Size = v3(th,th,magz/tym) local ofz = v3(trz[rn(1,2)],trz[rn(1,2)],trz[rn(1,2)])
  1280.  
  1281.  
  1282. local trolpos = cn(curpos,p1)*cn(0,0,magz/tym).p+ofz
  1283.  
  1284.  
  1285. if tym == i then
  1286.  
  1287.  
  1288. local magz2 = (curpos - p1).magnitude li.Size = v3(th,th,magz2)
  1289.  
  1290.  
  1291. li.CFrame = cn(curpos,p1)*cn(0,0,-magz2/2)
  1292.  
  1293.  
  1294. else
  1295.  
  1296.  
  1297. li.CFrame = cn(curpos,trolpos)*cn(0,0,magz/tym/2)
  1298.  
  1299.  
  1300. end
  1301.  
  1302.  
  1303. curpos = li.CFrame*cn(0,0,magz/tym/2).p de(li,0.25)
  1304.  
  1305.  
  1306. end
  1307.  
  1308.  
  1309. end
  1310.  
  1311.  
  1312.  
  1313.  
  1314. MakeCrater = function(pos,sc,tyms,debz,par) -- crater maker
  1315.  
  1316.  
  1317. q(function()
  1318.  
  1319.  
  1320. if not debz then
  1321.  
  1322.  
  1323. debz = 5
  1324.  
  1325.  
  1326. end
  1327.  
  1328.  
  1329. local bhit,bpos=ray(pos,pos - (pos + v3(0,200,0)))
  1330.  
  1331.  
  1332. if bhit and bpos then
  1333.  
  1334.  
  1335. for i=1,tyms do
  1336.  
  1337.  
  1338. q(function()
  1339.  
  1340.  
  1341. local gr = pa(par or workspace,"","Block",rn(5,13)/10*sc,0.25*sc,rn(4,10)/10*sc,true,true,bhit.Transparency,bhit.Reflectance,bhit.BrickColor.Name)
  1342.  
  1343.  
  1344. gr.Material = bhit.Material
  1345.  
  1346.  
  1347. gr.TopSurface = bhit.TopSurface
  1348.  
  1349.  
  1350. gr.CFrame = cn(bpos+v3(rn(-12,12)/10*sc,0,rn(-12,12)/10*sc))*ca(rd(rn(-40,40)),rd(rn(-360,360)),rd(rn(-40,40)))
  1351.  
  1352.  
  1353. wait(debz)
  1354.  
  1355.  
  1356. fade(gr,0.1)
  1357.  
  1358.  
  1359. end)
  1360.  
  1361.  
  1362. end
  1363.  
  1364.  
  1365. end
  1366.  
  1367.  
  1368. end)
  1369.  
  1370.  
  1371. end
  1372.  
  1373.  
  1374.  
  1375.  
  1376. MakeCrack = function(pos,sc,debz,par) -- crackmaker
  1377.  
  1378.  
  1379. q(function()
  1380.  
  1381.  
  1382. if not debz then
  1383.  
  1384.  
  1385. debz = 5
  1386.  
  1387.  
  1388. end
  1389.  
  1390.  
  1391. local bhit,bpos=ray(pos,pos - (pos + v3(0,10,0)))
  1392.  
  1393.  
  1394. if bhit and bpos then
  1395.  
  1396.  
  1397. local cr = pa(par or workspace,"Crack","Block",sc,0,sc,false,true,1,0,"") cr.CFrame = cn(bpos)
  1398.  
  1399.  
  1400. local dec=qi({"Decal",cr,Face="Top",Texture=ds.Crack}) de(cr,debz)
  1401.  
  1402.  
  1403. end
  1404.  
  1405.  
  1406. end)
  1407.  
  1408.  
  1409. end
  1410.  
  1411.  
  1412.  
  1413.  
  1414. a = {}
  1415.  
  1416.  
  1417. a.insw={}
  1418.  
  1419.  
  1420. function cleanweld(wexx,namzi)
  1421.  
  1422.  
  1423. local tn=ft2(a.insw,wexx)
  1424.  
  1425.  
  1426. if tn==nil then return end
  1427.  
  1428.  
  1429. if namzi=="p0" then
  1430.  
  1431.  
  1432. a.insw[tn][2]["p0x"],a.insw[tn][2]["p0y"],a.insw[tn][2]["p0z"]=0,0,0 elseif namzi=="p1" then
  1433.  
  1434.  
  1435. a.insw[tn][2]["p1x"],a.insw[tn][2]["p1y"],a.insw[tn][2]["p1z"]=0,0,0 elseif namzi=="a0" then
  1436.  
  1437.  
  1438. a.insw[tn][2]["a0x"],a.insw[tn][2]["a0y"],a.insw[tn][2]["a0z"]=0,0,0 elseif namzi=="a1" then
  1439.  
  1440.  
  1441. a.insw[tn][2]["a1x"],a.insw[tn][2]["a1y"],a.insw[tn][2]["a1z"]=0,0,0
  1442.  
  1443.  
  1444. end
  1445.  
  1446.  
  1447. end
  1448.  
  1449.  
  1450. function c2(wexx,smmx,c0orc1,aa,bb,cc,xx,yy,zz)
  1451.  
  1452.  
  1453. q(function()
  1454.  
  1455.  
  1456. c1(wexx,smmx,c0orc1,aa,bb,cc,xx,yy,zz)
  1457.  
  1458.  
  1459. end)
  1460.  
  1461.  
  1462. end
  1463.  
  1464.  
  1465. a.Welding=0
  1466.  
  1467.  
  1468. function c1(wexx,smmx,c0orc1,aa,bb,cc,xx,yy,zz)
  1469.  
  1470.  
  1471. if ft2(a.insw,wexx)==nil then
  1472.  
  1473.  
  1474. ti(a.insw,{wexx,{}})
  1475.  
  1476.  
  1477. local tn=ft2(a.insw,wexx)
  1478.  
  1479.  
  1480. a.insw[tn][2]["p0x"],a.insw[tn][2]["p0y"],a.insw[tn][2]["p0z"]=wexx.C0.x,wexx.C0.y,wexx.C0.z
  1481.  
  1482.  
  1483. a.insw[tn][2]["p1x"],a.insw[tn][2]["p1y"],a.insw[tn][2]["p1z"]=wexx.C1.x,wexx.C1.y,wexx.C1.z
  1484.  
  1485.  
  1486. a.insw[tn][2]["a0x"],a.insw[tn][2]["a0y"],a.insw[tn][2]["a0z"]=wexx.C0:toEulerAnglesXYZ()
  1487.  
  1488.  
  1489. a.insw[tn][2]["a1x"],a.insw[tn][2]["a1y"],a.insw[tn][2]["a1z"]=wexx.C1:toEulerAnglesXYZ()
  1490.  
  1491.  
  1492. end
  1493.  
  1494.  
  1495. local tn=ft2(a.insw,wexx)
  1496.  
  1497.  
  1498. local xx2,yy2,zz2=0,0,0
  1499.  
  1500.  
  1501. local x2,y2,z2=0,0,0
  1502.  
  1503.  
  1504. if c0orc1==0 then
  1505.  
  1506.  
  1507. xx2,yy2,zz2=a.insw[tn][2]["a0x"],a.insw[tn][2]["a0y"],a.insw[tn][2]["a0z"]
  1508.  
  1509.  
  1510. x2,y2,z2=a.insw[tn][2]["p0x"],a.insw[tn][2]["p0y"],a.insw[tn][2]["p0z"]
  1511.  
  1512.  
  1513. elseif c0orc1==1 then
  1514.  
  1515.  
  1516. xx2,yy2,zz2=a.insw[tn][2]["a1x"],a.insw[tn][2]["a1y"],a.insw[tn][2]["a1z"]
  1517.  
  1518.  
  1519. x2,y2,z2=a.insw[tn][2]["p1x"],a.insw[tn][2]["p1y"],a.insw[tn][2]["p1z"]
  1520.  
  1521.  
  1522. else
  1523.  
  1524.  
  1525. xx2,yy2,zz2=a.insw[tn][2]["a1x"],a.insw[tn][2]["a1y"],a.insw[tn][2]["a1z"]
  1526.  
  1527.  
  1528. x2,y2,z2=a.insw[tn][2]["p0x"],a.insw[tn][2]["p0y"],a.insw[tn][2]["p0z"]
  1529.  
  1530.  
  1531. end a.Welding=a.Welding + 1
  1532.  
  1533.  
  1534. local twa=1
  1535.  
  1536.  
  1537. if smmx >= 1 then
  1538.  
  1539.  
  1540. else
  1541.  
  1542.  
  1543. for i=smmx,0.8,smmx do
  1544.  
  1545.  
  1546. twa = 1
  1547.  
  1548.  
  1549. if c0orc1==0 then
  1550.  
  1551.  
  1552. wexx.C0=cn(x2-(((x2-aa)/twa)*i),y2-(((y2-bb)/twa)*i),z2-(((z2-cc)/twa)*i)) *ca(xx2-(((xx2-rd(xx))/twa)*i),yy2-(((yy2-rd(yy))/twa)*i),zz2-(((zz2-rd(zz))/twa)*i))
  1553.  
  1554.  
  1555. elseif c0orc1==1 then
  1556.  
  1557.  
  1558. wexx.C1=cn(x2-(((x2-aa)/twa)*i),y2-(((y2-bb)/twa)*i),z2-(((z2-cc)/twa)*i)) *ca(xx2-(((xx2-rd(xx))/twa)*i),yy2-(((yy2-rd(yy))/twa)*i),zz2-(((zz2-rd(zz))/twa)*i))
  1559.  
  1560.  
  1561. else local x,y,z = wexx.C0:toEulerAnglesXYZ()
  1562.  
  1563.  
  1564. wexx.C0=cn(x2-(((x2-aa)/twa)*i),y2-(((y2-bb)/twa)*i),z2-(((z2-cc)/twa)*i))*ca(x,y,z)
  1565.  
  1566.  
  1567. wexx.C1=cn(wexx.C1.x,wexx.C1.y,wexx.C1.z)*ca(xx2-(((xx2-rd(xx))/twa)*i),yy2-(((yy2-rd(yy))/twa)*i),zz2-(((zz2-rd(zz))/twa)*i))
  1568.  
  1569.  
  1570. end
  1571.  
  1572.  
  1573. if fu then
  1574.  
  1575.  
  1576. q(fu)
  1577.  
  1578.  
  1579. end
  1580.  
  1581.  
  1582. wait()
  1583.  
  1584.  
  1585. end
  1586.  
  1587.  
  1588. for i=0.8,1,smmx*0.45 do
  1589.  
  1590.  
  1591. twa = 1
  1592.  
  1593.  
  1594. if c0orc1==0 then
  1595.  
  1596.  
  1597. wexx.C0=cn(x2-(((x2-aa)/twa)*i),y2-(((y2-bb)/twa)*i),z2-(((z2-cc)/twa)*i)) *ca(xx2-(((xx2-rd(xx))/twa)*i),yy2-(((yy2-rd(yy))/twa)*i),zz2-(((zz2-rd(zz))/twa)*i))
  1598.  
  1599.  
  1600. elseif c0orc1==1 then
  1601.  
  1602.  
  1603. wexx.C1=cn(x2-(((x2-aa)/twa)*i),y2-(((y2-bb)/twa)*i),z2-(((z2-cc)/twa)*i)) *ca(xx2-(((xx2-rd(xx))/twa)*i),yy2-(((yy2-rd(yy))/twa)*i),zz2-(((zz2-rd(zz))/twa)*i))
  1604.  
  1605.  
  1606. else local x,y,z = wexx.C0:toEulerAnglesXYZ()
  1607.  
  1608.  
  1609. wexx.C0=cn(x2-(((x2-aa)/twa)*i),y2-(((y2-bb)/twa)*i),z2-(((z2-cc)/twa)*i))*ca(x,y,z)
  1610.  
  1611.  
  1612. wexx.C1=cn(wexx.C1.x,wexx.C1.y,wexx.C1.z)*ca(xx2-(((xx2-rd(xx))/twa)*i),yy2-(((yy2-rd(yy))/twa)*i),zz2-(((zz2-rd(zz))/twa)*i))
  1613.  
  1614.  
  1615. end
  1616.  
  1617.  
  1618. wait()
  1619.  
  1620.  
  1621. end
  1622.  
  1623.  
  1624. end
  1625.  
  1626.  
  1627. local i=1
  1628.  
  1629.  
  1630. if c0orc1==0 then
  1631.  
  1632.  
  1633. wexx.C0=cn(x2-(((x2-aa)/twa)*i),y2-(((y2-bb)/twa)*i),z2-(((z2-cc)/twa)*i)) *ca(xx2-(((xx2-rd(xx))/twa)*i),yy2-(((yy2-rd(yy))/twa)*i),zz2-(((zz2-rd(zz))/twa)*i))
  1634.  
  1635.  
  1636. elseif c0orc1==1 then
  1637.  
  1638.  
  1639. wexx.C1=cn(x2-(((x2-aa)/twa)*i),y2-(((y2-bb)/twa)*i),z2-(((z2-cc)/twa)*i)) *ca(xx2-(((xx2-rd(xx))/twa)*i),yy2-(((yy2-rd(yy))/twa)*i),zz2-(((zz2-rd(zz))/twa)*i))
  1640.  
  1641.  
  1642. else local x,y,z = wexx.C0:toEulerAnglesXYZ()
  1643.  
  1644.  
  1645. wexx.C0=cn(x2-(((x2-aa)/twa)*i),y2-(((y2-bb)/twa)*i),z2-(((z2-cc)/twa)*i))*ca(x,y,z)
  1646.  
  1647.  
  1648. wexx.C1=cn(wexx.C1.x,wexx.C1.y,wexx.C1.z)*ca(xx2-(((xx2-rd(xx))/twa)*i),yy2-(((yy2-rd(yy))/twa)*i),zz2-(((zz2-rd(zz))/twa)*i))
  1649.  
  1650.  
  1651. end
  1652.  
  1653.  
  1654. a.Welding=a.Welding - 1
  1655.  
  1656.  
  1657. local tn=ft2(a.insw,wexx)
  1658.  
  1659.  
  1660. if c0orc1==0 then
  1661.  
  1662.  
  1663. a.insw[tn][2]["p0x"],a.insw[tn][2]["p0y"],a.insw[tn][2]["p0z"]=x2-(((x2-aa)/twa)*i),y2-(((y2-bb)/twa)*i),z2-(((z2-cc)/twa)*i)
  1664.  
  1665.  
  1666. a.insw[tn][2]["a0x"],a.insw[tn][2]["a0y"],a.insw[tn][2]["a0z"]=xx2-(((xx2-rd(xx))/twa)*i),yy2-(((yy2-rd(yy))/twa)*i),zz2-(((zz2-rd(zz))/twa)*i)
  1667.  
  1668.  
  1669. elseif c0orc1==1 then
  1670.  
  1671.  
  1672. a.insw[tn][2]["p1x"],a.insw[tn][2]["p1y"],a.insw[tn][2]["p1z"]=x2-(((x2-aa)/twa)*i),y2-(((y2-bb)/twa)*i),z2-(((z2-cc)/twa)*i)
  1673.  
  1674.  
  1675. a.insw[tn][2]["a1x"],a.insw[tn][2]["a1y"],a.insw[tn][2]["a1z"]=xx2-(((xx2-rd(xx))/twa)*i),yy2-(((yy2-rd(yy))/twa)*i),zz2-(((zz2-rd(zz))/twa)*i)
  1676.  
  1677.  
  1678. elseif c0orc1==3 then
  1679.  
  1680.  
  1681. local x,y,z=wexx.C0.x,wexx.C0.y,wexx.C0.z
  1682.  
  1683.  
  1684. a.insw[tn][2]["p0x"],a.insw[tn][2]["p0y"],a.insw[tn][2]["p0z"]=x2-(((x2-aa)/twa)*i),y2-(((y2-bb)/twa)*i),z2-(((z2-cc)/twa)*i)
  1685.  
  1686.  
  1687. local x,y,z=wexx.C1:toEulerAnglesXYZ()
  1688.  
  1689.  
  1690. a.insw[tn][2]["a1x"],a.insw[tn][2]["a1y"],a.insw[tn][2]["a1z"]=xx2-(((xx2-rd(xx))/twa)*i),yy2-(((yy2-rd(yy))/twa)*i),zz2-(((zz2-rd(zz))/twa)*i)
  1691.  
  1692.  
  1693. end
  1694.  
  1695.  
  1696. end
  1697.  
  1698.  
  1699.  
  1700.  
  1701. Welds={}
  1702.  
  1703.  
  1704. Ani=function(w,a,b,c,d,e,f,ty,inc,sined)
  1705.  
  1706.  
  1707. if not Welds[w] then
  1708.  
  1709.  
  1710. local d0,e0,f0=w.C0:toEulerAnglesXYZ() local d1,e1,f1=w.C1:toEulerAnglesXYZ()
  1711.  
  1712.  
  1713. local d0,e0,f0=mdeg(d0),mdeg(e0),mdeg(f0) local d1,e1,f1=mdeg(d1),mdeg(e1),mdeg(f1)
  1714.  
  1715.  
  1716. Welds[w]={[0]={w.C0.x,w.C0.y,w.C0.z,d0,e0,f0},[1]={w.C1.x,w.C1.y,w.C1.z,d1,e1,f1}}
  1717.  
  1718.  
  1719. end
  1720.  
  1721.  
  1722. local c0,c1=Welds[w][0],Welds[w][1]
  1723.  
  1724.  
  1725. c0[1],c0[2],c0[3]=w.C0.x,w.C0.y,w.C0.z
  1726.  
  1727.  
  1728. c1[1],c1[2],c1[3]=w.C1.x,w.C1.y,w.C1.z
  1729.  
  1730.  
  1731. local A0,B0,C0,D0,E0,F0 = unpack(c0)
  1732.  
  1733.  
  1734. local A1,B1,C1,D1,E1,F1 = unpack(c1)
  1735.  
  1736.  
  1737. local Do = function(i)
  1738.  
  1739.  
  1740. if ty==0 then
  1741.  
  1742.  
  1743. w.C0=cn( A0-((A0-a)*i) , B0-((B0-b)*i) , C0-((C0-c)*i) ) * ca2( D0-((D0-d)*i) , E0-(((E0-e)/1)*i) , F0-((F0-f)*i) )
  1744.  
  1745.  
  1746. elseif ty==1 then
  1747.  
  1748.  
  1749. w.C1=cn( A1-((A1-a)*i) , B1-((B1-b)*i) , C1-((C1-c)*i) ) * ca2( D1-((D1-d)*i) , E1-(((E1-e)/1)*i) , F1-((F1-f)*i) )
  1750.  
  1751.  
  1752. else
  1753.  
  1754.  
  1755. w.C0=cn( A0-((A0-a)*i) , B0-((B0-b)*i) , C0-((C0-c)*i) ) * ca2(D0,E0,F0)
  1756.  
  1757.  
  1758. w.C1=cn(A1,B1,C1) * ca2( D1-((D1-d)*i) , E1-(((E1-e)/1)*i) , F1-((F1-f)*i) )
  1759.  
  1760.  
  1761. end
  1762.  
  1763.  
  1764. end
  1765.  
  1766.  
  1767. for i=inc,1,inc do
  1768.  
  1769.  
  1770. Do(sined and math.sin(math.pi/2*i) or i)
  1771.  
  1772.  
  1773. wait()
  1774.  
  1775.  
  1776. end
  1777.  
  1778.  
  1779. Do(1)
  1780.  
  1781.  
  1782. if ty==0 then
  1783.  
  1784.  
  1785. c0[4],c0[5],c0[6]=d,e,f
  1786.  
  1787.  
  1788. else
  1789.  
  1790.  
  1791. c1[4],c1[5],c1[6]=d,e,f
  1792.  
  1793.  
  1794. end
  1795.  
  1796.  
  1797. end
  1798.  
  1799.  
  1800. qAni=function(w,a,b,c,d,e,f,ty,inc,sined) q(function() Ani(w,a,b,c,d,e,f,ty,inc,sined) end) end
  1801.  
  1802.  
  1803. rAni=function(w)
  1804.  
  1805.  
  1806. Welds[w]=nil
  1807.  
  1808.  
  1809. end
  1810.  
  1811.  
  1812.  
  1813.  
  1814. gunshot = function(speed,sc,dmg,cff) q(function() -- gunshot function
  1815.  
  1816.  
  1817. local bb = pa(workspace,"bullet","Block",0.2*sc,0.3*sc,0.2*sc,true,true,0,0.1,"Black") qi({"CylinderMesh",bb})
  1818.  
  1819.  
  1820. bb.CFrame = cff*ca(rd(rn(-1000,1000)/1500),rd(rn(-1000,1000)/1500),rd(rn(-1000,1000)/1500))
  1821.  
  1822.  
  1823. so(ds.Fire,bb,0.3,1) wait() for i=1,50 do
  1824.  
  1825.  
  1826. bhit,bpos=ray(bb.Position,bb.Position - (bb.CFrame *cn(0,-1,0)).p)
  1827.  
  1828.  
  1829. if bhit and bhit.Name ~= "bullet" and bhit.Name ~= "bullethole" and bpos and (bpos - bb.Position).magnitude < speed then break end
  1830.  
  1831.  
  1832. bb.CFrame=bb.CFrame*cn(0,speed,0)*ca(rd(-0.2),0,0)
  1833.  
  1834.  
  1835. wait()
  1836.  
  1837.  
  1838. end bb.CFrame=bb.CFrame*cn(0,(bpos-bb.Position).magnitude,0)
  1839.  
  1840.  
  1841. if not bhit.Anchored then
  1842.  
  1843.  
  1844. if bhit.Parent:findFirstChild("Humanoid") then local h = bhit.Parent.Humanoid h.Health=h.Health-dmg so(ds.Hit,bhit,0.3,1) end
  1845.  
  1846.  
  1847. else if bhit.Name~="Base" then bhit.Anchored=false bhit:BreakJoints() end end bb:Remove()
  1848.  
  1849.  
  1850. if bhit.Parent:findFirstChild("Humanoid") == nil then BulletHole(bpos,bhit,0.7*sc) end
  1851.  
  1852.  
  1853. end) end
  1854.  
  1855.  
  1856.  
  1857.  
  1858. dive = function(ob2,pro,ite,stof)
  1859.  
  1860.  
  1861. local function div(ob) for i,v in pairs(ob:children()) do if v[pro] == ite then
  1862.  
  1863.  
  1864. for i=1,#stof do v[stof[i][1]] = stof[i][2] end else div(v) end end end
  1865.  
  1866.  
  1867. div(ob2)
  1868.  
  1869.  
  1870. end
  1871.  
  1872.  
  1873.  
  1874.  
  1875. fc = function(ob,cl)
  1876.  
  1877.  
  1878. for i,v in pairs(ob:children()) do if v.className:lower()==cl:lower() then return v end end
  1879.  
  1880.  
  1881. end
  1882.  
  1883.  
  1884.  
  1885.  
  1886. function se(Key,Text)
  1887.  
  1888.  
  1889. local Values = {}
  1890.  
  1891.  
  1892. for value in (Text..Key):gmatch("(.-)"..Key) do
  1893.  
  1894.  
  1895. table.insert(Values,value)
  1896.  
  1897.  
  1898. end return Values
  1899.  
  1900.  
  1901. end
  1902.  
  1903.  
  1904.  
  1905.  
  1906. local thefenv = getfenv()
  1907.  
  1908.  
  1909. getfenv()["rmhelp"] = function()
  1910.  
  1911.  
  1912. local nus = 0
  1913.  
  1914.  
  1915. for i,v in pairs(thefenv) do if i ~= "wait" and i ~= "script" then nus = nus + 1 wait(0.05)
  1916.  
  1917.  
  1918. print(string.rep(" ",3-#tostring(nus)) ..nus.. ") " ..i.. " (" ..type(v).. ")")
  1919.  
  1920.  
  1921. end
  1922.  
  1923.  
  1924. end
  1925.  
  1926.  
  1927. end
  1928.  
  1929.  
  1930.  
  1931.  
  1932. for i,v in pairs(thefenv) do
  1933.  
  1934.  
  1935. _G[i] = v
  1936.  
  1937.  
  1938. --print(i)
  1939.  
  1940.  
  1941. end
  1942.  
  1943.  
  1944.  
  1945.  
  1946. _G[" r".."m".."d".."x "] = [[
  1947.  
  1948.  
  1949. for i,v in pairs(_G) do
  1950.  
  1951.  
  1952. if i ~= "wait" and i ~= "script" then
  1953.  
  1954.  
  1955. getfenv()[i] = v
  1956.  
  1957.  
  1958. end
  1959.  
  1960.  
  1961. end
  1962.  
  1963.  
  1964. ]]
  1965.  
  1966. script:ClearAllChildren()
  1967. loadstring(_G[" rmdx "])()
  1968. Player=game:GetService("Players").LocalPlayer
  1969. Char=Player.Character
  1970. Backpack=Player.Backpack
  1971. PlayerGui=Player.PlayerGui
  1972. Torso=Char.Torso
  1973. Head=Char.Head
  1974. Hum=Char.Humanoid
  1975. Cam=workspace.CurrentCamera
  1976. Tn="Pipebomb Launcher"
  1977. pcall(function() Backpack[Tn]:Remove() end)
  1978. pcall(function() Cam[Tn]:Remove() end)
  1979. pcall(function() thesuit=Char[''] end)
  1980. pcall(function() thesuit[Tn]:Remove() end)
  1981. pcall(function() PlayerGui[Tn]:Remove() end)
  1982. CModel=qi{'Model',Cam,Name=Tn}
  1983. Tool=qi{'HopperBin',Player.Backpack,Name=Tn}
  1984. Suit=qi{'Model',Char,Name=''}
  1985. Weapon=qi{'Model',Suit,Name=Tn}
  1986. Gui=qi{'ScreenGui',PlayerGui,Name=Tn}
  1987. equip="unequipped"
  1988. anim=""
  1989. keys={}
  1990. fmouse=nil
  1991. PipeRotate=0
  1992. Clip=6
  1993. LastShot=0
  1994. ids = {}
  1995. ids.Shoot = 10209633
  1996. ids.Reload = 10209636
  1997. ids.Crown = 20329976
  1998. ids.Crown2 = 1323306
  1999. ids.Icon = 52611635
  2000. ids.Explode = 2697431
  2001. ids.Ring = 3270017
  2002. for i,v in pairs(ids) do
  2003. if type(v)=='number' then
  2004. ids[i]='http://www.roblox.com/asset/?id='..v
  2005. end
  2006. game:GetService("ContentProvider"):Preload(ids[i])
  2007. end
  2008. Limbs={LS=Torso:findFirstChild'Left Shoulder',RS=Torso:findFirstChild'Right Shoulder',LH=Torso:findFirstChild'Left Hip',RH=Torso:findFirstChild'Right Hip'}
  2009. if _G.Limbz then
  2010. Limbs.LS=Limbs.LS or _G.Limbz.LS
  2011. Limbs.RS=Limbs.RS or _G.Limbz.RS
  2012. Limbs.LH=Limbs.LH or _G.Limbz.LH
  2013. Limbs.RH=Limbs.RH or _G.Limbz.RH
  2014. end
  2015. _G.Limbz=Limbs
  2016. Torso.Neck.C0=cn(0,1.5,0) Torso.Neck.C1=cn(0,0,0)
  2017. c2(Torso.Neck,1,3,0,1.5,0,0,0,0)
  2018. LS,RS,LH,RH=Limbs.LS,Limbs.RS,Limbs.LH,Limbs.RH
  2019. LA,RA,LL,RL=Char['Left Arm'],Char['Right Arm'],Char['Left Leg'],Char['Right Leg']
  2020. LS.Part0,RS.Part0,LH.Part0,RH.Part0=Torso,Torso,Torso,Torso
  2021. LS.Part1,RS.Part1,LH.Part1,RH.Part1=LA,RA,LL,RL
  2022. pcall(function() thesuit:Remove() end)
  2023. Head.face.Transparency=0
  2024. Head.Transparency=1 Torso.Transparency=1
  2025. fTorso=pa(Suit,"FTorso","Block",2,2,1,false,false,0,0,Torso.BrickColor.Name) neck=Torso.Neck
  2026. tw=weld(fTorso,Torso,fTorso,0,0,0,0,0,0) qi{"BlockMesh",fTorso}
  2027. fHead=pa(Suit,"FHead","Block",2,1,1,false,false,0,0,Head.BrickColor.Name)
  2028. hw=weld(fHead,fTorso,fHead,0,1.5,0,0,0,0) qi{"SpecialMesh",fHead,Scale=v3(1.15,1.15,1.15)} Head.face:Clone().Parent=fHead Head.face.Transparency=1
  2029. la=qi{'Weld',fTorso,Part0=fTorso,C0=cn(-1.5,0.5,0),C1=cn(0,0.5,0)} ra=qi{'Weld',fTorso,Part0=fTorso,C0=cn(1.5,0.5,0),C1=cn(0,0.5,0)}
  2030. ll=qi{'Weld',fTorso,Part0=fTorso,C0=cn(-0.5,-1,0),C1=cn(0,1,0)} rl=qi{'Weld',fTorso,Part0=fTorso,C0=cn(0.5,-1,0),C1=cn(0,1,0)}
  2031. newhats(Char,fHead,Head) ClearClass(Char,"Hat") Hum.WalkSpeed=16 Hum.MaxHealth=175
  2032. Armz=false
  2033. Legz=false
  2034. Arms = function(on) Armz=on
  2035. if on then
  2036. LS.Part1=nil RS.Part1=nil
  2037. la.Part0=fTorso ra.Part0=fTorso
  2038. la.Part1=LA ra.Part1=RA
  2039. la.C0,la.C1=cn(-1.5,0.5,0),cn(0,0.5,0)
  2040. ra.C0,ra.C1=cn(1.5,0.5,0),cn(0,0.5,0)
  2041. else
  2042. LS.Parent,RS.Parent=fTorso,fTorso LS.Part0=fTorso RS.Part0=fTorso LS.Part1=LA RS.Part1=RA
  2043. la.Part1=nil ra.Part1=nil
  2044. end
  2045. end
  2046. Legs = function(on) Legz=on
  2047. if on then
  2048. LH.Part1=nil RH.Part1=nil
  2049. ll.Part0=fTorso rl.Part0=fTorso
  2050. ll.Part1=LL rl.Part1=RL
  2051. ll.C0,ll.C1=cn(-0.5,-1,0),cn(0,1,0)
  2052. rl.C0,rl.C1=cn(0.5,-1,0),cn(0,1,0)
  2053. else
  2054. LH.Parent,RH.Parent=fTorso,fTorso LH.Part0=fTorso RH.Part0=fTorso LH.Part1=LL RH.Part1=RL
  2055. ll.Part1=nil rl.Part1=nil
  2056. end
  2057. end
  2058. Arms'' Legs''
  2059. WDesign=function(c)
  2060. ha=pa(Weapon,"","Block",0.2,0.5,1,false,false,0,0,c[1]) haw=weld(ha,Torso,ha,0.5,2.5,1,rd(270),0,rd(90))
  2061. gp=pa(Weapon,"","Block",0.2,1,0.2,false,false,0,0,c[1]) weld(gp,ha,gp,0,-0.35,0,rd(-90),0,0) qi{'SpecialMesh',gp,MeshType='Wedge'}
  2062. gp=pa(Weapon,"","Block",0.2,0.7,0.2,false,false,0,0,c[2]) weld(gp,ha,gp,0,-0.1,0.55,0,0,0) qi{'BlockMesh',gp,Scale=v3(1,1,0.5)}
  2063. gp=pa(Weapon,"","Block",0.2,0.5,0.5,false,false,0,0,c[1]) weld(gp,ha,gp,0,-0.115,-0.5,rd(45),0,0)
  2064. gp=pa(Weapon,"","Block",0.2,0.5,1,false,false,0,0,c[1]) weld(gp,ha,gp,0,-0.1,-0.95,rd(15),0,0)
  2065. gpp=pa(Weapon,"","Block",0.21,0.6,0.3,false,false,0,0,c[3]) weld(gpp,ha,gpp,0,0,-1.5,0,0,0)
  2066. gp=pa(Weapon,"","Block",0.2,0.2,0.2,false,false,0,0,c[3]) weld(gp,gpp,gp,0,-0.4,0.05,0,rd(90),0) qi{'SpecialMesh',gp,MeshId=ids.Ring,Scale=v3(0.35,0.35,1)}
  2067. gp=pa(Weapon,"","Block",0.2,0.2,0.2,false,false,0,0,c[3]) weld(gp,gpp,gp,0,-0.4,0.05,rd(10),rd(90),0) qi{'BlockMesh',gp,Scale=v3(0.25,1,0.25)}
  2068. gp1=pa(Weapon,"","Block",1.2,0.2,1.2,false,false,0,0,c[3]) weld(gp1,gpp,gp1,0,-0.25,-0.2,rd(90),0,0) qi{'CylinderMesh',gp1}
  2069. p1=pa(Weapon,"","Block",0.4,1.3,0.2,false,false,0,0,c[3]) weld(p1,gp1,p1,0,0,0.1,rd(90),0,0)
  2070. p2=pa(Weapon,"","Block",0.2,0.4,0.2,false,false,0,0,c[3]) weld(p2,p1,p2,0,1.3/2,0,0,0,rd(90)) qi{'CylinderMesh',p2}
  2071. hinge=pa(Weapon,"","Block",0.2,0.4,0.2,false,false,0,0,c[4]) hingew=weld(hinge,p2,hinge,0,0,0,0,rd(0),0) qi{'CylinderMesh',hinge,Scale=v3(0.6,1.001,0.6)}
  2072. p3=pa(Weapon,"","Block",0.4,0.3,0.2,false,false,0,0,c[3]) weld(p3,p1,p3,0,-1.3/2,0,0,0,0) qi{'BlockMesh',p3}
  2073. p4=pa(Weapon,"","Block",0.2,0.2,0.2,false,false,0,0,c[3]) weld(p4,p3,p4,0.15,-0.2,0,0,0,0) qi{'BlockMesh',p4,Scale=v3(0.5,1,1)}
  2074. p5=pa(Weapon,"","Block",0.2,0.2,0.2,false,false,0,0,c[3]) weld(p5,p3,p5,-0.15,-0.2,0,0,0,0) qi{'BlockMesh',p5,Scale=v3(0.5,1,1)}
  2075. p6=pa(Weapon,"","Block",0.4,0.2,0.7,false,false,0,0,c[3]) weld(p6,hinge,p6,0,0,0.35,0,0,rd(-90)) qi{'BlockMesh',p6,Scale=v3(1,0.5,1)}
  2076. p7=pa(Weapon,"","Block",0.4,0.2,0.4,false,false,0,0,c[3]) weld(p7,p6,p7,0,0,0.55,rd(180),0,0) qi{'SpecialMesh',p7,Scale=v3(1,0.5,1),MeshType="Wedge"}
  2077. p8=pa(Weapon,"","Block",0.4,0.2,0.4,false,false,0,0,c[3]) weld(p8,p7,p8,0,-0.15,0,rd(180),0,0) qi{'SpecialMesh',p8,MeshType="Wedge"}
  2078. p9=pa(Weapon,"","Block",0.4,0.2,0.3,false,false,0,0,c[3]) weld(p9,p8,p9,0,0,0.35,0,0,0) qi{'BlockMesh',p9}
  2079. p10=pa(Weapon,"","Block",0.4,0.2,0.3,false,false,0,0,c[3]) weld(p10,p9,p10,0,0,0.3,0,rd(180),0) qi{'SpecialMesh',p10,MeshType="Wedge"}
  2080. p11=pa(Weapon,"","Block",0.4,0.2,0.3,false,false,0,0,c[3]) weld(p11,p10,p11,0,-0.2,0,0,0,0) qi{'BlockMesh',p11}
  2081. p12=pa(Weapon,"","Block",0.3,0.2,0.3,false,false,0,0,c[3]) weld(p12,p11,p12,0.35,0,0,0,rd(-90),0) qi{'SpecialMesh',p12,MeshType="Wedge"}
  2082. p13=pa(Weapon,"","Block",0.3,0.2,0.3,false,false,0,0,c[3]) weld(p13,p11,p13,-0.35,0,0,0,rd(90),0) qi{'SpecialMesh',p13,MeshType="Wedge"}
  2083. p14=pa(Weapon,"","Block",1.5,0.3,1.5,false,false,0,0,c[3]) weld(p14,p11,p14,0,-0.7,0,rd(90),0,0) qi{'CylinderMesh',p14}
  2084. p15=pa(Weapon,"","Block",1.3,0.2,1.3,false,false,0,0,c[2]) weld(p15,p14,p15,0,0.25,0,0,0,0) qi{'CylinderMesh',p15}
  2085. p16=pa(Weapon,"","Block",0.2,1.4,0.2,false,false,0,0,c[2]) piperw=weld(p16,p15,p16,0,0.7,0,0,rd(30),0) qi{'CylinderMesh',p16}
  2086. for i=0,360,360/6 do
  2087. p16p=pa(Weapon,"","Block",0.5,1.1,0.5,false,false,0,0,c[2]) p16pw=weld(p16p,p16,p16p,0,0,0,0,0,0) qi{'CylinderMesh',p16p} p16pw.C0=cn(0,-0.05,0)*ca(0,rd(i),0)*cn(0.4,0,0)
  2088. p16p=pa(Weapon,"","Block",0.3,0.2,0.3,false,false,0,0,c[5]) p16pw=weld(p16p,p16,p16p,0,0,0,0,0,0) qi{'CylinderMesh',p16p,Scale=v3(1,0.1,1)} p16pw.C0=cn(0,0.5,0)*ca(0,rd(i),0)*cn(0.4,0,0)
  2089. p16p=pa(Weapon,"","Block",0.2,0.2,0.2,false,false,0,0,c[2]) p16pw=weld(p16p,p16,p16p,0,0,0,0,0,0) qi{'CylinderMesh',p16p,Scale=v3(1,0.1,1)} p16pw.C0=cn(0,0.51,0)*ca(0,rd(i),0)*cn(0.4,0,0)
  2090. end
  2091. p17=pa(Weapon,"","Block",0.2,0.2,0.3,false,false,0,0,c[3]) weld(p17,p14,p17,0,0,0.75,rd(90),rd(180),0) qi{'SpecialMesh',p17,MeshType="Wedge",Scale=v3(1,1,1)}
  2092. p18=pa(Weapon,"","Block",0.2,0.2,1.5,false,false,0,0,c[3]) weld(p18,p17,p18,0,0.05,0.9,0,0,0) qi{'BlockMesh',p18,Scale=v3(1,0.5,1)}
  2093. p19=pa(Weapon,"","Block",0.2,0.2,0.2,false,false,0,0,c[3]) weld(p19,p18,p19,0,0.1,0,0,0,0) qi{'SpecialMesh',p19,Scale=v3(0.5,0.5,1),MeshType="Wedge"}
  2094. p20=pa(Weapon,"","Block",0.2,0.2,0.3,false,false,0,0,c[3]) weld(p20,p19,p20,0,0,0.25,0,0,0) qi{'BlockMesh',p20,Scale=v3(0.5,0.5,1)}
  2095. p21=pa(Weapon,"","Block",0.2,0.2,0.2,false,false,0,0,c[3]) weld(p21,p20,p21,0,0,0.175,0,rd(180),0) qi{'SpecialMesh',p21,Scale=v3(0.5,0.5,0.25),MeshType="Wedge"}
  2096. p22=pa(Weapon,"","Block",0.2,0.2,0.2,false,false,0,0,c[4]) weld(p22,p20,p22,0,0,0.05,0,0,rd(90)) qi{'CylinderMesh',p22,Scale=v3(0.25,0.51,0.25)}
  2097. p23=pa(Weapon,"","Block",0.75,0.8,0.75,false,false,0,0,c[2]) weld(p23,p14,p23,0,0.1,0.3,0,0,0) qi{'SpecialMesh',p23} -- start of barrel
  2098. p24=pa(Weapon,"","Block",0.6,1.8,0.6,false,false,0,0,c[2]) weld(p24,p23,p24,0,-0.9,0,0,0,0) qi{'CylinderMesh',p24}
  2099. p25=pa(Weapon,"","Block",0.4,0.2,0.4,false,false,0,0,c[6]) weld(p25,p24,p25,0,-0.9,0,0,0,0) qi{'CylinderMesh',p25,Scale=v3(1,0.1,1)}
  2100. p26=pa(Weapon,"","Block",0.65,0.2,0.65,false,false,0,0,c[3]) weld(p26,p24,p26,0,-0.4,0,0,0,0) qi{'CylinderMesh',p26,Scale=v3(1,1,1)}
  2101. p26=pa(Weapon,"","Block",0.6,0.4,0.8,false,false,0,0,c[1]) weld(p26,p24,p26,0,0.17,-0.4,rd(90),0,0)
  2102. p27=pa(Weapon,"","Block",0.6,0.4,0.4,false,false,0,0,c[1]) weld(p27,p26,p27,0,0,0.6,rd(180),0,0) qi{'SpecialMesh',p27,MeshType="Wedge"}
  2103. for i,v in pairs(Weapon:GetChildren()) do v.CanCollide=false end
  2104. end
  2105. WDesign({"Reddish brown","Really black","Dark stone grey","White","Medium stone grey","Really black"}) Arms(false) Legs(false)
  2106. BBD,BBT=0,{}
  2107. Dealt={20,40}
  2108. function Destroy(Directory,Part,Distance)
  2109. for i,v in pairs(Directory:GetChildren()) do
  2110. if v:IsA("BasePart") and not GetHum(v) and v.Parent.Name~=Tn and v.Parent.Name~=Suit.Name and v.Name~="Ignore" and v.Name~="Base" then
  2111. if (Part.Position-v.Position).magnitude<=Distance and v:GetMass()<=1000 then
  2112. v.Anchored=false
  2113. v:BreakJoints()
  2114. v.CFrame=cn(v.Position,Part.Position)*ca(0,rd(180),0)
  2115. v.Velocity=cn(Part.Position,v.Position).lookVector*50
  2116. end
  2117. elseif v:IsA("Model") or v:IsA("Script") or v:IsA("BasePart") and v.Name=="Base" then
  2118. Destroy(v,Part,Distance)
  2119. end
  2120. end
  2121. end
  2122. SplashDmg=function(Part,Distance)
  2123. q(function()
  2124. qi{"Explosion",workspace,Position=Part.Position,BlastPressure=0}
  2125. for i,v in pairs(workspace:GetChildren()) do
  2126. if v:FindFirstChild("Torso",true) then
  2127. local vTorso=v:FindFirstChild("Torso",true)
  2128. if (vTorso.Position-Part.Position).magnitude<=Distance then
  2129. local vHum=GetHum(vTorso)
  2130. if not vHum or BBD==0 or BBT[vHum.Parent] then return end
  2131. BBT[vHum.Parent]=1
  2132. if rn(1,20)==1 then
  2133. Dmg(vHum,rn(Dealt[1],Dealt[2])*3,true)
  2134. else
  2135. Dmg(vHum,rn(Dealt[1],Dealt[2]),false)
  2136. end
  2137. if BBD==2 and vTorso then
  2138. vHum.PlatformStand=true
  2139. if vHum.Jump then
  2140. AddBV(120,cn(Part.Position,vTorso.Position),vTorso,0.4)
  2141. else
  2142. AddBV(100,cn(Part.Position,vTorso.Position),vTorso,0.4)
  2143. end
  2144. if vTorso.Parent~=Char then
  2145. AddBAV(v3(rn(-50,50),rn(-50,50),rn(-50,50)),vTorso,0.4)
  2146. end
  2147. q(function()
  2148. wait(0.6)
  2149. vHum.PlatformStand=false
  2150. end)
  2151. end
  2152. so(ids.Hit,vTorso,1,1)
  2153. BBT[vHum.Parent]=nil
  2154. end
  2155. end
  2156. end
  2157. end)
  2158. end
  2159. Fire = function(speed,sc,cff,dest)
  2160. q(function()
  2161. local bb = pa(workspace,"bullet","Block",0.4*sc,0.6*sc,0.4*sc,false,true,0,0,"Bright red") bb.CanCollide=false qi{"CylinderMesh",bb}
  2162. local pp0 = pa(bb,"bullet","Block",0.2*sc,0.2*sc,0.2*sc,false,true,0,0,"Bright red") pp0.CanCollide=false qi{"SpecialMesh",pp0,MeshType="Sphere",Scale=v3(2,2,2)}
  2163. local pp1 = pa(bb,"bullet","Block",0.2*sc,0.2*sc,0.2*sc,false,true,0,0,"Really black") pp1.CanCollide=false qi{"CylinderMesh",pp1,Scale=v3(2.02,0.25,2.02)}
  2164. local pp2 = pa(bb,"bullet","Block",0.2*sc,0.2*sc,0.2*sc,false,true,0,0,"Really black") pp2.CanCollide=false qi{"CylinderMesh",pp2,Scale=v3(2.02,2,2.02)}
  2165. bb.CFrame = cn(cff.p,dest)*ca(rd(-90),0,0)
  2166. local m=pa(Weapon,"muzzle","Block",1,1,1,false,false,0,0,"Bright orange") qi{"SpecialMesh",m,MeshId=ids.Crown,Scale=v3(0.5,0.5,0.5)} weld(m,p25,m,0,-0.6,0.05,rd(180),0,0) fade(m,0.2)
  2167. local m=pa(Weapon,"muzzle","Block",1,1,1,false,false,0,0,"Bright orange") qi{"SpecialMesh",m,MeshId=ids.Crown2,Scale=v3(0.4,0.7,0.4)} weld(m,p25,m,0,-0.8,0,rd(180),0,0) fade(m,0.2)
  2168. for i=1,100 do
  2169. bhit,bpos=ray(bb.Position,bb.Position - (bb.CFrame *cn(0,-2,0)).p)
  2170. bhit2,bpos2=ray(pp0.Position,pp0.Position - (pp0.CFrame *cn(0,-2,0)).p)
  2171. bhit3,bpos3=ray(pp1.Position,bb.Position - (pp1.CFrame *cn(0,-2,0)).p)
  2172. bhit4,bpos4=ray(pp2.Position,pp0.Position - (pp2.CFrame *cn(0,-2,0)).p)
  2173. if bhit and bhit.Name ~= "bullet" and bhit.Name ~= "bullethole" and bhit.Name~="muzzle" and bpos and (bpos - bb.Position).magnitude < speed then break end
  2174. if bhit2 and bhit2.Name ~= "bullet" and bhit2.Name ~= "bullethole" and bhit2.Name~="muzzle" and bpos2 and (bpos2 - bb.Position).magnitude < speed then break end
  2175. if bhit3 and bhit3.Name ~= "bullet" and bhit3.Name ~= "bullethole" and bhit3.Name~="muzzle" and bpos3 and (bpos3 - bb.Position).magnitude < speed then break end
  2176. if bhit4 and bhit4.Name ~= "bullet" and bhit4.Name ~= "bullethole" and bhit4.Name~="muzzle" and bpos4 and (bpos4 - bb.Position).magnitude < speed then break end
  2177. bb.CFrame=bb.CFrame*cn(0,speed,0)*ca(rd(-0.3),0,0)
  2178. pp0.CFrame=bb.CFrame*cn(0,0.3,0)
  2179. pp1.CFrame=bb.CFrame*cn(0,-0.3,0)
  2180. pp2.CFrame=bb.CFrame*cn(0,0.1,0)
  2181. wait()
  2182. end
  2183. GlowMesh(false,"sphere",Weapon,v3(3,3,3),"Bright red",cn(bpos),0.25,1,0.05)
  2184. BBD=2
  2185. sopart=pa(workspace,"bullet","Block",0,0,0,true,true,1,0)
  2186. bb.CFrame=bb.CFrame*cn(0,(bpos-bb.Position).magnitude,0)
  2187. pp0.CFrame=bb.CFrame*cn(0,0.3,0)
  2188. pp1.CFrame=bb.CFrame*cn(0,-0.3,0)
  2189. pp2.CFrame=bb.CFrame*cn(0,0.1,0)
  2190. sopart.CFrame=bb.CFrame
  2191. so(ids.Explode,sopart,1,0.4)
  2192. SplashDmg(bb,11)
  2193. Destroy(workspace,bb,13)
  2194. BBD=0
  2195. deb:AddItem(bb,1)
  2196. deb:AddItem(sopart,1)
  2197. end)
  2198. end
  2199. function Stance(speed)
  2200. c2(ra,speed,3,1.25,0.5,-0.25,-75,-65,0)
  2201. c2(la,speed,3,-1.25,0.5,-0.25,-70,-20,0)
  2202. c2(ll,speed,3,-0.5,-1,0,0,0,0)
  2203. c2(rl,speed,3,0.5,-1,0,0,0,0)
  2204. c2(hw,speed,3,0,1.5,0,0,-65,0)
  2205. c2(tw,speed,3,0,0,0,0,65,0)
  2206. c2(neck,speed,3,0,1.5,0,0,0,0)
  2207. c2(hingew,speed,3,0,0,0,0,0,0)
  2208. c2(piperw,speed,3,0,0.7,0,0,30+PipeRotate,0)
  2209. Ani(haw,0,0.5,0,-75,0,0,0,speed/2,1)
  2210. end
  2211. function Reset(speed)
  2212. c2(ra,speed,3,1.5,0.5,0,0,0,0)
  2213. c2(la,speed,3,-1.5,0.5,0,0,0,0)
  2214. c2(ll,speed,3,-0.5,-1,0,0,0,0)
  2215. c2(rl,speed,3,0.5,-1,0,0,0,0)
  2216. c2(hw,speed,3,0,1.5,0,0,0,0)
  2217. c2(tw,speed,3,0,0,0,0,0,0)
  2218. c2(neck,speed,3,0,1.5,0,0,0,0)
  2219. c2(piperw,speed,3,0,0.7,0,0,30+PipeRotate,0)
  2220. c2(hingew,speed,3,0,0,0,0,0,0)
  2221. Ani(haw,0.5,2.5,1,270,0,90,0,speed,1)
  2222. end
  2223. function Button1Down()
  2224. if Clip>0 and anim=="" and (tick()-LastShot)>=0.6 then
  2225. LastShot=tick()
  2226. so(ids.Shoot,ha,1,1)
  2227. Fire(3,1,p25.CFrame*cn(0,-1,0),fmouse.Hit.p)
  2228. Clip=Clip-1
  2229. PipeRotate=PipeRotate+60
  2230. c2(piperw,0.4,3,0,0.7,0,0,30+PipeRotate,0)
  2231. elseif Clip==0 and anim=="" and (tick()-LastShot)>=0.6 then
  2232. anim="Reloading"
  2233. c2(ra,0.1,3,1.25,0.5,-0.25,-75,-65,0)
  2234. c2(la,0.1,3,-1.25,0.5,-0.25,-70,-20,0)
  2235. c2(hw,0.1,3,0,1.5,0,0,-65,0)
  2236. c1(hingew,0.15,3,0,0,0,0,-90,0)
  2237. for i=1,6 do
  2238. PipeRotate=PipeRotate+60
  2239. c1(la,0.13,3,-1.25,0.25,0.1,15,0,-15)
  2240. local pipe=pa(Weapon,"","Block",0.4,0.7,0.4,false,false,0,0,"Bright red") weld(pipe,LA,pipe,0,-1.1,0,rd(-90),0,0) qi{"CylinderMesh",pipe}
  2241. local pp=pa(pipe,"","Block",0.4,0.4,0.4,false,false,0,0,"Bright red") weld(pp,pipe,pp,0,-0.35,0,0,0,0) qi{"SpecialMesh",pp,MeshType="Sphere"}
  2242. local pp=pa(pipe,"","Block",0.41,0.2,0.41,false,false,0,0,"Really black") weld(pp,pipe,pp,0,0.35,0,0,0,0) qi{"CylinderMesh",pp,Scale=v3(1,0.25,1)}
  2243. local pp=pa(pipe,"","Block",0.41,0.5,0.41,false,false,0,0,"Really black") weld(pp,pipe,pp,0,0,0,0,0,0) qi{"CylinderMesh",pp}
  2244. c1(la,0.16,3,-1.25,0.4,-0.1,-100,0,-15)
  2245. c1(la,0.2,3,-1.25,0.3,-0.25,-40,0,-15)
  2246. so(ids.Reload,ha,1,1)
  2247. c1(piperw,0.4,3,0,0.7,0,0,30+PipeRotate,0)
  2248. Clip=i
  2249. deb:AddItem(pipe,0.05)
  2250. end
  2251. Stance(0.15)
  2252. anim=""
  2253. end
  2254. end
  2255. function KeyDown(key)
  2256. key=key:lower()
  2257. keys[key]=true
  2258. if key=="r" and anim=="" and equip=="equipped" and Clip==0 then
  2259. anim="Reloading"
  2260. c2(ra,0.1,3,1.25,0.5,-0.25,-75,-65,0)
  2261. c2(la,0.1,3,-1.25,0.5,-0.25,-70,-20,0)
  2262. c2(hw,0.1,3,0,1.5,0,0,-65,0)
  2263. c1(hingew,0.15,3,0,0,0,0,-90,0)
  2264. for i=1,6 do
  2265. PipeRotate=PipeRotate+60
  2266. c1(la,0.13,3,-1.25,0.25,0.1,15,0,-15)
  2267. local pipe=pa(Weapon,"","Block",0.4,0.7,0.4,false,false,0,0,"Bright red") weld(pipe,LA,pipe,0,-1.1,0,rd(-90),0,0) qi{"CylinderMesh",pipe}
  2268. local pp=pa(pipe,"","Block",0.4,0.4,0.4,false,false,0,0,"Bright red") weld(pp,pipe,pp,0,-0.35,0,0,0,0) qi{"SpecialMesh",pp,MeshType="Sphere"}
  2269. local pp=pa(pipe,"","Block",0.41,0.2,0.41,false,false,0,0,"Really black") weld(pp,pipe,pp,0,0.35,0,0,0,0) qi{"CylinderMesh",pp,Scale=v3(1,0.25,1)}
  2270. local pp=pa(pipe,"","Block",0.41,0.5,0.41,false,false,0,0,"Really black") weld(pp,pipe,pp,0,0,0,0,0,0) qi{"CylinderMesh",pp}
  2271. c1(la,0.16,3,-1.25,0.4,-0.1,-100,0,-15)
  2272. c1(la,0.2,3,-1.25,0.3,-0.25,-40,0,-15)
  2273. so(ids.Reload,ha,1,1)
  2274. c1(piperw,0.4,3,0,0.7,0,0,30+PipeRotate,0)
  2275. Clip=i
  2276. deb:AddItem(pipe,0.05)
  2277. end
  2278. Stance(0.15)
  2279. anim=""
  2280. end
  2281. end
  2282. Tool.Selected:connect(function(mouse)
  2283. fmouse=mouse
  2284. if equip=="unequipped" and anim=="" then
  2285. equip="equipping" Arms(true) c2(la,0.1,3,-1.5,0.5,0,0,0,20) c1(ra,0.1,3,1.5,0.5,0,120,0,-70)
  2286. local ofs = RA.CFrame:toObjectSpace(ha.CFrame)
  2287. haw.Part0=RA haw.C0=ofs haw.C1=cn(0,0,0) rAni(haw)
  2288. Stance(0.2) equip="equipped"
  2289. end
  2290. mouse.Button1Down:connect(Button1Down)
  2291. mouse.KeyDown:connect(KeyDown)
  2292. end)
  2293. Tool.Deselected:connect(function()
  2294. fmouse=nil
  2295. if equip=="equipped" and anim=="" then
  2296. equip="unequipping" c2(la,0.1,3,-1.5,0.5,0,0,0,0) c1(ra,0.1,3,1.5,0.5,0,120,0,-70)
  2297. local ofs = Torso.CFrame:toObjectSpace(ha.CFrame)
  2298. haw.Part0=Torso haw.C0=ofs haw.C1=cn(0,0,0) rAni(haw)
  2299. Reset(0.1)
  2300. Arms(false) Legs(false) equip="unequipped"
  2301. end
  2302. end)
  2303. Gyro=qi{"BodyGyro",Torso,D=50,P=1500}
  2304. game:GetService("RunService").Stepped:connect(function()
  2305. if fmouse~=nil then
  2306. Gyro.maxTorque=v3(1/0,1/0,1/0)
  2307. Gyro.cframe = cn(Torso.Position,v3(fmouse.hit.p.x,Torso.Position.y,fmouse.hit.p.z))
  2308. else
  2309. Gyro.maxTorque = v3(0,0,0)
  2310. end
  2311. if equip=="equipped" and anim=="" and fmouse~=nil then
  2312. c2(ra,1,3,1.25,0.5,-0.25,-75+math.deg((Torso.Position-fmouse.Hit.p).unit.y),-65,0)
  2313. c2(la,1,3,-1.25,0.5,-0.25,-70+math.deg((Torso.Position-fmouse.Hit.p).unit.y),-20,0)
  2314. c2(hw,1,3,0,1.5,0,math.deg((Torso.Position-fmouse.Hit.p).unit.y),-65,0)
  2315. end
  2316. end)
Add Comment
Please, Sign In to add comment