Advertisement
Guest User

Untitled

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