Advertisement
Infintyboy

flying squid thingy | A FE Script

Oct 7th, 2018
339
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 23.36 KB | None | 0 0
  1. wait()
  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,Mouse,mouse,UserInputService,ContextActionService = owner
  4. local RealPlayer = Player
  5. do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end,__call=function(self,...)local t=rawget(self,"_RealService")if t then return t(...)end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return self[t]end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;x.RunService=v({RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")setmetatable(x,{__index=function(self,t)return r:GetService(t)or typeof(r[t])=="function"and function(m,...)return r[t](r,...)end or r[t]end,__newindex=s.__newindex,__call=s.__call})game,owner=x,x.Players.LocalPlayer end
  6.  
  7.  
  8. Player = game:GetService("Players").LocalPlayer
  9.  
  10. --Skylle--
  11. -- Player=Workspace.Dummy
  12. if not Player then error("No player found") end
  13. if Player.className == "Model" then
  14.     Char = Player
  15. else
  16.     Char = Player.Character
  17. end
  18. if not Player then error("No character found") end
  19. Torso = Char.Torso
  20. Debris = game:GetService("Debris")
  21. Input = game:GetService("UserInputService")
  22. HumRootPart = Char:FindFirstChild("HumanoidRootPart")
  23. RootJoint = nil
  24. if HumRootPart then
  25.     RootJoint = HumRootPart:FindFirstChild("RootJoint")
  26. end
  27. m={}
  28. m.tau=math.pi*2
  29.  
  30. PI=math.pi
  31.  
  32. _V=nil
  33. cfn = CFrame.new
  34. ang = function(rx,ry,rz)return CFrame.Angles(rx or 0,ry or 0,rz or 0)end
  35. md,mr = math.rad,math.random
  36. v3n=function(x,y,z)_V=Vector3.new(x,y,z) return Vector3.new(x,y,z) end
  37. bcol=BrickColor.new
  38.  
  39. function l(a1,x,y,z,rx,ry,rz)
  40.     local cf
  41.     if tostring(a1):find(',') == nil then
  42.         cf=a1.CFrame
  43.     else cf=a1 end
  44.     return cf*CFrame.new(x or 0,y or 0,z or 0)*CFrame.Angles(
  45.                         rx or 0,ry or 0,yz or 0)
  46. end
  47.  
  48. New = {}
  49. _1,_2,_3 = nil,nil,nil
  50.  
  51. local metatab = {__call = function(t,what)
  52.         return function(bar)
  53.         local obj=Instance.new(what)
  54.         for arg,val in pairs(bar) do
  55.             if arg == "_P" then
  56.                 obj.Parent = val
  57.             else
  58.                 if obj[arg] then
  59.                     obj[arg]=val
  60.                 end
  61.             end
  62.         end
  63.         return obj
  64.     end end;
  65. }
  66. setmetatable(New,metatab)
  67.  
  68. pcall(function()Char.Dis:Destroy()end)
  69. Main = Instance.new("Model",Char)
  70. Main.Name="Dis"
  71.  
  72. Config = {}
  73.  
  74. Colors = {Main="Black";Eye="Bright red";Ink="Black";}
  75.  
  76. set_material = nil
  77. default_mat = "Neon"
  78. New.Part = function(size_x,size_y,size_z,color,transparency)
  79.     local partSize = Vector3.new(size_x,size_y,size_z)
  80.     local part = Instance.new("Part")
  81.     part.Size = partSize
  82.     part.Anchored = false
  83.     part.CanCollide = false
  84.     part.Transparency = transparency or 0
  85.     --Quick way to change every surface of part to smooth
  86.     for _,face in next,Enum.NormalId:GetEnumItems() do
  87.         part[face.Name.."Surface"] = "SmoothNoOutlines"
  88.     end
  89.     --Figure out if color is table or string and change color.
  90.     if type(color) == "string" then
  91.         part.BrickColor = BrickColor.new(color)
  92.     elseif type(color) == "table" and #color == 3  then
  93.         part.Color = Color3.new(unpack(color))
  94.     else
  95.         part.BrickColor = BrickColor.new("Really black")
  96.     end
  97.     part.Parent = Main or Char
  98.     part.Material = set_material or default_mat or "SmoothPlastic"
  99.     _1 = part
  100.     return part
  101. end
  102.  
  103. New.Weld = function(part0,part1,c0,c1,...) --over-engineered weldfunction which accepts many things
  104.     local ar = {...}
  105.     local cframe0,cframe1
  106.     local function checkf()local res=true
  107.         for i,v in pairs(ar)do
  108.             if type(v) ~= 'number' then
  109.                 res=false
  110.             end
  111.         end
  112.         return res
  113.     end
  114.     if type(c0) == 'table' then
  115.         cframe0 = CFrame.new(c0[1] or 0, c0[2] or 0, c0[3] or 0) * CFrame.Angles(
  116.             c0[4] or 0, c0[5] or 0, c0[6] or 0)
  117.     elseif type(c0) == 'userdata' then
  118.         cframe0 = c0
  119.     elseif type(c0) == 'number' and checkf() then
  120.         cframe0 = CFrame.new(c0 or 0,c1 or 0,ar[1] or 0) * CFrame.Angles(ar[2] or 0, ar[3] or 0, ar[4] or 0)
  121.     end
  122.     if type(c1) == 'table' then
  123.         cframe1 = CFrame.new(c1[1] or 0, c1[2] or 0, c1[3] or 0) * CFrame.Angles(
  124.             c1[4] or 0, c1[5] or 0, c1[6] or 0)
  125.     elseif type(c1) == 'userdata' then
  126.         cframe1 = c1
  127.     elseif type(c1) == 'number' and (not c0 or (c0 and type(c0) == 'table')) then
  128.         cframe1 = CFrame.new(c1 or 0, ar[1] or 0, ar[2] or 0) * CFrame.Angles(ar[3] or 0, ar[4] or 0, ar[5] or 0)
  129.     end
  130.     for i,v in pairs(ar)do
  131.         if type(v) == 'table' then
  132.             cframe1 = CFrame.new(v[1] or 0, v[2] or 0, v[3] or 0) * CFrame.new(v[4] or 0, v[5] or 0, v[6] or 0)
  133.         elseif type(v) == 'userdata' then
  134.             cframe1 = v
  135.         end
  136.     end
  137.            
  138.     cframe0,cframe1 = cframe1,cframe0
  139.    
  140.     local weld = Instance.new("Motor")
  141.     weld.Part0 = part0
  142.     weld.Part1 = part1
  143.     weld.C0 = cframe0 or CFrame.new()
  144.     weld.C1 = cframe1 or CFrame.new()
  145.     weld.Parent = part0
  146.     return weld
  147. end
  148.  
  149. local bl = New.Part(1,1,1,'White')bl.Material="Neon"
  150. New.Weld(bl,Torso)
  151. local bl_msh = New"SpecialMesh"{_P=bl; MeshType = 3}
  152. for i=0,1,.1 do --Morphing anim
  153.     bl_msh.Scale = Vector3.new(10,10,10)*i
  154.     bl.Transparency=1-i
  155.     wait()
  156. end
  157.  
  158. cp = New.Part(1,1,1)
  159. cw = New.Weld(cp,Torso,0,0,0)
  160. hp = New.Part(.1,.1,.1,'',1)
  161. hw = New.Weld(hp,cp)
  162. p = New.Part(2,1,.1)
  163. New.Weld(p,hp,0,.5,-.55)
  164. pp = New.Part(2,.25,.1)
  165. jaw = New.Weld(pp,hp,0,-.5-.125-.25,-.55)
  166.  
  167. p2 = New.Part(.25,.75,.1)
  168. p2w1 = New.Weld(p2,pp,{1-.125,_1.Size.y/2+.125,0})
  169. p22 = New.Part(.25,.75,.1)
  170. p2w2 = New.Weld(p22,pp,{-(1-.125),_1.Size.y/2+.125,0})
  171.  
  172. -- p2 = New.Part(.25,.75,.1)
  173. -- New.Weld(p2,pp,{-(1-.125),p.Size.y/2+p2.Size.y/2,0})
  174.  
  175. p3Size = 1-.25
  176. p3 = New.Part(2-.5,p3Size,.1,'Black')
  177. mouth=p3
  178. p3.Material = "SmoothPlastic"
  179.  
  180. function isIn(what,tab)
  181.     local res=false
  182.     for i,v in next,tab do
  183.         if v==what then
  184.             res = true
  185.             break
  186.         end
  187.     end
  188.     return res
  189. end
  190.  
  191. sndids = {
  192.     gore_snd = 245185986;
  193.     gore_snd2 = 429400881;
  194.     eat_metal = 155427306;
  195.     crunch = 181027147;
  196.     scream = 130801781;
  197.     eat_ice = 260433522;
  198.     eat_glass = 138122923;
  199. }
  200. setmetatable(sndids,{__call = function(t,i) return 'rbxassetid://'..t[i]end})
  201.  
  202. eat_snd = New"Sound"{_P=Main; SoundId = sndids'gore_snd'}
  203. eat_snd_metal = New"Sound"{_P=Main; SoundId = sndids'eat_metal'}
  204. eat_snd_crunch = New"Sound"{_P=Main; SoundId = sndids'crunch'}
  205. eat_snd_scream = New"Sound"{_P=Main; SoundId = sndids'scream'}
  206. eat_snd_ice = New"Sound"{_P=Main; SoundId=sndids'eat_ice'}
  207. eat_snd_ice2 = New"Sound"{_P=Main;SoundId=sndids'eat_glass'}
  208.  
  209. prevt=tick()
  210.  
  211. local con=p3.Touched:connect(function(hit)
  212.     if hit.Parent and not hit:IsDescendantOf(Char) and hit.Name~='Base' then
  213.         local hum = hit.Parent:FindFirstChild"Humanoid"
  214.        
  215.         eat_snd_crunch:Play()
  216.        
  217.         if isIn(hit.Material.Name,{"Diamond plate", "Corroded Metal",
  218.             "Metal", "Foil"}) then
  219.             eat_snd_metal:Play()
  220.         elseif hit.Material.Name=="Ice" then
  221.             eat_snd_ice:Play()
  222.         else
  223.             if hum and not isIn(hit.Name,{'Head','Torso'}) then
  224.                 eat_snd:Play()
  225.                 local snd=eat_snd_scream:Clone()
  226.                 snd.Parent=hit
  227.                 snd.Pitch = 1.15+(math.random(-1,1)*(math.random()*.1))
  228.                 snd.PlayOnRemove=true
  229.                 -- eat_snd_scream:Play()
  230.             end
  231.         end
  232.        
  233.         for i=1,3 do
  234.             local pp=New.Part(.1,.1,.1,'Cyan',.5)pp.Anchored=true
  235.             x,y,z = hit.Size.x/2,hit.Size.y/2,hit.Size.z/2
  236.             pp.CFrame=hit.CFrame*CFrame.new(math.random(-x,x),math.random(-y,y),math.random(-z,z))
  237.             Spawn(function()
  238.                 for i=0,1,.1 do
  239.                     pp.Transparency=i wait() end
  240.                 pp:Destroy()end)
  241.         end
  242.        
  243.         if hit.className=='Terrain'then
  244.             Workspace.Terrain:FillBlock(mouth.CFrame,Vector3.new(10,8,10),Enum.Material.Air)
  245.         else
  246.             hit:Destroy()
  247.         end
  248.        
  249.     end
  250. end)
  251. -- con:disconnect()
  252.  
  253. Instance.new("BlockMesh",p3).Scale=Vector3.new(1,1,.5)
  254. p3w = New.Weld(p3,p,0,-p.Size.y/2-p3.Size.y/2,.05)
  255.  
  256. size = p3.Size.x/5
  257. set_material = "Marble"
  258. for i=-p3.Size.x/2+size/2,p3.Size.x/2,size do
  259.     New.Part(size,p3.Size.y/2,0,'Really red')
  260.     Instance.new("BlockMesh",_1).Scale=Vector3.new(.5,1,1)
  261.     New.Weld(_1,p,{0,-p.Size.y/2-p3.Size.y/2/2,-.05},{i})
  262.  
  263.     New.Part(size,p3.Size.y/2,0,'Really red')
  264.     Instance.new("BlockMesh",_1).Scale=Vector3.new(.5,1,1)
  265.     New.Weld(_1,pp,{-size/2,_1.Size.y/2+pp.Size.y/2,-.05},{i})
  266. end _1:Destroy()
  267. set_material = "Neon"
  268.  
  269. eye = New.Part(.5,.25,.1,'Really red')
  270. New.Weld(eye,p,.5,.125,-.1)
  271. eye = New.Part(.5,.25,.1,'Really red')
  272. New.Weld(eye,p,-.5,.125,-.1)
  273. set_material = nil
  274.  
  275. st_size = p2.Size
  276. st_size2 = p3.Size
  277. -- st_cf =p2w1.C1
  278. function loop(i)
  279.     p2.Size = st_size + Vector3.new(0,i*p3Size/2,0)
  280.     p22.Size = p2.Size
  281.     p3.Size = st_size2 + Vector3.new(0,i*p3Size/2,0)
  282.  
  283.    
  284.     p2w1.Part0,p2w2.Part0 = p2,p22
  285.     p2w1.Part1,p2w2.Part1 = pp,pp
  286.     p3w.Parent,p3w.Part0 = p3,p3
  287.    
  288.     p2w1.Parent = p2
  289.     p2w2.Parent = p22
  290.    
  291.     p2w1.C1 = CFrame.new(1-.125,p2.Size.y/2+.125,0)
  292.     p2w2.C1 = CFrame.new(-(1-.125),p2.Size.y/2+.125,0)
  293.     jaw.C0 = CFrame.new(0,i*p3Size/2,0)
  294.     p3w.C1 = CFrame.new(0,-p.Size.y/2-p3.Size.y/2,.05)
  295. end
  296.  
  297. wing = New.Part(1.25,1.25,2)
  298. New.Weld(wing,cp,0,0,1.25/2)
  299.  
  300. emitp = New.Part(.5,.5,.5)emitp.Transparency=1
  301. New.Weld(emitp,wing,0,0,1,math.pi/2)
  302.  
  303. wlds = {}
  304. wlds2 = {}
  305. ---TENTACLES BUILD---
  306. for i=0,10 do
  307.     local t={}
  308.     table.insert(wlds,t)
  309. end
  310. local cnt=0
  311. for i = 0,math.pi*2,math.pi*2/10 do cnt=cnt+1
  312.     local pp=New.Part(.25,.1,.1)
  313.     New.Weld(_1,wing,{0,0,1,0,0,i},{.75})
  314.     prev = pp
  315.     local tt={}
  316.     for o = 1,10 do
  317.         local pp2=New.Part(.1,.1,.1)
  318.         w=New.Weld(_1,prev,{-.05,0,0,-math.pi/2},{prev.Size.x/2,0,0,-math.pi/2})
  319.         w.MaxVelocity=.025
  320.         -- w.DesiredAngle=math.rad(15)
  321.         prev = pp2
  322.         table.insert(tt,w)
  323.         table.insert(wlds[cnt],w)
  324.     end
  325.     table.insert(wlds2,tt)
  326. end
  327. for i,v in pairs(wlds[#wlds]) do v:Destroy() end
  328. ---//---
  329.  
  330.  
  331. numkp = NumberSequenceKeypoint.new
  332. emitter = New"ParticleEmitter"{_P = emitp;
  333.     Size = NumberSequence.new{numkp(0,.8);numkp(.05,1.25);numkp(1,.45)};
  334.     Lifetime = NumberRange.new(.5,.75);
  335.     Acceleration = Vector3.new(0,.5,0);
  336.     Transparency = NumberSequence.new{numkp(0,.25);numkp(.5,.75);numkp(1,1)};
  337.     VelocitySpread = 45;
  338.     EmissionDirection = Enum.NormalId.Top;
  339.     LightEmission=.1;
  340.     LockedToPart = true;
  341.     Speed=NumberRange.new(5,6);
  342.     -- VelocityInheritance = .15;
  343.     -- Speed = NumberRange.new(2,2.5);
  344.     Rotation = NumberRange.new(-45,45);
  345.     RotSpeed = NumberRange.new(10,50);
  346.     Texture = "rbxassetid://31884718";
  347.     Rate = 40;
  348. }
  349.  
  350. -- emitter.Enabled = false
  351.  
  352. for i = 0,1,.1 do
  353.     loop(i)
  354.     wait()
  355. end
  356.  
  357. for i,v in next,Char:children() do
  358.     if v:IsA'Part'then
  359.         v.Transparency=1
  360.     elseif v:IsA'Hat' and v:FindFirstChild"Handle" ~= nil then
  361.         v.Handle.Transparency=1
  362.     end
  363. end
  364. if Char.Head:FindFirstChild'face' then Char.Head.face.Transparency=1 end
  365.  
  366. Spawn(function() --Morphing Anim
  367. for i=1,0,-.1 do
  368. bl_msh.Scale = Vector3.new(10,10,10)*i
  369. bl.Transparency = i wait()
  370. end bl:Destroy() end)
  371.  
  372. bbg = New"BillboardGui"{_P=Main;Adornee=Char.Head;ExtentsOffset=Vector3.new(0,10,0)}
  373. fr = New"Frame"{_P=bbg;Size=UDim2.new(1,0,1,0);BackgroundTransparency=.5;}
  374. tb = New"TextLabel"{_P=fr;Size=UDim2.new(1,0,1,0);Text="Monsrar";TextScaled=true}
  375.  
  376. Cur_Pose = ""
  377.  
  378. joints={}
  379. joints.torso = setmetatable({w=cw, _desired = CFrame.new(0,0,0), n_c0 = CFrame.new(0,0,0)},{
  380.     __newindex = function(t,i,v) if i == "desired" then t._desired = t.n_c0 * v end end
  381. })
  382. joints.head = setmetatable({w=hw, _desired = CFrame.new(0,0,0), n_c0 = CFrame.new(0,0,0)},{
  383.     __newindex = function(t,i,v) if i == "desired" then t._desired = t.n_c0 * v end end
  384. })
  385.  
  386. Anim = "Idle"
  387. angle=0
  388. pulsate_speed = .2
  389.  
  390. change_tentacle_speed = function(A)
  391.     for _,v in pairs(wlds)do
  392.         for _,q in pairs(v) do
  393.             q.MaxVelocity = A
  394.         end
  395.     end
  396. end
  397. normal_loop = true
  398. Spawn(function() --ANIMLOOP
  399.     while true do
  400.         game:service("RunService").Heartbeat:wait()
  401.         walk_mag=Vector3.new(HumRootPart.Velocity.X,0,HumRootPart.Velocity.Z).magnitude
  402.         angle = (angle%100)+3/10
  403.        
  404.         if walk_mag > 2 then
  405.             Anim = "Walking"
  406.         else
  407.             Anim = "Idle"
  408.         end
  409.        
  410.         if Anim == "Idle" then
  411.             joints.torso.desired = CFrame.new(0,0,2+math.sin(angle)*.5)*CFrame.Angles(-math.pi/2,0,0)
  412.             pulsate_speed = .1
  413.             change_tentacle_speed(.025*.45)
  414.             joints.head.desired = CFrame.new(0,-.65,.175)*CFrame.Angles(math.rad(75),math.sin(angle)*.15,0)
  415.            
  416.         elseif Anim == "Walking" then
  417.             joints.torso.desired = CFrame.new(0,.25-math.sin(angle)*.65,0)*CFrame.Angles(math.cos(angle)*.25,0,0)
  418.             pulsate_speed = .2
  419.             change_tentacle_speed(.025)    
  420.             joints.head.desired = CFrame.new(0,-.65+math.sin(angle)*.25,0)*CFrame.Angles(math.rad(-5),0,0)
  421.         -- elseif Anim == "Jump" then
  422.         end
  423.  
  424.         for i,v in pairs(joints) do --UPDATE EM!
  425.             v.w.C0 = v.w.C0:lerp(v._desired,v.spd or .1)
  426.         end
  427.     end
  428. end)
  429.  
  430. swords = {}
  431. doing=false
  432.  
  433. shotgun_snd = New"Sound"{_P=Main;SoundId='rbxassetid://185044507';Pitch=2}
  434. function portal(mouse)
  435.     doing=true
  436.     offset=CFrame.new(0,.26,-2.6) --Shotguin's offset
  437.     Spawn(function() --CFRameing loop
  438.         while doing do
  439.             for _,v in next,swords do
  440.                 if type(v.d) == "function" then
  441.                     v.p.CFrame = v.p.CFrame:lerp(v.d()*(v.o or cfn()),.25)
  442.                 else
  443.                     v.p.CFrame = v.p.CFrame:lerp(v.d*(v.o or cfn()),.25)
  444.                 end
  445.             end
  446.             wait()
  447.         end
  448.     end)
  449.     for i=PI/5,m.tau-PI/5,PI/5 do --Creation
  450.         local sword ={}
  451.         sword.p = New.Part(1,1,1)_1.Anchored=true
  452.         sword.p.CFrame=l(Torso,0,0,-4)
  453.         sword.s =shotgun_snd:Clone()
  454.         sword.s.Parent=sword.p
  455.         sword.i = i
  456.         local msh=New"SpecialMesh"{_P=_1;MeshId="http://www.roblox.com/asset/?id=3835506"}
  457.         sword.d = function()
  458.             local cf=l(Torso,-math.cos(i)*7,0,-math.sin(i)*7)
  459.             return cfn(l(Torso,-math.cos(i)*4,0,-math.sin(i)*4).p,cf.p)
  460.         end
  461.        
  462.         table.insert(swords,sword)
  463.     end wait(.15)
  464.    
  465.     for i,v in pairs(swords) do ---second pose
  466.         local old=v.d()
  467.         v.d=function()return
  468.         cfn(l(Torso,-math.cos(i*PI/10)*2,4,-math.sin(i*PI/10)*2).p,mouse.hit.p) end
  469.     end wait'.25'
  470.    
  471.     for i,v in pairs(swords)do --second shootings
  472.         local offsetted=(v.d()*offset)
  473.         local obj,pos = Workspace:FindPartOnRay(
  474.         Ray.new(offsetted.p,cfn(offsetted.p,mouse.hit.p).lookVector*50),
  475.         char)
  476.         Spawn(function()v.o=ang(md'25')wait(.1)v.o=nil end) --Nudege weapon
  477.         if obj and pos then
  478.             local hum=obj.Parent:FindFirstChild'Humanoid'
  479.             if hum then hum:TakeDamage(30) end
  480.             local mag = (offsetted.p-pos).magnitude
  481.             local pp=New.Part(.1,.1,mag,'Black')pp.Anchored=true
  482.             local msh = New"SpecialMesh"{_P=pp;MeshType=Enum.MeshType.Brick}
  483.             pp.CFrame=cfn(offsetted.p,pos)*cfn(0,0,-mag/2)
  484.             Spawn(function() --fadeout
  485.                 for i=0,1,.1 do
  486.                     pp.Transparency=i
  487.                     msh.Scale = Vector3.new(1-i,1-i,1)
  488.                     wait()
  489.                 end
  490.                 pp:Destroy()
  491.             end)
  492.         end
  493.         v.s:Play()
  494.         wait()
  495.     end
  496.    
  497.     wait'.5'
  498.     ---FADE OUT----
  499.     for i=0,1,.1 do
  500.         for _,v in pairs(swords)do
  501.             v.p.Transparency=i
  502.         end
  503.         wait()
  504.     end
  505.     for _,v in pairs(swords) do
  506.         v.p:Destroy()
  507.     end
  508.     -------------
  509.     swords={}
  510.     doing=false
  511. end
  512.  
  513.  
  514. function tele(mouse)
  515.     local grenade = New.Part(1.5,1.5,1.5,'Earth green')--grenade.Anchored=true
  516.     grenade.Material='Plastic'grenade.CanCollide=true
  517.     grenade.Shape=0
  518.     New"SpecialMesh"{_P=grenade;MeshId = 'http://www.roblox.com/asset/?id=166887416';
  519.     Scale = Vector3.new(2,2,2)}
  520.     local orig=Torso.CFrame
  521.     Torso.CFrame=cfn(orig.p,Vector3.new(mouse.hit.X,orig.Y,mouse.hit.Z))*cfn(0,0,-10)
  522.     grenade.CFrame=orig
  523.     local origCol=grenade.Color
  524.    
  525.     local bleep = New"Sound"{_P=grenade;SoundId='rbxassetid://138081500'}
  526.     local boom = New"Sound"{_P=grenade;SoundId='rbxassetid://138210320';Pitch=.95;
  527.     PlayOnRemove=true}
  528.     local g=New"BillboardGui"{_P=grenade;Adornee=grenade;Size=UDim2.new(0,1,0,1);
  529.         StudsOffset=Vector3.new(0,2,0)}
  530.     local f=New"TextLabel"{_P=g;Size=UDim2.new(1,0,1,0);TextScaled=true;Text='3';
  531.     FontSize=10;}
  532.     for i=5,0,-1 do
  533.         f.Text=i
  534.         bleep:Play()
  535.         wait(.25)
  536.     end
  537.     e=New"Explosion"{_P=Workspace;Position=l(grenade).p}
  538.     boom:Play()
  539.     grenade:Destroy()
  540. end
  541.  
  542. function test()
  543.     local p=New.Part(2,2,2)p.Anchored=true
  544.     p.CFrame=l(Torso,0,0,-10)
  545.     New"SpecialMesh"{_P=p;MeshType=3}
  546.     local p2=New.Part(2,2,2,'Black',.25)p2.Anchored=true
  547.     p2.CFrame = l(p)
  548.     New"SpecialMesh"{_P=p2;MeshType=3;Scale=v3n(-1.05,-1.05,-1.05)}
  549. end
  550.  
  551. function tabs()
  552.     list={}
  553.     doing=true
  554.     cencf = l(Torso,0,2,-5)
  555.     local Sword = Instance.new("Model",Main)Sword.Name="Hammer"
  556.     local new=function(size,pos,col)
  557.         local obj={}
  558.         obj.p=New.Part(1,1,1,col or "Really black")
  559.         obj.p.Material="Plastic"
  560.         obj.p.Anchored=true
  561.         obj.p.Parent=Sword
  562.         obj.c=pos
  563.         obj.s=size or Vector3.new(1,1,1)
  564.         table.insert(list,obj)
  565.         return obj
  566.     end
  567.     r,r2=2,6
  568.     hdl=new(v3n(1,7,1),cfn(0,0,0))
  569.     New"CylinderMesh"{_P=hdl.p}
  570.     hdl.p.Name='C' cen=hdl
  571.    
  572.    
  573.     midp=new(v3n(1.25,.5,1.25),l(hdl.c,0,3.5+.05),'New Yeller')
  574.     New"CylinderMesh"{_P=midp.p}
  575.     midp=new(v3n(1.25,.5,1.25),l(hdl.c,0,-3.5-.05),'New Yeller')
  576.     New"CylinderMesh"{_P=midp.p}
  577.     tip=new(v3n(3,5,3),l(hdl.c,0,3.5+1.5,0,PI/2))
  578.    
  579.     star=new(v3n(1,1,1),l(tip.c,-1.5)*ang(md'45',PI/2,PI/2),'Really red')
  580.     New"SpecialMesh"{_P=star.p;MeshId='http://www.roblox.com/asset/?id=120647846';
  581.     Scale = v3n(2,2,1)}
  582.     star=new(v3n(1,1,1),l(tip.c,1.5)*ang(md'-45',PI/2,PI/2),'Really red')
  583.     New"SpecialMesh"{_P=star.p;MeshId='http://www.roblox.com/asset/?id=120647846';
  584.     Scale = v3n(2,2,1)}
  585.    
  586.     rim=new(v3n(3,.25,3),l(tip.c,0,2.5-.12),'Really black')
  587.     New"SpecialMesh"{_P=rim.p;MeshType=Enum.MeshType.Brick;Scale=v3n(1.1,1,1.1)}
  588.     rim=new(v3n(3,.25,3),l(tip.c,0,-2.5+.12),'Really black')
  589.     New"SpecialMesh"{_P=rim.p;MeshType=Enum.MeshType.Brick;Scale=v3n(1.1,1,1.1)}
  590.    
  591.     for r=.5,1.25,.25 do
  592.     for i=r,m.tau+r,m.tau/8 do
  593.         local pp=new(v3n(.1,.1,.1),l(tip.c,math.cos(i)*r,2.5,math.sin(i)*r),'Really red')
  594.         pp.c=cfn(pp.c.p,l(tip.c,0,2.5,0).p)
  595.         local pp=new(_V,l(tip.c,math.cos(i)*r,-2.5,math.sin(i)*r),'Really red')
  596.         pp.c=cfn(pp.c.p,l(tip.c,0,-2.5,0).p)
  597.     end
  598.     end
  599.  
  600.     for _,v in next,list do
  601.         fnd=v.p:FindFirstChild'Mesh'
  602.         if fnd and fnd.className=="SpecialMesh"  and fnd.MeshId~='' then
  603.             v.m=fnd
  604.             v.ms=fnd.Scale
  605.         end
  606.     end
  607.    
  608.     for i=0,1,.1 do
  609.         for _,v in next,list do
  610.             v.p.Size=v.s*i
  611.             v.c2 = cfn((v.c.p)*i)*(v.c-v.c.p)
  612.             v.p.CFrame=cencf*v.c2*(v.cc or cfn())
  613.             if v.m then
  614.                 v.m.Scale = v.ms*i
  615.             end
  616.         end
  617.         wait()
  618.     end
  619.     cen.p.CanCollide=true
  620.     cen.p.Anchored=false
  621.     for _,v in pairs(list)do
  622.         if v.p.Name~='C' then
  623.             v.p.Anchored=false
  624.             v.p.CanCollide=true
  625.             w= Instance.new("Motor")
  626.             w.Part0 = v.p
  627.             w.Part1 = cen.p
  628.             w.C0 = cfn()
  629.             w.C1 = cen.p.CFrame:toObjectSpace(v.p.CFrame)
  630.             w.Parent = v.p
  631.         end
  632.     end
  633.     hdl=hdl.p
  634. end
  635.  
  636. function throw(mouse)
  637.     nearest=nil
  638.     near_mag=100
  639.     for i,v in next,Main:children() do
  640.         if v.Name=='Hammer'then
  641.             local mp=v:FindFirstChild'C'
  642.             if mp then
  643.                 local mag = (mp.Position-Torso.Position).magnitude
  644.                 if mag < near_mag then
  645.                     nearest = mp
  646.                     near_mag = mag
  647.                 end
  648.             end
  649.         end
  650.     end
  651.     local bp=New"BodyPosition"{_P=nearest;position=l(Torso,0,5).p;
  652.         MaxForce=v3n(1,1,1)*9e+006};
  653.     local bg=New"BodyGyro"{_P=nearest;cframe=cfn();MaxTorque = v3n(1,1,1)*9e+005;
  654.     P=9e+004;}
  655.     holding=true
  656.     local con
  657.     con = Input.InputEnded:connect(function(input)
  658.         if input.KeyCode == Enum.KeyCode.R then
  659.             holding=false
  660.             con:disconnect()
  661.         end
  662.     end)
  663.     local con2
  664.     while holding do
  665.         local mag=(Torso.Position-mouse.hit.p).magnitude
  666.         mag = (mag>12 and 12 or mag)
  667.         local vec=v3n(mouse.hit.X,bp.position.y,mouse.hit.Z)
  668.         bp.position=l(Torso,0,5).p + (l(Torso,0,5).p-mouse.hit.p).unit*-mag
  669.         if not busy then
  670.         bg.cframe=cfn(bp.position,mouse.hit.p+v3n(0,bp.position.y,0))
  671.         end
  672.         wait()
  673.     end
  674.     bp:Destroy()bg:Destroy()
  675.     if not nearest then return end
  676.     local hdl=nearest
  677.     hdl.Anchored=true
  678.     local stcf=hdl.CFrame
  679.     for i=0,1,.1 do
  680.         hdl.CFrame=stcf:lerp(l(stcf,0,0,0,md'45'),i)
  681.         wait()
  682.     end
  683.     stcf=hdl.CFrame
  684.     local encf=mouse.hit
  685.     local c1 = cfn(stcf.p,encf.p)*ang(-PI/2)
  686.     local a1 = c1-c1.p
  687.     for i=0,1,.1 do
  688.         hdl.CFrame=stcf:lerp(cfn(encf.p+v3n(0,3.25,0))*a1,i)
  689.         wait()
  690.     end
  691.     -- local gr,gr_p=Workspace:FindPartOnRay(Ray.new(l(hdl).p,v3n(0,-300,0)),Char)
  692.     -- if gr and gr_p then
  693.         -- hdl.CFrame=cfn(gr_p+v3n(0,nearest.Parent:GetExtentsSize()/2,0))
  694.     -- end
  695.     hdl.Anchored=false
  696.    
  697. end
  698.  
  699. Keybindings = {
  700.     f=portal;
  701.     q=tele;
  702.     e=tabs;
  703.     r=throw;
  704. }
  705.  
  706. local mouse = Player:GetMouse()
  707.  
  708. attacking=false
  709. mouse.KeyDown:connect(function(key)
  710.     if attacking then return end
  711.     attacking=true
  712.     for i,v in pairs(Keybindings) do
  713.         if key == i then
  714.             v(mouse)
  715.         end
  716.     end
  717.     attacking=false
  718. end)
  719.  
  720.  
  721. while true do ---Tentacles and mouth
  722.     if normal_loop then
  723.         for _,v in pairs(wlds) do --tentacles intrude
  724.             for o=1,3 do
  725.             v[o].DesiredAngle = math.rad(90/3)
  726.             end
  727.             for o=4,#wlds-1 do
  728.                 -- print(v[o])
  729.                 v[o].DesiredAngle = math.rad(90/(#wlds-5))
  730.             end
  731.         end
  732.  
  733.         for i = 1,-.5,-pulsate_speed do --jaw open
  734.             loop(i)
  735.             wait()
  736.         end
  737.        
  738.         for _,v in pairs(wlds) do --tentacles extrude
  739.             for o=1,4 do
  740.             v[o].DesiredAngle = math.rad(170/4)
  741.             end
  742.             for o=4,#wlds-1 do
  743.                 -- print(v[o])
  744.                 v[o].DesiredAngle = math.rad(-45/(#wlds-5))
  745.             end
  746.         end
  747.  
  748.         for i,v in next,Workspace:GetChildren() do --force push
  749.             local h = v:FindFirstChild'Humanoid'
  750.             if h and h.Parent ~= Char and h.Torso and (h.Torso.Position-emitp.Position).magnitude < 5 then
  751.                 Spawn(function()
  752.                     h.PlatformStand = true wait() h.PlatformStand = false
  753.                 end)
  754.                 h.Torso.Velocity = Torso.Velocity * -3
  755.             end
  756.         end
  757.  
  758.         for i = -.5,1,pulsate_speed do --jaw close
  759.             loop(i)
  760.             wait()
  761.         end
  762.     end
  763. end
  764. --Fuck you Chameleon
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement