Advertisement
astronaut32

mace

May 23rd, 2015
313
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.21 KB | None | 0 0
  1. ply = game.Players.LocalPlayer
  2. char = ply.Character
  3. torso = char.Torso
  4. cfn,ang,v3n,ud2n,V2,bcol = CFrame.new,CFrame.Angles,Vector3.new,UDim2.new,Vector2.new,BrickColor.new
  5. mcos,msin,mtan,md,mr = math.cos,math.sin,math.tan,math.rad,math.random
  6. debris = game:service'Debris'
  7. floatforce = 196.25
  8. pcall(function() char.HAWK:Destroy() end)
  9. m = Instance.new("Model",char) m.Name = 'HAWK'
  10. script.Parent = m
  11. local mouse = ply:GetMouse()
  12.  
  13.  
  14. rs,ls = torso['Right Shoulder'],torso['Left Shoulder']
  15. rarm = char["Right Arm"]
  16. larm = char["Left Arm"]
  17. rleg = char["Right Leg"]
  18. lleg = char["Left Leg"]
  19.  
  20. udim = function(a,b) return UDim2.new(a,0,b,0) end
  21. bcol = function(a) return BrickColor.new(a) end
  22.  
  23. for i = 0,1 do --------UTILITIES START-------
  24. function fade(a,b,c,d)
  25. if type(a) ~= 'table' then
  26. for i = b,c,d do
  27. a.Transparency = i
  28. wait()
  29. end
  30. else
  31. for i = b,c,d do
  32. for _,v in pairs(a) do
  33. v.Transparency = i
  34. end
  35. wait()
  36. end
  37. end
  38. end
  39.  
  40. function FilterTab(tab,what)
  41. Result = {}
  42. local function filter2(a)
  43. if type(a) == 'string' then
  44. return a
  45. else
  46. return a.className
  47. end
  48. end
  49.  
  50. for i,v in pairs(tab) do
  51. if type(what) ~= 'table' then
  52. if v:IsA(filter2(what)) then
  53. table.insert(Result,v)
  54. end
  55. else
  56. for i,q in pairs(what) do
  57. if v:IsA(filter2(q)) then
  58. table.insert(Result,v)
  59. end
  60. end
  61. end
  62. end
  63. return Result
  64. end
  65.  
  66.  
  67. function colorslide(object,targetcolor,bool)
  68. local function a()
  69. if type(object) ~= 'table' then
  70. rgb1,rgb2 =object.Color, BrickColor.new(targetcolor).Color
  71. for i = 0,1,.2 do
  72. object.Color = Color3.new(
  73. (rgb1.r * (1-i))+(rgb2.r * i),
  74. (rgb1.g * (1-i))+(rgb2.g * i),
  75. (rgb1.b * (1-i))+(rgb2.b * i)
  76. )
  77. wait()
  78. end
  79. object.Color = rgb2
  80. else
  81. rgb1,rgb2 = object[1].Color,BrickColor.new(targetcolor).Color
  82. for i = 0,1,.2 do
  83. for _,v in pairs(object) do
  84. v.Color = Color3.new(
  85. (rgb1.r * (1-i))+(rgb2.r * i),
  86. (rgb1.g * (1-i))+(rgb2.g * i),
  87. (rgb1.b * (1-i))+(rgb2.b * i)
  88. )
  89. end
  90. wait()
  91. end
  92. for _,v in pairs(object) do v.Color = rgb2 end
  93. end
  94. end
  95. if bool then T.C(a) else a() end
  96. end
  97.  
  98. function l(a,x,y,z,b)
  99. if b == nil then
  100. return a.CFrame*cfn(x,y,z)
  101. else
  102. return a*cfn(x,y,z)
  103. end
  104. end
  105. function zeero(mot,a) local oldvelocity = mot.MaxVelocity mot.MaxVelocity = 1.7E+308
  106. if a == nil then mot.DesiredAngle = 0
  107. else mot.DesiredAngle = a
  108. end
  109. while mot.DesiredAngle ~= mot.CurrentAngle do wait() end
  110. mot.MaxVelocity = oldvelocity
  111. end
  112. function ventta(mot)
  113. while mot.DesiredAngle ~= mot.CurrentAngle do wait() end
  114. end
  115.  
  116. function genNew(ClassName, Parent, Properties)
  117. local nObj = Instance.new(ClassName, Parent)
  118. if Properties["FormFactor"] then
  119. nObj["FormFactor"] = Properties["FormFactor"]
  120. end
  121. for Prop, Value in pairs(Properties) do
  122. nObj[Prop] = Value
  123. end
  124. return nObj
  125. end
  126.  
  127. T = {["P"] = function(x,y,z,color,transparency,cancollide,anchored,parent,typee)
  128. if typee == 'wedge' then
  129. c = Instance.new("WedgePart",m)
  130. elseif typee == 'seat' then
  131. c = Instance.new("Seat",m)
  132. elseif typee == 'vseat' then
  133. c = Instance.new("VehicleSeat",m)
  134. else
  135. c = Instance.new("Part",m)
  136. end
  137. c.TopSurface,c.BottomSurface = 0,0
  138. c.Locked = true
  139. c.formFactor = "Custom"
  140. c.Size = Vector3.new(x,y,z)
  141. if color ~= "random" then
  142. c.BrickColor = BrickColor.new(color)
  143. else c.BrickColor = BrickColor:random()
  144. end
  145. c.Transparency = transparency
  146. c.CanCollide = cancollide
  147. if anchored ~= nil then c.Anchored = anchored end
  148. if parent ~= nil then c.Parent = parent end
  149. return c
  150. end
  151. ,
  152. ["C"] = function(func) coroutine.resume(coroutine.create(func)) end
  153. ,
  154. ["W"] = function(part0,part1,x,y,z,rx,ry,rz,parent)
  155. w = Instance.new("Motor",m)
  156. if parent ~= nil then w.Parent = parent end
  157. w.Part0,w.Part1 = part0,part1
  158. w.C1 = CFrame.new(x,y,z) * CFrame.Angles(rx,ry,rz)
  159. w.MaxVelocity = .1
  160. return w
  161. end
  162. ,
  163. ["BG"] = function(parent)
  164. local c = Instance.new("BodyGyro",parent)
  165. c.P = 20e+003
  166. c.cframe = parent.CFrame
  167. c.maxTorque = Vector3.new(4e+005,4e+005,4e+005)*math.huge
  168. return c
  169. end
  170. ,
  171. ["BP"] = function(parent,position)
  172. local bp = Instance.new("BodyPosition",parent)
  173. bp.maxForce = Vector3.new()*math.huge
  174. bp.position = position
  175. return bp
  176. end
  177. ,
  178. ["F"] = function(parent,size,heat,color,secondcolor,enabled)
  179. f = Instance.new("Fire",parent)
  180. f.Size = size
  181. f.Heat = heat
  182. if enabled ~= nil then f.Enabled = enabled end
  183. if color ~= nil then f.Color = BrickColor.new(color).Color end
  184. if secondcolor ~= nil then f.SecondaryColor = BrickColor.new(secondcolor).Color end
  185. return f
  186. end
  187. ,
  188.  
  189. ["FM"] = function(parent,meshid,x,y,z,meshtexture)
  190. if meshid == "cylinder" then
  191. mesh = Instance.new("CylinderMesh",parent)
  192. mesh.Scale = Vector3.new(x,y,z)
  193. return mesh
  194. elseif meshid == 'block' then
  195. mesh = Instance.new("SpecialMesh",parent)
  196. mesh.MeshId = 'rbxassetid://9856898'
  197. mesh.Scale = v3n(x*parent.Size.x,y*parent.Size.y,z*parent.Size.z)*2
  198. if meshtexture then mesh.TextureId = 'rbxassetid://'..textureids[meshtexture] end
  199. return mesh
  200. end
  201. mesh = Instance.new("SpecialMesh",parent)
  202.  
  203. if meshid == 'wedge' then
  204. mesh.MeshType = 'Wedge'
  205. elseif meshid == 'sphere' then
  206. mesh.MeshType = 3
  207. elseif type(meshid) == "number" then
  208. mesh.MeshId = "rbxassetid://"..meshid
  209. else
  210. mesh.MeshId = "rbxassetid://"..meshids[meshid]
  211. end
  212. mesh.Scale = Vector3.new(x,y,z)
  213. if meshtexture then
  214. if type(meshtexture) == "number" then mesh.TextureId = "rbxassetid://"..meshtexture else
  215. mesh.TextureId = "rbxassetid://"..textureids[meshtexture] end
  216. end
  217. return mesh
  218. end,
  219.  
  220. ["Dec"] = function(parent,face,id,transparency)
  221. c = Instance.new("Decal",parent)
  222. c.Face = face
  223. c.Texture = id
  224. if transparency then c.Transparency = transparency end
  225. return c
  226. end
  227. }
  228.  
  229. function FindHumanoid(a,b)
  230. local hum
  231. for i,v in pairs(a:children()) do
  232. if v:IsA'Humanoid' then
  233. if not b then
  234. if v.Parent ~= char then hum = v break end
  235. else hum = v break end
  236. end
  237. end
  238. return hum
  239. end
  240. function damage(hit,amount,delay,color) ---- VAHINKO DAMAGE
  241. hum = FindHumanoid(hit)
  242. if hum then
  243. if delay then
  244. local found = CheckTag(hum,'tag')
  245. if not found then
  246. local tag = AddTag(hum,'tag')
  247. debris:AddItem(tag,delay)
  248. hum.Health = hum.Health - amount
  249. local hed = hum.Parent.Head
  250. local bbg = genNew('BillboardGui',hed,{
  251. Adornee = hed;
  252. Size = udim(3,3);
  253. StudsOffset = v3n(mr(-2,2),mr(3,5),mr(-2,2));
  254. })
  255.  
  256. local img = genNew('TextLabel',bbg,{
  257. Text = amount;
  258. TextScaled = true;
  259. TextColor = bcol(color or 'White');
  260. Size = UDim2.new(3,0,3,0);
  261. BackgroundTransparency = 1;
  262. })
  263. T.C(function() wait(.1) for i = 3,.1,-.1 do bbg.Size = udim(i,i) wait() end bbg:Destroy() end)
  264.  
  265. end
  266. else hum.Health = hum.Health - amount
  267. end
  268.  
  269. return hum
  270. end
  271. end
  272.  
  273. rtorso = torso
  274.  
  275. function scale(msh,str,a,b,c,bool)
  276. local amount
  277. local dims = {x=0,y=0,z=0}
  278. local func = function()
  279. for word in str:gmatch('%d+') do
  280. amount = word
  281. end
  282. amount = not amount and 1 or amount
  283. for word in str:gmatch('%w') do
  284. if word == 'x' or word == 'y' or word == 'z' then
  285. dims[word] = amount
  286. end
  287. end
  288. if type(mesh) ~= 'table' then
  289. for i = a,b,c or .01 do
  290. msh.Scale = v3n(dims.x*i,dims.y*i,dims.z*i)
  291. wait()
  292. end
  293. else
  294. for i = a,b,c or .01 do
  295. for _,v in pairs(mesh) do
  296. v.Scale = v3n(dims.x*i,dims.y*i,dims.z*i)
  297. end
  298. wait()
  299. end
  300. end
  301. end
  302. if bool then T.C(func) else func() end
  303. end
  304.  
  305.  
  306. lock = {["R"] =
  307. function(a)
  308. if a == 1 then
  309. rabrick = T.P(1.1,1.1,1.1,"Dark stone grey",1,false,false)
  310. rw = T.W(rabrick,rtorso,1.5,.5,0,0,0,0)
  311. T.W(rarm,rabrick,0,-.5,0,0,0,0)
  312. elseif a == 2 then
  313. rlbrick = T.P(1,1,1,"Dark stone grey",1,false,false)
  314. rhw = T.W(rlbrick,rtorso,.5,-1.5,0,0,0,0)
  315. T.W(rleg,rlbrick,0,-.5,0,0,0,0)
  316. elseif a == 0 then
  317. rs.Parent = rtorso
  318. rw.Parent = nil
  319. rabrick:Destroy() rabrick = nil
  320. elseif a == -1 then
  321. rhw.Parent = nil
  322. rh.Parent = rtorso
  323. rlbrick:Destroy() rlbrick = nil
  324. end
  325. end
  326. , ["L"] = function(a)
  327. if a == 1 then
  328. labrick = T.P(1,1,1,"Dark stone grey",1,false,false)
  329. lw = T.W(labrick,rtorso,-1.5,.5,0,0,0,0)
  330. T.W(larm,labrick,0,-.5,0,0,0,0)
  331. elseif a == 2 then
  332. llbrick = T.P(1,1,1,"Dark stone grey",1,false,false)
  333. lhw = T.W(llbrick,rtorso,-.5,-1.5,0,0,0,0)
  334. T.W(lleg,llbrick,0,-.5,0,0,0,0)
  335. elseif a == 0 then
  336. ls.Parent = rtorso
  337. lw.Parent = nil
  338. labrick:Destroy() labrick = nil
  339. elseif a == -1 then
  340. lhw.Parent = nil
  341. lh.Parent = rtorso
  342. llbrick:Destroy() llbrick = nil
  343. end
  344. end
  345. }
  346.  
  347. cfn,ang = CFrame.new,CFrame.Angles
  348. function spaas(position,radius,number,number2,color)
  349. mode = Instance.new("Model",m)
  350.  
  351. for i = 1,number2 do
  352. local pos = position+v3n(mr(-radius,radius),mr(-radius,radius),mr(-radius,radius))
  353. local mag = (position-pos).magnitude
  354.  
  355. local col = color or 'Toothpaste'
  356. local laz = T.P(.1,mag,.1,col,0,false,true,mode)
  357.  
  358. T.FM(laz,'cylinder',.3,1,.3)
  359. laz.CFrame = (cfn(position,pos)*cfn(0,0,-mag/2))*ang(math.pi/2,0,0)
  360.  
  361. cframe = (laz.CFrame*cfn(0,-mag/2,0)).p
  362. pos2 = cframe+v3n(mr(-radius,radius),mr(-radius,radius),mr(-radius,radius))
  363. mag2 = (cframe-pos2).magnitude
  364. local laz2 = T.P(.1,mag2,.1,col,0,false,true,mode)
  365. T.FM(laz2,'cylinder',.3,1,.3)
  366. laz2.CFrame = (cfn(cframe,pos2)*cfn(0,0,-mag2/2))*ang(math.pi/2,0,0)
  367.  
  368. previo = laz2
  369. for i = 1,number do
  370. cframe = (previo.CFrame*cfn(0,-mag/2,0)).p
  371. pos2 = cframe+v3n(mr(-radius,radius),mr(-radius,radius),mr(-radius,radius))
  372. mag2 = (cframe-pos2).magnitude
  373.  
  374. local laz2 = T.P(.1,mag2,.1,col,0,false,true,mode)
  375. T.FM(laz2,'cylinder',.3,1,.3)
  376. laz2.CFrame = (cfn(cframe,pos2)*cfn(0,0,-mag2/2))*ang(math.pi/2,0,0)
  377.  
  378. previo = laz2
  379. end
  380.  
  381. end
  382. debris:AddItem(mode,.1)
  383. return mode
  384. end
  385.  
  386. function lightning(startpos,endpos,times,offse,livetime,col)
  387. local curpos = startpos
  388. for i = 1,times do
  389. mag = (startpos-endpos).magnitude offs = {-offse,offse}
  390. offset = v3n(offs[mr(1,2)],offs[mr(1,2)],offs[mr(1,2)])
  391. laz = T.P(.1,.1,mag/times,col,0,false,true,m)
  392. apos = (cfn(curpos,endpos)*cfn(0,0,-mag/times)).p+offset
  393. if times == i then
  394. mag2 = (curpos-endpos).magnitude
  395. laz.Size = v3n(.1,.1,mag2)
  396. laz.CFrame = cfn(curpos,endpos)*cfn(0,0,-mag2/2)
  397. else
  398. laz.CFrame = cfn(curpos,apos)*cfn(0,0,-mag/times/2)
  399. end
  400. curpos = laz.CFrame*cfn(0,0,-mag/times/2).p debris:AddItem(laz,livetime)
  401. end
  402. end
  403.  
  404. ------MESHIDS---
  405. meshids = {["penguin"] = 15853464, ["ring"] = 3270017,
  406. ["spike"] = 1033714,["cone"] = 1082802,["crown"] = 20329976,["crossbow"] = 15886761,
  407. ["cloud"] = 1095708,["mjolnir"] = 1279013,["diamond"] = 9756362, ["hand"] = 37241605,
  408. ["fist"] = 65322375,["skull"] = 36869983,["totem"] = 35624068,["spikeb"] = 9982590,["dragon"] = 58430372,["fish"] = 31221717, ["coffee"] = 15929962,["spiral"] = 1051557,
  409. ["ramen"] = 19380188,["lightning"] = 72583597,["bullet"]=2697549,['cheese'] = 1090700,["pan"] = 24342877,["ketchup"] = 29690481,
  410. ["duck"] = 9419831,["unicorn"]=84003494,["luatophat"] = 42157240,["rooster"] = 24101267}---some meshids
  411. textureids = {["cone"] = 1082804,["rainbow"] = 28488599,["fish"] = 31221733, ["coffee"] = 24181455,["monster"] = 33366441,["ramen"] = 19380153,
  412. ["cheese"] = 1090703,['rooster'] = 24258160}
  413.  
  414.  
  415. function AddTag(object,tagname) local tag = Instance.new("BoolValue",object) tag.Name = tagname return tag end
  416. function CheckTag(object,tagname) local found = object:FindFirstChild(tagname) if found then return found else return _ end end
  417. function RemoveTag(object,tagname) local found = CheckTag(object,tagname) if found then found:Remove() end end
  418.  
  419. waitbp = function(a,r) while (a.Parent.Position-a.position).magnitude > r do wait() end end
  420.  
  421. function FindGround(position,radius,ignore)
  422. if ignore then
  423. ig = ignore table.insert(ig,m)
  424. else ig = {m}
  425. end
  426. local ray = Ray.new(position,Vector3.FromNormalId(Enum.NormalId.Bottom)*radius)
  427. local obj,pos2 = Workspace:FindPartOnRayWithIgnoreList(ray,ig)
  428. if obj and pos2 then return obj,pos2 else return nil end
  429. end
  430.  
  431. function calcp(a,b) --- Direction CFrame
  432. return cfn(a,v3n(b.x,a.y,b.z))
  433. end
  434.  
  435. --------ANIMATING FUNCTION--------
  436. tw = function(Weld, Stop, Step,a)
  437. local func = function()
  438. local Start = Weld.C0
  439. local X1, Y1, Z1 = Start:toEulerAnglesXYZ()
  440. local Stop = Stop
  441. local X2, Y2, Z2 = Stop:toEulerAnglesXYZ()
  442.  
  443. for i = 0, 1, Step or .1 do
  444. Weld.C0 = CFrame.new( (Start.p.X * (1 - i)) + (Stop.p.X * i),
  445. (Start.p.Y * (1 - i)) + (Stop.p.Y * i),
  446. (Start.p.Z * (1 - i)) + (Stop.p.Z * i)) * CFrame.fromEulerAnglesXYZ(
  447. (X1 * (1 - i)) + (X2 * i), (Y1 * (1 - i)) + (Y2 * i),
  448. (Z1 * (1 - i)) + (Z2 * i) )
  449. wait()
  450. end
  451.  
  452. Weld.C0 = Stop
  453. end
  454. if a then T.C(function() func() end) else func() end
  455. end
  456. ------------------------------------
  457.  
  458. function weldall(q)
  459. if q == 1 then a,b = 1,2 else a,b = -1,0 end
  460. for i = a,b do lock.R(i) lock.L(i) end
  461. end
  462. function FindPlayers(a,b,c) --- Finds Players near a part
  463. local list = {}
  464. for i,v in pairs(Workspace:children()) do
  465. if v:IsA("Model") then
  466. for _,q in pairs(v:children()) do
  467. if q:IsA("Humanoid") then
  468. if q.Health > -1 then
  469. if c and q.Parent ~= char then
  470. if (q.Torso.Position-a).magnitude < b then
  471. table.insert(list,v)
  472. end
  473. elseif not c then
  474. if (q.Torso.Position-a).magnitude < b then
  475. table.insert(list,v)
  476. end
  477. end
  478. end
  479. end
  480. end
  481. end
  482. end
  483. return list
  484. end
  485. end
  486. hdl = T.P(.5,4,.5,'Navy blue',0,false,false)
  487. hw = T.W(hdl,rarm,0,-1,-.5,-math.pi/2,0,0)
  488.  
  489. tip = T.P(1,1,1,'White',0,false,false)
  490. T.W(tip,hdl,0,2.45,0,0,0,0)
  491.  
  492. p2 = T.P(1.5,1,1.5,'Black',0,false,false)
  493. mot = T.W(p2,tip,0,1,0,-math.pi/2,0,0)
  494. mot.C0 = cfn()*ang(-math.pi/2,0,0)
  495.  
  496. cyl = T.P(1.2,.1,1.2,'Bright red',0,false,false)
  497. T.W(cyl,p2,0,.55,0,0,0,0)
  498.  
  499. lock.R(1)
  500.  
  501. tw(rw,cfn()*ang(md(-80),md(-40),0)) np = rw.C0
  502.  
  503. Sound = {}
  504. for i,v in pairs(FilterTab(char.Head:children(),'Sound')) do
  505. if v.Name == "Mugex's Weapon Sound" then v:Destroy() end
  506. end
  507. Sound.new = function(id,pitch)
  508. local obj = Instance.new("Sound",char.Head)
  509. obj.Name = "Mugex's Weapon Sound"
  510. obj.SoundId = id
  511. obj.Pitch = pitch or 1
  512. return obj
  513. end
  514.  
  515. slash_snd = Sound.new("http://www.roblox.com/Asset/?id=10209640",.5)
  516. shoot_snd = Sound.new("http://www.roblox.com/Asset/?id=10209897")
  517. notar_snd = Sound.new("http://www.roblox.com/Asset/?id=10209771")
  518. elec_snd = Sound.new("http://www.roblox.com/Asset/?id=11998777")
  519.  
  520. function att()
  521. con = tip.Touched:connect(function(hit) local hum = damage(hit.Parent,5,.05,'Bright red')
  522. if hum then elec_snd:Play() spaas(hum.Torso.Position,3,2,2,'Bright red') end
  523. end)
  524.  
  525. tw(rw,cfn()*ang(md(-140),md(20),0))
  526. slash_snd:Play()
  527. tw(rw,cfn()*ang(md(40),0,0),.2)
  528. tw(rw,np)
  529. con:disconnect()
  530. end
  531.  
  532. function spiker() r = 1
  533. tw(rw,cfn()*ang(md(-90),0,0),.1,'')
  534. tw(hw,cfn(0,-1,0)*ang(math.pi/2,0,0))
  535. local count = 0
  536. spikes = Instance.new('Model',m)
  537. for i = 1,360,30 do
  538. sp = T.P(.4,.4,.4,'Magenta',1,false,false,spikes) local msh = T.FM(sp,'spike',.4,2,.4)
  539. local w = T.W(sp,p2,mcos(md(i))*r,0,msin(md(i))*r,math.pi/2,0,math.pi/2+md(i))
  540. w.C0 = cfn()*ang(math.pi,0,0)
  541. end
  542. fade(spikes:children(),1,0,-.1)
  543. shooting = true
  544. bg = T.BG(torso)
  545. T.C(function() while shooting do wait() bg.cframe = calcp(torso.Position,mouse.hit.p) end end)
  546. T.C(function()
  547. while shooting do
  548. local p = T.P(1,1,1,'White',0,true,false) T.FM(p,'skull',1,1,1,7920311)
  549. p.CFrame = cyl.CFrame*cfn(0,1,0)
  550. p.Touched:connect(function(hit) local h = damage(hit.Parent,3,.1,'Deep blue') if h then fade(p,0,1,.1) p:Destroy() end end)
  551. Instance.new("BodyForce",p).force = torso.CFrame.lookVector*30+v3n(0,p:GetMass()*floatforce,0)
  552. debris:AddItem(p,2) shoot_snd:Play() wait(.2)
  553. end end)
  554.  
  555. for i = 1,3 do
  556. mot.DesiredAngle = md(360)
  557. ventta(mot)
  558. zeero(mot,0)
  559. end
  560. notar_snd:Play()
  561. shooting = false bg:Destroy()
  562. fade(spikes:GetChildren(),0,1,.1) spikes:Destroy()
  563. tw(rw,np,.1,'')
  564. tw(hw,cfn())
  565. end
  566.  
  567. wing1 = T.P(5,3.5,1,'White',.3,false,false) T.FM(wing1,90821133,2,2,2,90782359)
  568. w1 = T.W(wing1,torso,0,1,.5,-math.pi/2,0,0)
  569. w1.C0 = cfn(2.5,0,0)*ang(-math.pi/2,0,0)
  570. w1.DesiredAngle = .5
  571.  
  572. wing1 = T.P(5,3.5,1,'White',.3,false,false) T.FM(wing1,90821193 or 92135556,2,2,2,90782359)
  573. w2 = T.W(wing1,torso,0,1,.5,-math.pi/2,0,0)
  574. w2.C0 = cfn(-2.5,0,0)*ang(-math.pi/2,0,0)
  575. w2.DesiredAngle = -.5
  576.  
  577. fly_bp = _
  578. flap = Sound.new('http://www.roblox.com/asset/?id=90820031')
  579. function hover()
  580. if not fly_bp then
  581. fly_bp = T.BP(torso,torso.Position)
  582. T.C(function()
  583. while fly_bp do
  584. w1.DesiredAngle = 1
  585. w2.DesiredAngle = -1
  586. ventta(w1)
  587. flap:Play()
  588. w1.DesiredAngle = .5
  589. w2.DesiredAngle = -.5
  590. ventta(w1)
  591. end
  592. end)
  593. else fly_bp:Destroy() fly_bp = _
  594. end
  595. end
  596.  
  597. function fly()
  598. if fly_bp then
  599. fly_bg = T.BG(torso)
  600. holding = true
  601. while holding do wait() unit = (torso.Position-mouse.hit.p).unit
  602. fly_bg.cframe = calcp(torso.Position,mouse.hit.p)
  603. fly_bp.position = fly_bp.position+unit*-5
  604. end
  605. fly_bg:Destroy()
  606. end
  607. end
  608. cork = Sound.new("http://www.roblox.com/asset/?id=18426149")
  609. function tablets() local r = 10
  610. local tabs = Instance.new("Model",Workspace)
  611. for i = 36,360,360/30 do
  612. p = T.P(2.5,5,.5,'Deep blue',.5,false,true,tabs)
  613. p.Name = 'MugTable'
  614. p.Touched:connect(function(hit) damage(hit.Parent,10,1,'New Yeller') end)
  615. pos = l(torso,mcos(md(i))*r,0,msin(md(i))*r).p
  616. p.CFrame = calcp(pos,torso.Position)
  617. end
  618. local box = Instance.new("SelectionBox",m) holding = true
  619.  
  620. local all = tabs:children()
  621.  
  622. T.C(function()
  623. while holding do
  624. for i,v in pairs(all) do
  625. a = 360/#all*i
  626. local pos = l(torso,mcos(md(a))*r,0,msin(md(a))*r).p
  627. v.CFrame = calcp(pos,torso.Position)
  628. end
  629. wait()
  630. end
  631. end)
  632.  
  633. while holding do
  634. if mouse.Target.Name == 'MugTable' then
  635. box.Adornee = mouse.Target
  636. end
  637. wait()
  638. end
  639. cork:Play()
  640. local selected = box.Adornee or _
  641. if not selected then tabs:Destroy() return end
  642. selected.Anchored = false box:Destroy()
  643. for i,v in pairs(all) do if v ~= selected then v:Destroy() end end
  644. vel = Instance.new("BodyVelocity",selected)
  645. vel.maxForce = v3n(1,0,1)*math.huge
  646. vel.velocity = selected.CFrame.lookVector*-60
  647. debris:AddItem(tabs,4)
  648. end
  649.  
  650. function dive()
  651. if fly_bp then
  652. unit = (torso.Position-mouse.hit.p).unit
  653. fly_bp.Parent = _
  654. torso.Anchored = true
  655. oldp = torso.Position
  656. torso.CFrame = cfn((torso.Position + unit*-100),oldp)*ang(0,math.pi,0)
  657. mag = (oldp-torso.Position).magnitude
  658. local laz = T.P(1,mag,2,'Cyan',0,false,true)
  659. laz.CFrame = cfn(oldp,torso.Position)*cfn(0,0,-mag/2)*ang(math.pi/2,0,0)
  660. T.C(function() fade(laz,0,1,.1) laz:Destroy() end)
  661. torso.Anchored = false
  662. fly_bp.Parent = torso fly_bp.position = torso.Position
  663. end
  664. end
  665.  
  666. klist = {
  667. {'f',function() att() end};
  668. {'q',function() spiker() end};
  669. {'r',function() fly() end,''};
  670. {'e',function() hover() end};
  671. {'c',function() tablets() end,''};
  672. {'t',function() dive() end};
  673. }
  674.  
  675. mouse.Button1Up:connect(function() holding = false end)
  676. 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)
  677. mouse.KeyDown:connect(function(key)
  678. if attacking then return end
  679. for i,v in pairs(klist) do
  680. if key == v[1] then attacking = true v[2](mouse) attacking = false end
  681. end
  682. end)
  683. --mediafire
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement