SHOW:
|
|
- or go back to the newest paste.
| 1 | --[[ World eater Script ]]-- | |
| 2 | --[[ Declarations ]]-- | |
| 3 | ||
| 4 | - | local Player = game:GetService("Players").LocalPlayer
|
| 4 | + | |
| 5 | -- This script has been converted to FE by iPxter | |
| 6 | ||
| 7 | ||
| 8 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
| |
| 9 | local Player,Mouse,mouse,UserInputService,ContextActionService = owner | |
| 10 | do | |
| 11 | print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
| |
| 12 | script.Parent = Player.Character | |
| 13 | ||
| 14 | - | local Mouse = Player:GetMouse() |
| 14 | + | --RemoteEvent for communicating |
| 15 | local Event = Instance.new("RemoteEvent")
| |
| 16 | Event.Name = "UserInput_Event" | |
| 17 | ||
| 18 | --Fake event to make stuff like Mouse.KeyDown work | |
| 19 | local function fakeEvent() | |
| 20 | local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
| |
| 21 | t.connect = t.Connect | |
| 22 | return t | |
| 23 | end | |
| 24 | ||
| 25 | --Creating fake input objects with fake variables | |
| 26 | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
| |
| 27 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
| |
| 28 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
| |
| 29 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
| |
| 30 | end} | |
| 31 | --Merged 2 functions into one by checking amount of arguments | |
| 32 | CAS.UnbindAction = CAS.BindAction | |
| 33 | ||
| 34 | --This function will trigger the events that have been :Connect()'ed | |
| 35 | local function te(self,ev,...) | |
| 36 | local t = m[ev] | |
| 37 | if t and t._fakeEvent and t.Function then | |
| 38 | t.Function(...) | |
| 39 | end | |
| 40 | end | |
| 41 | m.TrigEvent = te | |
| 42 | UIS.TrigEvent = te | |
| 43 | ||
| 44 | Event.OnServerEvent:Connect(function(plr,io) | |
| 45 | if plr~=Player then return end | |
| 46 | if io.isMouse then | |
| 47 | m.Target = io.Target | |
| 48 | m.Hit = io.Hit | |
| 49 | else | |
| 50 | local b = io.UserInputState == Enum.UserInputState.Begin | |
| 51 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
| 52 | return m:TrigEvent(b and "Button1Down" or "Button1Up") | |
| 53 | end | |
| 54 | for _,t in pairs(CAS.Actions) do | |
| 55 | for _,k in pairs(t.Keys) do | |
| 56 | if k==io.KeyCode then | |
| 57 | t.Function(t.Name,io.UserInputState,io) | |
| 58 | end | |
| 59 | end | |
| 60 | end | |
| 61 | m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
| 62 | UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) | |
| 63 | end | |
| 64 | end) | |
| 65 | Event.Parent = NLS([==[ | |
| 66 | local Player = game:GetService("Players").LocalPlayer
| |
| 67 | local Event = script:WaitForChild("UserInput_Event")
| |
| 68 | ||
| 69 | local UIS = game:GetService("UserInputService")
| |
| 70 | local input = function(io,a) | |
| 71 | if a then return end | |
| 72 | --Since InputObject is a client-side instance, we create and pass table instead | |
| 73 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
| |
| 74 | end | |
| 75 | UIS.InputBegan:Connect(input) | |
| 76 | UIS.InputEnded:Connect(input) | |
| 77 | ||
| 78 | local Mouse = Player:GetMouse() | |
| 79 | local h,t | |
| 80 | --Give the server mouse data 30 times every second, but only if the values changed | |
| 81 | --If player is not moving their mouse, client won't fire events | |
| 82 | while wait(1/30) do | |
| 83 | if h~=Mouse.Hit or t~=Mouse.Target then | |
| 84 | h,t=Mouse.Hit,Mouse.Target | |
| 85 | Event:FireServer({isMouse=true,Target=t,Hit=h})
| |
| 86 | end | |
| 87 | end]==],Player.Character) | |
| 88 | Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS | |
| 89 | end | |
| 90 | ||
| 91 | wait(.0000000000000000000001) | |
| 92 | local Player = owner | |
| 93 | local Character = Player.Character | |
| 94 | local Head = Character.Head | |
| 95 | local Torso = Character.Torso | |
| 96 | local Right_Arm = Character["Right Arm"] | |
| 97 | local Right_Leg = Character["Right Leg"] | |
| 98 | local Left_Arm = Character["Left Arm"] | |
| 99 | local Left_Leg = Character["Left Leg"] | |
| 100 | local Humanoid = Character.Humanoid | |
| 101 | local Animation = "Idle" | |
| 102 | local LeftShoulder = Torso["Left Shoulder"] | |
| 103 | local Left_Hip = Torso["Left Hip"] | |
| 104 | local RightShoulder = Torso["Right Shoulder"] | |
| 105 | local Right_Hip = Torso["Right Hip"] | |
| 106 | local Root = Character.HumanoidRootPart | |
| 107 | local RootJoint = Root.RootJoint | |
| 108 | local Attacking = false | |
| 109 | local CanAttack = true | |
| 110 | local Anim = "Idle" | |
| 111 | local Combo = 1 | |
| 112 | local Blocking = false | |
| 113 | local MaxDestruction = 1000 | |
| 114 | local Destruction = 0 | |
| 115 | local MaxBlock = 100 | |
| 116 | local Effects = {}
| |
| 117 | local Color = "Bright yellow" | |
| 118 | local Invert = false | |
| 119 | local Idle = 0 | |
| 120 | local Equipped = false | |
| 121 | local Running = false | |
| 122 | local Unseathed = false | |
| 123 | local Shard = "None" | |
| 124 | ||
| 125 | Humanoid.MaxHealth = 3000 | |
| 126 | Humanoid.Health = 3000 | |
| 127 | ||
| 128 | local WorldEaterTheme = Instance.new("Sound",Character)
| |
| 129 | WorldEaterTheme.Name = "WorldEaterTheme" | |
| 130 | WorldEaterTheme.Looped = true | |
| 131 | WorldEaterTheme.SoundId = "http://www.roblox.com/asset?id=149981769" | |
| 132 | WorldEaterTheme:Play() | |
| 133 | ||
| 134 | Left_Shoulder = Instance.new("Weld", Torso)
| |
| 135 | Left_Shoulder.Part0 = Torso | |
| 136 | Left_Shoulder.Part1 = Left_Arm | |
| 137 | Left_Shoulder.Name = "Left Shoulder" | |
| 138 | Left_Shoulder.C0 = CFrame.new(-1.5,0,0) | |
| 139 | ||
| 140 | Right_Shoulder = Instance.new("Weld", Torso)
| |
| 141 | Right_Shoulder.Part0 = Torso | |
| 142 | Right_Shoulder.Part1 = Right_Arm | |
| 143 | Right_Shoulder.Name = "Right Shoulder" | |
| 144 | Right_Shoulder.C0 = CFrame.new(1.5,0,0) | |
| 145 | ||
| 146 | LeftShoulder.Parent = nil | |
| 147 | RightShoulder.Parent = nil | |
| 148 | Humanoid.WalkSpeed = 10 | |
| 149 | ||
| 150 | local RootCFrame = CFrame.fromEulerAnglesXYZ(-1.57,0,3.14) | |
| 151 | Necko = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
| 152 | Necko2 = CFrame.new(0, -0.5, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
| 153 | Right_Hip_C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) | |
| 154 | Left_Hip_C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) | |
| 155 | ||
| 156 | ||
| 157 | Movemment = 1 | |
| 158 | Walk = 0 | |
| 159 | ||
| 160 | Animator = Humanoid.Animator | |
| 161 | --Animate = Character.Animate | |
| 162 | ||
| 163 | Animator.Parent = nil | |
| 164 | --Animate.Parent = nil | |
| 165 | ||
| 166 | local Services = {
| |
| 167 | ||
| 168 | SoundService = game:GetService("SoundService");
| |
| 169 | Players = game:GetService("Players");
| |
| 170 | Debris = game:GetService("Debris");
| |
| 171 | Workspace = game:GetService("Workspace");
| |
| 172 | Lighting = game:GetService("Lighting");
| |
| 173 | HttpService = game:GetService("HttpService");
| |
| 174 | InsertService = game:GetService("InsertService");
| |
| 175 | ||
| 176 | } | |
| 177 | ||
| 178 | local ManaBarGUI = Instance.new("ScreenGui", Player.PlayerGui)
| |
| 179 | ManaBarGUI.Name = "ManaBarGUI" | |
| 180 | ||
| 181 | local ManaBarP1 = Instance.new("Frame", ManaBarGUI)
| |
| 182 | ManaBarP1.Name = "ManaBarPart1" | |
| 183 | ManaBarP1.Size = UDim2.new(0,300,0,20) | |
| 184 | ManaBarP1.Position = UDim2.new(0,350,0.1,0) | |
| 185 | ManaBarP1.BackgroundColor3 = BrickColor.Black().Color | |
| 186 | ||
| 187 | local ManaBarP2 = Instance.new("Frame", ManaBarP1)
| |
| 188 | ManaBarP2.Name = "ManaBarPart2" | |
| 189 | ManaBarP2.Size = UDim2.new(0,300,0,20) | |
| 190 | ManaBarP2.Position = UDim2.new(0,0,0,0) | |
| 191 | ManaBarP2.BackgroundColor3 = BrickColor.new("Black").Color
| |
| 192 | ||
| 193 | local ManaBarText = Instance.new("TextLabel", ManaBarP1)
| |
| 194 | ManaBarText.Name = "ManaBarText" | |
| 195 | ManaBarText.Size = UDim2.new(0,300,0,20) | |
| 196 | ManaBarText.Position = UDim2.new(0,0,-1.5,0) | |
| 197 | ManaBarText.TextScaled = true | |
| 198 | ManaBarText.Text = "<{[ Destruction ]}> 0 <{[ Destruction ]}>"
| |
| 199 | ManaBarText.BackgroundTransparency = 1 | |
| 200 | ManaBarText.TextStrokeTransparency = 0 | |
| 201 | ManaBarText.TextStrokeColor3 = Color3.new(1,1,1) | |
| 202 | ManaBarText.TextColor3 = Color3.new(0,0,0) | |
| 203 | ManaBarText.Font = "Garamond" | |
| 204 | ||
| 205 | local WorldEaterGui = Instance.new("BillboardGui", Head)
| |
| 206 | WorldEaterGui.ExtentsOffset = Vector3.new(0,5,0) | |
| 207 | WorldEaterGui.Adornee = Head | |
| 208 | WorldEaterGui.AlwaysOnTop = true | |
| 209 | WorldEaterGui.Enabled = true | |
| 210 | WorldEaterGui.Size = UDim2.new(0, 200,0, 50) | |
| 211 | ||
| 212 | local WorldEaterText = Instance.new("TextLabel", WorldEaterGui)
| |
| 213 | WorldEaterText.BackgroundTransparency = 1 | |
| 214 | WorldEaterText.Font = "Garamond" | |
| 215 | WorldEaterText.Size = UDim2.new(0, 200,0, 50) | |
| 216 | WorldEaterText.TextStrokeColor3 = BrickColor.Red().Color | |
| 217 | WorldEaterText.TextStrokeTransparency = 0 | |
| 218 | WorldEaterText.TextColor3 = BrickColor.Black().Color | |
| 219 | WorldEaterText.TextScaled = true | |
| 220 | WorldEaterText.Text = "World Eater" | |
| 221 | ||
| 222 | --------[[ Mesh Ids ]]-------- | |
| 223 | ||
| 224 | SpikeMeshId = 1033714 | |
| 225 | SpikeBallId = 9982590 | |
| 226 | StarMeshId = 45428961 | |
| 227 | CrystalMeshId = 9756362 | |
| 228 | ||
| 229 | --[[ Essential Functions ]]-- | |
| 230 | function NoOutlines(Part) | |
| 231 | Part.TopSurface,Part.BottomSurface,Part.LeftSurface,Part.RightSurface,Part.FrontSurface,Part.BackSurface = 10,10,10,10,10,10 | |
| 232 | end | |
| 233 | ||
| 234 | ||
| 235 | local CreatePart = function(Parent, Name, Color, Size, Material, Transparency, Shape) | |
| 236 | ||
| 237 | local Part = Instance.new("Part", Parent)
| |
| 238 | Part.Name = Name | |
| 239 | Part.BrickColor = BrickColor.new(Color) | |
| 240 | Part.Size = Size | |
| 241 | Part.Material = Material | |
| 242 | Part.Transparency = Transparency | |
| 243 | Part.Shape = Shape | |
| 244 | Part.CanCollide = false | |
| 245 | NoOutlines(Part) | |
| 246 | ||
| 247 | return Part | |
| 248 | ||
| 249 | end | |
| 250 | ||
| 251 | local CreateMesh = function(Parent, Scale, Shape) | |
| 252 | ||
| 253 | ||
| 254 | local Mesh = Instance.new("BlockMesh", Parent)
| |
| 255 | Mesh.Scale = Scale | |
| 256 | ||
| 257 | return Mesh | |
| 258 | ||
| 259 | end | |
| 260 | ||
| 261 | local CreateWedge = function(Parent, Name, Color, Size, Material, Transparency) | |
| 262 | ||
| 263 | local WedgePart = Instance.new("WedgePart", Parent)
| |
| 264 | WedgePart.Name = Name | |
| 265 | WedgePart.BrickColor = BrickColor.new(Color) | |
| 266 | WedgePart.Size = Size | |
| 267 | WedgePart.Material = Material | |
| 268 | WedgePart.Transparency = Transparency | |
| 269 | WedgePart.CanCollide = false | |
| 270 | NoOutlines(WedgePart) | |
| 271 | ||
| 272 | return WedgePart | |
| 273 | ||
| 274 | end | |
| 275 | ||
| 276 | local CreateWeld = function(Parent, Cframe, P1 , P0) | |
| 277 | ||
| 278 | local Weld = Instance.new("Weld", Parent)
| |
| 279 | Weld.Part0 = P0 | |
| 280 | Weld.Part1 = P1 | |
| 281 | Weld.Name = P0.Name .. "To" .. P1.Name | |
| 282 | Weld.C0 = Cframe | |
| 283 | ||
| 284 | return Weld | |
| 285 | ||
| 286 | end | |
| 287 | ||
| 288 | local CreateVelocity = function(Parent,Velocity,Force) | |
| 289 | ||
| 290 | local BodyVelocity = Instance.new("BodyVelocity", Parent)
| |
| 291 | BodyVelocity.Velocity = Velocity | |
| 292 | BodyVelocity.MaxForce = Force | |
| 293 | ||
| 294 | ||
| 295 | ||
| 296 | return BodyVelocity | |
| 297 | ||
| 298 | end | |
| 299 | ||
| 300 | ||
| 301 | local CreateCrystal = function(Parent, Name, Color, Size, Material, Transparency, Scale) | |
| 302 | ||
| 303 | ||
| 304 | local Part = Instance.new("Part", Parent)
| |
| 305 | Part.Name = Name | |
| 306 | Part.BrickColor = BrickColor.new(Color) | |
| 307 | Part.Size = Size | |
| 308 | Part.Material = Material | |
| 309 | Part.Transparency = Transparency | |
| 310 | Part.CanCollide = false | |
| 311 | NoOutlines(Part) | |
| 312 | ||
| 313 | local Mesh = Instance.new("SpecialMesh", Part)
| |
| 314 | Mesh.MeshId = "http://www.roblox.com/asset?id=" .. CrystalMeshId | |
| 315 | Mesh.Scale = Scale | |
| 316 | ||
| 317 | return Mesh and Part | |
| 318 | ||
| 319 | end | |
| 320 | ||
| 321 | local MakeSFX = function(Parent, Id, Volume, Pitch, Type) | |
| 322 | ||
| 323 | local SFX = Instance.new("Sound", Parent)
| |
| 324 | SFX.SoundId = "http://www.roblox.com/asset?id=" .. Id | |
| 325 | SFX.Name = "SFX" | |
| 326 | SFX:Play() | |
| 327 | SFX.Volume = Volume | |
| 328 | SFX.Pitch = Pitch | |
| 329 | SFX.PlayOnRemove = true | |
| 330 | SFX:Remove() | |
| 331 | ||
| 332 | if Type == "Echo" then | |
| 333 | ||
| 334 | Instance.new("EchoSoundEffect", SFX)
| |
| 335 | ||
| 336 | end | |
| 337 | ||
| 338 | end | |
| 339 | ||
| 340 | local CreateSpike = function(Parent, Name, Color, Size, Material, Transparency, Scale) | |
| 341 | ||
| 342 | ||
| 343 | local Part = Instance.new("Part", Parent)
| |
| 344 | Part.Name = Name | |
| 345 | Part.BrickColor = BrickColor.new(Color) | |
| 346 | Part.Size = Size | |
| 347 | Part.Material = Material | |
| 348 | Part.Transparency = Transparency | |
| 349 | Part.CanCollide = false | |
| 350 | NoOutlines(Part) | |
| 351 | ||
| 352 | local Mesh = Instance.new("SpecialMesh", Part)
| |
| 353 | Mesh.MeshId = "http://www.roblox.com/asset?id=" .. SpikeMeshId | |
| 354 | Mesh.Scale = Scale | |
| 355 | ||
| 356 | return Mesh and Part | |
| 357 | ||
| 358 | end | |
| 359 | ||
| 360 | CircleEffect = function(Position, Parent, DSX, DSY, DSZ, SX, SY, SZ, Time, Brickcolor, Material, Transparency) | |
| 361 | ||
| 362 | local Part = Instance.new("Part", Parent)
| |
| 363 | Part.Transparency = Transparency | |
| 364 | Part.Name = "CircleEffect" | |
| 365 | Part.Size = Vector3.new() | |
| 366 | Part.Anchored = true | |
| 367 | Part.CanCollide = false | |
| 368 | Part.Position = Position | |
| 369 | Part.BrickColor = BrickColor.new(Brickcolor) | |
| 370 | Part.Material = Material | |
| 371 | NoOutlines(Part) | |
| 372 | ||
| 373 | local Mesh = Instance.new("SpecialMesh", Part)
| |
| 374 | Mesh.MeshType = "Sphere" | |
| 375 | Mesh.Scale = Vector3.new(DSX, DSY, DSZ) | |
| 376 | ||
| 377 | Services.Debris:AddItem(Part, Time) | |
| 378 | ||
| 379 | ||
| 380 | table.insert(Effects, {Part, "Circle", Time, SX, SY, SZ})
| |
| 381 | ||
| 382 | ||
| 383 | end | |
| 384 | ||
| 385 | BlockEffect = function(Position, Parent, DSX, DSY, DSZ, SX, SY, SZ, Time, Brickcolor, Material, Transparency) | |
| 386 | ||
| 387 | local Part = Instance.new("Part", Parent)
| |
| 388 | Part.Transparency = Transparency | |
| 389 | Part.Name = "BlockEffect" | |
| 390 | Part.Size = Vector3.new() | |
| 391 | Part.Anchored = true | |
| 392 | Part.Position = Position | |
| 393 | Part.CanCollide = false | |
| 394 | Part.BrickColor = BrickColor.new(Brickcolor) | |
| 395 | Part.Material = Material | |
| 396 | NoOutlines(Part) | |
| 397 | ||
| 398 | local Mesh = Instance.new("BlockMesh", Part)
| |
| 399 | Mesh.Scale = Vector3.new(DSX, DSY, DSZ) | |
| 400 | ||
| 401 | Services.Debris:AddItem(Part, Time) | |
| 402 | ||
| 403 | table.insert(Effects, {Part, "Block", Time, SX, SY, SZ})
| |
| 404 | ||
| 405 | ||
| 406 | end | |
| 407 | ||
| 408 | --[[ Damage function ]]-- | |
| 409 | ||
| 410 | ||
| 411 | function DamageFunction(Hit, Part, Type, HitSFX, Knockback, Min, Max) | |
| 412 | ||
| 413 | local HitHumanoid = Hit.Parent.Humanoid | |
| 414 | ||
| 415 | ||
| 416 | local Damage = math.random(Min, Max) | |
| 417 | ||
| 418 | ||
| 419 | coroutine.resume(coroutine.create(function() | |
| 420 | HitHumanoid:TakeDamage(Damage) | |
| 421 | end)) | |
| 422 | ||
| 423 | if Type == "Shrink" then | |
| 424 | MakeSFX(Hit.Parent.Torso, 209527235, 1, 1) | |
| 425 | for i,v in pairs(Hit.Parent:children()) do | |
| 426 | if v:IsA("Part") then
| |
| 427 | coroutine.resume(coroutine.create(function() | |
| 428 | for i = 1,100 do | |
| 429 | wait() | |
| 430 | v.Size = v.Size - Vector3.new(0.05,0.05,0.05) | |
| 431 | v.Transparency = v.Transparency + 0.05 | |
| 432 | ||
| 433 | end | |
| 434 | end)) | |
| 435 | end | |
| 436 | end | |
| 437 | ||
| 438 | end | |
| 439 | ||
| 440 | ||
| 441 | ||
| 442 | if Type == "Normal" then | |
| 443 | ||
| 444 | local Push = CreateVelocity(Hit.Parent.Torso, Torso.CFrame.lookVector * Knockback, Vector3.new(math.huge,math.huge,math.huge)) | |
| 445 | Services.Debris:AddItem(Push, 0) | |
| 446 | DamageLabel(Hit.Parent, Damage, Hit) | |
| 447 | ||
| 448 | elseif Type == "Ranged" then | |
| 449 | local Push = CreateVelocity(Hit.Parent.Torso, Part.CFrame.lookVector * Knockback, Vector3.new(math.huge,math.huge,math.huge)) | |
| 450 | Services.Debris:AddItem(Push, 0) | |
| 451 | DamageLabel(Hit.Parent, Damage, Hit) | |
| 452 | ||
| 453 | elseif Type == "Impale" then | |
| 454 | ||
| 455 | local Spike = CreateSpike(Services.Workspace, "D e a t h", "Black", Vector3.new(), "SmoothPlastic", 0, Vector3.new(1,20,1)) | |
| 456 | Spike.Anchored = true | |
| 457 | Spike.Rotation = Vector3.new(math.random(-50,50), 0 , math.random(-50,50)) | |
| 458 | Spike.Position = Hit.Parent.Torso.Position | |
| 459 | ||
| 460 | ||
| 461 | Services.Debris:AddItem(Spike, 30) | |
| 462 | ||
| 463 | Hit.Parent:BreakJoints() | |
| 464 | Hit.Parent.Torso.Position = Spike.Position + Vector3.new(0,5,0) | |
| 465 | Hit.Parent.Torso.Anchored = true | |
| 466 | ||
| 467 | MakeSFX(Spike, 306247724, 1,1) | |
| 468 | MakeSFX(Hit.Parent.Torso, 209527175, 10,1) | |
| 469 | elseif Type == "Knockdown" then | |
| 470 | ||
| 471 | ||
| 472 | local Push = CreateVelocity(Hit.Parent.Torso, Part.CFrame.lookVector * Knockback, Vector3.new(math.huge,math.huge,math.huge)) | |
| 473 | DamageLabel(Hit.Parent, Damage, Hit) | |
| 474 | Services.Debris:AddItem(Push, 0.3) | |
| 475 | ||
| 476 | coroutine.resume(coroutine.create(function() | |
| 477 | ||
| 478 | HitHumanoid.PlatformStand = true | |
| 479 | wait(1) | |
| 480 | HitHumanoid.PlatformStand = false | |
| 481 | ||
| 482 | ||
| 483 | end)) | |
| 484 | end | |
| 485 | ||
| 486 | if HitSFX == "Penetration" then | |
| 487 | ||
| 488 | MakeSFX(Hit, 199149269, 1 , 1) | |
| 489 | ||
| 490 | elseif HitSFX == "Punch" then | |
| 491 | ||
| 492 | MakeSFX(Hit, 278062209, 1 , 1) | |
| 493 | ||
| 494 | ||
| 495 | ||
| 496 | ||
| 497 | end | |
| 498 | end | |
| 499 | ||
| 500 | function DamageLabel(HitCharacter, DamageDealt, Hit) | |
| 501 | ||
| 502 | local DamageShowingPart = CreatePart(Services.Workspace, "ShowDamage", "Bright yellow", Vector3.new(0.8,0.8,0.8), "Neon", 1, "Block") | |
| 503 | DamageShowingPart.Position = HitCharacter.Head.Position | |
| 504 | ||
| 505 | local DamageGui = Instance.new("BillboardGui", DamageShowingPart)
| |
| 506 | DamageGui.Name = "Damage" | |
| 507 | DamageGui.AlwaysOnTop = true | |
| 508 | DamageGui.Size = UDim2.new(5, 0, 5, 0) | |
| 509 | ||
| 510 | local DamageNumber = Instance.new("TextLabel", DamageGui)
| |
| 511 | DamageNumber.Size = UDim2.new(1,0,1,0) | |
| 512 | if Hit.Parent:FindFirstChild("Head") then
| |
| 513 | DamageNumber.TextStrokeColor3 = Hit.Parent.Head.BrickColor.Color | |
| 514 | DamageNumber.TextColor3 = Hit.BrickColor.Color | |
| 515 | end | |
| 516 | DamageNumber.TextStrokeTransparency = 0 | |
| 517 | DamageNumber.BackgroundTransparency = 1 | |
| 518 | DamageNumber.Font = "SourceSansBold" | |
| 519 | DamageNumber.TextScaled = true | |
| 520 | DamageNumber.Text = DamageDealt | |
| 521 | ||
| 522 | local BodyVelocity = Instance.new("BodyVelocity", DamageShowingPart)
| |
| 523 | BodyVelocity.MaxForce = Vector3.new(math.huge,math.huge,math.huge) | |
| 524 | BodyVelocity.Velocity = Vector3.new(0,2,0) | |
| 525 | ||
| 526 | Services.Debris:AddItem(DamageShowingPart, 3) | |
| 527 | ||
| 528 | ||
| 529 | end | |
| 530 | ||
| 531 | function ValidateDamage(Part, Distance ,Min , Max, Type, HitSFX, Knockback) | |
| 532 | for _,WorkspaceChildren in pairs(workspace:children()) do | |
| 533 | ||
| 534 | local HitHumanoid = WorkspaceChildren:findFirstChild("Humanoid")
| |
| 535 | ||
| 536 | if HitHumanoid ~= nil then | |
| 537 | local Hit = WorkspaceChildren:findFirstChild("Torso")
| |
| 538 | ||
| 539 | if Hit ~= nil then | |
| 540 | ||
| 541 | local Target = Hit.Position - Part.Position | |
| 542 | ||
| 543 | local Magnitude = Target.magnitude | |
| 544 | ||
| 545 | if Magnitude <= Distance and WorkspaceChildren.Name ~= Player.Name then | |
| 546 | ||
| 547 | local HitBlock = Hit.Parent:FindFirstChild("Block")
| |
| 548 | ||
| 549 | if HitBlock ~= nil and HitBlock:FindFirstChild("BlockDurability") and HitBlock.Value == true then
| |
| 550 | ||
| 551 | local HitBlock2 = Hit.Parent.Block.BlockDurability | |
| 552 | ||
| 553 | if HitBlock2.Value > 15 then | |
| 554 | ||
| 555 | local HitN = math.random(1,5) | |
| 556 | ||
| 557 | HitBlock2.Value = HitBlock2.Value - 15 | |
| 558 | ||
| 559 | ||
| 560 | if HitN == 1 then | |
| 561 | MakeSFX(Hit ,199148971, 0.5, 1) | |
| 562 | end | |
| 563 | ||
| 564 | if HitN == 2 then | |
| 565 | MakeSFX(Hit ,199149025, 0.5, 1) | |
| 566 | end | |
| 567 | ||
| 568 | if HitN == 3 then | |
| 569 | MakeSFX(Hit ,199149072, 0.5, 1) | |
| 570 | end | |
| 571 | ||
| 572 | if HitN == 4 then | |
| 573 | MakeSFX(Hit ,199149109, 0.5, 1) | |
| 574 | end | |
| 575 | ||
| 576 | if HitN == 5 then | |
| 577 | MakeSFX(Hit ,199149119, 0.5, 1) | |
| 578 | end | |
| 579 | return | |
| 580 | end | |
| 581 | end | |
| 582 | ||
| 583 | DamageFunction(Hit, Part, Type, HitSFX, Knockback, Min, Max) | |
| 584 | ||
| 585 | ||
| 586 | ||
| 587 | end | |
| 588 | end | |
| 589 | end | |
| 590 | end | |
| 591 | end | |
| 592 | ||
| 593 | ||
| 594 | ||
| 595 | local Cloak = Instance.new("Part", Character)
| |
| 596 | Cloak.Name = "Cloak" | |
| 597 | Cloak.CanCollide = false | |
| 598 | Cloak.BrickColor = BrickColor.new("Institutional white")
| |
| 599 | ||
| 600 | local CloakMesh = Instance.new("SpecialMesh", Cloak)
| |
| 601 | CloakMesh.MeshId = "http://www.roblox.com/asset?id=16150814" | |
| 602 | CloakMesh.TextureId = "http://www.roblox.com/asset?id=16150799" | |
| 603 | ||
| 604 | local CloakWeld = CreateWeld(Cloak, CFrame.new(0,0,0) * CFrame.Angles(0,0,0), Head , Cloak, "ArkusToCharacter") | |
| 605 | ||
| 606 | for i,v in pairs(Character:children()) do | |
| 607 | if v:IsA("Accessory") then
| |
| 608 | v:Remove() | |
| 609 | elseif v:IsA("Shirt") then
| |
| 610 | v:Remove() | |
| 611 | elseif v:IsA("Pants") then
| |
| 612 | v:Remove() | |
| 613 | elseif v:IsA("BodyColors") then
| |
| 614 | ||
| 615 | Head.BrickColor =BrickColor.new("Really black")
| |
| 616 | Torso.BrickColor = BrickColor.new("Really black")
| |
| 617 | Right_Arm.BrickColor = BrickColor.new("Really black")
| |
| 618 | Right_Leg.BrickColor = BrickColor.new("Really black")
| |
| 619 | Left_Arm.BrickColor = BrickColor.new("Really black")
| |
| 620 | Left_Leg.BrickColor = BrickColor.new("Really black")
| |
| 621 | ||
| 622 | v.HeadColor = BrickColor.new("Really black")
| |
| 623 | v.TorsoColor = BrickColor.new("Really black")
| |
| 624 | v.RightArmColor = BrickColor.new("Really black")
| |
| 625 | v.LeftArmColor = BrickColor.new("Really black")
| |
| 626 | v.RightLegColor = BrickColor.new("Really black")
| |
| 627 | v.LeftLegColor = BrickColor.new("Really black")
| |
| 628 | ||
| 629 | end | |
| 630 | end | |
| 631 | ||
| 632 | ||
| 633 | ||
| 634 | --[[ CLerp Declarations ]]-- | |
| 635 | ||
| 636 | function clerp(a,b,t) | |
| 637 | local qa = {QuaternionFromCFrame(a)}
| |
| 638 | local qb = {QuaternionFromCFrame(b)}
| |
| 639 | local ax, ay, az = a.x, a.y, a.z | |
| 640 | local bx, by, bz = b.x, b.y, b.z | |
| 641 | local _t = 1-t | |
| 642 | return QuaternionToCFrame(_t*ax + t*bx, _t*ay + t*by, _t*az + t*bz,QuaternionSlerp(qa, qb, t)) | |
| 643 | end | |
| 644 | ||
| 645 | function QuaternionFromCFrame(cf) -- dis one | |
| 646 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
| 647 | local trace = m00 + m11 + m22 | |
| 648 | if trace > 0 then | |
| 649 | local s = math.sqrt(1 + trace) | |
| 650 | local recip = 0.5/s | |
| 651 | return (m21-m12)*recip, (m02-m20)*recip, (m10-m01)*recip, s*0.5 | |
| 652 | else | |
| 653 | local i = 0 | |
| 654 | if m11 > m00 then | |
| 655 | i = 1 | |
| 656 | end | |
| 657 | if m22 > (i == 0 and m00 or m11) then | |
| 658 | i = 2 | |
| 659 | end | |
| 660 | if i == 0 then | |
| 661 | local s = math.sqrt(m00-m11-m22+1) | |
| 662 | local recip = 0.5/s | |
| 663 | return 0.5*s, (m10+m01)*recip, (m20+m02)*recip, (m21-m12)*recip | |
| 664 | elseif i == 1 then | |
| 665 | local s = math.sqrt(m11-m22-m00+1) | |
| 666 | local recip = 0.5/s | |
| 667 | return (m01+m10)*recip, 0.5*s, (m21+m12)*recip, (m02-m20)*recip | |
| 668 | elseif i == 2 then | |
| 669 | local s = math.sqrt(m22-m00-m11+1) | |
| 670 | local recip = 0.5/s return (m02+m20)*recip, (m12+m21)*recip, 0.5*s, (m10-m01)*recip | |
| 671 | end | |
| 672 | end | |
| 673 | end | |
| 674 | ||
| 675 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
| 676 | local xs, ys, zs = x + x, y + y, z + z | |
| 677 | local wx, wy, wz = w*xs, w*ys, w*zs | |
| 678 | local xx = x*xs | |
| 679 | local xy = x*ys | |
| 680 | local xz = x*zs | |
| 681 | local yy = y*ys | |
| 682 | local yz = y*zs | |
| 683 | local zz = z*zs | |
| 684 | 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)) | |
| 685 | end | |
| 686 | ||
| 687 | function QuaternionSlerp(a, b, t) | |
| 688 | local cosTheta = a[1]*b[1] + a[2]*b[2] + a[3]*b[3] + a[4]*b[4] | |
| 689 | local startInterp, finishInterp; | |
| 690 | if cosTheta >= 0.0001 then | |
| 691 | if (1 - cosTheta) > 0.0001 then | |
| 692 | local theta = math.acos(cosTheta) | |
| 693 | local invSinTheta = 1/math.sin(theta) | |
| 694 | startInterp = math.sin((1-t)*theta)*invSinTheta | |
| 695 | finishInterp = math.sin(t*theta)*invSinTheta | |
| 696 | else | |
| 697 | startInterp = 1-t | |
| 698 | finishInterp = t | |
| 699 | end | |
| 700 | else | |
| 701 | if (1+cosTheta) > 0.0001 then | |
| 702 | local theta = math.acos(-cosTheta) | |
| 703 | local invSinTheta = 1/math.sin(theta) | |
| 704 | startInterp = math.sin((t-1)*theta)*invSinTheta | |
| 705 | finishInterp = math.sin(t*theta)*invSinTheta | |
| 706 | else | |
| 707 | startInterp = t-1 | |
| 708 | finishInterp = t | |
| 709 | end | |
| 710 | end | |
| 711 | 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 | |
| 712 | end | |
| 713 | ||
| 714 | function RayCast(Pos, Dir, Max, Ignore) | |
| 715 | return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
| |
| 716 | end | |
| 717 | ||
| 718 | ||
| 719 | function Bars() | |
| 720 | ||
| 721 | --[[ Mana Bar ]]-- | |
| 722 | if Destruction ~= MaxDestruction then | |
| 723 | ||
| 724 | Destruction = Destruction + 1 | |
| 725 | ||
| 726 | end | |
| 727 | ||
| 728 | if Destruction >= MaxDestruction then | |
| 729 | ||
| 730 | Destruction = Destruction | |
| 731 | ||
| 732 | end | |
| 733 | ||
| 734 | ||
| 735 | ManaBarText.Text = "<{[ Destruction ]}> <|"..Destruction.."|> <{[ Destruction ]}>"
| |
| 736 | ||
| 737 | ManaBarP2.Size = UDim2.new(Destruction / Destruction,0,0,20) | |
| 738 | ||
| 739 | end | |
| 740 | local EyeReference = CreatePart(Character, "Reference", "Dark stone grey", Vector3.new(), "SmoothPlastic", 1, "Block") | |
| 741 | local EyeReferenceWeld = CreateWeld(EyeReference, CFrame.new(0.15,-0.1,-0.7), EyeReference, Head) | |
| 742 | ||
| 743 | coroutine.resume(coroutine.create(function() | |
| 744 | ||
| 745 | while wait(3) do | |
| 746 | ||
| 747 | ||
| 748 | CircleEffect(EyeReference.Position, Services.Workspace, 1, 1, 1, 1, 1, 1, 0.5, "Bright red", "Neon", 0.5) | |
| 749 | ||
| 750 | ||
| 751 | end | |
| 752 | ||
| 753 | end)) | |
| 754 | --[[ Attacks ]]-- | |
| 755 | ||
| 756 | function Attack1() | |
| 757 | Attacking = true | |
| 758 | MakeSFX(EyeReference, 341336274, 1,1) | |
| 759 | wait(0.3) | |
| 760 | local Reference = CreatePart(Services.Workspace, "Reference", "Dark stone grey", Vector3.new(), "SmoothPlastic", 1, "Block") | |
| 761 | local ReferenceWeld = CreateWeld(Reference, CFrame.new(0,0.5,-5), Reference, Root) | |
| 762 | ||
| 763 | local Reference2 = CreatePart(Services.Workspace, "Reference", "Dark stone grey", Vector3.new(), "SmoothPlastic", 1, "Block") | |
| 764 | local Reference2Weld = CreateWeld(Reference2, CFrame.new(0,0.5,-2), Reference2, Root) | |
| 765 | ||
| 766 | ||
| 767 | for i = 1,10 do | |
| 768 | ||
| 769 | wait() | |
| 770 | RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(0,0,-1.6),0.5) | |
| 771 | Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(0,0,1.3),0.2) | |
| 772 | Right_Shoulder.C0 = clerp(Right_Shoulder.C0, CFrame.new(1.5, 0.1, 0) * CFrame.Angles(0,0,0.2), 0.3) | |
| 773 | Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-1.5, 0.5, 0) * CFrame.Angles(0,0,-1.6), 0.4) | |
| 774 | Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,0) * CFrame.Angles(0,1.6,0),0.3) | |
| 775 | Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,0) * CFrame.Angles(0,-1.6,0),0.3) | |
| 776 | ||
| 777 | end | |
| 778 | ||
| 779 | CircleEffect(Reference2.Position, Services.Workspace, 50, 50, 50, -5, -5, -5, 5, "Bright red", "Neon", 0.5) | |
| 780 | wait(0.5) | |
| 781 | CircleEffect(Reference2.Position, Services.Workspace, 50, 50, 50, -5, -5, -5, 5, "Bright red", "Neon", 0.5) | |
| 782 | wait(0.5) | |
| 783 | CircleEffect(Reference2.Position, Services.Workspace, 50, 50, 50, -5, -5, -5, 5, "Bright red", "Neon", 0.5) | |
| 784 | wait(0.5) | |
| 785 | CircleEffect(Reference2.Position, Services.Workspace, 50, 50, 50, -5, -5, -5, 5, "Bright red", "Neon", 0.5) | |
| 786 | wait(0.5) | |
| 787 | MakeSFX(Reference, 306247724, 1,1) | |
| 788 | CircleEffect(Reference.Position, Services.Workspace, 1, 1, 1, 5, 5, 5, 5, "Bright red", "Neon", 0.5) | |
| 789 | ValidateDamage(Reference, 10 ,10 , 14, "Shrink", "Penetration", 5) | |
| 790 | Attacking = false | |
| 791 | end | |
| 792 | ||
| 793 | function Attack2() | |
| 794 | ||
| 795 | Attacking = true | |
| 796 | Humanoid.WalkSpeed = 0 | |
| 797 | Humanoid.JumpPower = 0 | |
| 798 | ||
| 799 | ||
| 800 | for i = 1,25 do | |
| 801 | wait() | |
| 802 | ||
| 803 | RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(-0.5,0,0),0.2) | |
| 804 | Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(-0.5,0,0),0.3) | |
| 805 | Right_Shoulder.C0 = clerp(Right_Shoulder.C0, CFrame.new(1, 1, 0) * CFrame.Angles(3.2,0,-0.6), 0.3) | |
| 806 | Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-1, 1, 0) * CFrame.Angles(3.2,0,0.6), 0.3) | |
| 807 | Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,0)*CFrame.Angles(0,1.6,-0.3),0.2) | |
| 808 | Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,-0.5)*CFrame.Angles(0,-1.6,0),0.2) | |
| 809 | ||
| 810 | end | |
| 811 | ||
| 812 | MakeSFX(Torso, 142070127, 1, 1) | |
| 813 | ValidateDamage(Torso, 60 ,23, 26, "Knockdown", "Penetration", 15) | |
| 814 | local Hit, Position = RayCast(Torso.Position,(CFrame.new(Root.Position,Root.Position - Vector3.new(0,1,0))).lookVector,100,Character) | |
| 815 | if Hit ~= nil then | |
| 816 | local Reference = CreatePart(Services.Workspace, "Reference", "Dark stone grey", Vector3.new(), "SmoothPlastic", 1, "Block") | |
| 817 | Reference.Anchored = true | |
| 818 | Reference.CFrame = CFrame.new(Position) | |
| 819 | ||
| 820 | CircleEffect(Reference.Position, Services.Workspace, 1, 1, 1, 5, 5, 5, 5, "Bright red", "Neon", 0.5) | |
| 821 | ||
| 822 | game:GetService("Debris"):AddItem(Reference,0.1)
| |
| 823 | for i=1,50 do | |
| 824 | ||
| 825 | local Ground = CreatePart(Services.Workspace, "Ground", Hit.BrickColor.Color, Vector3.new(math.random(1,3), math.random(1,3), math.random(1,3)), Hit.Material, 0, "Block") | |
| 826 | Ground.Anchored = true | |
| 827 | Ground.CanCollide = true | |
| 828 | Ground.CFrame = CFrame.new(Position) * CFrame.new(math.random(-30,30), 0, math.random(-30,30)) * CFrame.Angles(math.random(-50,50),math.random(-50,50), math.random(-50,50)) | |
| 829 | ||
| 830 | game:GetService("Debris"):AddItem(Ground,10)
| |
| 831 | ||
| 832 | end | |
| 833 | end | |
| 834 | ||
| 835 | for i = 1,25 do | |
| 836 | wait() | |
| 837 | ||
| 838 | RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(0,0,0),0.5) | |
| 839 | Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(0.5,0,0),0.3) | |
| 840 | Right_Shoulder.C0 = clerp(Right_Shoulder.C0, CFrame.new(1.5, 0, 0.1) * CFrame.Angles(-0.2,0,0), 0.3) | |
| 841 | Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-1.5, 0, 0.1) * CFrame.Angles(-0.2,0,0), 0.3) | |
| 842 | Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,0)*CFrame.Angles(0,1.6,-0.3),0.2) | |
| 843 | Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,-0.5)*CFrame.Angles(0,-1.6,0),0.2) | |
| 844 | ||
| 845 | end | |
| 846 | ||
| 847 | Attacking = false | |
| 848 | Humanoid.WalkSpeed = 16 | |
| 849 | Humanoid.JumpPower = 50 | |
| 850 | ||
| 851 | ||
| 852 | ||
| 853 | end | |
| 854 | ||
| 855 | ||
| 856 | function Attack3() | |
| 857 | Humanoid.WalkSpeed = 0 | |
| 858 | Humanoid.JumpPower = 0 | |
| 859 | Attacking = true | |
| 860 | wait(1) | |
| 861 | MakeSFX(Torso, 341336274, 1, 1.2) | |
| 862 | CircleEffect(Torso.Position, Services.Workspace, 1, 1, 1, 20, 20, 20, 5, "Black", "Neon", 0.5) | |
| 863 | wait(1) | |
| 864 | MakeSFX(Torso, 341336274, 1, 1.2) | |
| 865 | CircleEffect(Torso.Position, Services.Workspace, 1, 1, 1, 20, 20, 20, 5, "Black", "Neon", 0.5) | |
| 866 | wait(1) | |
| 867 | MakeSFX(Torso, 341336274, 1, 1.2) | |
| 868 | CircleEffect(Torso.Position, Services.Workspace, 1, 1, 1, 20, 20, 20, 5, "Black", "Neon", 0.5) | |
| 869 | ValidateDamage(Torso, 60 ,0, 0, "Impale", "Penetration", 15) | |
| 870 | Humanoid.WalkSpeed = 16 | |
| 871 | Humanoid.JumpPower = 50 | |
| 872 | Attacking = false | |
| 873 | end | |
| 874 | ||
| 875 | Mouse.Button1Down:connect(function() | |
| 876 | if not Attacking then | |
| 877 | if Combo == 1 then | |
| 878 | ||
| 879 | Combo = 2 | |
| 880 | Attack1() | |
| 881 | ||
| 882 | ||
| 883 | elseif Combo == 2 then | |
| 884 | ||
| 885 | Attack2() | |
| 886 | Combo = 3 | |
| 887 | ||
| 888 | elseif Combo == 3 then | |
| 889 | ||
| 890 | Attack3() | |
| 891 | Combo = 1 | |
| 892 | ||
| 893 | end | |
| 894 | end | |
| 895 | end) | |
| 896 | ||
| 897 | --[[ CLerp Animations ]]-- | |
| 898 | Change1 = 0 | |
| 899 | Change2 = 0 | |
| 900 | Change3 = 0 | |
| 901 | Change4 = 0 | |
| 902 | ||
| 903 | while true do | |
| 904 | wait() | |
| 905 | ||
| 906 | local Torvel = (Root.Velocity*Vector3.new(1,0,1)).magnitude | |
| 907 | local Velderp = Root.Velocity.y | |
| 908 | HitFloor,PosFloor = RayCast(Root.Position,(CFrame.new(Root.Position,Root.Position - Vector3.new(0,1,0))).lookVector,4,Character) | |
| 909 | ||
| 910 | Bars() | |
| 911 | ||
| 912 | ||
| 913 | if Torvel < 1 and HitFloor ~= nil and Attacking == false then | |
| 914 | Anim = "Idle" | |
| 915 | ||
| 916 | RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(0,0,0),0.2) | |
| 917 | Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(0,-0.3,0),0.3) | |
| 918 | Right_Shoulder.C0 = clerp(Right_Shoulder.C0, CFrame.new(1.5, 0.1, 0) * CFrame.Angles(0,0,0.2), 0.3) | |
| 919 | Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-1.5, 0.1, 0) * CFrame.Angles(0,0,-0.2), 0.3) | |
| 920 | Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,0)*CFrame.Angles(0,1.6,0) * CFrame.Angles(-0.1,0,0),0.2) | |
| 921 | Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,0)*CFrame.Angles(0,-1.6,0) * CFrame.Angles(-0.1,0,0),0.2) | |
| 922 | ||
| 923 | end | |
| 924 | ||
| 925 | ||
| 926 | if 2 < Torvel and Torvel < 22 and HitFloor ~= nil and Attacking == false then | |
| 927 | Anim = "Walking" | |
| 928 | ||
| 929 | if Invert == false then | |
| 930 | Change1 = Change1 + 0.1 | |
| 931 | ||
| 932 | elseif Invert == true then | |
| 933 | ||
| 934 | Change1 = Change1 - 0.1 | |
| 935 | ||
| 936 | end | |
| 937 | ||
| 938 | if Change1 > 0.5 then | |
| 939 | ||
| 940 | Invert = true | |
| 941 | ||
| 942 | elseif Change1 < -0.5 then | |
| 943 | ||
| 944 | Invert = false | |
| 945 | ||
| 946 | end | |
| 947 | ||
| 948 | if Attacking == false then | |
| 949 | ||
| 950 | RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(0,0,0),0.2) | |
| 951 | Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(0,-0.3,0),0.3) | |
| 952 | Right_Shoulder.C0 = clerp(Right_Shoulder.C0, CFrame.new(1.5, 0, -Change1) * CFrame.Angles(Change1,0,0), 0.3) | |
| 953 | Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-1.5, 0, Change1) * CFrame.Angles(-Change1,0,0), 0.3) | |
| 954 | Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,-Change1 / 4)*CFrame.Angles(Change1,1.6,0),0.2) | |
| 955 | Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,Change1 / 4)*CFrame.Angles(-Change1,-1.6,0),0.2) | |
| 956 | ||
| 957 | end | |
| 958 | end | |
| 959 | ||
| 960 | if Root.Velocity.y > 1 and HitFloor == nil and Attacking == false then | |
| 961 | Anim = "Jump" | |
| 962 | ||
| 963 | RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(0,0,0),0.2) | |
| 964 | Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(-0.5,0,0),0.3) | |
| 965 | Right_Shoulder.C0 = clerp(Right_Shoulder.C0, CFrame.new(1.5, 0, 0.2) * CFrame.Angles(-0.4,0,0.2), 0.3) | |
| 966 | Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-1.5, 0, 0.2) * CFrame.Angles(-0.4,0,-0.2), 0.3) | |
| 967 | Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,-0.2)*CFrame.Angles(-0.2,1.6,0),0.2) | |
| 968 | Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,0)*CFrame.Angles(0,-1.6,0),0.2) | |
| 969 | ||
| 970 | end | |
| 971 | ||
| 972 | if Root.Velocity.y < -1 and HitFloor == nil and Attacking == false then | |
| 973 | Anim = "Fall" | |
| 974 | ||
| 975 | RootJoint.C0 = clerp(RootJoint.C0,RootCFrame*CFrame.new(0,0,0)* CFrame.Angles(0,0,0),0.2) | |
| 976 | Torso.Neck.C0 = clerp(Torso.Neck.C0,Necko * CFrame.Angles(0.5,0,0),0.3) | |
| 977 | Right_Shoulder.C0 = clerp(Right_Shoulder.C0, CFrame.new(1.5, 0, -0.2) * CFrame.Angles(0.4,0,0.2), 0.3) | |
| 978 | Left_Shoulder.C0 = clerp(Left_Shoulder.C0, CFrame.new(-1.5, 0, -0.2) * CFrame.Angles(0.4,0,-0.2), 0.3) | |
| 979 | Right_Hip.C0=clerp(Right_Hip.C0,CFrame.new(1,-1,-0.2)*CFrame.Angles(-0.2,1.6,0),0.2) | |
| 980 | Left_Hip.C0=clerp(Left_Hip.C0,CFrame.new(-1,-1,0)*CFrame.Angles(0,-1.6,0),0.2) | |
| 981 | ||
| 982 | end | |
| 983 | ||
| 984 | ||
| 985 | if #Effects > 0 then | |
| 986 | for E = 1, #Effects do | |
| 987 | if Effects[E]~=nil then | |
| 988 | local Effect = Effects[E] | |
| 989 | ||
| 990 | if Effect ~= nil then | |
| 991 | ||
| 992 | local Part = Effect[1] | |
| 993 | local Mode = Effect[2] | |
| 994 | local Time = Effect[3] | |
| 995 | local SizeX = Effect[4] | |
| 996 | local SizeY = Effect[5] | |
| 997 | local SizeZ = Effect[6] | |
| 998 | ||
| 999 | if Effect[1].Transparency <= 1 then | |
| 1000 | if Effect[2] == "Block" then | |
| 1001 | Effect[1].CFrame = Effect[1].CFrame * CFrame.Angles(math.random(-50,50),math.random(-50,50),math.random(-50,50)) | |
| 1002 | ||
| 1003 | Mesh = Effect[1]:FindFirstChild("Mesh")
| |
| 1004 | if Mesh ~= nil then | |
| 1005 | Mesh.Scale = Mesh.Scale + Vector3.new(Effect[4],Effect[5],Effect[6]) | |
| 1006 | end | |
| 1007 | ||
| 1008 | elseif Effect[2] == "Circle" then | |
| 1009 | ||
| 1010 | if Effect[1]:FindFirstChild("Mesh") ~= nil then
| |
| 1011 | Mesh=Effect[1].Mesh | |
| 1012 | Mesh.Scale = Mesh.Scale + Vector3.new(Effect[4],Effect[5],Effect[6]) | |
| 1013 | end | |
| 1014 | ||
| 1015 | Effect[1].Transparency = Effect[1].Transparency + 0.05 | |
| 1016 | ||
| 1017 | else | |
| 1018 | ||
| 1019 | Part.Parent=nil | |
| 1020 | ||
| 1021 | table.remove(Effects, E) | |
| 1022 | ||
| 1023 | end | |
| 1024 | end | |
| 1025 | end | |
| 1026 | end | |
| 1027 | end | |
| 1028 | end | |
| 1029 | end |