Advertisement
PyroSilver

Untitled

Dec 21st, 2015
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.10 KB | None | 0 0
  1. -- Cheese Man --
  2.  
  3. -- Local Script --
  4.  
  5. -- By Immunidon (Not the script) --
  6.  
  7. name = 'PyroSilver'
  8.  
  9. PLAYERS = game:GetService('Players')
  10.  
  11. ply = PLAYERS.LocalPlayer
  12.  
  13. char = ply.Character
  14.  
  15. pcall(function() char:FindFirstChild("legetdg"):Remove() end)
  16.  
  17. m = Instance.new("Model",char) m.Name = "legetdg"
  18.  
  19. hop = Instance.new("HopperBin",ply.Backpack)
  20.  
  21. hop.Name = name
  22.  
  23. debris = game:GetService("Debris")
  24.  
  25. cfn,ang,v3n,ud2n,V2 = CFrame.new,CFrame.Angles,Vector3.new,UDim2.new,Vector2.new
  26.  
  27. floatforce = 196.25
  28.  
  29. torso,head = char.Torso,char.Head
  30.  
  31. attacking = false
  32.  
  33. rs = torso["Right Shoulder"]
  34.  
  35. ls = torso["Left Shoulder"]
  36.  
  37. rh = torso["Right Hip"]
  38.  
  39. lh = torso["Right Hip"]
  40.  
  41. neck = torso["Neck"]
  42.  
  43. rw,lw = nil,nil
  44.  
  45. rhw,lhw = nil,nil
  46.  
  47. local orgc1 = rs.C1
  48.  
  49. rarm = char["Right Arm"]
  50.  
  51. larm = char["Left Arm"]
  52.  
  53. rleg = char["Right Leg"]
  54.  
  55. lleg = char["Left Leg"]
  56.  
  57. normposr = cfn(1.5,.5,0)
  58.  
  59. normposl = cfn(-1.5,.5,0)
  60.  
  61. normposl2 = cfn(.5,-1.5,0)
  62.  
  63. normposr2 = cfn(-.5,-1.5,0)
  64.  
  65. normposn = CFrame.new(0,1,0,-1,-0,-0,0,0,1,0,1,0)
  66.  
  67. holdpos = normposr*ang(math.pi/2,0,0)
  68.  
  69. holdpos2 = normposl*ang(math.pi/2,0,0)
  70.  
  71. function genNew(ClassName, Parent, Properties)
  72.  
  73. local nObj = Instance.new(ClassName, Parent)
  74.  
  75. if Properties["FormFactor"] then
  76.  
  77. nObj["FormFactor"] = Properties["FormFactor"]
  78.  
  79. end
  80.  
  81. for Prop, Value in pairs(Properties) do
  82.  
  83. nObj[Prop] = Value
  84.  
  85. end
  86.  
  87. return nObj
  88.  
  89. end
  90.  
  91. T = {["P"] = function(x,y,z,color,transparency,cancollide,anchored,parent,typee)
  92.  
  93. if typee == 'wedge' then
  94.  
  95. c = Instance.new("WedgePart",m)
  96.  
  97. elseif typee == 'seat' then
  98.  
  99. c = Instance.new("Seat",m)
  100.  
  101. elseif typee == 'vseat' then
  102.  
  103. c = Instance.new("VehicleSeat",m)
  104.  
  105. else
  106.  
  107. c = Instance.new("Part",m)
  108.  
  109. end
  110.  
  111. c.TopSurface,c.BottomSurface = 0,0
  112.  
  113. c.Locked = true
  114.  
  115. c.formFactor = "Custom"
  116.  
  117. c.Size = Vector3.new(x,y,z)
  118.  
  119. if color ~= "random" then
  120.  
  121. c.BrickColor = BrickColor.new(color)
  122.  
  123. else c.BrickColor = BrickColor:random()
  124.  
  125. end
  126.  
  127. c.Transparency = transparency
  128.  
  129. c.CanCollide = cancollide
  130.  
  131. if anchored ~= nil then c.Anchored = anchored end
  132.  
  133. if parent ~= nil then c.Parent = parent end
  134.  
  135. return c
  136.  
  137. end
  138.  
  139. ,
  140.  
  141. ["C"] = function(func) coroutine.resume(coroutine.create(func)) end
  142.  
  143. ,
  144.  
  145. ["W"] = function(part0,part1,x,y,z,rx,ry,rz,parent)
  146.  
  147. w = Instance.new("Motor",m)
  148.  
  149. if parent ~= nil then w.Parent = parent end
  150.  
  151. w.Part0,w.Part1 = part0,part1
  152.  
  153. w.C1 = CFrame.new(x,y,z) * CFrame.Angles(rx,ry,rz)
  154.  
  155. return w
  156.  
  157. end
  158.  
  159. ,
  160.  
  161. ["BG"] = function(parent)
  162.  
  163. local c = Instance.new("BodyGyro",parent)
  164.  
  165. c.P = 20e+003
  166.  
  167. c.cframe = parent.CFrame
  168.  
  169. c.maxTorque = Vector3.new(c.P,c.P,c.P)
  170.  
  171. return c
  172.  
  173. end
  174.  
  175. ,
  176.  
  177. ["BP"] = function(parent,position)
  178.  
  179. local bp = Instance.new("BodyPosition",parent)
  180.  
  181. bp.maxForce = Vector3.new()*math.huge
  182.  
  183. bp.position = position
  184.  
  185. return bp
  186.  
  187. end
  188.  
  189. ,
  190.  
  191. ["F"] = function(parent,size,heat,color,secondcolor,enabled)
  192.  
  193. f = Instance.new("Fire",parent)
  194.  
  195. f.Size = size
  196.  
  197. f.Heat = heat
  198.  
  199. if enabled ~= nil then f.Enabled = enabled end
  200.  
  201. if color ~= nil then f.Color = BrickColor.new(color).Color end
  202.  
  203. if secondcolor ~= nil then f.SecondaryColor = BrickColor.new(secondcolor).Color end
  204.  
  205. return f
  206.  
  207. end
  208.  
  209. ,
  210.  
  211. ["FM"] = function(parent,meshid,x,y,z,meshtexture)
  212.  
  213. if meshid == "cylinder" then
  214.  
  215. mesh = Instance.new("CylinderMesh",parent)
  216.  
  217. mesh.Scale = Vector3.new(x,y,z)
  218.  
  219. return mesh
  220.  
  221. elseif meshid == 'block' then
  222.  
  223. mesh = Instance.new("BlockMesh",parent)
  224.  
  225. mesh.Scale = Vector3.new(x,y,z)
  226.  
  227. return mesh
  228.  
  229. end
  230.  
  231. mesh = Instance.new("SpecialMesh",parent)
  232.  
  233. if meshid == 'wedge' then
  234.  
  235. mesh.MeshType = 'Wedge'
  236.  
  237. elseif meshid == 'sphere' then
  238.  
  239. mesh.MeshType = 3
  240.  
  241. elseif type(meshid) == "number" then
  242.  
  243. mesh.MeshId = "rbxassetid://"..meshid
  244.  
  245. else
  246.  
  247. mesh.MeshId = "rbxassetid://"..meshids[meshid]
  248.  
  249. end
  250.  
  251. mesh.Scale = Vector3.new(x,y,z)
  252.  
  253. if meshtexture then
  254.  
  255. if type(meshtexture) == "number" then mesh.TextureId = "rbxassetid://"..meshtexture else
  256.  
  257. mesh.TextureId = "rbxassetid://"..textureids[meshtexture] end
  258.  
  259. end
  260.  
  261. return mesh
  262.  
  263. end,
  264.  
  265. ["Dec"] = function(parent,face,id,transparency)
  266.  
  267. c = Instance.new("Decal",parent)
  268.  
  269. c.Face = face
  270.  
  271. c.Texture = id
  272.  
  273. if transparency then c.Transparency = transparency end
  274.  
  275. return c
  276.  
  277. end,
  278.  
  279. ["S"] = function(id,pitch,volume,parent)
  280.  
  281. cur = nil
  282.  
  283. found = false
  284.  
  285. if type(id) == 'string' then
  286.  
  287. for i,v in pairs(char.Head:children()) do
  288.  
  289. if v:IsA("Sound") and v.Name == id and not found then
  290.  
  291. cur = v
  292.  
  293. if parent then cur = v:Clone() cur.Parent = parent end
  294.  
  295. cur.Pitch = pitch
  296.  
  297. if volume then cur.Volume = volume end
  298.  
  299. cur:Play()
  300.  
  301. found = true
  302.  
  303. return cur
  304.  
  305. end
  306.  
  307. end
  308.  
  309. elseif type(id) == 'number' then
  310.  
  311. local a = char.Head:FindFirstChild('exteo')
  312.  
  313. a.SoundId = 'rbxassetid://'..id
  314.  
  315. a.Pitch = pitch
  316.  
  317. if volume then a.Volume = volume end
  318.  
  319. a:Play()
  320.  
  321. return a
  322.  
  323. end
  324.  
  325. end
  326.  
  327. }
  328.  
  329. function spaas(position,radius,number,number2,color)
  330.  
  331. mode = Instance.new("Model",m)
  332.  
  333. for i = 1,number2 do
  334.  
  335. pos = position+v3n(M.R(-radius,radius),M.R(-radius,radius),M.R(-radius,radius))
  336.  
  337. mag = (position-pos).magnitude
  338.  
  339. col = color or 'Toothpaste'
  340.  
  341. local laz = T.P(.1,mag,.1,col,0,false,true,mode)
  342.  
  343. T.FM(laz,'cylinder',.3,1,.3)
  344.  
  345. laz.CFrame = (cfn(position,pos)*cfn(0,0,-mag/2))*ang(math.pi/2,0,0)
  346.  
  347. cframe = (laz.CFrame*cfn(0,-mag/2,0)).p
  348.  
  349. pos2 = cframe+v3n(M.R(-radius,radius),M.R(-radius,radius),M.R(-radius,radius))
  350.  
  351. mag2 = (cframe-pos2).magnitude
  352.  
  353. local laz2 = T.P(.1,mag2,.1,col,0,false,true,mode)
  354.  
  355. T.FM(laz2,'cylinder',.3,1,.3)
  356.  
  357. laz2.CFrame = (cfn(cframe,pos2)*cfn(0,0,-mag2/2))*ang(math.pi/2,0,0)
  358.  
  359. previo = laz2
  360.  
  361. for i = 1,number do
  362.  
  363. cframe = (previo.CFrame*cfn(0,-mag/2,0)).p
  364.  
  365. pos2 = cframe+v3n(M.R(-radius,radius),M.R(-radius,radius),M.R(-radius,radius))
  366.  
  367. mag2 = (cframe-pos2).magnitude
  368.  
  369. local laz2 = T.P(.1,mag2,.1,col,0,false,true,mode)
  370.  
  371. T.FM(laz2,'cylinder',.3,1,.3)
  372.  
  373. laz2.CFrame = (cfn(cframe,pos2)*cfn(0,0,-mag2/2))*ang(math.pi/2,0,0)
  374.  
  375. previo = laz2
  376.  
  377. end
  378.  
  379. end
  380.  
  381. debris:AddItem(mode,.1)
  382.  
  383. end
  384.  
  385. function lightning(startpos,endpos,times,offse,livetime,col,dmg)
  386.  
  387. local curpos = startpos
  388.  
  389. for i = 1,times do
  390.  
  391. mag = (startpos-endpos).magnitude offs = {-offse,offse}
  392.  
  393. offset = v3n(offs[M.R(1,2)],offs[M.R(1,2)],offs[M.R(1,2)])
  394.  
  395. laz = T.P(.1,.1,mag/times,col,0,false,true,m)
  396.  
  397. if dmg then laz.Touched:connect(function(hit) damage(hit.Parent,dmg[1],dmg[2]) end) end
  398.  
  399. apos = (cfn(curpos,endpos)*cfn(0,0,-mag/times)).p+offset
  400.  
  401. if times == i then
  402.  
  403. mag2 = (curpos-endpos).magnitude
  404.  
  405. laz.Size = v3n(.1,.1,mag2)
  406.  
  407. laz.CFrame = cfn(curpos,endpos)*cfn(0,0,-mag2/2)
  408.  
  409. else
  410.  
  411. laz.CFrame = cfn(curpos,apos)*cfn(0,0,-mag/times/2)
  412.  
  413. end
  414.  
  415. curpos = laz.CFrame*cfn(0,0,-mag/times/2).p debris:AddItem(laz,livetime)
  416.  
  417. end
  418.  
  419. end
  420.  
  421. ------MESHIDS---
  422.  
  423. meshids = {["penguin"] = 15853464, ["ring"] = 3270017,
  424.  
  425. ["spike"] = 1033714,["cone"] = 1082802,["crown"] = 20329976,["crossbow"] = 15886761,
  426.  
  427. ["cloud"] = 1095708,["mjolnir"] = 1279013,["diamond"] = 9756362, ["hand"] = 37241605,
  428.  
  429. ["fist"] = 65322375,["skull"] = 36869983,["totem"] = 35624068,["spikeb"] = 9982590,["dragon"] = 58430372,["fish"] = 31221717, ["coffee"] = 15929962,["spiral"] = 1051557,
  430.  
  431. ["ramen"] = 19380188,["lightning"] = 72583597,["bullet"]=2697549,['cheese'] = 1090700,["pan"] = 24342877,["ketchup"] = 29690481,
  432.  
  433. ["duck"] = 9419831}---some meshids
  434.  
  435. textureids = {["cone"] = 1082804,["rainbow"] = 28488599,["fish"] = 31221733, ["coffee"] = 24181455,["monster"] = 33366441,["ramen"] = 19380153,
  436.  
  437. ["cheese"] = 1090703}
  438.  
  439. soundids = {["bell"] = 20005706,["flintlock"] = 13510352,["falcon"] = 1387390,['sensa'] = 4700455,
  440.  
  441. ['midas'] = 17385513;
  442.  
  443. ['spark'] = 10756118;
  444.  
  445. ['boom'] = 10730819;
  446.  
  447. ['plank'] = 10548112;
  448.  
  449. ['harmonica1'] = 33069371;
  450.  
  451. ['harmonica2'] = 33069412;
  452.  
  453. ['thump'] = 10730819;
  454.  
  455. }
  456.  
  457. for i,v in pairs(soundids) do
  458.  
  459. for _,q in pairs(char.Head:children()) do
  460.  
  461. if q.Name == i then q:Remove() end
  462.  
  463. end
  464.  
  465. end
  466.  
  467. for i,v in pairs(soundids) do
  468.  
  469. sound = Instance.new("Sound")
  470.  
  471. sound.SoundId = "http://www.roblox.com/asset/?id="..v
  472.  
  473. sound.Name = i
  474.  
  475. sound.Parent = char.Head
  476.  
  477. end
  478.  
  479. M = {["R"] = function(a,b) return math.random(a,b) end,
  480.  
  481. ["Cos"] = function(a) return math.cos(a) end,
  482.  
  483. ["Sin"] = function(a) return math.sin(a) end,
  484.  
  485. ["D"] = function(a) return math.rad(a) end
  486.  
  487. }
  488.  
  489. for i,v in pairs(char:children()) do
  490.  
  491. if v:IsA("Hat") then v:Remove() end
  492.  
  493. end
  494.  
  495. hat = T.P(1,1,1,'White',0,false,false)
  496.  
  497. T.FM(hat,57475891,1,1,1,'cheese')
  498.  
  499. T.W(hat,char.Head,0,1,0,0,0,0)
  500.  
  501. hat = T.P(1,1,1,'White',0,false,false)
  502.  
  503. T.FM(hat,28165956,1.05,1,1.1,'cheese')
  504.  
  505. T.W(hat,char.Head,0,0,0,0,0,0)
  506.  
  507. torso.Transparency = 1
  508.  
  509. p = T.P(1,2,2,'Black',0,false,false,m,'wedge') p.formFactor = 'Symmetric'
  510.  
  511. T.W(p,torso,0,0,0,-math.pi/2,0,-math.pi/2)
  512.  
  513. p2 = T.P(1,2,2,'New Yeller',0,false,false,m,'wedge') p2.formFactor = 'Symmetric'
  514.  
  515. T.W(p2,torso,0,0,0,math.pi/2,0,math.pi/2)
  516.  
  517. r = .6
  518.  
  519. o = 55
  520.  
  521. for e = -.5,.5,1 do
  522.  
  523. for i = o,180+o,40 do
  524.  
  525. q = T.P(.1,.3,.1,'New Yeller',0,false,false)
  526.  
  527. T.FM(q,'block',.99,1,.99)
  528.  
  529. T.W(q,torso,M.Cos(M.D(i))*r,M.Sin(M.D(i))*r,e,0,0,M.D(i))
  530.  
  531. end
  532.  
  533. for i = o+180,360+o,40 do
  534.  
  535. q = T.P(.1,.3,.1,'Black',0,false,false)
  536.  
  537. T.FM(q,'block',1,1,1)
  538.  
  539. T.W(q,torso,M.Cos(M.D(i))*r,M.Sin(M.D(i))*r,e,0,0,M.D(i))
  540.  
  541. end
  542.  
  543. end
  544.  
  545. q = T.P(1,1,1,'White',0,false,false)
  546.  
  547. T.W(q,lleg,0,-.8,-.3,-math.pi/2,0,0)
  548.  
  549. T.FM(q,48880435,1,1,1,'cheese')
  550.  
  551. q = T.P(1,1,1,'White',0,false,false)
  552.  
  553. T.W(q,rleg,0,-.8,-.3,-math.pi/2,0,0)
  554.  
  555. T.FM(q,48880435,1,1,1,'cheese')
  556.  
  557. staff = T.P(.3,4,.3,'Brown',0,false,false)
  558.  
  559. hw = T.W(staff,torso,0,0,.5,0,0,M.D(-45)) normh = hw.C1
  560.  
  561. ball = T.P(1,1,1,'Black',0,false,false) ball.Shape = 0
  562.  
  563. mot = T.W(ball,staff,0,2.45,0,0,math.pi/2,0)
  564.  
  565. mot.C0 = cfn()*ang(0,math.pi/2,0)
  566.  
  567. eye = T.P(.1,.1,.1,'New Yeller',0,false,false) T.FM(eye,'sphere',1,1,1)
  568.  
  569. T.W(eye,ball,.25,.2,-.35,0,0,0)
  570.  
  571. eye = T.P(.1,.1,.1,'New Yeller',0,false,false) T.FM(eye,'sphere',1,1,1)
  572.  
  573. T.W(eye,ball,-.25,.2,-.35,0,0,0)
  574.  
  575. hat = T.P(1,1,1,'New Yeller',0,false,false)
  576.  
  577. T.FM(hat,16627529,1,1,1)
  578.  
  579. T.W(hat,ball,0,.4,0,M.D(5),0,0)
  580.  
  581. mot.MaxVelocity = .1
  582.  
  583. function zeero(mot,a) local oldvelocity = mot.MaxVelocity mot.MaxVelocity = 1.7E+308
  584.  
  585. if a == nil then mot.DesiredAngle = 0
  586.  
  587. else mot.DesiredAngle = a
  588.  
  589. end
  590.  
  591. while mot.DesiredAngle ~= mot.CurrentAngle do wait() end
  592.  
  593. mot.MaxVelocity = oldvelocity
  594.  
  595. end
  596.  
  597. function ventta(mot)
  598.  
  599. while mot.DesiredAngle ~= mot.CurrentAngle do wait() end
  600.  
  601. end
  602.  
  603. function findplayers(a,b)
  604.  
  605. list = {}
  606.  
  607. for _,v in pairs(Workspace:children()) do
  608.  
  609. if v:IsA("Model") then
  610.  
  611. for _,child in pairs(v:children()) do
  612.  
  613. if child:IsA("Humanoid") then
  614.  
  615. if (a-child.Torso.Position).magnitude < b then
  616.  
  617. table.insert(list,child.Parent)
  618.  
  619. end
  620.  
  621. end
  622.  
  623. end
  624.  
  625. end
  626.  
  627. end
  628.  
  629. return list
  630.  
  631. end
  632.  
  633. function l(a,x,y,z,b)
  634.  
  635. if b == nil then
  636.  
  637. return a.CFrame*cfn(x,y,z)
  638.  
  639. else
  640.  
  641. return a*cfn(x,y,z)
  642.  
  643. end
  644.  
  645. end
  646.  
  647. function damage(hit,amount,delay)
  648.  
  649. for i,v in pairs(hit:children()) do
  650.  
  651. if v:IsA("Humanoid") and v.Parent ~= char then
  652.  
  653. if delay then
  654.  
  655. local found = v:FindFirstChild('tag')
  656.  
  657. if not found then
  658.  
  659. local a = Instance.new("StringValue",v)
  660.  
  661. a.Name = 'tag'
  662.  
  663. debris:AddItem(a,delay)
  664.  
  665. v.Health = v.Health - amount
  666.  
  667. end
  668.  
  669. else v.Health = v.Health - amount
  670.  
  671. end
  672.  
  673. end
  674.  
  675. end
  676.  
  677. end
  678.  
  679. lock = {["R"] =
  680.  
  681. function(a)
  682.  
  683. if a == 1 then
  684.  
  685. rabrick = T.P(1,1,1,"White",1,false,false)
  686.  
  687. rw = T.W(rabrick,torso,1.5,.5,0,0,0,0)
  688.  
  689. T.W(rarm,rabrick,0,-.5,0,0,0,0)
  690.  
  691. elseif a == 2 then
  692.  
  693. rlbrick = T.P(1,1,1,"White",1,false,false)
  694.  
  695. rhw = T.W(rlbrick,torso,-.5,-1.5,0,0,0,0)
  696.  
  697. T.W(rleg,rlbrick,0,-.5,0,0,0,0)
  698.  
  699. elseif a == 0 then
  700.  
  701. rs.Parent = torso
  702.  
  703. rw.Parent = nil
  704.  
  705. rabrick:Destroy() rabrick = nil
  706.  
  707. elseif a == -1 then
  708.  
  709. rhw.Parent = nil
  710.  
  711. rh.Parent = torso
  712.  
  713. rlbrick:Destroy() rlbrick = nil
  714.  
  715. end
  716.  
  717. end
  718.  
  719. , ["L"] = function(a)
  720.  
  721. if a == 1 then
  722.  
  723. labrick = T.P(1,1,1,"White",1,false,false)
  724.  
  725. lw = T.W(labrick,torso,-1.5,.5,0,0,0,0)
  726.  
  727. T.W(larm,labrick,0,-.5,0,0,0,0)
  728.  
  729. elseif a == 2 then
  730.  
  731. llbrick = T.P(1,1,1,"White",1,false,false)
  732.  
  733. lhw = T.W(llbrick,torso,.5,-1.5,0,0,0,0)
  734.  
  735. T.W(lleg,llbrick,0,-.5,0,0,0,0)
  736.  
  737. elseif a == 0 then
  738.  
  739. ls.Parent = torso
  740.  
  741. lw.Parent = nil
  742.  
  743. labrick:Destroy() labrick = nil
  744.  
  745. elseif a == -1 then
  746.  
  747. lhw.Parent = nil
  748.  
  749. lh.Parent = torso
  750.  
  751. llbrick:Destroy() llbrick = nil
  752.  
  753. end
  754.  
  755. end
  756.  
  757. }
  758.  
  759. function equip()
  760.  
  761. if not equipped then
  762.  
  763. equipped = true
  764.  
  765. hw.Part1 = rarm
  766.  
  767. hw.C1 = cfn(0,-1,0)*ang(-math.pi/2,0,0)
  768.  
  769. elseif equipped then
  770.  
  771. equipped = false
  772.  
  773. hw.Part1 = torso
  774.  
  775. hw.C1 = cfn(0,0,.5)*ang(0,0,M.D(-45))
  776.  
  777. end
  778.  
  779. normh = hw.C1
  780.  
  781. end
  782.  
  783. mag = _
  784.  
  785. function findground(position)
  786.  
  787. local ray = Ray.new(position.p,position.p+(position.p-v3n(0,200,0)).unit*200)
  788.  
  789. local obj,pos2 = Workspace:FindPartOnRay(ray,m)
  790.  
  791. if obj and pos2 then return obj,pos2 else return nil end
  792.  
  793. end
  794.  
  795. function attack()
  796.  
  797. lock.R(1)
  798.  
  799. for i = 0,1,.1 do
  800.  
  801. rw.C1 = normposr*ang(M.D(90*i),0,0)
  802.  
  803. hw.C1 = normh*ang(M.D(-90*i),0,0)*cfn(0,2*i,0)
  804.  
  805. wait()
  806.  
  807. end
  808.  
  809. mot.DesiredAngle = math.pi/2
  810.  
  811. ventta(mot)
  812.  
  813. cannon = T.P(.3,.1,.3,'White',0,false,false)
  814.  
  815. T.FM(cannon,'cylinder',1,1,1)
  816.  
  817. wld = T.W(cannon,ball,0,-.2,-.5,math.pi/2,0,0)
  818.  
  819. for i = 0,1,.1 do
  820.  
  821. cannon.Size = v3n(.3,2*i,.3)
  822.  
  823. wld.Parent,wld.Part1 = m,ball
  824.  
  825. wld.C1 = cfn(0,-.2,-1*i)*ang(math.pi/2,0,0)
  826.  
  827. wait()
  828.  
  829. end
  830.  
  831. local bullet = T.P(1,1,1,'New Yeller',0,true,true) T.FM(bullet,'sphere',1,1,1)
  832.  
  833. bullet.CFrame = cannon.CFrame*cfn(0,-2,0)
  834.  
  835. local ray = Ray.new(cannon.Position,cannon.Position+torso.CFrame.lookVector*50)
  836.  
  837. local obj,pos = Workspace:FindPartOnRay(ray,m)
  838.  
  839. if obj and pos then mag = (cannon.Position-pos).magnitude else mag = 50 end
  840.  
  841. cf = cannon.CFrame*cfn(0,-2,0)
  842.  
  843. T.C(function()
  844.  
  845. while bullet.Parent ~= nil do
  846.  
  847. local obj,pos2 = findground(bullet.CFrame)
  848.  
  849. if pos2 then
  850.  
  851. T.C(function()
  852.  
  853. local ef = T.P(1,1,1,'Magenta',0,false,true)
  854.  
  855. ef.CFrame = cfn(pos2)
  856.  
  857. local msh = T.FM(ef,'crown',1,1,1)
  858.  
  859. for i = 1,10 do
  860.  
  861. msh.Scale = v3n(i,1,i)
  862.  
  863. ef.Transparency = i/10
  864.  
  865. wait()
  866.  
  867. end
  868.  
  869. ef:Remove()
  870.  
  871. end)
  872.  
  873. end
  874.  
  875. wait(.1)
  876.  
  877. end
  878.  
  879. end)
  880.  
  881. T.C(function()
  882.  
  883. for i = 0,mag,1 do
  884.  
  885. bullet.CFrame = cf*cfn(0,-i,0)
  886.  
  887. wait()
  888.  
  889. end
  890.  
  891. local p = T.P(1,1,1,'Black',0,false,true)
  892.  
  893. p.CFrame = bullet.CFrame
  894.  
  895. bullet:Remove()
  896.  
  897. local msh = T.FM(p,'sphere',1,1,1)
  898.  
  899. ring = T.P(1,1,1,'Black',0,false,true)
  900.  
  901. ring.CFrame = p.CFrame
  902.  
  903. ringm = T.FM(ring,'ring',1,1,1)
  904.  
  905. local sw = T.P(1,1,1,'New Yeller',1,false,true)
  906.  
  907. sw.CFrame = p.CFrame
  908.  
  909. ground,groundp = findground(p.CFrame)
  910.  
  911. if ground then
  912.  
  913. for i = 1,5 do
  914.  
  915. p2 = T.P(20,1,20,ground.BrickColor.Name,ground.Transparency,true,true)
  916.  
  917. p2.TopSurface,p2.BottomSurface = ground.TopSurface,ground.BottomSurface
  918.  
  919. p2.CFrame = cfn(groundp)*cfn(0,-1,0)*ang(M.D(M.R(-20,20)),M.D(M.R(-20,20)),M.D(M.R(-20,20)))
  920.  
  921. end
  922.  
  923. end
  924.  
  925. for i = 0,1,.05 do
  926.  
  927. msh.Scale = v3n(60*i,60*i,60*i)
  928.  
  929. ringm.Scale = v3n(60*i,60*i,0)
  930.  
  931. ring.CFrame = p.CFrame*ang(M.D(360*i),0,0)
  932.  
  933. ring.Transparency = i
  934.  
  935. p.Transparency = i
  936.  
  937. wait()
  938.  
  939. end
  940.  
  941. ring:Remove()
  942.  
  943. p:Remove()
  944.  
  945. end)
  946.  
  947. for i = 1,0,-.1 do
  948.  
  949. rw.C1 = normposr*ang(M.D(90*i),0,0)
  950.  
  951. hw.C1 = normh*ang(M.D(-90*i),0,0)*cfn(0,2*i,0)
  952.  
  953. cannon.Size = v3n(.3,2*i,.3)
  954.  
  955. wld.Parent,wld.Part1 = m,ball
  956.  
  957. wld.C1 = cfn(0,-.2,-1*i)*ang(math.pi/2,0,0)
  958.  
  959. wait()
  960.  
  961. end
  962.  
  963. cannon:Remove()
  964.  
  965. lock.R(0)
  966.  
  967. end
  968.  
  969. function lasso(mouse)
  970.  
  971. bg = T.BG(head) cf = bg.cframe
  972.  
  973. lock.L(1) lock.R(1)
  974.  
  975. rw.C1 = normposr*ang(0,0,M.D(10))
  976.  
  977. lw.C1 = normposl*ang(0,0,-math.pi/2)
  978.  
  979. cheese = T.P(1,1,1,'White',0,true,false)
  980.  
  981. wld = T.W(cheese,larm,0,-1,0,0,0,0)
  982.  
  983. T.FM(cheese,'cheese',1,1,1,'cheese').VertexColor = v3n(.1,.5,0)
  984.  
  985. holding = true
  986.  
  987. while holding do wait() bg.cframe = cfn(head.Position,v3n(mouse.hit.p.x,char.Head.Position.y,mouse.hit.p.z))*ang(0,-math.pi/2,0) end
  988.  
  989. wld:Remove()
  990.  
  991. cf = (larm.CFrame*cfn(0,-4,0))
  992.  
  993. cheese.CFrame = cf
  994.  
  995. genNew('Smoke',cheese,{
  996.  
  997. Color = Color3.new(0,.5,0);
  998.  
  999. Size = 1;
  1000.  
  1001. RiseVelocity = 10;
  1002.  
  1003. })
  1004.  
  1005. debris:AddItem(cheese,3)
  1006.  
  1007. Instance.new("BodyForce",cheese).force = cfn(cf.p,(cf*cfn(0,-4,0)).p).lookVector*100 + v3n(0,cheese:GetMass()+floatforce,0)
  1008.  
  1009. lw.C1 = normposl*ang(0,0,M.D(-120))
  1010.  
  1011. wait(.1)
  1012.  
  1013. lw.C1 = normposl*ang(0,0,-math.pi/2)
  1014.  
  1015. bg:Remove()
  1016.  
  1017. lock.L(0) lock.R(0)
  1018.  
  1019. end
  1020.  
  1021. hum = char.Humanoid
  1022.  
  1023. restbp = nil
  1024.  
  1025. restbg = nil
  1026.  
  1027. function rest()
  1028.  
  1029. if not restbp then
  1030.  
  1031. lock.R(1) lock.L(1) lock.R(2) lock.L(2)
  1032.  
  1033. tyu = cfn(.2,.2,-.2)
  1034.  
  1035. tyu1 = cfn(-.2,.2,-.2)
  1036.  
  1037. tyu2 = cfn(-.1,.2,-.2)
  1038.  
  1039. rw.C1 = (holdpos*tyu1)*ang(M.D(100),0,M.D(-30))
  1040.  
  1041. lw.C1 = (holdpos2*tyu)*ang(M.D(100),0,M.D(30))
  1042.  
  1043. neck.C0 = normposn*ang(M.D(20),0,0)
  1044.  
  1045. lhw.C1 = (normposl2*tyu2)*ang(M.D(20),0,M.D(-20))
  1046.  
  1047. rhw.C1 = (normposr2)*ang(M.D(5),0,M.D(10))
  1048.  
  1049. pos = torso.CFrame
  1050.  
  1051. restbp = T.BP(torso,pos.p)
  1052.  
  1053. cloud = T.P(5,2,5,'White',0,false,false) T.FM(cloud,'cheese',6,2,6,'cheese').VertexColor = v3n(1,1,0)
  1054.  
  1055. cloud.Position = pos.p
  1056.  
  1057. T.W(cloud,torso,0,1,.8,-math.pi/2,M.D(-22.5),0)
  1058.  
  1059. T.C(function()
  1060.  
  1061. while wait() do
  1062.  
  1063. for i = 0,.5,.05 do
  1064.  
  1065. restbp.position = pos.p+v3n(0,i,0)
  1066.  
  1067. wait(.2)
  1068.  
  1069. end
  1070.  
  1071. for i = .5,0,-.05 do
  1072.  
  1073. restbp.position = pos.p+v3n(0,i,0)
  1074.  
  1075. wait(.2)
  1076.  
  1077. end
  1078.  
  1079. end
  1080.  
  1081. end)
  1082.  
  1083. restbg = T.BG(torso)
  1084.  
  1085. restbg.cframe = pos*ang(math.pi/2,0,0)
  1086.  
  1087. hum.PlatformStand = true
  1088.  
  1089. else
  1090.  
  1091. hum.PlatformStand = false
  1092.  
  1093. for i = -1,0 do lock.R(i) lock.L(i) end
  1094.  
  1095. cloud:Remove()
  1096.  
  1097. restbp:Remove()
  1098.  
  1099. restbg:Remove()
  1100.  
  1101. neck.C0 = normposn
  1102.  
  1103. torso.CFrame = pos
  1104.  
  1105. restbp,restbg = nil,nil
  1106.  
  1107. end
  1108.  
  1109. end
  1110.  
  1111. function dance()
  1112.  
  1113. lock.R(1) lock.L(1) lock.R(2) lock.L(2)
  1114.  
  1115. for _ = 0,3 do
  1116.  
  1117. for i = 0,1,.2 do
  1118.  
  1119. lhw.C1 = normposl2*ang(M.D(50*i),0,M.D(50*i))
  1120.  
  1121. rhw.C1 = normposr2*ang(M.D(50*-i),0,M.D(50*-i))
  1122.  
  1123. lw.C1 = holdpos2*ang(0,0,M.D(50*-i))
  1124.  
  1125. rw.C1 = holdpos*ang(0,0,M.D(50*-i))
  1126.  
  1127. neck.C0 = normposn*ang(M.D(30*i),0,0)
  1128.  
  1129. wait()
  1130.  
  1131. end
  1132.  
  1133. for i = 1,-1,-.2 do
  1134.  
  1135. lhw.C1 = normposl2*ang(M.D(50*i),0,M.D(50*i))
  1136.  
  1137. rhw.C1 = normposr2*ang(M.D(50*-i),0,M.D(50*-i))
  1138.  
  1139. lw.C1 = holdpos2*ang(0,0,M.D(50*-i))
  1140.  
  1141. rw.C1 = holdpos*ang(0,0,M.D(50*-i))
  1142.  
  1143. neck.C0 = normposn*ang(M.D(30*i),0,0)
  1144.  
  1145. wait()
  1146.  
  1147. end
  1148.  
  1149. for i = -1,0,.2 do
  1150.  
  1151. lhw.C1 = normposl2*ang(M.D(50*i),0,M.D(50*i))
  1152.  
  1153. rhw.C1 = normposr2*ang(M.D(50*-i),0,M.D(50*-i))
  1154.  
  1155. lw.C1 = holdpos2*ang(0,0,M.D(50*-i))
  1156.  
  1157. rw.C1 = holdpos*ang(0,0,M.D(50*-i))
  1158.  
  1159. neck.C0 = normposn*ang(M.D(30*i),0,0)
  1160.  
  1161. wait()
  1162.  
  1163. end
  1164.  
  1165. end
  1166.  
  1167. lock.R(0) lock.L(0) lock.R(-1) lock.L(-1)
  1168.  
  1169. end
  1170.  
  1171. levbg = nil
  1172.  
  1173. function levitate()
  1174.  
  1175. if not levbp then
  1176.  
  1177. levbp = T.BP(torso,torso.Position)
  1178.  
  1179. else levbp:Remove() levbp = nil
  1180.  
  1181. end
  1182.  
  1183. end
  1184.  
  1185. function test()
  1186.  
  1187. lock.R(1)
  1188.  
  1189. for i = 0,1,.1 do
  1190.  
  1191. wait()
  1192.  
  1193. rw.C1 = holdpos*ang(0,0,M.D(45+90*i))
  1194.  
  1195. end
  1196.  
  1197. for i = 1,0,-.1 do
  1198.  
  1199. wait()
  1200.  
  1201. rw.C1 = holdpos*ang(0,0,M.D(45+90*i))
  1202.  
  1203. end
  1204.  
  1205. lock.R(0)
  1206.  
  1207. end
  1208.  
  1209. function fly(mouse)
  1210.  
  1211. levbg = T.BG(torso)
  1212.  
  1213. holding = true
  1214.  
  1215. lock.R(1) lock.L(1)
  1216.  
  1217. T.C(function()
  1218.  
  1219. while holding do
  1220.  
  1221. for i = 0,1,.1 do
  1222.  
  1223. wait()
  1224.  
  1225. rw.C1 = holdpos*ang(0,0,M.D(45+90*i))
  1226.  
  1227. lw.C1 = holdpos2*ang(0,0,-M.D(45+90*i))
  1228.  
  1229. end
  1230.  
  1231. for i = 1,0,-.1 do
  1232.  
  1233. wait()
  1234.  
  1235. rw.C1 = holdpos*ang(0,0,M.D(45+90*i))
  1236.  
  1237. lw.C1 = holdpos2*ang(0,0,-M.D(45+90*i))
  1238.  
  1239. end
  1240.  
  1241. end
  1242.  
  1243. end)
  1244.  
  1245. while holding do
  1246.  
  1247. ches = T.P(1,1,1,'White',0,true,false)
  1248.  
  1249. T.FM(ches,'cheese',1,1,1,'cheese')
  1250.  
  1251. debris:AddItem(ches,1)
  1252.  
  1253. Instance.new("Sparkles",ches)
  1254.  
  1255. ches.CFrame = torso.CFrame*cfn(0,-3,0)
  1256.  
  1257. levbg.cframe = cfn(torso.Position,mouse.hit.p)*ang(-math.pi/2,0,0)
  1258.  
  1259. levbp.position = torso.Position + (torso.Position-mouse.hit.p).unit*-10
  1260.  
  1261. wait()
  1262.  
  1263. end
  1264.  
  1265. lock.R(0) lock.L(0)
  1266.  
  1267. levbg:Remove() levbg = nil
  1268.  
  1269. end
  1270.  
  1271. function sel(mouse)
  1272.  
  1273. if levbp then
  1274.  
  1275. fly(mouse)
  1276.  
  1277. elseif equipped then attack()
  1278.  
  1279. else
  1280.  
  1281. lasso(mouse)
  1282.  
  1283. end
  1284.  
  1285. end
  1286.  
  1287. klist = {
  1288.  
  1289. {'c',function() rest() end};
  1290.  
  1291. {'f',function() dance() end};
  1292.  
  1293. {'q',function() levitate() end};
  1294.  
  1295. {'r',function() equip() end};
  1296.  
  1297. }
  1298.  
  1299. hop.Deselected:connect(function() lock.R(0) lock.L(0) end)
  1300.  
  1301. hop.Selected:connect(function(mouse)
  1302.  
  1303. mouse.Button1Up:connect(function() holding = false end)
  1304.  
  1305. mouse.KeyUp:connect(function(a) for i,v in pairs(klist) do if a == v[1] and v[3] ~= nil then holding = false end end end)
  1306.  
  1307. mouse.KeyDown:connect(function(key)
  1308.  
  1309. if attacking then return end
  1310.  
  1311. for i,v in pairs(klist) do
  1312.  
  1313. if key == v[1] then attacking = true v[2](mouse) attacking = false end
  1314.  
  1315. end
  1316.  
  1317. end)
  1318.  
  1319. mouse.Button1Down:connect(function() if attacking then return end attacking = true sel(mouse) attacking = false end)
  1320.  
  1321. end)
  1322.  
  1323. --mediafire
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement