SHOW:
|
|
- or go back to the newest paste.
| 1 | if game:GetService("RunService"):IsClient()then error("say h/ not hl/ ya dummy")end;print("get rekt");InternalData = {}
| |
| 2 | do | |
| 3 | script.Parent = owner.Character | |
| 4 | local Event = Instance.new("RemoteEvent");Event.Name = "UserInput"
| |
| 5 | local function NewFakeEvent() | |
| 6 | local Bind = Instance.new("BindableEvent")
| |
| 7 | local Fake;Fake = {Connections = {},
| |
| 8 | fakeEvent=true; | |
| 9 | Connect=function(self,Func) | |
| 10 | Bind.Event:connect(Func) | |
| 11 | self.Connections[Bind] = true | |
| 12 | return setmetatable({Connected = true},{
| |
| 13 | __index = function (self,Index) | |
| 14 | if Index:lower() == "disconnect" then | |
| 15 | return function() Fake.Connections[Bind] = false;self.Connected = false end | |
| 16 | end | |
| 17 | return Fake[Index] | |
| 18 | end; | |
| 19 | __tostring = function() return "Connection" end; | |
| 20 | }) | |
| 21 | end} | |
| 22 | Fake.connect = Fake.Connect;return Fake; | |
| 23 | end | |
| 24 | local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
| |
| 25 | local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
| |
| 26 | local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
| |
| 27 | self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
| |
| 28 | end};ContextActionService.UnBindAction = ContextActionService.BindAction | |
| 29 | local function TriggerEvent(self,Event,...) | |
| 30 | local Trigger = Mouse[Event] | |
| 31 | if Trigger and Trigger.fakeEvent and Trigger.Connections then | |
| 32 | for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end | |
| 33 | end | |
| 34 | end | |
| 35 | Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent | |
| 36 | Event.OnServerEvent:Connect(function(FiredBy,Input) | |
| 37 | if FiredBy.Name ~= owner.Name then return end | |
| 38 | if Input.MouseEvent then | |
| 39 | Mouse.Target = Input.Target;Mouse.Hit = Input.Hit | |
| 40 | else | |
| 41 | local Begin = Input.UserInputState == Enum.UserInputState.Begin | |
| 42 | if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end | |
| 43 | for _,Action in pairs(ContextActionService.Actions) do | |
| 44 | for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end | |
| 45 | end | |
| 46 | Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower()) | |
| 47 | UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false) | |
| 48 | end | |
| 49 | end) | |
| 50 | InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService | |
| 51 | Event.Parent = NLS([[ | |
| 52 | local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse()
| |
| 53 | local Input = function(Input,gameProcessedEvent) | |
| 54 | if gameProcessedEvent then return end | |
| 55 | Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
| |
| 56 | end | |
| 57 | UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input) | |
| 58 | local Hit,Target | |
| 59 | while wait(1/30) do | |
| 60 | if Hit ~= Mouse.Hit or Target ~= Mouse.Target then | |
| 61 | Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
| |
| 62 | end | |
| 63 | end | |
| 64 | ]],owner.Character) | |
| 65 | end | |
| 66 | RealGame = game;game = setmetatable({},{
| |
| 67 | __index = function (self,Index) | |
| 68 | local Sandbox = function (Thing) | |
| 69 | if Thing:IsA("Player") then
| |
| 70 | local RealPlayer = Thing | |
| 71 | return setmetatable({},{
| |
| 72 | __index = function (self,Index) | |
| 73 | local Type = type(RealPlayer[Index]) | |
| 74 | if Type == "function" then | |
| 75 | if Index:lower() == "getmouse" or Index:lower() == "mouse" then | |
| 76 | return function (self)return InternalData["Mouse"] end | |
| 77 | end | |
| 78 | return function (self,...)return RealPlayer[Index](RealPlayer,...) end | |
| 79 | end | |
| 80 | return RealPlayer[Index] | |
| 81 | end; | |
| 82 | __tostring = function(self) return RealPlayer.Name end | |
| 83 | }) | |
| 84 | end | |
| 85 | end | |
| 86 | if RealGame[Index] then | |
| 87 | local Type = type(RealGame[Index]) | |
| 88 | if Type == "function" then | |
| 89 | if Index:lower() == "getservice" or Index:lower() == "service" then | |
| 90 | return function (self,Service) | |
| 91 | local FakeServices = {
| |
| 92 | ["players"] = function() | |
| 93 | return setmetatable({},{
| |
| 94 | __index = function (self2,Index2) | |
| 95 | local RealService = RealGame:GetService(Service) | |
| 96 | local Type2 = type(Index2) | |
| 97 | if Type2 == "function" then | |
| 98 | return function (self,...) return RealService[Index2](RealService,...)end | |
| 99 | else | |
| 100 | if Index2:lower() == "localplayer" then return Sandbox(owner) end | |
| 101 | return RealService[Index2] | |
| 102 | end | |
| 103 | end; | |
| 104 | __tostring = function(self) return RealGame:GetService(Service).Name end | |
| 105 | }) | |
| 106 | end; | |
| 107 | ["contextactionservice"] = function() return InternalData["ContextActionService"] end; | |
| 108 | ["userinputservice"] = function() return InternalData["UserInputService"] end; | |
| 109 | ["runservice"] = function() | |
| 110 | return setmetatable({},{
| |
| 111 | __index = function(self2,Index2) | |
| 112 | local RealService = RealGame:GetService(Service) | |
| 113 | local Type2 = type(Index2) | |
| 114 | if Type2 == "function" then | |
| 115 | return function (self,...) return RealService[Index2](RealService,...) end | |
| 116 | else | |
| 117 | local RunServices = {
| |
| 118 | ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end;
| |
| 119 | ["renderstepped"] = function() return RealService["Stepped"] end | |
| 120 | } | |
| 121 | if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end | |
| 122 | return RealService[Index2] | |
| 123 | end | |
| 124 | end | |
| 125 | }) | |
| 126 | end | |
| 127 | } | |
| 128 | if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end | |
| 129 | return RealGame:GetService(Service) | |
| 130 | end | |
| 131 | end | |
| 132 | return function (self,...) return RealGame[Index](RealGame,...) end | |
| 133 | else | |
| 134 | if game:GetService(Index) then return game:GetService(Index) end | |
| 135 | return RealGame[Index] | |
| 136 | end | |
| 137 | end | |
| 138 | return nil | |
| 139 | end | |
| 140 | });Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("running the script noob")
| |
| 141 | ||
| 142 | ----------------------- | |
| 143 | --[[ Name : Furry ]]-- | |
| 144 | ------------------------------------------------------- | |
| 145 | --A script By makhail07 | |
| 146 | --Be f l o o f OwO | |
| 147 | ||
| 148 | --Discord Creterisk#2958 | |
| 149 | ||
| 150 | --NOTE THIS SCRIPT WAS PURELY MADE FROM MY ####### IMAGINATION | |
| 151 | --IF IT HAPPENS TO LOOK LIKE ANOTHER SCRIPT | |
| 152 | --DONT CALL IT A ####### BOOTLEG THANK YOU AND ENJOY THE SCRIPT | |
| 153 | --YOU ####### SKIDS, | |
| 154 | --For Those who log/decompile this, If you sell or trade this, | |
| 155 | --and I find out who you are, i will take massive action. | |
| 156 | --kalepo36 (yo chilll) | |
| 157 | ------------------------------------------------------- | |
| 158 | ||
| 159 | local FavIDs = {
| |
| 160 | 340106355, --Nefl Crystals | |
| 161 | 927529620, --Dimension | |
| 162 | 876981900, --Fantasy | |
| 163 | 398987889, --Ordinary Days | |
| 164 | 1117396305, --Oh wait, it's you. | |
| 165 | 885996042, --Action Winter Journey | |
| 166 | 919231299, --Sprawling Idiot Effigy | |
| 167 | 743466274, --Good Day Sunshine | |
| 168 | 727411183, --Knife Fight | |
| 169 | 1402748531, --The Earth Is Counting On You! | |
| 170 | 595230126 --Robot Language | |
| 171 | } | |
| 172 | ||
| 173 | ||
| 174 | ||
| 175 | --The reality of my life isn't real but a Universe -makhail07 | |
| 176 | wait() | |
| 177 | local plr = game:service'Players'.LocalPlayer | |
| 178 | print('Local User is '..plr.Name)
| |
| 179 | local char = plr.Character | |
| 180 | local hum = char.Humanoid | |
| 181 | local ra = char["Right Arm"] | |
| 182 | local la= char["Left Arm"] | |
| 183 | local rl= char["Right Leg"] | |
| 184 | local ll = char["Left Leg"] | |
| 185 | local hed = char.Head | |
| 186 | local root = char.HumanoidRootPart | |
| 187 | local rootj = root.RootJoint | |
| 188 | local tors = char.Torso | |
| 189 | local mouse = plr:GetMouse() | |
| 190 | local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14) | |
| 191 | local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0) | |
| 192 | local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0) | |
| 193 | ------------------------------------------------------- | |
| 194 | --Start Whitelist and Invincibility-- | |
| 195 | ------------------------------------------------------- | |
| 196 | ||
| 197 | ff = Instance.new("ForceField",char)
| |
| 198 | ff.Visible = false | |
| 199 | hum.Name = "Base" | |
| 200 | hum.MaxHealth = 1.0E298 | |
| 201 | hum.Health = 1.0E298 | |
| 202 | game:GetService("RunService"):BindToRenderStep("Bbae", 0, function()
| |
| 203 | if hum.Health > 0.1 and hum.Health < 1.0E298 then | |
| 204 | hum.MaxHealth = 1.0E298 | |
| 205 | hum.Health = 1.0E298 | |
| 206 | end | |
| 207 | end) | |
| 208 | ------------------------------------------------------- | |
| 209 | --End Whitelist and Invincibility-- | |
| 210 | ------------------------------------------------------- | |
| 211 | ------------------------------------------------------- | |
| 212 | --Start Good Stuff-- | |
| 213 | ------------------------------------------------------- | |
| 214 | CF = CFrame.new | |
| 215 | angles = CFrame.Angles | |
| 216 | attack = false | |
| 217 | Euler = CFrame.fromEulerAnglesXYZ | |
| 218 | Rad = math.rad | |
| 219 | IT = Instance.new | |
| 220 | BrickC = BrickColor.new | |
| 221 | Cos = math.cos | |
| 222 | Acos = math.acos | |
| 223 | Sin = math.sin | |
| 224 | Asin = math.asin | |
| 225 | Abs = math.abs | |
| 226 | Mrandom = math.random | |
| 227 | Floor = math.floor | |
| 228 | ------------------------------------------------------- | |
| 229 | --End Good Stuff-- | |
| 230 | ------------------------------------------------------- | |
| 231 | necko = CF(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
| 232 | RSH, LSH = nil, nil | |
| 233 | RW = Instance.new("Weld")
| |
| 234 | LW = Instance.new("Weld")
| |
| 235 | RH = tors["Right Hip"] | |
| 236 | LH = tors["Left Hip"] | |
| 237 | RSH = tors["Right Shoulder"] | |
| 238 | LSH = tors["Left Shoulder"] | |
| 239 | RSH.Parent = nil | |
| 240 | LSH.Parent = nil | |
| 241 | RW.Name = "RW" | |
| 242 | RW.Part0 = tors | |
| 243 | RW.C0 = CF(1.5, 0.5, 0) | |
| 244 | RW.C1 = CF(0, 0.5, 0) | |
| 245 | RW.Part1 = ra | |
| 246 | RW.Parent = tors | |
| 247 | LW.Name = "LW" | |
| 248 | LW.Part0 = tors | |
| 249 | LW.C0 = CF(-1.5, 0.5, 0) | |
| 250 | LW.C1 = CF(0, 0.5, 0) | |
| 251 | LW.Part1 = la | |
| 252 | LW.Parent = tors | |
| 253 | Effects = {}
| |
| 254 | ||
| 255 | ------------------------------------------------------- | |
| 256 | --Start HeartBeat-- | |
| 257 | ------------------------------------------------------- | |
| 258 | ArtificialHB = Instance.new("BindableEvent", script)
| |
| 259 | ArtificialHB.Name = "Heartbeat" | |
| 260 | script:WaitForChild("Heartbeat")
| |
| 261 | ||
| 262 | frame = 1 / 60 | |
| 263 | tf = 0 | |
| 264 | allowframeloss = false | |
| 265 | tossremainder = false | |
| 266 | ||
| 267 | ||
| 268 | lastframe = tick() | |
| 269 | script.Heartbeat:Fire() | |
| 270 | ||
| 271 | ||
| 272 | game:GetService("RunService").Heartbeat:connect(function(s, p)
| |
| 273 | tf = tf + s | |
| 274 | if tf >= frame then | |
| 275 | if allowframeloss then | |
| 276 | script.Heartbeat:Fire() | |
| 277 | lastframe = tick() | |
| 278 | else | |
| 279 | for i = 1, math.floor(tf / frame) do | |
| 280 | script.Heartbeat:Fire() | |
| 281 | end | |
| 282 | lastframe = tick() | |
| 283 | end | |
| 284 | if tossremainder then | |
| 285 | tf = 0 | |
| 286 | else | |
| 287 | tf = tf - frame * math.floor(tf / frame) | |
| 288 | end | |
| 289 | end | |
| 290 | end) | |
| 291 | ------------------------------------------------------- | |
| 292 | --End HeartBeat-- | |
| 293 | ------------------------------------------------------- | |
| 294 | ||
| 295 | ------------------------------------------------------- | |
| 296 | --Start Important Functions-- | |
| 297 | ------------------------------------------------------- | |
| 298 | ||
| 299 | function thread(f) | |
| 300 | coroutine.resume(coroutine.create(f)) | |
| 301 | end | |
| 302 | function clerp(a, b, t) | |
| 303 | local qa = {
| |
| 304 | QuaternionFromCFrame(a) | |
| 305 | } | |
| 306 | local qb = {
| |
| 307 | QuaternionFromCFrame(b) | |
| 308 | } | |
| 309 | local ax, ay, az = a.x, a.y, a.z | |
| 310 | local bx, by, bz = b.x, b.y, b.z | |
| 311 | local _t = 1 - t | |
| 312 | return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t)) | |
| 313 | end | |
| 314 | function QuaternionFromCFrame(cf) | |
| 315 | local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components() | |
| 316 | local trace = m00 + m11 + m22 | |
| 317 | if trace > 0 then | |
| 318 | local s = math.sqrt(1 + trace) | |
| 319 | local recip = 0.5 / s | |
| 320 | return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5 | |
| 321 | else | |
| 322 | local i = 0 | |
| 323 | if m00 < m11 then | |
| 324 | i = 1 | |
| 325 | end | |
| 326 | if m22 > (i == 0 and m00 or m11) then | |
| 327 | i = 2 | |
| 328 | end | |
| 329 | if i == 0 then | |
| 330 | local s = math.sqrt(m00 - m11 - m22 + 1) | |
| 331 | local recip = 0.5 / s | |
| 332 | return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip | |
| 333 | elseif i == 1 then | |
| 334 | local s = math.sqrt(m11 - m22 - m00 + 1) | |
| 335 | local recip = 0.5 / s | |
| 336 | return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip | |
| 337 | elseif i == 2 then | |
| 338 | local s = math.sqrt(m22 - m00 - m11 + 1) | |
| 339 | local recip = 0.5 / s | |
| 340 | return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip | |
| 341 | end | |
| 342 | end | |
| 343 | end | |
| 344 | function QuaternionToCFrame(px, py, pz, x, y, z, w) | |
| 345 | local xs, ys, zs = x + x, y + y, z + z | |
| 346 | local wx, wy, wz = w * xs, w * ys, w * zs | |
| 347 | local xx = x * xs | |
| 348 | local xy = x * ys | |
| 349 | local xz = x * zs | |
| 350 | local yy = y * ys | |
| 351 | local yz = y * zs | |
| 352 | local zz = z * zs | |
| 353 | 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)) | |
| 354 | end | |
| 355 | function QuaternionSlerp(a, b, t) | |
| 356 | local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4] | |
| 357 | local startInterp, finishInterp | |
| 358 | if cosTheta >= 1.0E-4 then | |
| 359 | if 1 - cosTheta > 1.0E-4 then | |
| 360 | local theta = math.acos(cosTheta) | |
| 361 | local invSinTheta = 1 / Sin(theta) | |
| 362 | startInterp = Sin((1 - t) * theta) * invSinTheta | |
| 363 | finishInterp = Sin(t * theta) * invSinTheta | |
| 364 | else | |
| 365 | startInterp = 1 - t | |
| 366 | finishInterp = t | |
| 367 | end | |
| 368 | elseif 1 + cosTheta > 1.0E-4 then | |
| 369 | local theta = math.acos(-cosTheta) | |
| 370 | local invSinTheta = 1 / Sin(theta) | |
| 371 | startInterp = Sin((t - 1) * theta) * invSinTheta | |
| 372 | finishInterp = Sin(t * theta) * invSinTheta | |
| 373 | else | |
| 374 | startInterp = t - 1 | |
| 375 | finishInterp = t | |
| 376 | end | |
| 377 | 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 | |
| 378 | end | |
| 379 | function rayCast(Position, Direction, Range, Ignore) | |
| 380 | return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
| |
| 381 | end | |
| 382 | local RbxUtility = LoadLibrary("RbxUtility")
| |
| 383 | local Create = RbxUtility.Create | |
| 384 | ||
| 385 | ||
| 386 | local ArtificialHB = Instance.new("BindableEvent", script)
| |
| 387 | ArtificialHB.Name = "Heartbeat" | |
| 388 | ||
| 389 | script:WaitForChild("Heartbeat")
| |
| 390 | ||
| 391 | local tf = 0 | |
| 392 | local allowframeloss = false | |
| 393 | local tossremainder = false | |
| 394 | local lastframe = tick() | |
| 395 | local frame = 1/60 | |
| 396 | ArtificialHB:Fire() | |
| 397 | ||
| 398 | game:GetService("RunService").Heartbeat:connect(function(s, p)
| |
| 399 | tf = tf + s | |
| 400 | if tf >= frame then | |
| 401 | if allowframeloss then | |
| 402 | script.Heartbeat:Fire() | |
| 403 | lastframe = tick() | |
| 404 | else | |
| 405 | for i = 1, math.floor(tf / frame) do | |
| 406 | ArtificialHB:Fire() | |
| 407 | end | |
| 408 | lastframe = tick() | |
| 409 | end | |
| 410 | if tossremainder then | |
| 411 | tf = 0 | |
| 412 | else | |
| 413 | tf = tf - frame * math.floor(tf / frame) | |
| 414 | end | |
| 415 | end | |
| 416 | end) | |
| 417 | ||
| 418 | function swait(num) | |
| 419 | if num == 0 or num == nil then | |
| 420 | ArtificialHB.Event:wait() | |
| 421 | else | |
| 422 | for i = 0, num do | |
| 423 | ArtificialHB.Event:wait() | |
| 424 | end | |
| 425 | end | |
| 426 | end | |
| 427 | ||
| 428 | ------------------------------------------------------- | |
| 429 | --Start Damage Function-- | |
| 430 | ------------------------------------------------------- | |
| 431 | function Damage(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch) | |
| 432 | if hit.Parent == nil then | |
| 433 | return | |
| 434 | end | |
| 435 | local h = hit.Parent:FindFirstChildOfClass("Humanoid")
| |
| 436 | for _, v in pairs(hit.Parent:children()) do | |
| 437 | if v:IsA("Humanoid") then
| |
| 438 | h = v | |
| 439 | end | |
| 440 | end | |
| 441 | if h ~= nil and hit.Parent.Name ~= char.Name and hit.Parent:FindFirstChild("UpperTorso") ~= nil then
| |
| 442 | ||
| 443 | hit.Parent:FindFirstChild("Head"):BreakJoints()
| |
| 444 | end | |
| 445 | ||
| 446 | if h ~= nil and hit.Parent.Name ~= char.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
| |
| 447 | if hit.Parent:findFirstChild("DebounceHit") ~= nil then
| |
| 448 | if hit.Parent.DebounceHit.Value == true then | |
| 449 | return | |
| 450 | end | |
| 451 | end | |
| 452 | if insta == true then | |
| 453 | hit.Parent:FindFirstChild("Head"):BreakJoints()
| |
| 454 | end | |
| 455 | local c = Create("ObjectValue"){
| |
| 456 | Name = "creator", | |
| 457 | Value = game:service("Players").LocalPlayer,
| |
| 458 | Parent = h, | |
| 459 | } | |
| 460 | game:GetService("Debris"):AddItem(c, .5)
| |
| 461 | if HitSound ~= nil and HitPitch ~= nil then | |
| 462 | CFuncs.Sound.Create(HitSound, hit, 1, HitPitch) | |
| 463 | end | |
| 464 | local Damage = math.random(minim, maxim) | |
| 465 | local blocked = false | |
| 466 | local block = hit.Parent:findFirstChild("Block")
| |
| 467 | if block ~= nil then | |
| 468 | if block.className == "IntValue" then | |
| 469 | if block.Value > 0 then | |
| 470 | blocked = true | |
| 471 | block.Value = block.Value - 1 | |
| 472 | print(block.Value) | |
| 473 | end | |
| 474 | end | |
| 475 | end | |
| 476 | if blocked == false then | |
| 477 | h.Health = h.Health - Damage | |
| 478 | ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color) | |
| 479 | else | |
| 480 | h.Health = h.Health - (Damage / 2) | |
| 481 | ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color) | |
| 482 | end | |
| 483 | if Type == "Knockdown" then | |
| 484 | local hum = hit.Parent.Humanoid | |
| 485 | hum.PlatformStand = true | |
| 486 | coroutine.resume(coroutine.create(function(HHumanoid) | |
| 487 | swait(1) | |
| 488 | HHumanoid.PlatformStand = false | |
| 489 | end), hum) | |
| 490 | local angle = (hit.Position - (Property.Position + Vector3.new(0, 0, 0))).unit | |
| 491 | local bodvol = Create("BodyVelocity"){
| |
| 492 | velocity = angle * knockback, | |
| 493 | P = 5000, | |
| 494 | maxForce = Vector3.new(8e+003, 8e+003, 8e+003), | |
| 495 | Parent = hit, | |
| 496 | } | |
| 497 | local rl = Create("BodyAngularVelocity"){
| |
| 498 | P = 3000, | |
| 499 | maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000, | |
| 500 | angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)), | |
| 501 | Parent = hit, | |
| 502 | } | |
| 503 | game:GetService("Debris"):AddItem(bodvol, .5)
| |
| 504 | game:GetService("Debris"):AddItem(rl, .5)
| |
| 505 | elseif Type == "Normal" then | |
| 506 | local vp = Create("BodyVelocity"){
| |
| 507 | P = 500, | |
| 508 | maxForce = Vector3.new(math.huge, 0, math.huge), | |
| 509 | velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05, | |
| 510 | } | |
| 511 | if knockback > 0 then | |
| 512 | vp.Parent = hit.Parent.Torso | |
| 513 | end | |
| 514 | game:GetService("Debris"):AddItem(vp, .5)
| |
| 515 | elseif Type == "Up" then | |
| 516 | local bodyVelocity = Create("BodyVelocity"){
| |
| 517 | velocity = Vector3.new(0, 20, 0), | |
| 518 | P = 5000, | |
| 519 | maxForce = Vector3.new(8e+003, 8e+003, 8e+003), | |
| 520 | Parent = hit, | |
| 521 | } | |
| 522 | game:GetService("Debris"):AddItem(bodyVelocity, .5)
| |
| 523 | elseif Type == "DarkUp" then | |
| 524 | coroutine.resume(coroutine.create(function() | |
| 525 | for i = 0, 1, 0.1 do | |
| 526 | swait() | |
| 527 | Effects.Block.Create(BrickColor.new("Black"), hit.Parent.Torso.CFrame, 5, 5, 5, 1, 1, 1, .08, 1)
| |
| 528 | end | |
| 529 | end)) | |
| 530 | local bodyVelocity = Create("BodyVelocity"){
| |
| 531 | velocity = Vector3.new(0, 20, 0), | |
| 532 | P = 5000, | |
| 533 | maxForce = Vector3.new(8e+003, 8e+003, 8e+003), | |
| 534 | Parent = hit, | |
| 535 | } | |
| 536 | game:GetService("Debris"):AddItem(bodyVelocity, 1)
| |
| 537 | elseif Type == "Snare" then | |
| 538 | local bp = Create("BodyPosition"){
| |
| 539 | P = 2000, | |
| 540 | D = 100, | |
| 541 | maxForce = Vector3.new(math.huge, math.huge, math.huge), | |
| 542 | position = hit.Parent.Torso.Position, | |
| 543 | Parent = hit.Parent.Torso, | |
| 544 | } | |
| 545 | game:GetService("Debris"):AddItem(bp, 1)
| |
| 546 | elseif Type == "Freeze" then | |
| 547 | local BodPos = Create("BodyPosition"){
| |
| 548 | P = 50000, | |
| 549 | D = 1000, | |
| 550 | maxForce = Vector3.new(math.huge, math.huge, math.huge), | |
| 551 | position = hit.Parent.Torso.Position, | |
| 552 | Parent = hit.Parent.Torso, | |
| 553 | } | |
| 554 | local BodGy = Create("BodyGyro") {
| |
| 555 | maxTorque = Vector3.new(4e+005, 4e+005, 4e+005) * math.huge , | |
| 556 | P = 20e+003, | |
| 557 | Parent = hit.Parent.Torso, | |
| 558 | cframe = hit.Parent.Torso.CFrame, | |
| 559 | } | |
| 560 | hit.Parent.Torso.Anchored = true | |
| 561 | coroutine.resume(coroutine.create(function(Part) | |
| 562 | swait(1.5) | |
| 563 | Part.Anchored = false | |
| 564 | end), hit.Parent.Torso) | |
| 565 | game:GetService("Debris"):AddItem(BodPos, 3)
| |
| 566 | game:GetService("Debris"):AddItem(BodGy, 3)
| |
| 567 | end | |
| 568 | local debounce = Create("BoolValue"){
| |
| 569 | Name = "DebounceHit", | |
| 570 | Parent = hit.Parent, | |
| 571 | Value = true, | |
| 572 | } | |
| 573 | game:GetService("Debris"):AddItem(debounce, Delay)
| |
| 574 | c = Create("ObjectValue"){
| |
| 575 | Name = "creator", | |
| 576 | Value = Player, | |
| 577 | Parent = h, | |
| 578 | } | |
| 579 | game:GetService("Debris"):AddItem(c, .5)
| |
| 580 | end | |
| 581 | end | |
| 582 | ------------------------------------------------------- | |
| 583 | --End Damage Function-- | |
| 584 | ------------------------------------------------------- | |
| 585 | ||
| 586 | ------------------------------------------------------- | |
| 587 | --Start Damage Function Customization-- | |
| 588 | ------------------------------------------------------- | |
| 589 | function ShowDamage(Pos, Text, Time, Color) | |
| 590 | local Rate = (1 / 30) | |
| 591 | local Pos = (Pos or Vector3.new(0, 0, 0)) | |
| 592 | local Text = (Text or "") | |
| 593 | local Time = (Time or 2) | |
| 594 | local Color = (Color or Color3.new(1, 0, 1)) | |
| 595 | local EffectPart = CFuncs.Part.Create(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0)) | |
| 596 | EffectPart.Anchored = true | |
| 597 | local BillboardGui = Create("BillboardGui"){
| |
| 598 | Size = UDim2.new(3, 0, 3, 0), | |
| 599 | Adornee = EffectPart, | |
| 600 | Parent = EffectPart, | |
| 601 | } | |
| 602 | local TextLabel = Create("TextLabel"){
| |
| 603 | BackgroundTransparency = 1, | |
| 604 | Size = UDim2.new(1, 0, 1, 0), | |
| 605 | Text = Text, | |
| 606 | Font = "Bodoni", | |
| 607 | TextColor3 = Color, | |
| 608 | TextScaled = true, | |
| 609 | TextStrokeColor3 = Color3.fromRGB(0,0,0), | |
| 610 | Parent = BillboardGui, | |
| 611 | } | |
| 612 | game.Debris:AddItem(EffectPart, (Time)) | |
| 613 | EffectPart.Parent = game:GetService("Workspace")
| |
| 614 | delay(0, function() | |
| 615 | local Frames = (Time / Rate) | |
| 616 | for Frame = 1, Frames do | |
| 617 | wait(Rate) | |
| 618 | local Percent = (Frame / Frames) | |
| 619 | EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0) | |
| 620 | TextLabel.TextTransparency = Percent | |
| 621 | end | |
| 622 | if EffectPart and EffectPart.Parent then | |
| 623 | EffectPart:Destroy() | |
| 624 | end | |
| 625 | end) | |
| 626 | end | |
| 627 | ------------------------------------------------------- | |
| 628 | --End Damage Function Customization-- | |
| 629 | ------------------------------------------------------- | |
| 630 | ||
| 631 | function MagniDamage(Part, magni, mindam, maxdam, knock, Type) | |
| 632 | for _, c in pairs(workspace:children()) do | |
| 633 | local hum = c:findFirstChild("Humanoid")
| |
| 634 | if hum ~= nil then | |
| 635 | local head = c:findFirstChild("Head")
| |
| 636 | if head ~= nil then | |
| 637 | local targ = head.Position - Part.Position | |
| 638 | local mag = targ.magnitude | |
| 639 | if magni >= mag and c.Name ~= plr.Name then | |
| 640 | Damage(head, head, mindam, maxdam, knock, Type, root, 0.1, "http://www.roblox.com/asset/?id=0", 1.2) | |
| 641 | end | |
| 642 | end | |
| 643 | end | |
| 644 | end | |
| 645 | end | |
| 646 | ||
| 647 | ||
| 648 | CFuncs = {
| |
| 649 | Part = {
| |
| 650 | Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size) | |
| 651 | local Part = Create("Part")({
| |
| 652 | Parent = Parent, | |
| 653 | Reflectance = Reflectance, | |
| 654 | Transparency = Transparency, | |
| 655 | CanCollide = false, | |
| 656 | Locked = true, | |
| 657 | BrickColor = BrickColor.new(tostring(BColor)), | |
| 658 | Name = Name, | |
| 659 | Size = Size, | |
| 660 | Material = Material | |
| 661 | }) | |
| 662 | RemoveOutlines(Part) | |
| 663 | return Part | |
| 664 | end | |
| 665 | }, | |
| 666 | Mesh = {
| |
| 667 | Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
| 668 | local Msh = Create(Mesh)({
| |
| 669 | Parent = Part, | |
| 670 | Offset = OffSet, | |
| 671 | Scale = Scale | |
| 672 | }) | |
| 673 | if Mesh == "SpecialMesh" then | |
| 674 | Msh.MeshType = MeshType | |
| 675 | Msh.MeshId = MeshId | |
| 676 | end | |
| 677 | return Msh | |
| 678 | end | |
| 679 | }, | |
| 680 | Mesh = {
| |
| 681 | Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
| 682 | local Msh = Create(Mesh)({
| |
| 683 | Parent = Part, | |
| 684 | Offset = OffSet, | |
| 685 | Scale = Scale | |
| 686 | }) | |
| 687 | if Mesh == "SpecialMesh" then | |
| 688 | Msh.MeshType = MeshType | |
| 689 | Msh.MeshId = MeshId | |
| 690 | end | |
| 691 | return Msh | |
| 692 | end | |
| 693 | }, | |
| 694 | Weld = {
| |
| 695 | Create = function(Parent, Part0, Part1, C0, C1) | |
| 696 | local Weld = Create("Weld")({
| |
| 697 | Parent = Parent, | |
| 698 | Part0 = Part0, | |
| 699 | Part1 = Part1, | |
| 700 | C0 = C0, | |
| 701 | C1 = C1 | |
| 702 | }) | |
| 703 | return Weld | |
| 704 | end | |
| 705 | }, | |
| 706 | Sound = {
| |
| 707 | Create = function(id, par, vol, pit) | |
| 708 | coroutine.resume(coroutine.create(function() | |
| 709 | local S = Create("Sound")({
| |
| 710 | Volume = vol, | |
| 711 | Pitch = pit or 1, | |
| 712 | SoundId = id, | |
| 713 | Parent = par or workspace | |
| 714 | }) | |
| 715 | wait() | |
| 716 | S:play() | |
| 717 | game:GetService("Debris"):AddItem(S, 6)
| |
| 718 | end)) | |
| 719 | end | |
| 720 | }, | |
| 721 | ParticleEmitter = {
| |
| 722 | Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread) | |
| 723 | local fp = Create("ParticleEmitter")({
| |
| 724 | Parent = Parent, | |
| 725 | Color = ColorSequence.new(Color1, Color2), | |
| 726 | LightEmission = LightEmission, | |
| 727 | Size = Size, | |
| 728 | Texture = Texture, | |
| 729 | Transparency = Transparency, | |
| 730 | ZOffset = ZOffset, | |
| 731 | Acceleration = Accel, | |
| 732 | Drag = Drag, | |
| 733 | LockedToPart = LockedToPart, | |
| 734 | VelocityInheritance = VelocityInheritance, | |
| 735 | EmissionDirection = EmissionDirection, | |
| 736 | Enabled = Enabled, | |
| 737 | Lifetime = LifeTime, | |
| 738 | Rate = Rate, | |
| 739 | Rotation = Rotation, | |
| 740 | RotSpeed = RotSpeed, | |
| 741 | Speed = Speed, | |
| 742 | VelocitySpread = VelocitySpread | |
| 743 | }) | |
| 744 | return fp | |
| 745 | end | |
| 746 | } | |
| 747 | } | |
| 748 | function RemoveOutlines(part) | |
| 749 | part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10 | |
| 750 | end | |
| 751 | function CreatePart(FormFactor, Parent, Material, Reflectance, Transparency, BColor, Name, Size) | |
| 752 | local Part = Create("Part")({
| |
| 753 | formFactor = FormFactor, | |
| 754 | Parent = Parent, | |
| 755 | Reflectance = Reflectance, | |
| 756 | Transparency = Transparency, | |
| 757 | CanCollide = false, | |
| 758 | Locked = true, | |
| 759 | BrickColor = BrickColor.new(tostring(BColor)), | |
| 760 | Name = Name, | |
| 761 | Size = Size, | |
| 762 | Material = Material | |
| 763 | }) | |
| 764 | RemoveOutlines(Part) | |
| 765 | return Part | |
| 766 | end | |
| 767 | function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale) | |
| 768 | local Msh = Create(Mesh)({
| |
| 769 | Parent = Part, | |
| 770 | Offset = OffSet, | |
| 771 | Scale = Scale | |
| 772 | }) | |
| 773 | if Mesh == "SpecialMesh" then | |
| 774 | Msh.MeshType = MeshType | |
| 775 | Msh.MeshId = MeshId | |
| 776 | end | |
| 777 | return Msh | |
| 778 | end | |
| 779 | function CreateWeld(Parent, Part0, Part1, C0, C1) | |
| 780 | local Weld = Create("Weld")({
| |
| 781 | Parent = Parent, | |
| 782 | Part0 = Part0, | |
| 783 | Part1 = Part1, | |
| 784 | C0 = C0, | |
| 785 | C1 = C1 | |
| 786 | }) | |
| 787 | return Weld | |
| 788 | end | |
| 789 | ||
| 790 | ||
| 791 | ------------------------------------------------------- | |
| 792 | --Start Effect Function-- | |
| 793 | ------------------------------------------------------- | |
| 794 | EffectModel = Instance.new("Model", char)
| |
| 795 | Effects = {
| |
| 796 | Block = {
| |
| 797 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type) | |
| 798 | local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
| 799 | prt.Anchored = true | |
| 800 | prt.CFrame = cframe | |
| 801 | local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
| |
| 802 | game:GetService("Debris"):AddItem(prt, 10)
| |
| 803 | if Type == 1 or Type == nil then | |
| 804 | table.insert(Effects, {
| |
| 805 | prt, | |
| 806 | "Block1", | |
| 807 | delay, | |
| 808 | x3, | |
| 809 | y3, | |
| 810 | z3, | |
| 811 | msh | |
| 812 | }) | |
| 813 | elseif Type == 2 then | |
| 814 | table.insert(Effects, {
| |
| 815 | prt, | |
| 816 | "Block2", | |
| 817 | delay, | |
| 818 | x3, | |
| 819 | y3, | |
| 820 | z3, | |
| 821 | msh | |
| 822 | }) | |
| 823 | else | |
| 824 | table.insert(Effects, {
| |
| 825 | prt, | |
| 826 | "Block3", | |
| 827 | delay, | |
| 828 | x3, | |
| 829 | y3, | |
| 830 | z3, | |
| 831 | msh | |
| 832 | }) | |
| 833 | end | |
| 834 | end | |
| 835 | }, | |
| 836 | Sphere = {
| |
| 837 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
| 838 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
| 839 | prt.Anchored = true | |
| 840 | prt.CFrame = cframe | |
| 841 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
| |
| 842 | game:GetService("Debris"):AddItem(prt, 10)
| |
| 843 | table.insert(Effects, {
| |
| 844 | prt, | |
| 845 | "Cylinder", | |
| 846 | delay, | |
| 847 | x3, | |
| 848 | y3, | |
| 849 | z3, | |
| 850 | msh | |
| 851 | }) | |
| 852 | end | |
| 853 | }, | |
| 854 | Cylinder = {
| |
| 855 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
| 856 | local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
| 857 | prt.Anchored = true | |
| 858 | prt.CFrame = cframe | |
| 859 | local msh = CFuncs.Mesh.Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
| |
| 860 | game:GetService("Debris"):AddItem(prt, 10)
| |
| 861 | table.insert(Effects, {
| |
| 862 | prt, | |
| 863 | "Cylinder", | |
| 864 | delay, | |
| 865 | x3, | |
| 866 | y3, | |
| 867 | z3, | |
| 868 | msh | |
| 869 | }) | |
| 870 | end | |
| 871 | }, | |
| 872 | Wave = {
| |
| 873 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
| 874 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new()) | |
| 875 | prt.Anchored = true | |
| 876 | prt.CFrame = cframe | |
| 877 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://20329976", Vector3.new(0, 0, 0), Vector3.new(x1 / 60, y1 / 60, z1 / 60))
| |
| 878 | game:GetService("Debris"):AddItem(prt, 10)
| |
| 879 | table.insert(Effects, {
| |
| 880 | prt, | |
| 881 | "Cylinder", | |
| 882 | delay, | |
| 883 | x3 / 60, | |
| 884 | y3 / 60, | |
| 885 | z3 / 60, | |
| 886 | msh | |
| 887 | }) | |
| 888 | end | |
| 889 | }, | |
| 890 | Ring = {
| |
| 891 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
| 892 | local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
| 893 | prt.Anchored = true | |
| 894 | prt.CFrame = cframe | |
| 895 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://3270017", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
| |
| 896 | game:GetService("Debris"):AddItem(prt, 10)
| |
| 897 | table.insert(Effects, {
| |
| 898 | prt, | |
| 899 | "Cylinder", | |
| 900 | delay, | |
| 901 | x3, | |
| 902 | y3, | |
| 903 | z3, | |
| 904 | msh | |
| 905 | }) | |
| 906 | end | |
| 907 | }, | |
| 908 | Break = {
| |
| 909 | Create = function(brickcolor, cframe, x1, y1, z1) | |
| 910 | local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5)) | |
| 911 | prt.Anchored = true | |
| 912 | prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
| 913 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
| |
| 914 | local num = math.random(10, 50) / 1000 | |
| 915 | game:GetService("Debris"):AddItem(prt, 10)
| |
| 916 | table.insert(Effects, {
| |
| 917 | prt, | |
| 918 | "Shatter", | |
| 919 | num, | |
| 920 | prt.CFrame, | |
| 921 | math.random() - math.random(), | |
| 922 | 0, | |
| 923 | math.random(50, 100) / 100 | |
| 924 | }) | |
| 925 | end | |
| 926 | }, | |
| 927 | Spiral = {
| |
| 928 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
| 929 | local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
| 930 | prt.Anchored = true | |
| 931 | prt.CFrame = cframe | |
| 932 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://1051557", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
| |
| 933 | game:GetService("Debris"):AddItem(prt, 10)
| |
| 934 | table.insert(Effects, {
| |
| 935 | prt, | |
| 936 | "Cylinder", | |
| 937 | delay, | |
| 938 | x3, | |
| 939 | y3, | |
| 940 | z3, | |
| 941 | msh | |
| 942 | }) | |
| 943 | end | |
| 944 | }, | |
| 945 | Push = {
| |
| 946 | Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay) | |
| 947 | local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new()) | |
| 948 | prt.Anchored = true | |
| 949 | prt.CFrame = cframe | |
| 950 | local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://437347603", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
| |
| 951 | game:GetService("Debris"):AddItem(prt, 10)
| |
| 952 | table.insert(Effects, {
| |
| 953 | prt, | |
| 954 | "Cylinder", | |
| 955 | delay, | |
| 956 | x3, | |
| 957 | y3, | |
| 958 | z3, | |
| 959 | msh | |
| 960 | }) | |
| 961 | end | |
| 962 | } | |
| 963 | } | |
| 964 | function part(formfactor ,parent, reflectance, transparency, brickcolor, name, size) | |
| 965 | local fp = IT("Part")
| |
| 966 | fp.formFactor = formfactor | |
| 967 | fp.Parent = parent | |
| 968 | fp.Reflectance = reflectance | |
| 969 | fp.Transparency = transparency | |
| 970 | fp.CanCollide = false | |
| 971 | fp.Locked = true | |
| 972 | fp.BrickColor = brickcolor | |
| 973 | fp.Name = name | |
| 974 | fp.Size = size | |
| 975 | fp.Position = tors.Position | |
| 976 | RemoveOutlines(fp) | |
| 977 | fp.Material = "SmoothPlastic" | |
| 978 | fp:BreakJoints() | |
| 979 | return fp | |
| 980 | end | |
| 981 | ||
| 982 | function mesh(Mesh,part,meshtype,meshid,offset,scale) | |
| 983 | local mesh = IT(Mesh) | |
| 984 | mesh.Parent = part | |
| 985 | if Mesh == "SpecialMesh" then | |
| 986 | mesh.MeshType = meshtype | |
| 987 | if meshid ~= "nil" then | |
| 988 | mesh.MeshId = "http://www.roblox.com/asset/?id="..meshid | |
| 989 | end | |
| 990 | end | |
| 991 | mesh.Offset = offset | |
| 992 | mesh.Scale = scale | |
| 993 | return mesh | |
| 994 | end | |
| 995 | ||
| 996 | function Magic(bonuspeed, type, pos, scale, value, color, MType) | |
| 997 | local type = type | |
| 998 | local rng = Instance.new("Part", char)
| |
| 999 | rng.Anchored = true | |
| 1000 | rng.BrickColor = color | |
| 1001 | rng.CanCollide = false | |
| 1002 | rng.FormFactor = 3 | |
| 1003 | rng.Name = "Ring" | |
| 1004 | rng.Material = "Neon" | |
| 1005 | rng.Size = Vector3.new(1, 1, 1) | |
| 1006 | rng.Transparency = 0 | |
| 1007 | rng.TopSurface = 0 | |
| 1008 | rng.BottomSurface = 0 | |
| 1009 | rng.CFrame = pos | |
| 1010 | local rngm = Instance.new("SpecialMesh", rng)
| |
| 1011 | rngm.MeshType = MType | |
| 1012 | rngm.Scale = scale | |
| 1013 | local scaler2 = 1 | |
| 1014 | if type == "Add" then | |
| 1015 | scaler2 = 1 * value | |
| 1016 | elseif type == "Divide" then | |
| 1017 | scaler2 = 1 / value | |
| 1018 | end | |
| 1019 | coroutine.resume(coroutine.create(function() | |
| 1020 | for i = 0, 10 / bonuspeed, 0.1 do | |
| 1021 | swait() | |
| 1022 | if type == "Add" then | |
| 1023 | scaler2 = scaler2 - 0.01 * value / bonuspeed | |
| 1024 | elseif type == "Divide" then | |
| 1025 | scaler2 = scaler2 - 0.01 / value * bonuspeed | |
| 1026 | end | |
| 1027 | rng.Transparency = rng.Transparency + 0.01 * bonuspeed | |
| 1028 | rngm.Scale = rngm.Scale + Vector3.new(scaler2 * bonuspeed, scaler2 * bonuspeed, scaler2 * bonuspeed) | |
| 1029 | end | |
| 1030 | rng:Destroy() | |
| 1031 | end)) | |
| 1032 | end | |
| 1033 | ||
| 1034 | function Eviscerate(dude) | |
| 1035 | if dude.Name ~= char then | |
| 1036 | local bgf = IT("BodyGyro", dude.Head)
| |
| 1037 | bgf.CFrame = bgf.CFrame * CFrame.fromEulerAnglesXYZ(Rad(-90), 0, 0) | |
| 1038 | local val = IT("BoolValue", dude)
| |
| 1039 | val.Name = "IsHit" | |
| 1040 | local ds = coroutine.wrap(function() | |
| 1041 | dude:WaitForChild("Head"):BreakJoints()
| |
| 1042 | wait(0.5) | |
| 1043 | target = nil | |
| 1044 | coroutine.resume(coroutine.create(function() | |
| 1045 | for i, v in pairs(dude:GetChildren()) do | |
| 1046 | if v:IsA("Accessory") then
| |
| 1047 | v:Destroy() | |
| 1048 | end | |
| 1049 | if v:IsA("Humanoid") then
| |
| 1050 | v:Destroy() | |
| 1051 | end | |
| 1052 | if v:IsA("CharacterMesh") then
| |
| 1053 | v:Destroy() | |
| 1054 | end | |
| 1055 | if v:IsA("Model") then
| |
| 1056 | v:Destroy() | |
| 1057 | end | |
| 1058 | if v:IsA("Part") or v:IsA("MeshPart") then
| |
| 1059 | for x, o in pairs(v:GetChildren()) do | |
| 1060 | if o:IsA("Decal") then
| |
| 1061 | o:Destroy() | |
| 1062 | end | |
| 1063 | end | |
| 1064 | coroutine.resume(coroutine.create(function() | |
| 1065 | v.Material = "Neon" | |
| 1066 | v.CanCollide = false | |
| 1067 | local PartEmmit1 = IT("ParticleEmitter", v)
| |
| 1068 | PartEmmit1.LightEmission = 1 | |
| 1069 | PartEmmit1.Texture = "rbxassetid://284205403" | |
| 1070 | PartEmmit1.Color = ColorSequence.new(maincolor.Color) | |
| 1071 | PartEmmit1.Rate = 150 | |
| 1072 | PartEmmit1.Lifetime = NumberRange.new(1) | |
| 1073 | PartEmmit1.Size = NumberSequence.new({
| |
| 1074 | NumberSequenceKeypoint.new(0, 0.75, 0), | |
| 1075 | NumberSequenceKeypoint.new(1, 0, 0) | |
| 1076 | }) | |
| 1077 | PartEmmit1.Transparency = NumberSequence.new({
| |
| 1078 | NumberSequenceKeypoint.new(0, 0, 0), | |
| 1079 | NumberSequenceKeypoint.new(1, 1, 0) | |
| 1080 | }) | |
| 1081 | PartEmmit1.Speed = NumberRange.new(0, 0) | |
| 1082 | PartEmmit1.VelocitySpread = 30000 | |
| 1083 | PartEmmit1.Rotation = NumberRange.new(-500, 500) | |
| 1084 | PartEmmit1.RotSpeed = NumberRange.new(-500, 500) | |
| 1085 | local BodPoss = IT("BodyPosition", v)
| |
| 1086 | BodPoss.P = 3000 | |
| 1087 | BodPoss.D = 1000 | |
| 1088 | BodPoss.maxForce = Vector3.new(50000000000, 50000000000, 50000000000) | |
| 1089 | BodPoss.position = v.Position + Vector3.new(Mrandom(-15, 15), Mrandom(-15, 15), Mrandom(-15, 15)) | |
| 1090 | v.Color = maincolor.Color | |
| 1091 | coroutine.resume(coroutine.create(function() | |
| 1092 | for i = 0, 49 do | |
| 1093 | swait(1) | |
| 1094 | v.Transparency = v.Transparency + 0.08 | |
| 1095 | end | |
| 1096 | wait(0.5) | |
| 1097 | PartEmmit1.Enabled = false | |
| 1098 | wait(3) | |
| 1099 | v:Destroy() | |
| 1100 | dude:Destroy() | |
| 1101 | end)) | |
| 1102 | end)) | |
| 1103 | end | |
| 1104 | end | |
| 1105 | end)) | |
| 1106 | end) | |
| 1107 | ds() | |
| 1108 | end | |
| 1109 | end | |
| 1110 | ||
| 1111 | function FindNearestHead(Position, Distance, SinglePlayer) | |
| 1112 | if SinglePlayer then | |
| 1113 | return Distance > (SinglePlayer.Torso.CFrame.p - Position).magnitude | |
| 1114 | end | |
| 1115 | local List = {}
| |
| 1116 | for i, v in pairs(workspace:GetChildren()) do | |
| 1117 | if v:IsA("Model") and v:findFirstChild("Head") and v ~= char and Distance >= (v.Head.Position - Position).magnitude then
| |
| 1118 | table.insert(List, v) | |
| 1119 | end | |
| 1120 | end | |
| 1121 | return List | |
| 1122 | end | |
| 1123 | ||
| 1124 | function Aura(bonuspeed, FastSpeed, type, pos, x1, y1, z1, value, color, outerpos, MType) | |
| 1125 | local type = type | |
| 1126 | local rng = Instance.new("Part", char)
| |
| 1127 | rng.Anchored = true | |
| 1128 | rng.BrickColor = color | |
| 1129 | rng.CanCollide = false | |
| 1130 | rng.FormFactor = 3 | |
| 1131 | rng.Name = "Ring" | |
| 1132 | rng.Material = "Neon" | |
| 1133 | rng.Size = Vector3.new(1, 1, 1) | |
| 1134 | rng.Transparency = 0 | |
| 1135 | rng.TopSurface = 0 | |
| 1136 | rng.BottomSurface = 0 | |
| 1137 | rng.CFrame = pos | |
| 1138 | rng.CFrame = rng.CFrame + rng.CFrame.lookVector * outerpos | |
| 1139 | local rngm = Instance.new("SpecialMesh", rng)
| |
| 1140 | rngm.MeshType = MType | |
| 1141 | rngm.Scale = Vector3.new(x1, y1, z1) | |
| 1142 | local scaler2 = 1 | |
| 1143 | local speeder = FastSpeed | |
| 1144 | if type == "Add" then | |
| 1145 | scaler2 = 1 * value | |
| 1146 | elseif type == "Divide" then | |
| 1147 | scaler2 = 1 / value | |
| 1148 | end | |
| 1149 | coroutine.resume(coroutine.create(function() | |
| 1150 | for i = 0, 10 / bonuspeed, 0.1 do | |
| 1151 | swait() | |
| 1152 | if type == "Add" then | |
| 1153 | scaler2 = scaler2 - 0.01 * value / bonuspeed | |
| 1154 | elseif type == "Divide" then | |
| 1155 | scaler2 = scaler2 - 0.01 / value * bonuspeed | |
| 1156 | end | |
| 1157 | speeder = speeder - 0.01 * FastSpeed * bonuspeed | |
| 1158 | rng.CFrame = rng.CFrame + rng.CFrame.lookVector * speeder * bonuspeed | |
| 1159 | rng.Transparency = rng.Transparency + 0.01 * bonuspeed | |
| 1160 | rngm.Scale = rngm.Scale + Vector3.new(scaler2 * bonuspeed, scaler2 * bonuspeed, 0) | |
| 1161 | end | |
| 1162 | rng:Destroy() | |
| 1163 | end)) | |
| 1164 | end | |
| 1165 | ||
| 1166 | function SoulSteal(dude) | |
| 1167 | if dude.Name ~= char then | |
| 1168 | local bgf = IT("BodyGyro", dude.Head)
| |
| 1169 | bgf.CFrame = bgf.CFrame * CFrame.fromEulerAnglesXYZ(Rad(-90), 0, 0) | |
| 1170 | local val = IT("BoolValue", dude)
| |
| 1171 | val.Name = "IsHit" | |
| 1172 | local torso = (dude:FindFirstChild'Head' or dude:FindFirstChild'Torso' or dude:FindFirstChild'UpperTorso' or dude:FindFirstChild'LowerTorso' or dude:FindFirstChild'HumanoidRootPart') | |
| 1173 | local soulst = coroutine.wrap(function() | |
| 1174 | local soul = Instance.new("Part",dude)
| |
| 1175 | soul.Size = Vector3.new(1,1,1) | |
| 1176 | soul.CanCollide = false | |
| 1177 | soul.Anchored = false | |
| 1178 | soul.Position = torso.Position | |
| 1179 | soul.Transparency = 1 | |
| 1180 | local PartEmmit1 = IT("ParticleEmitter", soul)
| |
| 1181 | PartEmmit1.LightEmission = 1 | |
| 1182 | PartEmmit1.Texture = "rbxassetid://569507414" | |
| 1183 | PartEmmit1.Color = ColorSequence.new(maincolor.Color) | |
| 1184 | PartEmmit1.Rate = 250 | |
| 1185 | PartEmmit1.Lifetime = NumberRange.new(1.6) | |
| 1186 | PartEmmit1.Size = NumberSequence.new({
| |
| 1187 | NumberSequenceKeypoint.new(0, 1, 0), | |
| 1188 | NumberSequenceKeypoint.new(1, 0, 0) | |
| 1189 | }) | |
| 1190 | PartEmmit1.Transparency = NumberSequence.new({
| |
| 1191 | NumberSequenceKeypoint.new(0, 0, 0), | |
| 1192 | NumberSequenceKeypoint.new(1, 1, 0) | |
| 1193 | }) | |
| 1194 | PartEmmit1.Speed = NumberRange.new(0, 0) | |
| 1195 | PartEmmit1.VelocitySpread = 30000 | |
| 1196 | PartEmmit1.Rotation = NumberRange.new(-360, 360) | |
| 1197 | PartEmmit1.RotSpeed = NumberRange.new(-360, 360) | |
| 1198 | local BodPoss = IT("BodyPosition", soul)
| |
| 1199 | BodPoss.P = 3000 | |
| 1200 | BodPoss.D = 1000 | |
| 1201 | BodPoss.maxForce = Vector3.new(50000000000, 50000000000, 50000000000) | |
| 1202 | BodPoss.position = torso.Position + Vector3.new(Mrandom(-15, 15), Mrandom(-15, 15), Mrandom(-15, 15)) | |
| 1203 | wait(1.6) | |
| 1204 | soul.Touched:connect(function(hit) | |
| 1205 | if hit.Parent == char then | |
| 1206 | soul:Destroy() | |
| 1207 | end | |
| 1208 | end) | |
| 1209 | wait(1.2) | |
| 1210 | while soul do | |
| 1211 | swait() | |
| 1212 | PartEmmit1.Color = ColorSequence.new(maincolor.Color) | |
| 1213 | BodPoss.Position = tors.Position | |
| 1214 | end | |
| 1215 | end) | |
| 1216 | soulst() | |
| 1217 | end | |
| 1218 | end | |
| 1219 | function FaceMouse() | |
| 1220 | local Cam = workspace.CurrentCamera | |
| 1221 | return {
| |
| 1222 | CFrame.new(char.Torso.Position, Vector3.new(mouse.Hit.p.x, char.Torso.Position.y, mouse.Hit.p.z)), | |
| 1223 | Vector3.new(mouse.Hit.p.x, mouse.Hit.p.y, mouse.Hit.p.z) | |
| 1224 | } | |
| 1225 | end | |
| 1226 | ------------------------------------------------------- | |
| 1227 | --End Effect Function-- | |
| 1228 | ------------------------------------------------------- | |
| 1229 | function Cso(ID, PARENT, VOLUME, PITCH) | |
| 1230 | local NSound = nil | |
| 1231 | coroutine.resume(coroutine.create(function() | |
| 1232 | NSound = IT("Sound", PARENT)
| |
| 1233 | NSound.Volume = VOLUME | |
| 1234 | NSound.Pitch = PITCH | |
| 1235 | NSound.SoundId = "http://www.roblox.com/asset/?id="..ID | |
| 1236 | swait() | |
| 1237 | NSound:play() | |
| 1238 | game:GetService("Debris"):AddItem(NSound, 10)
| |
| 1239 | end)) | |
| 1240 | return NSound | |
| 1241 | end | |
| 1242 | ||
| 1243 | ------------------------------------------------------- | |
| 1244 | --End Important Functions-- | |
| 1245 | ------------------------------------------------------- | |
| 1246 | ||
| 1247 | ||
| 1248 | ------------------------------------------------------- | |
| 1249 | --Start Attacks N Stuff-- | |
| 1250 | ------------------------------------------------------- | |
| 1251 | local sine=0 | |
| 1252 | function Cuddle() | |
| 1253 | for i, v in pairs(FindNearestHead(tors.CFrame.p, 4)) do | |
| 1254 | if v:FindFirstChild("Head") then
| |
| 1255 | attack = true | |
| 1256 | hum.WalkSpeed = 0 | |
| 1257 | for i = 0,1,0.1 do | |
| 1258 | swait() | |
| 1259 | rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -0.1 + 0.1 * Cos(sine / 20)) * angles(Rad(0), Rad(0), Rad(0)), 0.15) | |
| 1260 | tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(0), Rad(10), Rad(0)), 0.3) | |
| 1261 | RH.C0 = clerp(RH.C0, CF(1, -0.9 - 0.1 * Cos(sine / 20), 0) * RHCF * angles(Rad(0), Rad(0), Rad(0)), 0.15) | |
| 1262 | LH.C0 = clerp(LH.C0, CF(-1, -0.9 - 0.1 * Cos(sine / 20), 0) * LHCF * angles(Rad(0), Rad(0), Rad(0)), 0.15) | |
| 1263 | RW.C0 = clerp(RW.C0, CF(1.5, 0.5 + 0.02 * Sin(sine / 20), 0) * angles(Rad(100), Rad(0), Rad(35.5 + 1.5 * Sin(sine / 20))), 0.3) | |
| 1264 | LW.C0 = clerp(LW.C0, CF(-1.5, 0.5 + 0.02 * Sin(sine / 20), 0) * angles(Rad(100), Rad(0), Rad(-35.5 - 1.5 * Sin(sine / 20))), 0.3) | |
| 1265 | end | |
| 1266 | CreateWeld(tors,tors,v.Torso,CFrame.new(0,0,-1) *angles(0,380,0)) | |
| 1267 | v.Torso.Anchored = true | |
| 1268 | for i = 0,10,0.1 do | |
| 1269 | swait() | |
| 1270 | rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -0.1 + 0.1 * Cos(sine / 20)) * angles(Rad(0), Rad(0), Rad(0)), 0.15) | |
| 1271 | tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(0), Rad(20), Rad(20 *Cos(sine / 7))), 0.3) | |
| 1272 | RH.C0 = clerp(RH.C0, CF(1, -0.9 - 0.1 * Cos(sine / 20), 0) * RHCF * angles(Rad(0), Rad(0), Rad(0)), 0.15) | |
| 1273 | LH.C0 = clerp(LH.C0, CF(-1, -0.9 - 0.1 * Cos(sine / 20), 0) * LHCF * angles(Rad(0), Rad(0), Rad(0)), 0.15) | |
| 1274 | RW.C0 = clerp(RW.C0, CF(1, 0.5 + 0.02 * Sin(sine / 20), -.5) * angles(Rad(100), Rad(0), Rad(-35.5 + 1.5 * Sin(sine / 20))), 0.3) | |
| 1275 | LW.C0 = clerp(LW.C0, CF(-1, 0.5 + 0.02 * Sin(sine / 20), -.5) * angles(Rad(100), Rad(0), Rad(35.5 - 1.5 * Sin(sine / 20))), 0.3) | |
| 1276 | end | |
| 1277 | v.Torso.Anchored = false | |
| 1278 | end | |
| 1279 | end | |
| 1280 | tors.Weld:Destroy() | |
| 1281 | attack = false | |
| 1282 | hum.WalkSpeed = 12 | |
| 1283 | end | |
| 1284 | ||
| 1285 | ------------------------------------------------------- | |
| 1286 | --End Attacks N Stuff-- | |
| 1287 | ------------------------------------------------------- | |
| 1288 | mouse.KeyDown:connect(function(key) | |
| 1289 | if attack == false then | |
| 1290 | if key == 'e' then | |
| 1291 | Cuddle() | |
| 1292 | end | |
| 1293 | end | |
| 1294 | end) | |
| 1295 | ||
| 1296 | ||
| 1297 | ||
| 1298 | ||
| 1299 | ||
| 1300 | ||
| 1301 | ||
| 1302 | Sprinting = false | |
| 1303 | mouse.KeyDown:connect(function(key) | |
| 1304 | if string.byte(key) == 48 and attack == false and Mode ~= 10 then | |
| 1305 | hum.WalkSpeed = 25 | |
| 1306 | Sprinting = true | |
| 1307 | end | |
| 1308 | end) | |
| 1309 | mouse.KeyUp:connect(function(key) | |
| 1310 | if string.byte(key) == 48 and attack == false then | |
| 1311 | Sprinting = false | |
| 1312 | hum.WalkSpeed = 12 | |
| 1313 | end | |
| 1314 | end) | |
| 1315 | ------------------------------------------------------- | |
| 1316 | --Start Animations-- | |
| 1317 | ------------------------------------------------------- | |
| 1318 | local equipped = false | |
| 1319 | local idle = 0 | |
| 1320 | local change = 1 | |
| 1321 | local val = 0 | |
| 1322 | local toim = 0 | |
| 1323 | local idleanim = 0.4 | |
| 1324 | hum.WalkSpeed = 12 | |
| 1325 | hum.Animator.Parent = nil | |
| 1326 | while true do | |
| 1327 | swait() | |
| 1328 | sine = sine + change | |
| 1329 | local torvel = (root.Velocity * Vector3.new(1, 0, 1)).magnitude | |
| 1330 | local velderp = root.Velocity.y | |
| 1331 | hitfloor, posfloor = rayCast(root.Position, CFrame.new(root.Position, root.Position - Vector3.new(0, 1, 0)).lookVector, 4, char) | |
| 1332 | if equipped == true or equipped == false then | |
| 1333 | if attack == false then | |
| 1334 | idle = idle + 1 | |
| 1335 | else | |
| 1336 | idle = 0 | |
| 1337 | end | |
| 1338 | local exactVel = CFrame.new(root.CFrame:vectorToObjectSpace(root.Velocity))-- for footplanting | |
| 1339 | --you g00b my leg animations are complicated :joy: | |
| 1340 | ||
| 1341 | if 1 < root.Velocity.y and hitfloor == nil then | |
| 1342 | Anim = "Jump" | |
| 1343 | if attack == false then | |
| 1344 | rootj.C0 = clerp(rootj.C0, RootCF * angles(math.min(math.max(root.Velocity.Y/100,-Rad(65)),Rad(65)),0,0),0.3) | |
| 1345 | tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(-30), Rad(0), Rad(0)), 0.3) | |
| 1346 | RW.C0 = clerp(RW.C0, CF(1.5, 0.5 + 0.02 * Sin(sine / 20), 0) * angles(Rad(0), Rad(-20), Rad(80)), 0.3) | |
| 1347 | LW.C0 = clerp(LW.C0, CF(-1.5, 0.5 + 0.02 * Sin(sine / 20), 0) * angles(Rad(0), Rad(20), Rad(-80)), 0.3) | |
| 1348 | LH.C0=clerp(LH.C0, CF(-1,-.4-0.1 * Cos(sine / 20), -.6) * LHCF * angles(Rad(-5), Rad(-0), Rad(20)), 0.15) | |
| 1349 | RH.C0=clerp(RH.C0, CF(1,-1-0.1 * Cos(sine / 20), -.3) * angles(Rad(0), Rad(90), Rad(0)), .3) | |
| 1350 | end | |
| 1351 | elseif -1 > root.Velocity.y and hitfloor == nil then | |
| 1352 | Anim = "Fall" | |
| 1353 | if attack == false then | |
| 1354 | rootj.C0 = clerp(rootj.C0, RootCF * angles(math.min(math.max(root.Velocity.Y/100,-Rad(65)),Rad(65)),0,0),0.3) | |
| 1355 | tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(35.5), Rad(0), Rad(0)), 0.3) | |
| 1356 | RW.C0 = clerp(RW.C0, CF(1.5, 0.5 + 0.02 * Sin(sine / 20), 0) * angles(Rad(0), Rad(20), Rad(150)), 0.3) | |
| 1357 | LW.C0 = clerp(LW.C0, CF(-1.5, 0.5 + 0.02 * Sin(sine / 20), 0) * angles(Rad(0), Rad(-20), Rad(-150)), 0.3) | |
| 1358 | LH.C0 = clerp(LH.C0, CF(-1,-.4-0.1 * Cos(sine / 20), -.6) * LHCF * angles(Rad(-5), Rad(-0), Rad(20)), 0.15) | |
| 1359 | RH.C0 = clerp(RH.C0, CF(1,-1-0.1 * Cos(sine / 20), -.3) * angles(Rad(0), Rad(90), Rad(0)), .3) | |
| 1360 | end | |
| 1361 | elseif torvel < 1 and hitfloor ~= nil then | |
| 1362 | Anim = "Idle" | |
| 1363 | change = .5 | |
| 1364 | if attack == false then | |
| 1365 | rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -0.1 + 0.1 * Cos(sine / 20)) * angles(Rad(0), Rad(0), Rad(0)), 0.15) | |
| 1366 | tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(0), Rad(0), Rad(0)), 0.3) | |
| 1367 | RH.C0 = clerp(RH.C0, CF(1, -0.9 - 0.1 * Cos(sine / 20), 0) * RHCF * angles(Rad(0), Rad(0), Rad(0)), 0.15) | |
| 1368 | LH.C0 = clerp(LH.C0, CF(-1, -0.9 - 0.1 * Cos(sine / 20), 0) * LHCF * angles(Rad(0), Rad(0), Rad(0)), 0.15) | |
| 1369 | RW.C0 = clerp(RW.C0, CF(1.5, 0.5 + 0.2 * Sin(sine / 20), 0) * angles(Rad(0), Rad(0), Rad(10 * Sin(sine / 20))), 0.1) | |
| 1370 | LW.C0 = clerp(LW.C0, CF(-1.5, 0.5 + 0.2 * Sin(sine / 20), 0) * angles(Rad(0), Rad(0), Rad(-10 * Sin(sine / 20))), 0.1) | |
| 1371 | end | |
| 1372 | elseif tors.Velocity.magnitude < 20 and hitfloor ~= nil then | |
| 1373 | Anim = "Walk" | |
| 1374 | change = .9 | |
| 1375 | if attack == false then | |
| 1376 | rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -0.175 + 0.005 * Cos(sine / 3.5) + -Sin(sine / 3.5) / 7) * angles(Rad(5 + 5 *Cos(sine / 3.5)), Rad(0) - root.RotVelocity.Y / 75, Rad(8 * Cos(sine / 7))), 0.15) | |
| 1377 | tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(-2.5 * Sin(sine / 7)), Rad(0), Rad(0) - hed.RotVelocity.Y / 15), 0.3) | |
| 1378 | RH.C0 = clerp(RH.C0, CF(1, -0.8 - 0.5 * Cos(sine / 7) / 2, 0.6 * Cos(sine / 7) / 2) * angles(Rad(-5 - 20 * Cos(sine / 7)) - rl.RotVelocity.Y / 75 + -Sin(sine / 7) / 2.5, Rad(90 - 0.1 * Cos(sine / 7)), Rad(0)) * angles(Rad(0 + 3 * Cos(sine / 7)), Rad(0), Rad(0)), 0.3) | |
| 1379 | LH.C0 = clerp(LH.C0, CF(-1, -0.8 + 0.5 * Cos(sine / 7) / 2, -0.6 * Cos(sine / 7) / 2) * angles(Rad(-5 + 20 * Cos(sine / 7)) + ll.RotVelocity.Y / 75 + Sin(sine / 7) / 2.5, Rad(-90 - 0.1 * Cos(sine / 7)), Rad(0)) * angles(Rad(0 - 3 * Cos(sine / 7)), Rad(0), Rad(0)), 0.3) | |
| 1380 | RW.C0 = clerp(RW.C0, CF(1.5, 0.5 + 0.02 * Sin(sine / 20), 0) * angles(Rad(65 *Cos(sine / 7)), Rad(0), Rad(2.5)), 0.1) | |
| 1381 | LW.C0 = clerp(LW.C0, CF(-1.5, 0.5 + 0.02 * Sin(sine / 20), 0) * angles(Rad(-65 *Cos(sine / 7)), Rad(0), Rad(-2.5)), 0.1) | |
| 1382 | end | |
| 1383 | elseif tors.Velocity.magnitude <= 50 and hitfloor ~= nil then | |
| 1384 | Anim = "Sprint" | |
| 1385 | change = .9 | |
| 1386 | if attack == false then | |
| 1387 | rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -0.175 + 0.025 * Cos(sine / 3.5) + -Sin(sine / 3.5) / 7) * angles(Rad(26 - 4.5 * Cos(sine / 3.5)), Rad(0) - root.RotVelocity.Y / 75, Rad(15 * Cos(sine / 7))), 0.15) | |
| 1388 | tors.Neck.C0 = clerp(tors.Neck.C0, necko* CF(0, 0, 0 + ((1) - 1)) * angles(Rad(-2.5 * Sin(sine / 20)), Rad(0), Rad(0) - hed.RotVelocity.Y / 15), 0.3) | |
| 1389 | RH.C0 = clerp(RH.C0, CF(1, -0.925 - 0.5 * Cos(sine / 7) / 2, 0.7 * Cos(sine / 7) / 2) * angles(Rad(-15 - 55 * Cos(sine / 7)) - rl.RotVelocity.Y / 75 + -Sin(sine / 7) / 2.5, Rad(90 - 0.1 * Cos(sine / 7)), Rad(0)) * angles(Rad(0 + 0.1 * Cos(sine / 7)), Rad(0), Rad(0)), 0.3) | |
| 1390 | LH.C0 = clerp(LH.C0, CF(-1, -0.925 + 0.5 * Cos(sine / 7) / 2, -0.7 * Cos(sine / 7) / 2) * angles(Rad(-15 + 55 * Cos(sine / 7)) + ll.RotVelocity.Y / 75 + Sin(sine / 7) / 2.5, Rad(-90 - 0.1 * Cos(sine / 7)), Rad(0)) * angles(Rad(0 - 0.1 * Cos(sine / 7)), Rad(0), Rad(0)), 0.3) | |
| 1391 | RW.C0 = clerp(RW.C0, CF(1.5, 0.5 + 0.05 * Sin(sine / 30), -0.2 * Cos(sine / 7)) * angles(Rad(100) * Cos(sine / 7) , Rad(0), Rad(5) - ra.RotVelocity.Y / 75), 0.15) | |
| 1392 | LW.C0 = clerp(LW.C0, CF(-1.5, 0.5 + 0.05 * Sin(sine / 30), 0.2 * Cos(sine / 7)) * angles(Rad(-100) * Cos(sine / 7) , Rad(0) , Rad(-5) + la.RotVelocity.Y / 75), 0.15) | |
| 1393 | end | |
| 1394 | end | |
| 1395 | end | |
| 1396 | if 0 < #Effects then | |
| 1397 | for e = 1, #Effects do | |
| 1398 | if Effects[e] ~= nil then | |
| 1399 | local Thing = Effects[e] | |
| 1400 | if Thing ~= nil then | |
| 1401 | local Part = Thing[1] | |
| 1402 | local Mode = Thing[2] | |
| 1403 | local Delay = Thing[3] | |
| 1404 | local IncX = Thing[4] | |
| 1405 | local IncY = Thing[5] | |
| 1406 | local IncZ = Thing[6] | |
| 1407 | if 1 >= Thing[1].Transparency then | |
| 1408 | if Thing[2] == "Block1" then | |
| 1409 | Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) | |
| 1410 | local Mesh = Thing[1].Mesh | |
| 1411 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
| 1412 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1413 | elseif Thing[2] == "Block2" then | |
| 1414 | Thing[1].CFrame = Thing[1].CFrame + Vector3.new(0, 0, 0) | |
| 1415 | local Mesh = Thing[7] | |
| 1416 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
| 1417 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1418 | elseif Thing[2] == "Block3" then | |
| 1419 | Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) + Vector3.new(0, 0.15, 0) | |
| 1420 | local Mesh = Thing[7] | |
| 1421 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
| 1422 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1423 | elseif Thing[2] == "Cylinder" then | |
| 1424 | local Mesh = Thing[1].Mesh | |
| 1425 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
| 1426 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1427 | elseif Thing[2] == "Blood" then | |
| 1428 | local Mesh = Thing[7] | |
| 1429 | Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, 0.5, 0) | |
| 1430 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6]) | |
| 1431 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1432 | elseif Thing[2] == "Elec" then | |
| 1433 | local Mesh = Thing[1].Mesh | |
| 1434 | Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9]) | |
| 1435 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1436 | elseif Thing[2] == "Disappear" then | |
| 1437 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1438 | elseif Thing[2] == "Shatter" then | |
| 1439 | Thing[1].Transparency = Thing[1].Transparency + Thing[3] | |
| 1440 | Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0) | |
| 1441 | Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0) | |
| 1442 | Thing[6] = Thing[6] + Thing[5] | |
| 1443 | end | |
| 1444 | else | |
| 1445 | Part.Parent = nil | |
| 1446 | table.remove(Effects, e) | |
| 1447 | end | |
| 1448 | end | |
| 1449 | end | |
| 1450 | end | |
| 1451 | end | |
| 1452 | end | |
| 1453 | ------------------------------------------------------- | |
| 1454 | --End Animations And Script-- | |
| 1455 | ------------------------------------------------------- |