SHOW:
|
|
- or go back to the newest paste.
1 | if game:GetService("RunService"):IsClient()then error("Please run as a server script. Use h/ instead of hl/.")end;print("FE Compatibility: by WaverlyCole");InternalData = {} | |
2 | do | |
3 | ||
4 | - | local kan = Instance.new("Sound") kan.Volume = 20 kan.SoundId = "rbxassetid://684376608" kan.Looped = true kan.Parent = owner.Character.Torso kan:Play() |
4 | + | local kan = Instance.new("Sound") kan.Volume = 20 kan.SoundId = "rbxassetid://2586219879" kan.Looped = true kan.Parent = owner.Character.Torso kan:Play() |
5 | ||
6 | script.Parent = owner.Character | |
7 | local Event = Instance.new("RemoteEvent");Event.Name = "UserInput" | |
8 | local function NewFakeEvent() | |
9 | local Bind = Instance.new("BindableEvent") | |
10 | local Fake;Fake = {Connections = {}, | |
11 | fakeEvent=true; | |
12 | Connect=function(self,Func) | |
13 | Bind.Event:connect(Func) | |
14 | self.Connections[Bind] = true | |
15 | return setmetatable({Connected = true},{ | |
16 | __index = function (self,Index) | |
17 | if Index:lower() == "disconnect" then | |
18 | return function() Fake.Connections[Bind] = false;self.Connected = false end | |
19 | end | |
20 | return Fake[Index] | |
21 | end; | |
22 | __tostring = function() return "Connection" end; | |
23 | }) | |
24 | end} | |
25 | Fake.connect = Fake.Connect;return Fake; | |
26 | end | |
27 | local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()} | |
28 | local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()} | |
29 | local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...) | |
30 | self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil | |
31 | end};ContextActionService.UnBindAction = ContextActionService.BindAction | |
32 | local function TriggerEvent(self,Event,...) | |
33 | local Trigger = Mouse[Event] | |
34 | if Trigger and Trigger.fakeEvent and Trigger.Connections then | |
35 | for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end | |
36 | end | |
37 | end | |
38 | Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent | |
39 | Event.OnServerEvent:Connect(function(FiredBy,Input) | |
40 | if FiredBy.Name ~= owner.Name then return end | |
41 | if Input.MouseEvent then | |
42 | Mouse.Target = Input.Target;Mouse.Hit = Input.Hit | |
43 | else | |
44 | local Begin = Input.UserInputState == Enum.UserInputState.Begin | |
45 | if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end | |
46 | for _,Action in pairs(ContextActionService.Actions) do | |
47 | for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end | |
48 | end | |
49 | Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower()) | |
50 | UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false) | |
51 | end | |
52 | end) | |
53 | InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService | |
54 | Event.Parent = NLS([[ | |
55 | local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse() | |
56 | local Input = function(Input,gameProcessedEvent) | |
57 | if gameProcessedEvent then return end | |
58 | Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState}) | |
59 | end | |
60 | UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input) | |
61 | local Hit,Target | |
62 | while wait(1/30) do | |
63 | if Hit ~= Mouse.Hit or Target ~= Mouse.Target then | |
64 | Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit}) | |
65 | end | |
66 | end | |
67 | ]],owner.Character) | |
68 | end | |
69 | RealGame = game;game = setmetatable({},{ | |
70 | __index = function (self,Index) | |
71 | local Sandbox = function (Thing) | |
72 | if Thing:IsA("Player") then | |
73 | local RealPlayer = Thing | |
74 | return setmetatable({},{ | |
75 | __index = function (self,Index) | |
76 | local Type = type(RealPlayer[Index]) | |
77 | if Type == "function" then | |
78 | if Index:lower() == "getmouse" or Index:lower() == "mouse" then | |
79 | return function (self)return InternalData["Mouse"] end | |
80 | end | |
81 | return function (self,...)return RealPlayer[Index](RealPlayer,...) end | |
82 | end | |
83 | return RealPlayer[Index] | |
84 | end; | |
85 | __tostring = function(self) return RealPlayer.Name end | |
86 | }) | |
87 | end | |
88 | end | |
89 | if RealGame[Index] then | |
90 | local Type = type(RealGame[Index]) | |
91 | if Type == "function" then | |
92 | if Index:lower() == "getservice" or Index:lower() == "service" then | |
93 | return function (self,Service) | |
94 | local FakeServices = { | |
95 | ["players"] = function() | |
96 | return setmetatable({},{ | |
97 | __index = function (self2,Index2) | |
98 | local RealService = RealGame:GetService(Service) | |
99 | local Type2 = type(Index2) | |
100 | if Type2 == "function" then | |
101 | return function (self,...) return RealService[Index2](RealService,...)end | |
102 | else | |
103 | if Index2:lower() == "localplayer" then return Sandbox(owner) end | |
104 | return RealService[Index2] | |
105 | end | |
106 | end; | |
107 | __tostring = function(self) return RealGame:GetService(Service).Name end | |
108 | }) | |
109 | end; | |
110 | ["contextactionservice"] = function() return InternalData["ContextActionService"] end; | |
111 | ["userinputservice"] = function() return InternalData["UserInputService"] end; | |
112 | ["runservice"] = function() | |
113 | return setmetatable({},{ | |
114 | __index = function(self2,Index2) | |
115 | local RealService = RealGame:GetService(Service) | |
116 | local Type2 = type(Index2) | |
117 | if Type2 == "function" then | |
118 | return function (self,...) return RealService[Index2](RealService,...) end | |
119 | else | |
120 | local RunServices = { | |
121 | ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end; | |
122 | ["renderstepped"] = function() return RealService["Stepped"] end | |
123 | } | |
124 | if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end | |
125 | return RealService[Index2] | |
126 | end | |
127 | end | |
128 | }) | |
129 | end | |
130 | } | |
131 | if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end | |
132 | return RealGame:GetService(Service) | |
133 | end | |
134 | end | |
135 | return function (self,...) return RealGame[Index](RealGame,...) end | |
136 | else | |
137 | if game:GetService(Index) then return game:GetService(Index) end | |
138 | return RealGame[Index] | |
139 | end | |
140 | end | |
141 | return nil | |
142 | end | |
143 | });Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("Complete! Running...") | |
144 | ||
145 | --[[KillerDarkness0105's/Codex's Sonic script]]-- | |
146 | ||
147 | plr = owner | |
148 | char = plr.Character | |
149 | ||
150 | gui = Instance.new("BillboardGui", char.Head) | |
151 | gui.Size = UDim2.new(0,200,0,50) | |
152 | gui.StudsOffset = Vector3.new(0, 2, 0) | |
153 | ||
154 | text = Instance.new("TextLabel", gui) | |
155 | text.BackgroundTransparency = 1 | |
156 | text.Size = UDim2.new(10,0,1,0) | |
157 | text.Position = UDim2.new(-4.5,0,0,0) | |
158 | text.Font = "SourceSans" | |
159 | text.TextSize = 50 | |
160 | text.TextColor3 = Color3.new(0, 0, 0) | |
161 | text.TextStrokeColor3 = Color3.new(0, 0, 0) | |
162 | text.TextStrokeTransparency = 0.8 | |
163 | text.Text = "fast boye" | |
164 | text.TextWrapped = true | |
165 | ||
166 | wait(0.07) | |
167 | Player=game:GetService("Players").LocalPlayer | |
168 | Character=Player.Character | |
169 | PlayerGui=Player.PlayerGui | |
170 | Backpack=Player.Backpack | |
171 | Torso=Character.Torso | |
172 | Head=Character.Head | |
173 | Humanoid=Character.Humanoid | |
174 | LeftArm=Character["Left Arm"] | |
175 | LeftLeg=Character["Left Leg"] | |
176 | RightArm=Character["Right Arm"] | |
177 | RightLeg=Character["Right Leg"] | |
178 | LS=Torso["Left Shoulder"] | |
179 | LH=Torso["Left Hip"] | |
180 | RS=Torso["Right Shoulder"] | |
181 | RH=Torso["Right Hip"] | |
182 | Face = Head.face | |
183 | Neck=Torso.Neck | |
184 | it=Instance.new | |
185 | attacktype=1 | |
186 | attacktype2=1 | |
187 | vt=Vector3.new | |
188 | cf=CFrame.new | |
189 | cn=CFrame.new | |
190 | euler=CFrame.fromEulerAnglesXYZ | |
191 | angles=CFrame.Angles | |
192 | combo = 0 | |
193 | necko=cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
194 | necko2=cf(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
195 | LHC0=cf(-1,-1,0,-0,-0,-1,0,1,0,1,0,0) | |
196 | LHC1=cf(-0.5,1,0,-0,-0,-1,0,1,0,1,0,0) | |
197 | RHC0=cf(1,-1,0,0,0,1,0,1,0,-1,-0,-0) | |
198 | RHC1=cf(0.5,1,0,0,0,1,0,1,0,-1,-0,-0) | |
199 | RootPart=Character.HumanoidRootPart | |
200 | RootJoint=RootPart.RootJoint | |
201 | RootCF=euler(-1.57,0,3.14) | |
202 | attack = false | |
203 | attackdebounce = false | |
204 | trispeed=.2 | |
205 | attackmode='none' | |
206 | local idle=0 | |
207 | local Anim="Idle" | |
208 | stance = false | |
209 | local ff = 2 | |
210 | noleg = false | |
211 | evadecooldown = false | |
212 | Humanoid.Animator.Parent = nil | |
213 | equip = false | |
214 | - | Head.Running.SoundId = "rbxassetid://758199523" |
214 | + | |
215 | - | Head.Running.Volume = 2 |
215 | + | |
216 | df = false | |
217 | Swing = 1 | |
218 | local sine = 0 | |
219 | local change = 1 | |
220 | local val = 0 | |
221 | local speed = 0 | |
222 | local rs = game:GetService("RunService").RenderStepped | |
223 | cam = workspace.CurrentCamera | |
224 | local RbxUtility = LoadLibrary("RbxUtility") | |
225 | local Create = RbxUtility.Create | |
226 | deb = game:GetService("Debris") | |
227 | Face.Transparency = 0 | |
228 | --Face.Texture = "rbxassetid://176217905" --176217905 | |
229 | Humanoid.WalkSpeed = 200 | |
230 | local freefall = 0 | |
231 | Head.Running.SoundId = "rbxassetid://2583830330" | |
232 | Head.Running.Volume = 3 | |
233 | local boost = false | |
234 | Humanoid.JumpPower = 88 | |
235 | local musicnum = 1 | |
236 | ||
237 | local spd = Vector3.new(RootPart.Velocity.x,0,RootPart.Velocity.z).magnitude + 10 | |
238 | local dir = Vector3.new(RootPart.Velocity.x,0,RootPart.Velocity.z).unit | |
239 | local GravPoint = RootPart.Velocity.y | |
240 | local NV = Vector3.new(0,0,0) | |
241 | print("Move list") | |
242 | print("---------") | |
243 | print("Shift = Boost") | |
244 | print("Ctrl = Mach Speed Boost") | |
245 | print("Q = Left QuickStep, E = Right QuickStep") | |
246 | - | stompsound.Volume = 2 |
246 | + | |
247 | print("Jump Then Hold B near a wall to wallrun") | |
248 | print("M to change music, if you're standing still you'll do a special animation!") | |
249 | - | stompsound.SoundId = "rbxassetid://1295424184" |
249 | + | |
250 | print("Edit by Trip3mario ya punks, this script is only for friends") | |
251 | ||
252 | ||
253 | boostsound = Instance.new("Sound",PlayerGui) | |
254 | boostsound.Volume = .6 | |
255 | boostsound.TimePosition = 0 | |
256 | boostsound.Pitch = 1 | |
257 | boostsound.SoundId = "rbxassetid://924922553" | |
258 | boostsound.Looped = false | |
259 | ||
260 | ||
261 | ||
262 | stompsound = Instance.new("Sound",PlayerGui) | |
263 | stompsound.Volume = 3 | |
264 | stompsound.TimePosition = 0 | |
265 | stompsound.Pitch = 1 | |
266 | stompsound.SoundId = "rbxassetid://2583816610" | |
267 | stompsound.Looped = false | |
268 | ||
269 | ||
270 | ||
271 | so = function(id,par,vol,pit) | |
272 | coroutine.resume(coroutine.create(function() | |
273 | local sou = Instance.new("Sound",par or workspace) | |
274 | sou.Volume=vol | |
275 | sou.Pitch=pit or 1 | |
276 | sou.SoundId=id | |
277 | sou:play() | |
278 | game:GetService("Debris"):AddItem(sou,8) | |
279 | end)) | |
280 | end | |
281 | ||
282 | --save shoulders | |
283 | RSH, LSH=nil, nil | |
284 | --welds | |
285 | RW, LW=Instance.new("Weld"), Instance.new("Weld") | |
286 | RW.Name="Right Shoulder" LW.Name="Left Shoulder" | |
287 | LH=Torso["Left Hip"] | |
288 | RH=Torso["Right Hip"] | |
289 | TorsoColor=Torso.BrickColor | |
290 | function NoOutline(Part) | |
291 | Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10 | |
292 | end | |
293 | player=Player | |
294 | ch=Character | |
295 | RSH=ch.Torso["Right Shoulder"] | |
296 | LSH=ch.Torso["Left Shoulder"] | |
297 | -- | |
298 | RSH.Parent=nil | |
299 | LSH.Parent=nil | |
300 | -- | |
301 | RW.Name="Right Shoulder" | |
302 | RW.Part0=ch.Torso | |
303 | RW.C0=cf(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5) | |
304 | RW.C1=cf(0, 0.5, 0) | |
305 | RW.Part1=ch["Right Arm"] | |
306 | RW.Parent=ch.Torso | |
307 | -- | |
308 | LW.Name="Left Shoulder" | |
309 | LW.Part0=ch.Torso | |
310 | LW.C0=cf(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8) | |
311 | LW.C1=cf(0, 0.5, 0) | |
312 | LW.Part1=ch["Left Arm"] | |
313 | LW.Parent=ch.Torso | |
314 | ||
315 | ||
316 | newWeld = function(wp0, wp1, wc0x, wc0y, wc0z) | |
317 | local wld = Instance.new("Weld", wp1) | |
318 | wld.Part0 = wp0 | |
319 | wld.Part1 = wp1 | |
320 | wld.C0 = CFrame.new(wc0x, wc0y, wc0z) | |
321 | end | |
322 | local rs = game:GetService("RunService").RenderStepped | |
323 | ||
324 | newWeld(RootPart, Torso, 0, -1, 0) | |
325 | Torso.Weld.C1 = CFrame.new(0, -1, 0) | |
326 | newWeld(Torso, LeftLeg, -0.5, -1, 0) | |
327 | LeftLeg.Weld.C1 = CFrame.new(0, 1, 0) | |
328 | newWeld(Torso, RightLeg, 0.5, -1, 0) | |
329 | RightLeg.Weld.C1 = CFrame.new(0, 1, 0) | |
330 | ||
331 | Player=game:GetService('Players').LocalPlayer | |
332 | Character=Player.Character | |
333 | mouse=Player:GetMouse() | |
334 | m=Instance.new('Model',Character) | |
335 | ||
336 | ||
337 | local function weldBetween(a, b) | |
338 | local weldd = Instance.new("ManualWeld") | |
339 | weldd.Part0 = a | |
340 | weldd.Part1 = b | |
341 | weldd.C0 = CFrame.new() | |
342 | weldd.C1 = b.CFrame:inverse() * a.CFrame | |
343 | weldd.Parent = a | |
344 | return weldd | |
345 | end | |
346 | ||
347 | ArtificialHB = Instance.new("BindableEvent", script) | |
348 | ArtificialHB.Name = "Heartbeat" | |
349 | ||
350 | script:WaitForChild("Heartbeat") | |
351 | ||
352 | frame = 1 / 80 | |
353 | tf = 0 | |
354 | allowframeloss = false | |
355 | tossremainder = false | |
356 | lastframe = tick() | |
357 | script.Heartbeat:Fire() | |
358 | game:GetService("RunService").Heartbeat:connect(function(s, p) | |
359 | tf = tf + s | |
360 | if tf >= frame then | |
361 | if allowframeloss then | |
362 | script.Heartbeat:Fire() | |
363 | lastframe = tick() | |
364 | else | |
365 | for i = 1, math.floor(tf / frame) do | |
366 | script.Heartbeat:Fire() | |
367 | end | |
368 | lastframe = tick() | |
369 | end | |
370 | if tossremainder then | |
371 | tf = 0 | |
372 | else | |
373 | tf = tf - frame * math.floor(tf / frame) | |
374 | end | |
375 | end | |
376 | end) | |
377 | ||
378 | --[[] | |
379 | function swait(num) | |
380 | if num == 0 or num == nil then | |
381 | ArtificialHB.Event:wait() | |
382 | else | |
383 | for i = 0, num do | |
384 | ArtificialHB.Event:wait() | |
385 | end | |
386 | end | |
387 | end | |
388 | ||
389 | ]] | |
390 | ||
391 | ||
392 | ||
393 | ||
394 | function swait(num) | |
395 | if num == 0 or num == nil then | |
396 | game:service("RunService").Stepped:wait() | |
397 | else | |
398 | for i = 0, num do | |
399 | game:service("RunService").Stepped:wait() | |
400 | end | |
401 | end | |
402 | end | |
403 | ||
404 | function RemoveOutlines(part) | |
405 | part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10 | |
406 | end | |
407 | ||
408 | ||
409 | part = function(formfactor, parent, reflectance, transparency, brickcolor, name, size) | |
410 | local fp = it("Part") | |
411 | fp.formFactor = formfactor | |
412 | fp.Parent = parent | |
413 | fp.Reflectance = reflectance | |
414 | fp.Transparency = transparency | |
415 | fp.CanCollide = false | |
416 | fp.Locked = true | |
417 | fp.BrickColor = brickcolor | |
418 | fp.Name = name | |
419 | fp.Size = size | |
420 | fp.Position = Torso.Position | |
421 | NoOutline(fp) | |
422 | if fp.BrickColor == BrickColor.new("Dark indigo") then | |
423 | fp.Material = "Neon" | |
424 | else | |
425 | if fp.BrickColor == BrickColor.new("Really black") then | |
426 | fp.BrickColor = BrickColor.new("Really black") | |
427 | fp.Material = "Metal" | |
428 | else | |
429 | fp.Material = "Neon" | |
430 | end | |
431 | end | |
432 | fp:BreakJoints() | |
433 | return fp | |
434 | end | |
435 | ||
436 | mesh = function(Mesh, part, meshtype, meshid, offset, scale) | |
437 | local mesh = it(Mesh) | |
438 | mesh.Parent = part | |
439 | if Mesh == "SpecialMesh" then | |
440 | mesh.MeshType = meshtype | |
441 | mesh.MeshId = meshid | |
442 | end | |
443 | mesh.Offset = offset | |
444 | mesh.Scale = scale | |
445 | return mesh | |
446 | end | |
447 | ||
448 | weld = function(parent, part0, part1, c0) | |
449 | local weld = it("Weld") | |
450 | weld.Parent = parent | |
451 | weld.Part0 = part0 | |
452 | weld.Part1 = part1 | |
453 | weld.C0 = c0 | |
454 | return weld | |
455 | end | |
456 | ||
457 | F1 = Instance.new("Folder", Character) | |
458 | F1.Name = "Effects Folder" | |
459 | F2 = Instance.new("Folder", F1) | |
460 | F2.Name = "Effects" | |
461 | Triangle = function(a, b, c) | |
462 | end | |
463 | ||
464 | MagicBlock = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
465 | local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt()) | |
466 | prt.Anchored = true | |
467 | prt.CanCollide = false | |
468 | prt.CFrame = cframe | |
469 | prt.Name = "prt" | |
470 | msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1)) | |
471 | game:GetService("Debris"):AddItem(prt, 5) | |
472 | table.insert(Effects, {prt, "Block1", delay, x3, y3, z3}) | |
473 | end | |
474 | ||
475 | ||
476 | ||
477 | MagicCircle = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
478 | local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt()) | |
479 | prt.Anchored = true | |
480 | prt.CanCollide = false | |
481 | prt.CFrame = cframe | |
482 | prt.Name = "prt" | |
483 | local msh = mesh("SpecialMesh", prt, "Sphere", "", vt(0, 0, 0), vt(x1, y1, z1)) | |
484 | game:GetService("Debris"):AddItem(prt, 5) | |
485 | table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3}) | |
486 | end | |
487 | ||
488 | MagicWave = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
489 | local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt()) | |
490 | prt.Anchored = true | |
491 | prt.CFrame = cframe | |
492 | local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=20329976", vt(0, 0, 0), vt(x1, y1, z1)) | |
493 | game:GetService("Debris"):AddItem(prt, 5) | |
494 | table.insert(Effects, {prt, "Cylinder", delay, x3, y3, z3}) | |
495 | end | |
496 | ||
497 | MagicCylinder = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
498 | local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt(0.2, 0.2, 0.2)) | |
499 | prt.Anchored = true | |
500 | prt.CFrame = cframe | |
501 | msh = mesh("SpecialMesh", prt, "Head", "", vt(0, 0, 0), vt(x1, y1, z1)) | |
502 | game:GetService("Debris"):AddItem(prt, 5) | |
503 | Effects[#Effects + 1] = {prt, "Cylinder", delay, x3, y3, z3} | |
504 | end | |
505 | ||
506 | MagicCylinder2 = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
507 | local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt(0.2, 0.2, 0.2)) | |
508 | prt.Anchored = true | |
509 | prt.CFrame = cframe | |
510 | msh = mesh("CylinderMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1)) | |
511 | game:GetService("Debris"):AddItem(prt, 5) | |
512 | Effects[#Effects + 1] = {prt, "Cylinder", delay, x3, y3, z3} | |
513 | end | |
514 | ||
515 | MagicBlood = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
516 | local prt = part(3, F2, 0, 0, brickcolor, "Effect", vt()) | |
517 | prt.Anchored = true | |
518 | prt.CFrame = cframe | |
519 | local msh = mesh("SpecialMesh", prt, "Sphere", "", vt(0, 0, 0), vt(x1, y1, z1)) | |
520 | game:GetService("Debris"):AddItem(prt, 5) | |
521 | table.insert(Effects, {prt, "Blood", delay, x3, y3, z3}) | |
522 | end | |
523 | ||
524 | ElecEffect = function(cff, x, y, z) | |
525 | local prt = part(3, F2, 0, 0, BrickColor.new("Dark indigo"), "Part", vt(1, 1, 1)) | |
526 | prt.Anchored = true | |
527 | prt.CFrame = cff * cf(math.random(-x, x), math.random(-y, y), math.random(-z, z)) | |
528 | prt.CFrame = cf(prt.Position) | |
529 | game:GetService("Debris"):AddItem(prt, 2) | |
530 | xval = math.random() / 2 | |
531 | yval = math.random() / 2 | |
532 | zval = math.random() / 2 | |
533 | msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(xval, yval, zval)) | |
534 | Effects[#Effects + 1] = {prt, "Elec", 0.1, x, y, z, xval, yval, zval} | |
535 | end | |
536 | ||
537 | function FindNearestTorso(Position, Distance, SinglePlayer) | |
538 | if SinglePlayer then | |
539 | return (SinglePlayer.Torso.CFrame.p - Position).magnitude < Distance | |
540 | end | |
541 | local List = {} | |
542 | for i, v in pairs(workspace:GetChildren()) do | |
543 | if v:IsA("Model") then | |
544 | if v:findFirstChild("Torso") then | |
545 | if v ~= Character then | |
546 | if (v.Torso.Position - Position).magnitude <= Distance then | |
547 | table.insert(List, v) | |
548 | end | |
549 | end | |
550 | end | |
551 | end | |
552 | end | |
553 | return List | |
554 | end | |
555 | ||
556 | ||
557 | function CreatePart(Parent, Material, Reflectance, Transparency, BColor, Name, Size) | |
558 | local Part = Create("Part"){ | |
559 | Parent = Parent, | |
560 | Reflectance = Reflectance, | |
561 | Transparency = Transparency, | |
562 | CanCollide = false, | |
563 | Locked = true, | |
564 | BrickColor = BrickColor.new(tostring(BColor)), | |
565 | Name = Name, | |
566 | Size = Size, | |
567 | Material = Material, | |
568 | } | |
569 | RemoveOutlines(Part) | |
570 | return Part | |
571 | end | |
572 | ||
573 | function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
574 | local Msh = Create(Mesh){ | |
575 | Parent = Part, | |
576 | Offset = OffSet, | |
577 | Scale = Scale, | |
578 | } | |
579 | if Mesh == "SpecialMesh" then | |
580 | Msh.MeshType = MeshType | |
581 | Msh.MeshId = MeshId | |
582 | end | |
583 | return Msh | |
584 | end | |
585 | ||
586 | ||
587 | ||
588 | function BlockEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type) | |
589 | local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
590 | prt.Anchored = true | |
591 | prt.CFrame = cframe | |
592 | local msh = CreateMesh("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
593 | game:GetService("Debris"):AddItem(prt, 10) | |
594 | if Type == 1 or Type == nil then | |
595 | table.insert(Effects, { | |
596 | prt, | |
597 | "Block1", | |
598 | delay, | |
599 | x3, | |
600 | y3, | |
601 | z3, | |
602 | msh | |
603 | }) | |
604 | elseif Type == 2 then | |
605 | table.insert(Effects, { | |
606 | prt, | |
607 | "Block2", | |
608 | delay, | |
609 | x3, | |
610 | y3, | |
611 | z3, | |
612 | msh | |
613 | }) | |
614 | end | |
615 | end | |
616 | ||
617 | function SphereEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
618 | local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
619 | prt.Anchored = true | |
620 | prt.CFrame = cframe | |
621 | local msh = CreateMesh("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
622 | game:GetService("Debris"):AddItem(prt, 10) | |
623 | table.insert(Effects, { | |
624 | prt, | |
625 | "Cylinder", | |
626 | delay, | |
627 | x3, | |
628 | y3, | |
629 | z3, | |
630 | msh | |
631 | }) | |
632 | end | |
633 | ||
634 | function RingEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay,material) | |
635 | local prt=CreatePart(workspace,material,0,0,brickcolor,"Effect",vt(.5,.5,.5))--part(3,workspace,"SmoothPlastic",0,0,brickcolor,"Effect",vt(0.5,0.5,0.5)) | |
636 | prt.Anchored=true | |
637 | prt.CFrame=cframe | |
638 | msh=CreateMesh("SpecialMesh",prt,"FileMesh","http://www.roblox.com/asset/?id=3270017",vt(0,0,0),vt(x1,y1,z1)) | |
639 | game:GetService("Debris"):AddItem(prt,2) | |
640 | coroutine.resume(coroutine.create(function(Part,Mesh,num) | |
641 | for i=0,1,delay do | |
642 | swait() | |
643 | Part.Transparency=i | |
644 | Mesh.Scale=Mesh.Scale+vt(x3,y3,z3) | |
645 | end | |
646 | Part.Parent=nil | |
647 | end),prt,msh,(math.random(0,1)+math.random())/5) | |
648 | end | |
649 | ||
650 | function CylinderEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
651 | local prt = CreatePart(workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
652 | prt.Anchored = true | |
653 | prt.CFrame = cframe | |
654 | local msh = CreateMesh("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
655 | game:GetService("Debris"):AddItem(prt, 10) | |
656 | table.insert(Effects, { | |
657 | prt, | |
658 | "Cylinder", | |
659 | delay, | |
660 | x3, | |
661 | y3, | |
662 | z3, | |
663 | msh | |
664 | }) | |
665 | end | |
666 | ||
667 | function WaveEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
668 | local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
669 | prt.Anchored = true | |
670 | prt.CFrame = cframe | |
671 | local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "rbxassetid://20329976", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
672 | game:GetService("Debris"):AddItem(prt, 10) | |
673 | table.insert(Effects, { | |
674 | prt, | |
675 | "Cylinder", | |
676 | delay, | |
677 | x3, | |
678 | y3, | |
679 | z3, | |
680 | msh | |
681 | }) | |
682 | end | |
683 | ||
684 | function SpecialEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
685 | local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
686 | prt.Anchored = true | |
687 | prt.CFrame = cframe | |
688 | local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "rbxassetid://24388358", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
689 | game:GetService("Debris"):AddItem(prt, 10) | |
690 | table.insert(Effects, { | |
691 | prt, | |
692 | "Cylinder", | |
693 | delay, | |
694 | x3, | |
695 | y3, | |
696 | z3, | |
697 | msh | |
698 | }) | |
699 | end | |
700 | ||
701 | ||
702 | function MoonEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
703 | local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
704 | prt.Anchored = true | |
705 | prt.CFrame = cframe | |
706 | local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "rbxassetid://259403370", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
707 | game:GetService("Debris"):AddItem(prt, 10) | |
708 | table.insert(Effects, { | |
709 | prt, | |
710 | "Cylinder", | |
711 | delay, | |
712 | x3, | |
713 | y3, | |
714 | z3, | |
715 | msh | |
716 | }) | |
717 | end | |
718 | ||
719 | function HeadEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
720 | local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
721 | prt.Anchored = true | |
722 | prt.CFrame = cframe | |
723 | local msh = CreateMesh("SpecialMesh", prt, "Head", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
724 | game:GetService("Debris"):AddItem(prt, 10) | |
725 | table.insert(Effects, { | |
726 | prt, | |
727 | "Cylinder", | |
728 | delay, | |
729 | x3, | |
730 | y3, | |
731 | z3, | |
732 | msh | |
733 | }) | |
734 | end | |
735 | ||
736 | function BreakEffect(brickcolor, cframe, x1, y1, z1) | |
737 | local prt = CreatePart(workspace, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5)) | |
738 | prt.Anchored = true | |
739 | prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
740 | local msh = CreateMesh("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1)) | |
741 | local num = math.random(10, 50) / 1000 | |
742 | game:GetService("Debris"):AddItem(prt, 10) | |
743 | table.insert(Effects, { | |
744 | prt, | |
745 | "Shatter", | |
746 | num, | |
747 | prt.CFrame, | |
748 | math.random() - math.random(), | |
749 | 0, | |
750 | math.random(50, 100) / 100 | |
751 | }) | |
752 | end | |
753 | ||
754 | local lerp = function(a, b, t) | |
755 | return a * (1 - t) + b * t | |
756 | end | |
757 | ||
758 | function clerp(a,b,t) | |
759 | local qa = {QuaternionFromCFrame(a)} | |
760 | local qb = {QuaternionFromCFrame(b)} | |
761 | local ax, ay, az = a.x, a.y, a.z | |
762 | local bx, by, bz = b.x, b.y, b.z | |
763 | local _t = 1-t | |
764 | return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t)) | |
765 | end | |
766 | ||
767 | function QuaternionFromCFrame(cf) | |
768 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
769 | local trace = m00 + m11 + m22 | |
770 | if trace > 0 then | |
771 | local s = math.sqrt(1 + trace) | |
772 | local recip = 0.5/s | |
773 | return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 | |
774 | else | |
775 | local i = 0 | |
776 | if m11 > m00 then | |
777 | i = 1 | |
778 | end | |
779 | if m22 > (i == 0 and m00 or m11) then | |
780 | i = 2 | |
781 | end | |
782 | if i == 0 then | |
783 | local s = math.sqrt(m00-m11-m22+1) | |
784 | local recip = 0.5/s | |
785 | return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip | |
786 | elseif i == 1 then | |
787 | local s = math.sqrt(m11-m22-m00+1) | |
788 | local recip = 0.5/s | |
789 | return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip | |
790 | elseif i == 2 then | |
791 | local s = math.sqrt(m22-m00-m11+1) | |
792 | local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip | |
793 | end | |
794 | end | |
795 | end | |
796 | ||
797 | ||
798 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
799 | local xs, ys, zs = x + x, y + y, z + z | |
800 | local wx, wy, wz = w*xs, w*ys, w*zs | |
801 | local xx = x*xs | |
802 | local xy = x*ys | |
803 | local xz = x*zs | |
804 | local yy = y*ys | |
805 | local yz = y*zs | |
806 | local zz = z*zs | |
807 | 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)) | |
808 | end | |
809 | function QuaternionSlerp(a, b, t) | |
810 | local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] | |
811 | local startInterp, finishInterp; | |
812 | if cosTheta >= 0.0001 then | |
813 | if (1 - cosTheta) > 0.0001 then | |
814 | local theta = math.acos(cosTheta) | |
815 | local invSinTheta = 1/math.sin(theta) | |
816 | startInterp = math.sin((1-t)*theta)*invSinTheta | |
817 | finishInterp = math.sin(t*theta)*invSinTheta | |
818 | else | |
819 | startInterp = 1-t | |
820 | finishInterp = t | |
821 | end | |
822 | else | |
823 | if (1+cosTheta) > 0.0001 then | |
824 | local theta = math.acos(-cosTheta) | |
825 | local invSinTheta = 1/math.sin(theta) | |
826 | startInterp = math.sin((t-1)*theta)*invSinTheta | |
827 | finishInterp = math.sin(t*theta)*invSinTheta | |
828 | else | |
829 | startInterp = t-1 | |
830 | finishInterp = t | |
831 | end | |
832 | end | |
833 | 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 | |
834 | end | |
835 | ||
836 | function weld5(part0, part1, c0, c1) | |
837 | weeld=Instance.new("Weld", part0) | |
838 | weeld.Part0=part0 | |
839 | weeld.Part1=part1 | |
840 | weeld.C0=c0 | |
841 | weeld.C1=c1 | |
842 | return weeld | |
843 | end | |
844 | ||
845 | --Example: Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.4) | |
846 | ||
847 | function rayCast(Pos, Dir, Max, Ignore) -- Origin Position , Direction, MaxDistance , IgnoreDescendants | |
848 | return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore) | |
849 | end | |
850 | ||
851 | ||
852 | ||
853 | ||
854 | ||
855 | ||
856 | Character.Humanoid.MaxHealth = 120 | |
857 | Character.Humanoid.Health = 120 | |
858 | ||
859 | local f = 0 | |
860 | local b = Instance.new("BlurEffect",cam) | |
861 | local c = Instance.new('PointLight', Torso) | |
862 | c.Range = 16 | |
863 | c.Color = Color3.new(0, 1,1) | |
864 | c.Brightness = 1.5 | |
865 | game:GetService("RunService"):BindToRenderStep("W0tT", 0, function() | |
866 | ||
867 | b.Size = b.Size - 4 | |
868 | if boost == true then | |
869 | c.Enabled = true | |
870 | cam.FieldOfView = lerp(cam.FieldOfView, 110, 0.5) | |
871 | -- cam.FieldOfView = 110 | |
872 | freefall = 0 | |
873 | Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(0,0,3),0.25) | |
874 | SphereEffect(BrickColor.new("Cyan"),RightLeg.CFrame*CFrame.new(0,-1,0)*angles(math.random(-180,180),math.random(-180,180),math.random(-180,180)),1.4,12,1.4,2.8,26,2.8,0.07) | |
875 | SphereEffect(BrickColor.new("Cyan"),LeftLeg.CFrame*CFrame.new(0,-1,0)*angles(math.random(-180,180),math.random(-180,180),math.random(-180,180)),1.4,12,1.4,2.8,26,2.8,0.07) | |
876 | if hitfloor ~= nil and Anim ~= "runIdle" then | |
877 | SpecialEffect(BrickColor.new("Cyan"),RootPart.CFrame*CFrame.new(0,-3.4,.78) ,2,2,2, 1.5,1.5,1.5,.09) | |
878 | end | |
879 | end | |
880 | if boost == false then | |
881 | cam.FieldOfView = lerp(cam.FieldOfView, 70, 0.076) | |
882 | --cam.FieldOfView = 70 | |
883 | c.Enabled = false | |
884 | end | |
885 | end) | |
886 | ||
887 | ||
888 | ||
889 | mouse.KeyDown:connect(function(key) | |
890 | if string.byte(key) == 48 then | |
891 | b.Size = 40 | |
892 | Swing = 2 | |
893 | freefall = 0 | |
894 | ||
895 | coroutine.resume(coroutine.create(function() | |
896 | for i = 0,1,0.1 do | |
897 | swait() | |
898 | Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(math.random(-0.35*1.8,0.35*1.8),math.random(-0.35*1.8,0.35*1.8),math.random(-0.35*1.8,0.35*1.8)),0.24) | |
899 | end | |
900 | end)) | |
901 | Humanoid.WalkSpeed = 180 | |
902 | RootPart.Velocity = RootPart.CFrame.lookVector*150 | |
903 | RingEffect(BrickColor.new("Cyan"), RootPart.CFrame*CFrame.new(0,0,-9.2) , 1, 1, 1, 8, 8, 8, 0.14,"Neon") | |
904 | boost = true | |
905 | boostsound:Play() | |
906 | end | |
907 | end) | |
908 | ||
909 | mouse.KeyUp:connect(function(key) | |
910 | if string.byte(key) == 48 then | |
911 | Swing = 1 | |
912 | Humanoid.WalkSpeed = 64 | |
913 | boost = false | |
914 | boostsound:Stop() | |
915 | ||
916 | end | |
917 | end) | |
918 | ||
919 | ||
920 | ||
921 | ||
922 | mouse.KeyDown:connect(function(key) | |
923 | if string.byte(key) == 50 then | |
924 | b.Size = 40 | |
925 | freefall = 0 | |
926 | Swing = 2 | |
927 | ||
928 | coroutine.resume(coroutine.create(function() | |
929 | for i = 0,1,0.1 do | |
930 | swait() | |
931 | Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(math.random(-0.35*2.8,0.35*2.8),math.random(-0.35*2.8,0.35*2.8),math.random(-0.35*2.8,0.35*2.8)),0.48) | |
932 | end | |
933 | end)) | |
934 | ||
935 | Humanoid.WalkSpeed = 320 | |
936 | RootPart.Velocity = RootPart.CFrame.lookVector*550 | |
937 | RingEffect(BrickColor.new("Cyan"), RootPart.CFrame*CFrame.new(0,0,-9.2) , 1, 1, 1, 18, 18, 18, 0.14,"Neon") | |
938 | RingEffect(BrickColor.new("White"), RootPart.CFrame*CFrame.new(0,0,-11.2) , 1, 1, 1, 18, 18, 18, 0.14,"Neon") | |
939 | RingEffect(BrickColor.new("Cyan"), RootPart.CFrame*CFrame.new(0,0,-13.2) , 1, 1, 1, 18, 18, 18, 0.14,"Neon") | |
940 | boost = true | |
941 | boostsound:Play() | |
942 | end | |
943 | end) | |
944 | ||
945 | mouse.KeyUp:connect(function(key) | |
946 | if string.byte(key) == 50 then | |
947 | Swing = 1 | |
948 | Humanoid.WalkSpeed = 64 | |
949 | boost = false | |
950 | boostsound:Stop() | |
951 | ||
952 | end | |
953 | end) | |
954 | ||
955 | ||
956 | local lastwall = nil | |
957 | local jumped = false | |
958 | ||
959 | ||
960 | ||
961 | ||
962 | ||
963 | ||
964 | local vwall = false | |
965 | ||
966 | mouse.KeyDown:connect(function(key) | |
967 | if key == 'b' and hitfloor == nil and attack == false then | |
968 | vrun() | |
969 | end | |
970 | end) | |
971 | ||
972 | ||
973 | function vrun() | |
974 | local ray = Ray.new( | |
975 | RootPart.CFrame.p, RootPart.CFrame.lookVector *2.5 | |
976 | ) | |
977 | local hit, position, normal = workspace:FindPartOnRay(ray, character) | |
978 | ||
979 | if hit then | |
980 | if hit.Parent.Parent ~= Character and hit.Parent ~= Character and hit.Name ~= "prt" and hit.CanCollide == true then | |
981 | vwall = true | |
982 | local NV = Vector3.new(0,0,0) | |
983 | local spd = Vector3.new(RootPart.Velocity.x,0,RootPart.Velocity.z).magnitude + 10 | |
984 | local dir = Vector3.new(RootPart.Velocity.x,0,RootPart.Velocity.z).unit | |
985 | local GravPoint = RootPart.Velocity.y | |
986 | local velo = Instance.new("BodyVelocity",Torso) | |
987 | velo.MaxForce = Vector3.new(400000,400000,400000) | |
988 | ||
989 | attack = true | |
990 | while vwall == true and ray and hit do | |
991 | swait() | |
992 | change = 0.84+ Humanoid.WalkSpeed/132 | |
993 | if Humanoid.WalkSpeed > 40 and Humanoid.WalkSpeed < 70 then | |
994 | velo.Velocity = Vector3.new(0,40,0) | |
995 | end | |
996 | if Humanoid.WalkSpeed > 70 and Humanoid.WalkSpeed < 200 then | |
997 | velo.Velocity = Vector3.new(0,80,0) | |
998 | end | |
999 | if Humanoid.WalkSpeed > 200 then | |
1000 | velo.Velocity = Vector3.new(0,130,0) | |
1001 | end | |
1002 | ray = Ray.new( | |
1003 | RootPart.CFrame.p, RootPart.CFrame.lookVector *2.5 | |
1004 | ) | |
1005 | hit, position, normal = workspace:FindPartOnRay(ray, character) | |
1006 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1-0.52*math.cos(sine/2), .6) * angles(math.rad(96), math.rad(0), math.rad(0)+ RootPart.RotVelocity.Y / 26), .1) | |
1007 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-11+20*math.sin(sine/2)),math.rad(0),math.rad(0+5*math.sin(sine/4)) + RootPart.RotVelocity.Y / 13),.1) | |
1008 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0.1) * angles(math.rad(-90-7*math.sin(sine/4))+ RootPart.RotVelocity.Y / -34, math.rad(0), math.rad(15+2*math.sin(sine/4))- RootPart.RotVelocity.Y / 34),.15) | |
1009 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0.1)*angles(math.rad(-90-7*math.sin(sine/4))+ RootPart.RotVelocity.Y / 34,math.rad(0),math.rad(-15+2*math.sin(sine/4))+ RootPart.RotVelocity.Y / -34),.15) | |
1010 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1+0.28*math.cos(sine/4), 0-0.32*math.cos(sine/4)) * CFrame.Angles(math.rad(0+104*math.sin(sine/4)), math.rad(0)+ RootPart.RotVelocity.Y / 42, math.rad(0)+ RootPart.RotVelocity.Y / -54), 0.3+ Humanoid.WalkSpeed/272) | |
1011 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1-0.28*math.cos(sine/4),0+0.32*math.cos(sine/4)) * CFrame.Angles(math.rad(0-104*math.sin(sine/4)), math.rad(0)+ RootPart.RotVelocity.Y / 42, math.rad(0)- RootPart.RotVelocity.Y / 54), 0.3+ Humanoid.WalkSpeed/272) | |
1012 | end | |
1013 | velo:Destroy() | |
1014 | wait(0.07) | |
1015 | ||
1016 | if vwall == false then | |
1017 | ||
1018 | RootPart.Velocity = -RootPart.CFrame.lookVector*68 + Vector3.new(0,86,0) | |
1019 | ||
1020 | --[[] | |
1021 | for i = 0,5,0.2 do | |
1022 | rs:wait() | |
1023 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -0.79, 0) * CFrame.Angles(math.rad(0+100*i), math.rad(0), math.rad(0)), 0.2) | |
1024 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(20),math.rad(0),math.rad(0)),.2) | |
1025 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(180), math.rad(-60), math.rad(40)),.2) | |
1026 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(180), math.rad(60), math.rad(-40)),.2) | |
1027 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2) | |
1028 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2) | |
1029 | end | |
1030 | ]] | |
1031 | ||
1032 | ||
1033 | for i = 0,4,0.1 do | |
1034 | swait() | |
1035 | Humanoid.CameraOffset = Vector3.new(0,0,0) | |
1036 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0+260*i), math.rad(0), math.rad(0)), 0.6) | |
1037 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(70),math.rad(0),math.rad(0)),.1) | |
1038 | RW.C0 = clerp(RW.C0, CFrame.new(.7, -0.22, -0.5) * angles(math.rad(90), math.rad(0), math.rad(-90)), 0.1) | |
1039 | LW.C0 = clerp(LW.C0, CFrame.new(-.7, -0.22, -0.5) * angles(math.rad(90), math.rad(0), math.rad(90)), 0.1) | |
1040 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -.34, -0.7) * CFrame.Angles(math.rad(-25), math.rad(0), math.rad(0)), 0.1) | |
1041 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -.34, -0.7) * CFrame.Angles(math.rad(-25), math.rad(0), math.rad(0)), 0.1) | |
1042 | end | |
1043 | ||
1044 | attack = false | |
1045 | ||
1046 | ||
1047 | end | |
1048 | ||
1049 | ||
1050 | if vwall == true then | |
1051 | RootPart.Velocity = RootPart.CFrame.lookVector*38 + Vector3.new(0,86,0) | |
1052 | ||
1053 | --[[] | |
1054 | for i = 0,5,0.2 do | |
1055 | rs:wait() | |
1056 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -0.79, 0) * CFrame.Angles(math.rad(0+100*i), math.rad(0), math.rad(0)), 0.2) | |
1057 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(20),math.rad(0),math.rad(0)),.2) | |
1058 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(180), math.rad(-60), math.rad(40)),.2) | |
1059 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(180), math.rad(60), math.rad(-40)),.2) | |
1060 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2) | |
1061 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2) | |
1062 | end | |
1063 | ]] | |
1064 | ||
1065 | ||
1066 | for i = 0,4,0.15 do | |
1067 | swait() | |
1068 | Humanoid.CameraOffset = Vector3.new(0,0,0) | |
1069 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0-260*i), math.rad(0), math.rad(0)), 0.6) | |
1070 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(70),math.rad(0),math.rad(0)),.1) | |
1071 | RW.C0 = clerp(RW.C0, CFrame.new(.7, -0.22, -0.5) * angles(math.rad(90), math.rad(0), math.rad(-90)), 0.1) | |
1072 | LW.C0 = clerp(LW.C0, CFrame.new(-.7, -0.22, -0.5) * angles(math.rad(90), math.rad(0), math.rad(90)), 0.1) | |
1073 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -.34, -0.7) * CFrame.Angles(math.rad(-25), math.rad(0), math.rad(0)), 0.1) | |
1074 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -.34, -0.7) * CFrame.Angles(math.rad(-25), math.rad(0), math.rad(0)), 0.1) | |
1075 | end | |
1076 | ||
1077 | attack = false | |
1078 | ||
1079 | end | |
1080 | ||
1081 | ||
1082 | end | |
1083 | end | |
1084 | end | |
1085 | ||
1086 | ||
1087 | ||
1088 | ||
1089 | mouse.KeyUp:connect(function(key) | |
1090 | if key == 'b' and vwall == true then | |
1091 | vwall = false | |
1092 | end | |
1093 | end) | |
1094 | ||
1095 | ||
1096 | ||
1097 | ||
1098 | ||
1099 | function Ldash() | |
1100 | ||
1101 | ||
1102 | ||
1103 | evadecooldown = true | |
1104 | attack = true | |
1105 | k = math.random(1,2) | |
1106 | if k == 1 then | |
1107 | so("http://www.roblox.com/asset/?id=807766310", Head, 2.5, 1) | |
1108 | else | |
1109 | so("http://www.roblox.com/asset/?id=807768137", Head, 2.5, 1) | |
1110 | end | |
1111 | ||
1112 | ||
1113 | ||
1114 | ||
1115 | ||
1116 | --+173.8*i | |
1117 | for i = 0,.7,0.1 do | |
1118 | swait() | |
1119 | Head.Velocity = Head.CFrame.rightVector * -135 | |
1120 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(32)), 0.2) | |
1121 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(-9),math.rad(-14)),.2) | |
1122 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, -0.2) * angles(math.rad(27), math.rad(0), math.rad(30)),.2) | |
1123 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(30), math.rad(0), math.rad(30)),.2) | |
1124 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(12)), 0.2) | |
1125 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(8)), 0.2) | |
1126 | end | |
1127 | ||
1128 | attack = false | |
1129 | wait(0.08) | |
1130 | evadecooldown = false | |
1131 | ||
1132 | ||
1133 | end | |
1134 | ||
1135 | ||
1136 | ||
1137 | ||
1138 | ||
1139 | function Rdash() | |
1140 | ||
1141 | ||
1142 | ||
1143 | evadecooldown = true | |
1144 | attack = true | |
1145 | k = math.random(1,2) | |
1146 | if k == 1 then | |
1147 | so("http://www.roblox.com/asset/?id=807766310", Head, 2.5, 1) | |
1148 | else | |
1149 | so("http://www.roblox.com/asset/?id=807768137", Head, 2.5, 1) | |
1150 | end | |
1151 | ||
1152 | ||
1153 | ||
1154 | ||
1155 | ||
1156 | --+173.8*i | |
1157 | for i = 0,.7,0.1 do | |
1158 | swait() | |
1159 | Head.Velocity = Head.CFrame.rightVector * 135 | |
1160 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-32)), 0.2) | |
1161 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0),math.rad(9),math.rad(14)),.2) | |
1162 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(30), math.rad(0), math.rad(-30)),.2) | |
1163 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, -0.2) * angles(math.rad(27), math.rad(0), math.rad(-30)),.2) | |
1164 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-8)), 0.2) | |
1165 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(-12)), 0.2) | |
1166 | end | |
1167 | ||
1168 | attack = false | |
1169 | wait(0.08) | |
1170 | evadecooldown = false | |
1171 | ||
1172 | ||
1173 | end | |
1174 | local sliding = false | |
1175 | ||
1176 | ||
1177 | function Slide() | |
1178 | ||
1179 | local spd = Vector3.new(RootPart.Velocity.x,0,RootPart.Velocity.z).magnitude + 10 | |
1180 | spd = spd + 30 | |
1181 | local dir = Vector3.new(RootPart.Velocity.x,0,RootPart.Velocity.z).unit | |
1182 | local GravPoint = RootPart.Velocity.y | |
1183 | if spd > 40 and hitfloor ~= nil then | |
1184 | noleg = true | |
1185 | ||
1186 | attack = true | |
1187 | k = math.random(1,2) | |
1188 | if k == 1 then | |
1189 | so("http://www.roblox.com/asset/?id=807766310", Head, 2.5, 1) | |
1190 | else | |
1191 | so("http://www.roblox.com/asset/?id=807768137", Head, 2.5, 1) | |
1192 | end | |
1193 | - | Head.Running.SoundId = "rbxassetid://1295468446" |
1193 | + | |
1194 | ||
1195 | ||
1196 | ||
1197 | ||
1198 | ||
1199 | ||
1200 | ||
1201 | ||
1202 | ||
1203 | local NV = Vector3.new(0,0,0) | |
1204 | local bv = Instance.new("BodyVelocity", Torso) | |
1205 | bv.maxForce = Vector3.new(1/0,1/0,1/0) | |
1206 | bv.velocity = dir*spd | |
1207 | local bg = Instance.new("BodyGyro", Torso) | |
1208 | bg.maxTorque = Vector3.new(1/0,1/0,1/0) | |
1209 | bg.cframe = CFrame.new(NV, dir) * CFrame.Angles(math.pi/2.2,0.24,0) | |
1210 | Head.Running.SoundId = "rbxassetid://2583830330" | |
1211 | - | Head.Running.SoundId = "rbxassetid://758199523" |
1211 | + | |
1212 | ||
1213 | Humanoid.PlatformStand = true | |
1214 | while spd > 2 and hitfloor ~= nil and sliding == true do | |
1215 | swait() | |
1216 | spd = spd - 0.95 | |
1217 | bv.velocity = dir*spd + Vector3.new(0,0,0) | |
1218 | bg.cframe = CFrame.new(NV, dir) * CFrame.Angles(math.pi/2.2,0.24,0) | |
1219 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -2.3, 0) * CFrame.Angles(math.rad(90), math.rad(0), math.rad(12)), 0.2) | |
1220 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(34),math.rad(0),math.rad(12)),.2) | |
1221 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(110), math.rad(0), math.rad(70)),.2) | |
1222 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, -0.2) * angles(math.rad(0), math.rad(0), math.rad(-60)),.2) | |
1223 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.2) | |
1224 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -0.56, -0.2) * CFrame.Angles(math.rad(-24), math.rad(0), math.rad(0)), 0.2) | |
1225 | end | |
1226 | bv:Destroy() | |
1227 | bg:Destroy() | |
1228 | Head.Running.SoundId = "rbxassetid://2583830330" | |
1229 | Head.Running.TimePosition = 0 | |
1230 | Humanoid.PlatformStand = false | |
1231 | attack = false | |
1232 | sliding = false | |
1233 | wait(0.05) | |
1234 | evadecooldown = false | |
1235 | ||
1236 | ||
1237 | end | |
1238 | end | |
1239 | ||
1240 | function land() | |
1241 | attack = true | |
1242 | RootPart.Velocity = Vector3.new(0,0,0) | |
1243 | WaveEffect(BrickColor.new("Cyan"), RootPart.CFrame*CFrame.new(0,-1,0) , 1, 1, 1, 3, 0.8, 3, 0.06) | |
1244 | so("http://www.roblox.com/asset/?id=1295424585", Torso, 3.5, 1) | |
1245 | ||
1246 | coroutine.resume(coroutine.create(function() | |
1247 | for i = 0,1,0.1 do | |
1248 | swait() | |
1249 | Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(math.random(-0.55*2.8,0.55*2.8),math.random(-0.55*2.8,0.55*2.8),math.random(-0.55*2.8,0.55*2.8)),0.44) | |
1250 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -2, 0) * CFrame.Angles(math.rad(-16), math.rad(0), math.rad(0)), 0.5) | |
1251 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(7),math.rad(0),math.rad(0)),.5) | |
1252 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(87)),.5) | |
1253 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, -0) * angles(math.rad(0), math.rad(0), math.rad(-87)),.5) | |
1254 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, 0, -0.5) * CFrame.Angles(math.rad(16), math.rad(0), math.rad(0)), 0.5) | |
1255 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1.14, 0.2) * CFrame.Angles(math.rad(-17), math.rad(0), math.rad(0)), 0.5) | |
1256 | ||
1257 | end | |
1258 | attack = false | |
1259 | ||
1260 | ||
1261 | end)) | |
1262 | ||
1263 | ||
1264 | ||
1265 | end | |
1266 | ||
1267 | ||
1268 | ||
1269 | ||
1270 | function stomp() | |
1271 | attack = true | |
1272 | stompsound:Play() | |
1273 | ||
1274 | while hitfloor == nil do | |
1275 | swait() | |
1276 | b.Size = 12 | |
1277 | WaveEffect(BrickColor.new("Cyan"), LeftLeg.CFrame*CFrame.new(0,-2.4,0) , 1, 1, 1, 0.8, 0.8, 0.8, 0.14) | |
1278 | RootPart.Velocity = Vector3.new(0,RootPart.Velocity.y/1.6,0) +Vector3.new(0,-150,0) | |
1279 | Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(0,0,0),0.15) | |
1280 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0.2) * CFrame.Angles(math.rad(0+4*math.sin(sine/1.3)), math.rad(0), math.rad(0)),0.07) | |
1281 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.65, 0) * angles(math.rad(0), math.rad(0), math.rad(140+12*math.cos(sine/1.3))), 0.07) | |
1282 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.65, 0) * angles(math.rad(0), math.rad(0), math.rad(-140+12*math.cos(sine/1.3))), 0.07) | |
1283 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(60+7*math.sin(sine/1.3)),math.rad(0),math.rad(0)),0.07) | |
1284 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1+0.17*math.cos(sine/1.3), -0.13) * CFrame.Angles(math.rad(0+4*math.cos(sine/1.3)), math.rad(3), math.rad(0)), 0.1) | |
1285 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, .27+0.17*math.cos(sine/1.3), -0.56) * CFrame.Angles(math.rad(-12+4*math.cos(sine/1.3)), math.rad(0), math.rad(0)), 0.1) | |
1286 | ||
1287 | end | |
1288 | stompsound:Stop() | |
1289 | land() | |
1290 | ||
1291 | ||
1292 | end | |
1293 | ||
1294 | ||
1295 | function changemusic() | |
1296 | musicnum = musicnum + 1 | |
1297 | music.TimePosition = 0 | |
1298 | local osix = false | |
1299 | local spd = Vector3.new(RootPart.Velocity.x,0,RootPart.Velocity.z).magnitude | |
1300 | if musicnum > 14 then | |
1301 | musicnum = 1 | |
1302 | end | |
1303 | if musicnum == 1 then | |
1304 | music.SoundId = "rbxassetid://179029173" | |
1305 | end | |
1306 | if musicnum == 2 then | |
1307 | music.SoundId = "rbxassetid://146443855" | |
1308 | end | |
1309 | if musicnum == 3 then | |
1310 | music.SoundId = "rbxassetid://1342408291" | |
1311 | end | |
1312 | if musicnum == 4 then | |
1313 | music.SoundId = "rbxassetid://201219416" | |
1314 | end | |
1315 | if musicnum == 5 then | |
1316 | music.SoundId = "rbxassetid://1390472571" | |
1317 | end | |
1318 | if musicnum == 6 then | |
1319 | osix = true | |
1320 | music.SoundId = "rbxassetid://249974783" | |
1321 | end | |
1322 | if musicnum == 7 then | |
1323 | music.SoundId = "rbxassetid://1851880603" | |
1324 | end | |
1325 | if musicnum == 8 then | |
1326 | music.SoundId = "rbxassetid://412034984" | |
1327 | end | |
1328 | if musicnum == 9 then | |
1329 | music.SoundId = "rbxassetid://536915629" | |
1330 | end | |
1331 | if musicnum == 10 then | |
1332 | music.SoundId = "rbxassetid://1200005861" | |
1333 | end | |
1334 | if musicnum == 11 then | |
1335 | music.SoundId = "rbxassetid://1055930631" | |
1336 | end | |
1337 | if musicnum == 12 then | |
1338 | music.SoundId = "rbxassetid://300269553" | |
1339 | end | |
1340 | if musicnum == 13 then | |
1341 | music.SoundId = "rbxassetid://199897052" | |
1342 | end | |
1343 | if musicnum == 14 then | |
1344 | music.SoundId = "rbxassetid://638115895" | |
1345 | end | |
1346 | ||
1347 | if spd < 14 then | |
1348 | Humanoid.Jump = true | |
1349 | ||
1350 | if osix == false then | |
1351 | so("rbxassetid://537371462",PlayerGui,2,1) | |
1352 | end | |
1353 | ||
1354 | ||
1355 | RootPart.Velocity = Vector3.new(0,102,0) | |
1356 | attack = true | |
1357 | wait(0.08) | |
1358 | for i = 0,7,0.1 do | |
1359 | swait() | |
1360 | RootPart.Velocity = Vector3.new(0,2,0) | |
1361 | Humanoid.CameraOffset = Vector3.new(0,0,0) | |
1362 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0-260*i), math.rad(0), math.rad(0)), 0.6) | |
1363 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(70),math.rad(0),math.rad(0)),.1) | |
1364 | RW.C0 = clerp(RW.C0, CFrame.new(.7, -0.22, -0.5) * angles(math.rad(90), math.rad(0), math.rad(-90)), 0.1) | |
1365 | LW.C0 = clerp(LW.C0, CFrame.new(-.7, -0.22, -0.5) * angles(math.rad(90), math.rad(0), math.rad(90)), 0.1) | |
1366 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -.34, -0.7) * CFrame.Angles(math.rad(-25), math.rad(0), math.rad(0)), 0.1) | |
1367 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -.34, -0.7) * CFrame.Angles(math.rad(-25), math.rad(0), math.rad(0)), 0.1) | |
1368 | ||
1369 | end | |
1370 | b.Size = 40 | |
1371 | MoonEffect(BrickColor.new("Cyan"), RootPart.CFrame*CFrame.new(0,0,0) , 1, 1, 1, 8, 8, 8, 0.06) | |
1372 | ||
1373 | if osix == true then | |
1374 | osix = false | |
1375 | so("rbxassetid://156821036",PlayerGui,2,1) | |
1376 | end | |
1377 | ||
1378 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -3, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 1) | |
1379 | for i = 0,5,0.1 do | |
1380 | swait() | |
1381 | RootPart.Velocity = Vector3.new(0,3.5,0) | |
1382 | Humanoid.CameraOffset = Vector3.new(0,0,0) | |
1383 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1+0.1*i, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.21) | |
1384 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(22-2*i),math.rad(0),math.rad(0)),.21) | |
1385 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5+0.09*i, 0) * angles(math.rad(20-6*i), math.rad(0), math.rad(90+13*i)), 0.21) | |
1386 | LW.C0 = clerp(LW.C0, CFrame.new(-1.0-0.12*i, 0.5, -0.4+0.05*i) * angles(math.rad(20+13*i), math.rad(0), math.rad(20-13*i)), 0.21) | |
1387 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(45+6*i), math.rad(0), math.rad(-22-4*i)), 0.21) | |
1388 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(45+6*i), math.rad(0), math.rad(22+4*i)), 0.21) | |
1389 | end | |
1390 | attack = false | |
1391 | end | |
1392 | end | |
1393 | ||
1394 | ||
1395 | mouse.KeyDown:connect(function(key) | |
1396 | if key == 'q' and attack == false and evadecooldown == false then | |
1397 | Ldash() | |
1398 | end | |
1399 | end) | |
1400 | ||
1401 | ||
1402 | ||
1403 | mouse.KeyDown:connect(function(key) | |
1404 | if key == 'e' and attack == false and evadecooldown == false then | |
1405 | Rdash() | |
1406 | end | |
1407 | end) | |
1408 | ||
1409 | mouse.KeyDown:connect(function(key) | |
1410 | if key == 'c' and attack == false and evadecooldown == false and hitfloor ~= nil then | |
1411 | sliding = true | |
1412 | Slide() | |
1413 | end | |
1414 | end) | |
1415 | ||
1416 | mouse.KeyDown:connect(function(key) | |
1417 | if key == 'c' and attack == false and hitfloor == nil then | |
1418 | stomp() | |
1419 | end | |
1420 | end) | |
1421 | ||
1422 | ||
1423 | local walljump = false | |
1424 | ||
1425 | ||
1426 | function walljumpp() | |
1427 | local ray = Ray.new( | |
1428 | Torso.CFrame.p, RootPart.CFrame.lookVector *5 | |
1429 | ) | |
1430 | local hit, position, normal = workspace:FindPartOnRay(ray, character) | |
1431 | ||
1432 | if hit then | |
1433 | if hit.Parent.Parent ~= Character and hit.Parent ~= Character then | |
1434 | local dir = Vector3.new(RootPart.Velocity.x,0,RootPart.Velocity.z).unit | |
1435 | GravPoint = 0 | |
1436 | freefall = 0 | |
1437 | walljump = true | |
1438 | Humanoid.AutoRotate = false | |
1439 | local velo = Instance.new("BodyVelocity",Torso) | |
1440 | velo.MaxForce = Vector3.new(400000,400000,400000) | |
1441 | --game.Debris:AddItem(velo,0.1) | |
1442 | attack = true | |
1443 | while hitfloor == nil and walljump == true and ray and hit do | |
1444 | swait() | |
1445 | freefall = 0 | |
1446 | GravPoint = GravPoint - 0.36 | |
1447 | ray = Ray.new( | |
1448 | RootPart.CFrame.p, RootPart.CFrame.lookVector *2.5 | |
1449 | ) | |
1450 | hit, position, normal = workspace:FindPartOnRay(ray, character) | |
1451 | velo.Velocity = vt(0,GravPoint,0) | |
1452 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0.9) * CFrame.Angles(math.rad(5), math.rad(90), math.rad(8)), 0.2) | |
1453 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(7),math.rad(0),math.rad(86)),.2) | |
1454 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(120)),.2) | |
1455 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(0), math.rad(0), math.rad(-60)),.2) | |
1456 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(-6), math.rad(14), math.rad(-12)), 0.2) | |
1457 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(23)), 0.2) | |
1458 | end | |
1459 | if walljump == false then | |
1460 | k = math.random(1,3) | |
1461 | if k == 1 then | |
1462 | so("http://www.roblox.com/asset/?id=800121776", Head, 2.5, 1) | |
1463 | else if k == 2 then | |
1464 | so("http://www.roblox.com/asset/?id=804889329", Head, 2.5, 1) | |
1465 | else if k == 3 then | |
1466 | so("http://www.roblox.com/asset/?id=804907617", Head, 2.5, 1) | |
1467 | end | |
1468 | end | |
1469 | end | |
1470 | ||
1471 | velo:Destroy() | |
1472 | attack = false | |
1473 | coroutine.resume(coroutine.create(function() | |
1474 | for i = 0,1,0.1 do | |
1475 | swait() | |
1476 | Humanoid.CameraOffset = Vector3.new(0,0,0) | |
1477 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0+260*i), math.rad(0), math.rad(0)), 0.6) | |
1478 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(70),math.rad(0),math.rad(0)),.1) | |
1479 | RW.C0 = clerp(RW.C0, CFrame.new(.7, -0.22, -0.5) * angles(math.rad(90), math.rad(0), math.rad(-90)), 0.1) | |
1480 | LW.C0 = clerp(LW.C0, CFrame.new(-.7, -0.22, -0.5) * angles(math.rad(90), math.rad(0), math.rad(90)), 0.1) | |
1481 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -.34, -0.7) * CFrame.Angles(math.rad(-25), math.rad(0), math.rad(0)), 0.1) | |
1482 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -.34, -0.7) * CFrame.Angles(math.rad(-25), math.rad(0), math.rad(0)), 0.1) | |
1483 | end | |
1484 | end)) | |
1485 | ||
1486 | Humanoid.AutoRotate = true | |
1487 | RootPart.Velocity = RootPart.CFrame.lookVector * -137 + Vector3.new(0,136,0) | |
1488 | wait(0.07) | |
1489 | RootPart.CFrame = CFrame.new(RootPart.CFrame.p,-RootPart.CFrame.lookVector) | |
1490 | end | |
1491 | if walljump == true then | |
1492 | attack = false | |
1493 | walljump = false | |
1494 | Humanoid.AutoRotate = true | |
1495 | velo:Destroy() | |
1496 | end | |
1497 | end | |
1498 | end | |
1499 | end | |
1500 | ||
1501 | ||
1502 | local homed = nil | |
1503 | function home() | |
1504 | if walljump ~= true then | |
1505 | for i, v in pairs(FindNearestTorso(Torso.CFrame.p, 80)) do | |
1506 | if v:FindFirstChild('Head') then | |
1507 | Grabbed = true | |
1508 | homed = v | |
1509 | end | |
1510 | end | |
1511 | ||
1512 | if homed ~= nil and homed:FindFirstChildOfClass("Humanoid").Health > 1 and walljump == false then | |
1513 | so("http://www.roblox.com/asset/?id=162460823", Head, 1, .8) | |
1514 | local SBall = Instance.new("Part",Character) | |
1515 | SBall.Name = "Homing Ball" | |
1516 | SBall.CanCollide = false | |
1517 | SBall.Anchored = false | |
1518 | SBall.Transparency = 0.64 | |
1519 | SBall.CFrame = CFrame.new(RootPart.CFrame.p) | |
1520 | SBall.BrickColor = BrickColor.new("Toothpaste") | |
1521 | SBall.Size = Vector3.new(1,1,1) | |
1522 | SBall.Material = "Neon" | |
1523 | SBallweld = Instance.new("Weld") | |
1524 | SBallweld.Parent = SBall | |
1525 | SBallweld.Part0 = RootPart | |
1526 | SBallweld.Part1 = SBall | |
1527 | SBallweld.C1 = CFrame.new(0, 1, 0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)) | |
1528 | SBallweld.Part0 = RootPart | |
1529 | local SBallmesh = Instance.new("SpecialMesh",SBall) | |
1530 | SBallmesh.MeshType = "Sphere" | |
1531 | SBallmesh.Scale = Vector3.new(6,6,6) | |
1532 | trail = Instance.new("Trail", Character) | |
1533 | a2 = Instance.new("Attachment", Torso) a2.Position = Vector3.new(0,2,0) | |
1534 | a3 = Instance.new("Attachment", Torso)a3.Position = Vector3.new(0,-2.5,0) | |
1535 | trail.Texture = "rbxassetid://0" | |
1536 | trail.Attachment0 = a2 | |
1537 | trail.Attachment1 = a3 | |
1538 | trail.Lifetime = 0.353 | |
1539 | trail.MinLength = 0.03 | |
1540 | trail.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0,0),NumberSequenceKeypoint.new(1,1,1)}) | |
1541 | trail.Color = ColorSequence.new(Color3.new(0,1,1), Color3.new(0, 0,0)) | |
1542 | trail.LightEmission = 4.8 | |
1543 | trail.TextureLength = 0.034 | |
1544 | trail.Enabled = true | |
1545 | attack = true | |
1546 | local position = Instance.new("BodyPosition",Torso) | |
1547 | position.P = 68350 | |
1548 | position.maxForce = Vector3.new(math.huge,math.huge,math.huge) | |
1549 | ||
1550 | while homed ~= nil and (homed.Torso.Position-RootPart.Position).magnitude > 8 do | |
1551 | swait() | |
1552 | SBall.CFrame = CFrame.new(RootPart.CFrame.p) | |
1553 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(0+420*math.abs(sine/3.2)), math.rad(0), math.rad(0)), 0.6) | |
1554 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(70),math.rad(0),math.rad(0)),.1) | |
1555 | RW.C0 = clerp(RW.C0, CFrame.new(.7, -0.22, -0.5) * angles(math.rad(90), math.rad(0), math.rad(-90)), 0.1) | |
1556 | LW.C0 = clerp(LW.C0, CFrame.new(-.7, -0.22, -0.5) * angles(math.rad(90), math.rad(0), math.rad(90)), 0.1) | |
1557 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -.34, -0.7) * CFrame.Angles(math.rad(-25), math.rad(0), math.rad(0)), 0.1) | |
1558 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -.34, -0.7) * CFrame.Angles(math.rad(-25), math.rad(0), math.rad(0)), 0.1) | |
1559 | position.Position = homed.Torso.Position + Vector3.new(0,2,0) | |
1560 | end | |
1561 | local bodvol=Instance.new("BodyVelocity") | |
1562 | bodvol.velocity= RootPart.CFrame.lookVector*240 + Vector3.new(0,30,0) | |
1563 | bodvol.P= 35200 | |
1564 | bodvol.maxForce=Vector3.new(8e+003, 8e+003, 8e+003) | |
1565 | bodvol.Parent=homed.Head | |
1566 | game:GetService("Debris"):AddItem(bodvol, 0.2) | |
1567 | homed:FindFirstChildOfClass("Humanoid"):TakeDamage(math.random(10,30)) | |
1568 | ||
1569 | position:Destroy() | |
1570 | trail.Enabled = false | |
1571 | SBall:Destroy() | |
1572 | RootPart.Velocity = Vector3.new(0,93.5,0) | |
1573 | coroutine.resume(coroutine.create(function() | |
1574 | for i = 0,5,0.26 do | |
1575 | swait() | |
1576 | Humanoid.CameraOffset = Vector3.new(0,0,0) | |
1577 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1+0.1*i, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)), 0.21) | |
1578 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(22-2*i),math.rad(0),math.rad(0)),.21) | |
1579 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5+0.09*i, 0) * angles(math.rad(20-6*i), math.rad(0), math.rad(90+13*i)), 0.21) | |
1580 | LW.C0 = clerp(LW.C0, CFrame.new(-1.0-0.12*i, 0.5, -0.4+0.05*i) * angles(math.rad(20+13*i), math.rad(0), math.rad(20-13*i)), 0.21) | |
1581 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(math.rad(45+6*i), math.rad(0), math.rad(-22-4*i)), 0.21) | |
1582 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1, 0) * CFrame.Angles(math.rad(45+6*i), math.rad(0), math.rad(22+4*i)), 0.21) | |
1583 | end | |
1584 | homed = nil | |
1585 | attack = false | |
1586 | end)) | |
1587 | ||
1588 | end | |
1589 | ||
1590 | end | |
1591 | ||
1592 | ||
1593 | end | |
1594 | ||
1595 | ||
1596 | ||
1597 | ||
1598 | ||
1599 | ||
1600 | ||
1601 | ||
1602 | ||
1603 | ||
1604 | ||
1605 | ||
1606 | ||
1607 | ||
1608 | ||
1609 | ||
1610 | ||
1611 | ||
1612 | ||
1613 | ||
1614 | ||
1615 | ||
1616 | ||
1617 | mouse.KeyDown:connect(function(key) | |
1618 | wait(0.16) | |
1619 | if string.byte(key) == 32 and hitfloor == nil and attack == false and walljump == false and Humanoid.Jump == true then | |
1620 | walljumpp() | |
1621 | end | |
1622 | if string.byte(key) == 32 and hitfloor == nil and attack == false and walljump == false and Humanoid.Jump == true then | |
1623 | home() | |
1624 | end | |
1625 | ||
1626 | if string.byte(key) == 32 and hitfloor == nil and attack == true and walljump == true then | |
1627 | walljump = false | |
1628 | end | |
1629 | end) | |
1630 | ||
1631 | ||
1632 | ||
1633 | ||
1634 | mouse.KeyDown:connect(function(key) | |
1635 | if key == 'm' and attack == false then | |
1636 | changemusic() | |
1637 | end | |
1638 | end) | |
1639 | ||
1640 | ||
1641 | ||
1642 | ||
1643 | ||
1644 | ||
1645 | mouse.KeyUp:connect(function(key) | |
1646 | wait(0.05) | |
1647 | if key == 'c' and sliding == true then | |
1648 | sliding = false | |
1649 | end | |
1650 | end) | |
1651 | local look = 0 | |
1652 | ||
1653 | ||
1654 | ||
1655 | while true do | |
1656 | swait() | |
1657 | sine = sine + change | |
1658 | --speed = speed + music.PlaybackLoudness/90 | |
1659 | local torvel=(RootPart.Velocity*Vector3.new(1,0,1)).magnitude | |
1660 | local velderp=RootPart.Velocity.y | |
1661 | hitfloor,posfloor=rayCast(RootPart.Position,(CFrame.new(RootPart.Position,RootPart.Position - Vector3.new(0,1,0))).lookVector,4,Character) | |
1662 | ||
1663 | local TiltVelocity = CFrame.new(RootPart.CFrame:vectorToObjectSpace(RootPart.Velocity)) | |
1664 | ||
1665 | local rlegray = Ray.new(RightLeg.Position+Vector3.new(0,0.54,0),Vector3.new(0, -1.75, 0)) | |
1666 | local rlegpart, rlegendPoint = workspace:FindPartOnRay(rlegray, Character) | |
1667 | ||
1668 | local llegray = Ray.new(LeftLeg.Position+Vector3.new(0,0.54,0),Vector3.new(0, -1.75, 0)) | |
1669 | local llegpart, llegendPoint = workspace:FindPartOnRay(llegray, Character) | |
1670 | ||
1671 | local waterthing = Ray.new(RootPart.CFrame.p,Vector3.new(0,-1,0)) | |
1672 | local start, position = workspace:FindPartOnRay(waterthing, character) | |
1673 | ||
1674 | if start ~= nil and start.Material == "Water" then | |
1675 | ||
1676 | RootPart.Velocity = RootPart.Velocity + Vector3.new(0,6,0) | |
1677 | ||
1678 | end | |
1679 | ||
1680 | Head.Running.Pitch = 0.76 + Humanoid.WalkSpeed/124 | |
1681 | if torvel<1 and Swing == 2 then | |
1682 | boost = false | |
1683 | elseif torvel>1 and Swing == 2 then | |
1684 | boost = true | |
1685 | freefall = 0 | |
1686 | end | |
1687 | if hitfloor ~= nil and freefall < 150 then | |
1688 | freefall = 0 | |
1689 | end | |
1690 | if freefall > 150 and hitfloor ~= nil then | |
1691 | land() | |
1692 | freefall = 0 | |
1693 | end | |
1694 | ||
1695 | ||
1696 | ||
1697 | ||
1698 | ||
1699 | ||
1700 | ||
1701 | if RootPart.Velocity.y > 1 and hitfloor==nil then | |
1702 | Anim="Jump" | |
1703 | ||
1704 | ||
1705 | ||
1706 | ||
1707 | ||
1708 | if attack==false then | |
1709 | change = 1 | |
1710 | look = 0 | |
1711 | Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(0,0,0),0.15) | |
1712 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(math.rad(4), math.rad(0), math.rad(0)), 0.07) | |
1713 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-10+2.05*math.cos(sine/5)),math.rad(0),math.rad(0)),0.07) | |
1714 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-20+2.05*math.cos(sine/5)), math.rad(-10), math.rad(50-2.05*math.cos(sine/5))), 0.07) | |
1715 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-20+2.05*math.cos(sine/5)), math.rad(-10), math.rad(-50+2.05*math.cos(sine/5))), 0.07) | |
1716 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1, -0.6) * CFrame.Angles(math.rad(-25+3.05*math.cos(sine/5)), math.rad(-3), math.rad(0)), 0.1) | |
1717 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -.47, -0.7) * CFrame.Angles(math.rad(-12+3.05*math.cos(sine/5)), math.rad(0), math.rad(0)), 0.1) | |
1718 | end | |
1719 | ||
1720 | elseif RootPart.Velocity.y < -1 and freefall <150 and hitfloor==nil then | |
1721 | Anim="Fall" | |
1722 | change = 1 | |
1723 | freefall = freefall +0.77 | |
1724 | ||
1725 | ||
1726 | if attack==false then | |
1727 | Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(0,0,0),0.15) | |
1728 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0.2) * CFrame.Angles(math.rad(7+4*math.sin(sine/1.3)), math.rad(0), math.rad(0)),0.07) | |
1729 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.65, 0) * angles(math.rad(0), math.rad(0), math.rad(140+12*math.cos(sine/1.3))), 0.07) | |
1730 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.65, 0) * angles(math.rad(0), math.rad(0), math.rad(-140+12*math.cos(sine/1.3))), 0.07) | |
1731 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(40+7*math.sin(sine/1.3)),math.rad(0),math.rad(0)),0.07) | |
1732 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1+0.17*math.cos(sine/1.3), -0.13) * CFrame.Angles(math.rad(18+7*math.cos(sine/1.3)), math.rad(3), math.rad(0)), 0.1) | |
1733 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -.37+0.17*math.cos(sine/1.3), -0.2) * CFrame.Angles(math.rad(32+7*math.cos(sine/1.3)), math.rad(0), math.rad(0)), 0.1) | |
1734 | end | |
1735 | ||
1736 | ||
1737 | ||
1738 | elseif RootPart.Velocity.y < -1 and freefall > 150 and hitfloor==nil then | |
1739 | Anim="FreeFall" | |
1740 | change = 1 | |
1741 | ||
1742 | ||
1743 | if attack==false then | |
1744 | Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(0,0,0),0.15) | |
1745 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1, 0.2) * CFrame.Angles(math.rad(-90+3*math.sin(sine/1.3)), math.rad(0), math.rad(0)),0.07) | |
1746 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(14+12*math.cos(sine/1.3)), math.rad(0), math.rad(110)), 0.07) | |
1747 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(14+12*math.cos(sine/1.3)), math.rad(0), math.rad(-110)), 0.07) | |
1748 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-12+7*math.sin(sine/1.3)),math.rad(0),math.rad(0)),0.07) | |
1749 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1+0.17*math.cos(sine/1.3),0.2) * CFrame.Angles(math.rad(-12+4*math.cos(sine/1.3)), math.rad(3), math.rad(-46)), 0.1) | |
1750 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1+0.17*math.cos(sine/1.3), 0.2) * CFrame.Angles(math.rad(-12+4*math.cos(sine/1.3)), math.rad(0), math.rad(46)), 0.1) | |
1751 | end | |
1752 | ||
1753 | elseif torvel<1 and hitfloor~=nil then | |
1754 | Anim="Idle" | |
1755 | change = 1 | |
1756 | if attack==false and equip == false then | |
1757 | ||
1758 | Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(0,0,0),0.15) | |
1759 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1-0.04*math.cos(sine/40), -0) * CFrame.Angles(math.rad(0-0.81*math.cos(sine/40)), math.rad(-40), math.rad(0)), 0.1) | |
1760 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(0+2.6*math.sin(sine/40)),math.rad(0),math.rad(40)),0.1) | |
1761 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.55+0.04*math.sin(sine/40), 0-0.04*math.cos(sine/40)) * angles(math.rad(-2+1.3*math.cos(sine/40)), math.rad(0+4*math.sin(sine/40)), math.rad(6.3+2.2*math.cos(sine/40))),0.1) | |
1762 | LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.55+0.04*math.sin(sine/40), 0-0.04*math.cos(sine/40)) * angles(math.rad(2+1.3*math.cos(sine/40)), math.rad(0-4*math.sin(sine/40)), math.rad(-6.3-2.2*math.cos(sine/40))),0.1) | |
1763 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, llegendPoint.Y-LeftLeg.Position.Y+0.04*math.cos(sine/40), 0) * CFrame.Angles(math.rad(0+0.81*math.cos(sine/40)), math.rad(18+0.81*math.cos(sine/40)), math.rad(-2-0.81*math.cos(sine/40))),0.1) | |
1764 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.57, rlegendPoint.Y-RightLeg.Position.Y+0.04*math.cos(sine/40), 0) * CFrame.Angles(math.rad(0+0.81*math.cos(sine/40)), math.rad(-2+0.81*math.cos(sine/40)), math.rad(3-0.81*math.cos(sine/40))),0.1) | |
1765 | end | |
1766 | ||
1767 | ||
1768 | ||
1769 | elseif torvel>1.5 and torvel<70 and hitfloor~=nil then | |
1770 | Anim="Walk" | |
1771 | change = 0.84+ Character.Humanoid.WalkSpeed/132 | |
1772 | look = 0 | |
1773 | if attack==false and equip == false then | |
1774 | Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(0,0,0),0.02) | |
1775 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1-0.52*math.cos(sine/2), -.8) * angles(math.rad(-26), math.rad(0), math.rad(0)+ RootPart.RotVelocity.Y / 26), .1) | |
1776 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-11+20*math.sin(sine/2)),math.rad(0),math.rad(0+5*math.sin(sine/4)) + RootPart.RotVelocity.Y / 13),.1) | |
1777 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0.1) * angles(math.rad(-60-7*math.sin(sine/4))+ RootPart.RotVelocity.Y / -34, math.rad(0), math.rad(15+2*math.sin(sine/4))- RootPart.RotVelocity.Y / 34),.15) | |
1778 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0.1)*angles(math.rad(-60-7*math.sin(sine/4))+ RootPart.RotVelocity.Y / 34,math.rad(0),math.rad(-15+2*math.sin(sine/4))+ RootPart.RotVelocity.Y / -34),.15) | |
1779 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1+0.28*math.cos(sine/4), 0-0.32*math.cos(sine/4)) * CFrame.Angles(math.rad(0+104*math.sin(sine/4)), math.rad(0)+ RootPart.RotVelocity.Y / 42, math.rad(0)+ RootPart.RotVelocity.Y / -54), 0.3) | |
1780 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1-0.28*math.cos(sine/4),0+0.32*math.cos(sine/4)) * CFrame.Angles(math.rad(0-104*math.sin(sine/4)), math.rad(0)+ RootPart.RotVelocity.Y / 42, math.rad(0)- RootPart.RotVelocity.Y / 54), 0.3) | |
1781 | end | |
1782 | ||
1783 | ||
1784 | elseif torvel>=70 and torvel<200 and hitfloor~=nil then | |
1785 | Anim="Run" | |
1786 | change = 0.84+ Character.Humanoid.WalkSpeed/142 | |
1787 | if attack==false and equip == false then | |
1788 | Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(0,0,0),0.02) | |
1789 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1-0.52*math.cos(sine/1.5), -.8) * angles(math.rad(-37), math.rad(0), math.rad(0)+ RootPart.RotVelocity.Y / 26), .1) | |
1790 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-11+25*math.sin(sine/1.5)),math.rad(0),math.rad(0+5*math.sin(sine/3)) + RootPart.RotVelocity.Y / 13),.1) | |
1791 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0.3) * angles(math.rad(-72-8*math.sin(sine/1.5))+ RootPart.RotVelocity.Y / -34, math.rad(0), math.rad(1+0*math.cos(sine/3))- RootPart.RotVelocity.Y / 34),.25) | |
1792 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0.3)*angles(math.rad(-72-8*math.sin(sine/1.5))+ RootPart.RotVelocity.Y / 34,math.rad(0),math.rad(-1+0*math.cos(sine/3))+ RootPart.RotVelocity.Y / -34),.25) | |
1793 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1+0.32*math.cos(sine/3), 0-0.42*math.cos(sine/3)) * CFrame.Angles(math.rad(0+134*math.sin(sine/3)), math.rad(0)+ RootPart.RotVelocity.Y / 42, math.rad(0)+ RootPart.RotVelocity.Y / -54), 0.44) | |
1794 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1-0.32*math.cos(sine/3),0+0.42*math.cos(sine/3)) * CFrame.Angles(math.rad(0-134*math.sin(sine/3)), math.rad(0)+ RootPart.RotVelocity.Y / 42, math.rad(0)- RootPart.RotVelocity.Y / 54), 0.44) | |
1795 | end | |
1796 | ||
1797 | --[[ | |
1798 | if attack==false then | |
1799 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1-0.4*math.cos(sine/5.5)/2, 0 *math.sin(sine/6.6)/2) * CFrame.Angles(math.rad(0) + -math.sin(sine/5.5)/1.2, math.rad(0), 0), .8) | |
1800 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1+0.4*math.cos(sine/5.5)/2,0 *-math.sin(sine/6.6)/2) * CFrame.Angles(math.rad(0) + math.sin(sine/5.5)/1.2, math.rad(0), 0), .8) | |
1801 | end | |
1802 | ]] | |
1803 | if attack==true and noleg == false then | |
1804 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1-0.24*math.cos(sine/5), 0.+0.24*math.cos(sine/5)) * CFrame.Angles(math.rad(0-74*math.sin(sine/5)), math.rad(0), math.rad(0)), 0.3) | |
1805 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1+0.24*math.cos(sine/5),0.-0.24*math.cos(sine/5)) * CFrame.Angles(math.rad(0+74*math.sin(sine/5)), math.rad(0), math.rad(0)), 0.3) | |
1806 | end | |
1807 | ||
1808 | ||
1809 | ||
1810 | elseif torvel>=200 and hitfloor~=nil then | |
1811 | Anim="MachRun" | |
1812 | change = 0.84+ Character.Humanoid.WalkSpeed/182 | |
1813 | if attack==false and equip == false then | |
1814 | Humanoid.CameraOffset = Humanoid.CameraOffset:lerp(Vector3.new(0,0,0),0.02) | |
1815 | Torso.Weld.C0 = clerp(Torso.Weld.C0, CFrame.new(0, -1-0.52*math.cos(sine/1), -3.8) * angles(math.rad(-44), math.rad(0), math.rad(0)+ RootPart.RotVelocity.Y / 26), .2) | |
1816 | Torso.Neck.C0 = clerp(Torso.Neck.C0,necko *angles(math.rad(-11+25*math.sin(sine/1)),math.rad(0),math.rad(0+5*math.sin(sine/2)) + RootPart.RotVelocity.Y / 13),.2) | |
1817 | RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0.5) * angles(math.rad(-78-12*math.sin(sine/1))+ RootPart.RotVelocity.Y / -34, math.rad(0), math.rad(-24+0*math.cos(sine/2))- RootPart.RotVelocity.Y / 34),.35) | |
1818 | LW.C0=clerp(LW.C0,cf(-1.5,0.5,0.5)*angles(math.rad(-78-12*math.sin(sine/1))+ RootPart.RotVelocity.Y / 34,math.rad(0),math.rad(24+0*math.cos(sine/2))+ RootPart.RotVelocity.Y / -34),.35) | |
1819 | LeftLeg.Weld.C0 = clerp(LeftLeg.Weld.C0, CFrame.new(-0.5, -1+0.42*math.cos(sine/2), 0-0.62*math.cos(sine/2)) * CFrame.Angles(math.rad(0+134*math.sin(sine/2)), math.rad(0)+ RootPart.RotVelocity.Y / 42, math.rad(0)+ RootPart.RotVelocity.Y / -54), 0.52) | |
1820 | RightLeg.Weld.C0 = clerp(RightLeg.Weld.C0, CFrame.new(0.5, -1-0.42*math.cos(sine/2),0+0.62*math.cos(sine/2)) * CFrame.Angles(math.rad(0-134*math.sin(sine/2)), math.rad(0)+ RootPart.RotVelocity.Y / 42, math.rad(0)- RootPart.RotVelocity.Y / 54), 0.52) | |
1821 | end | |
1822 | ||
1823 | ||
1824 | ||
1825 | end | |
1826 | ||
1827 | ||
1828 | ||
1829 | ||
1830 | ||
1831 | ||
1832 | ||
1833 | ||
1834 | ||
1835 | if 0 < #Effects then | |
1836 | for e = 1, #Effects do | |
1837 | if Effects[e] ~= nil then | |
1838 | local Thing = Effects[e] | |
1839 | if Thing ~= nil then | |
1840 | local Part = Thing[1] | |
1841 | local Mode = Thing[2] | |
1842 | local Delay = Thing[3] | |
1843 | local IncX = Thing[4] | |
1844 | local IncY = Thing[5] | |
1845 | local IncZ = Thing[6] | |
1846 | if Thing[1].Transparency <= 1 then | |
1847 | if Thing[2] == "Block1" then | |
1848 | Thing[1].CFrame = Thing[1].CFrame * euler(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
1849 | Mesh = Thing[1]:FindFirstChild("Mesh") | |
1850 | if not Mesh then | |
1851 | Mesh = Instance.new("BlockMesh") | |
1852 | end | |
1853 | Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6]) | |
1854 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1855 | elseif Thing[2] == "Cylinder" then | |
1856 | Mesh = Thing[1]:FindFirstChild("Mesh") | |
1857 | if not Mesh then | |
1858 | Mesh = Instance.new("BlockMesh") | |
1859 | end | |
1860 | Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6]) | |
1861 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1862 | elseif Thing[2] == "Blood" then | |
1863 | Mesh = Thing[1]:FindFirstChild("Mesh") | |
1864 | if not Mesh then | |
1865 | Mesh = Instance.new("BlockMesh") | |
1866 | end | |
1867 | Thing[1].CFrame = Thing[1].CFrame * cf(0, 0.5, 0) | |
1868 | Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6]) | |
1869 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1870 | elseif Thing[2] == "Elec" then | |
1871 | Mesh = Thing[1]:FindFirstChild("Mesh") | |
1872 | if not Mesh then | |
1873 | Mesh = Instance.new("BlockMesh") | |
1874 | end | |
1875 | Mesh.Scale = Mesh.Scale + vt(Thing[7], Thing[8], Thing[9]) | |
1876 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1877 | elseif Thing[2] == "Disappear" then | |
1878 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
1879 | end | |
1880 | else | |
1881 | Part.Parent = nil | |
1882 | game:GetService("Debris"):AddItem(Part, 0) | |
1883 | table.remove(Effects, e) | |
1884 | end | |
1885 | end | |
1886 | end | |
1887 | end | |
1888 | end | |
1889 | ||
1890 | end |