Advertisement
jayrock3401

Untitled

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