SHOW:
|
|
- or go back to the newest paste.
| 1 | - | -- Created by Nebula_Zorua -- |
| 1 | + | -- Created by Nebula_Zorua -- Edit by VEVC3 -- |
| 2 | -- Heartbeat -- | |
| 3 | -- Bwah. -- | |
| 4 | -- Discord: Nebula the Zorua#6969 | |
| 5 | -- Youtube: https://www.youtube.com/channel/UCo9oU9dCw8jnuVLuy4_SATA | |
| 6 | ||
| 7 | ||
| 8 | ||
| 9 | --// Shortcut Variables \\-- | |
| 10 | local S = setmetatable({},{__index = function(s,i) return game:service(i) end})
| |
| 11 | local CF = {N=CFrame.new,A=CFrame.Angles,fEA=CFrame.fromEulerAnglesXYZ}
| |
| 12 | local C3 = {N=Color3.new,RGB=Color3.fromRGB,HSV=Color3.fromHSV,tHSV=Color3.toHSV}
| |
| 13 | local V3 = {N=Vector3.new,FNI=Vector3.FromNormalId,A=Vector3.FromAxis}
| |
| 14 | local M = {C=math.cos,R=math.rad,S=math.sin,P=math.pi,RNG=math.random,MRS=math.randomseed,H=math.huge,RRNG = function(min,max,div) return math.rad(math.random(min,max)/(div or 1)) end}
| |
| 15 | local R3 = {N=Region3.new}
| |
| 16 | local De = S.Debris | |
| 17 | local WS = workspace | |
| 18 | local Lght = S.Lighting | |
| 19 | local RepS = S.ReplicatedStorage | |
| 20 | local IN = Instance.new | |
| 21 | local Plrs = S.Players | |
| 22 | ||
| 23 | --// Initializing \\-- | |
| 24 | local Plr = Plrs.LocalPlayer | |
| 25 | local Char = Plr.Character | |
| 26 | local Hum = Char:FindFirstChildOfClass'Humanoid' | |
| 27 | local RArm = Char["Right Arm"] | |
| 28 | local LArm = Char["Left Arm"] | |
| 29 | local RLeg = Char["Right Leg"] | |
| 30 | local LLeg = Char["Left Leg"] | |
| 31 | local Root = Char:FindFirstChild'HumanoidRootPart' | |
| 32 | local Torso = Char.Torso | |
| 33 | local Head = Char.Head | |
| 34 | local NeutralAnims = true | |
| 35 | local Attack = false | |
| 36 | local Debounces = {Debounces={}}
| |
| 37 | local Mouse = Plr:GetMouse() | |
| 38 | local Hit = {}
| |
| 39 | local Sine = 0 | |
| 40 | local Change = 1 | |
| 41 | ||
| 42 | local Hearts = {}
| |
| 43 | ||
| 44 | local Effects = IN("Folder",Char)
| |
| 45 | Effects.Name = "Effects" | |
| 46 | ||
| 47 | ||
| 48 | --// Debounce System \\-- | |
| 49 | ||
| 50 | ||
| 51 | function Debounces:New(name,cooldown) | |
| 52 | local aaaaa = {Usable=true,Cooldown=cooldown or 2,CoolingDown=false,LastUse=0}
| |
| 53 | setmetatable(aaaaa,{__index = Debounces})
| |
| 54 | Debounces.Debounces[name] = aaaaa | |
| 55 | return aaaaa | |
| 56 | end | |
| 57 | ||
| 58 | function Debounces:Use(overrideUsable) | |
| 59 | assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use") | |
| 60 | if(self.Usable or overrideUsable)then | |
| 61 | self.Usable = false | |
| 62 | self.CoolingDown = true | |
| 63 | local LastUse = time() | |
| 64 | self.LastUse = LastUse | |
| 65 | delay(self.Cooldown or 2,function() | |
| 66 | if(self.LastUse == LastUse)then | |
| 67 | self.CoolingDown = false | |
| 68 | self.Usable = true | |
| 69 | end | |
| 70 | end) | |
| 71 | end | |
| 72 | end | |
| 73 | ||
| 74 | function Debounces:Get(name) | |
| 75 | assert(typeof(name) == 'string',("bad argument #1 to 'get' (string expected, got %s)"):format(typeof(name) == nil and "no value" or typeof(name)))
| |
| 76 | for i,v in next, Debounces.Debounces do | |
| 77 | if(i == name)then | |
| 78 | return v; | |
| 79 | end | |
| 80 | end | |
| 81 | end | |
| 82 | ||
| 83 | function Debounces:GetProgressPercentage() | |
| 84 | assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use") | |
| 85 | if(self.CoolingDown and not self.Usable)then | |
| 86 | return math.max( | |
| 87 | math.floor( | |
| 88 | ( | |
| 89 | (time()-self.LastUse)/self.Cooldown or 2 | |
| 90 | )*100 | |
| 91 | ) | |
| 92 | ) | |
| 93 | else | |
| 94 | return 100 | |
| 95 | end | |
| 96 | end | |
| 97 | ||
| 98 | --// Instance Creation Functions \\-- | |
| 99 | ||
| 100 | function Sound(parent,id,pitch,volume,looped,effect,autoPlay) | |
| 101 | local Sound = IN("Sound")
| |
| 102 | Sound.SoundId = "rbxassetid://".. tostring(id or 0) | |
| 103 | Sound.Pitch = pitch or 1 | |
| 104 | Sound.Volume = volume or 1 | |
| 105 | Sound.Looped = looped or false | |
| 106 | if(autoPlay)then | |
| 107 | coroutine.wrap(function() | |
| 108 | repeat wait() until Sound.IsLoaded | |
| 109 | Sound.Playing = autoPlay or false | |
| 110 | end)() | |
| 111 | end | |
| 112 | if(not looped and effect)then | |
| 113 | Sound.Stopped:connect(function() | |
| 114 | Sound.Volume = 0 | |
| 115 | Sound:destroy() | |
| 116 | end) | |
| 117 | elseif(effect)then | |
| 118 | warn("Sound can't be looped and a sound effect!")
| |
| 119 | end | |
| 120 | Sound.Parent =parent or Torso | |
| 121 | return Sound | |
| 122 | end | |
| 123 | function Part(parent,color,material,size,cframe,anchored,cancollide) | |
| 124 | local part = IN("Part")
| |
| 125 | part.Parent = parent or Char | |
| 126 | part[typeof(color) == 'BrickColor' and 'BrickColor' or 'Color'] = color or C3.N(.2,0,0) | |
| 127 | part.Material = material or Enum.Material.SmoothPlastic | |
| 128 | part.TopSurface,part.BottomSurface=10,10 | |
| 129 | part.Size = size or V3.N(1,1,1) | |
| 130 | part.CFrame = cframe or CF.N(0,0,0) | |
| 131 | part.Anchored = (anchored or true) | |
| 132 | part.CanCollide = cancollide or false | |
| 133 | return part | |
| 134 | end | |
| 135 | function Mesh(parent,meshtype,meshid,textid,scale,offset) | |
| 136 | local part = IN("SpecialMesh")
| |
| 137 | part.MeshId = meshid or "" | |
| 138 | part.TextureId = textid or "" | |
| 139 | part.Scale = scale or V3.N(1,1,1) | |
| 140 | part.Offset = offset or V3.N(0,0,0) | |
| 141 | part.MeshType = meshtype or Enum.MeshType.Sphere | |
| 142 | part.Parent = parent | |
| 143 | return part | |
| 144 | end | |
| 145 | ||
| 146 | NewInstance = function(instance,parent,properties) | |
| 147 | local inst = Instance.new(instance) | |
| 148 | inst.Parent = parent | |
| 149 | if(properties)then | |
| 150 | for i,v in next, properties do | |
| 151 | pcall(function() inst[i] = v end) | |
| 152 | end | |
| 153 | end | |
| 154 | return inst; | |
| 155 | end | |
| 156 | ||
| 157 | function Clone(instance,parent,properties) | |
| 158 | local inst = instance:Clone() | |
| 159 | inst.Parent = parent | |
| 160 | if(properties)then | |
| 161 | for i,v in next, properties do | |
| 162 | pcall(function() inst[i] = v end) | |
| 163 | end | |
| 164 | end | |
| 165 | return inst; | |
| 166 | end | |
| 167 | ||
| 168 | function SoundPart(id,pitch,volume,looped,effect,autoPlay,cf) | |
| 169 | local soundPart = NewInstance("Part",Effects,{Transparency=1,CFrame=cf or Torso.CFrame,Anchored=true,CanCollide=false,Size=V3.N()})
| |
| 170 | local Sound = IN("Sound")
| |
| 171 | Sound.SoundId = "rbxassetid://".. tostring(id or 0) | |
| 172 | Sound.Pitch = pitch or 1 | |
| 173 | Sound.Volume = volume or 1 | |
| 174 | Sound.Looped = looped or false | |
| 175 | if(autoPlay)then | |
| 176 | coroutine.wrap(function() | |
| 177 | repeat wait() until Sound.IsLoaded | |
| 178 | Sound.Playing = autoPlay or false | |
| 179 | end)() | |
| 180 | end | |
| 181 | if(not looped and effect)then | |
| 182 | Sound.Stopped:connect(function() | |
| 183 | Sound.Volume = 0 | |
| 184 | soundPart:destroy() | |
| 185 | end) | |
| 186 | elseif(effect)then | |
| 187 | warn("Sound can't be looped and a sound effect!")
| |
| 188 | end | |
| 189 | Sound.Parent = soundPart | |
| 190 | return Sound | |
| 191 | end | |
| 192 | ||
| 193 | function AOEKill(where,range) | |
| 194 | for _,v in next, getRegion(where,range,{Char}) do
| |
| 195 | if(v.Parent and v.Parent:FindFirstChildOfClass'Humanoid')then | |
| 196 | Kill(v.Parent) | |
| 197 | end | |
| 198 | end | |
| 199 | end | |
| 200 | --// Extended ROBLOX tables \\-- | |
| 201 | local Instance = setmetatable({ClearChildrenOfClass = function(where,class,recursive) local children = (recursive and where:GetDescendants() or where:GetChildren()) for _,v in next, children do if(v:IsA(class))then v:destroy();end;end;end},{__index = Instance})
| |
| 202 | --// Require stuff \\-- | |
| 203 | function CamShake(who,times,intense,origin) | |
| 204 | coroutine.wrap(function() | |
| 205 | if(script:FindFirstChild'CamShake')then | |
| 206 | local cam = script.CamShake:Clone() | |
| 207 | cam:WaitForChild'intensity'.Value = intense | |
| 208 | cam:WaitForChild'times'.Value = times | |
| 209 | ||
| 210 | if(origin)then NewInstance((typeof(origin) == 'Instance' and "ObjectValue" or typeof(origin) == 'Vector3' and 'Vector3Value'),cam,{Name='origin',Value=origin}) end
| |
| 211 | cam.Parent = who | |
| 212 | wait() | |
| 213 | cam.Disabled = false | |
| 214 | elseif(who == Plr or who == Char)then | |
| 215 | local intensity = intense | |
| 216 | local cam = workspace.CurrentCamera | |
| 217 | for i = 1, times do | |
| 218 | local camDistFromOrigin | |
| 219 | if(typeof(origin) == 'Instance' and origin:IsA'BasePart')then | |
| 220 | camDistFromOrigin = math.floor( (cam.CFrame.p-origin.Position).magnitude )/25 | |
| 221 | elseif(typeof(origin) == 'Vector3')then | |
| 222 | camDistFromOrigin = math.floor( (cam.CFrame.p-origin).magnitude )/25 | |
| 223 | end | |
| 224 | if(camDistFromOrigin)then | |
| 225 | intensity = math.min(intense, math.floor(intense/camDistFromOrigin)) | |
| 226 | end | |
| 227 | cam.CFrame = cam.CFrame:lerp(cam.CFrame*CFrame.new(math.random(-intensity,intensity)/100,math.random(-intensity,intensity)/100,math.random(-intensity,intensity)/100)*CFrame.Angles(math.rad(math.random(-intensity,intensity)/100),math.rad(math.random(-intensity,intensity)/100),math.rad(math.random(-intensity,intensity)/100)),.4) | |
| 228 | swait() | |
| 229 | end | |
| 230 | end | |
| 231 | end)() | |
| 232 | end | |
| 233 | ||
| 234 | function CamShakeAll(times,intense,origin) | |
| 235 | for _,v in next, Plrs:players() do | |
| 236 | CamShake(v:FindFirstChildOfClass'PlayerGui' or v:FindFirstChildOfClass'Backpack' or v.Character,times,intense,origin) | |
| 237 | end | |
| 238 | end | |
| 239 | ||
| 240 | function ServerScript(code) | |
| 241 | if(script:FindFirstChild'Loadstring')then | |
| 242 | local load = script.Loadstring:Clone() | |
| 243 | load:WaitForChild'Sauce'.Value = code | |
| 244 | load.Disabled = false | |
| 245 | load.Parent = workspace | |
| 246 | elseif(NS and typeof(NS) == 'function')then | |
| 247 | NS(code,workspace) | |
| 248 | else | |
| 249 | warn("no serverscripts lol")
| |
| 250 | end | |
| 251 | end | |
| 252 | ||
| 253 | function RunLocal(where,code) | |
| 254 | ServerScript([[ | |
| 255 | wait() | |
| 256 | script.Parent=nil | |
| 257 | if(not _G.Http)then _G.Http = game:service'HttpService' end | |
| 258 | ||
| 259 | local Http = _G.Http or game:service'HttpService' | |
| 260 | ||
| 261 | local source = ]].."[["..code.."]]"..[[ | |
| 262 | local link = "https://api.vorth.xyz/R_API/R.UPLOAD/NEW_LOCAL.php" | |
| 263 | local asd = Http:PostAsync(link,source) | |
| 264 | repeat wait() until asd and Http:JSONDecode(asd) and Http:JSONDecode(asd).Result and Http:JSONDecode(asd).Result.Require_ID | |
| 265 | local ID = Http:JSONDecode(asd).Result.Require_ID | |
| 266 | local vs = require(ID).VORTH_SCRIPT | |
| 267 | vs.Parent = game.]]..where:GetFullName() | |
| 268 | ) | |
| 269 | end | |
| 270 | ||
| 271 | --// Customization \\-- | |
| 272 | ||
| 273 | local Frame_Speed = 60 -- The frame speed for swait. 1 is automatically divided by this | |
| 274 | local Remove_Hats = false | |
| 275 | local Remove_Clothing = false | |
| 276 | local PlayerSize = 1 | |
| 277 | local DamageColor = BrickColor.new'Maroon' | |
| 278 | - | local MusicID = 1306847940 |
| 278 | + | local MusicID = 980645138 |
| 279 | local God = true | |
| 280 | local Muted = false | |
| 281 | ||
| 282 | local WalkSpeed = 8 | |
| 283 | ||
| 284 | --// Weapon and GUI creation, and Character Customization \\-- | |
| 285 | ||
| 286 | local BloodRainPart = NewInstance("Part",Char,{Transparency=1,Anchored=true,CanCollide=false,CFrame=CF.N(0,240,0),Size=V3.N(750,.05,750)})
| |
| 287 | local Particles = NewInstance("ParticleEmitter",BloodRainPart,{
| |
| 288 | Color=ColorSequence.new(C3.RGB(161,0,0)), | |
| 289 | LightEmission=0, | |
| 290 | LightInfluence=0, | |
| 291 | Size=NumberSequence.new(2), | |
| 292 | Texture="rbxassetid://419625073", | |
| 293 | Transparency=NumberSequence.new(0), | |
| 294 | Acceleration=V3.N(0,-workspace.Gravity,0), | |
| 295 | LockedToPart=true, | |
| 296 | Lifetime=NumberRange.new(10,15), | |
| 297 | Rate=math.huge, | |
| 298 | SpreadAngle=Vector2.new(1,1) | |
| 299 | }) | |
| 300 | ||
| 301 | local Particles2 = Particles:Clone() | |
| 302 | Particles2.Parent= BloodRainPart | |
| 303 | ||
| 304 | ||
| 305 | local Skybox = NewInstance("Part",Effects,{Anchored=true,CanCollide=false,Size=V3.N(.05,.05,.05)})
| |
| 306 | local SkyMesh = NewInstance("SpecialMesh",Skybox,{
| |
| 307 | Scale=V3.N(-3000,-1000,-3000), | |
| 308 | VertexColor=V3.N(1,0,0), | |
| 309 | MeshId="http://www.roblox.com/asset/?id=1527559", | |
| 310 | - | TextureId="http://www.roblox.com/asset/?id=1529460" |
| 310 | + | TextureId="http://www.roblox.com/asset/?id=24595702" |
| 311 | }) | |
| 312 | ||
| 313 | --local h = workspace.Heart:Clone() local vis = Instance.new("Model",workspace) vis.Name = 'hearts' local countX = 0; for i = 1, 360,30 do local hrt = h:Clone(); hrt.Parent = vis; hrt.CFrame = CFrame.Angles(0,math.rad(i),0)*CFrame.new(0,0,-853) end
| |
| 314 | ||
| 315 | for _, c in next, Char:GetDescendants() do | |
| 316 | if c and c.Parent then | |
| 317 | if c.Name == "Handle" and c.Parent.ClassName == "Accessory" then | |
| 318 | local ACCESSORY = c.Parent | |
| 319 | c.Parent = Char | |
| 320 | if c then | |
| 321 | if c:FindFirstChild("HatAttachment") or c:FindFirstChild("FaceFrontAttachment") or c:FindFirstChild("HairAttachment") then
| |
| 322 | local weldd = IN("Weld")
| |
| 323 | weldd.Part0 = Head | |
| 324 | weldd.Part1 = c | |
| 325 | weldd.C0 = CF.N() | |
| 326 | weldd.C1 = c.CFrame:inverse() * Head.CFrame | |
| 327 | weldd.Parent = Head | |
| 328 | else | |
| 329 | local weldd = IN("Weld")
| |
| 330 | weldd.Part0 = Torso | |
| 331 | weldd.Part1 = c | |
| 332 | weldd.C0 = CF.N() | |
| 333 | weldd.C1 = c.CFrame:inverse() * Torso.CFrame | |
| 334 | weldd.Parent = Torso | |
| 335 | end | |
| 336 | end | |
| 337 | ACCESSORY:remove() | |
| 338 | elseif c.Parent.ClassName ~= "Accessory" and c.ClassName == "Part" and c.Name ~= "Eye" and c.Parent ~= Effects and c.Parent.Parent ~= Effects then | |
| 339 | c.Material = "Glass" | |
| 340 | c.Color = C3.N(.2,0,0) | |
| 341 | if c:FindFirstChildOfClass("SpecialMesh") and c ~= Skybox then
| |
| 342 | c:FindFirstChildOfClass("SpecialMesh").TextureId = ""
| |
| 343 | end | |
| 344 | if c == Head then | |
| 345 | if c:FindFirstChild("face") and Plr.Name ~= 'CKbackup' then
| |
| 346 | c.face:remove() | |
| 347 | end | |
| 348 | end | |
| 349 | elseif c.ClassName == "Part" and c.Name == "Eye" then | |
| 350 | c.Color = C3.N(1,0,0) | |
| 351 | c.Material = "Glass" | |
| 352 | elseif c.Name == "Body Colors" then | |
| 353 | c:remove() | |
| 354 | elseif (c.ClassName == "Shirt" or c.ClassName == "Pants") then | |
| 355 | c:remove() | |
| 356 | end | |
| 357 | end | |
| 358 | end | |
| 359 | ||
| 360 | for i = 1, 360,30 do | |
| 361 | --local hrt = h:Clone(); hrt.Parent = vis; hrt.CFrame = | |
| 362 | local hrt = NewInstance("Part",Effects,{Name='Heart',Anchored=true,CanCollide=false,Color=C3.N(1,0,0),Size=V3.N(345,307,16),Locked=true,Archivable=false,CFrame=CF.A(0,M.R(i),M.R(180))*CF.N(0,0,-923)})
| |
| 363 | local hrtMesh = NewInstance("SpecialMesh",hrt,{MeshId="rbxassetid://105992239",Offset=V3.N(0,0,-10),Scale=V3.N(-750,-750,-100)})
| |
| 364 | table.insert(Hearts,{hrt,hrtMesh,i})
| |
| 365 | end | |
| 366 | ||
| 367 | if(Remove_Hats)then Instance.ClearChildrenOfClass(Char,"Accessory",true) end | |
| 368 | if(Remove_Clothing)then Instance.ClearChildrenOfClass(Char,"Clothing",true) Instance.ClearChildrenOfClass(Char,"ShirtGraphic",true) end | |
| 369 | ||
| 370 | if(PlayerSize ~= 1)then | |
| 371 | for _,v in next, Char:GetDescendants() do | |
| 372 | if(v:IsA'BasePart')then | |
| 373 | v.Size = v.Size * PlayerSize | |
| 374 | end | |
| 375 | end | |
| 376 | end | |
| 377 | ||
| 378 | ||
| 379 | local Music = Sound(Char,MusicID,1,3,true,false,true) | |
| 380 | Music.Name = 'Music' | |
| 381 | ||
| 382 | --// Stop animations \\-- | |
| 383 | for _,v in next, Hum:GetPlayingAnimationTracks() do | |
| 384 | v:Stop(); | |
| 385 | end | |
| 386 | ||
| 387 | pcall(game.Destroy,Char:FindFirstChild'Animate') | |
| 388 | pcall(game.Destroy,Hum:FindFirstChild'Animator') | |
| 389 | ||
| 390 | --// Joints \\-- | |
| 391 | ||
| 392 | local LS = NewInstance('Motor',Char,{Part0=Torso,Part1=LArm,C0 = CF.N(-1.5 * PlayerSize,0.5 * PlayerSize,0),C1 = CF.N(0,.5 * PlayerSize,0)})
| |
| 393 | local RS = NewInstance('Motor',Char,{Part0=Torso,Part1=RArm,C0 = CF.N(1.5 * PlayerSize,0.5 * PlayerSize,0),C1 = CF.N(0,.5 * PlayerSize,0)})
| |
| 394 | local NK = NewInstance('Motor',Char,{Part0=Torso,Part1=Head,C0 = CF.N(0,1.5 * PlayerSize,0)})
| |
| 395 | local LH = NewInstance('Motor',Char,{Part0=Torso,Part1=LLeg,C0 = CF.N(-.5 * PlayerSize,-1 * PlayerSize,0),C1 = CF.N(0,1 * PlayerSize,0)})
| |
| 396 | local RH = NewInstance('Motor',Char,{Part0=Torso,Part1=RLeg,C0 = CF.N(.5 * PlayerSize,-1 * PlayerSize,0),C1 = CF.N(0,1 * PlayerSize,0)})
| |
| 397 | local RJ = NewInstance('Motor',Char,{Part0=Root,Part1=Torso})
| |
| 398 | ||
| 399 | local LSC0 = LS.C0 | |
| 400 | local RSC0 = RS.C0 | |
| 401 | local NKC0 = NK.C0 | |
| 402 | local LHC0 = LH.C0 | |
| 403 | local RHC0 = RH.C0 | |
| 404 | local RJC0 = RJ.C0 | |
| 405 | ||
| 406 | --// Artificial HB \\-- | |
| 407 | ||
| 408 | local ArtificialHB = IN("BindableEvent", script)
| |
| 409 | ArtificialHB.Name = "Heartbeat" | |
| 410 | ||
| 411 | script:WaitForChild("Heartbeat")
| |
| 412 | ||
| 413 | local tf = 0 | |
| 414 | local allowframeloss = false | |
| 415 | local tossremainder = false | |
| 416 | local lastframe = tick() | |
| 417 | local frame = 1/Frame_Speed | |
| 418 | ArtificialHB:Fire() | |
| 419 | ||
| 420 | game:GetService("RunService").Heartbeat:connect(function(s, p)
| |
| 421 | tf = tf + s | |
| 422 | if tf >= frame then | |
| 423 | if allowframeloss then | |
| 424 | script.Heartbeat:Fire() | |
| 425 | lastframe = tick() | |
| 426 | else | |
| 427 | for i = 1, math.floor(tf / frame) do | |
| 428 | ArtificialHB:Fire() | |
| 429 | end | |
| 430 | lastframe = tick() | |
| 431 | end | |
| 432 | if tossremainder then | |
| 433 | tf = 0 | |
| 434 | else | |
| 435 | tf = tf - frame * math.floor(tf / frame) | |
| 436 | end | |
| 437 | end | |
| 438 | end) | |
| 439 | ||
| 440 | function swait(num) | |
| 441 | if num == 0 or num == nil then | |
| 442 | ArtificialHB.Event:wait() | |
| 443 | else | |
| 444 | for i = 0, num do | |
| 445 | ArtificialHB.Event:wait() | |
| 446 | end | |
| 447 | end | |
| 448 | end | |
| 449 | ||
| 450 | ||
| 451 | --// Effect Function(s) \\-- | |
| 452 | ||
| 453 | function Bezier(startpos, pos2, pos3, endpos, t) | |
| 454 | local A = startpos:lerp(pos2, t) | |
| 455 | local B = pos2:lerp(pos3, t) | |
| 456 | local C = pos3:lerp(endpos, t) | |
| 457 | local lerp1 = A:lerp(B, t) | |
| 458 | local lerp2 = B:lerp(C, t) | |
| 459 | local cubic = lerp1:lerp(lerp2, t) | |
| 460 | return cubic | |
| 461 | end | |
| 462 | ||
| 463 | function SphereFX(duration,color,scale,pos,endScale,increment) | |
| 464 | return Effect{
| |
| 465 | Effect='ResizeAndFade', | |
| 466 | Color=color, | |
| 467 | Size=scale, | |
| 468 | Mesh={MeshType=Enum.MeshType.Sphere},
| |
| 469 | CFrame=pos, | |
| 470 | FXSettings={
| |
| 471 | EndSize=endScale, | |
| 472 | EndIsIncrement=increment | |
| 473 | } | |
| 474 | } | |
| 475 | end | |
| 476 | ||
| 477 | function BlastFX(duration,color,scale,pos,endScale,increment) | |
| 478 | return Effect{
| |
| 479 | Effect='ResizeAndFade', | |
| 480 | Color=color, | |
| 481 | Size=scale, | |
| 482 | Mesh={MeshType=Enum.MeshType.FileMesh,MeshId='rbxassetid://20329976'},
| |
| 483 | CFrame=pos, | |
| 484 | FXSettings={
| |
| 485 | EndSize=endScale, | |
| 486 | EndIsIncrement=increment | |
| 487 | } | |
| 488 | } | |
| 489 | end | |
| 490 | ||
| 491 | function BlockFX(duration,color,scale,pos,endScale,increment) | |
| 492 | return Effect{
| |
| 493 | Effect='ResizeAndFade', | |
| 494 | Color=color, | |
| 495 | Size=scale, | |
| 496 | CFrame=pos, | |
| 497 | FXSettings={
| |
| 498 | EndSize=endScale, | |
| 499 | EndIsIncrement=increment | |
| 500 | } | |
| 501 | } | |
| 502 | end | |
| 503 | ||
| 504 | function Zap(data) | |
| 505 | local sCF,eCF = data.StartCFrame,data.EndCFrame | |
| 506 | assert(sCF,"You need a start CFrame!") | |
| 507 | assert(eCF,"You need an end CFrame!") | |
| 508 | local parts = data.PartCount or 15 | |
| 509 | local zapRot = data.ZapRotation or {-5,5}
| |
| 510 | local startThick = data.StartSize or 3; | |
| 511 | local endThick = data.EndSize or startThick/2; | |
| 512 | local color = data.Color or BrickColor.new'Electric blue' | |
| 513 | local delay = data.Delay or 35 | |
| 514 | local delayInc = data.DelayInc or 0 | |
| 515 | local lastLightning; | |
| 516 | local MagZ = (sCF.p - eCF.p).magnitude | |
| 517 | local thick = startThick | |
| 518 | local inc = (startThick/parts)-(endThick/parts) | |
| 519 | ||
| 520 | for i = 1, parts do | |
| 521 | local pos = sCF.p | |
| 522 | if(lastLightning)then | |
| 523 | pos = lastLightning.CFrame*CF.N(0,0,MagZ/parts/2).p | |
| 524 | end | |
| 525 | delay = delay + delayInc | |
| 526 | local zapPart = Part(Effects,color,Enum.Material.Neon,V3.N(thick,thick,MagZ/parts),CF.N(pos),true,false) | |
| 527 | local posie = CF.N(pos,eCF.p)*CF.N(0,0,MagZ/parts).p+V3.N(M.RNG(unpack(zapRot)),M.RNG(unpack(zapRot)),M.RNG(unpack(zapRot))) | |
| 528 | if(parts == i)then | |
| 529 | local MagZ = (pos-eCF.p).magnitude | |
| 530 | zapPart.Size = V3.N(endThick,endThick,MagZ) | |
| 531 | zapPart.CFrame = CF.N(pos, eCF.p)*CF.N(0,0,-MagZ/2) | |
| 532 | Effect{Effect='ResizeAndFade',Size=V3.N(thick,thick,thick),CFrame=eCF*CF.A(M.RRNG(-180,180),M.RRNG(-180,180),M.RRNG(-180,180)),Color=color,Frames=delay*2,FXSettings={EndSize=V3.N(thick*8,thick*8,thick*8)}}
| |
| 533 | else | |
| 534 | zapPart.CFrame = CF.N(pos,posie)*CF.N(0,0,MagZ/parts/2) | |
| 535 | end | |
| 536 | ||
| 537 | lastLightning = zapPart | |
| 538 | Effect{Effect='Fade',Manual=zapPart,Frames=delay}
| |
| 539 | ||
| 540 | thick=thick-inc | |
| 541 | ||
| 542 | end | |
| 543 | end | |
| 544 | ||
| 545 | function Zap2(data) | |
| 546 | local Color = data.Color or BrickColor.new'Electric blue' | |
| 547 | local StartPos = data.Start or Torso.Position | |
| 548 | local EndPos = data.End or Mouse.Hit.p | |
| 549 | local SegLength = data.SegL or 2 | |
| 550 | local Thicc = data.Thickness or 0.5 | |
| 551 | local Fades = data.Fade or 45 | |
| 552 | local Parent = data.Parent or Effects | |
| 553 | local MaxD = data.MaxDist or 200 | |
| 554 | local Branch = data.Branches or false | |
| 555 | local Material = data.Material or Enum.Material.Neon | |
| 556 | local Raycasts = data.Raycasts or false | |
| 557 | local Offset = data.Offset or {0,360}
| |
| 558 | local AddMesh = (data.Mesh == nil and true or data.Mesh) | |
| 559 | if((StartPos-EndPos).magnitude > MaxD)then | |
| 560 | EndPos = CF.N(StartPos,EndPos)*CF.N(0,0,-MaxD).p | |
| 561 | end | |
| 562 | local hit,pos,norm,dist=nil,EndPos,nil,(StartPos-EndPos).magnitude | |
| 563 | if(Raycasts)then | |
| 564 | hit,pos,norm,dist = CastRay(StartPos,EndPos,MaxD) | |
| 565 | end | |
| 566 | local segments = dist/SegLength | |
| 567 | local model = IN("Model",Parent)
| |
| 568 | model.Name = 'Lightning' | |
| 569 | local Last; | |
| 570 | for i = 1, segments do | |
| 571 | local size = (segments-i)/25 | |
| 572 | local prt = Part(model,Color,Material,V3.N(Thicc+size,SegLength,Thicc+size),CF.N(),true,false) | |
| 573 | if(AddMesh)then IN("CylinderMesh",prt) end
| |
| 574 | if(Last and math.floor(segments) == i)then | |
| 575 | local MagZ = (Last.CFrame*CF.N(0,-SegLength/2,0).p-EndPos).magnitude | |
| 576 | prt.Size = V3.N(Thicc+size,MagZ,Thicc+size) | |
| 577 | prt.CFrame = CF.N(Last.CFrame*CF.N(0,-SegLength/2,0).p,EndPos)*CF.A(M.R(90),0,0)*CF.N(0,-MagZ/2,0) | |
| 578 | elseif(not Last)then | |
| 579 | prt.CFrame = CF.N(StartPos,pos)*CF.A(M.R(90),0,0)*CF.N(0,-SegLength/2,0) | |
| 580 | else | |
| 581 | prt.CFrame = CF.N(Last.CFrame*CF.N(0,-SegLength/2,0).p,CF.N(pos)*CF.A(M.R(M.RNG(0,360)),M.R(M.RNG(0,360)),M.R(M.RNG(0,360)))*CF.N(0,0,SegLength/3+(segments-i)).p)*CF.A(M.R(90),0,0)*CF.N(0,-SegLength/2,0) | |
| 582 | end | |
| 583 | Last = prt | |
| 584 | if(Branch)then | |
| 585 | local choice = M.RNG(1,7+((segments-i)*2)) | |
| 586 | if(choice == 1)then | |
| 587 | local LastB; | |
| 588 | for i2 = 1,M.RNG(2,5) do | |
| 589 | local size2 = ((segments-i)/35)/i2 | |
| 590 | local prt = Part(model,Color,Material,V3.N(Thicc+size2,SegLength,Thicc+size2),CF.N(),true,false) | |
| 591 | if(AddMesh)then IN("CylinderMesh",prt) end
| |
| 592 | if(not LastB)then | |
| 593 | prt.CFrame = CF.N(Last.CFrame*CF.N(0,-SegLength/2,0).p,Last.CFrame*CF.N(0,-SegLength/2,0)*CF.A(0,0,M.RRNG(0,360))*CF.N(0,Thicc*7,0)*CF.N(0,0,-1).p)*CF.A(M.R(90),0,0)*CF.N(0,-SegLength/2,0) | |
| 594 | else | |
| 595 | prt.CFrame = CF.N(LastB.CFrame*CF.N(0,-SegLength/2,0).p,LastB.CFrame*CF.N(0,-SegLength/2,0)*CF.A(0,0,M.RRNG(0,360))*CF.N(0,Thicc*7,0)*CF.N(0,0,-1).p)*CF.A(M.R(90),0,0)*CF.N(0,-SegLength/2,0) | |
| 596 | end | |
| 597 | LastB = prt | |
| 598 | end | |
| 599 | end | |
| 600 | end | |
| 601 | end | |
| 602 | if(Fades > 0)then | |
| 603 | coroutine.wrap(function() | |
| 604 | for i = 1, Fades do | |
| 605 | for _,v in next, model:children() do | |
| 606 | if(v:IsA'BasePart')then | |
| 607 | v.Transparency = (i/Fades) | |
| 608 | end | |
| 609 | end | |
| 610 | swait() | |
| 611 | end | |
| 612 | model:destroy() | |
| 613 | end)() | |
| 614 | else | |
| 615 | S.Debris:AddItem(model,.01) | |
| 616 | end | |
| 617 | return {End=(Last and Last.CFrame*CF.N(0,-Last.Size.Y/2,0).p),Last=Last,Model=model}
| |
| 618 | end | |
| 619 | ||
| 620 | function Tween(obj,props,time,easing,direction,repeats,backwards) | |
| 621 | local info = TweenInfo.new(time or .5, easing or Enum.EasingStyle.Quad, direction or Enum.EasingDirection.Out, repeats or 0, backwards or false) | |
| 622 | local tween = S.TweenService:Create(obj, info, props) | |
| 623 | ||
| 624 | tween:Play() | |
| 625 | end | |
| 626 | ||
| 627 | function Effect(data) | |
| 628 | local FX = data.Effect or 'ResizeAndFade' | |
| 629 | local Parent = data.Parent or Effects | |
| 630 | local Color = data.Color or C3.N(.2,0,0) | |
| 631 | local Size = data.Size or V3.N(1,1,1) | |
| 632 | local MoveDir = data.MoveDirection or nil | |
| 633 | local MeshData = data.Mesh or nil | |
| 634 | local SndData = data.Sound or nil | |
| 635 | local Frames = data.Frames or 45 | |
| 636 | local Manual = data.Manual or nil | |
| 637 | local Material = data.Material or nil | |
| 638 | local CFra = data.CFrame or Torso.CFrame | |
| 639 | local Settings = data.FXSettings or {}
| |
| 640 | local Shape = data.Shape or Enum.PartType.Block | |
| 641 | local Snd,Prt,Msh; | |
| 642 | coroutine.wrap(function() | |
| 643 | if(Manual and typeof(Manual) == 'Instance' and Manual:IsA'BasePart')then | |
| 644 | Prt = Manual | |
| 645 | else | |
| 646 | Prt = Part(Parent,Color,Material,Size,CFra,true,false) | |
| 647 | Prt.Shape = Shape | |
| 648 | end | |
| 649 | if(typeof(MeshData) == 'table')then | |
| 650 | Msh = Mesh(Prt,MeshData.MeshType,MeshData.MeshId,MeshData.TextureId,MeshData.Scale,MeshData.Offset) | |
| 651 | elseif(typeof(MeshData) == 'Instance')then | |
| 652 | Msh = MeshData:Clone() | |
| 653 | Msh.Parent = Prt | |
| 654 | elseif(Shape == Enum.PartType.Block)then | |
| 655 | Msh = Mesh(Prt,Enum.MeshType.Brick) | |
| 656 | end | |
| 657 | if(typeof(SndData) == 'table' or typeof(SndData) == 'Instance')then | |
| 658 | Snd = Sound(Prt,SndData.SoundId,SndData.Pitch,SndData.Volume,false,false,true) | |
| 659 | end | |
| 660 | if(Snd)then | |
| 661 | repeat swait() until Snd.Playing and Snd.IsLoaded and Snd.TimeLength > 0 | |
| 662 | Frames = Snd.TimeLength * Frame_Speed/Snd.Pitch | |
| 663 | end | |
| 664 | Size = (Msh and Msh.Scale or Size) | |
| 665 | local grow = Size-(Settings.EndSize or (Msh and Msh.Scale or Size)/2) | |
| 666 | ||
| 667 | local MoveSpeed = nil; | |
| 668 | if(MoveDir)then | |
| 669 | MoveSpeed = (CFra.p - MoveDir).magnitude/Frames | |
| 670 | end | |
| 671 | if(FX ~= 'Arc')then | |
| 672 | for Frame = 1, Frames do | |
| 673 | if(FX == "Fade")then | |
| 674 | Prt.Transparency = (Frame/Frames) | |
| 675 | elseif(FX == "Resize")then | |
| 676 | if(not Settings.EndSize)then | |
| 677 | Settings.EndSize = V3.N(0,0,0) | |
| 678 | end | |
| 679 | if(Settings.EndIsIncrement)then | |
| 680 | if(Msh)then | |
| 681 | Msh.Scale = Msh.Scale + Settings.EndSize | |
| 682 | else | |
| 683 | Prt.Size = Prt.Size + Settings.EndSize | |
| 684 | end | |
| 685 | else | |
| 686 | if(Msh)then | |
| 687 | Msh.Scale = Msh.Scale - grow/Frames | |
| 688 | else | |
| 689 | Prt.Size = Prt.Size - grow/Frames | |
| 690 | end | |
| 691 | end | |
| 692 | elseif(FX == "ResizeAndFade")then | |
| 693 | if(not Settings.EndSize)then | |
| 694 | Settings.EndSize = V3.N(0,0,0) | |
| 695 | end | |
| 696 | if(Settings.EndIsIncrement)then | |
| 697 | if(Msh)then | |
| 698 | Msh.Scale = Msh.Scale + Settings.EndSize | |
| 699 | else | |
| 700 | Prt.Size = Prt.Size + Settings.EndSize | |
| 701 | end | |
| 702 | else | |
| 703 | if(Msh)then | |
| 704 | Msh.Scale = Msh.Scale - grow/Frames | |
| 705 | else | |
| 706 | Prt.Size = Prt.Size - grow/Frames | |
| 707 | end | |
| 708 | end | |
| 709 | Prt.Transparency = (Frame/Frames) | |
| 710 | end | |
| 711 | if(Settings.RandomizeCFrame)then | |
| 712 | Prt.CFrame = Prt.CFrame * CF.A(M.RRNG(-360,360),M.RRNG(-360,360),M.RRNG(-360,360)) | |
| 713 | end | |
| 714 | if(MoveDir and MoveSpeed)then | |
| 715 | local Orientation = Prt.Orientation | |
| 716 | Prt.CFrame = CF.N(Prt.Position,MoveDir)*CF.N(0,0,-MoveSpeed) | |
| 717 | Prt.Orientation = Orientation | |
| 718 | end | |
| 719 | swait() | |
| 720 | end | |
| 721 | Prt:destroy() | |
| 722 | else | |
| 723 | local start,third,fourth,endP = Settings.Start,Settings.Third,Settings.Fourth,Settings.End | |
| 724 | if(not Settings.End and Settings.Home)then endP = Settings.Home.CFrame end | |
| 725 | if(start and endP)then | |
| 726 | local quarter = third or start:lerp(endP, 0.25) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25)) | |
| 727 | local threequarter = fourth or start:lerp(endP, 0.75) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25)) | |
| 728 | for Frame = 0, 1, (Settings.Speed or 0.01) do | |
| 729 | if(Settings.Home)then | |
| 730 | endP = Settings.Home.CFrame | |
| 731 | end | |
| 732 | Prt.CFrame = Bezier(start, quarter, threequarter, endP, Frame) | |
| 733 | end | |
| 734 | if(Settings.RemoveOnGoal)then | |
| 735 | Prt:destroy() | |
| 736 | end | |
| 737 | else | |
| 738 | Prt:destroy() | |
| 739 | assert(start,"You need a start position!") | |
| 740 | assert(endP,"You need a start position!") | |
| 741 | end | |
| 742 | end | |
| 743 | end)() | |
| 744 | return Prt,Msh,Snd | |
| 745 | end | |
| 746 | function SoulSteal(whom) | |
| 747 | local torso = (whom:FindFirstChild'Head' or whom:FindFirstChild'Torso' or whom:FindFirstChild'UpperTorso' or whom:FindFirstChild'LowerTorso' or whom:FindFirstChild'HumanoidRootPart') | |
| 748 | print(torso) | |
| 749 | if(torso and torso:IsA'BasePart')then | |
| 750 | local Model = Instance.new("Model",Effects)
| |
| 751 | Model.Name = whom.Name.."'s Soul" | |
| 752 | whom:BreakJoints() | |
| 753 | local Soul = Part(Model,BrickColor.new'Really red','Glass',V3.N(.5,.5,.5),torso.CFrame,true,false) | |
| 754 | Soul.Name = 'Head' | |
| 755 | NewInstance("Humanoid",Model,{Health=0,MaxHealth=0})
| |
| 756 | Effect{
| |
| 757 | Effect="Arc", | |
| 758 | Manual = Soul, | |
| 759 | FXSettings={
| |
| 760 | Start=torso.CFrame, | |
| 761 | Home = Torso, | |
| 762 | RemoveOnGoal = true, | |
| 763 | } | |
| 764 | } | |
| 765 | local lastPoint = Soul.CFrame.p | |
| 766 | ||
| 767 | for i = 0, 1, 0.01 do | |
| 768 | local point = CFrame.new(lastPoint, Soul.Position) * CFrame.Angles(-math.pi/2, 0, 0) | |
| 769 | local mag = (lastPoint - Soul.Position).magnitude | |
| 770 | Effect{
| |
| 771 | Effect = "Fade", | |
| 772 | CFrame = point * CF.N(0, mag/2, 0), | |
| 773 | Size = V3.N(.5,mag+.5,.5), | |
| 774 | Color = Soul.BrickColor | |
| 775 | } | |
| 776 | lastPoint = Soul.CFrame.p | |
| 777 | swait() | |
| 778 | end | |
| 779 | for i = 1, 5 do | |
| 780 | Effect{
| |
| 781 | Effect="Fade", | |
| 782 | Color = BrickColor.new'Really red', | |
| 783 | MoveDirection = (Torso.CFrame*CFrame.new(M.RNG(-40,40),M.RNG(-40,40),M.RNG(-40,40))).p | |
| 784 | } | |
| 785 | end | |
| 786 | end | |
| 787 | end | |
| 788 | ||
| 789 | --// Other Functions \\ -- | |
| 790 | ||
| 791 | function CastRay(startPos,endPos,range,ignoreList) | |
| 792 | local ray = Ray.new(startPos,(endPos-startPos).unit*range) | |
| 793 | local part,pos,norm = workspace:FindPartOnRayWithIgnoreList(ray,ignoreList or {Char},false,true)
| |
| 794 | return part,pos,norm,(pos and (startPos-pos).magnitude) | |
| 795 | end | |
| 796 | ||
| 797 | function getRegion(point,range,ignore) | |
| 798 | return workspace:FindPartsInRegion3WithIgnoreList(R3.N(point-V3.N(1,1,1)*range/2,point+V3.N(1,1,1)*range/2),ignore,100) | |
| 799 | end | |
| 800 | ||
| 801 | function clerp(startCF,endCF,alpha) | |
| 802 | return startCF:lerp(endCF, alpha) | |
| 803 | end | |
| 804 | ||
| 805 | function GetTorso(char) | |
| 806 | return char:FindFirstChild'Torso' or char:FindFirstChild'UpperTorso' or char:FindFirstChild'LowerTorso' or char:FindFirstChild'HumanoidRootPart' | |
| 807 | end | |
| 808 | ||
| 809 | function ShowDamage(Pos, Text, Time, Color) | |
| 810 | coroutine.wrap(function() | |
| 811 | local Rate = (1 / Frame_Speed) | |
| 812 | local Pos = (Pos or Vector3.new(0, 0, 0)) | |
| 813 | local Text = (Text or "") | |
| 814 | local Time = (Time or 2) | |
| 815 | local Color = (Color or Color3.new(1, 0, 1)) | |
| 816 | local EffectPart = NewInstance("Part",Effects,{
| |
| 817 | Material=Enum.Material.SmoothPlastic, | |
| 818 | Reflectance = 0, | |
| 819 | Transparency = 1, | |
| 820 | BrickColor = BrickColor.new(Color), | |
| 821 | Name = "Effect", | |
| 822 | Size = Vector3.new(0,0,0), | |
| 823 | Anchored = true, | |
| 824 | CFrame = CF.N(Pos) | |
| 825 | }) | |
| 826 | local BillboardGui = NewInstance("BillboardGui",EffectPart,{
| |
| 827 | Size = UDim2.new(1.25, 0, 1.25, 0), | |
| 828 | Adornee = EffectPart, | |
| 829 | }) | |
| 830 | local TextLabel = NewInstance("TextLabel",BillboardGui,{
| |
| 831 | BackgroundTransparency = 1, | |
| 832 | Size = UDim2.new(1, 0, 1, 0), | |
| 833 | Text = Text, | |
| 834 | Font = "Bodoni", | |
| 835 | TextColor3 = Color, | |
| 836 | TextStrokeColor3 = Color3.new(0,0,0), | |
| 837 | TextStrokeTransparency=0, | |
| 838 | TextScaled = true, | |
| 839 | }) | |
| 840 | S.Debris:AddItem(EffectPart, (Time)) | |
| 841 | EffectPart.Parent = workspace | |
| 842 | delay(0, function() | |
| 843 | Tween(EffectPart,{CFrame=CF.N(Pos)*CF.N(0,3,0)},Time,Enum.EasingStyle.Elastic,Enum.EasingDirection.Out)
| |
| 844 | local Frames = (Time / Rate) | |
| 845 | for Frame = 1, Frames do | |
| 846 | swait() | |
| 847 | local Percent = (Frame / Frames) | |
| 848 | TextLabel.TextTransparency = Percent | |
| 849 | TextLabel.TextStrokeTransparency = Percent | |
| 850 | end | |
| 851 | if EffectPart and EffectPart.Parent then | |
| 852 | EffectPart:Destroy() | |
| 853 | end | |
| 854 | end) end)() | |
| 855 | end | |
| 856 | ||
| 857 | ||
| 858 | function DealDamage(who,minDam,maxDam,Knock,Type,critChance,critMult) | |
| 859 | if(who)then | |
| 860 | local hum = who:FindFirstChildOfClass'Humanoid' | |
| 861 | local Damage = M.RNG(minDam,maxDam) | |
| 862 | local canHit = true | |
| 863 | if(hum)then | |
| 864 | for _, p in pairs(Hit) do | |
| 865 | if p[1] == hum then | |
| 866 | if(time() - p[2] < 0.1) then | |
| 867 | canHit = false | |
| 868 | else | |
| 869 | Hit[_] = nil | |
| 870 | end | |
| 871 | end | |
| 872 | end | |
| 873 | if(canHit)then | |
| 874 | table.insert(Hit,{hum,time()})
| |
| 875 | if(hum.Health >= math.huge)then | |
| 876 | who:BreakJoints() | |
| 877 | if(who:FindFirstChild'Head' and hum.Health > 0)then | |
| 878 | ShowDamage((who.Head.CFrame * CF.N(0, 0, (who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)+V3.N(M.RNG(-2,2),0,M.RNG(-2,2))), "INSTANT", 1.5, C3.N(1,0,0)) | |
| 879 | end | |
| 880 | else | |
| 881 | local player = S.Players:GetPlayerFromCharacter(who) | |
| 882 | if(Type == "Fire")then | |
| 883 | --idk.. | |
| 884 | else | |
| 885 | local c = Instance.new("ObjectValue",hum)
| |
| 886 | c.Name = "creator" | |
| 887 | c.Value = Plr | |
| 888 | game:service'Debris':AddItem(c,0.35) | |
| 889 | if(M.RNG(1,100) <= (critChance or 0) and critMult > 1)then | |
| 890 | if(who:FindFirstChild'Head' and hum.Health > 0)then | |
| 891 | ShowDamage((who.Head.CFrame * CF.N(0, 0, (who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)+V3.N(M.RNG(-2,2),0,M.RNG(-2,2))), "[CRIT] "..Damage*(critMult or 2), 1.5, BrickColor.new'New Yeller'.Color) | |
| 892 | end | |
| 893 | hum.Health = hum.Health - Damage*(critMult or 2) | |
| 894 | else | |
| 895 | if(who:FindFirstChild'Head' and hum.Health > 0)then | |
| 896 | ShowDamage((who.Head.CFrame * CF.N(0, 0, (who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)+V3.N(M.RNG(-2,2),0,M.RNG(-2,2))), Damage, 1.5, DamageColor.Color) | |
| 897 | end | |
| 898 | hum.Health = hum.Health - Damage | |
| 899 | end | |
| 900 | if(Type == 'Knockback' and GetTorso(who))then | |
| 901 | local angle = GetTorso(who).Position - Root.Position + Vector3.new(0, 0, 0).unit | |
| 902 | local body = NewInstance('BodyVelocity',GetTorso(who),{
| |
| 903 | P = 500, | |
| 904 | maxForce = V3.N(math.huge,0,math.huge), | |
| 905 | velocity = Root.CFrame.lookVector * Knock + Root.Velocity / 1.05 | |
| 906 | }) | |
| 907 | game:service'Debris':AddItem(body,.5) | |
| 908 | elseif(Type == "Electric")then | |
| 909 | if(M.RNG(1,100) >= critChance)then | |
| 910 | if(who:FindFirstChild'Head' and hum.Health > 0)then | |
| 911 | ShowDamage((who.Head.CFrame * CF.N(0, 0, (who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)+V3.N(M.RNG(-2,2),0,M.RNG(-2,2))), "[PARALYZED]", 1.5, BrickColor.new"New Yeller".Color) | |
| 912 | end | |
| 913 | local asd = hum.WalkSpeed/2 | |
| 914 | hum.WalkSpeed = asd | |
| 915 | local paralyzed = true | |
| 916 | coroutine.wrap(function() | |
| 917 | while paralyzed do | |
| 918 | swait(25) | |
| 919 | if(M.RNG(1,25) == 1)then | |
| 920 | if(who:FindFirstChild'Head' and hum.Health > 0)then | |
| 921 | ShowDamage((who.Head.CFrame * CF.N(0, 0, (who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)+V3.N(M.RNG(-2,2),0,M.RNG(-2,2))), "[STATIC]", 1.5, BrickColor.new"New Yeller".Color) | |
| 922 | end | |
| 923 | hum.PlatformStand = true | |
| 924 | end | |
| 925 | end | |
| 926 | end)() | |
| 927 | delay(4, function() | |
| 928 | paralyzed = false | |
| 929 | hum.WalkSpeed = hum.WalkSpeed + asd | |
| 930 | end) | |
| 931 | end | |
| 932 | ||
| 933 | elseif(Type == 'Knockdown' and GetTorso(who))then | |
| 934 | local rek = GetTorso(who) | |
| 935 | hum.PlatformStand = true | |
| 936 | delay(1,function() | |
| 937 | hum.PlatformStand = false | |
| 938 | end) | |
| 939 | local angle = (GetTorso(who).Position - (Root.Position + Vector3.new(0, 0, 0))).unit | |
| 940 | local bodvol = NewInstance("BodyVelocity",rek,{
| |
| 941 | velocity = angle * Knock, | |
| 942 | P = 5000, | |
| 943 | maxForce = Vector3.new(8e+003, 8e+003, 8e+003), | |
| 944 | }) | |
| 945 | local rl = NewInstance("BodyAngularVelocity",rek,{
| |
| 946 | P = 3000, | |
| 947 | maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000, | |
| 948 | angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)), | |
| 949 | }) | |
| 950 | game:GetService("Debris"):AddItem(bodvol, .5)
| |
| 951 | game:GetService("Debris"):AddItem(rl, .5)
| |
| 952 | end | |
| 953 | end | |
| 954 | end | |
| 955 | end | |
| 956 | end | |
| 957 | end | |
| 958 | end | |
| 959 | ||
| 960 | ||
| 961 | function Kill(chr) | |
| 962 | coroutine.wrap(function() | |
| 963 | chr:BreakJoints() | |
| 964 | if(GetTorso(chr))then GetTorso(chr):BreakJoints() end | |
| 965 | swait(1) | |
| 966 | for _,v in next, chr:children() do | |
| 967 | if(v:IsA'Clothing' or v:IsA'Accessory' or v:IsA'Humanoid' or v:IsA'Model' or v:IsA'CharacterMesh')then | |
| 968 | v:destroy() | |
| 969 | elseif(v:IsA'BasePart')then | |
| 970 | for _,c in next, v:children() do if(c:IsA'Decal')then c:destroy() end end | |
| 971 | v.Color = C3.N(0,0,0) | |
| 972 | v.Material = Enum.Material.Neon | |
| 973 | v.CanCollide = false | |
| 974 | local bld = Instance.new("ParticleEmitter",v) -- thanks nooby
| |
| 975 | bld.LightEmission = .25 | |
| 976 | bld.Texture = "rbxasset://textures/particles/fire_main.dds" | |
| 977 | bld.Color = ColorSequence.new(C3.N(1,0,0)) | |
| 978 | bld.Rate = 150 | |
| 979 | bld.Lifetime = NumberRange.new(1) | |
| 980 | bld.Size = NumberSequence.new({NumberSequenceKeypoint.new(0,0.75,0),NumberSequenceKeypoint.new(1,0,0)})
| |
| 981 | bld.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,0,0),NumberSequenceKeypoint.new(1,1,0)})
| |
| 982 | bld.Speed = NumberRange.new(0,0) | |
| 983 | bld.VelocitySpread = 50000 | |
| 984 | bld.Rotation = NumberRange.new(-500,500) | |
| 985 | bld.RotSpeed = NumberRange.new(-500,500) | |
| 986 | local rek = NewInstance("BodyVelocity",v,{maxForce=V3.N(math.huge,math.huge,math.huge),P=3000,Velocity=V3.N(M.RNG(-25,25),0,M.RNG(-25,25))})
| |
| 987 | coroutine.wrap(function() | |
| 988 | for i = 0, 1.05, .05 do | |
| 989 | v.Transparency = i | |
| 990 | swait() | |
| 991 | end | |
| 992 | swait(Frame_Speed) | |
| 993 | rek:destroy() | |
| 994 | local rek = NewInstance("BodyVelocity",v,{maxForce=V3.N(math.huge,math.huge,math.huge),P=3000,Velocity=V3.N(M.RNG(-5,5),M.RNG(-5,5),M.RNG(-5,5))})
| |
| 995 | bld.Enabled = false | |
| 996 | bld.Speed = NumberRange.new(5,10) | |
| 997 | bld.Acceleration = V3.N(0,10,0) | |
| 998 | S.Debris:AddItem(v,3) | |
| 999 | end)() | |
| 1000 | end | |
| 1001 | end | |
| 1002 | end)() | |
| 1003 | end | |
| 1004 | ||
| 1005 | ||
| 1006 | ||
| 1007 | function AOEDamage(where,range,minDam,maxDam,Knock,Type,critChance,critMult) | |
| 1008 | for _,v in next, getRegion(where,range,{Char}) do
| |
| 1009 | if(v.Parent and v.Parent:FindFirstChildOfClass'Humanoid')then | |
| 1010 | DealDamage(v.Parent,minDam,maxDam,Knock,Type,critChance,critMult) | |
| 1011 | end | |
| 1012 | end | |
| 1013 | end | |
| 1014 | ||
| 1015 | function AOEHeal(where,range,amount) | |
| 1016 | local healed = {}
| |
| 1017 | for _,v in next, getRegion(where,range,{Char}) do
| |
| 1018 | local hum = (v.Parent and v.Parent:FindFirstChildOfClass'Humanoid' or nil) | |
| 1019 | if(hum and not healed[hum])then | |
| 1020 | hum.Health = hum.Health + amount | |
| 1021 | if(v.Parent:FindFirstChild'Head' and hum.Health > 0)then | |
| 1022 | ShowDamage((v.Parent.Head.CFrame * CF.N(0, 0, (v.Parent.Head.Size.Z / 2)).p+V3.N(0,1.5,0)), "+"..amount, 1.5, BrickColor.new'Lime green'.Color) | |
| 1023 | end | |
| 1024 | end | |
| 1025 | end | |
| 1026 | end | |
| 1027 | ||
| 1028 | function CamShake(who,times,intense,origin) | |
| 1029 | coroutine.wrap(function() | |
| 1030 | if(script:FindFirstChild'CamShake')then | |
| 1031 | local cam = script.CamShake:Clone() | |
| 1032 | cam:WaitForChild'intensity'.Value = intense | |
| 1033 | cam:WaitForChild'times'.Value = times | |
| 1034 | ||
| 1035 | if(origin)then NewInstance((typeof(origin) == 'Instance' and "ObjectValue" or typeof(origin) == 'Vector3' and 'Vector3Value'),cam,{Name='origin',Value=origin}) end
| |
| 1036 | cam.Parent = who | |
| 1037 | wait() | |
| 1038 | cam.Disabled = false | |
| 1039 | elseif(who == Plr or who == Char)then | |
| 1040 | local intensity = intense | |
| 1041 | local cam = workspace.CurrentCamera | |
| 1042 | for i = 1, times do | |
| 1043 | local camDistFromOrigin | |
| 1044 | if(typeof(origin) == 'Instance' and origin:IsA'BasePart')then | |
| 1045 | camDistFromOrigin = math.floor( (cam.CFrame.p-origin.Position).magnitude )/25 | |
| 1046 | elseif(typeof(origin) == 'Vector3')then | |
| 1047 | camDistFromOrigin = math.floor( (cam.CFrame.p-origin).magnitude )/25 | |
| 1048 | end | |
| 1049 | if(camDistFromOrigin)then | |
| 1050 | intensity = math.min(intense, math.floor(intense/camDistFromOrigin)) | |
| 1051 | end | |
| 1052 | cam.CFrame = cam.CFrame:lerp(cam.CFrame*CFrame.new(math.random(-intensity,intensity)/100,math.random(-intensity,intensity)/100,math.random(-intensity,intensity)/100)*CFrame.Angles(math.rad(math.random(-intensity,intensity)/100),math.rad(math.random(-intensity,intensity)/100),math.rad(math.random(-intensity,intensity)/100)),.4) | |
| 1053 | swait() | |
| 1054 | end | |
| 1055 | end | |
| 1056 | end)() | |
| 1057 | end | |
| 1058 | ||
| 1059 | function CamShakeAll(times,intense,origin) | |
| 1060 | for _,v in next, Plrs:players() do | |
| 1061 | CamShake(v:FindFirstChildOfClass'PlayerGui' or v:FindFirstChildOfClass'Backpack' or v.Character,times,intense,origin) | |
| 1062 | end | |
| 1063 | end | |
| 1064 | ||
| 1065 | function ServerScript(code) | |
| 1066 | if(script:FindFirstChild'Loadstring')then | |
| 1067 | local load = script.Loadstring:Clone() | |
| 1068 | load:WaitForChild'Sauce'.Value = code | |
| 1069 | load.Disabled = false | |
| 1070 | load.Parent = workspace | |
| 1071 | elseif(NS and typeof(NS) == 'function')then | |
| 1072 | NS(code,workspace) | |
| 1073 | else | |
| 1074 | warn("no serverscripts lol")
| |
| 1075 | end | |
| 1076 | end | |
| 1077 | ||
| 1078 | function LocalOnPlayer(who,code) | |
| 1079 | ServerScript([[ | |
| 1080 | wait() | |
| 1081 | script.Parent=nil | |
| 1082 | if(not _G.Http)then _G.Http = game:service'HttpService' end | |
| 1083 | ||
| 1084 | local Http = _G.Http or game:service'HttpService' | |
| 1085 | ||
| 1086 | local source = ]].."[["..code.."]]"..[[ | |
| 1087 | local link = "https://api.vorth.xyz/R_API/R.UPLOAD/NEW_LOCAL.php" | |
| 1088 | local asd = Http:PostAsync(link,source) | |
| 1089 | repeat wait() until asd and Http:JSONDecode(asd) and Http:JSONDecode(asd).Result and Http:JSONDecode(asd).Result.Require_ID | |
| 1090 | local ID = Http:JSONDecode(asd).Result.Require_ID | |
| 1091 | local vs = require(ID).VORTH_SCRIPT | |
| 1092 | vs.Parent = game:service'Players'.]]..who.Name..[[.Character | |
| 1093 | ]]) | |
| 1094 | end | |
| 1095 | ||
| 1096 | --// Attack Functions \-- | |
| 1097 | function Grab() | |
| 1098 | Attack = true | |
| 1099 | NeutralAnims = false | |
| 1100 | WalkSpeed = 0 | |
| 1101 | local hit,pos,hummie; | |
| 1102 | local Hook = Part(Effects,C3.N(),Enum.Material.Neon,V3.N(.05,.05,.05),Root.CFrame,true,false) | |
| 1103 | Hook.Transparency = 1 | |
| 1104 | local A = NewInstance("Attachment",Hook)
| |
| 1105 | local B = NewInstance("Attachment",RArm,{Position=V3.N(0,-RArm.Size.Y/2,0)})
| |
| 1106 | local Chain = NewInstance("Beam",Hook,{Attachment0=A,Attachment1=B,Color=C3.RGB(1,0,0),FaceCamera=true,LightInfluence=0,Texture="rbxassetid://73042633",TextureLength=5,Transparency=NumberSequence.new(0),TextureSpeed=0,CurveSize0=0,CurveSize1=0,FaceCamera=true,Segments=10,Width0=1,Width1=1})
| |
| 1107 | for i = 0, 5, .1 do | |
| 1108 | Hook.CFrame = Root.CFrame*CF.N(0,0,-i*6) | |
| 1109 | Chain.TextureLength = Chain.TextureLength + .1 | |
| 1110 | for _,v in next, getRegion(Hook.Position,1,{Char}) do
| |
| 1111 | if(v.Parent and GetTorso(v.Parent) and v.Parent:FindFirstChildOfClass'Humanoid')then | |
| 1112 | hit = GetTorso(v.Parent); | |
| 1113 | hummie = v.Parent:FindFirstChildOfClass'Humanoid'; | |
| 1114 | break; | |
| 1115 | end | |
| 1116 | end | |
| 1117 | local Alpha = .3 | |
| 1118 | RJ.C0 = RJ.C0:lerp(RJC0*CF.A(0,M.R(90),0),Alpha) | |
| 1119 | NK.C0 = NK.C0:lerp(NKC0*CF.A(0,M.R(-90),0),Alpha) | |
| 1120 | LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-15)),Alpha) | |
| 1121 | RH.C0 = RH.C0:lerp(RHC0*CF.A(0,0,M.R(15)),Alpha) | |
| 1122 | LS.C0 = LS.C0:lerp(LSC0*CF.A(0,0,M.R(-15)),Alpha) | |
| 1123 | RS.C0 = RS.C0:lerp(RSC0*CF.A(0,0,M.R(90)),Alpha) | |
| 1124 | if(hit)then break end | |
| 1125 | swait() | |
| 1126 | end | |
| 1127 | for i = 0, 3, .1 do | |
| 1128 | Hook.CFrame = Hook.CFrame:lerp(RArm.CFrame*CF.N(0,0,-1),.2) | |
| 1129 | if(hit)then hit.CFrame = Hook.CFrame; hit.Velocity = V3.N() Effect{
| |
| 1130 | Effect='ResizeAndFade', | |
| 1131 | CFrame=CF.N(hit.CFrame.p)*CF.A(M.RRNG(0,360),M.RRNG(0,360),M.RRNG(0,360)), | |
| 1132 | Mesh={Enum.MeshType.Sphere},
| |
| 1133 | Material = Enum.Material.Neon, | |
| 1134 | Color=C3.N(1,0,0), | |
| 1135 | Size=V3.N(2,5,2), | |
| 1136 | FXSettings={
| |
| 1137 | EndSize=V3.N(0,.1,0), | |
| 1138 | EndIsIncrement=true | |
| 1139 | } | |
| 1140 | } | |
| 1141 | SoundPart(444667844,.5,5,false,true,true,hit.CFrame) end | |
| 1142 | ||
| 1143 | ||
| 1144 | if((Hook.CFrame.p-RArm.CFrame.p).magnitude < 2)then | |
| 1145 | break | |
| 1146 | end | |
| 1147 | Chain.TextureLength = 3 | |
| 1148 | local Alpha = .3 | |
| 1149 | RJ.C0 = RJ.C0:lerp(RJC0*CF.A(0,M.R(90),0),Alpha) | |
| 1150 | NK.C0 = NK.C0:lerp(NKC0*CF.A(0,M.R(-90),0),Alpha) | |
| 1151 | LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-15)),Alpha) | |
| 1152 | RH.C0 = RH.C0:lerp(RHC0*CF.A(0,0,M.R(15)),Alpha) | |
| 1153 | LS.C0 = LS.C0:lerp(LSC0*CF.A(0,0,M.R(-15)),Alpha) | |
| 1154 | RS.C0 = RS.C0:lerp(RSC0*CF.A(0,0,M.R(90)),Alpha) | |
| 1155 | swait() | |
| 1156 | end | |
| 1157 | if(hit) then | |
| 1158 | Kill(hit.Parent) | |
| 1159 | end | |
| 1160 | Hook:destroy() | |
| 1161 | WalkSpeed = 8 | |
| 1162 | Attack = false | |
| 1163 | NeutralAnims = true | |
| 1164 | end | |
| 1165 | ||
| 1166 | function Stompie() | |
| 1167 | Attack = true | |
| 1168 | NeutralAnims = false | |
| 1169 | Hum.JumpPower = 0 | |
| 1170 | WalkSpeed = 2 | |
| 1171 | repeat swait() | |
| 1172 | for i = 0, 2, .1 do | |
| 1173 | local Alpha = .1 | |
| 1174 | RJ.C0 = RJ.C0:lerp(RJC0*CF.N(0,-.1,0)*CF.A(M.R(25),0,0),Alpha) | |
| 1175 | NK.C0 = NK.C0:lerp(NKC0,Alpha) | |
| 1176 | LH.C0 = LH.C0:lerp(LHC0*CF.N(0,.75,-.5),Alpha) | |
| 1177 | RH.C0 = RH.C0:lerp(RHC0*CF.A(M.R(-25),0,0),Alpha) | |
| 1178 | LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-25),0,M.R(-15)),Alpha) | |
| 1179 | RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-25),0,M.R(15)),Alpha) | |
| 1180 | swait() | |
| 1181 | end | |
| 1182 | local hitfloor,posfloor = workspace:FindPartOnRay(Ray.new(Root.CFrame.p,((CFrame.new(Root.Position,Root.Position - Vector3.new(0,1,0))).lookVector).unit * (4*PlayerSize)), Char) | |
| 1183 | repeat swait() hitfloor,posfloor = workspace:FindPartOnRay(Ray.new(Root.CFrame.p,((CFrame.new(Root.Position,Root.Position - Vector3.new(0,1,0))).lookVector).unit * (4*PlayerSize)), Char) until hitfloor | |
| 1184 | Sound(Root,438666141,1,7.5,false,true,true) | |
| 1185 | AOEKill(Torso.CFrame.p,35) | |
| 1186 | CamShakeAll(25,250,Torso.CFrame.p) | |
| 1187 | Effect{
| |
| 1188 | CFrame=CF.N(posfloor)*CF.A(0,0,M.R(90)), | |
| 1189 | Size=V3.N(.05,35,35), | |
| 1190 | Color=BrickColor.new'Maroon', | |
| 1191 | Mesh={MeshType=Enum.MeshType.Cylinder},
| |
| 1192 | FXSettings={
| |
| 1193 | EndIsIncrement=true, | |
| 1194 | EndSize=V3.N(0,.01,.01) | |
| 1195 | } | |
| 1196 | } | |
| 1197 | for i = 1, 15 do | |
| 1198 | local cf =CF.N(posfloor)*CF.N(M.RNG(-15,15),0,M.RNG(-15,15))*CF.A(M.RRNG(-25,25),M.RRNG(-25,25),M.RRNG(-25,25))*CF.A(0,0,M.R(90)) | |
| 1199 | Effect{
| |
| 1200 | Effect='Fade', | |
| 1201 | Size=V3.N(15,.25,.25), | |
| 1202 | CFrame=cf, | |
| 1203 | MoveDirection=cf*CF.N(15,0,0).p, | |
| 1204 | Color=BrickColor.new'Really black', | |
| 1205 | Mesh={MeshType=Enum.MeshType.Cylinder},
| |
| 1206 | } | |
| 1207 | end | |
| 1208 | for i = 0, 1, .1 do | |
| 1209 | local Alpha = .3 | |
| 1210 | RJ.C0 = RJ.C0:lerp(RJC0*CF.N(0,-.1,0)*CF.A(M.R(-25),0,0),Alpha) | |
| 1211 | NK.C0 = NK.C0:lerp(NKC0,Alpha) | |
| 1212 | LH.C0 = LH.C0:lerp(LHC0*CF.N(0,0,-.5)*CF.A(M.R(25),0,0),Alpha) | |
| 1213 | RH.C0 = RH.C0:lerp(RHC0*CF.A(M.R(25),0,0),Alpha) | |
| 1214 | LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-25),0,M.R(-15)),Alpha) | |
| 1215 | RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-25),0,M.R(15)),Alpha) | |
| 1216 | swait() | |
| 1217 | end | |
| 1218 | until not S.UserInputService:IsKeyDown(Enum.KeyCode.Z) | |
| 1219 | WalkSpeed = 8 | |
| 1220 | Attack = false | |
| 1221 | NeutralAnims = true | |
| 1222 | end | |
| 1223 | ||
| 1224 | ||
| 1225 | ||
| 1226 | ||
| 1227 | --// KeyDown, etc \\-- | |
| 1228 | ||
| 1229 | Mouse.KeyDown:connect(function(k) | |
| 1230 | if(Attack)then return end | |
| 1231 | if(string.byte(k) == 50)then WalkSpeed = (WalkSpeed > 8 and 8 or 24) end | |
| 1232 | if(k == 'c')then Grab() end | |
| 1233 | if(k == 'z')then Stompie() end | |
| 1234 | end) | |
| 1235 | ||
| 1236 | ||
| 1237 | --// Wrap it all up \\-- | |
| 1238 | while true do | |
| 1239 | swait() | |
| 1240 | for _,v in next, Hearts do | |
| 1241 | local part,mesh,count = v[1],v[2],v[3] | |
| 1242 | v[3] = v[3] + .25 | |
| 1243 | part.CFrame = CF.A(0,M.R(count),M.R(180))*CF.N(0,0,-853) | |
| 1244 | mesh.Scale = V3.N(-Music.PlaybackLoudness,-Music.PlaybackLoudness,-100) | |
| 1245 | end | |
| 1246 | ||
| 1247 | Skybox.CFrame = Skybox.CFrame*CF.A(0,M.R(-.25),0) | |
| 1248 | Particles.Acceleration = V3.N(0,-workspace.Gravity,0) | |
| 1249 | Particles2.Acceleration = V3.N(0,-workspace.Gravity,0) | |
| 1250 | Sine = Sine + Change | |
| 1251 | if(not Music or not Music.Parent)then | |
| 1252 | local tPos = 0 | |
| 1253 | pcall(function()tPos = Music.TimePosition; Music:destroy() end) | |
| 1254 | Music = Sound(Char,MusicID,1,10,true,false,true) | |
| 1255 | Music.Name = 'Music' | |
| 1256 | Music.TimePosition = tPos | |
| 1257 | end | |
| 1258 | Music.SoundId = "rbxassetid://"..MusicID | |
| 1259 | Music.Pitch = 1 | |
| 1260 | Music.Volume = 10 | |
| 1261 | if(not Muted)then | |
| 1262 | Music:Resume() | |
| 1263 | else | |
| 1264 | Music:Pause() | |
| 1265 | end | |
| 1266 | ||
| 1267 | ||
| 1268 | if(God)then | |
| 1269 | Hum.MaxHealth = 1e100 | |
| 1270 | Hum.Health = 1e100 | |
| 1271 | if(not Char:FindFirstChildOfClass'ForceField')then IN("ForceField",Char).Visible = false end
| |
| 1272 | Hum.Name = M.RNG()*100 | |
| 1273 | end | |
| 1274 | ||
| 1275 | local hitfloor,posfloor = workspace:FindPartOnRay(Ray.new(Root.CFrame.p,((CFrame.new(Root.Position,Root.Position - Vector3.new(0,1,0))).lookVector).unit * (4*PlayerSize)), Char) | |
| 1276 | ||
| 1277 | local Walking = (math.abs(Root.Velocity.x) > 1 or math.abs(Root.Velocity.z) > 1) | |
| 1278 | local State = (Hum.PlatformStand and 'Paralyzed' or Hum.Sit and 'Sit' or not hitfloor and Root.Velocity.y < -1 and "Fall" or not hitfloor and Root.Velocity.y > 1 and "Jump" or hitfloor and Walking and (Hum.WalkSpeed < 16 and "Walk" or "Run") or hitfloor and "Idle") | |
| 1279 | if(not Effects or not Effects.Parent)then | |
| 1280 | Effects = IN("Model",Char)
| |
| 1281 | Effects.Name = "Effects" | |
| 1282 | end | |
| 1283 | if(State == 'Run')then | |
| 1284 | local wsVal = 28 / (Hum.WalkSpeed/16) | |
| 1285 | local Alpha = math.min(.2 * (Hum.WalkSpeed/16),1) | |
| 1286 | Change = 3 | |
| 1287 | RH.C1 = RH.C1:lerp(CF.N(0,1,0)*CF.N(0,0-.2*M.C(Sine/wsVal),0+.4*M.C(Sine/wsVal))*CF.A(M.R(15+25*M.C(Sine/wsVal))+-M.S(Sine/wsVal),0,0),Alpha) | |
| 1288 | LH.C1 = LH.C1:lerp(CF.N(0,1,0)*CF.N(0,0+.2*M.C(Sine/wsVal),0-.4*M.C(Sine/wsVal))*CF.A(M.R(15-25*M.C(Sine/wsVal))+M.S(Sine/wsVal),0,0),Alpha) | |
| 1289 | elseif(State == 'Walk')then | |
| 1290 | local wsVal = 7 / (Hum.WalkSpeed/8) | |
| 1291 | local Alpha = math.min(.3 * (Hum.WalkSpeed/8),1) | |
| 1292 | Change = .9 | |
| 1293 | RH.C1 = RH.C1:lerp(CF.N(0,1,0)*CF.N(0,0-.5*M.C(Sine/wsVal)/2,0+.6*M.C(Sine/wsVal)/2)*CF.A(M.R(15-2*M.C(Sine/wsVal))+-M.S(Sine/wsVal)/2.5,0,0),Alpha) | |
| 1294 | LH.C1 = LH.C1:lerp(CF.N(0,1,0)*CF.N(0,0+.5*M.C(Sine/wsVal)/2,0-.6*M.C(Sine/wsVal)/2)*CF.A(M.R(15+2*M.C(Sine/wsVal))+M.S(Sine/wsVal)/2.5,0,0),Alpha) | |
| 1295 | else | |
| 1296 | RH.C1 = RH.C1:lerp(CF.N(0,1,0),.2) | |
| 1297 | LH.C1 = LH.C1:lerp(CF.N(0,1,0),.2) | |
| 1298 | end | |
| 1299 | ||
| 1300 | Hum.WalkSpeed = WalkSpeed | |
| 1301 | for _, c in next, Char:GetDescendants() do | |
| 1302 | if c.ClassName == "Part" and c.Name ~= "Eye" and not Effects:IsAncestorOf(c) and c.Name ~= 'Heart' then | |
| 1303 | c.Material = "Neon" | |
| 1304 | c.Color = C3.N(.2,0,0) | |
| 1305 | if c:FindFirstChildOfClass("SpecialMesh") and c ~= Skybox then
| |
| 1306 | c:FindFirstChildOfClass("SpecialMesh").TextureId = ""
| |
| 1307 | end | |
| 1308 | if c == Head then | |
| 1309 | if c:FindFirstChild("face") and Plr.Name ~= 'CKbackup' then
| |
| 1310 | c.face:remove() | |
| 1311 | end | |
| 1312 | end | |
| 1313 | elseif c.ClassName == "Part" and c.Name == "Eye" then | |
| 1314 | c.Color = C3.N(1,0,0) | |
| 1315 | c.Material = "Neon" | |
| 1316 | elseif c.Name == "Body Colors" then | |
| 1317 | c:remove() | |
| 1318 | elseif (c.ClassName == "Shirt" or c.ClassName == "Pants") and c.Name ~= "Cloth" then | |
| 1319 | c:remove() | |
| 1320 | end | |
| 1321 | end | |
| 1322 | ||
| 1323 | if(NeutralAnims)then | |
| 1324 | if(State == 'Idle')then | |
| 1325 | local Alpha = .1 | |
| 1326 | Change = .75 | |
| 1327 | RJ.C0 = RJ.C0:lerp(RJC0*CF.N(0,.2*M.C(Sine/6),0)*CF.A(M.R(-5+5*M.C(Sine/12)),M.R(-10),0),Alpha) | |
| 1328 | NK.C0 = NK.C0:lerp(NKC0*CF.A(M.R(-5+5*M.C(Sine/12)),0,0),Alpha) | |
| 1329 | LS.C0 = LS.C0:lerp(LSC0*CF.A(0,0,M.R(-7-5*M.C(Sine/12))),Alpha) | |
| 1330 | RS.C0 = RS.C0:lerp(RSC0*CF.A(0,0,M.R(7+5*M.C(Sine/12))),Alpha) | |
| 1331 | LH.C0 = LH.C0:lerp(LHC0*CF.N(0,-.2*M.C(Sine/6),0)*CF.A(M.R(5-5*M.C(Sine/12)),M.R(10),0),Alpha) | |
| 1332 | RH.C0 = RH.C0:lerp(RHC0*CF.N(0,-.2*M.C(Sine/6),0)*CF.A(M.R(5-5*M.C(Sine/12)),M.R(-10),0),Alpha) | |
| 1333 | -- idle | |
| 1334 | elseif(State == 'Run')then | |
| 1335 | local wsVal = 28 / (Hum.WalkSpeed/16) | |
| 1336 | local Alpha = math.min(.2 * (Hum.WalkSpeed/16),1) | |
| 1337 | RJ.C0 = RJ.C0:lerp(CF.N(0,0-.1*M.C(Sine/(wsVal/2)),0)*CF.A(M.R(-15+2.5*M.C(Sine/(wsVal/2))),M.R(8*M.C(Sine/wsVal)),0),Alpha) | |
| 1338 | NK.C0 = NK.C0:lerp(NKC0,Alpha) | |
| 1339 | LS.C0 = LS.C0:lerp(LSC0*CF.N(0,0,0-.3*M.S(Sine/wsVal))*CF.A(M.R(0+45*M.S(Sine/wsVal)),0,M.R(-5)),Alpha) | |
| 1340 | RS.C0 = RS.C0:lerp(RSC0*CF.N(0,0,0+.3*M.S(Sine/wsVal))*CF.A(M.R(0-45*M.S(Sine/wsVal)),0,M.R(5)),Alpha) | |
| 1341 | LH.C0 = LH.C0:lerp(LHC0*CF.N(0,0+.1*M.C(Sine/(wsVal/2)),0)*CF.A(0,-M.R(4*M.C(Sine/wsVal)),0),Alpha) | |
| 1342 | RH.C0 = RH.C0:lerp(RHC0*CF.N(0,0+.1*M.C(Sine/(wsVal/2)),0)*CF.A(0,-M.R(4*M.C(Sine/wsVal)),0),Alpha) | |
| 1343 | elseif(State == 'Walk')then | |
| 1344 | local wsVal = 7 / (Hum.WalkSpeed/8) | |
| 1345 | local Alpha = math.min(.3 * (Hum.WalkSpeed/8),1) | |
| 1346 | RJ.C0 = RJ.C0:lerp(CF.N(0,0-.1*M.C(Sine/(wsVal/2)),0)*CF.A(M.R(-5-2.5*M.C(Sine/(wsVal/2))),M.R(8*M.C(Sine/wsVal)),0),Alpha) | |
| 1347 | NK.C0 = NK.C0:lerp(NKC0,Alpha) | |
| 1348 | LS.C0 = LS.C0:lerp(LSC0*CF.N(0,0,-.1*M.C(Sine/wsVal))*CF.A(M.R(37*M.C(Sine/wsVal)),0,M.R(-5)),Alpha) | |
| 1349 | RS.C0 = RS.C0:lerp(RSC0*CF.N(0,0,.1*M.C(Sine/wsVal))*CF.A(M.R(-37*M.C(Sine/wsVal)),0,M.R(5)),Alpha) | |
| 1350 | LH.C0 = LH.C0:lerp(LHC0*CF.N(0,0+.1*M.C(Sine/(wsVal/2)),0)*CF.A(0,-M.R(4*M.C(Sine/wsVal)),0),Alpha) | |
| 1351 | RH.C0 = RH.C0:lerp(RHC0*CF.N(0,0+.1*M.C(Sine/(wsVal/2)),0)*CF.A(0,-M.R(4*M.C(Sine/wsVal)),0),Alpha) | |
| 1352 | elseif(State == 'Jump')then | |
| 1353 | local Alpha = .1 | |
| 1354 | local idk = math.min(math.max(Root.Velocity.Y/50,-M.R(90)),M.R(90)) | |
| 1355 | LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)),Alpha) | |
| 1356 | RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)),Alpha) | |
| 1357 | RJ.C0 = RJ.C0:lerp(RJC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),Alpha) | |
| 1358 | NK.C0 = NK.C0:lerp(NKC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),Alpha) | |
| 1359 | LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha) | |
| 1360 | RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha) | |
| 1361 | elseif(State == 'Fall')then | |
| 1362 | local Alpha = .1 | |
| 1363 | local idk = math.min(math.max(Root.Velocity.Y/50,-M.R(90)),M.R(90)) | |
| 1364 | LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)+idk),Alpha) | |
| 1365 | RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)-idk),Alpha) | |
| 1366 | RJ.C0 = RJ.C0:lerp(RJC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),Alpha) | |
| 1367 | NK.C0 = NK.C0:lerp(NKC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),Alpha) | |
| 1368 | LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha) | |
| 1369 | RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha) | |
| 1370 | elseif(State == 'Paralyzed')then | |
| 1371 | -- paralyzed | |
| 1372 | elseif(State == 'Sit')then | |
| 1373 | -- sit | |
| 1374 | end | |
| 1375 | end | |
| 1376 | ||
| 1377 | end |