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