Advertisement
simhwui

Untitled

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