Advertisement
Dogeking

test

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