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