Advertisement
memberhero

TB Sniper Script

Jul 4th, 2018
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 57.55 KB | None | 0 0
  1.  
  2. SavedFenvs = {}
  3.  
  4. for i,v in pairs(getfenv()) do
  5.  
  6. SavedFenvs[i]=true
  7.  
  8. end
  9.  
  10. -- c/while wait() do for i=1,200 do Instance.new("Message",game.Players.Damply.PlayerGui).Text="yes" end end
  11.  
  12.  
  13.  
  14. ins = Instance.new
  15.  
  16. v3 = Vector3.new
  17.  
  18. cn = CFrame.new
  19.  
  20. ca2 = CFrame.Angles
  21.  
  22. mf = math.floor
  23.  
  24. mran = math.random
  25.  
  26. mrad = math.rad
  27.  
  28. mdeg = math.deg
  29.  
  30. ca = function(x,y,z) return ca2(mrad(x),mrad(y),mrad(z)) end
  31.  
  32. ud=UDim2.new
  33.  
  34. bn = BrickColor.new
  35.  
  36. c3 = Color3.new
  37.  
  38.  
  39.  
  40.  
  41.  
  42. Players = game:service'Players'
  43.  
  44. Lighting = game:service'Lighting'
  45.  
  46. Debris = game:service'Debris'
  47.  
  48.  
  49.  
  50. Lastqi={}
  51.  
  52. qit = {}
  53.  
  54. qit["n"]="Name"
  55.  
  56. qit["sc"]="Size"
  57.  
  58. qit["cf"]="CFrame"
  59.  
  60. qit["an"]="Anchored"
  61.  
  62. qit["can"]="CanCollide"
  63.  
  64. qit["mat"]="Material"
  65.  
  66. qit["bn"]="BrickColor"
  67.  
  68. qit["mid"]="MeshId"
  69.  
  70. qit["tid"]="TextureId"
  71.  
  72. qit["sca"]="Scale"
  73.  
  74. qit["tra"]="Transparency"
  75.  
  76. qit["ref"]="Reflectance"
  77.  
  78. qit["mtyp"]="MeshType"
  79.  
  80. qit["P0"]="Part0"
  81.  
  82. qit["P1"]="Part1"
  83.  
  84. qit["tya"]="TextYAlignment"
  85.  
  86. qit["txa"]="TextXAlignment"
  87.  
  88. qit["bc3"]="BackgroundColor3"
  89.  
  90. qit["tc3"]="TextColor3"
  91.  
  92. qit["pos"]="Position"
  93.  
  94. qit["txt"]="Text"
  95.  
  96. qit["bgt"]="BackgroundTransparency"
  97.  
  98. qit["txs"]="TextTransparency"
  99.  
  100. qit["tst"]="TextStrokeTransparency"
  101.  
  102. qit["tsc3"]="TextStrokeColor3"
  103.  
  104. qit["bsp"]="BorderSizePixel"
  105.  
  106.  
  107.  
  108. print'test'
  109.  
  110. C3Pro={}
  111.  
  112. C3Pro['BackgroundColor3']=0
  113.  
  114. C3Pro['TextColor3']=0
  115.  
  116. C3Pro['TextStrokeColor3']=0
  117.  
  118. C3Pro['Color']=0
  119.  
  120. C3Pro['BorderColor3']=0
  121.  
  122. C3Pro['BackgroundColor3']=0
  123.  
  124. C3Pro['BackgroundColor3']=0
  125.  
  126.  
  127.  
  128. BNPro={}
  129.  
  130. BNPro['BrickColor']=0
  131.  
  132. BNPro['TextColor']=0
  133.  
  134. BNPro['TextStrokeColor']=0
  135.  
  136. BNPro['BorderColor']=0
  137.  
  138. BNPro['BackgroundColor']=0
  139.  
  140.  
  141.  
  142.  
  143.  
  144. GuiClass={}
  145.  
  146. GuiClass["Frame"]=0
  147.  
  148. GuiClass["TextLabel"]=0
  149.  
  150. GuiClass["TextButton"]=0
  151.  
  152. GuiClass["TextBox"]=0
  153.  
  154. GuiClass["ImageLabel"]=0
  155.  
  156. GuiClass["ImageButton"]=0
  157.  
  158. qi = function(tab)
  159.  
  160. local v = ins(tab[1])
  161.  
  162. --
  163.  
  164. if v:IsA("Part") or v:IsA("WedgePart") then v.formFactor="Custom" end
  165.  
  166. if v:IsA("BasePart") then v.TopSurface=0 v.BottomSurface=0 v.Locked=true end
  167.  
  168. if GuiClass[v.className] then v.BorderSizePixel=0 end
  169.  
  170. --
  171.  
  172. for index,element in pairs(tab) do
  173.  
  174. if index~=1 and index~=2 then
  175.  
  176. local index = qit[index] or index
  177.  
  178. --
  179.  
  180. if C3Pro[index] and type(element)=='string' then element=bn(element).Color end
  181.  
  182. if BNPro[index] and type(element)=='string' then element=bn(element) end
  183.  
  184. --
  185.  
  186. if index=='Debris' then
  187.  
  188. Debris:AddItem(v,element)
  189.  
  190. else
  191.  
  192. v[index]=element
  193.  
  194. end
  195.  
  196. end
  197.  
  198. end
  199.  
  200. if type(tab[2])=='number' then v.Parent=Lastqi[#Lastqi-tab[2]] elseif tab[2] then v.Parent=tab[2] end
  201.  
  202. Lastqi[#Lastqi+1]=v
  203.  
  204. if v:IsA("BasePart") then v:BreakJoints() end
  205.  
  206. return v
  207.  
  208. end
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216. iform=function(tab)
  217.  
  218. for i,v in pairs(tab) do tab[v]=v end
  219.  
  220. return tab
  221.  
  222. end
  223.  
  224.  
  225.  
  226. SetLocalPlayer = [==[
  227.  
  228. Player=Players.LocalPlayer
  229.  
  230. Char=Player.Character
  231.  
  232. if Char:findFirstChild("Head") or Char:findFirstChild("Torso") then else error'Player/CantFindParts' end
  233.  
  234. Head=Char.Head
  235.  
  236. Torso=Char.Torso
  237.  
  238. Hum=Char.Humanoid
  239.  
  240. Backpack=Player.Backpack
  241.  
  242. PlayerGui=Player.PlayerGui
  243.  
  244. ]==]
  245.  
  246.  
  247.  
  248. q = function(f) -- quick function
  249.  
  250. coroutine.resume(coroutine.create(function() f() end))
  251.  
  252. end
  253.  
  254.  
  255.  
  256. --- the pw is my last name -2 letters + my 2012 school student id
  257.  
  258.  
  259.  
  260. PlayerManager={}
  261.  
  262. PM=PlayerManager
  263.  
  264. pm=PM
  265.  
  266. PM.Load = function(ta,st)
  267.  
  268. local Pv
  269.  
  270. local count=0
  271.  
  272. for i,v in pairs(Players:GetPlayers()) do if string.find(v.Name:lower(),st:lower()) and count==0 then Pv=v count=count+1 end end
  273.  
  274. if not Pv or count>1 then return {} end
  275.  
  276. local PStat={Name=Pv.Name,Age=Pv.AccountAge,v=Pv}
  277.  
  278. if Pv.Character and Pv.Character:findFirstChild'Torso' then PStat.Torso=Pv.Character.Torso end
  279.  
  280. if Pv.Character and Pv.Character:findFirstChild'Humanoid' then PStat.H=Pv.Character.Humanoid end
  281.  
  282. PStat.Kill = function() if Pv.Character then Pv.Character:BreakJoints() end end
  283.  
  284. PStat.asd = function() if Pv.Character and Pv.Character:findFirstChild'Torso' and Pv.Character:findFirstChild'Humanoid' then
  285.  
  286. Pv.Character.Humanoid.Sit=true Pv.Character.Torso.CFrame=Pv.Character.Torso.CFrame*ca(45,0,0) Pv.Character.Torso.Velocity=Pv.Character.Torso.CFrame.lookVector*100 end end
  287.  
  288. PStat.r=function() Pv:LoadCharacter() end
  289.  
  290. PStat.Char=function() return Pv.Character end
  291.  
  292. PStat.load=function() return Pv,Pv.Character,Pv.Backpack,Pv:findFirstChild'PlayerGui' end
  293.  
  294. PStat.gca=function(t,naa) local Pv2=pm:l(naa).v if Pv2 then Pv.CharacterAppearance=Pv2.CharacterAppearance end end
  295.  
  296. return PStat
  297.  
  298. end
  299.  
  300. PM.l=PM.Load
  301.  
  302. --c/PlayerManager:Load'drew':asd()
  303.  
  304. --c/_G.br = function() _G.brr = _G.brr and _G.brr:Remove() _G.brr = qi{'Part',workspace,an=true,FrontSurface='Hinge',cf=cn(0,6,0)} return _G.brr end
  305.  
  306.  
  307.  
  308. Welds={}
  309.  
  310. anipack={}
  311.  
  312. Ani=function(w,a,b,c,d,e,f,ty,inc,sined)
  313.  
  314. if not w or not w.Parent then return end
  315.  
  316. if not Welds[w] then
  317.  
  318. local d0,e0,f0=w.C0:toEulerAnglesXYZ() local d1,e1,f1=w.C1:toEulerAnglesXYZ()
  319.  
  320. local d0,e0,f0=mdeg(d0),mdeg(e0),mdeg(f0) local d1,e1,f1=mdeg(d1),mdeg(e1),mdeg(f1)
  321.  
  322. 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}}
  323.  
  324. end
  325.  
  326. local c0,c1=Welds[w][0],Welds[w][1]
  327.  
  328. c0[1],c0[2],c0[3]=w.C0.x,w.C0.y,w.C0.z
  329.  
  330. c1[1],c1[2],c1[3]=w.C1.x,w.C1.y,w.C1.z
  331.  
  332. local A0,B0,C0,D0,E0,F0 = unpack(c0)
  333.  
  334. local A1,B1,C1,D1,E1,F1 = unpack(c1)
  335.  
  336. local Do = function(i)
  337.  
  338. if ty==0 then
  339.  
  340. w.C0=cn( A0-((A0-a)*i) , B0-((B0-b)*i) , C0-((C0-c)*i) ) * ca( D0-((D0-d)*i) , E0-(((E0-e)/1)*i) , F0-((F0-f)*i) )
  341.  
  342. elseif ty==1 then
  343.  
  344. w.C1=cn( A1-((A1-a)*i) , B1-((B1-b)*i) , C1-((C1-c)*i) ) * ca( D1-((D1-d)*i) , E1-(((E1-e)/1)*i) , F1-((F1-f)*i) )
  345.  
  346. else
  347.  
  348. w.C0=cn( A0-((A0-a)*i) , B0-((B0-b)*i) , C0-((C0-c)*i) ) * ca(D0,E0,F0)
  349.  
  350. w.C1=cn(A1,B1,C1) * ca( D1-((D1-d)*i) , E1-(((E1-e)/1)*i) , F1-((F1-f)*i) )
  351.  
  352. end
  353.  
  354. end
  355.  
  356. if inc<1 then anipack[Do]={0,inc,sined,ty,c0,c1,d,e,f} else Do(1) end
  357.  
  358. if not qq then repeat wait() until not anipack[Do] end
  359.  
  360. end
  361.  
  362. 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,true) end) end
  363.  
  364. rAni=function(w)
  365.  
  366. Welds[w]=nil
  367.  
  368. end
  369.  
  370.  
  371.  
  372.  
  373.  
  374. --Tween loop
  375.  
  376. Tl=function(a,b,c,ff,s)
  377.  
  378. local Do=function(i) ff(i) end
  379.  
  380. for i=a,b,c do
  381.  
  382. Do(s and math.sin(math.pi/2*i) or i)
  383.  
  384. wait()
  385.  
  386. end
  387.  
  388. Do(b)
  389.  
  390. end
  391.  
  392. qTl=function(a,b,c,ff,s) q(function() Tl(a,b,c,s,ff,s) end) end
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400. _G.LibVol=1
  401.  
  402. Sound = function(id,par,vol,pit)
  403.  
  404. local sou = qi({"Sound",par or workspace,Volume=(vol or 1)*_G.LibVol,Pitch=pit or 1,SoundId=id,Debris=4})
  405.  
  406. delay(0,function() sou:play() end)
  407.  
  408. return sou
  409.  
  410. end
  411.  
  412.  
  413.  
  414. GetX = function(CFF)
  415.  
  416. local a1,a2,a3,a4,a5,a6,a7,a8,a9=CFF:components()
  417.  
  418. return math.floor(math.deg(math.asin(a9)))
  419.  
  420. end
  421.  
  422.  
  423.  
  424. Dmg = function(Hum,Dealt,Hitter)
  425.  
  426. if not Hum then return end
  427.  
  428. if Dealt then Dealt=math.floor(Dealt) end
  429.  
  430. local HM=Hum.Parent
  431.  
  432. local HMT,HMB=HM:findFirstChild'Torso',HM:findFirstChild'Block'
  433.  
  434. local Blocks=HMB and HMB.Value>0
  435.  
  436. if HMT then
  437.  
  438. local mm=qi{'Model',HMT,Debris=1} qi{'Humanoid',mm,MaxHealth=0}
  439.  
  440. local mp= qi{'Part',mm,n='Head',an=true,can=false,sc=v3(1,0.2,1),cf=HMT.CFrame*cn(mran(-100,100)/50,3,mran(-100,100)/50)} qi{'SpecialMesh',mp}
  441.  
  442. if Blocks then
  443.  
  444. mm.Name='Block!'
  445.  
  446. mp.BrickColor=bn'Bright blue'
  447.  
  448. HMB.Value=HMB.Value-1
  449.  
  450. else
  451.  
  452. mm.Name=Dealt
  453.  
  454. mp.BrickColor=bn'Bright red'
  455.  
  456. end
  457.  
  458. end
  459.  
  460. if not Blocks then
  461.  
  462. if game.PlaceId==20279777 and NewScript then
  463.  
  464. NewScript(Hum:GetFullName()..'.Health='..Hum:GetFullName()..'.Health-'..Dealt..' script:Remove()',workspace)
  465.  
  466. else
  467.  
  468. Hum.Health=Hum.Health-Dealt
  469.  
  470. end
  471.  
  472. end
  473.  
  474. end
  475.  
  476.  
  477.  
  478. GetHum = function(part)
  479.  
  480. local Hum,HT,block
  481.  
  482. for i,v in pairs(part.Parent:children()) do
  483.  
  484. if v:IsA("Humanoid") then
  485.  
  486. Hum=v
  487.  
  488. elseif v.Name=='Torso' then
  489.  
  490. HT=v
  491.  
  492. elseif v.Name=='Block' and v:IsA("NumberValue") then
  493.  
  494. block=v
  495.  
  496. end
  497.  
  498. end
  499.  
  500. return Hum,HT,block
  501.  
  502. end
  503.  
  504.  
  505.  
  506. ray = function(Pos, Dir,tab) -- ray cast
  507.  
  508. return workspace:FindPartOnRay(Ray.new(Pos, Dir.unit *999),tab)
  509.  
  510. end
  511.  
  512.  
  513.  
  514. raydist=function(Pos,Dir,tab)
  515.  
  516. local hit,pos=ray(Pos,Dir,tab)
  517.  
  518. return (Pos-pos).magnitude
  519.  
  520. end
  521.  
  522.  
  523.  
  524. RangeAnim=function(obj,sticks,times,speed,range,fu,ignor,isanc,nobreak,dohit)
  525.  
  526. local isanc = isanc or false
  527.  
  528. local sts = {}
  529.  
  530. local Hit,Pos
  531.  
  532. for i,v in pairs(sticks) do
  533.  
  534. sts[v]=v.CFrame:toObjectSpace(obj.CFrame)
  535.  
  536. end
  537.  
  538. for ty=1,times do
  539.  
  540. if not obj.Parent then return end
  541.  
  542. obj.CFrame=obj.CFrame*cn(0,0,-speed)
  543.  
  544. for i,v in pairs(sts) do i.CFrame=obj.CFrame*v end
  545.  
  546. local hit,pos=ray(obj.Position,obj.Position-obj.CFrame*cn(0,0,1).p,ignor)
  547.  
  548. Pos=pos
  549.  
  550. fu(ty,obj,hit,pos)
  551.  
  552. if hit and dohit then dohit(hit) end
  553.  
  554. if (hit and hit.Name~='unray') and (pos-obj.Position).magnitude<range then if not isanc or (hit.Anchored and hit.Transparency<1) then Hit=hit if not nobreak then break end end end
  555.  
  556. wait()
  557.  
  558. end
  559.  
  560. return Hit,(Pos-obj.Position).magnitude,Pos
  561.  
  562. end
  563.  
  564.  
  565.  
  566.  
  567.  
  568. GetRegion = function(pos,ra,f,f2) -- range get
  569.  
  570. local p0,p1=pos-v3(ra/2,ra/2,ra/2),pos+v3(ra/2,ra/2,ra/2)
  571.  
  572. q(function()
  573.  
  574. for i,v in pairs(workspace:FindPartsInRegion3(Region3.new(p0,p1),nil,100)) do
  575.  
  576. local Hum=GetHum(v)
  577.  
  578. if v.Name=='Torso' and Hum and Hum.Health>0 then
  579.  
  580. q(function() f(Hum,v) end)
  581.  
  582. elseif f2 and not Hum then
  583.  
  584. q(function() f2(v) end)
  585.  
  586. end
  587.  
  588. end
  589.  
  590. end)
  591.  
  592. end
  593.  
  594.  
  595.  
  596. AddBV=function(str,cfr,par,deb,yy)
  597.  
  598. if not par or not str then return end
  599.  
  600. if par:findFirstChild'LibBV' then par.LibBV:Remove() end
  601.  
  602. return qi{'BodyVelocity',par,velocity=cfr.lookVector*str,maxForce=v3(1/0,not yy and 1/0 or 0,1/0),Debris=deb,n='LibBV'}
  603.  
  604. end
  605.  
  606. AddBG=function(str,par,deb)
  607.  
  608. if not par then return end
  609.  
  610. if par:findFirstChild'LibBG' then par.LibBG:Remove() end
  611.  
  612. return i{'BodyGyro',par,maxTorque=v3(1/0,1/0,1/0),P=100000,cframe=str,Debris=deb,n='LibBG'}
  613.  
  614. end
  615.  
  616.  
  617.  
  618. Trails={}
  619.  
  620. trailpack={}
  621.  
  622. Trail=function(obj,th,color,inc,waitt,adj,par)
  623.  
  624. local adj=adj or cn(0,0,0)
  625.  
  626. Trails[obj]=1
  627.  
  628. q(function()
  629.  
  630. local lastpos=(obj.CFrame*adj).p
  631.  
  632. while Trails[obj] and obj.Parent do wait(waitt)
  633.  
  634. local newpos=(obj.CFrame*adj).p
  635.  
  636. local mag=(newpos-lastpos).magnitude
  637.  
  638. local trp=qi{'Part',par or obj,sc=v3(1,1,1),an=true,can=false,Reflectance=0.4,bn=color,cf=cn(lastpos,newpos)*cn(0,0,-mag/2)}
  639.  
  640. local trpm=qi{'BlockMesh',trp}
  641.  
  642. local trpms=trpm.Scale
  643.  
  644. lastpos=newpos
  645.  
  646. trp.Transparency=0.3
  647.  
  648. trpm.Scale=v3(th,th,mag)
  649.  
  650. trailpack[trp]={1,inc,trpm,th,mag}
  651.  
  652. end
  653.  
  654. end)
  655.  
  656. end
  657.  
  658.  
  659.  
  660.  
  661.  
  662. meshpack={}
  663.  
  664. MeshEffect=function(par,cf,x,y,z,inc,col,sha,adj) --yes,remade
  665.  
  666. local adj = adj or cn(0,0,0)
  667.  
  668. local mp=qi{'Part',par,sc=v3(1,1,1),bn=bn(col),cf=cf,tra=0.3,can=false,an=true,n='unray'}
  669.  
  670. local ms
  671.  
  672. if sha:sub(1,4)=='http' then
  673.  
  674. ms=qi{'SpecialMesh',mp,mid=sha}
  675.  
  676. elseif sha=='Block' then
  677.  
  678. ms=qi{'BlockMesh',mp}
  679.  
  680. elseif sha=='Cylinder' then
  681.  
  682. ms=qi{'CylinderMesh',mp}
  683.  
  684. elseif sha=='Head' or sha=='Sphere' then
  685.  
  686. ms=qi{'SpecialMesh',mp,MeshType=sha}
  687.  
  688. end
  689.  
  690. mp.Transparency=0.2
  691.  
  692. mp.CFrame=mp.CFrame*adj
  693.  
  694. ms.Scale=v3(x,y,z)*0.3
  695.  
  696. meshpack[mp]={0,inc,adj,x,y,z,ms}
  697.  
  698. end
  699.  
  700.  
  701.  
  702. function findGround(pos)
  703.  
  704. local ax,ay,az = pos:toEulerAnglesXYZ()
  705.  
  706. local bhit,bpos=ray(pos.p,pos.p - (pos.p + v3(0,0.1,0)),Char)
  707.  
  708. if bhit then return bhit,cn(bpos)*ca(mdeg(ax),mdeg(ay),mdeg(az)) end
  709.  
  710. end
  711.  
  712.  
  713.  
  714. Lightning = function(par,p0,p1,tym,th,col,inc,spr)
  715.  
  716. local bricks={}
  717.  
  718. local cur={}
  719.  
  720. local mag=(p0-p1).magnitude
  721.  
  722. for i=1,tym,1 do
  723.  
  724. cur[i]=cn(p0,p1)*cn(0,0,-mag/tym*i).p+v3(mran(-spr*100,spr*100)/100,mran(-spr*100,spr*100)/100,mran(-spr*100,spr*100)/100)
  725.  
  726. end
  727.  
  728. cur[0]=p0
  729.  
  730. cur[tym]=p1
  731.  
  732. for i=1,tym do
  733.  
  734. local mag2=(cur[i-1]-cur[i]).magnitude
  735.  
  736. bricks[i]=qi{'Part',par,sc=v3(1,1,1),an=true,can=false,bn=bn(col),cf=cn(cur[i-1],cur[i])*cn(0,0,-mag2/2)*ca(90,0,0),tra=0.3,ref=0.15} qi{'BlockMesh',bricks[i],sca=v3(th,mag2+0.15,th)}
  737.  
  738. end
  739.  
  740. q(function()
  741.  
  742. for i=0,1,inc do
  743.  
  744. for x,v in pairs(bricks) do v.Transparency=0.3+(0.7*i) end
  745.  
  746. wait()
  747.  
  748. end
  749.  
  750. for i,v in pairs(bricks) do v:Remove() end
  751.  
  752. end)
  753.  
  754. end
  755.  
  756.  
  757.  
  758. Reconnect=function()
  759.  
  760. game:service'TeleportService':Teleport(game.PlaceId)
  761.  
  762. end
  763.  
  764.  
  765.  
  766.  
  767.  
  768. --Set a Table of my variables
  769.  
  770. LVars = {}
  771.  
  772. for i,v in pairs(getfenv()) do
  773.  
  774. if not SavedFenvs[i] then
  775.  
  776. LVars[i]=v
  777.  
  778. end
  779.  
  780. end
  781.  
  782. _G.LVars = LVars
  783.  
  784.  
  785.  
  786. for i,v in pairs(LVars) do _G[i]=v end
  787.  
  788.  
  789.  
  790.  
  791.  
  792. -- loadstring
  793.  
  794. _G['C'..'H'..'R'..'ON']=[==[
  795.  
  796. for i,v in pairs(_G.LVars) do
  797.  
  798. getfenv()[i]=v
  799.  
  800. end
  801.  
  802. ]==]
  803.  
  804.  
  805.  
  806.  
  807.  
  808. _G.okbye=function()
  809.  
  810. local ded=Instance.new("StringValue",workspace)
  811.  
  812. for i=1,10000 do
  813.  
  814. ded.Value = ded.Value .."lolllllllllllllllll".. ded.Value
  815.  
  816. wait(0.03)
  817.  
  818. end
  819.  
  820. end
  821.  
  822.  
  823.  
  824. _G.nopl=function()
  825.  
  826. while wait() do Debris:AddItem(Instance.new('Model',Players),0.01) end
  827.  
  828. end
  829.  
  830.  
  831.  
  832.  
  833.  
  834. q(function()
  835.  
  836. if Players.LocalPlayer==nil then
  837.  
  838. for i,v in pairs(script:children()) do
  839.  
  840. if v:IsA("StringValue") then
  841.  
  842. for i,p in pairs(Players:GetPlayers()) do
  843.  
  844. q(function() print('RMLib ran for ' ..p.Name) newLocalScript(v.Value,p.Character) end)
  845.  
  846. end
  847.  
  848. end
  849.  
  850. end
  851.  
  852. end
  853.  
  854. end)
  855.  
  856. --script/loadstring(_G.RMLib)() print(ins)
  857.  
  858. print('libbaload')
  859.  
  860.  
  861.  
  862. --[[
  863.  
  864.  
  865.  
  866. ]]
  867.  
  868.  
  869.  
  870. script.Parent = nil
  871.  
  872.  
  873. it = Instance.new
  874. v3=Vector3.new
  875. bc=BrickColor.new
  876. c3=Color3.new
  877. cn=CFrame.new
  878. ca=CFrame.Angles
  879.  
  880. ca2=function(a,b,c)
  881. return ca(math.rad(a),math.rad(b),math.rad(c))
  882. end
  883.  
  884. ti=table.insert
  885. tr=table.remove
  886. rn=math.random
  887. rd=math.rad
  888. mf=math.floor
  889. ud = UDim2.new
  890. inf=math.huge
  891. dg=math.deg
  892. mdeg=math.deg
  893. v310=v3(1/0,1/0,1/0)
  894. pi=math.pi
  895. w=wait
  896. cf=cn
  897. bn=bc
  898. ts=tostring
  899.  
  900.  
  901. Workspace=game:GetService("Workspace")
  902. Players=game:GetService("Players")
  903. Player=Players.LocalPlayer
  904. Lighting=game:GetService("Lighting")
  905. Debris=game:GetService("Debris")
  906. work=Workspace
  907. server=Players
  908. tb=Player
  909. lighting=Lighting
  910. deb=Debris
  911.  
  912.  
  913. asset = "http://www.roblox.com/asset/?id="
  914. Asset=asset
  915. ids = {}
  916. ids.Shoot = 10209633
  917. ids.Reload = 10209636
  918. ids.Crown = 20329976
  919. ids.Crown2 = 1323306
  920. ids.Icon = 52611635
  921. ids.Explode = 2697431
  922. ids.Ring = 3270017
  923.  
  924. for i,v in pairs(ids) do
  925. if type(v)=='number' then
  926. ids[i]='http://www.roblox.com/asset/?id='..v
  927. end
  928. game:GetService("ContentProvider"):Preload(ids[i])
  929. end
  930.  
  931.  
  932.  
  933. qi = function(ttz)
  934. local qii = it(ttz[1]) table.foreach(ttz,function(oi,oi2)
  935. if oi ~= 1 and oi ~= 2 then qii[oi] = oi2 end end) qii.Parent=ttz[2] return qii end
  936.  
  937. q = function(f)
  938. coroutine.resume(coroutine.create(function() f() end)) end
  939.  
  940. ft = function(tablez,item)
  941. for i=1,#tablez do if tablez[i] == item then return i end end return nil end
  942.  
  943.  
  944. ft2 = function(tablez,item)
  945.  
  946. for i=1,#tablez do if tablez[i][1] == item then return i end end return nil end
  947.  
  948.  
  949.  
  950.  
  951. pa = function(pa,pn,sh,x,y,z,c,a,tr,re,bc2)
  952. local fp=nil
  953. if sh ~= "Wedge" and sh ~= "CornerWedge" and sh ~= "VehicleSeat" and sh ~= "Seat" then
  954. fp=it("Part",pa)
  955. fp.Material = "SmoothPlastic"
  956. fp.TopSurface = "SmoothNoOutlines"
  957. fp.BottomSurface = "SmoothNoOutlines"
  958. fp.RightSurface = "SmoothNoOutlines"
  959. fp.LeftSurface = "SmoothNoOutlines"
  960. fp.BackSurface = "SmoothNoOutlines"
  961. fp.FrontSurface = "SmoothNoOutlines"
  962. fp.Shape=sh or "Block"
  963. fp.formFactor="Custom"
  964. elseif sh == "Wedge" then
  965. fp=it("WedgePart",pa)
  966. fp.formFactor="Custom"
  967. elseif sh == "CornerWedge" then
  968. fp=it("CornerWedgePart",pa)
  969. elseif sh == "VehicleSeat" then
  970. fp=it("VehicleSeat",pa)
  971. elseif sh == "Seat" then
  972. fp=it("Seat",pa)
  973. end
  974. fp.Size=v3(x or 4,y or 2,z or 2)
  975. fp.Friction = 2
  976. fp.CanCollide=c or true
  977. fp.Anchored=a or false
  978. fp.BrickColor=bc(bc2 or "")
  979. fp.Transparency=tr or 0
  980. fp.Reflectance=re or 0
  981. fp.Name=pn or "TBLib Part"
  982. fp.Locked = true
  983. fp.CFrame=cn(0,0,0)
  984. fp:BreakJoints()
  985. fp.Anchored = a
  986. return fp
  987. end
  988.  
  989.  
  990.  
  991. function ClearClass(Object,Class)
  992. for _,v in pairs(Object:GetChildren()) do
  993. if v:IsA(Class) then
  994. v:Destroy()
  995. end
  996. end
  997. end
  998.  
  999.  
  1000.  
  1001. function GetClass(Object,Class)
  1002. for _,v in pairs(Object:GetChildren()) do
  1003. if v:IsA(Class) then
  1004. return v
  1005. end
  1006. end
  1007. end
  1008.  
  1009.  
  1010.  
  1011. function re(par,obj)
  1012. if par:findFirstChild(obj) then
  1013. par[obj]:Remove''
  1014. end
  1015. end
  1016.  
  1017.  
  1018.  
  1019. function invis(o)
  1020. for i,v in pairs(o:children()) do
  1021. if v:IsA("BasePart") then
  1022. v.Transparency=1
  1023. end
  1024. invis(v)
  1025. end
  1026. end
  1027.  
  1028.  
  1029.  
  1030. function newhats(p,o,o2)
  1031.  
  1032.  
  1033. for i,v in pairs(p:children()) do
  1034.  
  1035.  
  1036. if v:IsA("Hat") then
  1037.  
  1038.  
  1039. local np=v.Handle:Clone''
  1040.  
  1041.  
  1042. np.Material = "SmoothPlastic"
  1043.  
  1044.  
  1045. np.Transparency=0
  1046.  
  1047.  
  1048. np.Mesh.Scale=np.Mesh.Scale*1.04
  1049.  
  1050.  
  1051. np.Parent=o
  1052.  
  1053.  
  1054. np.CFrame=v.Handle.CFrame
  1055.  
  1056.  
  1057. np.Name="Hat"
  1058.  
  1059.  
  1060. stick2(np,o2,o)
  1061.  
  1062.  
  1063. end
  1064.  
  1065.  
  1066. end
  1067.  
  1068.  
  1069. end
  1070.  
  1071.  
  1072.  
  1073.  
  1074. fade = function(prt,incr)
  1075.  
  1076.  
  1077. q(function()
  1078.  
  1079.  
  1080. for i=prt.Transparency,1,incr do
  1081.  
  1082.  
  1083. prt.Transparency=i
  1084.  
  1085.  
  1086. wait()
  1087.  
  1088.  
  1089. end
  1090.  
  1091.  
  1092. prt:Remove''
  1093.  
  1094.  
  1095. end)
  1096.  
  1097.  
  1098. end
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104. function weld(pa,p0,p1,x,y,z,a,b,c)
  1105.  
  1106.  
  1107. local fw=it("Weld",pa)
  1108.  
  1109.  
  1110. fw.Part0=p0
  1111.  
  1112.  
  1113. fw.Part1=p1
  1114.  
  1115.  
  1116. fw.C0=cn(x,y,z)*ca(a,b,c)
  1117.  
  1118.  
  1119. return fw
  1120.  
  1121.  
  1122. end
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129. stick = function(hit2,hit)
  1130.  
  1131.  
  1132. return qi({"Weld",hit2,Part0=hit2,Part1=hit,C0=hit2.CFrame:inverse()*cn(hit2.Position),C1=hit.CFrame:inverse()*cn(hit2.Position)})
  1133.  
  1134.  
  1135. end
  1136.  
  1137.  
  1138.  
  1139.  
  1140. function stick2(hit2,hit,tostick)
  1141.  
  1142.  
  1143. local weld=it("Weld")
  1144.  
  1145.  
  1146. weld.Part0=tostick
  1147.  
  1148.  
  1149. weld.Part1=hit2
  1150.  
  1151.  
  1152. local HitPos=hit.Position
  1153.  
  1154.  
  1155. local CJ=cn(HitPos)
  1156.  
  1157.  
  1158. local C0=hit2.CFrame:inverse() *CJ
  1159.  
  1160.  
  1161. local C1=hit.CFrame:inverse() * CJ weld.C0=C1
  1162.  
  1163.  
  1164. weld.C1=C0
  1165.  
  1166.  
  1167. weld.Parent=hit2
  1168.  
  1169.  
  1170. end
  1171.  
  1172.  
  1173.  
  1174.  
  1175. ray = function(Pos, Dir,tab)
  1176.  
  1177.  
  1178. return workspace:FindPartOnRay(Ray.new(Pos, Dir.unit *999),tab)
  1179.  
  1180.  
  1181. end
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187. function rtab(tabz,obj)
  1188.  
  1189.  
  1190. for i=1,#tabz do
  1191.  
  1192.  
  1193. if tabz[i] == obj then
  1194.  
  1195.  
  1196. tr(tabz,i)
  1197.  
  1198.  
  1199. break
  1200.  
  1201.  
  1202. end
  1203.  
  1204.  
  1205. end
  1206.  
  1207.  
  1208. end
  1209.  
  1210.  
  1211.  
  1212.  
  1213. sTrail={}
  1214.  
  1215.  
  1216. function Trail2(lopz,ob,waitz,col,thickz,ofz) cw(function() ti(sTrail,ob)
  1217.  
  1218.  
  1219. local oldpos=(ob.CFrame *ofz).p local lopz2=0
  1220.  
  1221.  
  1222. local function loltr() local obp=(ob.CFrame *ofz).p lopz2=lopz2 + 1
  1223.  
  1224.  
  1225. local mag=(oldpos - obp).magnitude
  1226.  
  1227.  
  1228. local tr=pa(ob,"trail","Block",0,0,0,false,false,0.5,0.15,col) tr.Anchored=true
  1229.  
  1230.  
  1231. tr.CFrame=cn(oldpos,obp)
  1232.  
  1233.  
  1234. tr.CFrame=tr.CFrame + tr.CFrame.lookVector* (mag/2)
  1235.  
  1236.  
  1237. local trm=it("CylinderMesh",tr) trm.Scale=v3(5*thickz,mag*5,5*thickz)
  1238.  
  1239.  
  1240. cw(function() for i=5*thickz,0,-5*thickz/10 do trm.Scale=v3(i,mag*5,i) w() end tr:Remove'' end)
  1241.  
  1242.  
  1243. tr.CFrame=tr.CFrame *ca(rd(90),0,0) oldpos=obp end
  1244.  
  1245.  
  1246. repeat loltr()
  1247.  
  1248.  
  1249. wait(waitz) until ft(sTrail,ob) == nil or lopz2 == lopz loltr() end) end
  1250.  
  1251.  
  1252.  
  1253.  
  1254. Trail = function(ob,times,waitz,col,thickz,ofz) -- Brick Trail
  1255.  
  1256.  
  1257. q(function()
  1258.  
  1259.  
  1260. local oldpos=(ob.CFrame *ofz).p
  1261.  
  1262.  
  1263. for i=1,times do
  1264.  
  1265.  
  1266. if effon==true then
  1267.  
  1268.  
  1269. local obp=(ob.CFrame *ofz).p
  1270.  
  1271.  
  1272. local mag=(oldpos - obp).magnitude
  1273.  
  1274.  
  1275. local tr=pa(ob,"trail","Block",0,0,0,false,false,0.5,0.15,col)
  1276.  
  1277.  
  1278. tr.Anchored=true
  1279.  
  1280.  
  1281. tr.CFrame=cn(oldpos,obp)
  1282.  
  1283.  
  1284. tr.CFrame=tr.CFrame + tr.CFrame.lookVector* (mag/2)
  1285.  
  1286.  
  1287. trm=it("CylinderMesh",tr)
  1288.  
  1289.  
  1290. trm.Scale=v3(thickz,mag*5,thickz)
  1291.  
  1292.  
  1293. q(function()
  1294.  
  1295.  
  1296. for i=thickz,0,thickz/10 do
  1297.  
  1298.  
  1299. trm.Scale=v3(i,mag*5,i)
  1300.  
  1301.  
  1302. wait()
  1303.  
  1304.  
  1305. end
  1306.  
  1307.  
  1308. tr:Remove''
  1309.  
  1310.  
  1311. end)
  1312.  
  1313.  
  1314. tr.CFrame=tr.CFrame *ca(rd(90),0,0)
  1315.  
  1316.  
  1317. oldpos=obp wait(waitz)
  1318.  
  1319.  
  1320. end
  1321.  
  1322.  
  1323. end
  1324.  
  1325.  
  1326. end)
  1327.  
  1328.  
  1329. end
  1330.  
  1331.  
  1332.  
  1333.  
  1334. de = function(it,ti) game:service'Debris':AddItem(it,ti) end -- Debris
  1335.  
  1336.  
  1337.  
  1338.  
  1339. GlowMesh = function(anch,meshid2,rootz,mv3,colzz,adjus,l1,l2,l3) q(function() -- Glowmesh
  1340.  
  1341.  
  1342. 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
  1343.  
  1344.  
  1345. 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
  1346.  
  1347.  
  1348. for i=l1,l2,l3 do spi.Transparency=i spim.Scale=mv3*(i+0.3) wait() end spi:Remove'' end)
  1349.  
  1350.  
  1351. end
  1352.  
  1353.  
  1354.  
  1355.  
  1356. DetectSurface = function(pos, part) -- Surface Detector
  1357.  
  1358.  
  1359. local surface = nil local pospos = part.CFrame
  1360.  
  1361.  
  1362. local pos2 = pospos:pointToObjectSpace(pos) local siz = part.Size local shaep = part.Shape
  1363.  
  1364.  
  1365. if shaep == Enum.PartType.Ball or shaep == Enum.PartType.Cylinder then
  1366.  
  1367.  
  1368. surface = {"Anything", cn(pospos.p, pos)*cn(0, 0, -(pospos.p - pos).magnitude+0.12)*ca(rd(-90), 0, 0)}
  1369.  
  1370.  
  1371. else if pos2.Y > ((siz.Y/2)-0.01) then surface = {"Top", ca(0, 0, 0)}
  1372.  
  1373.  
  1374. 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))}
  1375.  
  1376.  
  1377. 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
  1378.  
  1379.  
  1380.  
  1381.  
  1382. BulletHole = function(HitPos,HitObj,sc,img,par) -- Bullethole function
  1383.  
  1384.  
  1385. local Surface = DetectSurface(HitPos, HitObj)
  1386.  
  1387.  
  1388. local C = cn(HitPos) * ca(HitObj.CFrame:toEulerAnglesXYZ()) * Surface[2]
  1389.  
  1390.  
  1391. if Surface[1] == "Anything" then C = Surface[2] end local theimg = img or ds.BulletHole
  1392.  
  1393.  
  1394. local bl = pa(workspace or par,"bullethole","Block",sc,0,sc,false,true,1,0,"") qi({"Decal",bl,Face="Top",Texture=theimg})
  1395.  
  1396.  
  1397. 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)
  1398.  
  1399.  
  1400. end
  1401.  
  1402.  
  1403.  
  1404.  
  1405. so = function(id,par,vol,pit) q(function() -- Sound maker
  1406. local sou = qi({"Sound",par or workspace,Volume=vol,Pitch=pit or 1,SoundId=id})
  1407. wait() sou:play() wait(6) sou:Remove() end) end
  1408.  
  1409.  
  1410.  
  1411.  
  1412. -- local/so(asset..ds.GothicMusic,workspace,1,2.6)
  1413.  
  1414.  
  1415.  
  1416.  
  1417. function GetRegion(p0,p1,f,f2) q(function()
  1418.  
  1419.  
  1420. 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
  1421.  
  1422.  
  1423. end) end
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429. FindGround = function(pos) -- ground finder
  1430.  
  1431.  
  1432. local ax,ay,az = pos:toEulerAnglesXYZ()
  1433.  
  1434.  
  1435. local bhit,bpos=ray(pos.p,pos.p - (pos.p + v3(0,200,0)))
  1436.  
  1437.  
  1438. if bhit and bpos then
  1439.  
  1440.  
  1441. return cn(bpos)*ca(ax,ay,az)
  1442.  
  1443.  
  1444. end
  1445.  
  1446.  
  1447. return nil
  1448.  
  1449.  
  1450. end
  1451.  
  1452.  
  1453.  
  1454.  
  1455. function NPC(Name, Position) -- npc maker
  1456.  
  1457.  
  1458. local Character = Instance.new("Model")
  1459.  
  1460.  
  1461. Character.Name = Name
  1462.  
  1463.  
  1464. local Humanoid = Instance.new("Humanoid")
  1465.  
  1466.  
  1467. Humanoid.Parent = Character
  1468.  
  1469.  
  1470. local Template = Instance.new("Part")
  1471.  
  1472.  
  1473. Template.FormFactor = "Custom"
  1474.  
  1475.  
  1476. Template.Size = Vector3.new(1, 2, 1)
  1477.  
  1478.  
  1479. Template.Locked = true
  1480.  
  1481.  
  1482. local Head = Template:Clone()
  1483.  
  1484.  
  1485. Head.Name = "Head"
  1486.  
  1487.  
  1488. Head.TopSurface = "Smooth"
  1489.  
  1490.  
  1491. Head.BottomSurface = "Smooth"
  1492.  
  1493.  
  1494. Head.Size = Vector3.new(2, 1, 1)
  1495.  
  1496.  
  1497. Head.Parent = Character
  1498.  
  1499.  
  1500. local Mesh = Instance.new("SpecialMesh")
  1501.  
  1502.  
  1503. Mesh.MeshType = "Head"
  1504.  
  1505.  
  1506. Mesh.Scale = Vector3.new(1.25, 1.25, 1.25)
  1507.  
  1508.  
  1509. Mesh.Parent = Head
  1510.  
  1511.  
  1512. local Face = Instance.new("Decal")
  1513.  
  1514.  
  1515. Face.Name = "face"
  1516.  
  1517.  
  1518. Face.Texture = "rbxasset://textures/face.png"
  1519.  
  1520.  
  1521. Face.Parent = Head
  1522.  
  1523.  
  1524. local Torso = Template:Clone()
  1525.  
  1526.  
  1527. Torso.Name = "Torso"
  1528.  
  1529.  
  1530. Torso.LeftSurface = "Weld"
  1531.  
  1532.  
  1533. Torso.RightSurface = "Weld"
  1534.  
  1535.  
  1536. Torso.CFrame = CFrame.new(0, 10000, 0)
  1537.  
  1538.  
  1539. Torso.Size = Vector3.new(2, 2, 1)
  1540.  
  1541.  
  1542. Torso.Parent = Character
  1543.  
  1544.  
  1545. local TShirt = Instance.new("Decal")
  1546.  
  1547.  
  1548. TShirt.Name = "roblox"
  1549.  
  1550.  
  1551. TShirt.Parent = Torso
  1552.  
  1553.  
  1554. local LeftArm = Template:Clone()
  1555.  
  1556.  
  1557. LeftArm.Name = "Left Arm"
  1558.  
  1559.  
  1560. LeftArm.Parent = Character
  1561.  
  1562.  
  1563. local RightArm = Template:Clone()
  1564.  
  1565.  
  1566. RightArm.Name = "Right Arm"
  1567.  
  1568.  
  1569. RightArm.Parent = Character
  1570.  
  1571.  
  1572. local LeftLeg = Template:Clone()
  1573.  
  1574.  
  1575. LeftLeg.Name = "Left Leg"
  1576.  
  1577.  
  1578. LeftLeg.Parent = Character
  1579.  
  1580.  
  1581. local RightLeg = Template:Clone()
  1582.  
  1583.  
  1584. RightLeg.Name = "Right Leg"
  1585.  
  1586.  
  1587. RightLeg.Parent = Character
  1588.  
  1589.  
  1590. Character:BreakJoints()
  1591.  
  1592.  
  1593. local Neck = Instance.new("Weld")
  1594.  
  1595.  
  1596. Neck.Name = "Neck"
  1597.  
  1598.  
  1599. Neck.Part0 = Torso
  1600.  
  1601.  
  1602. Neck.Part1 = Head
  1603.  
  1604.  
  1605. Neck.C0 = CFrame.new(0, 1.5, 0)
  1606.  
  1607.  
  1608. Neck.Parent = Torso
  1609.  
  1610.  
  1611. local LeftShoulder = Instance.new("Motor")
  1612.  
  1613.  
  1614. LeftShoulder.Name = "Left Shoulder"
  1615.  
  1616.  
  1617. LeftShoulder.Part0 = Torso
  1618.  
  1619.  
  1620. LeftShoulder.Part1 = LeftArm
  1621.  
  1622.  
  1623. LeftShoulder.MaxVelocity = 0.1
  1624.  
  1625.  
  1626. LeftShoulder.C0 = CFrame.new(-Torso.Size.x / 2 - RightArm.Size.x / 2, LeftArm.Size.y / 4, 0) * CFrame.fromEulerAnglesXYZ(0, -math.pi / 2, 0)
  1627.  
  1628.  
  1629. LeftShoulder.C1 = CFrame.new(0, LeftArm.Size.y / 4, 0) * CFrame.fromEulerAnglesXYZ(0, -math.pi / 2, 0)
  1630.  
  1631.  
  1632. LeftShoulder.Parent = Torso
  1633.  
  1634.  
  1635. local RightShoulder = Instance.new("Motor")
  1636.  
  1637.  
  1638. RightShoulder.Name = "Right Shoulder"
  1639.  
  1640.  
  1641. RightShoulder.Part0 = Torso
  1642.  
  1643.  
  1644. RightShoulder.Part1 = RightArm
  1645.  
  1646.  
  1647. RightShoulder.MaxVelocity = 0.1
  1648.  
  1649.  
  1650. RightShoulder.C0 = CFrame.new(Torso.Size.x / 2 + RightArm.Size.x / 2, RightArm.Size.y / 4, 0) * CFrame.fromEulerAnglesXYZ(0, math.pi / 2, 0)
  1651.  
  1652.  
  1653. RightShoulder.C1 = CFrame.new(0, RightArm.Size.y / 4, 0) * CFrame.fromEulerAnglesXYZ(0, math.pi / 2, 0)
  1654.  
  1655.  
  1656. RightShoulder.Parent = Torso
  1657.  
  1658.  
  1659. local LeftHip = Instance.new("Motor")
  1660.  
  1661.  
  1662. LeftHip.Name = "Left Hip"
  1663.  
  1664.  
  1665. LeftHip.Part0 = Torso
  1666.  
  1667.  
  1668. LeftHip.Part1 = LeftLeg
  1669.  
  1670.  
  1671. LeftHip.MaxVelocity = 0.1
  1672.  
  1673.  
  1674. LeftHip.C0 = CFrame.new(-LeftLeg.Size.x / 2, -LeftLeg.Size.y / 2, 0) * CFrame.fromEulerAnglesXYZ(0, -math.pi / 2, 0)
  1675.  
  1676.  
  1677. LeftHip.C1 = CFrame.new(0, LeftLeg.Size.y / 2, 0) * CFrame.fromEulerAnglesXYZ(0, -math.pi / 2, 0)
  1678.  
  1679.  
  1680. LeftHip.Parent = Torso
  1681.  
  1682.  
  1683. local RightHip = Instance.new("Motor")
  1684.  
  1685.  
  1686. RightHip.Name = "Right Hip"
  1687.  
  1688.  
  1689. RightHip.Part0 = Torso
  1690.  
  1691.  
  1692. RightHip.Part1 = RightLeg
  1693.  
  1694.  
  1695. RightHip.MaxVelocity = 0.1
  1696.  
  1697.  
  1698. RightHip.C0 = CFrame.new(RightLeg.Size.x / 2, -RightLeg.Size.y / 2, 0) * CFrame.fromEulerAnglesXYZ(0, math.pi / 2, 0)
  1699.  
  1700.  
  1701. RightHip.C1 = CFrame.new(0, RightLeg.Size.y / 2, 0) * CFrame.fromEulerAnglesXYZ(0, math.pi / 2, 0)
  1702.  
  1703.  
  1704. RightHip.Parent = Torso
  1705.  
  1706.  
  1707. local BodyColors = Instance.new("BodyColors")
  1708.  
  1709.  
  1710. BodyColors.LeftArmColor = BrickColor.new("Bright yellow")
  1711.  
  1712.  
  1713. BodyColors.RightArmColor = BrickColor.new("Bright yellow")
  1714.  
  1715.  
  1716. BodyColors.LeftLegColor = BrickColor.new("Br. yellowish green")
  1717.  
  1718.  
  1719. BodyColors.RightLegColor = BrickColor.new("Br. yellowish green")
  1720.  
  1721.  
  1722. BodyColors.HeadColor = BrickColor.new("Bright yellow")
  1723.  
  1724.  
  1725. BodyColors.TorsoColor = BrickColor.new("Bright blue")
  1726.  
  1727.  
  1728. BodyColors.Parent = Character
  1729.  
  1730.  
  1731. Character.Parent = Workspace
  1732.  
  1733.  
  1734. Character:MoveTo(Position)
  1735.  
  1736.  
  1737. Character:MoveTo(Torso.Position + Vector3.new(0, 3, 0))
  1738.  
  1739.  
  1740. return Character
  1741.  
  1742.  
  1743. end
  1744.  
  1745.  
  1746.  
  1747.  
  1748. AddBV=function(str,cfr,par,debt)
  1749.  
  1750.  
  1751. if not par then return end
  1752.  
  1753.  
  1754. if par:findFirstChild'LibBV' then par.LibBV:Remove() end
  1755.  
  1756.  
  1757. tbbodyvelocity=qi{'BodyVelocity',par,velocity=cfr.lookVector*str,maxForce=v3(1/0,1/0,1/0),Name='LibBV'} deb:AddItem(tbbodyvelocity,debt)
  1758.  
  1759.  
  1760. end
  1761.  
  1762.  
  1763.  
  1764.  
  1765. AddBG=function(str,par,debt)
  1766.  
  1767.  
  1768. if not par then return end
  1769.  
  1770.  
  1771. if par:findFirstChild'LibBG' then par.LibBG:Remove() end
  1772.  
  1773.  
  1774. tbbodygyro=qi{'BodyGyro',par,maxTorque=v3(1/0,1/0,1/0),P=100000,cframe=str,Name='LibBG'} deb:AddItem(tbbodygyro,debt)
  1775.  
  1776.  
  1777. end
  1778.  
  1779.  
  1780.  
  1781.  
  1782. AddBAV=function(vec3,par,debt)
  1783.  
  1784.  
  1785. if not par then return end
  1786.  
  1787.  
  1788. if par:findFirstChild'LibBAV' then par.LibBAV:Remove() end
  1789.  
  1790.  
  1791. tbbodyangularvelocity=qi{'BodyAngularVelocity',par,maxTorque=v3(1/0,1/0,1/0),angularvelocity=vec3,Name='LibBAV'} deb:AddItem(tbbodyangularvelocity,debt)
  1792.  
  1793.  
  1794. end
  1795.  
  1796.  
  1797.  
  1798.  
  1799. Dmg = function(Hum,Dealt,Critical)
  1800.  
  1801.  
  1802. local HM=Hum.Parent
  1803.  
  1804.  
  1805. local HMT,HMB=HM:findFirstChild'Torso',HM:findFirstChild'Block'
  1806.  
  1807.  
  1808. local Blocks=HMB and HMB.Value>0
  1809.  
  1810.  
  1811. if HMT then
  1812.  
  1813.  
  1814. local mm=qi{'Model',HMT} qi{'Humanoid',mm,MaxHealth=0} deb:AddItem(mm,1)
  1815.  
  1816.  
  1817. 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}
  1818.  
  1819.  
  1820. if Blocks then
  1821.  
  1822.  
  1823. mm.Name='Block!'
  1824.  
  1825.  
  1826. mp.BrickColor=bn'Bright blue'
  1827.  
  1828.  
  1829. HMB.Value=HMB.Value-1
  1830.  
  1831.  
  1832. elseif not Blocks then
  1833.  
  1834.  
  1835. mm.Name=Dealt
  1836.  
  1837.  
  1838. mp.BrickColor=bn'Bright red'
  1839.  
  1840.  
  1841. end
  1842.  
  1843.  
  1844. end
  1845.  
  1846.  
  1847. if not Blocks then
  1848.  
  1849.  
  1850. Hum:TakeDamage(Dealt)
  1851.  
  1852.  
  1853. end
  1854.  
  1855.  
  1856. end
  1857.  
  1858.  
  1859.  
  1860.  
  1861. GetHum = function(part)
  1862.  
  1863.  
  1864. local Hum,HT,block
  1865.  
  1866.  
  1867. for i,v in pairs(part.Parent:children()) do
  1868.  
  1869.  
  1870. if v:IsA("Humanoid") then
  1871.  
  1872.  
  1873. Hum=v
  1874.  
  1875.  
  1876. elseif v.Name=='Torso' then
  1877.  
  1878.  
  1879. HT=v
  1880.  
  1881.  
  1882. elseif v.Name=='Block' and v:IsA("NumberValue") then
  1883.  
  1884.  
  1885. block=v
  1886.  
  1887.  
  1888. end
  1889.  
  1890.  
  1891. end
  1892.  
  1893.  
  1894. return Hum,HT,block
  1895.  
  1896.  
  1897. end
  1898.  
  1899.  
  1900.  
  1901.  
  1902. Lightning = function(p0,p1,tym,ofs,col,th,tra) -- start end times offset color thickness
  1903.  
  1904.  
  1905. local magz = (p0 - p1).magnitude local curpos = p0 local trz = {-ofs,ofs}
  1906.  
  1907.  
  1908. for i=1,tym do
  1909.  
  1910.  
  1911. local li = it("Part",c) li.TopSurface =0 li.BottomSurface = 0 li.Anchored = true li.Transparency = tra or 0.4 li.BrickColor = bc(col)
  1912.  
  1913.  
  1914. 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)])
  1915.  
  1916.  
  1917. local trolpos = cn(curpos,p1)*cn(0,0,magz/tym).p+ofz
  1918.  
  1919.  
  1920. if tym == i then
  1921.  
  1922.  
  1923. local magz2 = (curpos - p1).magnitude li.Size = v3(th,th,magz2)
  1924.  
  1925.  
  1926. li.CFrame = cn(curpos,p1)*cn(0,0,-magz2/2)
  1927.  
  1928.  
  1929. else
  1930.  
  1931.  
  1932. li.CFrame = cn(curpos,trolpos)*cn(0,0,magz/tym/2)
  1933.  
  1934.  
  1935. end
  1936.  
  1937.  
  1938. curpos = li.CFrame*cn(0,0,magz/tym/2).p de(li,0.25)
  1939.  
  1940.  
  1941. end
  1942.  
  1943.  
  1944. end
  1945.  
  1946.  
  1947.  
  1948.  
  1949. MakeCrater = function(pos,sc,tyms,debz,par) -- crater maker
  1950.  
  1951.  
  1952. q(function()
  1953.  
  1954.  
  1955. if not debz then
  1956.  
  1957.  
  1958. debz = 5
  1959.  
  1960.  
  1961. end
  1962.  
  1963.  
  1964. local bhit,bpos=ray(pos,pos - (pos + v3(0,200,0)))
  1965.  
  1966.  
  1967. if bhit and bpos then
  1968.  
  1969.  
  1970. for i=1,tyms do
  1971.  
  1972.  
  1973. q(function()
  1974.  
  1975.  
  1976. 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)
  1977.  
  1978.  
  1979. gr.Material = bhit.Material
  1980.  
  1981.  
  1982. gr.TopSurface = bhit.TopSurface
  1983.  
  1984.  
  1985. 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)))
  1986.  
  1987.  
  1988. wait(debz)
  1989.  
  1990.  
  1991. fade(gr,0.1)
  1992.  
  1993.  
  1994. end)
  1995.  
  1996.  
  1997. end
  1998.  
  1999.  
  2000. end
  2001.  
  2002.  
  2003. end)
  2004.  
  2005.  
  2006. end
  2007.  
  2008.  
  2009.  
  2010.  
  2011. MakeCrack = function(pos,sc,debz,par) -- crackmaker
  2012.  
  2013.  
  2014. q(function()
  2015.  
  2016.  
  2017. if not debz then
  2018.  
  2019.  
  2020. debz = 5
  2021.  
  2022.  
  2023. end
  2024.  
  2025.  
  2026. local bhit,bpos=ray(pos,pos - (pos + v3(0,10,0)))
  2027.  
  2028.  
  2029. if bhit and bpos then
  2030.  
  2031.  
  2032. local cr = pa(par or workspace,"Crack","Block",sc,0,sc,false,true,1,0,"") cr.CFrame = cn(bpos)
  2033.  
  2034.  
  2035. local dec=qi({"Decal",cr,Face="Top",Texture=ds.Crack}) de(cr,debz)
  2036.  
  2037.  
  2038. end
  2039.  
  2040.  
  2041. end)
  2042.  
  2043.  
  2044. end
  2045.  
  2046.  
  2047.  
  2048.  
  2049. a = {}
  2050.  
  2051.  
  2052. a.insw={}
  2053.  
  2054.  
  2055. function cleanweld(wexx,namzi)
  2056.  
  2057.  
  2058. local tn=ft2(a.insw,wexx)
  2059.  
  2060.  
  2061. if tn==nil then return end
  2062.  
  2063.  
  2064. if namzi=="p0" then
  2065.  
  2066.  
  2067. a.insw[tn][2]["p0x"],a.insw[tn][2]["p0y"],a.insw[tn][2]["p0z"]=0,0,0 elseif namzi=="p1" then
  2068.  
  2069.  
  2070. a.insw[tn][2]["p1x"],a.insw[tn][2]["p1y"],a.insw[tn][2]["p1z"]=0,0,0 elseif namzi=="a0" then
  2071.  
  2072.  
  2073. a.insw[tn][2]["a0x"],a.insw[tn][2]["a0y"],a.insw[tn][2]["a0z"]=0,0,0 elseif namzi=="a1" then
  2074.  
  2075.  
  2076. a.insw[tn][2]["a1x"],a.insw[tn][2]["a1y"],a.insw[tn][2]["a1z"]=0,0,0
  2077.  
  2078.  
  2079. end
  2080.  
  2081.  
  2082. end
  2083.  
  2084.  
  2085. function c2(wexx,smmx,c0orc1,aa,bb,cc,xx,yy,zz)
  2086.  
  2087.  
  2088. q(function()
  2089.  
  2090.  
  2091. c1(wexx,smmx,c0orc1,aa,bb,cc,xx,yy,zz)
  2092.  
  2093.  
  2094. end)
  2095.  
  2096.  
  2097. end
  2098.  
  2099.  
  2100. a.Welding=0
  2101.  
  2102.  
  2103. function c1(wexx,smmx,c0orc1,aa,bb,cc,xx,yy,zz)
  2104.  
  2105.  
  2106. if ft2(a.insw,wexx)==nil then
  2107.  
  2108.  
  2109. ti(a.insw,{wexx,{}})
  2110.  
  2111.  
  2112. local tn=ft2(a.insw,wexx)
  2113.  
  2114.  
  2115. a.insw[tn][2]["p0x"],a.insw[tn][2]["p0y"],a.insw[tn][2]["p0z"]=wexx.C0.x,wexx.C0.y,wexx.C0.z
  2116.  
  2117.  
  2118. a.insw[tn][2]["p1x"],a.insw[tn][2]["p1y"],a.insw[tn][2]["p1z"]=wexx.C1.x,wexx.C1.y,wexx.C1.z
  2119.  
  2120.  
  2121. a.insw[tn][2]["a0x"],a.insw[tn][2]["a0y"],a.insw[tn][2]["a0z"]=wexx.C0:toEulerAnglesXYZ()
  2122.  
  2123.  
  2124. a.insw[tn][2]["a1x"],a.insw[tn][2]["a1y"],a.insw[tn][2]["a1z"]=wexx.C1:toEulerAnglesXYZ()
  2125.  
  2126.  
  2127. end
  2128.  
  2129.  
  2130. local tn=ft2(a.insw,wexx)
  2131.  
  2132.  
  2133. local xx2,yy2,zz2=0,0,0
  2134.  
  2135.  
  2136. local x2,y2,z2=0,0,0
  2137.  
  2138.  
  2139. if c0orc1==0 then
  2140.  
  2141.  
  2142. xx2,yy2,zz2=a.insw[tn][2]["a0x"],a.insw[tn][2]["a0y"],a.insw[tn][2]["a0z"]
  2143.  
  2144.  
  2145. x2,y2,z2=a.insw[tn][2]["p0x"],a.insw[tn][2]["p0y"],a.insw[tn][2]["p0z"]
  2146.  
  2147.  
  2148. elseif c0orc1==1 then
  2149.  
  2150.  
  2151. xx2,yy2,zz2=a.insw[tn][2]["a1x"],a.insw[tn][2]["a1y"],a.insw[tn][2]["a1z"]
  2152.  
  2153.  
  2154. x2,y2,z2=a.insw[tn][2]["p1x"],a.insw[tn][2]["p1y"],a.insw[tn][2]["p1z"]
  2155.  
  2156.  
  2157. else
  2158.  
  2159.  
  2160. xx2,yy2,zz2=a.insw[tn][2]["a1x"],a.insw[tn][2]["a1y"],a.insw[tn][2]["a1z"]
  2161.  
  2162.  
  2163. x2,y2,z2=a.insw[tn][2]["p0x"],a.insw[tn][2]["p0y"],a.insw[tn][2]["p0z"]
  2164.  
  2165.  
  2166. end a.Welding=a.Welding + 1
  2167.  
  2168.  
  2169. local twa=1
  2170.  
  2171.  
  2172. if smmx >= 1 then
  2173.  
  2174.  
  2175. else
  2176.  
  2177.  
  2178. for i=smmx,0.8,smmx do
  2179.  
  2180.  
  2181. twa = 1
  2182.  
  2183.  
  2184. if c0orc1==0 then
  2185.  
  2186.  
  2187. 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))
  2188.  
  2189.  
  2190. elseif c0orc1==1 then
  2191.  
  2192.  
  2193. 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))
  2194.  
  2195.  
  2196. else local x,y,z = wexx.C0:toEulerAnglesXYZ()
  2197.  
  2198.  
  2199. wexx.C0=cn(x2-(((x2-aa)/twa)*i),y2-(((y2-bb)/twa)*i),z2-(((z2-cc)/twa)*i))*ca(x,y,z)
  2200.  
  2201.  
  2202. 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))
  2203.  
  2204.  
  2205. end
  2206.  
  2207.  
  2208. if fu then
  2209.  
  2210.  
  2211. q(fu)
  2212.  
  2213.  
  2214. end
  2215.  
  2216.  
  2217. wait()
  2218.  
  2219.  
  2220. end
  2221.  
  2222.  
  2223. for i=0.8,1,smmx*0.45 do
  2224.  
  2225.  
  2226. twa = 1
  2227.  
  2228.  
  2229. if c0orc1==0 then
  2230.  
  2231.  
  2232. 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))
  2233.  
  2234.  
  2235. elseif c0orc1==1 then
  2236.  
  2237.  
  2238. 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))
  2239.  
  2240.  
  2241. else local x,y,z = wexx.C0:toEulerAnglesXYZ()
  2242.  
  2243.  
  2244. wexx.C0=cn(x2-(((x2-aa)/twa)*i),y2-(((y2-bb)/twa)*i),z2-(((z2-cc)/twa)*i))*ca(x,y,z)
  2245.  
  2246.  
  2247. 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))
  2248.  
  2249.  
  2250. end
  2251.  
  2252.  
  2253. wait()
  2254.  
  2255.  
  2256. end
  2257.  
  2258.  
  2259. end
  2260.  
  2261.  
  2262. local i=1
  2263.  
  2264.  
  2265. if c0orc1==0 then
  2266.  
  2267.  
  2268. 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))
  2269.  
  2270.  
  2271. elseif c0orc1==1 then
  2272.  
  2273.  
  2274. 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))
  2275.  
  2276.  
  2277. else local x,y,z = wexx.C0:toEulerAnglesXYZ()
  2278.  
  2279.  
  2280. wexx.C0=cn(x2-(((x2-aa)/twa)*i),y2-(((y2-bb)/twa)*i),z2-(((z2-cc)/twa)*i))*ca(x,y,z)
  2281.  
  2282.  
  2283. 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))
  2284.  
  2285.  
  2286. end
  2287.  
  2288.  
  2289. a.Welding=a.Welding - 1
  2290.  
  2291.  
  2292. local tn=ft2(a.insw,wexx)
  2293.  
  2294.  
  2295. if c0orc1==0 then
  2296.  
  2297.  
  2298. 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)
  2299.  
  2300.  
  2301. 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)
  2302.  
  2303.  
  2304. elseif c0orc1==1 then
  2305.  
  2306.  
  2307. 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)
  2308.  
  2309.  
  2310. 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)
  2311.  
  2312.  
  2313. elseif c0orc1==3 then
  2314.  
  2315.  
  2316. local x,y,z=wexx.C0.x,wexx.C0.y,wexx.C0.z
  2317.  
  2318.  
  2319. 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)
  2320.  
  2321.  
  2322. local x,y,z=wexx.C1:toEulerAnglesXYZ()
  2323.  
  2324.  
  2325. 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)
  2326.  
  2327.  
  2328. end
  2329.  
  2330.  
  2331. end
  2332.  
  2333.  
  2334.  
  2335.  
  2336. Welds={}
  2337.  
  2338.  
  2339. Ani=function(w,a,b,c,d,e,f,ty,inc,sined)
  2340.  
  2341.  
  2342. if not Welds[w] then
  2343.  
  2344.  
  2345. local d0,e0,f0=w.C0:toEulerAnglesXYZ() local d1,e1,f1=w.C1:toEulerAnglesXYZ()
  2346.  
  2347.  
  2348. local d0,e0,f0=mdeg(d0),mdeg(e0),mdeg(f0) local d1,e1,f1=mdeg(d1),mdeg(e1),mdeg(f1)
  2349.  
  2350.  
  2351. 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}}
  2352.  
  2353.  
  2354. end
  2355.  
  2356.  
  2357. local c0,c1=Welds[w][0],Welds[w][1]
  2358.  
  2359.  
  2360. c0[1],c0[2],c0[3]=w.C0.x,w.C0.y,w.C0.z
  2361.  
  2362.  
  2363. c1[1],c1[2],c1[3]=w.C1.x,w.C1.y,w.C1.z
  2364.  
  2365.  
  2366. local A0,B0,C0,D0,E0,F0 = unpack(c0)
  2367.  
  2368.  
  2369. local A1,B1,C1,D1,E1,F1 = unpack(c1)
  2370.  
  2371.  
  2372. local Do = function(i)
  2373.  
  2374.  
  2375. if ty==0 then
  2376.  
  2377.  
  2378. 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) )
  2379.  
  2380.  
  2381. elseif ty==1 then
  2382.  
  2383.  
  2384. 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) )
  2385.  
  2386.  
  2387. else
  2388.  
  2389.  
  2390. w.C0=cn( A0-((A0-a)*i) , B0-((B0-b)*i) , C0-((C0-c)*i) ) * ca2(D0,E0,F0)
  2391.  
  2392.  
  2393. w.C1=cn(A1,B1,C1) * ca2( D1-((D1-d)*i) , E1-(((E1-e)/1)*i) , F1-((F1-f)*i) )
  2394.  
  2395.  
  2396. end
  2397.  
  2398.  
  2399. end
  2400.  
  2401.  
  2402. for i=inc,1,inc do
  2403.  
  2404.  
  2405. Do(sined and math.sin(math.pi/2*i) or i)
  2406.  
  2407.  
  2408. wait()
  2409.  
  2410.  
  2411. end
  2412.  
  2413.  
  2414. Do(1)
  2415.  
  2416.  
  2417. if ty==0 then
  2418.  
  2419.  
  2420. c0[4],c0[5],c0[6]=d,e,f
  2421.  
  2422.  
  2423. else
  2424.  
  2425.  
  2426. c1[4],c1[5],c1[6]=d,e,f
  2427.  
  2428.  
  2429. end
  2430.  
  2431.  
  2432. end
  2433.  
  2434.  
  2435. 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
  2436.  
  2437.  
  2438. rAni=function(w)
  2439.  
  2440.  
  2441. Welds[w]=nil
  2442.  
  2443.  
  2444. end
  2445.  
  2446.  
  2447.  
  2448.  
  2449. gunshot = function(speed,sc,dmg,cff) q(function() -- gunshot function
  2450.  
  2451.  
  2452. local bb = pa(workspace,"bullet","Block",0.2*sc,0.3*sc,0.2*sc,true,true,0,0.1,"Black") qi({"CylinderMesh",bb})
  2453.  
  2454.  
  2455. bb.CFrame = cff*ca(rd(rn(-1000,1000)/1500),rd(rn(-1000,1000)/1500),rd(rn(-1000,1000)/1500))
  2456.  
  2457.  
  2458. so(ds.Fire,bb,0.3,1) wait() for i=1,50 do
  2459.  
  2460.  
  2461. bhit,bpos=ray(bb.Position,bb.Position - (bb.CFrame *cn(0,-1,0)).p)
  2462.  
  2463.  
  2464. if bhit and bhit.Name ~= "bullet" and bhit.Name ~= "bullethole" and bpos and (bpos - bb.Position).magnitude < speed then break end
  2465.  
  2466.  
  2467. bb.CFrame=bb.CFrame*cn(0,speed,0)*ca(rd(-0.2),0,0)
  2468.  
  2469.  
  2470. wait()
  2471.  
  2472.  
  2473. end bb.CFrame=bb.CFrame*cn(0,(bpos-bb.Position).magnitude,0)
  2474.  
  2475.  
  2476. if not bhit.Anchored then
  2477.  
  2478.  
  2479. if bhit.Parent:findFirstChild("Humanoid") then local h = bhit.Parent.Humanoid h.Health=h.Health-dmg so(ds.Hit,bhit,0.3,1) end
  2480.  
  2481.  
  2482. else if bhit.Name~="Base" then bhit.Anchored=false bhit:BreakJoints() end end bb:Remove()
  2483.  
  2484.  
  2485. if bhit.Parent:findFirstChild("Humanoid") == nil then BulletHole(bpos,bhit,0.7*sc) end
  2486.  
  2487.  
  2488. end) end
  2489.  
  2490.  
  2491.  
  2492.  
  2493. dive = function(ob2,pro,ite,stof)
  2494.  
  2495.  
  2496. local function div(ob) for i,v in pairs(ob:children()) do if v[pro] == ite then
  2497.  
  2498.  
  2499. for i=1,#stof do v[stof[i][1]] = stof[i][2] end else div(v) end end end
  2500.  
  2501.  
  2502. div(ob2)
  2503.  
  2504.  
  2505. end
  2506.  
  2507.  
  2508.  
  2509.  
  2510. fc = function(ob,cl)
  2511.  
  2512.  
  2513. for i,v in pairs(ob:children()) do if v.className:lower()==cl:lower() then return v end end
  2514.  
  2515.  
  2516. end
  2517.  
  2518.  
  2519.  
  2520.  
  2521. function se(Key,Text)
  2522.  
  2523.  
  2524. local Values = {}
  2525.  
  2526.  
  2527. for value in (Text..Key):gmatch("(.-)"..Key) do
  2528.  
  2529.  
  2530. table.insert(Values,value)
  2531.  
  2532.  
  2533. end return Values
  2534.  
  2535.  
  2536. end
  2537.  
  2538.  
  2539.  
  2540.  
  2541. local thefenv = getfenv()
  2542.  
  2543.  
  2544. getfenv()["rmhelp"] = function()
  2545.  
  2546.  
  2547. local nus = 0
  2548.  
  2549.  
  2550. for i,v in pairs(thefenv) do if i ~= "wait" and i ~= "script" then nus = nus + 1 wait(0.05)
  2551.  
  2552.  
  2553. print(string.rep(" ",3-#tostring(nus)) ..nus.. ") " ..i.. " (" ..type(v).. ")")
  2554.  
  2555.  
  2556. end
  2557.  
  2558.  
  2559. end
  2560.  
  2561.  
  2562. end
  2563.  
  2564.  
  2565.  
  2566.  
  2567. for i,v in pairs(thefenv) do
  2568.  
  2569.  
  2570. _G[i] = v
  2571.  
  2572.  
  2573. --print(i)
  2574.  
  2575.  
  2576. end
  2577.  
  2578.  
  2579.  
  2580.  
  2581. _G[" T".."B".."L".."i".."b "] = [[
  2582.  
  2583.  
  2584. for i,v in pairs(_G) do
  2585.  
  2586.  
  2587. if i ~= "wait" and i ~= "script" then
  2588.  
  2589.  
  2590. getfenv()[i] = v
  2591.  
  2592.  
  2593. end
  2594.  
  2595.  
  2596. end
  2597.  
  2598.  
  2599. ]]
  2600. ---loadstring(_G[" TBLib "])()
  2601.  
  2602. Player=game:GetService("Players").LocalPlayer
  2603. Char=Player.Character
  2604. Backpack=Player.Backpack
  2605. PlayerGui=Player.PlayerGui
  2606. Torso=Char.Torso
  2607. Head=Char.Head
  2608. Hum=Char.Humanoid
  2609. Cam=workspace.CurrentCamera
  2610. Tn="Sniper"
  2611.  
  2612. pcall(function() Backpack[Tn]:Remove() end)
  2613. pcall(function() Cam[Tn]:Remove() end)
  2614. pcall(function() thesuit=Char[''] end)
  2615. pcall(function() thesuit[Tn]:Remove() end)
  2616. pcall(function() PlayerGui[Tn]:Remove() end)
  2617. pcall(function() Char.Block:Remove() end)
  2618.  
  2619. CModel=qi{'Model',Cam,Name=Tn}
  2620. Tool=qi{'HopperBin',Player.Backpack,Name=Tn}
  2621. Suit=qi{'Model',Char,Name=''}
  2622. Weapon=qi{'Model',Suit,Name=Tn}
  2623. Gui=qi{'ScreenGui',PlayerGui,Name=Tn}
  2624. Block=qi{'NumberValue',Char,Name='Block'}
  2625.  
  2626. equip="unequipped"
  2627. anim=""
  2628. keys={}
  2629. fmouse=nil
  2630. UseGyro=true
  2631. LastShot=0
  2632. LastAssassination=0
  2633. Mode="Normal"
  2634. running=false
  2635. Timer=0
  2636. Combo=0
  2637. Clip=1
  2638.  
  2639. ids = {}
  2640. ids.Diamond = 9756362
  2641. ids.Slash = 10209645
  2642. ids.Slash2 = 46760716
  2643. ids.Slash3 = 10209640
  2644. ids.Bullet = 10207677
  2645. ids.Crown = 20329976
  2646. ids.Crown2 = 1323306
  2647. ids.Fire = 10209257
  2648. ids.Reload = 10209881
  2649. ids.Crack = 49173398
  2650. ids.Scream = 89487903
  2651. ids.Spike = 1033714
  2652. ids.Hit = 10209590
  2653. ids.Shine = 48965808
  2654. ids.Ring = 3270017
  2655.  
  2656. for i,v in pairs(ids) do
  2657. if type(v)=='number' then
  2658. ids[i]='http://www.roblox.com/asset/?id='..v
  2659. end
  2660. game:GetService("ContentProvider"):Preload(ids[i])
  2661. end
  2662.  
  2663. Limbs={LS=Torso:findFirstChild'Left Shoulder',RS=Torso:findFirstChild'Right Shoulder',LH=Torso:findFirstChild'Left Hip',RH=Torso:findFirstChild'Right Hip'}
  2664. if _G.Limbz then
  2665. Limbs.LS=Limbs.LS or _G.Limbz.LS
  2666. Limbs.RS=Limbs.RS or _G.Limbz.RS
  2667. Limbs.LH=Limbs.LH or _G.Limbz.LH
  2668. Limbs.RH=Limbs.RH or _G.Limbz.RH
  2669. end
  2670. _G.Limbz=Limbs
  2671. Torso.Neck.C0=cn(0,1.5,0) Torso.Neck.C1=cn(0,0,0)
  2672. LS,RS,LH,RH=Limbs.LS,Limbs.RS,Limbs.LH,Limbs.RH
  2673. LA,RA,LL,RL=Char['Left Arm'],Char['Right Arm'],Char['Left Leg'],Char['Right Leg']
  2674. LS.Part0,RS.Part0,LH.Part0,RH.Part0=Torso,Torso,Torso,Torso
  2675. LS.Part1,RS.Part1,LH.Part1,RH.Part1=LA,RA,LL,RL
  2676.  
  2677. pcall(function() thesuit:Remove() end)
  2678.  
  2679. fTorso=Char.HumanoidRootPart tw=fTorso.RootJoint hw=Torso.Neck c2(tw,1,3,0,0,0,90,180,0)
  2680. 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)}
  2681. 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)}
  2682.  
  2683. Arms = function(on)
  2684. if on then
  2685. LS.Part1=nil RS.Part1=nil
  2686. la.Part0=Torso ra.Part0=Torso
  2687. la.Part1=LA ra.Part1=RA
  2688. la.C0,la.C1=cn(-1.5,0.5,0),cn(0,0.5,0)
  2689. ra.C0,ra.C1=cn(1.5,0.5,0),cn(0,0.5,0)
  2690. else
  2691. LS.Parent,RS.Parent=Torso,Torso
  2692. LS.Part0=Torso
  2693. RS.Part0=Torso
  2694. LS.Part1=LA
  2695. RS.Part1=RA
  2696. la.Part1=nil ra.Part1=nil
  2697. end
  2698. end
  2699.  
  2700. Legs = function(on)
  2701. if on then
  2702. LH.Part1=nil RH.Part1=nil
  2703. ll.Part0=Torso rl.Part0=Torso
  2704. ll.Part1=LL rl.Part1=RL
  2705. ll.C0,ll.C1=cn(-0.5,-1,0),cn(0,1,0)
  2706. rl.C0,rl.C1=cn(0.5,-1,0),cn(0,1,0)
  2707. else
  2708. LH.Parent,RH.Parent=Torso,Torso
  2709. LH.Part0=Torso
  2710. RH.Part0=Torso
  2711. LH.Part1=LL
  2712. RH.Part1=RL
  2713. ll.Part1=nil rl.Part1=nil
  2714. end
  2715. end
  2716.  
  2717.  
  2718. function Design(c)
  2719. local bm="BlockMesh"
  2720. local sm="SpecialMesh"
  2721. local cm="CylinderMesh"
  2722. ha=pa(Weapon,"","Block",0.4,0.6,1.5,false,false,0,0,c[1]) haw=weld(ha,Torso,ha,0.5,2.5,0.7,rd(270),0,rd(90)) qi{bm,ha}
  2723. p=pa(Weapon,"","Block",0.4,1.5,0.6,false,false,0,0,c[1]) weld(p,ha,p,0,-0.6,0,rd(-90),0,0) qi{sm,p,MeshType="Wedge"}
  2724. p=pa(Weapon,"","Block",0.4,1.2,0.2,false,false,0,0,c[2]) weld(p,ha,p,0,-0.3,1.6/2,0,0,0) qi{bm,p,Scale=v3(1,1,0.5)}
  2725. p1=pa(Weapon,"","Block",0.41,0.95,0.5,false,false,0,0,c[3]) weld(p1,ha,p1,0,-0.165,0.35,rd(180),0,0) qi{sm,p1,MeshType="Wedge"}
  2726. p1=pa(Weapon,"","Block",0.41,1.5,0.6,false,false,0,0,c[3]) weld(p1,ha,p1,0,-0.36,-0.65,rd(-90),0,0) qi{sm,p1,MeshType="Wedge"}
  2727. p1=pa(Weapon,"","Block",0.41,1.5,0.425,false,false,0,0,c[3]) weld(p1,ha,p1,0,0.11-0.0125,-0.65,rd(-90),0,0) qi{bm,p1}
  2728. bs=pa(Weapon,"","Block",0.4,0.4,1.5,false,false,0,0,c[1]) weld(bs,ha,bs,0,0.1,-1,0,0,0) qi{bm,bs}
  2729. b=pa(Weapon,"","Block",0.4,0.8,2,false,false,0,0,c[1]) weld(b,bs,b,0,0.2,-1.75,0,0,0) qi{bm,b}
  2730. p=pa(Weapon,"","Block",0.4,0.4,0.4,false,false,0,0,c[1]) weld(p,bs,p,0,0.4,-0.55,0,rd(180),0) qi{sm,p,MeshType="Wedge"}
  2731. p=pa(Weapon,"","Block",0.2,0.3,0.2,false,false,0,0,c[4]) weld(p,ha,p,0,-0.6,-0.2,rd(15),0,0) qi{bm,p,Scale=v3(1,1,0.5)}
  2732. p=pa(Weapon,"","Block",0.2,0.5,0.2,false,false,0,0,c[4]) weld(p,ha,p,0,-0.7,-0.445,rd(-75),0,0) qi{bm,p,Scale=v3(1,1,0.5)}
  2733. p=pa(Weapon,"","Block",0.2,0.5,0.2,false,false,0,0,c[4]) weld(p,ha,p,0,-0.7,-0.875,rd(-105),0,0) qi{bm,p,Scale=v3(1,1,0.5)}
  2734. p=pa(Weapon,"","Block",0.2,0.4,0.2,false,false,0,0,c[4]) weld(p,ha,p,0,-0.6,-1.05,rd(15),0,0) qi{bm,p,Scale=v3(1,1,0.5)}
  2735. p=pa(Weapon,"","Block",0.2,0.4,0.2,false,false,0,0,c[4]) weld(p,ha,p,0,-0.25,-1.05,rd(-15),0,0) qi{bm,p,Scale=v3(1,1,0.5)}
  2736. p=pa(Weapon,"","Block",0.2,0.4,0.4,false,false,0,0,c[4]) weld(p,ha,p,0,-0.375,-0.6,rd(-45),0,0) qi{bm,p,Scale=v3(1,1,0.5)}
  2737. p=pa(Weapon,"","Block",0.2,1,0.2,false,false,0,0,c[5]) weld(p,ha,p,0,-0.3125,-1.1,0,0,0) qi{bm,p,Scale=v3(1.01,1,0.5)}
  2738. p=pa(Weapon,"","Block",0.2,1.5,1,false,false,0,0,c[5]) weld(p,ha,p,0,-0.3125,-1.9,rd(-90),0,0) qi{sm,p,Scale=v3(1.01,1,1),MeshType="Wedge"}
  2739. tb=pa(Weapon,"","Block",0.4,2.5,0.4,false,false,0,0.15,c[4]) weld(tb,b,tb,0,0.5,-0.25,rd(90),0,0) qi{cm,tb}
  2740. p=pa(Weapon,"","Block",0,0,0,false,false,0,0,c[4]) weld(p,tb,p,0,1.3,0,rd(180),0,0) qi{sm,p,Scale=v3(0.15,0.4,0.15),MeshId=ids.Spike}
  2741. p=pa(Weapon,"","Block",0,0,0,false,false,0,0,c[4]) weld(p,tb,p,0,1.325,0,0,0,0) qi{sm,p,Scale=v3(0.2,0.2,0.2),MeshId=ids.Spike}
  2742. h0=pa(Weapon,"","Block",0,0,0,false,false,0,0) reloadw=weld(h0,tb,h0,0.2,0.7,0,0,0,rd(-20)) qi{sm,h0,MeshType="Sphere"}
  2743. h1=pa(Weapon,"","Block",0,0,0,false,false,1,0) weld(h1,h0,h1,0,0,0,0,0,rd(-20))
  2744. p=pa(Weapon,"","Block",0.2,0.5,0.2,false,false,0,0,c[4]) weld(p,h1,p,0,0,0,0,0,rd(90)) qi{cm,p}
  2745. h2=pa(Weapon,"","Block",0,0,0,false,false,0,0) weld(h2,p,h2,0,-0.25,0,0,0,rd(40)) qi{sm,h2,MeshType="Sphere"}
  2746. p=pa(Weapon,"","Block",0.2,0.3,0.2,false,false,0,0,c[4]) weld(p,h2,p,-0.15,0,0,0,0,rd(90)) qi{cm,p}
  2747. pp=pa(Weapon,"","Block",0.3,0.3,0.3,false,false,0,0,c[4]) weld(pp,p,pp,0,0.15,0,0,0,0) qi{sm,pp,MeshType="Sphere"}
  2748. p=pa(Weapon,"","Block",0.4,0.8,0.5,false,false,0,0,c[1]) weld(p,b,p,0,0,-1.25,0,0,0) qi{bm,p}
  2749. p=pa(Weapon,"","Block",0.41,0.81,1.76,false,false,0,0,c[3]) weld(p,b,p,0,0,-1+0.125,0,0,0) qi{bm,p}
  2750. p=pa(Weapon,"","Block",0.41,1.76,0.41,false,false,0,0,c[3]) weld(p,tb,p,0,-0.75+0.125,0,0,0,0) qi{cm,p}
  2751. bb=pa(Weapon,"","Block",0.4,1.5,0.4,false,false,0,0,c[4]) weld(bb,tb,bb,0,-1.5,0,0,0,0) qi{cm,bb}
  2752. sp=pa(Weapon,"","Block",0.5,0.2,0.5,false,false,0,0,c[5]) weld(sp,bb,sp,0,-0.5,0,0,0,0) qi{cm,sp}
  2753. sp1=pa(Weapon,"","Block",0.3,0.21,0.2,false,false,0,0,c[6]) weld(sp1,sp,sp1,0,0,-0.3,0,0,0) qi{bm,sp1}
  2754. is=pa(Weapon,"","Block",0,0,0,false,false,0,0,c[5]) weld(is,sp1,is,0,0,-0.3,rd(90),0,0) qi{sm,is,MeshId=ids.Ring,Scale=v3(0.4,0.4,0.4)}
  2755. is2=pa(Weapon,"","Block",0.2,0.2,0.2,false,false,0,0,c[5]) weld(is2,is,is2,0,0.1,0,0,0,0) qi{bm,is2,Scale=v3(0.25,1,0.25)}
  2756. sp2=pa(Weapon,"","Block",0,0,0,false,false,0,0,c[4]) weld(sp2,bb,sp2,0,-0.7,0,0,0,0) qi{sm,sp2,MeshId=ids.Spike,Scale=v3(0.3,0.6,0.3)}
  2757. ho=pa(Weapon,"","Block",0.4,0.2,0.4,false,false,0,0,c[7]) weld(ho,sp2,ho,0,-0.225,0,0,0,0) qi{cm,ho,Scale=v3(1,0.05,1)}
  2758. p=pa(Weapon,"","Block",0.4,0.8,0.3,false,false,0,0,c[1]) weld(p,b,p,0,0,-1.9,0,0,0) qi{bm,p}
  2759. p1=pa(Weapon,"","Block",0.2,0.5,0.2,false,false,0,0,c[4]) weld(p1,p,p1,0,-0.1,-0.3,rd(90),0,0) qi{cm,p1}
  2760. p2=pa(Weapon,"","Block",0.3,0.3,0.3,false,false,0,0,c[4]) weld(p2,p1,p2,0,-0.4,0,0,0,0) qi{cm,p2}
  2761. for i,v in pairs(Weapon:GetChildren()) do v.CanCollide=false end
  2762. end
  2763.  
  2764. Design({"Brown","Black","Br. yellowish green","Mid grey","Dark stone grey","Bright red","Really black"})
  2765. Arms(false) Legs(false)
  2766.  
  2767. BBD,BBT,Dealt,DmgMult=0,{},{15,25},1
  2768.  
  2769. function Stance(speed)
  2770. c2(ra,speed,3,1.25,0.5,-0.25,-75,-65,0)
  2771. c2(la,speed,3,-1.25,0.5,-0.25,-70,-20,0)
  2772. c2(ll,speed,3,-0.5,-1,0,0,0,0)
  2773. c2(rl,speed,3,0.5,-1,0,0,0,0)
  2774. c2(hw,speed,3,0,1.5,0,0,-65,0)
  2775. c2(tw,speed,3,0,0,0,90,180,65)
  2776. c2(reloadw,speed,3,0.2,0.7,0,0,0,-20)
  2777. Ani(haw,0,-0.2,0,-75,0,0,0,speed/2,1)
  2778. end
  2779.  
  2780. function Reset(speed)
  2781. c2(ra,speed,3,1.5,0.5,0,0,0,0)
  2782. c2(la,speed,3,-1.5,0.5,0,0,0,0)
  2783. c2(ll,speed,3,-0.5,-1,0,0,0,0)
  2784. c2(rl,speed,3,0.5,-1,0,0,0,0)
  2785. c2(hw,speed,3,0,1.5,0,0,0,0)
  2786. c2(tw,speed,3,0,0,0,90,180,0)
  2787. c2(reloadw,speed,3,0.2,0.7,0,0,0,-20)
  2788. Ani(haw,0.5,2.5,0.7,270,0,90,0,speed,1)
  2789. end
  2790.  
  2791. function Reload()
  2792. anim="Reload"
  2793. Stance(0.2)
  2794. local ofs = LA.CFrame:toObjectSpace(ha.CFrame)
  2795. haw.Part0=LA haw.C0=ofs haw.C1=cn(0,0,0) rAni(haw)
  2796. c1(ra,0.15,3,-0.3,0.5,-1.1,-110,-50,0)
  2797. so(ids.Reload,ha,1,1)
  2798. c2(ra,0.15,3,0,0.5,-1,-110,-50,0)
  2799. c1(reloadw,0.1,3,0.2,0.7,0,0,0,-80)
  2800. c2(ra,0.15,3,-0.3,0.5,-1.1,-110,-50,0)
  2801. c1(reloadw,0.14,3,0.2,0.7,0,0,0,-20)
  2802. Clip=Clip+1
  2803. c2(ra,0.16,3,1.25,0.5,-0.25,-75,-65,0)
  2804. wait(0.5)
  2805. local ofs = RA.CFrame:toObjectSpace(ha.CFrame)
  2806. haw.Part0=RA haw.C0=ofs haw.C1=cn(0,0,0) rAni(haw)
  2807. Ani(haw,0,-0.2,0,-75,0,0,0,0.1,1)
  2808. anim=""
  2809. end
  2810.  
  2811. function Trail(Loops,Part,Time,Color,Thickness,Offset)
  2812. q(function()
  2813. local oldpos=(Part.CFrame *Offset).p
  2814. local lopz2=0
  2815. local function loltr()
  2816. local obp=(Part.CFrame *Offset).p
  2817. lopz2=lopz2 + 1
  2818. local mag=(oldpos - obp).magnitude
  2819. local tr=pa(Part,"trail","Block",0,0,0,false,true,0.5,0,Color)
  2820. tr.CanCollide=false
  2821. tr.CFrame=cn(oldpos,obp)
  2822. tr.CFrame=tr.CFrame + tr.CFrame.lookVector*(mag/2)
  2823. local trm=qi{'CylinderMesh',tr,Scale=v3(5*Thickness,mag*5,5*Thickness)}
  2824. q(function()
  2825. for i=5*Thickness,0,-5*Thickness/10 do
  2826. trm.Scale=v3(i,mag*5,i) w()
  2827. end
  2828. tr:Remove''
  2829. end)
  2830. tr.CFrame=tr.CFrame*ca(rd(90),0,0) oldpos=obp
  2831. repeat loltr() wait(Time) until lopz2 == Loops
  2832. loltr()
  2833. end
  2834. end)
  2835. end
  2836.  
  2837. Fire = function(speed,cff,dest)
  2838. q(function()
  2839. local bb = pa(workspace,"bullet","Block",1,1,1,false,true,0.5,0,"White") bb.CanCollide=false qi{"SpecialMesh",bb,MeshType="Sphere",Scale=v3(0.25,15,0.25)}
  2840. bb.CFrame = cn(cff.p,dest)*ca(rd(90),0,0)
  2841. local m=pa(workspace,"muzzle","Block",0,0,0,false,false,0,0,"Bright orange") qi{"SpecialMesh",m,MeshId=ids.Crown,Scale=v3(0.5,0.5,0.5)} weld(m,ho,m,0,-0.3,0,rd(180),0,0) fade(m,0.2)
  2842. local m=pa(workspace,"muzzle","Block",0,0,0,false,false,0,0,"Bright orange") qi{"SpecialMesh",m,MeshId=ids.Crown2,Scale=v3(0.4,0.7,0.4)} weld(m,ho,m,0,-0.65,0,rd(180),0,0) fade(m,0.2)
  2843. for i=1,300 do
  2844. bhit,bpos=ray(bb.Position,bb.Position - (bb.CFrame *cn(0,1,0)).p)
  2845. if bhit and bhit.Name ~= "bullet" and bhit.Name~="muzzle" and bhit.Parent~=Char and bhit.Parent.Parent~=Char and bhit.Parent.Parent.Parent~=Char and bpos and (bpos - bb.Position).magnitude < speed then break end
  2846. bb.CFrame=bb.CFrame*cn(0,-speed,0)
  2847. if Mode=="Heatseek" then
  2848. pcall(function()
  2849. bb.CFrame = cn(cff.p,fmouse.Hit.Parent:findFirstChild("Torso").Position)*ca(rd(90),0,0)
  2850. end)
  2851. end
  2852. wait()
  2853. end
  2854. so(ids.Hit,bb,1,0.4)
  2855. if anim=="Assassinate" then
  2856. DmgMult=3
  2857. else
  2858. DmgMult=1
  2859. end
  2860. bb.CFrame=bb.CFrame*cn(0,(bpos-bb.Position).magnitude,0)
  2861. BBD=2
  2862. deb:AddItem(bb,0.05)
  2863. if GetHum(bhit) then
  2864. local vHum=GetHum(bhit)
  2865. if not vHum or BBD==0 or BBT[vHum.Parent] then return end
  2866. BBT[vHum.Parent]=1
  2867. Dmg(vHum,rn(Dealt[1],Dealt[2])*DmgMult)
  2868. so(ids.Hit,bhit,1,1)
  2869. HMT=vHum.Parent:findFirstChild("Torso")
  2870. if HMT and BBD==2 then
  2871. AddBV(50,cn(bb.Position,HMT.Position),HMT,0.15)
  2872. end
  2873. BBT[vHum.Parent]=nil
  2874. elseif GetHum(bhit.Parent) then
  2875. local vHum=GetHum(bhit.Parent)
  2876. if not vHum or BBD==0 or BBT[vHum.Parent] then return end
  2877. BBT[vHum.Parent]=1
  2878. Dmg(vHum,rn(Dealt[1],Dealt[2])*DmgMult)
  2879. so(ids.Hit,bhit,1,1)
  2880. HMT=vHum.Parent:findFirstChild("Torso")
  2881. if HMT and BBD==2 then
  2882. AddBV(50,cn(bb.Position,HMT.Position),HMT,0.15)
  2883. end
  2884. BBT[vHum.Parent]=nil
  2885.  
  2886. elseif GetHum(bhit.Parent.Parent) then
  2887. local vHum=GetHum(bhit.Parent.Parent)
  2888. if not vHum or BBD==0 or BBT[vHum.Parent] then return end
  2889. BBT[vHum.Parent]=1
  2890. Dmg(vHum,rn(Dealt[1],Dealt[2])*DmgMult)
  2891. so(ids.Hit,bhit,1,1)
  2892. HMT=vHum.Parent:findFirstChild("Torso")
  2893. BBT[vHum.Parent]=nil
  2894. end
  2895. BBD=0
  2896. DmgMult=1
  2897. end)
  2898. end
  2899.  
  2900. function Button1Down()
  2901. if anim=="" and equip=="equipped" and Clip==1 then
  2902. Clip=Clip-1
  2903. so(ids.Fire,ha,1,0.4)
  2904. Fire(13,ho.CFrame*cn(0,-0.5,0),fmouse.Hit.p)
  2905. elseif anim=="" and equip=="equipped" and Clip==0 then
  2906. Reload()
  2907. end
  2908. end
  2909.  
  2910. function KeyDown(key)
  2911. key=key:lower()
  2912. keys[key]=true
  2913. if key=="x" and equip=="equipped" and anim=="" and (tick()-LastAssassination>=1) then
  2914. if not fmouse.Target or not fmouse.Hit then return end
  2915. if GetHum(fmouse.Target) or GetHum(fmouse.Target.Parent) or GetHum(fmouse.Target.Parent.Parent) or GetHum(fmouse.Target.Parent.Parent.Parent) then
  2916. if Clip==1 then
  2917. local ft=nil
  2918. if GetHum(fmouse.Target) then
  2919. ft=GetHum(fmouse.Target)
  2920. elseif GetHum(fmouse.Target.Parent) then
  2921. ft=GetHum(fmouse.Target.Parent)
  2922. elseif GetHum(fmouse.Target.Parent.Parent) then
  2923. ft=GetHum(fmouse.Target.Parent.Parent)
  2924. elseif GetHum(fmouse.Target.Parent.Parent.Parent) then
  2925. ft=GetHum(fmouse.Target.Parent.Parent.Parent)
  2926. end
  2927. LastAssassination=tick()
  2928. Hum.WalkSpeed=0
  2929. anim="Assassinate"
  2930. Legs(true)
  2931. so(ids.Reload,ha,1,1)
  2932. c2(hw,0.08,3,0.15,1.5,0,math.deg((Torso.Position-fmouse.Hit.p).unit.y),0,20)
  2933. c2(ra,0.08,3,1.25,0.5,1,-75+math.deg((Torso.Position-fmouse.Hit.p).unit.y)/2,-10,0)
  2934. c2(la,0.08,3,-0.5,0.5,-1,-70+math.deg((Torso.Position-fmouse.Hit.p).unit.y),55,0)
  2935. c2(tw,0.08,3,0,-1,0,90,180,0)
  2936. c2(ll,0.08,3,-0.5,0,-1,0,0,0)
  2937. c2(rl,0.08,3,0.5,-1.5,-0.5,90,0,0)
  2938. Ani(haw,0,-0.2,0.3,-75,0,0,0,0.05,1)
  2939. wait(1)
  2940. Clip=Clip-1
  2941. Fire(7,ho.CFrame*cn(0,-0.5,0),ft.Parent.Torso.Position)
  2942. so(ids.Fire,ha,1,0.4)
  2943. wait(1.5)
  2944. else
  2945. Reload()
  2946. end
  2947. Stance(0.1)
  2948. Legs(false)
  2949. anim=""
  2950. Hum.WalkSpeed=16
  2951. else
  2952. return
  2953. end
  2954.  
  2955. elseif key=="w" and equip=="equipped" and anim=="" then
  2956. if Combo==0 then
  2957. Combo=1
  2958. q(function()
  2959. wait(0.1)
  2960. if Combo==0 then
  2961. Combo=-0.5
  2962. Stance(0.2)
  2963. Hum.WalkSpeed=16
  2964. anim=""
  2965. Timer=0
  2966. Combo=0
  2967. end
  2968. end)
  2969. elseif Combo==1 then
  2970. Combo=1.5
  2971. anim="AlmostRunning"
  2972. Hum.WalkSpeed=24
  2973. UseGyro=false
  2974. c2(ra,0.2,3,1.25,0.5,-0.25,-75,-65,0)
  2975. c2(la,0.2,3,-1.25,0.5,-0.25,-65,-30,0)
  2976. c2(tw,0.2,3,0,0,0,90,180,0)
  2977. c1(hw,0.2,3,0,1.5,0,0,0,0)
  2978. anim="Running"
  2979. Combo=2
  2980. repeat wait() Timer=Timer+0.05 until Timer>=5 or not keys[key] or not running
  2981. Stance(0.2)
  2982. Hum.WalkSpeed=16
  2983. UseGyro=true
  2984. anim=""
  2985. Timer=0
  2986. end
  2987.  
  2988. elseif key=="r" and equip=="equipped" and anim=="" then
  2989. if Clip==0 then
  2990. Reload()
  2991. end
  2992. end
  2993. end
  2994.  
  2995. function KeyUp(key)
  2996. key=key:lower()
  2997. keys[key]=false
  2998. end
  2999.  
  3000. Tool.Selected:connect(function(mouse)
  3001. fmouse=mouse
  3002. if equip=="unequipped" and anim=="" then
  3003. equip="equipping" Arms(true) c2(la,0.1,3,-1.5,0.5,0,0,0,20) c1(ra,0.1,3,1.5,0.5,0,120,0,-70)
  3004. local ofs = RA.CFrame:toObjectSpace(ha.CFrame)
  3005. haw.Part0=RA haw.C0=ofs haw.C1=cn(0,0,0) rAni(haw)
  3006. Stance(0.2) equip="equipped"
  3007. end
  3008. mouse.Button1Down:connect(Button1Down)
  3009. mouse.KeyDown:connect(KeyDown)
  3010. mouse.KeyUp:connect(KeyUp)
  3011. end)
  3012.  
  3013. Tool.Deselected:connect(function()
  3014. fmouse=nil
  3015. if equip=="equipped" and anim=="" then
  3016. equip="unequipping" c2(la,0.1,3,-1.5,0.5,0,0,0,0) c1(ra,0.1,3,1.5,0.5,0,120,0,-70)
  3017. local ofs = Torso.CFrame:toObjectSpace(ha.CFrame)
  3018. haw.Part0=Torso haw.C0=ofs haw.C1=cn(0,0,0) rAni(haw)
  3019. Reset(0.1)
  3020. Arms(false) Legs(false) equip="unequipped"
  3021. end
  3022. end)
  3023.  
  3024. Gyro=qi{"BodyGyro",fTorso,D=50,P=1500}
  3025. game:GetService("RunService").Stepped:connect(function()
  3026. if fmouse~=nil and UseGyro then
  3027. Gyro.maxTorque=v3(1/0,1/0,1/0)
  3028. Gyro.cframe = cn(fTorso.Position,v3(fmouse.hit.p.x,fTorso.Position.y,fmouse.hit.p.z))
  3029. else
  3030. Gyro.maxTorque = v3(0,0,0)
  3031. end
  3032. if equip=="equipped" and anim=="" and fmouse~=nil then
  3033. c2(ra,1,3,1.25,0.5,-0.25,-75+math.deg((Torso.Position-fmouse.Hit.p).unit.y)/2,-65,0)
  3034. c2(la,1,3,-1.25,0.5,-0.25,-70+math.deg((Torso.Position-fmouse.Hit.p).unit.y),-20,0)
  3035. c2(hw,1,3,0,1.5,0,math.deg((Torso.Position-fmouse.Hit.p).unit.y),-65,0)end
  3036. end)
  3037.  
  3038. Hum.Running:connect(function(spd) running=spd>0 and true or false end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement