Createok

Untitled

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