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