Advertisement
SetsunaElysia

RPG

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