Awooslayer699

Untitled

Mar 8th, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if game:GetService("RunService"):IsClient()then error("say h/ not hl/ ya dummy")end;print("get rekt");InternalData = {}
  2. do
  3. script.Parent = owner.Character
  4. local Event = Instance.new("RemoteEvent");Event.Name = "UserInput"
  5. local function NewFakeEvent()
  6. local Bind = Instance.new("BindableEvent")
  7. local Fake;Fake = {Connections = {},
  8. fakeEvent=true;
  9. Connect=function(self,Func)
  10. Bind.Event:connect(Func)
  11. self.Connections[Bind] = true
  12. return setmetatable({Connected = true},{
  13. __index = function (self,Index)
  14. if Index:lower() == "disconnect" then
  15. return function() Fake.Connections[Bind] = false;self.Connected = false end
  16. end
  17. return Fake[Index]
  18. end;
  19. __tostring = function() return "Connection" end;
  20. })
  21. end}
  22. Fake.connect = Fake.Connect;return Fake;
  23. end
  24. local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
  25. local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
  26. local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
  27. self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
  28. end};ContextActionService.UnBindAction = ContextActionService.BindAction
  29. local function TriggerEvent(self,Event,...)
  30. local Trigger = Mouse[Event]
  31. if Trigger and Trigger.fakeEvent and Trigger.Connections then
  32. for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end
  33. end
  34. end
  35. Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent
  36. Event.OnServerEvent:Connect(function(FiredBy,Input)
  37. if FiredBy.Name ~= owner.Name then return end
  38. if Input.MouseEvent then
  39. Mouse.Target = Input.Target;Mouse.Hit = Input.Hit
  40. else
  41. local Begin = Input.UserInputState == Enum.UserInputState.Begin
  42. if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end
  43. for _,Action in pairs(ContextActionService.Actions) do
  44. for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
  45. end
  46. Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
  47. UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
  48. end
  49. end)
  50. InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService
  51. Event.Parent = NLS([[
  52. local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse()
  53. local Input = function(Input,gameProcessedEvent)
  54. if gameProcessedEvent then return end
  55. Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
  56. end
  57. UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
  58. local Hit,Target
  59. while wait(1/30) do
  60. if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
  61. Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
  62. end
  63. end
  64. ]],owner.Character)
  65. end
  66. RealGame = game;game = setmetatable({},{
  67. __index = function (self,Index)
  68. local Sandbox = function (Thing)
  69. if Thing:IsA("Player") then
  70. local RealPlayer = Thing
  71. return setmetatable({},{
  72. __index = function (self,Index)
  73. local Type = type(RealPlayer[Index])
  74. if Type == "function" then
  75. if Index:lower() == "getmouse" or Index:lower() == "mouse" then
  76. return function (self)return InternalData["Mouse"] end
  77. end
  78. return function (self,...)return RealPlayer[Index](RealPlayer,...) end
  79. end
  80. return RealPlayer[Index]
  81. end;
  82. __tostring = function(self) return RealPlayer.Name end
  83. })
  84. end
  85. end
  86. if RealGame[Index] then
  87. local Type = type(RealGame[Index])
  88. if Type == "function" then
  89. if Index:lower() == "getservice" or Index:lower() == "service" then
  90. return function (self,Service)
  91. local FakeServices = {
  92. ["players"] = function()
  93. return setmetatable({},{
  94. __index = function (self2,Index2)
  95. local RealService = RealGame:GetService(Service)
  96. local Type2 = type(Index2)
  97. if Type2 == "function" then
  98. return function (self,...) return RealService[Index2](RealService,...)end
  99. else
  100. if Index2:lower() == "localplayer" then return Sandbox(owner) end
  101. return RealService[Index2]
  102. end
  103. end;
  104. __tostring = function(self) return RealGame:GetService(Service).Name end
  105. })
  106. end;
  107. ["contextactionservice"] = function() return InternalData["ContextActionService"] end;
  108. ["userinputservice"] = function() return InternalData["UserInputService"] end;
  109. ["runservice"] = function()
  110. return setmetatable({},{
  111. __index = function(self2,Index2)
  112. local RealService = RealGame:GetService(Service)
  113. local Type2 = type(Index2)
  114. if Type2 == "function" then
  115. return function (self,...) return RealService[Index2](RealService,...) end
  116. else
  117. local RunServices = {
  118. ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end;
  119. ["renderstepped"] = function() return RealService["Stepped"] end
  120. }
  121. if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end
  122. return RealService[Index2]
  123. end
  124. end
  125. })
  126. end
  127. }
  128. if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end
  129. return RealGame:GetService(Service)
  130. end
  131. end
  132. return function (self,...) return RealGame[Index](RealGame,...) end
  133. else
  134. if game:GetService(Index) then return game:GetService(Index) end
  135. return RealGame[Index]
  136. end
  137. end
  138. return nil
  139. end
  140. });Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("running the script noob")
  141.  
  142. -- pcall(function()
  143. -- script.DSource.Value = ""
  144. -- script.DSource:Destroy()
  145. -- end)
  146. -- script.Parent = nil
  147.  
  148. ply=game:service'Players'.LocalPlayer
  149.  
  150. repeat wait()until ply~=nil
  151.  
  152. char=ply.Character
  153. torso=char.Torso
  154.  
  155. rarm,larm=char['Right Arm'],char['Left Arm']
  156. rleg,lleg=char['Right Leg'],char['Left Leg']
  157. rshl,lshl=torso['Right Shoulder'],torso['Left Shoulder']
  158. rhip,lhip=torso['Right Hip'],torso['Left Hip']
  159.  
  160. bcol=BrickColor.new
  161. cfn,md,mr,v3n=CFrame.new,math.rad,math.random,Vector3.new
  162. ang=function(x,y,z)return CFrame.Angles(x or 0,y or 0,z or 0)end
  163. Debris=game:service'Debris'
  164. m={}
  165. m.tau=math.pi*2
  166. m.floatforce = 196.25
  167. numkp=NumberSequenceKeypoint.new
  168.  
  169. hum_root=char.HumanoidRootPart
  170.  
  171. mouse=ply:GetMouse()
  172.  
  173. function l(a,x,y,z,xx,yy,zz)
  174. if string.find(tostring(a),',') == nil then
  175. return (a.CFrame*CFrame.new(x or 0,y or 0,z or 0))*CFrame.Angles(xx or 0,yy or 0, zz or 0)
  176. else return (a * CFrame.new(x or 0,y or 0,z or 0))*CFrame.Angles(xx or 0,yy or 0,zz or 0)
  177. end
  178. end
  179.  
  180. pcall(function() char.Stick:Destroy() end) --- Destroys Physical Tool
  181. Weapon = Instance.new("Model",char) Weapon.Name = 'Stick'
  182. Instance.new('BoolValue',Weapon).Name='Mug_Did'
  183. do --UTILITIES
  184.  
  185. function Create(ClassName)
  186. local obj=Instance.new(ClassName)
  187. return function(props)
  188. obj.Parent=Weapon
  189. for key,val in pairs(props)do
  190. if key=='_P'then
  191. obj['Parent']=val
  192. elseif i=='_C'then
  193. obj[val[1]]:connect(val[2])
  194. else
  195. obj[key]=val
  196. end
  197. end
  198. return obj
  199. end
  200. end
  201.  
  202. do --CREATION
  203.  
  204. Weld = function(p0,p1,x,y,z,rx,ry,rz,par)
  205. p0.Position = p1.Position
  206. local w = Instance.new('Motor',game:service'JointsService')
  207. w.Part0 = p1
  208. w.Part1 = p0
  209. w.C0 = CFrame.new(x or 0,y or 0,z or 0)*CFrame.Angles(rx or 0,ry or 0,rz or 0)
  210. w.MaxVelocity = .1
  211. return w
  212. end
  213. Cur_Parent=nil
  214. current_mat=nil
  215. anchor=false
  216. Part = function(x,y,z,color,tr,cc,an,parent)
  217. local p = Instance.new('Part',parent or Cur_Parent or Weapon)
  218. p.formFactor = 'Custom'
  219. p.Locked = true
  220. p.Position=torso.Position
  221. p.Size = Vector3.new(x,y,z)
  222. p.BrickColor = BrickColor.new(color or 'White')
  223. p.CanCollide = cc or false
  224. p.Anchored = an or anchor or false
  225. p.Transparency = tr or 0
  226. p.Material=current_mat or'SmoothPlastic'
  227. for i,v in pairs{'TopSurface','BottomSurface','FrontSurface','BackSurface','LeftSurface','RightSurface'}do
  228. p[v]=10
  229. end
  230. return p
  231. end
  232. Wedge = function(x,y,z,color,tr,cc,an,parent)
  233. local p = Instance.new('WedgePart',parent or Cur_Parent or Weapon)
  234. p.formFactor = 'Custom'
  235. p.Size = Vector3.new(x,y,z)
  236. p.BrickColor = BrickColor.new(color or 'White')
  237. p.CanCollide = cc or false
  238. p.Anchored = an or false
  239. p.Transparency = tr or 0
  240. p.Material=current_mat or'SmoothPlastic'
  241. for i,v in pairs{'TopSurface','BottomSurface','FrontSurface','BackSurface','LeftSurface','RightSurface'}do
  242. p[v]=10
  243. end
  244. return p
  245. end
  246.  
  247. Meshes = {Diamond='9756362';Spikeball='9982590';Table='111868131';
  248. Egg='1527559';Ring='3270017';Bullet='2697549';Grass='1080954';
  249. Shark='82821384';Sword='12221720';Crown='10688643';Spike='1033714';
  250. Leaf='48100239';Fist='65322375';Chakram='19251107';Crown='20329976';Spring='9753878';
  251. Tree='8564125';Fireball='10587413';DiamondBall='10917418'}
  252.  
  253. Textures = {Leaf='rbxassetid://48047287';White='rbxassetid://5736319'}
  254.  
  255. Mesh = function(par,num,x,y,z,tex)
  256. local msh = _
  257. if num == 1 then msh = Instance.new("CylinderMesh",par)
  258. elseif num == 2 then msh = Instance.new("SpecialMesh",par) msh.MeshType = 3
  259. elseif num == 3 then msh = Instance.new("SpecialMesh",par) msh.MeshType = 6
  260. elseif num == 4 then msh = Instance.new("SpecialMesh",par) msh.MeshType = 'Wedge'
  261. elseif type(num) == 'string' then msh = Instance.new("SpecialMesh",par)
  262. if num=='Torso'then msh.MeshType=1 else
  263. msh.MeshId = string.find(num,'://') == nil and 'rbxassetid://'..Meshes[num] or num end
  264. end
  265. msh.Scale = Vector3.new(x or 1,y or 1,z or 1)
  266. if tex then
  267. msh.TextureId = Textures[tex] or tex or ''
  268. end
  269. return msh
  270. end
  271.  
  272. end
  273.  
  274. function HSVtoRGB(h, s, v)
  275. h = (h % 1) * 6
  276. local f = h % 1
  277. local p = v * (1 - s)
  278. local q = v * (1 - s * f)
  279. local t = v * (1 - s * (1 - f))
  280. if h < 1 then
  281. return v, t, p
  282. elseif h < 2 then
  283. return q, v, p
  284. elseif h < 3 then
  285. return p, v, t
  286. elseif h < 4 then
  287. return p, q, v
  288. elseif h < 5 then
  289. return t, p, v
  290. else
  291. return v, p, q
  292. end
  293. end
  294.  
  295. function Edit(obj,props)
  296. local objects={}
  297. if type(obj)=='table'then objects=obj
  298. return function(props)
  299. obj.Parent=Weapon
  300. for _,obj in pairs(objects)do
  301. for key,val in pairs(props)do
  302. if key=='_P'then
  303. obj['Parent']=val
  304. elseif i=='_F'then
  305. val(objects)()
  306. else
  307. succes,err=pcall(function()return obj[key]end)
  308. if succes then
  309. obj[key]=val
  310. end
  311. end
  312. end
  313. end
  314. end
  315. end
  316.  
  317. end
  318.  
  319. function calcgrav(obj)
  320. local total=0
  321. local function add(a)
  322. for i,v in pairs(a:children())do
  323. if v:IsA'BasePart'then
  324. total=total+v:GetMass()*m.floatforce
  325. elseif v:IsA'Hat'then
  326. total=total+v.Handle:GetMass()*m.floatforce
  327. else add(v)end
  328. end
  329. end
  330. add(obj or char)
  331. return total
  332. end
  333.  
  334. function findHum(pos,rad,hum2)
  335. local hums={}
  336. function check(a)
  337. local res=false
  338. for i,ho in pairs(hums)do
  339. if a==ho then res=true end
  340. end
  341. return res
  342. end
  343. for i,v in pairs(Workspace:children())do
  344. if v:IsA'Model'and v~=char and v~=(hum2 or char) then
  345. for i,q in pairs(v:children())do
  346. if q:IsA'Humanoid' and q.Parent:FindFirstChild'Torso'and(q.Torso.Position-pos).magnitude < rad then
  347. if not check(q)then
  348. table.insert(hums,q)
  349. end
  350. end
  351. end
  352. end
  353. end
  354. return hums,pos
  355. end
  356.  
  357. udim=function(a,b,c,d)
  358. if type(a)=='string'then
  359. x,y=tostring(a):match('(%d*%.*%d*),(%d*%.*%d*)')
  360. return UDim2.new(x or 0,x2 or 0,y or 0,y2 or 0)
  361. else
  362. return UDim2.new(a or 0,c or 0,b or 0,d or 0)
  363. end end
  364.  
  365. function getHum(what,b)local res
  366. for i,v in pairs(what:children())do
  367. if v:IsA'Humanoid' then
  368. res=v
  369. end
  370. end
  371. return res
  372. end
  373.  
  374. end
  375.  
  376. do --ANIMATIONSYSTEM DECLARATIONS
  377. cont_anim=true
  378.  
  379. rarm,larm=char['Right Arm'],char['Left Arm']
  380. rleg,lleg=char['Right Leg'],char['Left Leg']
  381.  
  382. torw=char.HumanoidRootPart.RootJoint
  383. neck=torso.Neck
  384. rs,ls=torso['Right Shoulder'],torso['Left Shoulder']
  385. rh,lh=torso['Right Hip'],torso['Left Hip']
  386.  
  387. ort=cfn(0,0,0,-1,0,0,0,0,1,0,1,-0)
  388. norig=cfn(0,1,0,-1,-0,-0,0,0,1,0,1,0)
  389.  
  390. rw,lw=nil,nil
  391. arms=nil
  392.  
  393. r_shl_c0=cfn(1,0.5,0)--,0,0,1,0,1,0,-1,-0,-0)
  394. r_shl_c1=cfn(-0.5,0.5,0)--,0,0,1,0,1,0,-1,-0,-0)
  395.  
  396. l_shl_c0=cfn(-1,0.5,0)--,0,0,1,0,1,0,-1,-0,-0)
  397. l_shl_c1=cfn(0.5,0.5,0)--,0,0,1,0,1,0,-1,-0,-0)
  398.  
  399. -- l_shl_c0=cfn(-1,0.5,0)--,-0,-0,-1,0,1,0,1,0,0)
  400. -- l_shl_c1=cfn(0.5,0.5,0)--,-0,-0,-1,0,1,0,1,0,0)
  401.  
  402. r_hip_c0=cfn(1,-1,0)--,0,0,1,0,1,0,-1,-0,-0)
  403. r_hip_c1=cfn(0.5,1,0)--,0,0,1,0,1,0,-1,-0,-0)
  404.  
  405. l_hip_c0=cfn(-1,-1,0)--,-0,-0,-1,0,1,0,1,0,0)
  406. l_hip_c1=cfn(-0.5,1,0)--,-0,-0,-1,0,1,0,1,0,0)
  407.  
  408.  
  409. orig_rhip_c0=cfn(1,-1,0,0,0,1,0,1,0,-1,-0,-0)
  410. orig_lhip_c0=cfn(-1,-1,0,-0,-0,-1,0,1,0,1,0,0)
  411.  
  412. rw_cf=r_shl_c0
  413. lw_cf=l_shl_c0
  414.  
  415. rw2_cf=r_hip_c0
  416. lw2_cf=l_hip_c0
  417. end
  418.  
  419. do ---ANIMATIONSYSTEM
  420. function Lock(which)
  421. arms={char:FindFirstChild'Right Arm',char:FindFirstChild'Left Arm'}
  422. legs={char:FindFirstChild'Right Leg',char:FindFirstChild'Left Leg'}
  423. local sh={torso:FindFirstChild'Right Shoulder',torso:FindFirstChild'Left Shoulder'}
  424. local sh2={torso:FindFirstChild'Right Hip',torso:FindFirstChild'Left Hip'}
  425. -- print(unpack(sh),unpack(arms))
  426. if arms and torso and sh and legs and sh2 then
  427. if which=='R'then
  428. if not rw then
  429. sh[1].Part1=nil
  430. rw=Instance.new('Weld')
  431. rw.Part0=torso
  432. rw.Parent=torso
  433. rw.Part1=arms[1]
  434. rw.C0=rw_cf
  435. rw.C1=r_shl_c1
  436. else
  437. rw:Destroy() rw=nil
  438. sh[1].Part0=torso sh[1].Part1=arms[1]
  439. end
  440. elseif which=='L'then
  441. if not lw then
  442. sh[2].Part1=nil
  443. lw=Instance.new('Weld')
  444. lw.Part0=torso
  445. lw.Parent=torso
  446. lw.Part1=arms[2]
  447. lw.C0=lw_cf
  448. lw.C1=l_shl_c1
  449. else
  450. lw:Destroy()lw=nil
  451. sh[2].Part0=torso sh[2].Part1=arms[2]
  452. end
  453. end
  454. if which=='RR'then
  455. if not rw2 then
  456. sh2[1].Part1=nil
  457. rw2=Instance.new('Weld')
  458. rw2.Part0=torso
  459. rw2.Parent=torso
  460. rw2.Part1=legs[1]
  461. rw2.C0=rw2_cf
  462. rw2.C1=r_hip_c1
  463. else
  464. rw2.Parent=nil rw2=nil
  465. sh2[1].Part0=torso sh2[1].Part1=legs[1]
  466. end
  467. elseif which=='LL'then
  468. if not lw2 then
  469. sh2[2].Part1=nil
  470. lw2=Instance.new('Weld')
  471. lw2.Part0=torso
  472. lw2.Parent=torso
  473. lw2.Part1=legs[2]
  474. lw2.C0=lw2_cf
  475. lw2.C1=l_hip_c1
  476. else
  477. lw2.Parent=nil lw2=nil
  478. sh2[2].Part0=torso sh2[2].Part1=legs[2]
  479. end
  480. end
  481. end
  482. end
  483.  
  484. function Anim(what)
  485. local weld=getfenv()[what]
  486. return function(where)
  487. if weld then
  488. target_pos[what]=def_pos[what]*where
  489. -- waitfor(weld,where)
  490. end
  491. end
  492. end
  493.  
  494. char_hum=getHum(char)
  495.  
  496. spd={
  497. rw=.1;lw=.1;rw2=.1;lw2=.1;torw=.1;neck=.1;hw=.1;
  498. }
  499. setmetatable(spd,{
  500. __newindex=function(tab,i,v)
  501. if i=='all'then
  502. for o,q in pairs(spd)do
  503. spd[o]=v
  504. end
  505. end end
  506. })
  507. def_pos={
  508. rw=rw_cf;
  509. lw=lw_cf;
  510. rw2=rw2_cf;
  511. lw2=lw2_cf;
  512. torw=ort;
  513. neck=norig;
  514. hw=cfn();
  515. -- shield_w=cfn(-.25,0,0)*ang(math.pi,math.pi/2);
  516. }
  517. target_pos={
  518. rw=rw_cf;
  519. lw=lw_cf;
  520. rw2=def_pos.rw2;
  521. lw2=def_pos.lw2;
  522. torw=def_pos.torw;
  523. neck=def_pos.neck;
  524. hw=cfn();
  525. }
  526. can_anim={
  527. rw=true;lw=true;rw2=true;lw2=true;torw=true;neck=true;
  528. }
  529. game:service'RunService':BindToRenderStep('Mug_Anims',5,function()
  530. if cont_anim then
  531. if rw and can_anim.rw then
  532. rw.C0=rw.C0:lerp(target_pos.rw,spd.rw)
  533. end
  534. if lw and can_anim.lw then
  535. lw.C0=lw.C0:lerp(target_pos.lw,spd.lw)
  536. end
  537. if rw2 and can_anim.rw2 then
  538. rw2.C0=rw2.C0:lerp(target_pos.rw2,spd.rw2)
  539. end
  540. if lw2 and can_anim.lw2 then
  541. lw2.C0=lw2.C0:lerp(target_pos.lw2,spd.lw2)
  542. end
  543. if torw and can_anim.torw then
  544. torw.C0=torw.C0:lerp(target_pos.torw,spd.torw)
  545. end
  546. if neck and can_anim.neck then
  547. neck.C0=neck.C0:lerp(target_pos.neck,spd.neck)
  548. end
  549. if hw then
  550. hw.C1=hw.C1:lerp(target_pos.hw,spd.hw)
  551. end
  552. end
  553. end)
  554. end
  555.  
  556. function tag(a,b)
  557. if type(b)=='string'then
  558. if not getfenv()[b]then
  559. getfenv()[b]={}
  560. end
  561. table.insert(getfenv()[b],a)
  562. else
  563. table.insert(b,a)
  564. end
  565. end
  566. hinge=Part(.25,.5,.25)Mesh(hinge,1)
  567. hw=Weld(hinge,torso,.9,-.85,0,0,-math.pi/2,math.pi/2)
  568. restpos=hw.C0
  569.  
  570. d=Part(.1,.1,.1,'Black')Weld(d,hinge,0,.25)Mesh(d,1,1,.1)
  571. d=Part(.1,.1,.1,'Black')Weld(d,hinge,0,-.25)Mesh(d,1,1,.1)
  572.  
  573. p=Part(.75,.5,.1)Mesh(p,3,1,1,.75)
  574. Create'Motor'{_P=p;Part0=p;Part1=hinge;
  575. C0=cfn(.75/2,0,0)*ang(math.pi/2);
  576. C1=cfn(0,0,0)*ang(math.pi/2);
  577. MaxVelocity=.1
  578. }
  579.  
  580. p=Part(.75,.5,.1)Mesh(p,3,1,1,.5)
  581. mo=Create'Motor'{_P=p;Part0=p;Part1=hinge;
  582. C0=cfn(-.75/2,0,0)*ang(-math.pi/2,0);
  583. C1=cfn(0,0,-.15/2)*ang(-math.pi/2,0,md'45'+md'135');
  584. MaxVelocity=.15
  585. }
  586.  
  587. local tas={}
  588.  
  589. Spawn(function()
  590. while wait()do
  591. for e,o in ipairs(tas)do
  592. if o[2].Parent~=nil then
  593. o[1]=o[1]*ang(0,md'5')
  594. for i,v in ipairs(o[2]:children())do
  595. if v:IsA'Part'then
  596. v.CFrame=l(o[1],math.cos(i*m.tau/6)*o[2].MVal.Value,0,math.sin(i*m.tau/6)*o[2].MVal.Value)
  597. end
  598. end
  599. else
  600. table.remove(tas,e)
  601. end
  602. end
  603. end
  604. end)
  605. whirr_snd=Create'Sound'{_P=Weapn;SoundId='rbxassetid://278329638';Pitch=1.5;Volume=1}
  606. droning_snd=Create'Sound'{_P=Weapon;SoundId='rbxassetid://275641634';Pitch=1.75;Volume=.1;Looped=true}
  607. function lol()
  608. Lock'R'
  609.  
  610. whirr_snd:Play()
  611. Anim'rw'(ang(md'75')*ang(0,md'90'))
  612. hw.Part0=rarm hw.C0=cfn(0,-1.1,0)*ang(-math.pi/2,md'25')
  613. mo.DesiredAngle=md'-135'
  614. wait'.25'
  615. cone=Part(1,1,1,'Cyan',.5)msh=Mesh(cone,'Spike',0,0,0)
  616. w=Weld(cone,p,0,0,0,math.pi/2)
  617. for i=0,1,.1 do
  618. w.C0=cfn(0,0,-1.75*i)*ang(math.pi/2)
  619. msh.Scale=v3n(i*.75,i*4.5,i*.75)
  620. wait()
  621. end
  622. wait()
  623. local obj,pos=Workspace:FindPartOnRay(Ray.new(l(cone).p,v3n(0,-10,0)),char)
  624. if obj and pos then
  625. local r=.75
  626. local ps={}
  627. local center=cfn(pos)
  628. local model=Create'Model'{_P=Weapon}
  629. for i=0,m.tau,m.tau/6 do
  630. local p=Part(.1,.1,.1) p.Anchored=true Mesh(p,2).Name='m'
  631. p.Color=Color3.new(HSVtoRGB(0,0,1))
  632. p.Parent=model
  633. p.CFrame=l(center,math.cos(i)*r,0,math.sin(i)*r)
  634.  
  635. end
  636. local rv=Create'NumberValue'{_P=model;Name='MVal'}rv.Value=r
  637. local t={center,model}
  638. local snd=Create'Sound'{_P=model;SoundId='http://www.roblox.com/Asset/?id=15666462';
  639. Pitch=.5;Looped=true}
  640. local snd2=Create'Sound'{_P=model;SoundId='http://www.roblox.com/Asset/?id=2101157';Pitch=1.15}
  641. local snd3=Create'Sound'{_P=model;SoundId='http://www.roblox.com/Asset/?id=2974249';Pitch=2}
  642.  
  643. Edit{snd,snd2,snd3}{Volume=.25}
  644.  
  645. Spawn(function()
  646. snd:Play()
  647. local ptick=tick()
  648. repeat
  649. snd.Pitch=snd.Pitch+(.05*3)
  650. wait()
  651. until (tick()-ptick)>1
  652. snd:Stop()snd3:Play()
  653. for i=0,1,.1 do
  654. for _,v in pairs(model:children())do
  655. if v:IsA'Part'then
  656. -- v.Transparency=i
  657. v.Color=Color3.new(HSVtoRGB(.5,0,1-i))
  658. end
  659. end
  660. wait()
  661. end
  662. snd2:Play()
  663. for i=0,1,.05 do
  664. rv.Value=rv.Value+.5
  665. local pillar=Part(rv.Value,1,rv.Value,'Black',.75)local msh=Mesh(pillar,1)pillar.Anchored=true
  666. local cf=center*ang(mr(-5,5),mr(-5,5),mr(-5,5))
  667. pillar.CFrame=cf
  668. Spawn(function()
  669. for i=0,1,.1 do
  670. pillar.Size=v3n(rv.Value,10*i,rv.Value)
  671. pillar.CFrame=cf*cfn(0,pillar.Size.y/2,0)
  672. pillar.Transparency=.75+i*(1-.75)
  673. wait()
  674. end
  675. end)
  676. for _,v in pairs(model:children())do
  677. if v:IsA'Part'then
  678. v.Transparency=i
  679. v.m.Scale=v3n(1+i*30,1+i*30,1+i*30)
  680. -- v.Color=Color3.new(HSVtoRGB(0,.5,1-i*.5))
  681. end
  682. end
  683. for i,v in pairs(findHum(center.p,rv.Value))do
  684. v:TakeDamage'10'
  685. end
  686. wait()
  687. end
  688. model:Destroy()
  689. end)
  690. table.insert(tas,t)
  691. end
  692. wait(.15)
  693. for i=1,0,-.1 do
  694. w.C0=cfn(0,0,-1.75*i)*ang(math.pi/2)
  695. msh.Scale=v3n(i*.75,i*4.5,i*.75)
  696. wait()
  697. end cone:destroy()
  698. whirr_snd:Play()
  699. Anim'rw'(cfn())
  700. mo.DesiredAngle=0
  701. wait'.25'
  702. hw.Part0=torso hw.C0=cfn(.9,-.85,0)*ang(0,-math.pi/2,math.pi/2)
  703. Lock'R'
  704. end
  705.  
  706. local pd_snd=Create'Sound'{_P=Weapon;SoundId='http://www.roblox.com/Asset/?id=2785493';Pitch=1.35}
  707. function lol2()
  708. Lock'R'
  709. Anim'rw'(ang(md'135',0,md'15')*ang(0,md'15'))
  710. hw.Part0=rarm hw.C0=cfn(0,-1.1,0)*ang(math.pi,md'-10')
  711. wait'.15'
  712. mo.DesiredAngle=md'-90'
  713. wait'.5'
  714. local laz=Part(.5,1,.5,'Cyan',.5)laz.Material='Neon'local msh=Mesh(laz,2)
  715. pd_snd:Play()
  716.  
  717. laz.Anchored=true
  718. spos=l(hinge,0,0)
  719. laz.CFrame=spos
  720.  
  721. local ignorelist={}
  722. for i=0,1,.25 do spos=l(hinge,0,0)
  723. table.insert(ignorelist,char)
  724. local hit,pos=Workspace:FindPartOnRayWithIgnoreList(Ray.new(l(laz,0,0,-laz.Size.z/2).p,l(laz).lookVector*4),ignorelist)
  725. if hit and pos then
  726. for lo=1,1 do
  727. if hit:IsDescendantOf(char)then break end
  728. local sx,sy,sz=hit.Size.X,hit.Size.y,hit.Size.z
  729. local as=(sx+sy+sz)/3
  730. if as>20 then break end
  731. table.insert(ignorelist,hit)
  732. Create'ParticleEmitter'{_P=hit;
  733. Size=NumberSequence.new{numkp(0,as*.1);numkp(1,as*.5)};
  734. Transparency=NumberSequence.new{numkp(0,0);numkp(1,1)};
  735. Color=ColorSequence.new(bcol'Cyan'.Color,bcol'Deep blue'.Color);
  736. Lifetime=NumberRange.new(.1,.4);
  737. VelocitySpread=360;
  738. Speed=NumberRange.new(as*.5);
  739. }
  740. Spawn(function()
  741. for i=hit.Transparency,1,.05 do
  742. hit.Transparency=i wait()
  743. end hit:Destroy()end)
  744. end
  745. end
  746.  
  747. tpos=l(torso,0,0,-7)
  748. local mag=(spos.p-tpos.p).magnitude
  749. laz.Size=v3n(.5,.5,mag*i)
  750. laz.CFrame=cfn(spos.p,tpos.p)*cfn(0,0,(-mag/2)*i)
  751. wait()
  752. end
  753. local cf=laz.CFrame
  754. for i=0,1,.1 do
  755. msh.Scale=v3n(1-i,1-i,1)
  756. laz.Transparency=.5+i*.5
  757. wait()
  758. end laz:Destroy()
  759. mo.DesiredAngle=0
  760. wait'.25'
  761. Anim'rw'(cfn())
  762. wait'.25'
  763. hw.Part0=torso hw.C0=restpos
  764. Lock'R'
  765. end
  766.  
  767. shoot_snd=Create'Sound'{_P=Weapon;SoundId='rbxassetid://384105511';Pitch=1.15}
  768. function kiball()
  769. holding=true
  770. local ptick=tick()
  771. local bg=Create'BodyGyro'{_P=torso;maxTorque=v3n(1,1,1)*9e+008;P=9e+006}
  772. Lock'L'Anim'lw'(ang(0,0,md'-90'))wait'.25'
  773. while holding do
  774. bg.cframe=cfn(l(torso).p,v3n(mouse.hit.x,l(torso).y,mouse.hit.z))*ang(0,-math.pi/2,0)
  775.  
  776. if (tick()-ptick)>.25 then shoot_snd:Play()
  777. local ki=Part(1,1,1)ki.Anchored=true ki.CFrame=l(bl) local msh=Mesh(ki,3)
  778. tar=mouse.hit
  779. local dir=mr(-1,1)
  780. Spawn(function()
  781. for i=0,1,.1 do
  782. ki.CFrame=ki.CFrame*cfn(-math.abs(math.sin((tick()+1)))*3,0,0)
  783. ki.CFrame=ki.CFrame:lerp(tar,i)
  784. wait()
  785. end
  786. for i=0,1,.1 do
  787. Edit{msh,ki}{Transparency=i;Size=v3n(1+i*3,1+i*3,1+i*3)}
  788. wait()
  789. end ki:destroy()
  790. end)
  791. ptick=tick()
  792. end
  793. wait()
  794. end bg:Destroy() Anim'lw'(cfn())wait'.5'Lock'L'
  795. end
  796.  
  797. function getAverageSize(val)
  798. local value_is_object=pcall(function()return val.className end)
  799. local x,y,z
  800. if value_is_object then
  801. x,y,z=val.Size.x,val.Size.y,val.Size.z
  802. else
  803. x,y,z=val.x,val.y,val.z
  804. end
  805. return (x+y+z)/3
  806. end
  807.  
  808. bl=Part(.1,.1,.1,'New Yeller')Mesh(bl,2)Weld(bl,larm,-.25,-.6)
  809. function lol3()
  810. Lock'L'
  811. Anim'lw'(cfn(.2,0,-.15)*ang(md'25',0,md'65')*ang(0,md'-75'))
  812. wait'.25'bl.Material='Neon'
  813. local shield=Part(5,5,.1,'New Yeller',.75)shield.Material='Neon'shield.Anchored=true
  814. shield.CanCollide=true
  815. -- shield.Parent=Workspace.CurrentCamera
  816. shield.Touched:connect(function(a)
  817. if a.Parent and (not a:IsDescendantOf(char)) then
  818. -- a:BreakJoints()
  819. for i,v in pairs(a:children())do
  820. if v:IsA'BodyMover'then v:Destroy()end
  821. end
  822.  
  823. end
  824. end)
  825.  
  826. local msh=Mesh(shield,3,0,0,0)
  827. shield.CFrame=l(torso)
  828. droning_snd:Play()
  829. for i=0,1,.1 do
  830. shield.CFrame=shield.CFrame:lerp(l(torso,0,0,-3),.8)
  831. shield.Velocity=shield.CFrame.lookVector*400
  832. msh.Scale=v3n(i,i,i)
  833. wait()
  834. end
  835. holding=true
  836. local ptick=tick()
  837. local dir=1
  838. local bol=false
  839.  
  840. while holding do
  841. if (tick()-ptick)>.5 then dir=dir*-1 ptick=tick()end
  842. shield.Transparency=shield.Transparency+dir*.005
  843. shield.CFrame=shield.CFrame:lerp(l(torso,0,0,-3),.8)
  844. shield.Velocity=shield.CFrame.lookVector*400
  845. local pp=Part(.1,.1,.1,'New Yeller',.75)pp.Material='Neon'Mesh(pp,3,.5,.5,.5)
  846. pp.CFrame=l(bl)
  847. Create'BodyPosition'{_P=pp;position=l(shield,mr(-2.5,2.5),mr(-2.5,2.5),0).p}
  848. Debris:AddItem(pp,.4)
  849.  
  850. wait()
  851. end
  852. droning_snd:Stop()
  853. for i=1,0,-.1 do
  854. shield.CFrame=shield.CFrame:lerp(l(torso,0,0,-3),.8)
  855. msh.Scale=v3n(i,i,i)
  856. wait()
  857. end
  858. shield:Destroy()
  859. bl.Material='Plastic'
  860. Anim'lw'(cfn())
  861. wait'.25'Lock'L'
  862. end
  863.  
  864. klist={
  865. f=lol2;
  866. e=lol;
  867. cq=lol3;
  868. rq=kiball;
  869. }
  870.  
  871. local con,con2
  872. con=mouse.KeyUp:connect(function(key)
  873. for i,v in pairs(klist)do
  874. if key==i:sub(1,1) and i:sub(2,2)=='q'then
  875. holding=false
  876. end
  877. end
  878. end)
  879. con2=mouse.KeyDown:connect(function(key)
  880. if attacking then return end
  881. attacking=true
  882. for i,v in pairs(klist)do
  883. if key==i:sub(1,1) then
  884. v()
  885. end
  886. end
  887. attacking=false
  888. end)
  889. tag(con,'cons')tag(con2,'cons')
  890.  
  891. char.ChildAdded:connect(function(a)
  892. if a:IsA'Script'then for i,v in pairs(cons)do v:disconnect()end end end)
Advertisement
Add Comment
Please, Sign In to add comment