Advertisement
Submiter55

sba

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