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