Advertisement
sneakydodge123

phone

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