SHOW:
|
|
- or go back to the newest paste.
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 | ||
88 | ---------------------------------- | |
89 | ||
90 | --Made by goodguyaiden------------ | |
91 | --Infinity war gauntlet----------- | |
92 | --prob my biggest project--------- | |
93 | --sorry i couldnt do reality------ | |
94 | ||
95 | ---------------------------------- | |
96 | ||
97 | wait(0.2) | |
98 | plr = owner | |
99 | repeat wait() until plr.Character | |
100 | char = plr.Character | |
101 | local Player = owner | |
102 | local chara = Player.Character | |
103 | Player=owner | |
104 | Character=Player.Character | |
105 | PlayerGui=Player.PlayerGui | |
106 | Backpack=Player.Backpack | |
107 | Torso=Character.Torso | |
108 | Head=Character.Head | |
109 | Humanoid=Character.Humanoid | |
110 | m=Instance.new('Model',Character) | |
111 | LeftArm=Character["Left Arm"] | |
112 | LeftLeg=Character["Left Leg"] | |
113 | RightArm=Character["Right Arm"] | |
114 | RightLeg=Character["Right Leg"] | |
115 | LS=Torso["Left Shoulder"] | |
116 | LH=Torso["Left Hip"] | |
117 | RS=Torso["Right Shoulder"] | |
118 | RH=Torso["Right Hip"] | |
119 | Face = Head.face | |
120 | Neck=Torso.Neck | |
121 | it=Instance.new | |
122 | attacktype=1 | |
123 | vt=Vector3.new | |
124 | cf=CFrame.new | |
125 | cl3=Color3.new | |
126 | rgb=Color3.fromRGB | |
127 | bcn=BrickColor.new | |
128 | euler=CFrame.fromEulerAnglesXYZ | |
129 | angles=CFrame.Angles | |
130 | Humanoid.WalkSpeed = 16 | |
131 | Player = owner | |
132 | PlayerGui = Player.PlayerGui | |
133 | Cam = workspace.CurrentCamera | |
134 | Backpack = Player.Backpack | |
135 | Character = Player.Character | |
136 | Humanoid = Character.Humanoid | |
137 | RootPart = Character["HumanoidRootPart"] | |
138 | Torso = Character["Torso"] | |
139 | Head = Character["Head"] | |
140 | RightArm = Character["Right Arm"] | |
141 | LeftArm = Character["Left Arm"] | |
142 | RightLeg = Character["Right Leg"] | |
143 | LeftLeg = Character["Left Leg"] | |
144 | RootJoint = RootPart["RootJoint"] | |
145 | Neck = Torso["Neck"] | |
146 | RightShoulder = Torso["Right Shoulder"] | |
147 | LeftShoulder = Torso["Left Shoulder"] | |
148 | RightHip = Torso["Right Hip"] | |
149 | LeftHip = Torso["Left Hip"] | |
150 | pumpk = Instance.new("Sound") | |
151 | pumpk.Parent = owner | |
152 | pumpk.SoundId = "rbxassetid://1771675015" | |
153 | pumpk.Volume = 2 | |
154 | pumpk.Looped = true | |
155 | pumpk:Play() | |
156 | - | game.Players.StarzoZero.Character.Humanoid.MaxHealth = 99999999999999999 |
156 | + | game.Players.zXzGamePROzXz.Character.Humanoid.MaxHealth = 99999999999999999 |
157 | - | game.Players.StarzoZero.Character.Humanoid.Health = 99999999999999 |
157 | + | game.Players.zXzGamePROzXz.Character.Humanoid.Health = 99999999999999 |
158 | ||
159 | IT = Instance.new | |
160 | CF = CFrame.new | |
161 | VT = Vector3.new | |
162 | RAD = math.rad | |
163 | C3 = Color3.new | |
164 | UD2 = UDim2.new | |
165 | BRICKC = BrickColor.new | |
166 | ANGLES = CFrame.Angles | |
167 | EULER = CFrame.fromEulerAnglesXYZ | |
168 | COS = math.cos | |
169 | ACOS = math.acos | |
170 | SIN = math.sin | |
171 | ASIN = math.asin | |
172 | ABS = math.abs | |
173 | MRANDOM = math.random | |
174 | FLOOR = math.floor | |
175 | Animation_Speed = 3 | |
176 | Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60) | |
177 | local Speed = 12 | |
178 | local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
179 | local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) | |
180 | local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) | |
181 | local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) | |
182 | local DAMAGEMULTIPLIER = 1 | |
183 | local ANIM = "Idle" | |
184 | local ATTACK = false | |
185 | local EQUIPPED = false | |
186 | local HOLD = false | |
187 | local COMBO = 1 | |
188 | local Rooted = false | |
189 | local SINE = 0 | |
190 | local KEYHOLD = false | |
191 | local CHANGE = 2 / Animation_Speed | |
192 | local WALKINGANIM = false | |
193 | local VALUE1 = false | |
194 | local VALUE2 = false | |
195 | local ROBLOXIDLEANIMATION = IT("Animation") | |
196 | ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation" | |
197 | ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571" | |
198 | --ROBLOXIDLEANIMATION.Parent = Humanoid | |
199 | local WEAPONGUI = IT("ScreenGui", PlayerGui) | |
200 | WEAPONGUI.Name = "Weapon GUI" | |
201 | local Weapon = IT("Model") | |
202 | Weapon.Name = "Adds" | |
203 | local Effects = IT("Folder", Weapon) | |
204 | Effects.Name = "Effects" | |
205 | local ANIMATOR = Humanoid.Animator | |
206 | local ANIMATE = Character.Animate | |
207 | local UNANCHOR = true | |
208 | local PLAYANIMS = true | |
209 | ArtificialHB = Instance.new("BindableEvent", script) | |
210 | ArtificialHB.Name = "ArtificialHB" | |
211 | ||
212 | ||
213 | Player_Size = 1 --Size of the player. | |
214 | Animation_Speed = 3 | |
215 | Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60) | |
216 | ||
217 | local Speed = 16 | |
218 | local Effects2 = {} | |
219 | ||
220 | ||
221 | ||
222 | script:WaitForChild("ArtificialHB") | |
223 | ||
224 | frame = Frame_Speed | |
225 | tf = 0 | |
226 | allowframeloss = false | |
227 | tossremainder = false | |
228 | lastframe = tick() | |
229 | script.ArtificialHB:Fire() | |
230 | ||
231 | function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS) | |
232 | return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS) | |
233 | end | |
234 | ||
235 | function PositiveAngle(NUMBER) | |
236 | if NUMBER >= 0 then | |
237 | NUMBER = 0 | |
238 | end | |
239 | return NUMBER | |
240 | end | |
241 | ||
242 | function NegativeAngle(NUMBER) | |
243 | if NUMBER <= 0 then | |
244 | NUMBER = 0 | |
245 | end | |
246 | return NUMBER | |
247 | end | |
248 | ||
249 | function Swait(NUMBER) | |
250 | if NUMBER == 0 or NUMBER == nil then | |
251 | ArtificialHB.Event:wait() | |
252 | else | |
253 | for i = 1, NUMBER do | |
254 | ArtificialHB.Event:wait() | |
255 | end | |
256 | end | |
257 | end | |
258 | ||
259 | function QuaternionFromCFrame(cf) | |
260 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
261 | local trace = m00 + m11 + m22 | |
262 | if trace > 0 then | |
263 | local s = math.sqrt(1 + trace) | |
264 | local recip = 0.5 / s | |
265 | return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5 | |
266 | else | |
267 | local i = 0 | |
268 | if m11 > m00 then | |
269 | i = 1 | |
270 | end | |
271 | if m22 > (i == 0 and m00 or m11) then | |
272 | i = 2 | |
273 | end | |
274 | if i == 0 then | |
275 | local s = math.sqrt(m00 - m11 - m22 + 1) | |
276 | local recip = 0.5 / s | |
277 | return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip | |
278 | elseif i == 1 then | |
279 | local s = math.sqrt(m11 - m22 - m00 + 1) | |
280 | local recip = 0.5 / s | |
281 | return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip | |
282 | elseif i == 2 then | |
283 | local s = math.sqrt(m22 - m00 - m11 + 1) | |
284 | local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip | |
285 | end | |
286 | end | |
287 | end | |
288 | ||
289 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
290 | local xs, ys, zs = x + x, y + y, z + z | |
291 | local wx, wy, wz = w * xs, w * ys, w * zs | |
292 | local xx = x * xs | |
293 | local xy = x * ys | |
294 | local xz = x * zs | |
295 | local yy = y * ys | |
296 | local yz = y * zs | |
297 | local zz = z * zs | |
298 | return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy)) | |
299 | end | |
300 | ||
301 | function QuaternionSlerp(a, b, t) | |
302 | local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4] | |
303 | local startInterp, finishInterp; | |
304 | if cosTheta >= 0.0001 then | |
305 | if (1 - cosTheta) > 0.0001 then | |
306 | local theta = ACOS(cosTheta) | |
307 | local invSinTheta = 1 / SIN(theta) | |
308 | startInterp = SIN((1 - t) * theta) * invSinTheta | |
309 | finishInterp = SIN(t * theta) * invSinTheta | |
310 | else | |
311 | startInterp = 1 - t | |
312 | finishInterp = t | |
313 | end | |
314 | else | |
315 | if (1 + cosTheta) > 0.0001 then | |
316 | local theta = ACOS(-cosTheta) | |
317 | local invSinTheta = 1 / SIN(theta) | |
318 | startInterp = SIN((t - 1) * theta) * invSinTheta | |
319 | finishInterp = SIN(t * theta) * invSinTheta | |
320 | else | |
321 | startInterp = t - 1 | |
322 | finishInterp = t | |
323 | end | |
324 | end | |
325 | return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp | |
326 | end | |
327 | ||
328 | function Clerp(a, b, t) | |
329 | local qa = {QuaternionFromCFrame(a)} | |
330 | local qb = {QuaternionFromCFrame(b)} | |
331 | local ax, ay, az = a.x, a.y, a.z | |
332 | local bx, by, bz = b.x, b.y, b.z | |
333 | local _t = 1 - t | |
334 | return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t)) | |
335 | end | |
336 | ||
337 | function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME) | |
338 | local frame = IT("Frame") | |
339 | frame.BackgroundTransparency = TRANSPARENCY | |
340 | frame.BorderSizePixel = BORDERSIZEPIXEL | |
341 | frame.Position = POSITION | |
342 | frame.Size = SIZE | |
343 | frame.BackgroundColor3 = COLOR | |
344 | frame.BorderColor3 = BORDERCOLOR | |
345 | frame.Name = NAME | |
346 | frame.Parent = PARENT | |
347 | return frame | |
348 | end | |
349 | ||
350 | function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME) | |
351 | local label = IT("TextLabel") | |
352 | label.BackgroundTransparency = 1 | |
353 | label.Size = UD2(1, 0, 1, 0) | |
354 | label.Position = UD2(0, 0, 0, 0) | |
355 | label.TextColor3 = TEXTCOLOR | |
356 | label.TextStrokeTransparency = STROKETRANSPARENCY | |
357 | label.TextTransparency = TRANSPARENCY | |
358 | label.FontSize = TEXTFONTSIZE | |
359 | label.Font = TEXTFONT | |
360 | label.BorderSizePixel = BORDERSIZEPIXEL | |
361 | label.TextScaled = false | |
362 | label.Text = TEXT | |
363 | label.Name = NAME | |
364 | label.Parent = PARENT | |
365 | return label | |
366 | end | |
367 | ||
368 | function NoOutlines(PART) | |
369 | PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10 | |
370 | end | |
371 | ||
372 | ||
373 | function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1) | |
374 | local NEWWELD = IT(TYPE) | |
375 | NEWWELD.Part0 = PART0 | |
376 | NEWWELD.Part1 = PART1 | |
377 | NEWWELD.C0 = C0 | |
378 | NEWWELD.C1 = C1 | |
379 | NEWWELD.Parent = PARENT | |
380 | return NEWWELD | |
381 | end | |
382 | ||
383 | local S = IT("Sound") | |
384 | ||
385 | function CreateSound(ID, PARENT, VOLUME, PITCH) | |
386 | local NEWSOUND = nil | |
387 | coroutine.resume(coroutine.create(function() | |
388 | NEWSOUND = S:Clone() | |
389 | NEWSOUND.Parent = PARENT | |
390 | NEWSOUND.Volume = VOLUME | |
391 | NEWSOUND.Pitch = PITCH | |
392 | NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID | |
393 | Swait() | |
394 | NEWSOUND:play() | |
395 | game:GetService("Debris"):AddItem(NEWSOUND, 10) | |
396 | end)) | |
397 | return NEWSOUND | |
398 | end | |
399 | ||
400 | function CFrameFromTopBack(at, top, back) | |
401 | local right = top:Cross(back) | |
402 | return CF(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z) | |
403 | end | |
404 | ||
405 | function CreateWave(SIZE,WAIT,CFRAME,DOESROT,ROT,COLOR,GROW) | |
406 | local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(COLOR), "Effect", VT(0,0,0)) | |
407 | local mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8)) | |
408 | wave.CFrame = CFRAME | |
409 | coroutine.resume(coroutine.create(function(PART) | |
410 | for i = 1, WAIT do | |
411 | Swait() | |
412 | mesh.Scale = mesh.Scale + GROW | |
413 | mesh.Offset = VT(0,0,-(mesh.Scale.X/8)) | |
414 | if DOESROT == true then | |
415 | wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0,ROT,0) | |
416 | end | |
417 | wave.Transparency = wave.Transparency + (0.5/WAIT) | |
418 | if wave.Transparency > 0.99 then | |
419 | wave:remove() | |
420 | end | |
421 | end | |
422 | end)) | |
423 | end | |
424 | ||
425 | function CreateRing(SIZE,DOESROT,ROT,WAIT,CFRAME,COLOR,GROW) | |
426 | local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(COLOR), "Effect", VT(0,0,0)) | |
427 | local mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "559831844", "", SIZE, VT(0,0,0)) | |
428 | wave.CFrame = CFRAME | |
429 | coroutine.resume(coroutine.create(function(PART) | |
430 | for i = 1, WAIT do | |
431 | Swait() | |
432 | mesh.Scale = mesh.Scale + GROW | |
433 | if DOESROT == true then | |
434 | wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0,ROT,0) | |
435 | end | |
436 | wave.Transparency = wave.Transparency + (0.5/WAIT) | |
437 | if wave.Transparency > 0.99 then | |
438 | wave:remove() | |
439 | end | |
440 | end | |
441 | end)) | |
442 | end | |
443 | ||
444 | function MagicSphere(SIZE,WAIT,CFRAME,COLOR,GROW) | |
445 | local wave = CreatePart(3, Effects, "Neon", 0, 0, BRICKC(COLOR), "Effect", VT(1,1,1), true) | |
446 | local mesh = CreateMesh("SpecialMesh", wave, "Sphere", "", "", SIZE, VT(0,0,0)) | |
447 | wave.CFrame = CFRAME | |
448 | coroutine.resume(coroutine.create(function(PART) | |
449 | for i = 1, WAIT do | |
450 | Swait() | |
451 | mesh.Scale = mesh.Scale + GROW | |
452 | wave.Transparency = wave.Transparency + (1/WAIT) | |
453 | if wave.Transparency > 0.99 then | |
454 | wave:remove() | |
455 | end | |
456 | end | |
457 | end)) | |
458 | end | |
459 | ||
460 | function Slice(KIND,SIZE,WAIT,CFRAME,COLOR,GROW) | |
461 | local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(COLOR), "Effect", VT(1,1,1), true) | |
462 | local mesh = nil | |
463 | if KIND == "Base" then | |
464 | mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "448386996", "", VT(0,SIZE/10,SIZE/10), VT(0,0,0)) | |
465 | elseif KIND == "Thin" then | |
466 | mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "662586858", "", VT(SIZE/10,0,SIZE/10), VT(0,0,0)) | |
467 | elseif KIND == "Round" then | |
468 | mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "662585058", "", VT(SIZE/10,0,SIZE/10), VT(0,0,0)) | |
469 | end | |
470 | wave.CFrame = CFRAME | |
471 | coroutine.resume(coroutine.create(function(PART) | |
472 | for i = 1, WAIT do | |
473 | Swait() | |
474 | mesh.Scale = mesh.Scale + GROW/10 | |
475 | wave.Transparency = wave.Transparency + (0.5/WAIT) | |
476 | if wave.Transparency > 0.99 then | |
477 | wave:remove() | |
478 | end | |
479 | end | |
480 | end)) | |
481 | end | |
482 | ||
483 | function MakeForm(PART,TYPE) | |
484 | if TYPE == "Cyl" then | |
485 | local MSH = IT("CylinderMesh",PART) | |
486 | elseif TYPE == "Ball" then | |
487 | local MSH = IT("SpecialMesh",PART) | |
488 | MSH.MeshType = "Sphere" | |
489 | elseif TYPE == "Wedge" then | |
490 | local MSH = IT("SpecialMesh",PART) | |
491 | MSH.MeshType = "Wedge" | |
492 | end | |
493 | end | |
494 | ||
495 | ||
496 | function CheckTableForString(Table, String) | |
497 | for i, v in pairs(Table) do | |
498 | if string.find(string.lower(String), string.lower(v)) then | |
499 | return true | |
500 | end | |
501 | end | |
502 | return false | |
503 | end | |
504 | ||
505 | function CheckIntangible(Hit) | |
506 | local ProjectileNames = {"Water", "Arrow", "Projectile", "Effect", "Rail", "Lightning", "Bullet"} | |
507 | if Hit and Hit.Parent then | |
508 | if ((not Hit.CanCollide or CheckTableForString(ProjectileNames, Hit.Name)) and not Hit.Parent:FindFirstChild("Humanoid")) then | |
509 | return true | |
510 | end | |
511 | end | |
512 | return false | |
513 | end | |
514 | ||
515 | Debris = game:GetService("Debris") | |
516 | ||
517 | function CastZapRay(StartPos, Vec, Length, Ignore, DelayIfHit) | |
518 | local Direction = CFrame.new(StartPos, Vec).lookVector | |
519 | local Ignore = ((type(Ignore) == "table" and Ignore) or {Ignore}) | |
520 | local RayHit, RayPos, RayNormal = game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(StartPos, Direction * Length), Ignore) | |
521 | if RayHit and CheckIntangible(RayHit) then | |
522 | if DelayIfHit then | |
523 | wait() | |
524 | end | |
525 | RayHit, RayPos, RayNormal = CastZapRay((RayPos + (Vec * 0.01)), Vec, (Length - ((StartPos - RayPos).magnitude)), Ignore, DelayIfHit) | |
526 | end | |
527 | return RayHit, RayPos, RayNormal | |
528 | end | |
529 | ||
530 | function turnto(position) | |
531 | RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0) | |
532 | end | |
533 | ||
534 | ||
535 | ||
536 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
537 | tf = tf + s | |
538 | if tf >= frame then | |
539 | if allowframeloss then | |
540 | script.ArtificialHB:Fire() | |
541 | lastframe = tick() | |
542 | else | |
543 | for i = 1, math.floor(tf / frame) do | |
544 | script.ArtificialHB:Fire() | |
545 | end | |
546 | lastframe = tick() | |
547 | end | |
548 | if tossremainder then | |
549 | tf = 0 | |
550 | else | |
551 | tf = tf - frame * math.floor(tf / frame) | |
552 | end | |
553 | end | |
554 | end) | |
555 | function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS) | |
556 | return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS) | |
557 | end | |
558 | ||
559 | function PositiveAngle(NUMBER) | |
560 | if NUMBER >= 0 then | |
561 | NUMBER = 0 | |
562 | end | |
563 | return NUMBER | |
564 | end | |
565 | ||
566 | function NegativeAngle(NUMBER) | |
567 | if NUMBER <= 0 then | |
568 | NUMBER = 0 | |
569 | end | |
570 | return NUMBER | |
571 | end | |
572 | ||
573 | function Swait(NUMBER) | |
574 | if NUMBER == 0 or NUMBER == nil then | |
575 | ArtificialHB.Event:wait() | |
576 | else | |
577 | for i = 1, NUMBER do | |
578 | ArtificialHB.Event:wait() | |
579 | end | |
580 | end | |
581 | end | |
582 | ||
583 | function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET) | |
584 | local NEWMESH = IT(MESH) | |
585 | if MESH == "SpecialMesh" then | |
586 | NEWMESH.MeshType = MESHTYPE | |
587 | if MESHID ~= "nil" and MESHID ~= "" then | |
588 | NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID | |
589 | end | |
590 | if TEXTUREID ~= "nil" and TEXTUREID ~= "" then | |
591 | NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID | |
592 | end | |
593 | end | |
594 | NEWMESH.Offset = OFFSET or VT(0, 0, 0) | |
595 | NEWMESH.Scale = SCALE | |
596 | NEWMESH.Parent = PARENT | |
597 | return NEWMESH | |
598 | end | |
599 | ||
600 | function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR) | |
601 | local NEWPART = IT("Part") | |
602 | NEWPART.formFactor = FORMFACTOR | |
603 | NEWPART.Reflectance = REFLECTANCE | |
604 | NEWPART.Transparency = TRANSPARENCY | |
605 | NEWPART.CanCollide = false | |
606 | NEWPART.Locked = true | |
607 | NEWPART.Anchored = true | |
608 | if ANCHOR == false then | |
609 | NEWPART.Anchored = false | |
610 | end | |
611 | NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR)) | |
612 | NEWPART.Name = NAME | |
613 | NEWPART.Size = SIZE | |
614 | NEWPART.Position = Torso.Position | |
615 | NEWPART.Material = MATERIAL | |
616 | NEWPART:BreakJoints() | |
617 | NEWPART.Parent = PARENT | |
618 | return NEWPART | |
619 | end | |
620 | ||
621 | local function weldBetween(a, b) | |
622 | local weldd = Instance.new("ManualWeld") | |
623 | weldd.Part0 = a | |
624 | weldd.Part1 = b | |
625 | weldd.C0 = CFrame.new() | |
626 | weldd.C1 = b.CFrame:inverse() * a.CFrame | |
627 | weldd.Parent = a | |
628 | return weldd | |
629 | end | |
630 | ||
631 | ||
632 | function QuaternionFromCFrame(cf) | |
633 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
634 | local trace = m00 + m11 + m22 | |
635 | if trace > 0 then | |
636 | local s = math.sqrt(1 + trace) | |
637 | local recip = 0.5 / s | |
638 | return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5 | |
639 | else | |
640 | local i = 0 | |
641 | if m11 > m00 then | |
642 | i = 1 | |
643 | end | |
644 | if m22 > (i == 0 and m00 or m11) then | |
645 | i = 2 | |
646 | end | |
647 | if i == 0 then | |
648 | local s = math.sqrt(m00 - m11 - m22 + 1) | |
649 | local recip = 0.5 / s | |
650 | return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip | |
651 | elseif i == 1 then | |
652 | local s = math.sqrt(m11 - m22 - m00 + 1) | |
653 | local recip = 0.5 / s | |
654 | return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip | |
655 | elseif i == 2 then | |
656 | local s = math.sqrt(m22 - m00 - m11 + 1) | |
657 | local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip | |
658 | end | |
659 | end | |
660 | end | |
661 | ||
662 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
663 | local xs, ys, zs = x + x, y + y, z + z | |
664 | local wx, wy, wz = w * xs, w * ys, w * zs | |
665 | local xx = x * xs | |
666 | local xy = x * ys | |
667 | local xz = x * zs | |
668 | local yy = y * ys | |
669 | local yz = y * zs | |
670 | local zz = z * zs | |
671 | return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy)) | |
672 | end | |
673 | ||
674 | function QuaternionSlerp(a, b, t) | |
675 | local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4] | |
676 | local startInterp, finishInterp; | |
677 | if cosTheta >= 0.0001 then | |
678 | if (1 - cosTheta) > 0.0001 then | |
679 | local theta = ACOS(cosTheta) | |
680 | local invSinTheta = 1 / SIN(theta) | |
681 | startInterp = SIN((1 - t) * theta) * invSinTheta | |
682 | finishInterp = SIN(t * theta) * invSinTheta | |
683 | else | |
684 | startInterp = 1 - t | |
685 | finishInterp = t | |
686 | end | |
687 | else | |
688 | if (1 + cosTheta) > 0.0001 then | |
689 | local theta = ACOS(-cosTheta) | |
690 | local invSinTheta = 1 / SIN(theta) | |
691 | startInterp = SIN((t - 1) * theta) * invSinTheta | |
692 | finishInterp = SIN(t * theta) * invSinTheta | |
693 | else | |
694 | startInterp = t - 1 | |
695 | finishInterp = t | |
696 | end | |
697 | end | |
698 | return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp | |
699 | end | |
700 | ||
701 | function Clerp(a, b, t) | |
702 | local qa = {QuaternionFromCFrame(a)} | |
703 | local qb = {QuaternionFromCFrame(b)} | |
704 | local ax, ay, az = a.x, a.y, a.z | |
705 | local bx, by, bz = b.x, b.y, b.z | |
706 | local _t = 1 - t | |
707 | return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t)) | |
708 | end | |
709 | ||
710 | function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME) | |
711 | local frame = IT("Frame") | |
712 | frame.BackgroundTransparency = TRANSPARENCY | |
713 | frame.BorderSizePixel = BORDERSIZEPIXEL | |
714 | frame.Position = POSITION | |
715 | frame.Size = SIZE | |
716 | frame.BackgroundColor3 = COLOR | |
717 | frame.BorderColor3 = BORDERCOLOR | |
718 | frame.Name = NAME | |
719 | frame.Parent = PARENT | |
720 | return frame | |
721 | end | |
722 | ||
723 | function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME) | |
724 | local label = IT("TextLabel") | |
725 | label.BackgroundTransparency = 1 | |
726 | label.Size = UD2(1, 0, 1, 0) | |
727 | label.Position = UD2(0, 0, 0, 0) | |
728 | label.TextColor3 = TEXTCOLOR | |
729 | label.TextStrokeTransparency = STROKETRANSPARENCY | |
730 | label.TextTransparency = TRANSPARENCY | |
731 | label.FontSize = TEXTFONTSIZE | |
732 | label.Font = TEXTFONT | |
733 | label.BorderSizePixel = BORDERSIZEPIXEL | |
734 | label.TextScaled = false | |
735 | label.Text = TEXT | |
736 | label.Name = NAME | |
737 | label.Parent = PARENT | |
738 | return label | |
739 | end | |
740 | ||
741 | function NoOutlines(PART) | |
742 | PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10 | |
743 | end | |
744 | ||
745 | function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1) | |
746 | local NEWWELD = IT(TYPE) | |
747 | NEWWELD.Part0 = PART0 | |
748 | NEWWELD.Part1 = PART1 | |
749 | NEWWELD.C0 = C0 | |
750 | NEWWELD.C1 = C1 | |
751 | NEWWELD.Parent = PARENT | |
752 | return NEWWELD | |
753 | end | |
754 | ||
755 | local S = IT("Sound") | |
756 | function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP) | |
757 | local NEWSOUND = nil | |
758 | coroutine.resume(coroutine.create(function() | |
759 | NEWSOUND = S:Clone() | |
760 | NEWSOUND.Parent = PARENT | |
761 | NEWSOUND.Volume = VOLUME | |
762 | NEWSOUND.Pitch = PITCH | |
763 | NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID | |
764 | NEWSOUND:play() | |
765 | if DOESLOOP == true then | |
766 | NEWSOUND.Looped = true | |
767 | else | |
768 | repeat wait(1) until NEWSOUND.Playing == false | |
769 | NEWSOUND:remove() | |
770 | end | |
771 | end)) | |
772 | return NEWSOUND | |
773 | end | |
774 | ||
775 | function MakeForm(PART,TYPE) | |
776 | if TYPE == "Cyl" then | |
777 | local MSH = IT("CylinderMesh",PART) | |
778 | elseif TYPE == "Ball" then | |
779 | local MSH = IT("SpecialMesh",PART) | |
780 | MSH.MeshType = "Sphere" | |
781 | elseif TYPE == "Wedge" then | |
782 | local MSH = IT("SpecialMesh",PART) | |
783 | MSH.MeshType = "Wedge" | |
784 | end | |
785 | end | |
786 | ||
787 | function CFrameFromTopBack(at, top, back) | |
788 | local right = top:Cross(back) | |
789 | return CF(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z) | |
790 | end | |
791 | ||
792 | function PuddleOfBlood(Position,MaxDrop,Model,MaxSize) | |
793 | local HITFLOOR, HITPOS, NORMAL = Raycast(Position, (CF(Position, Position + VT(0, -1, 0))).lookVector, MaxDrop, Model) | |
794 | if HITFLOOR ~= nil then | |
795 | if HITFLOOR.Parent ~= Weapon and HITFLOOR.Parent ~= Character then | |
796 | if HITFLOOR.Name == "BloodPuddle" then | |
797 | local DIST = (Position - HITFLOOR.Position).Magnitude | |
798 | if (HITFLOOR.Size.Z <= 5 and HITFLOOR.Size.Z < MaxSize) or (HITFLOOR.Size.Z > 5 and HITFLOOR.Size.Z < MaxSize and DIST < HITFLOOR.Size.Z/3) then | |
799 | HITFLOOR.Size = HITFLOOR.Size + VT(0.1,0,0.1) | |
800 | end | |
801 | else | |
802 | if HITFLOOR.Anchored == true then | |
803 | local BLOOD = CreatePart(3, Effects, "Glass", 0, 0, "Maroon", "BloodPuddle", VT(2,0,2)) | |
804 | BLOOD.CFrame = CF(HITPOS,HITPOS+NORMAL)*ANGLES(RAD(90),RAD(0),RAD(0)) | |
805 | MakeForm(BLOOD,"Cyl") | |
806 | coroutine.resume(coroutine.create(function() | |
807 | Swait(75) | |
808 | while true do | |
809 | Swait() | |
810 | BLOOD.Size = BLOOD.Size - VT(0.02,0,0.02) | |
811 | if BLOOD.Size.Z < 0.051 then | |
812 | BLOOD:remove() | |
813 | break | |
814 | end | |
815 | end | |
816 | end)) | |
817 | end | |
818 | end | |
819 | end | |
820 | end | |
821 | end | |
822 | ||
823 | function SprayBlood(POSITION,DIRECTION,BloodSize) | |
824 | local BLOOD = CreatePart(3, Effects, "Glass", 0, 0, "Maroon", "BloodPuddle", VT(0.3,0.3,0.3),false) | |
825 | BLOOD.CFrame = CF(POSITION) | |
826 | MakeForm(BLOOD,"Ball") | |
827 | local bv = Instance.new("BodyVelocity",BLOOD) | |
828 | bv.maxForce = Vector3.new(1e9, 1e9, 1e9) | |
829 | bv.velocity = CF(POSITION,DIRECTION+VT(MRANDOM(-3,3)/30,MRANDOM(-3,3)/30,MRANDOM(-3,3)/30)).lookVector*75 | |
830 | bv.Name = "MOVE" | |
831 | Debris:AddItem(bv,0.05) | |
832 | coroutine.resume(coroutine.create(function() | |
833 | local HASTOUCHEDGROUND = false | |
834 | local HIT = BLOOD.Touched:Connect(function(hit) | |
835 | if hit.Anchored == true then | |
836 | HASTOUCHEDGROUND = true | |
837 | PuddleOfBlood(BLOOD.Position+VT(0,1,0),2,BLOOD,BloodSize) | |
838 | end | |
839 | end) | |
840 | wait(5) | |
841 | if HASTOUCHEDGROUND == false then | |
842 | BLOOD:remove() | |
843 | end | |
844 | end)) | |
845 | end | |
846 | ||
847 | Debris = game:GetService("Debris") | |
848 | ||
849 | function CastProperRay(StartPos, EndPos, Distance, Ignore) | |
850 | local DIRECTION = CF(StartPos,EndPos).lookVector | |
851 | return Raycast(StartPos, DIRECTION, Distance, Ignore) | |
852 | end | |
853 | ||
854 | function turnto(position) | |
855 | RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0) | |
856 | end | |
857 | ||
858 | function recurse(root,callback,i) | |
859 | i= i or 0 | |
860 | for _,v in pairs(root:GetChildren()) do | |
861 | i = i + 1 | |
862 | callback(i,v) | |
863 | ||
864 | if #v:GetChildren() > 0 then | |
865 | i = recurse(v,callback,i) | |
866 | end | |
867 | end | |
868 | ||
869 | return i | |
870 | end | |
871 | ||
872 | function ragdollJoint(character, part0, part1, attachmentName, className, properties) | |
873 | attachmentName = attachmentName.."RigAttachment" | |
874 | local constraint = Instance.new(className.."Constraint") | |
875 | constraint.Attachment0 = part0:FindFirstChild(attachmentName) | |
876 | constraint.Attachment1 = part1:FindFirstChild(attachmentName) | |
877 | constraint.Name = "RagdollConstraint"..part1.Name | |
878 | ||
879 | for _,propertyData in next,properties or {} do | |
880 | constraint[propertyData[1]] = propertyData[2] | |
881 | end | |
882 | ||
883 | constraint.Parent = character | |
884 | end | |
885 | ||
886 | function getAttachment0(character, attachmentName) | |
887 | for _,child in next,character:GetChildren() do | |
888 | local attachment = child:FindFirstChild(attachmentName) | |
889 | if attachment then | |
890 | return attachment | |
891 | end | |
892 | end | |
893 | end | |
894 | ||
895 | function R15Ragdoll(character) | |
896 | recurse(character, function(_,v) | |
897 | if v:IsA("Attachment") then | |
898 | v.Axis = Vector3.new(0, 1, 0) | |
899 | v.SecondaryAxis = Vector3.new(0, 0, 1) | |
900 | v.Rotation = Vector3.new(0, 0, 0) | |
901 | end | |
902 | end) | |
903 | for _,child in next,character:GetChildren() do | |
904 | if child:IsA("Accoutrement") then | |
905 | for _,part in next,child:GetChildren() do | |
906 | if part:IsA("BasePart") and part.Name ~= "HumanoidRootPart" then | |
907 | local attachment1 = part:FindFirstChildOfClass("Attachment") | |
908 | local attachment0 = getAttachment0(character,attachment1.Name) | |
909 | if attachment0 and attachment1 then | |
910 | local constraint = Instance.new("HingeConstraint") | |
911 | constraint.Attachment0 = attachment0 | |
912 | constraint.Attachment1 = attachment1 | |
913 | constraint.LimitsEnabled = true | |
914 | constraint.UpperAngle = 0 | |
915 | constraint.LowerAngle = 0 | |
916 | constraint.Parent = character | |
917 | end | |
918 | elseif part.Name == "HumanoidRootPart" then | |
919 | part:remove() | |
920 | end | |
921 | end | |
922 | end | |
923 | end | |
924 | ||
925 | ragdollJoint(character,character.LowerTorso, character.UpperTorso, "Waist", "BallSocket", { | |
926 | {"LimitsEnabled",true}; | |
927 | {"UpperAngle",5}; | |
928 | }) | |
929 | ragdollJoint(character,character.UpperTorso, character.Head, "Neck", "BallSocket", { | |
930 | {"LimitsEnabled",true}; | |
931 | {"UpperAngle",15}; | |
932 | }) | |
933 | ||
934 | local handProperties = { | |
935 | {"LimitsEnabled", true}; | |
936 | {"UpperAngle",0}; | |
937 | {"LowerAngle",0}; | |
938 | } | |
939 | ragdollJoint(character,character.LeftLowerArm, character.LeftHand, "LeftWrist", "Hinge", handProperties) | |
940 | ragdollJoint(character,character.RightLowerArm, character.RightHand, "RightWrist", "Hinge", handProperties) | |
941 | ||
942 | local shinProperties = { | |
943 | {"LimitsEnabled", true}; | |
944 | {"UpperAngle", 0}; | |
945 | {"LowerAngle", -75}; | |
946 | } | |
947 | ragdollJoint(character,character.LeftUpperLeg, character.LeftLowerLeg, "LeftKnee", "Hinge", shinProperties) | |
948 | ragdollJoint(character,character.RightUpperLeg, character.RightLowerLeg, "RightKnee", "Hinge", shinProperties) | |
949 | ||
950 | local footProperties = { | |
951 | {"LimitsEnabled", true}; | |
952 | {"UpperAngle", 15}; | |
953 | {"LowerAngle", -45}; | |
954 | } | |
955 | ragdollJoint(character,character.LeftLowerLeg, character.LeftFoot, "LeftAnkle", "Hinge", footProperties) | |
956 | ragdollJoint(character,character.RightLowerLeg, character.RightFoot, "RightAnkle", "Hinge", footProperties) | |
957 | ||
958 | ragdollJoint(character,character.UpperTorso, character.LeftUpperArm, "LeftShoulder", "BallSocket") | |
959 | ragdollJoint(character,character.LeftUpperArm, character.LeftLowerArm, "LeftElbow", "BallSocket") | |
960 | ragdollJoint(character,character.UpperTorso, character.RightUpperArm, "RightShoulder", "BallSocket") | |
961 | ragdollJoint(character,character.RightUpperArm, character.RightLowerArm, "RightElbow", "BallSocket") | |
962 | ragdollJoint(character,character.LowerTorso, character.LeftUpperLeg, "LeftHip", "BallSocket") | |
963 | ragdollJoint(character,character.LowerTorso, character.RightUpperLeg, "RightHip", "BallSocket") | |
964 | end | |
965 | ||
966 | function Ragdoll(Character2,CharTorso) | |
967 | Character2:BreakJoints() | |
968 | local hum = Character2:findFirstChild("Humanoid") | |
969 | hum:remove() | |
970 | local function Scan(ch) | |
971 | local e | |
972 | for e = 1,#ch do | |
973 | Scan(ch[e]:GetChildren()) | |
974 | if ch[e].ClassName == "Weld" or ch[e].ClassName == "Motor6D" then | |
975 | ch[e]:remove() | |
976 | end | |
977 | end | |
978 | end | |
979 | local NEWHUM = IT("Humanoid") | |
980 | NEWHUM.Name = "Corpse" | |
981 | NEWHUM.Health = 0 | |
982 | NEWHUM.MaxHealth = 0 | |
983 | NEWHUM.PlatformStand = true | |
984 | NEWHUM.Parent = Character2 | |
985 | NEWHUM.DisplayDistanceType = "None" | |
986 | ||
987 | local ch = Character2:GetChildren() | |
988 | local i | |
989 | for i = 1,#ch do | |
990 | if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then | |
991 | ch[i]:remove() | |
992 | end | |
993 | end | |
994 | ||
995 | local Torso2 = Character2.Torso | |
996 | local movevector = Vector3.new() | |
997 | ||
998 | if Torso2 then | |
999 | movevector = CFrame.new(CharTorso.Position,Torso2.Position).lookVector | |
1000 | local Head = Character2:FindFirstChild("Head") | |
1001 | if Head then | |
1002 | local Neck = Instance.new("Weld") | |
1003 | Neck.Name = "Neck" | |
1004 | Neck.Part0 = Torso2 | |
1005 | Neck.Part1 = Head | |
1006 | Neck.C0 = CFrame.new(0, 1.5, 0) | |
1007 | Neck.C1 = CFrame.new() | |
1008 | Neck.Parent = Torso2 | |
1009 | ||
1010 | end | |
1011 | local Limb = Character2:FindFirstChild("Right Arm") | |
1012 | if Limb then | |
1013 | ||
1014 | Limb.CFrame = Torso2.CFrame * CFrame.new(1.5, 0, 0) | |
1015 | local Joint = Instance.new("Glue") | |
1016 | Joint.Name = "RightShoulder" | |
1017 | Joint.Part0 = Torso2 | |
1018 | Joint.Part1 = Limb | |
1019 | Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
1020 | Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
1021 | Joint.Parent = Torso2 | |
1022 | ||
1023 | local B = Instance.new("Part") | |
1024 | B.TopSurface = 0 | |
1025 | B.BottomSurface = 0 | |
1026 | B.formFactor = "Symmetric" | |
1027 | B.Size = Vector3.new(1, 1, 1) | |
1028 | B.Transparency = 1 | |
1029 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
1030 | B.Parent = Character2 | |
1031 | local W = Instance.new("Weld") | |
1032 | W.Part0 = Limb | |
1033 | W.Part1 = B | |
1034 | W.C0 = CFrame.new(0, -0.5, 0) | |
1035 | W.Parent = Limb | |
1036 | ||
1037 | end | |
1038 | local Limb = Character2:FindFirstChild("Left Arm") | |
1039 | if Limb then | |
1040 | ||
1041 | Limb.CFrame = Torso2.CFrame * CFrame.new(-1.5, 0, 0) | |
1042 | local Joint = Instance.new("Glue") | |
1043 | Joint.Name = "LeftShoulder" | |
1044 | Joint.Part0 = Torso2 | |
1045 | Joint.Part1 = Limb | |
1046 | Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
1047 | Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
1048 | Joint.Parent = Torso2 | |
1049 | ||
1050 | local B = Instance.new("Part") | |
1051 | B.TopSurface = 0 | |
1052 | B.BottomSurface = 0 | |
1053 | B.formFactor = "Symmetric" | |
1054 | B.Size = Vector3.new(1, 1, 1) | |
1055 | B.Transparency = 1 | |
1056 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
1057 | B.Parent = Character2 | |
1058 | local W = Instance.new("Weld") | |
1059 | W.Part0 = Limb | |
1060 | W.Part1 = B | |
1061 | W.C0 = CFrame.new(0, -0.5, 0) | |
1062 | W.Parent = Limb | |
1063 | ||
1064 | end | |
1065 | local Limb = Character2:FindFirstChild("Right Leg") | |
1066 | if Limb then | |
1067 | ||
1068 | Limb.CFrame = Torso2.CFrame * CFrame.new(0.5, -2, 0) | |
1069 | local Joint = Instance.new("Glue") | |
1070 | Joint.Name = "RightHip" | |
1071 | Joint.Part0 = Torso2 | |
1072 | Joint.Part1 = Limb | |
1073 | Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
1074 | Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
1075 | Joint.Parent = Torso2 | |
1076 | ||
1077 | local B = Instance.new("Part") | |
1078 | B.TopSurface = 0 | |
1079 | B.BottomSurface = 0 | |
1080 | B.formFactor = "Symmetric" | |
1081 | B.Size = Vector3.new(1, 1, 1) | |
1082 | B.Transparency = 1 | |
1083 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
1084 | B.Parent = Character2 | |
1085 | local W = Instance.new("Weld") | |
1086 | W.Part0 = Limb | |
1087 | W.Part1 = B | |
1088 | W.C0 = CFrame.new(0, -0.5, 0) | |
1089 | W.Parent = Limb | |
1090 | ||
1091 | end | |
1092 | local Limb = Character2:FindFirstChild("Left Leg") | |
1093 | if Limb then | |
1094 | ||
1095 | Limb.CFrame = Torso2.CFrame * CFrame.new(-0.5, -2, 0) | |
1096 | local Joint = Instance.new("Glue") | |
1097 | Joint.Name = "LeftHip" | |
1098 | Joint.Part0 = Torso2 | |
1099 | Joint.Part1 = Limb | |
1100 | Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
1101 | Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
1102 | Joint.Parent = Torso2 | |
1103 | ||
1104 | local B = Instance.new("Part") | |
1105 | B.TopSurface = 0 | |
1106 | B.BottomSurface = 0 | |
1107 | B.formFactor = "Symmetric" | |
1108 | B.Size = Vector3.new(1, 1, 1) | |
1109 | B.Transparency = 1 | |
1110 | B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0) | |
1111 | B.Parent = Character2 | |
1112 | local W = Instance.new("Weld") | |
1113 | W.Part0 = Limb | |
1114 | W.Part1 = B | |
1115 | W.C0 = CFrame.new(0, -0.5, 0) | |
1116 | W.Parent = Limb | |
1117 | ||
1118 | end | |
1119 | --[ | |
1120 | local Bar = Instance.new("Part") | |
1121 | Bar.TopSurface = 0 | |
1122 | Bar.BottomSurface = 0 | |
1123 | Bar.formFactor = "Symmetric" | |
1124 | Bar.Size = Vector3.new(1, 1, 1) | |
1125 | Bar.Transparency = 1 | |
1126 | Bar.CFrame = Torso2.CFrame * CFrame.new(0, 0.5, 0) | |
1127 | Bar.Parent = Character2 | |
1128 | local Weld = Instance.new("Weld") | |
1129 | Weld.Part0 = Torso2 | |
1130 | Weld.Part1 = Bar | |
1131 | Weld.C0 = CFrame.new(0, 0.5, 0) | |
1132 | Weld.Parent = Torso2 | |
1133 | --]] | |
1134 | end | |
1135 | Character2.Parent = workspace | |
1136 | Debris:AddItem(Character2,5) | |
1137 | ||
1138 | return Character2,Torso2 | |
1139 | end | |
1140 | ||
1141 | local Gun = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Gun", VT(0, 0, 0),false) | |
1142 | local HandleMesh = CreateMesh("SpecialMesh", Gun, "FileMesh", "1757389224", "1757405356", VT(0.07,0.07,0.07), VT(0,0, 0)) | |
1143 | local Weld = CreateWeldOrSnapOrMotor("Weld", Gun, LeftArm, Gun, CF(0.2, -1, 0.2) * ANGLES(RAD(330), RAD(0), RAD(20)), CF(0, 0, 0)) | |
1144 | ||
1145 | canworld = true | |
1146 | ||
1147 | we = true | |
1148 | ||
1149 | function time() | |
1150 | CreateSound("907330619", Head, 10, 1) | |
1151 | wait(1) | |
1152 | local function weld(lol) | |
1153 | local weld = Instance.new("Weld", plr.Character.Torso) | |
1154 | weld.Part0 = plr.Character.Torso | |
1155 | weld.Part1 = lol | |
1156 | weld.C0 = plr.Character.Torso.CFrame:inverse() | |
1157 | weld.C1 = lol.CFrame:inverse() | |
1158 | end | |
1159 | wait(1.4) | |
1160 | ||
1161 | for i, v in pairs(game.Players:GetChildren()) do | |
1162 | t = v.Character:FindFirstChild("Torso") | |
1163 | if t then | |
1164 | t.Anchored = true | |
1165 | plr.Character:FindFirstChild("Torso").Anchored = false | |
1166 | end | |
1167 | RA = v.Character:FindFirstChild("Right Arm") | |
1168 | if RA then | |
1169 | RA.Anchored = true | |
1170 | plr.Character:FindFirstChild("Right Arm").Anchored = false | |
1171 | end | |
1172 | LA = v.Character:FindFirstChild("Left Arm") | |
1173 | if LA then | |
1174 | LA.Anchored = true | |
1175 | plr.Character:FindFirstChild("Left Arm").Anchored = false | |
1176 | end | |
1177 | RL = v.Character:FindFirstChild("Right Leg") | |
1178 | if RL then | |
1179 | RL.Anchored = true | |
1180 | plr.Character:FindFirstChild("Right Leg").Anchored = false | |
1181 | end | |
1182 | LL = v.Character:FindFirstChild("Left Leg") | |
1183 | if LL then | |
1184 | LL.Anchored = true | |
1185 | plr.Character:FindFirstChild("Left Leg").Anchored = false | |
1186 | end | |
1187 | end | |
1188 | ||
1189 | game.Lighting.TimeOfDay="00:00:00" | |
1190 | game.Lighting.OutdoorAmbient=Color3.new(50,0,350) | |
1191 | wait(0.1) | |
1192 | game.Lighting.OutdoorAmbient=Color3.new(0,114,235) | |
1193 | wait(0.1) | |
1194 | game.Lighting.OutdoorAmbient=Color3.new(0,0,235) | |
1195 | wait(0.1) | |
1196 | game.Lighting.OutdoorAmbient=Color3.new(0,114,0) | |
1197 | wait(0.1) | |
1198 | game.Lighting.OutdoorAmbient=Color3.new(255, 255, 355) | |
1199 | wait(10) | |
1200 | for i, v in pairs(game.Players:GetChildren()) do | |
1201 | t = v.Character:FindFirstChild("Torso") | |
1202 | if t then | |
1203 | t.Anchored = false | |
1204 | end | |
1205 | RA = v.Character:FindFirstChild("Right Arm") | |
1206 | if RA then | |
1207 | RA.Anchored = false | |
1208 | end | |
1209 | LA = v.Character:FindFirstChild("Left Arm") | |
1210 | if LA then | |
1211 | LA.Anchored = false | |
1212 | end | |
1213 | RL = v.Character:FindFirstChild("Right Leg") | |
1214 | if RL then | |
1215 | RL.Anchored = false | |
1216 | end | |
1217 | LL = v.Character:FindFirstChild("Left Leg") | |
1218 | if LL then | |
1219 | LL.Anchored = false | |
1220 | end | |
1221 | end | |
1222 | ||
1223 | ||
1224 | game.Lighting.OutdoorAmbient=Color3.new(0,114,0) | |
1225 | wait(0.1) | |
1226 | game.Lighting.OutdoorAmbient=Color3.new(50,0,350) | |
1227 | wait(0.1) | |
1228 | game.Lighting.OutdoorAmbient=Color3.new(0,114,235) | |
1229 | wait(0.1) | |
1230 | game.Lighting.OutdoorAmbient=Color3.new(0,0,235) | |
1231 | ||
1232 | game.Lighting.OutdoorAmbient=Color3.new(135/255, 135/255, 128/255) | |
1233 | game.Lighting.TimeOfDay="15:00:00" | |
1234 | ||
1235 | end | |
1236 | ||
1237 | function Space() | |
1238 | sky = Instance.new('Sky', game.Lighting) | |
1239 | sky.MoonTextureId = 'rbxasset://sky/moon.png' | |
1240 | sky.SkyboxBk = 'http://www.roblox.com/asset/?id=159248188' | |
1241 | sky.SkyboxDn = 'http://www.roblox.com/asset/?id=159248183' | |
1242 | sky.SkyboxFt = 'http://www.roblox.com/asset/?id=159248187' | |
1243 | sky.SkyboxLf = 'http://www.roblox.com/asset/?id=159248173' | |
1244 | sky.SkyboxRt = 'http://www.roblox.com/asset/?id=159248192' | |
1245 | sky.SkyboxUp = 'http://www.roblox.com/asset/?id=159248176' | |
1246 | sky.Name = 'Space' | |
1247 | ||
1248 | for i,v in pairs(workspace:getChildren()) do | |
1249 | if v.ClassName == 'Part' and v.Name == 'Base' then | |
1250 | v.Transparency = 1 | |
1251 | v.Size = Vector3.new(2048, 1, 2048) | |
1252 | end | |
1253 | end | |
1254 | workspace.Gravity = 10 | |
1255 | end | |
1256 | ||
1257 | ||
1258 | function Space2() | |
1259 | sky = game.Lighting:findFirstChild('Space') | |
1260 | sky:Destroy() | |
1261 | ||
1262 | for i,v in pairs(workspace:getChildren()) do | |
1263 | if v.ClassName == 'Part' and v.Name == 'Base' then | |
1264 | v.Transparency = 0 | |
1265 | v.Size = Vector3.new(2048, 1, 2048) | |
1266 | end | |
1267 | end | |
1268 | workspace.Gravity = 196.5 | |
1269 | end | |
1270 | function Mind() | |
1271 | ATTACK = true | |
1272 | Rooted = true | |
1273 | CreateSound("907332856", Head, 10, 1) | |
1274 | for i=0, 1, 0.1 / Animation_Speed do | |
1275 | Swait() | |
1276 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(-20), RAD(0), RAD(20)), 0.15 / Animation_Speed) | |
1277 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1278 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -1) * ANGLES(RAD(90), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
1279 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 1) * ANGLES(RAD(90), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
1280 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1281 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1282 | end | |
1283 | for i=0, 1, 0.1 / Animation_Speed do | |
1284 | Swait() | |
1285 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(30), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1286 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1287 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(180), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
1288 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -1) * ANGLES(RAD(180), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
1289 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1290 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1291 | end | |
1292 | local Wind = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Wind", VT(0, 0, 0),false) | |
1293 | local HandleMesh = CreateMesh("SpecialMesh", Wind, "FileMesh", "495572467", "495572476", VT(1,1,1), VT(0,0, 0)) | |
1294 | local Weld = CreateWeldOrSnapOrMotor("Weld", Wind, Torso, Wind, CF(0, 0, -15) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0)) | |
1295 | for i=0, 1, 0.1 / Animation_Speed do | |
1296 | Swait() | |
1297 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1298 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1299 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(180), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
1300 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -1) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
1301 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1302 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1303 | end | |
1304 | Wind:remove() | |
1305 | local broken = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "broken", VT(0, 0, 0),false) | |
1306 | local HandleMesh = CreateMesh("SpecialMesh", broken, "FileMesh", "926826971", "926827014", VT(1,1,1), VT(0,0, 0)) | |
1307 | local Weld = CreateWeldOrSnapOrMotor("Weld", broken, Torso, broken, CF(0, 0, -15) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0)) | |
1308 | for i=0, 1, 0.1 / Animation_Speed do | |
1309 | Swait() | |
1310 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1311 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1312 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(180), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
1313 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -1) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
1314 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1315 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1316 | end | |
1317 | broken:remove() | |
1318 | ATTACK = false | |
1319 | Rooted = false | |
1320 | end | |
1321 | ||
1322 | function power2() | |
1323 | we = true | |
1324 | ATTACK = true | |
1325 | Rooted = true | |
1326 | CreateSound("1843115950", Head, 10, 1) | |
1327 | for i=0, 1, 0.1 / Animation_Speed do | |
1328 | Swait() | |
1329 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(-20), RAD(0), RAD(20)), 0.15 / Animation_Speed) | |
1330 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.15 / Animation_Speed) | |
1331 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -1) * ANGLES(RAD(0), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
1332 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 1) * ANGLES(RAD(40), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
1333 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1334 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1335 | end | |
1336 | for i=0, 1, 0.1 / Animation_Speed do | |
1337 | Swait() | |
1338 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(30), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1339 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1340 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
1341 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -1) * ANGLES(RAD(90), RAD(444), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
1342 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1343 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1344 | end | |
1345 | local Wind = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Wind", VT(0, 0, 0),false) | |
1346 | local HandleMesh = CreateMesh("SpecialMesh", Wind, "FileMesh", "433838302", "1031083476", VT(3,3,3), VT(0,0, 0)) | |
1347 | local Weld = CreateWeldOrSnapOrMotor("Weld", Wind, Torso, Wind, CF(0, 0, -5) * ANGLES(RAD(-90), RAD(0), RAD(0)), CF(0, 0, 0)) | |
1348 | - | game.Players.StarzoZero.Character["Wind"].Touched:connect(function(hit) |
1348 | + | game.Players.zXzGamePROzXz.Character["Wind"].Touched:connect(function(hit) |
1349 | local humanoid = hit.Parent:findFirstChild("Humanoid") | |
1350 | if we == true then | |
1351 | humanoid:TakeDamage(50) | |
1352 | end | |
1353 | end) | |
1354 | for i=0, 1, 0.1 / Animation_Speed do | |
1355 | Swait() | |
1356 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1357 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1358 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
1359 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -1) * ANGLES(RAD(90), RAD(444), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
1360 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1361 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1362 | end | |
1363 | for i=0, 1, 0.1 / Animation_Speed do | |
1364 | Swait() | |
1365 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1366 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1367 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
1368 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -1) * ANGLES(RAD(90), RAD(444), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
1369 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1370 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1371 | end | |
1372 | we = false | |
1373 | Wind:remove() | |
1374 | ATTACK = false | |
1375 | Rooted = false | |
1376 | end | |
1377 | ||
1378 | function all_together_now() | |
1379 | ATTACK = true | |
1380 | Rooted = true | |
1381 | CreateSound("907329532", Head, 10, 1) | |
1382 | for i=0, 1, 0.1 / Animation_Speed do | |
1383 | Swait() | |
1384 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.15 / Animation_Speed) | |
1385 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1386 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -1) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
1387 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 1) * ANGLES(RAD(90), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
1388 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1389 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1390 | end | |
1391 | for i=0, 1, 0.1 / Animation_Speed do | |
1392 | Swait() | |
1393 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.15 / Animation_Speed) | |
1394 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1395 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -1) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
1396 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 1) * ANGLES(RAD(90), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
1397 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1398 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1399 | end | |
1400 | for i=0, 1, 0.1 / Animation_Speed do | |
1401 | Swait() | |
1402 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.15 / Animation_Speed) | |
1403 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1404 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -1) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
1405 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 1) * ANGLES(RAD(90), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
1406 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1407 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1408 | end | |
1409 | for i=0, 1, 0.1 / Animation_Speed do | |
1410 | Swait() | |
1411 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.15 / Animation_Speed) | |
1412 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1413 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -1) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
1414 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 1) * ANGLES(RAD(90), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
1415 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1416 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1417 | end | |
1418 | CreateSound("217767125", Head, 10, 1) | |
1419 | for i,v in pairs(workspace:GetChildren()) do | |
1420 | if v.ClassName == "Model" then | |
1421 | local human = v:FindFirstChildOfClass("Humanoid") | |
1422 | if human and human.Parent.Name ~= chara.Name then | |
1423 | human.Parent:BreakJoints() | |
1424 | end | |
1425 | end | |
1426 | end | |
1427 | ||
1428 | for i=0, 1, 0.1 / Animation_Speed do | |
1429 | Swait() | |
1430 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.15 / Animation_Speed) | |
1431 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1432 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -1) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
1433 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 1) * ANGLES(RAD(90), RAD(444), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
1434 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1435 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1436 | end | |
1437 | CreateSound("907333294", Head, 10, 1) | |
1438 | for i=0, 1, 0.1 / Animation_Speed do | |
1439 | Swait() | |
1440 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(20), RAD(0), RAD(20)), 0.15 / Animation_Speed) | |
1441 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1442 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -1) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
1443 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 1) * ANGLES(RAD(180), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
1444 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(20), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1445 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(20), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1446 | end | |
1447 | for i=0, 1, 0.1 / Animation_Speed do | |
1448 | Swait() | |
1449 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(20), RAD(0), RAD(20)), 0.15 / Animation_Speed) | |
1450 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1451 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -1) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
1452 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 1) * ANGLES(RAD(90), RAD(444), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
1453 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(20), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1454 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(20), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1455 | end | |
1456 | for i=0, 1, 0.1 / Animation_Speed do | |
1457 | Swait() | |
1458 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(20), RAD(0), RAD(20)), 0.15 / Animation_Speed) | |
1459 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1460 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -1) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
1461 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 1) * ANGLES(RAD(90), RAD(444), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
1462 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(20), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1463 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(20), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1464 | end | |
1465 | ATTACK = false | |
1466 | Rooted = false | |
1467 | end | |
1468 | ||
1469 | function Taunt() | |
1470 | ATTACK = true | |
1471 | Rooted = true | |
1472 | CreateSound("907331038", Head, 10, 1) | |
1473 | for i=0, 1, 0.1 / Animation_Speed do | |
1474 | Swait() | |
1475 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.15 / Animation_Speed) | |
1476 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1477 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -1) * ANGLES(RAD(180), RAD(0), RAD(30)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
1478 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 1) * ANGLES(RAD(180), RAD(0), RAD(30)) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
1479 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1480 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1481 | end | |
1482 | for i=0, 1, 0.1 / Animation_Speed do | |
1483 | Swait() | |
1484 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.15 / Animation_Speed) | |
1485 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1486 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -1) * ANGLES(RAD(180), RAD(0), RAD(30)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
1487 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 1) * ANGLES(RAD(180), RAD(0), RAD(30)) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
1488 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1489 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1490 | end | |
1491 | for i=0, 1, 0.1 / Animation_Speed do | |
1492 | Swait() | |
1493 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.15 / Animation_Speed) | |
1494 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1495 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -1) * ANGLES(RAD(180), RAD(0), RAD(30)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
1496 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 1) * ANGLES(RAD(180), RAD(0), RAD(30)) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
1497 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1498 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1499 | end | |
1500 | for i=0, 1, 0.1 / Animation_Speed do | |
1501 | Swait() | |
1502 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.15 / Animation_Speed) | |
1503 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1504 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -1) * ANGLES(RAD(180), RAD(0), RAD(30)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
1505 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 1) * ANGLES(RAD(180), RAD(0), RAD(30)) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
1506 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1507 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1508 | end | |
1509 | ATTACK = false | |
1510 | Rooted = false | |
1511 | end | |
1512 | ||
1513 | function power() | |
1514 | we = true | |
1515 | ATTACK = true | |
1516 | Rooted = true | |
1517 | CreateSound("1843115950", Head, 10, 1) | |
1518 | for i=0, 1, 0.1 / Animation_Speed do | |
1519 | Swait() | |
1520 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(-20), RAD(0), RAD(20)), 0.15 / Animation_Speed) | |
1521 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.15 / Animation_Speed) | |
1522 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -1) * ANGLES(RAD(90), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
1523 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 1) * ANGLES(RAD(40), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
1524 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1525 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1526 | end | |
1527 | - | game.Players.StarzoZero.Character["Gun"].Touched:connect(function(hit) |
1527 | + | game.Players.zXzGamePROzXz.Character["Gun"].Touched:connect(function(hit) |
1528 | local humanoid = hit.Parent:findFirstChild("Humanoid") | |
1529 | if we == true then | |
1530 | humanoid:TakeDamage(50) | |
1531 | end | |
1532 | end) | |
1533 | for i=0, 1, 0.1 / Animation_Speed do | |
1534 | Swait() | |
1535 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(30), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1536 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1537 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-30), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
1538 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -1) * ANGLES(RAD(40), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
1539 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1540 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1541 | end | |
1542 | we = false | |
1543 | ATTACK = false | |
1544 | Rooted = false | |
1545 | end | |
1546 | ||
1547 | function MouseDown(Mouse) | |
1548 | end | |
1549 | ||
1550 | function MouseUp(Mouse) | |
1551 | HOLD = false | |
1552 | end | |
1553 | ||
1554 | function KeyDown(Key) | |
1555 | KEYHOLD = true | |
1556 | if Key == "f" and ATTACK == false then | |
1557 | Taunt() | |
1558 | end | |
1559 | if Key == "h" and ATTACK == false then | |
1560 | all_together_now() | |
1561 | end | |
1562 | if Key == "g" and ATTACK == false then | |
1563 | Mind() | |
1564 | end | |
1565 | if Key == "q" and ATTACK == false then | |
1566 | power() | |
1567 | end | |
1568 | if Key == "r" and ATTACK == false then | |
1569 | Space() | |
1570 | end | |
1571 | if Key == "p" and ATTACK == false then | |
1572 | time() | |
1573 | end | |
1574 | if Key == "t" and ATTACK == false then | |
1575 | Space2() | |
1576 | end | |
1577 | if Key == "e" and ATTACK == false then | |
1578 | power2() | |
1579 | end | |
1580 | end | |
1581 | ||
1582 | function KeyUp(Key) | |
1583 | KEYHOLD = false | |
1584 | end | |
1585 | ||
1586 | Mouse.Button1Down:connect(function(NEWKEY) | |
1587 | MouseDown(NEWKEY) | |
1588 | end) | |
1589 | Mouse.Button1Up:connect(function(NEWKEY) | |
1590 | MouseUp(NEWKEY) | |
1591 | end) | |
1592 | Mouse.KeyDown:connect(function(NEWKEY) | |
1593 | KeyDown(NEWKEY) | |
1594 | end) | |
1595 | Mouse.KeyUp:connect(function(NEWKEY) | |
1596 | KeyUp(NEWKEY) | |
1597 | end) | |
1598 | ||
1599 | while true do | |
1600 | Swait() | |
1601 | script.Parent = WEAPONGUI | |
1602 | ANIMATE.Parent = nil | |
1603 | for _,v in next, Humanoid:GetPlayingAnimationTracks() do | |
1604 | v:Stop(); | |
1605 | end | |
1606 | SINE = SINE + CHANGE | |
1607 | local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude | |
1608 | local TORSOVERTICALVELOCITY = RootPart.Velocity.y | |
1609 | local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character) | |
1610 | local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16) | |
1611 | if ANIM == "Walk" and TORSOVELOCITY > 1 then | |
1612 | RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, -0.15 * COS(SINE / (WALKSPEEDVALUE / 2))) * ANGLES(RAD(0), RAD(0) - RootPart.RotVelocity.Y / 75, RAD(0)), 2 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
1613 | Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(2.5 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0) - Head.RotVelocity.Y / 30), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
1614 | RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 0.875 - 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), -0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ 0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(76 * COS(SINE / WALKSPEEDVALUE))), 0.3 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
1615 | LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 0.875 + 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), 0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ -0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(76 * COS(SINE / WALKSPEEDVALUE))), 0.3 * (Humanoid.WalkSpeed / 16) / Animation_Speed) | |
1616 | elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then | |
1617 | RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1618 | Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1619 | RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1620 | LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1621 | end | |
1622 | if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then | |
1623 | ANIM = "Jump" | |
1624 | if PLAYANIMS == true then | |
1625 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1626 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1627 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(20)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed) | |
1628 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed) | |
1629 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.3) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-20)), 0.2 / Animation_Speed) | |
1630 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.3) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(20)), 0.2 / Animation_Speed) | |
1631 | end | |
1632 | elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then | |
1633 | ANIM = "Fall" | |
1634 | if PLAYANIMS == true then | |
1635 | RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1636 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed) | |
1637 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(100), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed) | |
1638 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-100), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.2 / Animation_Speed) | |
1639 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.2 / Animation_Speed) | |
1640 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed) | |
1641 | end | |
1642 | elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then | |
1643 | ANIM = "Idle" | |
1644 | if PLAYANIMS == true then | |
1645 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1646 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1647 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
1648 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-180), RAD(0), RAD(-30)) * LEFTSHOULDERC0, 0.15 / Animation_Speed) | |
1649 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1650 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1651 | end | |
1652 | elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then | |
1653 | ANIM = "Walk" | |
1654 | if PLAYANIMS == true then | |
1655 | RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1656 | Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed) | |
1657 | RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-90 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(30)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed) | |
1658 | LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-180), RAD(0), RAD(-30)) * LEFTSHOULDERC0, 0.35 / Animation_Speed) | |
1659 | RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0.2) * ANGLES(RAD(90 * COS(SINE / WALKSPEEDVALUE)), RAD(90), RAD(0)), 1) | |
1660 | LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0.2) * ANGLES(RAD(-90 * COS(SINE / WALKSPEEDVALUE)), RAD(-90), RAD(0)), 1) | |
1661 | end | |
1662 | end | |
1663 | end | |
1664 | if Rooted == false then | |
1665 | Disable_Jump = false | |
1666 | Humanoid.WalkSpeed = Speed | |
1667 | elseif Rooted == true then | |
1668 | Disable_Jump = true | |
1669 | Humanoid.WalkSpeed = 0 | |
1670 | end | |
1671 | ||
1672 | Humanoid.Health = Humanoid.Health + 1 |