Advertisement
Guest User

Untitled

a guest
Sep 29th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 26.99 KB | None | 0 0
  1. script.Parent = nil
  2.  
  3.  
  4.  
  5.  
  6. it = Instance.new
  7.  
  8.  
  9. v3=Vector3.new
  10.  
  11.  
  12. bc=BrickColor.new
  13.  
  14.  
  15. c3=Color3.new
  16.  
  17.  
  18. cn=CFrame.new
  19.  
  20.  
  21. ca=CFrame.Angles
  22.  
  23.  
  24. ca2=function(a,b,c)
  25.  
  26.  
  27. return ca(math.rad(a),math.rad(b),math.rad(c))
  28.  
  29.  
  30. end
  31.  
  32.  
  33. ti=table.insert
  34.  
  35.  
  36. tr=table.remove
  37.  
  38.  
  39. rn=math.random
  40.  
  41.  
  42. rd=math.rad
  43.  
  44.  
  45. mf=math.floor
  46.  
  47.  
  48. ud = UDim2.new
  49.  
  50.  
  51. inf=math.huge
  52.  
  53.  
  54. dg=math.deg
  55.  
  56.  
  57. mdeg=math.deg
  58.  
  59.  
  60. v310=v3(1/0,1/0,1/0)
  61.  
  62.  
  63. pi=math.pi
  64.  
  65.  
  66. w=wait
  67.  
  68.  
  69. cf=cn
  70.  
  71.  
  72. bn=bc
  73.  
  74.  
  75. ts=tostring
  76.  
  77.  
  78.  
  79.  
  80. Workspace=game:GetService("Workspace")
  81.  
  82.  
  83. Players=game:GetService("Players")
  84.  
  85.  
  86. Player=Players.LocalPlayer
  87.  
  88.  
  89. 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. fp.Material = "SmoothPlastic"
  216.  
  217. fp.TopSurface = "SmoothNoOutlines"
  218.  
  219. fp.BottomSurface = "SmoothNoOutlines"
  220.  
  221. fp.RightSurface = "SmoothNoOutlines"
  222.  
  223. fp.LeftSurface = "SmoothNoOutlines"
  224.  
  225. fp.BackSurface = "SmoothNoOutlines"
  226.  
  227. fp.FrontSurface = "SmoothNoOutlines"
  228.  
  229.  
  230. fp.Shape=sh or "Block"
  231.  
  232.  
  233. fp.formFactor="Custom"
  234.  
  235.  
  236. elseif sh == "Wedge" then
  237.  
  238.  
  239. fp=it("WedgePart",pa)
  240.  
  241.  
  242. fp.formFactor="Custom"
  243.  
  244.  
  245. elseif sh == "CornerWedge" then
  246.  
  247.  
  248. fp=it("CornerWedgePart",pa)
  249.  
  250.  
  251. elseif sh == "VehicleSeat" then
  252.  
  253.  
  254. fp=it("VehicleSeat",pa)
  255.  
  256.  
  257. elseif sh == "Seat" then
  258.  
  259.  
  260. fp=it("Seat",pa)
  261.  
  262.  
  263. end
  264.  
  265.  
  266. fp.Size=v3(x or 4,y or 2,z or 2)
  267.  
  268.  
  269. fp.Friction = 2
  270.  
  271.  
  272. fp.CanCollide=c or true
  273.  
  274.  
  275. fp.Anchored=a or false
  276.  
  277.  
  278. fp.BrickColor=bc(bc2 or "")
  279.  
  280.  
  281. fp.Transparency=tr or 0
  282.  
  283.  
  284. fp.Reflectance=re or 0
  285.  
  286.  
  287. fp.BottomSurface=0
  288.  
  289.  
  290. fp.Name=pn or "TBLib Part"
  291.  
  292.  
  293. fp.Locked = true
  294.  
  295.  
  296. fp.TopSurface=0
  297.  
  298.  
  299. fp.CFrame=cn(0,0,0)
  300.  
  301.  
  302. fp:BreakJoints()
  303.  
  304.  
  305. fp.Anchored = a
  306.  
  307.  
  308. return fp
  309.  
  310.  
  311. end
  312.  
  313.  
  314.  
  315.  
  316. function ClearClass(Object,Class)
  317.  
  318.  
  319. for _,v in pairs(Object:GetChildren()) do
  320.  
  321.  
  322. if v:IsA(Class) then
  323.  
  324.  
  325. v:Destroy()
  326.  
  327.  
  328. end
  329.  
  330.  
  331. end
  332.  
  333.  
  334. end
  335.  
  336.  
  337.  
  338.  
  339. function GetClass(Object,Class)
  340.  
  341.  
  342. for _,v in pairs(Object:GetChildren()) do
  343.  
  344.  
  345. if v:IsA(Class) then
  346.  
  347.  
  348. return v
  349.  
  350.  
  351. end
  352.  
  353.  
  354. end
  355.  
  356.  
  357. end
  358.  
  359.  
  360.  
  361.  
  362. function re(par,obj)
  363.  
  364.  
  365. if par:findFirstChild(obj) then
  366.  
  367.  
  368. par[obj]:Remove''
  369.  
  370.  
  371. end
  372.  
  373.  
  374. end
  375.  
  376.  
  377.  
  378.  
  379. function invis(o)
  380.  
  381.  
  382. for i,v in pairs(o:children()) do
  383.  
  384.  
  385. if v:IsA("BasePart") then
  386.  
  387.  
  388. v.Transparency=1
  389.  
  390.  
  391. end
  392.  
  393.  
  394. invis(v)
  395.  
  396.  
  397. end
  398.  
  399.  
  400. end
  401.  
  402.  
  403.  
  404.  
  405. function newhats(p,o,o2)
  406.  
  407.  
  408. for i,v in pairs(p:children()) do
  409.  
  410.  
  411. if v:IsA("Hat") then
  412.  
  413.  
  414. local np=v.Handle:Clone''
  415.  
  416.  
  417. np.Transparency=0
  418.  
  419.  
  420. np.Mesh.Scale=np.Mesh.Scale*1.04
  421.  
  422.  
  423. np.Parent=o
  424.  
  425.  
  426. np.CFrame=v.Handle.CFrame
  427.  
  428.  
  429. np.Name="Hat"
  430.  
  431.  
  432. stick2(np,o2,o)
  433.  
  434.  
  435. end
  436.  
  437.  
  438. end
  439.  
  440.  
  441. end
  442.  
  443.  
  444.  
  445.  
  446. fade = function(prt,incr)
  447.  
  448.  
  449. q(function()
  450.  
  451.  
  452. for i=prt.Transparency,1,incr do
  453.  
  454.  
  455. prt.Transparency=i
  456.  
  457.  
  458. wait()
  459.  
  460.  
  461. end
  462.  
  463.  
  464. prt:Remove''
  465.  
  466.  
  467. end)
  468.  
  469.  
  470. end
  471.  
  472.  
  473.  
  474.  
  475.  
  476. function weld(pa,p0,p1,x,y,z,a,b,c)
  477.  
  478.  
  479. local fw=it("Weld",pa)
  480.  
  481.  
  482. fw.Part0=p0
  483.  
  484.  
  485. fw.Part1=p1
  486.  
  487.  
  488. fw.C0=cn(x,y,z)*ca(a,b,c)
  489.  
  490.  
  491. return fw
  492.  
  493.  
  494. end
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501. stick = function(hit2,hit)
  502.  
  503.  
  504. return qi({"Weld",hit2,Part0=hit2,Part1=hit,C0=hit2.CFrame:inverse()*cn(hit2.Position),C1=hit.CFrame:inverse()*cn(hit2.Position)})
  505.  
  506.  
  507. end
  508.  
  509.  
  510.  
  511.  
  512. function stick2(hit2,hit,tostick)
  513.  
  514.  
  515. local weld=it("Weld")
  516.  
  517.  
  518. weld.Part0=tostick
  519.  
  520.  
  521. weld.Part1=hit2
  522.  
  523.  
  524. local HitPos=hit.Position
  525.  
  526.  
  527. local CJ=cn(HitPos)
  528.  
  529.  
  530. local C0=hit2.CFrame:inverse() *CJ
  531.  
  532.  
  533. local C1=hit.CFrame:inverse() * CJ weld.C0=C1
  534.  
  535.  
  536. weld.C1=C0
  537.  
  538.  
  539. weld.Parent=hit2
  540.  
  541.  
  542. end
  543.  
  544.  
  545.  
  546.  
  547. ray = function(Pos, Dir,tab)
  548.  
  549.  
  550. return workspace:FindPartOnRay(Ray.new(Pos, Dir.unit *999),tab)
  551.  
  552.  
  553. end
  554.  
  555.  
  556.  
  557.  
  558.  
  559. function rtab(tabz,obj)
  560.  
  561.  
  562. for i=1,#tabz do
  563.  
  564.  
  565. if tabz[i] == obj then
  566.  
  567.  
  568. tr(tabz,i)
  569.  
  570.  
  571. break
  572.  
  573.  
  574. end
  575.  
  576.  
  577. end
  578.  
  579.  
  580. end
  581.  
  582.  
  583.  
  584.  
  585. sTrail={}
  586.  
  587.  
  588. function Trail2(lopz,ob,waitz,col,thickz,ofz) cw(function() ti(sTrail,ob)
  589.  
  590.  
  591. local oldpos=(ob.CFrame *ofz).p local lopz2=0
  592.  
  593.  
  594. local function loltr() local obp=(ob.CFrame *ofz).p lopz2=lopz2 + 1
  595.  
  596.  
  597. local mag=(oldpos - obp).magnitude
  598.  
  599.  
  600. local tr=pa(ob,"trail","Block",0,0,0,false,false,0.5,0.15,col) tr.Anchored=true
  601.  
  602.  
  603. tr.CFrame=cn(oldpos,obp)
  604.  
  605.  
  606. tr.CFrame=tr.CFrame + tr.CFrame.lookVector* (mag/2)
  607.  
  608.  
  609. local trm=it("CylinderMesh",tr) trm.Scale=v3(5*thickz,mag*5,5*thickz)
  610.  
  611.  
  612. cw(function() for i=5*thickz,0,-5*thickz/10 do trm.Scale=v3(i,mag*5,i) w() end tr:Remove'' end)
  613.  
  614.  
  615. tr.CFrame=tr.CFrame *ca(rd(90),0,0) oldpos=obp end
  616.  
  617.  
  618. repeat loltr()
  619.  
  620.  
  621. wait(waitz) until ft(sTrail,ob) == nil or lopz2 == lopz loltr() end) end
  622.  
  623.  
  624.  
  625.  
  626. Trail = function(ob,times,waitz,col,thickz,ofz) -- Brick Trail
  627.  
  628.  
  629. q(function()
  630.  
  631.  
  632. local oldpos=(ob.CFrame *ofz).p
  633.  
  634.  
  635. for i=1,times do
  636.  
  637.  
  638. if effon==true then
  639.  
  640.  
  641. local obp=(ob.CFrame *ofz).p
  642.  
  643.  
  644. local mag=(oldpos - obp).magnitude
  645.  
  646.  
  647. local tr=pa(ob,"trail","Block",0,0,0,false,false,0.5,0.15,col)
  648.  
  649.  
  650. tr.Anchored=true
  651.  
  652.  
  653. tr.CFrame=cn(oldpos,obp)
  654.  
  655.  
  656. tr.CFrame=tr.CFrame + tr.CFrame.lookVector* (mag/2)
  657.  
  658.  
  659. trm=it("CylinderMesh",tr)
  660.  
  661.  
  662. trm.Scale=v3(thickz,mag*5,thickz)
  663.  
  664.  
  665. q(function()
  666.  
  667.  
  668. for i=thickz,0,thickz/10 do
  669.  
  670.  
  671. trm.Scale=v3(i,mag*5,i)
  672.  
  673.  
  674. wait()
  675.  
  676.  
  677. end
  678.  
  679.  
  680. tr:Remove''
  681.  
  682.  
  683. end)
  684.  
  685.  
  686. tr.CFrame=tr.CFrame *ca(rd(90),0,0)
  687.  
  688.  
  689. oldpos=obp wait(waitz)
  690.  
  691.  
  692. end
  693.  
  694.  
  695. end
  696.  
  697.  
  698. end)
  699.  
  700.  
  701. end
  702.  
  703.  
  704.  
  705.  
  706. de = function(it,ti) game:service'Debris':AddItem(it,ti) end -- Debris
  707.  
  708.  
  709.  
  710.  
  711. GlowMesh = function(anch,meshid2,rootz,mv3,colzz,adjus,l1,l2,l3) q(function() -- Glowmesh
  712.  
  713.  
  714. 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
  715.  
  716.  
  717. 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
  718.  
  719.  
  720. for i=l1,l2,l3 do spi.Transparency=i spim.Scale=mv3*(i+0.3) wait() end spi:Remove'' end)
  721.  
  722.  
  723. end
  724.  
  725.  
  726.  
  727.  
  728. DetectSurface = function(pos, part) -- Surface Detector
  729.  
  730.  
  731. local surface = nil local pospos = part.CFrame
  732.  
  733.  
  734. local pos2 = pospos:pointToObjectSpace(pos) local siz = part.Size local shaep = part.Shape
  735.  
  736.  
  737. if shaep == Enum.PartType.Ball or shaep == Enum.PartType.Cylinder then
  738.  
  739.  
  740. surface = {"Anything", cn(pospos.p, pos)*cn(0, 0, -(pospos.p - pos).magnitude+0.12)*ca(rd(-90), 0, 0)}
  741.  
  742.  
  743. else if pos2.Y > ((siz.Y/2)-0.01) then surface = {"Top", ca(0, 0, 0)}
  744.  
  745.  
  746. 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))}
  747.  
  748.  
  749. 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
  750.  
  751.  
  752.  
  753.  
  754. BulletHole = function(HitPos,HitObj,sc,img,par) -- Bullethole function
  755.  
  756.  
  757. local Surface = DetectSurface(HitPos, HitObj)
  758.  
  759.  
  760. local C = cn(HitPos) * ca(HitObj.CFrame:toEulerAnglesXYZ()) * Surface[2]
  761.  
  762.  
  763. if Surface[1] == "Anything" then C = Surface[2] end local theimg = img or ds.BulletHole
  764.  
  765.  
  766. local bl = pa(workspace or par,"bullethole","Block",sc,0,sc,false,true,1,0,"") qi({"Decal",bl,Face="Top",Texture=theimg})
  767.  
  768.  
  769. 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)
  770.  
  771.  
  772. end
  773.  
  774.  
  775.  
  776.  
  777. so = function(id,par,vol,pit) q(function() -- Sound maker
  778.  
  779.  
  780. local sou = qi({"Sound",par or workspace,Volume=vol,Pitch=pit or 1,SoundId=id})
  781.  
  782.  
  783. wait() sou:play() wait(6) sou:Remove() end) end
  784.  
  785.  
  786.  
  787.  
  788. -- local/so(asset..ds.GothicMusic,workspace,1,2.6)
  789.  
  790.  
  791.  
  792.  
  793. function GetRegion(p0,p1,f,f2) q(function()
  794.  
  795.  
  796. 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
  797.  
  798.  
  799. end) end
  800.  
  801.  
  802.  
  803.  
  804.  
  805. FindGround = function(pos) -- ground finder
  806.  
  807.  
  808. local ax,ay,az = pos:toEulerAnglesXYZ()
  809.  
  810.  
  811. local bhit,bpos=ray(pos.p,pos.p - (pos.p + v3(0,200,0)))
  812.  
  813.  
  814. if bhit and bpos then
  815.  
  816.  
  817. return cn(bpos)*ca(ax,ay,az)
  818.  
  819.  
  820. end
  821.  
  822.  
  823. return nil
  824.  
  825.  
  826. end
  827.  
  828.  
  829.  
  830.  
  831. function NPC(Name, Position) -- npc maker
  832.  
  833.  
  834. local Character = Instance.new("Model")
  835.  
  836.  
  837. Character.Name = Name
  838.  
  839.  
  840. local Humanoid = Instance.new("Humanoid")
  841.  
  842.  
  843. Humanoid.Parent = Character
  844.  
  845.  
  846. local Template = Instance.new("Part")
  847.  
  848.  
  849. Template.FormFactor = "Custom"
  850.  
  851.  
  852. Template.Size = Vector3.new(1, 2, 1)
  853.  
  854.  
  855. Template.Locked = true
  856.  
  857.  
  858. local Head = Template:Clone()
  859.  
  860.  
  861. Head.Name = "Head"
  862.  
  863.  
  864. Head.TopSurface = "Smooth"
  865.  
  866.  
  867. Head.BottomSurface = "Smooth"
  868.  
  869.  
  870. Head.Size = Vector3.new(2, 1, 1)
  871.  
  872.  
  873. Head.Parent = Character
  874.  
  875.  
  876. local Mesh = Instance.new("SpecialMesh")
  877.  
  878.  
  879. Mesh.MeshType = "Head"
  880.  
  881.  
  882. Mesh.Scale = Vector3.new(1.25, 1.25, 1.25)
  883.  
  884.  
  885. Mesh.Parent = Head
  886.  
  887.  
  888. local Face = Instance.new("Decal")
  889.  
  890.  
  891. Face.Name = "face"
  892.  
  893.  
  894. Face.Texture = "rbxasset://textures/face.png"
  895.  
  896.  
  897. Face.Parent = Head
  898.  
  899.  
  900. local Torso = Template:Clone()
  901.  
  902.  
  903. Torso.Name = "Torso"
  904.  
  905.  
  906. Torso.LeftSurface = "Weld"
  907.  
  908.  
  909. Torso.RightSurface = "Weld"
  910.  
  911.  
  912. Torso.CFrame = CFrame.new(0, 10000, 0)
  913.  
  914.  
  915. Torso.Size = Vector3.new(2, 2, 1)
  916.  
  917.  
  918. Torso.Parent = Character
  919.  
  920.  
  921. local TShirt = Instance.new("Decal")
  922.  
  923.  
  924. TShirt.Name = "roblox"
  925.  
  926.  
  927. TShirt.Parent = Torso
  928.  
  929.  
  930. local LeftArm = Template:Clone()
  931.  
  932.  
  933. LeftArm.Name = "Left Arm"
  934.  
  935.  
  936. LeftArm.Parent = Character
  937.  
  938.  
  939. local RightArm = Template:Clone()
  940.  
  941.  
  942. RightArm.Name = "Right Arm"
  943.  
  944.  
  945. RightArm.Parent = Character
  946.  
  947.  
  948. local LeftLeg = Template:Clone()
  949.  
  950.  
  951. LeftLeg.Name = "Left Leg"
  952.  
  953.  
  954. LeftLeg.Parent = Character
  955.  
  956.  
  957. local RightLeg = Template:Clone()
  958.  
  959.  
  960. RightLeg.Name = "Right Leg"
  961.  
  962.  
  963. RightLeg.Parent = Character
  964.  
  965.  
  966. Character:BreakJoints()
  967.  
  968.  
  969. local Neck = Instance.new("Weld")
  970.  
  971.  
  972. Neck.Name = "Neck"
  973.  
  974.  
  975. Neck.Part0 = Torso
  976.  
  977.  
  978. Neck.Part1 = Head
  979.  
  980.  
  981. Neck.C0 = CFrame.new(0, 1.5, 0)
  982.  
  983.  
  984. Neck.Parent = Torso
  985.  
  986.  
  987. local LeftShoulder = Instance.new("Motor")
  988.  
  989.  
  990. LeftShoulder.Name = "Left Shoulder"
  991.  
  992.  
  993. LeftShoulder.Part0 = Torso
  994.  
  995.  
  996. LeftShoulder.Part1 = LeftArm
  997.  
  998.  
  999. LeftShoulder.MaxVelocity = 0.1
  1000.  
  1001.  
  1002. LeftShoulder.C0 = CFrame.new(-Torso.Size.x / 2 - RightArm.Size.x / 2, LeftArm.Size.y / 4, 0) * CFrame.fromEulerAnglesXYZ(0, -math.pi / 2, 0)
  1003.  
  1004.  
  1005. LeftShoulder.C1 = CFrame.new(0, LeftArm.Size.y / 4, 0) * CFrame.fromEulerAnglesXYZ(0, -math.pi / 2, 0)
  1006.  
  1007.  
  1008. LeftShoulder.Parent = Torso
  1009.  
  1010.  
  1011. local RightShoulder = Instance.new("Motor")
  1012.  
  1013.  
  1014. RightShoulder.Name = "Right Shoulder"
  1015.  
  1016.  
  1017. RightShoulder.Part0 = Torso
  1018.  
  1019.  
  1020. RightShoulder.Part1 = RightArm
  1021.  
  1022.  
  1023. RightShoulder.MaxVelocity = 0.1
  1024.  
  1025.  
  1026. RightShoulder.C0 = CFrame.new(Torso.Size.x / 2 + RightArm.Size.x / 2, RightArm.Size.y / 4, 0) * CFrame.fromEulerAnglesXYZ(0, math.pi / 2, 0)
  1027.  
  1028.  
  1029. RightShoulder.C1 = CFrame.new(0, RightArm.Size.y / 4, 0) * CFrame.fromEulerAnglesXYZ(0, math.pi / 2, 0)
  1030.  
  1031.  
  1032. RightShoulder.Parent = Torso
  1033.  
  1034.  
  1035. local LeftHip = Instance.new("Motor")
  1036.  
  1037.  
  1038. LeftHip.Name = "Left Hip"
  1039.  
  1040.  
  1041. LeftHip.Part0 = Torso
  1042.  
  1043.  
  1044. LeftHip.Part1 = LeftLeg
  1045.  
  1046.  
  1047. LeftHip.MaxVelocity = 0.1
  1048.  
  1049.  
  1050. LeftHip.C0 = CFrame.new(-LeftLeg.Size.x / 2, -LeftLeg.Size.y / 2, 0) * CFrame.fromEulerAnglesXYZ(0, -math.pi / 2, 0)
  1051.  
  1052.  
  1053. LeftHip.C1 = CFrame.new(0, LeftLeg.Size.y / 2, 0) * CFrame.fromEulerAnglesXYZ(0, -math.pi / 2, 0)
  1054.  
  1055.  
  1056. LeftHip.Parent = Torso
  1057.  
  1058.  
  1059. local RightHip = Instance.new("Motor")
  1060.  
  1061.  
  1062. RightHip.Name = "Right Hip"
  1063.  
  1064.  
  1065. RightHip.Part0 = Torso
  1066.  
  1067.  
  1068. RightHip.Part1 = RightLeg
  1069.  
  1070.  
  1071. RightHip.MaxVelocity = 0.1
  1072.  
  1073.  
  1074. RightHip.C0 = CFrame.new(RightLeg.Size.x / 2, -RightLeg.Size.y / 2, 0) * CFrame.fromEulerAnglesXYZ(0, math.pi / 2, 0)
  1075.  
  1076.  
  1077. RightHip.C1 = CFrame.new(0, RightLeg.Size.y / 2, 0) * CFrame.fromEulerAnglesXYZ(0, math.pi / 2, 0)
  1078.  
  1079.  
  1080. RightHip.Parent = Torso
  1081.  
  1082.  
  1083. local BodyColors = Instance.new("BodyColors")
  1084.  
  1085.  
  1086. BodyColors.LeftArmColor = BrickColor.new("Bright yellow")
  1087.  
  1088.  
  1089. BodyColors.RightArmColor = BrickColor.new("Bright yellow")
  1090.  
  1091.  
  1092. BodyColors.LeftLegColor = BrickColor.new("Br. yellowish green")
  1093.  
  1094.  
  1095. BodyColors.RightLegColor = BrickColor.new("Br. yellowish green")
  1096.  
  1097.  
  1098. BodyColors.HeadColor = BrickColor.new("Bright yellow")
  1099.  
  1100.  
  1101. BodyColors.TorsoColor = BrickColor.new("Bright blue")
  1102.  
  1103.  
  1104. BodyColors.Parent = Character
  1105.  
  1106.  
  1107. Character.Parent = Workspace
  1108.  
  1109.  
  1110. Character:MoveTo(Position)
  1111.  
  1112.  
  1113. Character:MoveTo(Torso.Position + Vector3.new(0, 3, 0))
  1114.  
  1115.  
  1116. return Character
  1117.  
  1118.  
  1119. end
  1120.  
  1121.  
  1122.  
  1123.  
  1124. AddBV=function(str,cfr,par,debt)
  1125.  
  1126.  
  1127. if not par then return end
  1128.  
  1129.  
  1130. if par:findFirstChild'LibBV' then par.LibBV:Remove() end
  1131.  
  1132.  
  1133. tbbodyvelocity=qi{'BodyVelocity',par,velocity=cfr.lookVector*str,maxForce=v3(1/0,1/0,1/0),Name='LibBV'} deb:AddItem(tbbodyvelocity,debt)
  1134.  
  1135.  
  1136. end
  1137.  
  1138.  
  1139.  
  1140.  
  1141. AddBG=function(str,par,debt)
  1142.  
  1143.  
  1144. if not par then return end
  1145.  
  1146.  
  1147. if par:findFirstChild'LibBG' then par.LibBG:Remove() end
  1148.  
  1149.  
  1150. tbbodygyro=qi{'BodyGyro',par,maxTorque=v3(1/0,1/0,1/0),P=100000,cframe=str,Name='LibBG'} deb:AddItem(tbbodygyro,debt)
  1151.  
  1152.  
  1153. end
  1154.  
  1155.  
  1156.  
  1157.  
  1158. AddBAV=function(vec3,par,debt)
  1159.  
  1160.  
  1161. if not par then return end
  1162.  
  1163.  
  1164. if par:findFirstChild'LibBAV' then par.LibBAV:Remove() end
  1165.  
  1166.  
  1167. tbbodyangularvelocity=qi{'BodyAngularVelocity',par,maxTorque=v3(1/0,1/0,1/0),angularvelocity=vec3,Name='LibBAV'} deb:AddItem(tbbodyangularvelocity,debt)
  1168.  
  1169.  
  1170. end
  1171.  
  1172.  
  1173.  
  1174.  
  1175. Dmg = function(Hum,Dealt,Critical)
  1176.  
  1177.  
  1178. local HM=Hum.Parent
  1179.  
  1180.  
  1181. local HMT,HMB=HM:findFirstChild'Torso',HM:findFirstChild'Block'
  1182.  
  1183.  
  1184. local Blocks=HMB and HMB.Value>0
  1185.  
  1186.  
  1187. if HMT then
  1188.  
  1189.  
  1190. local mm=qi{'Model',HMT} qi{'Humanoid',mm,MaxHealth=0} deb:AddItem(mm,1)
  1191.  
  1192.  
  1193. 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}
  1194.  
  1195.  
  1196. if Blocks then
  1197.  
  1198.  
  1199. mm.Name='Block!'
  1200.  
  1201.  
  1202. mp.BrickColor=bn'Bright blue'
  1203.  
  1204.  
  1205. HMB.Value=HMB.Value-1
  1206.  
  1207.  
  1208. elseif not Blocks then
  1209.  
  1210.  
  1211. mm.Name=Dealt
  1212.  
  1213.  
  1214. mp.BrickColor=bn'Bright red'
  1215.  
  1216.  
  1217. end
  1218.  
  1219.  
  1220. end
  1221.  
  1222.  
  1223. if not Blocks then
  1224.  
  1225.  
  1226. Hum:TakeDamage(Dealt)
  1227.  
  1228.  
  1229. end
  1230.  
  1231.  
  1232. end
  1233.  
  1234.  
  1235.  
  1236.  
  1237. GetHum = function(part)
  1238.  
  1239.  
  1240. local Hum,HT,block
  1241.  
  1242.  
  1243. for i,v in pairs(part.Parent:children()) do
  1244.  
  1245.  
  1246. if v:IsA("Humanoid") then
  1247.  
  1248.  
  1249. Hum=v
  1250.  
  1251.  
  1252. elseif v.Name=='Torso' then
  1253.  
  1254.  
  1255. HT=v
  1256.  
  1257.  
  1258. elseif v.Name=='Block' and v:IsA("NumberValue") then
  1259.  
  1260.  
  1261. block=v
  1262.  
  1263.  
  1264. end
  1265.  
  1266.  
  1267. end
  1268.  
  1269.  
  1270. return Hum,HT,block
  1271.  
  1272.  
  1273. end
  1274.  
  1275.  
  1276.  
  1277.  
  1278. Lightning = function(p0,p1,tym,ofs,col,th,tra) -- start end times offset color thickness
  1279.  
  1280.  
  1281. local magz = (p0 - p1).magnitude local curpos = p0 local trz = {-ofs,ofs}
  1282.  
  1283.  
  1284. for i=1,tym do
  1285.  
  1286.  
  1287. local li = it("Part",c) li.TopSurface =0 li.BottomSurface = 0 li.Anchored = true li.Transparency = tra or 0.4 li.BrickColor = bc(col)
  1288.  
  1289.  
  1290. 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)])
  1291.  
  1292.  
  1293. local trolpos = cn(curpos,p1)*cn(0,0,magz/tym).p+ofz
  1294.  
  1295.  
  1296. if tym == i then
  1297.  
  1298.  
  1299. local magz2 = (curpos - p1).magnitude li.Size = v3(th,th,magz2)
  1300.  
  1301.  
  1302. li.CFrame = cn(curpos,p1)*cn(0,0,-magz2/2)
  1303.  
  1304.  
  1305. else
  1306.  
  1307.  
  1308. li.CFrame = cn(curpos,trolpos)*cn(0,0,magz/tym/2)
  1309.  
  1310.  
  1311. end
  1312.  
  1313.  
  1314. curpos = li.CFrame*cn(0,0,magz/tym/2).p de(li,0.25)
  1315.  
  1316.  
  1317. end
  1318.  
  1319.  
  1320. end
  1321.  
  1322.  
  1323.  
  1324.  
  1325. MakeCrater = function(pos,sc,tyms,debz,par) -- crater maker
  1326.  
  1327.  
  1328. q(function()
  1329.  
  1330.  
  1331. if not debz then
  1332.  
  1333.  
  1334. debz = 5
  1335.  
  1336.  
  1337. end
  1338.  
  1339.  
  1340. local bhit,bpos=ray(pos,pos - (pos + v3(0,200,0)))
  1341.  
  1342.  
  1343. if bhit and bpos then
  1344.  
  1345.  
  1346. for i=1,tyms do
  1347.  
  1348.  
  1349. q(function()
  1350.  
  1351.  
  1352. 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)
  1353.  
  1354.  
  1355. gr.Material = bhit.Material
  1356.  
  1357.  
  1358. gr.TopSurface = bhit.TopSurface
  1359.  
  1360.  
  1361. 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)))
  1362.  
  1363.  
  1364. wait(debz)
  1365.  
  1366.  
  1367. fade(gr,0.1)
  1368.  
  1369.  
  1370. end)
  1371.  
  1372.  
  1373. end
  1374.  
  1375.  
  1376. end
  1377.  
  1378.  
  1379. end)
  1380.  
  1381.  
  1382. end
  1383.  
  1384.  
  1385.  
  1386.  
  1387. MakeCrack = function(pos,sc,debz,par) -- crackmaker
  1388.  
  1389.  
  1390. q(function()
  1391.  
  1392.  
  1393. if not debz then
  1394.  
  1395.  
  1396. debz = 5
  1397.  
  1398.  
  1399. end
  1400.  
  1401.  
  1402. local bhit,bpos=ray(pos,pos - (pos + v3(0,10,0)))
  1403.  
  1404.  
  1405. if bhit and bpos then
  1406.  
  1407.  
  1408. local cr = pa(par or workspace,"Crack","Block",sc,0,sc,false,true,1,0,"") cr.CFrame = cn(bpos)
  1409.  
  1410.  
  1411. local dec=qi({"Decal",cr,Face="Top",Texture=ds.Crack}) de(cr,debz)
  1412.  
  1413.  
  1414. end
  1415.  
  1416.  
  1417. end)
  1418.  
  1419.  
  1420. end
  1421.  
  1422.  
  1423.  
  1424.  
  1425. a = {}
  1426.  
  1427.  
  1428. a.insw={}
  1429.  
  1430.  
  1431. function cleanweld(wexx,namzi)
  1432.  
  1433.  
  1434. local tn=ft2(a.insw,wexx)
  1435.  
  1436.  
  1437. if tn==nil then return end
  1438.  
  1439.  
  1440. if namzi=="p0" then
  1441.  
  1442.  
  1443. a.insw[tn][2]["p0x"],a.insw[tn][2]["p0y"],a.insw[tn][2]["p0z"]=0,0,0 elseif namzi=="p1" then
  1444.  
  1445.  
  1446. a.insw[tn][2]["p1x"],a.insw[tn][2]["p1y"],a.insw[tn][2]["p1z"]=0,0,0 elseif namzi=="a0" then
  1447.  
  1448.  
  1449. a.insw[tn][2]["a0x"],a.insw[tn][2]["a0y"],a.insw[tn][2]["a0z"]=0,0,0 elseif namzi=="a1" then
  1450.  
  1451.  
  1452. a.insw[tn][2]["a1x"],a.insw[tn][2]["a1y"],a.insw[tn][2]["a1z"]=0,0,0
  1453.  
  1454.  
  1455. end
  1456.  
  1457.  
  1458. end
  1459.  
  1460.  
  1461. function c2(wexx,smmx,c0orc1,aa,bb,cc,xx,yy,zz)
  1462.  
  1463.  
  1464. q(function()
  1465.  
  1466.  
  1467. c1(wexx,smmx,c0orc1,aa,bb,cc,xx,yy,zz)
  1468.  
  1469.  
  1470. end)
  1471.  
  1472.  
  1473. end
  1474.  
  1475.  
  1476. a.Welding=0
  1477.  
  1478.  
  1479. function c1(wexx,smmx,c0orc1,aa,bb,cc,xx,yy,zz)
  1480.  
  1481.  
  1482. if ft2(a.insw,wexx)==nil then
  1483.  
  1484.  
  1485. ti(a.insw,{wexx,{}})
  1486.  
  1487.  
  1488. local tn=ft2(a.insw,wexx)
  1489.  
  1490.  
  1491. a.insw[tn][2]["p0x"],a.insw[tn][2]["p0y"],a.insw[tn][2]["p0z"]=wexx.C0.x,wexx.C0.y,wexx.C0.z
  1492.  
  1493.  
  1494. a.insw[tn][2]["p1x"],a.insw[tn][2]["p1y"],a.insw[tn][2]["p1z"]=wexx.C1.x,wexx.C1.y,wexx.C1.z
  1495.  
  1496.  
  1497. a.insw[tn][2]["a0x"],a.insw[tn][2]["a0y"],a.insw[tn][2]["a0z"]=wexx.C0:toEulerAnglesXYZ()
  1498.  
  1499.  
  1500. a.insw[tn][2]["a1x"],a.insw[tn][2]["a1y"],a.insw[tn][2]["a1z"]=wexx.C1:toEulerAnglesXYZ()
  1501.  
  1502.  
  1503. end
  1504.  
  1505.  
  1506. local tn=ft2(a.insw,wexx)
  1507.  
  1508.  
  1509. local xx2,yy2,zz2=0,0,0
  1510.  
  1511.  
  1512. local x2,y2,z2=0,0,0
  1513.  
  1514.  
  1515. if c0orc1==0 then
  1516.  
  1517.  
  1518. xx2,yy2,zz2=a.insw[tn][2]["a0x"],a.insw[tn][2]["a0y"],a.insw[tn][2]["a0z"]
  1519.  
  1520.  
  1521. x2,y2,z2=a.insw[tn][2]["p0x"],a.insw[tn][2]["p0y"],a.insw[tn][2]["p0z"]
  1522.  
  1523.  
  1524. elseif c0orc1==1 then
  1525.  
  1526.  
  1527. xx2,yy2,zz2=a.insw[tn][2]["a1x"],a.insw[tn][2]["a1y"],a.insw[tn][2]["a1z"]
  1528.  
  1529.  
  1530. x2,y2,z2=a.insw[tn][2]["p1x"],a.insw[tn][2]["p1y"],a.insw[tn][2]["p1z"]
  1531.  
  1532.  
  1533. else
  1534.  
  1535.  
  1536. xx2,yy2,zz2=a.insw[tn][2]["a1x"],a.insw[tn][2]["a1y"],a.insw[tn][2]["a1z"]
  1537.  
  1538.  
  1539. x2,y2,z2=a.insw[tn][2]["p0x"],a.insw[tn][2]["p0y"],a.insw[tn][2]["p0z"]
  1540.  
  1541.  
  1542. end a.Welding=a.Welding + 1
  1543.  
  1544.  
  1545. local twa=1
  1546.  
  1547.  
  1548. if smmx >= 1 then
  1549.  
  1550.  
  1551. else
  1552.  
  1553.  
  1554. for i=smmx,0.8,smmx do
  1555.  
  1556.  
  1557. twa = 1
  1558.  
  1559.  
  1560. if c0orc1==0 then
  1561.  
  1562.  
  1563. 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))
  1564.  
  1565.  
  1566. elseif c0orc1==1 then
  1567.  
  1568.  
  1569. 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))
  1570.  
  1571.  
  1572. else local x,y,z = wexx.C0:toEulerAnglesXYZ()
  1573.  
  1574.  
  1575. wexx.C0=cn(x2-(((x2-aa)/twa)*i),y2-(((y2-bb)/twa)*i),z2-(((z2-cc)/twa)*i))*ca(x,y,z)
  1576.  
  1577.  
  1578. 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))
  1579.  
  1580.  
  1581. end
  1582.  
  1583.  
  1584. if fu then
  1585.  
  1586.  
  1587. q(fu)
  1588.  
  1589.  
  1590. end
  1591.  
  1592.  
  1593. wait()
  1594.  
  1595.  
  1596. end
  1597.  
  1598.  
  1599. for i=0.8,1,smmx*0.45 do
  1600.  
  1601.  
  1602. twa = 1
  1603.  
  1604.  
  1605. if c0orc1==0 then
  1606.  
  1607.  
  1608. 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))
  1609.  
  1610.  
  1611. elseif c0orc1==1 then
  1612.  
  1613.  
  1614. 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))
  1615.  
  1616.  
  1617. else local x,y,z = wexx.C0:toEulerAnglesXYZ()
  1618.  
  1619.  
  1620. wexx.C0=cn(x2-(((x2-aa)/twa)*i),y2-(((y2-bb)/twa)*i),z2-(((z2-cc)/twa)*i))*ca(x,y,z)
  1621.  
  1622.  
  1623. 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))
  1624.  
  1625.  
  1626. end
  1627.  
  1628.  
  1629. wait()
  1630.  
  1631.  
  1632. end
  1633.  
  1634.  
  1635. end
  1636.  
  1637.  
  1638. local i=1
  1639.  
  1640.  
  1641. if c0orc1==0 then
  1642.  
  1643.  
  1644. 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))
  1645.  
  1646.  
  1647. elseif c0orc1==1 then
  1648.  
  1649.  
  1650. 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))
  1651.  
  1652.  
  1653. else local x,y,z = wexx.C0:toEulerAnglesXYZ()
  1654.  
  1655.  
  1656. wexx.C0=cn(x2-(((x2-aa)/twa)*i),y2-(((y2-bb)/twa)*i),z2-(((z2-cc)/twa)*i))*ca(x,y,z)
  1657.  
  1658.  
  1659. 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))
  1660.  
  1661.  
  1662. end
  1663.  
  1664.  
  1665. a.Welding=a.Welding - 1
  1666.  
  1667.  
  1668. local tn=ft2(a.insw,wexx)
  1669.  
  1670.  
  1671. if c0orc1==0 then
  1672.  
  1673.  
  1674. 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)
  1675.  
  1676.  
  1677. 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)
  1678.  
  1679.  
  1680. elseif c0orc1==1 then
  1681.  
  1682.  
  1683. 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)
  1684.  
  1685.  
  1686. 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)
  1687.  
  1688.  
  1689. elseif c0orc1==3 then
  1690.  
  1691.  
  1692. local x,y,z=wexx.C0.x,wexx.C0.y,wexx.C0.z
  1693.  
  1694.  
  1695. 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)
  1696.  
  1697.  
  1698. local x,y,z=wexx.C1:toEulerAnglesXYZ()
  1699.  
  1700.  
  1701. 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)
  1702.  
  1703.  
  1704. end
  1705.  
  1706.  
  1707. end
  1708.  
  1709.  
  1710.  
  1711.  
  1712. Welds={}
  1713.  
  1714.  
  1715. Ani=function(w,a,b,c,d,e,f,ty,inc,sined)
  1716.  
  1717.  
  1718. if not Welds[w] then
  1719.  
  1720.  
  1721. local d0,e0,f0=w.C0:toEulerAnglesXYZ() local d1,e1,f1=w.C1:toEulerAnglesXYZ()
  1722.  
  1723.  
  1724. local d0,e0,f0=mdeg(d0),mdeg(e0),mdeg(f0) local d1,e1,f1=mdeg(d1),mdeg(e1),mdeg(f1)
  1725.  
  1726.  
  1727. 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}}
  1728.  
  1729.  
  1730. end
  1731.  
  1732.  
  1733. local c0,c1=Welds[w][0],Welds[w][1]
  1734.  
  1735.  
  1736. c0[1],c0[2],c0[3]=w.C0.x,w.C0.y,w.C0.z
  1737.  
  1738.  
  1739. c1[1],c1[2],c1[3]=w.C1.x,w.C1.y,w.C1.z
  1740.  
  1741.  
  1742. local A0,B0,C0,D0,E0,F0 = unpack(c0)
  1743.  
  1744.  
  1745. local A1,B1,C1,D1,E1,F1 = unpack(c1)
  1746.  
  1747.  
  1748. local Do = function(i)
  1749.  
  1750.  
  1751. if ty==0 then
  1752.  
  1753.  
  1754. 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) )
  1755.  
  1756.  
  1757. elseif ty==1 then
  1758.  
  1759.  
  1760. 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) )
  1761.  
  1762.  
  1763. else
  1764.  
  1765.  
  1766. w.C0=cn( A0-((A0-a)*i) , B0-((B0-b)*i) , C0-((C0-c)*i) ) * ca2(D0,E0,F0)
  1767.  
  1768.  
  1769. w.C1=cn(A1,B1,C1) * ca2( D1-((D1-d)*i) , E1-(((E1-e)/1)*i) , F1-((F1-f)*i) )
  1770.  
  1771.  
  1772. end
  1773.  
  1774.  
  1775. end
  1776.  
  1777.  
  1778. for i=inc,1,inc do
  1779.  
  1780.  
  1781. Do(sined and math.sin(math.pi/2*i) or i)
  1782.  
  1783.  
  1784. wait()
  1785.  
  1786.  
  1787. end
  1788.  
  1789.  
  1790. Do(1)
  1791.  
  1792.  
  1793. if ty==0 then
  1794.  
  1795.  
  1796. c0[4],c0[5],c0[6]=d,e,f
  1797.  
  1798.  
  1799. else
  1800.  
  1801.  
  1802. c1[4],c1[5],c1[6]=d,e,f
  1803.  
  1804.  
  1805. end
  1806.  
  1807.  
  1808. end
  1809.  
  1810.  
  1811. 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
  1812.  
  1813.  
  1814. rAni=function(w)
  1815.  
  1816.  
  1817. Welds[w]=nil
  1818.  
  1819.  
  1820. end
  1821.  
  1822.  
  1823.  
  1824.  
  1825. gunshot = function(speed,sc,dmg,cff) q(function() -- gunshot function
  1826.  
  1827.  
  1828. local bb = pa(workspace,"bullet","Block",0.2*sc,0.3*sc,0.2*sc,true,true,0,0.1,"Black") qi({"CylinderMesh",bb})
  1829.  
  1830.  
  1831. bb.CFrame = cff*ca(rd(rn(-1000,1000)/1500),rd(rn(-1000,1000)/1500),rd(rn(-1000,1000)/1500))
  1832.  
  1833.  
  1834. so(ds.Fire,bb,0.3,1) wait() for i=1,50 do
  1835.  
  1836.  
  1837. bhit,bpos=ray(bb.Position,bb.Position - (bb.CFrame *cn(0,-1,0)).p)
  1838.  
  1839.  
  1840. if bhit and bhit.Name ~= "bullet" and bhit.Name ~= "bullethole" and bpos and (bpos - bb.Position).magnitude < speed then break end
  1841.  
  1842.  
  1843. bb.CFrame=bb.CFrame*cn(0,speed,0)*ca(rd(-0.2),0,0)
  1844.  
  1845.  
  1846. wait()
  1847.  
  1848.  
  1849. end bb.CFrame=bb.CFrame*cn(0,(bpos-bb.Position).magnitude,0)
  1850.  
  1851.  
  1852. if not bhit.Anchored then
  1853.  
  1854.  
  1855. if bhit.Parent:findFirstChild("Humanoid") then local h = bhit.Parent.Humanoid h.Health=h.Health-dmg so(ds.Hit,bhit,0.3,1) end
  1856.  
  1857.  
  1858. else if bhit.Name~="Base" then bhit.Anchored=false bhit:BreakJoints() end end bb:Remove()
  1859.  
  1860.  
  1861. if bhit.Parent:findFirstChild("Humanoid") == nil then BulletHole(bpos,bhit,0.7*sc) end
  1862.  
  1863.  
  1864. end) end
  1865.  
  1866.  
  1867.  
  1868.  
  1869. dive = function(ob2,pro,ite,stof)
  1870.  
  1871.  
  1872. local function div(ob) for i,v in pairs(ob:children()) do if v[pro] == ite then
  1873.  
  1874.  
  1875. for i=1,#stof do v[stof[i][1]] = stof[i][2] end else div(v) end end end
  1876.  
  1877.  
  1878. div(ob2)
  1879.  
  1880.  
  1881. end
  1882.  
  1883.  
  1884.  
  1885.  
  1886. fc = function(ob,cl)
  1887.  
  1888.  
  1889. for i,v in pairs(ob:children()) do if v.className:lower()==cl:lower() then return v end end
  1890.  
  1891.  
  1892. end
  1893.  
  1894.  
  1895.  
  1896.  
  1897. function se(Key,Text)
  1898.  
  1899.  
  1900. local Values = {}
  1901.  
  1902.  
  1903. for value in (Text..Key):gmatch("(.-)"..Key) do
  1904.  
  1905.  
  1906. table.insert(Values,value)
  1907.  
  1908.  
  1909. end return Values
  1910.  
  1911.  
  1912. end
  1913.  
  1914.  
  1915.  
  1916.  
  1917. local thefenv = getfenv()
  1918.  
  1919.  
  1920. getfenv()["rmhelp"] = function()
  1921.  
  1922.  
  1923. local nus = 0
  1924.  
  1925.  
  1926. for i,v in pairs(thefenv) do if i ~= "wait" and i ~= "script" then nus = nus + 1 wait(0.05)
  1927.  
  1928.  
  1929. print(string.rep(" ",3-#tostring(nus)) ..nus.. ") " ..i.. " (" ..type(v).. ")")
  1930.  
  1931.  
  1932. end
  1933.  
  1934.  
  1935. end
  1936.  
  1937.  
  1938. end
  1939.  
  1940.  
  1941.  
  1942.  
  1943. for i,v in pairs(thefenv) do
  1944.  
  1945.  
  1946. _G[i] = v
  1947.  
  1948.  
  1949. --print(i)
  1950.  
  1951.  
  1952. end
  1953.  
  1954.  
  1955.  
  1956.  
  1957. _G[" T".."B".."L".."i".."b "] = [[
  1958.  
  1959.  
  1960. for i,v in pairs(_G) do
  1961.  
  1962.  
  1963. if i ~= "wait" and i ~= "script" then
  1964.  
  1965.  
  1966. getfenv()[i] = v
  1967.  
  1968.  
  1969. end
  1970.  
  1971.  
  1972. end
  1973.  
  1974.  
  1975. ]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement