SHOW:
|
|
- or go back to the newest paste.
| 1 | ||
| 2 | ||
| 3 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
| |
| 4 | local Player,game,owner = owner,game | |
| 5 | local RealPlayer = Player | |
| 6 | do | |
| 7 | print("FE Compatibility code by retram..")
| |
| 8 | local rp = RealPlayer | |
| 9 | script.Parent = rp.Character | |
| 10 | ||
| 11 | --RemoteEvent for communicating | |
| 12 | local Event = Instance.new("RemoteEvent")
| |
| 13 | Event.Name = "UserInput_Event" | |
| 14 | ||
| 15 | --Fake event to make stuff like Mouse.KeyDown work | |
| 16 | local function fakeEvent() | |
| 17 | local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
| |
| 18 | t.connect = t.Connect | |
| 19 | return t | |
| 20 | end | |
| 21 | ||
| 22 | --Creating fake input objects with fake variables | |
| 23 | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
| |
| 24 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
| |
| 25 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
| |
| 26 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
| |
| 27 | end} | |
| 28 | --Merged 2 functions into one by checking amount of arguments | |
| 29 | CAS.UnbindAction = CAS.BindAction | |
| 30 | ||
| 31 | --This function will trigger the events that have been :Connect()'ed | |
| 32 | local function te(self,ev,...) | |
| 33 | local t = m[ev] | |
| 34 | if t and t._fakeEvent then | |
| 35 | for _,f in pairs(t.Functions) do | |
| 36 | f(...) | |
| 37 | end | |
| 38 | end | |
| 39 | end | |
| 40 | m.TrigEvent = te | |
| 41 | UIS.TrigEvent = te | |
| 42 | ||
| 43 | Event.OnServerEvent:Connect(function(plr,io) | |
| 44 | if plr~=rp then return end | |
| 45 | m.Target = io.Target | |
| 46 | m.Hit = io.Hit | |
| 47 | if not io.isMouse then | |
| 48 | local b = io.UserInputState == Enum.UserInputState.Begin | |
| 49 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
| 50 | return m:TrigEvent(b and "Button1Down" or "Button1Up") | |
| 51 | end | |
| 52 | if io.UserInputType == Enum.UserInputType.MouseButton2 then | |
| 53 | return m:TrigEvent(b and "Button2Down" or "Button2Up") | |
| 54 | end | |
| 55 | for _,t in pairs(CAS.Actions) do | |
| 56 | for _,k in pairs(t.Keys) do | |
| 57 | if k==io.KeyCode then | |
| 58 | t.Function(t.Name,io.UserInputState,io) | |
| 59 | end | |
| 60 | end | |
| 61 | end | |
| 62 | m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
| 63 | UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false) | |
| 64 | end | |
| 65 | end) | |
| 66 | Event.Parent = NLS([==[ | |
| 67 | local Player = game:GetService("Players").LocalPlayer
| |
| 68 | local Event = script:WaitForChild("UserInput_Event")
| |
| 69 | local Mouse = Player:GetMouse() | |
| 70 | local UIS = game:GetService("UserInputService")
| |
| 71 | local input = function(io,a) | |
| 72 | if a then return end | |
| 73 | --Since InputObject is a client-side instance, we create and pass table instead | |
| 74 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
| |
| 75 | end | |
| 76 | UIS.InputBegan:Connect(input) | |
| 77 | UIS.InputEnded:Connect(input) | |
| 78 | local h,t | |
| 79 | --Give the server mouse data 30 times every second, but only if the values changed | |
| 80 | --If player is not moving their mouse, client won't fire events | |
| 81 | while wait(1/30) do | |
| 82 | if h~=Mouse.Hit or t~=Mouse.Target then | |
| 83 | h,t=Mouse.Hit,Mouse.Target | |
| 84 | Event:FireServer({isMouse=true,Target=t,Hit=h})
| |
| 85 | end | |
| 86 | end]==],Player.Character) | |
| 87 | ||
| 88 | ----Sandboxed game object that allows the usage of client-side methods and services | |
| 89 | --Real game object | |
| 90 | local _rg = game | |
| 91 | ||
| 92 | --Metatable for fake service | |
| 93 | local fsmt = {
| |
| 94 | __index = function(self,k) | |
| 95 | local s = rawget(self,"_RealService") | |
| 96 | if s then | |
| 97 | return typeof(s[k])=="function" | |
| 98 | and function(_,...)return s[k](s,...)end or s[k] | |
| 99 | end | |
| 100 | end, | |
| 101 | __newindex = function(self,k,v) | |
| 102 | local s = rawget(self,"_RealService") | |
| 103 | if s then s[k]=v end | |
| 104 | end | |
| 105 | } | |
| 106 | local function FakeService(t,RealService) | |
| 107 | t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService | |
| 108 | return setmetatable(t,fsmt) | |
| 109 | end | |
| 110 | ||
| 111 | --Fake game object | |
| 112 | local g = {
| |
| 113 | GetService = function(self,s) | |
| 114 | return rawget(self,s) or _rg:GetService(s) | |
| 115 | end, | |
| 116 | Players = FakeService({
| |
| 117 | LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
| |
| 118 | },"Players"), | |
| 119 | UserInputService = FakeService(UIS,"UserInputService"), | |
| 120 | ContextActionService = FakeService(CAS,"ContextActionService"), | |
| 121 | RunService = FakeService({
| |
| 122 | _btrs = {},
| |
| 123 | RenderStepped = _rg:GetService("RunService").Heartbeat,
| |
| 124 | BindToRenderStep = function(self,name,_,fun) | |
| 125 | self._btrs[name] = self.Heartbeat:Connect(fun) | |
| 126 | end, | |
| 127 | UnbindFromRenderStep = function(self,name) | |
| 128 | self._btrs[name]:Disconnect() | |
| 129 | end, | |
| 130 | },"RunService") | |
| 131 | } | |
| 132 | rawset(g.Players,"localPlayer",g.Players.LocalPlayer) | |
| 133 | g.service = g.GetService | |
| 134 | FakeService(g,game) | |
| 135 | --Changing owner to fake player object to support owner:GetMouse() | |
| 136 | game,owner = g,g.Players.LocalPlayer | |
| 137 | end | |
| 138 | -- Created by Nebula_Zorua -- | |
| 139 | -- Glitch -- | |
| 140 | -- Smile for the ca-aaaaaa-amera~ -- | |
| 141 | -- Discord: Nebula the Zorua#6969 | |
| 142 | -- Youtube: https://www.youtube.com/channel/UCo9oU9dCw8jnuVLuy4_SATA | |
| 143 | ||
| 144 | ||
| 145 | --// Initializing \\-- | |
| 146 | local S = setmetatable({},{__index = function(s,i) return game:service(i) end})
| |
| 147 | local Plrs = S.Players | |
| 148 | local Plr = Plrs.LocalPlayer | |
| 149 | local Char = Plr.Character | |
| 150 | local Hum = Char:FindFirstChildOfClass'Humanoid' | |
| 151 | local RArm = Char["Right Arm"] | |
| 152 | local LArm = Char["Left Arm"] | |
| 153 | local RLeg = Char["Right Leg"] | |
| 154 | local LLeg = Char["Left Leg"] | |
| 155 | local Root = Char:FindFirstChild'HumanoidRootPart' | |
| 156 | local Torso = Char.Torso | |
| 157 | local Head = Char.Head | |
| 158 | local NeutralAnims = true | |
| 159 | local Attack = false | |
| 160 | local BloodPuddles = {}
| |
| 161 | local Effects = {}
| |
| 162 | local Debounces = {Debounces={}}
| |
| 163 | local Mouse = Plr:GetMouse() | |
| 164 | local Hit = {}
| |
| 165 | local Sine = 0 | |
| 166 | local Change = 1 | |
| 167 | ||
| 168 | Hum.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None | |
| 169 | --// Debounce System \\-- | |
| 170 | ||
| 171 | ||
| 172 | function Debounces:New(name,cooldown) | |
| 173 | local aaaaa = {Usable=true,Cooldown=cooldown or 2,CoolingDown=false,LastUse=0}
| |
| 174 | setmetatable(aaaaa,{__index = Debounces})
| |
| 175 | Debounces.Debounces[name] = aaaaa | |
| 176 | return aaaaa | |
| 177 | end | |
| 178 | ||
| 179 | function Debounces:Use(overrideUsable) | |
| 180 | assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use") | |
| 181 | if(self.Usable or overrideUsable)then | |
| 182 | self.Usable = false | |
| 183 | self.CoolingDown = true | |
| 184 | local LastUse = time() | |
| 185 | self.LastUse = LastUse | |
| 186 | delay(self.Cooldown or 2,function() | |
| 187 | if(self.LastUse == LastUse)then | |
| 188 | self.CoolingDown = false | |
| 189 | self.Usable = true | |
| 190 | end | |
| 191 | end) | |
| 192 | end | |
| 193 | end | |
| 194 | ||
| 195 | function Debounces:Get(name) | |
| 196 | assert(typeof(name) == 'string',("bad argument #1 to 'get' (string expected, got %s)"):format(typeof(name) == nil and "no value" or typeof(name)))
| |
| 197 | for i,v in next, Debounces.Debounces do | |
| 198 | if(i == name)then | |
| 199 | return v; | |
| 200 | end | |
| 201 | end | |
| 202 | end | |
| 203 | ||
| 204 | function Debounces:GetProgressPercentage() | |
| 205 | assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use") | |
| 206 | if(self.CoolingDown and not self.Usable)then | |
| 207 | return math.max( | |
| 208 | math.floor( | |
| 209 | ( | |
| 210 | (time()-self.LastUse)/self.Cooldown or 2 | |
| 211 | )*100 | |
| 212 | ) | |
| 213 | ) | |
| 214 | else | |
| 215 | return 100 | |
| 216 | end | |
| 217 | end | |
| 218 | ||
| 219 | --// Shortcut Variables \\-- | |
| 220 | local CF = {N=CFrame.new,A=CFrame.Angles,fEA=CFrame.fromEulerAnglesXYZ}
| |
| 221 | local C3 = {N=Color3.new,RGB=Color3.fromRGB,HSV=Color3.fromHSV,tHSV=Color3.toHSV}
| |
| 222 | local V3 = {N=Vector3.new,FNI=Vector3.FromNormalId,A=Vector3.FromAxis}
| |
| 223 | 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}
| |
| 224 | local R3 = {N=Region3.new}
| |
| 225 | local De = S.Debris | |
| 226 | local WS = workspace | |
| 227 | local Lght = S.Lighting | |
| 228 | local RepS = S.ReplicatedStorage | |
| 229 | local IN = Instance.new | |
| 230 | --// Instance Creation Functions \\-- | |
| 231 | ||
| 232 | function Sound(parent,id,pitch,volume,looped,effect,autoPlay) | |
| 233 | local Sound = IN("Sound")
| |
| 234 | Sound.SoundId = "rbxassetid://".. tostring(id or 0) | |
| 235 | Sound.Pitch = pitch or 1 | |
| 236 | Sound.Volume = volume or 1 | |
| 237 | Sound.Looped = looped or false | |
| 238 | if(autoPlay)then | |
| 239 | coroutine.wrap(function() | |
| 240 | repeat wait() until Sound.IsLoaded | |
| 241 | Sound.Playing = autoPlay or false | |
| 242 | end)() | |
| 243 | end | |
| 244 | if(not looped and effect)then | |
| 245 | Sound.Stopped:connect(function() | |
| 246 | Sound.Volume = 0 | |
| 247 | Sound:destroy() | |
| 248 | end) | |
| 249 | elseif(effect)then | |
| 250 | warn("Sound can't be looped and a sound effect!")
| |
| 251 | end | |
| 252 | Sound.Parent =parent or Torso | |
| 253 | return Sound | |
| 254 | end | |
| 255 | function Part(parent,color,material,size,cframe,anchored,cancollide) | |
| 256 | local part = IN("Part")
| |
| 257 | part[typeof(color) == 'BrickColor' and 'BrickColor' or 'Color'] = color or C3.N(0,0,0) | |
| 258 | part.Material = material or Enum.Material.SmoothPlastic | |
| 259 | part.TopSurface,part.BottomSurface=10,10 | |
| 260 | part.Size = size or V3.N(1,1,1) | |
| 261 | part.CFrame = cframe or CF.N(0,0,0) | |
| 262 | part.Anchored = anchored or true | |
| 263 | part.CanCollide = cancollide or false | |
| 264 | part.Parent = parent or Char | |
| 265 | return part | |
| 266 | end | |
| 267 | function Mesh(parent,meshtype,meshid,textid,scale,offset) | |
| 268 | local part = IN("SpecialMesh")
| |
| 269 | part.MeshId = meshid or "" | |
| 270 | part.TextureId = textid or "" | |
| 271 | part.Scale = scale or V3.N(1,1,1) | |
| 272 | part.Offset = offset or V3.N(0,0,0) | |
| 273 | part.MeshType = meshtype or Enum.MeshType.Sphere | |
| 274 | part.Parent = parent | |
| 275 | return part | |
| 276 | end | |
| 277 | ||
| 278 | NewInstance = function(instance,parent,properties) | |
| 279 | local inst = Instance.new(instance,parent) | |
| 280 | if(properties)then | |
| 281 | for i,v in next, properties do | |
| 282 | pcall(function() inst[i] = v end) | |
| 283 | end | |
| 284 | end | |
| 285 | return inst; | |
| 286 | end | |
| 287 | ||
| 288 | ||
| 289 | ||
| 290 | --// Extended ROBLOX tables \\-- | |
| 291 | 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})
| |
| 292 | --// Customization \\-- | |
| 293 | ||
| 294 | local Frame_Speed = 60 -- The frame speed for swait. 1 is automatically divided by this | |
| 295 | local Remove_Hats = false | |
| 296 | local Remove_Clothing = false | |
| 297 | local PlayerSize = 1 | |
| 298 | local DamageColor = BrickColor.new'Institutional white' | |
| 299 | local MusicId = 1470848774 | |
| 300 | local Twitching = false | |
| 301 | local ForcedTwitching = false | |
| 302 | local TwitchTime = 0 | |
| 303 | local Filter = true | |
| 304 | ||
| 305 | local TimePos = 0 | |
| 306 | local ReverseTime = 0 | |
| 307 | --// Weapon and GUI creation, and Character Customization \\-- | |
| 308 | ||
| 309 | if(Remove_Hats)then Instance.ClearChildrenOfClass(Char,"Accessory",true) end | |
| 310 | if(Remove_Clothing)then Instance.ClearChildrenOfClass(Char,"Clothing",true) Instance.ClearChildrenOfClass(Char,"ShirtGraphic",true) end | |
| 311 | local Effects = IN("Folder",Char)
| |
| 312 | Effects.Name = "Effects" | |
| 313 | ||
| 314 | Instance.ClearChildrenOfClass(Head,"Decal") | |
| 315 | ||
| 316 | NewInstance("Decal",Head,{Texture='rbxassetid://1345127347',Face=Enum.NormalId.Front})
| |
| 317 | local Music = Sound(Torso,MusicId,1,3,true,false,true) | |
| 318 | ||
| 319 | if(PlayerSize ~= 1)then | |
| 320 | for _,v in next, Char:GetDescendats() do | |
| 321 | if(v:IsA'BasePart')then | |
| 322 | v.Size = v.Size * PlayerSize | |
| 323 | end | |
| 324 | end | |
| 325 | end | |
| 326 | ||
| 327 | --// Stop animations \\-- | |
| 328 | for _,v in next, Hum:GetPlayingAnimationTracks() do | |
| 329 | v:Stop(); | |
| 330 | end | |
| 331 | ||
| 332 | pcall(game.Destroy,Char:FindFirstChild'Animate') | |
| 333 | pcall(game.Destroy,Hum:FindFirstChild'Animator') | |
| 334 | ||
| 335 | --// Joints \\-- | |
| 336 | ||
| 337 | 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)})
| |
| 338 | 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)})
| |
| 339 | local NK = NewInstance('Motor',Char,{Part0=Torso,Part1=Head,C0 = CF.N(0,1.5 * PlayerSize,0)})
| |
| 340 | local LH = NewInstance('Motor',Char,{Part0=Torso,Part1=LLeg,C0 = CF.N(-.5 * PlayerSize,-1 * PlayerSize,0),C1 = CF.N(0,1 * PlayerSize,0)})
| |
| 341 | local RH = NewInstance('Motor',Char,{Part0=Torso,Part1=RLeg,C0 = CF.N(.5 * PlayerSize,-1 * PlayerSize,0),C1 = CF.N(0,1 * PlayerSize,0)})
| |
| 342 | local RJ = NewInstance('Motor',Char,{Part0=Root,Part1=Torso})
| |
| 343 | ||
| 344 | local LSC0 = LS.C0 | |
| 345 | local RSC0 = RS.C0 | |
| 346 | local NKC0 = NK.C0 | |
| 347 | local LHC0 = LH.C0 | |
| 348 | local RHC0 = RH.C0 | |
| 349 | local RJC0 = RJ.C0 | |
| 350 | ||
| 351 | --// Artificial HB \\-- | |
| 352 | ||
| 353 | local ArtificialHB = IN("BindableEvent", script)
| |
| 354 | ArtificialHB.Name = "Heartbeat" | |
| 355 | ||
| 356 | script:WaitForChild("Heartbeat")
| |
| 357 | ||
| 358 | local tf = 0 | |
| 359 | local allowframeloss = false | |
| 360 | local tossremainder = false | |
| 361 | local lastframe = tick() | |
| 362 | local frame = 1/Frame_Speed | |
| 363 | ArtificialHB:Fire() | |
| 364 | ||
| 365 | game:GetService("RunService").Heartbeat:connect(function(s, p)
| |
| 366 | tf = tf + s | |
| 367 | if tf >= frame then | |
| 368 | if allowframeloss then | |
| 369 | script.Heartbeat:Fire() | |
| 370 | lastframe = tick() | |
| 371 | else | |
| 372 | for i = 1, math.floor(tf / frame) do | |
| 373 | ArtificialHB:Fire() | |
| 374 | end | |
| 375 | lastframe = tick() | |
| 376 | end | |
| 377 | if tossremainder then | |
| 378 | tf = 0 | |
| 379 | else | |
| 380 | tf = tf - frame * math.floor(tf / frame) | |
| 381 | end | |
| 382 | end | |
| 383 | end) | |
| 384 | ||
| 385 | function swait(num) | |
| 386 | if num == 0 or num == nil then | |
| 387 | ArtificialHB.Event:wait() | |
| 388 | else | |
| 389 | for i = 0, num do | |
| 390 | ArtificialHB.Event:wait() | |
| 391 | end | |
| 392 | end | |
| 393 | end | |
| 394 | ||
| 395 | ||
| 396 | --// Effect Function(s) \\-- | |
| 397 | ||
| 398 | local DownCharacters = {"̖","̗","̘","̙","̜","̝","̞","̟","̠","̤","̥","̦","̩","̪","̫","̬","̭","̮","̯","̰","̱","̲","̳","̹","̺","̻","̼","ͅ","͇","͈","͉","͍","͎","͓","͔","͕","͖","͙","͚","̣",}
| |
| 399 | local UpCharacters = {"̍","̎","̄","̅","̿","̑","̆","̐","͒","͗","͑","̇","̈","̊","͂","̓","̈́","͊","͋","͌","̃","̂","̌","͐","̀","́","̋","̏","̒","̓","̔","̽","̉","ͣ","ͤ","ͥ","ͦ","ͧ","ͨ","ͩ","ͪ","ͫ","ͬ","ͭ","ͮ","ͯ","̾","͛","͆","̚",}
| |
| 400 | local MidCharacters = {"̕","̛","̀","́","͘","̡","̢","̧","̨","̴","̵","̶","͏","͜","͝","͞","͟","͠","͢","̸","̷","͡","҉",}
| |
| 401 | ||
| 402 | function IsUnicode(c) | |
| 403 | for i = 128, 255 do | |
| 404 | if(string.char(i) == string.char(string.byte(c)))then | |
| 405 | return true | |
| 406 | end | |
| 407 | end | |
| 408 | return false | |
| 409 | end | |
| 410 | ||
| 411 | function IsZalgoChar(c) | |
| 412 | for i = 1, #UpCharacters do | |
| 413 | if(c == UpCharacters[i])then | |
| 414 | return true | |
| 415 | end | |
| 416 | end | |
| 417 | for i = 1, #DownCharacters do | |
| 418 | if(c == DownCharacters[i])then | |
| 419 | return true | |
| 420 | end | |
| 421 | end | |
| 422 | for i = 1, #MidCharacters do | |
| 423 | if(c == MidCharacters[i])then | |
| 424 | return true | |
| 425 | end | |
| 426 | end | |
| 427 | return false | |
| 428 | end | |
| 429 | ||
| 430 | function Zalgo(str,up,mid,down,streng) | |
| 431 | local function rand(max) | |
| 432 | return math.floor(M.RNG() * max); | |
| 433 | end | |
| 434 | local newTxt = ""; | |
| 435 | for i = 1, #str do | |
| 436 | if(not IsZalgoChar(str:sub(i,i)))then | |
| 437 | local upN,midN,downN = rand(8),rand(2),rand(8) | |
| 438 | if(streng == 2)then | |
| 439 | upN,midN,downN = rand(16)/2+1,rand(6)/2,rand(16)/2+1 | |
| 440 | elseif(streng == 3)then | |
| 441 | upN,midN,downN = rand(64)/4+3,rand(16)/4+1,rand(64)/4+3 | |
| 442 | end | |
| 443 | newTxt = newTxt..str:sub(i,i) | |
| 444 | if(up)then | |
| 445 | for j = 0, upN do | |
| 446 | newTxt = newTxt..UpCharacters[M.RNG(1,#UpCharacters)] | |
| 447 | end | |
| 448 | end | |
| 449 | if(mid)then | |
| 450 | for j = 0, midN do | |
| 451 | newTxt = newTxt..MidCharacters[M.RNG(1,#MidCharacters)] | |
| 452 | end | |
| 453 | end | |
| 454 | if(down)then | |
| 455 | for j = 0, downN do | |
| 456 | newTxt = newTxt..DownCharacters[M.RNG(1,#DownCharacters)] | |
| 457 | end | |
| 458 | end | |
| 459 | end | |
| 460 | end | |
| 461 | return newTxt | |
| 462 | end | |
| 463 | ||
| 464 | function Bezier(startpos, pos2, pos3, endpos, t) | |
| 465 | local A = startpos:lerp(pos2, t) | |
| 466 | local B = pos2:lerp(pos3, t) | |
| 467 | local C = pos3:lerp(endpos, t) | |
| 468 | local lerp1 = A:lerp(B, t) | |
| 469 | local lerp2 = B:lerp(C, t) | |
| 470 | local cubic = lerp1:lerp(lerp2, t) | |
| 471 | return cubic | |
| 472 | end | |
| 473 | ||
| 474 | ||
| 475 | function Effect(data) | |
| 476 | local FX = data.Effect or 'Resize-AndFade' | |
| 477 | local Parent = data.Parent or Effects | |
| 478 | local Color = data.Color or C3.N(0,0,0) | |
| 479 | local Size = data.Size or V3.N(1,1,1) | |
| 480 | local MoveDir = data.MoveDirection or nil | |
| 481 | local MeshData = data.Mesh or nil | |
| 482 | local SndData = data.Sound or nil | |
| 483 | local Frames = data.Frames or 45 | |
| 484 | local Manual = data.Manual or nil | |
| 485 | local Material = data.Material or nil | |
| 486 | local CFra = data.CFrame or Torso.CFrame | |
| 487 | local Settings = data.FXSettings or {}
| |
| 488 | local Snd,Prt,Msh; | |
| 489 | if(Manual and typeof(Manual) == 'Instance' and Manual:IsA'BasePart')then | |
| 490 | Prt = Manual | |
| 491 | else | |
| 492 | Prt = Part(Parent,Color,Material,Size,CFra,true,false) | |
| 493 | end | |
| 494 | if(typeof(MeshData) == 'table')then | |
| 495 | Msh = Mesh(Prt,MeshData.MeshType,MeshData.MeshId,MeshData.TextureId,MeshData.Scale,MeshData.Offset) | |
| 496 | elseif(typeof(MeshData) == 'Instance')then | |
| 497 | Msh = MeshData:Clone() | |
| 498 | Msh.Parent = Prt | |
| 499 | end | |
| 500 | if(typeof(SndData) == 'table' or typeof(SndData) == 'Instance')then | |
| 501 | Snd = Sound(Prt,SndData.SoundId,SndData.Pitch,SndData.Volume,false,false,true) | |
| 502 | end | |
| 503 | if(Snd)then | |
| 504 | repeat wait() until Snd.Playing and Snd.IsLoaded and Snd.TimeLength > 0 | |
| 505 | Frames = Snd.TimeLength * Frame_Speed/Snd.Pitch | |
| 506 | end | |
| 507 | local MoveSpeed = nil; | |
| 508 | if(MoveDir)then | |
| 509 | MoveSpeed = (CFra.p - MoveDir).magnitude/Frames | |
| 510 | end | |
| 511 | local Inc = M.RNG()-M.RNG() | |
| 512 | local Thingie = 0 | |
| 513 | local Thingie2 = M.RNG(50,100)/100 | |
| 514 | ||
| 515 | coroutine.wrap(function() | |
| 516 | if(FX ~= 'Arc')then | |
| 517 | for i = 1, Frames do | |
| 518 | if(FX == 'Resize-AndFade')then | |
| 519 | if(not Settings.EndSize)then | |
| 520 | Settings.EndSize = V3.N(0,0,0) | |
| 521 | end | |
| 522 | local grow = (typeof(Settings.EndSize) == 'Vector3' and Settings.EndSize-Size or typeof(Settings.EndSize) == 'number' and V3.N(Settings.EndSize)) | |
| 523 | if(Settings.EndIsIncrement)then | |
| 524 | Prt.Size = Prt.Size - Settings.EndSize | |
| 525 | else | |
| 526 | Prt.Size = Prt.Size - grow/Frames | |
| 527 | end | |
| 528 | Prt.Transparency = (i/Frames) | |
| 529 | elseif(FX == 'Resize+AndFade')then | |
| 530 | if(not Settings.EndSize)then | |
| 531 | Settings.EndSize = Size*2 | |
| 532 | end | |
| 533 | local grow = (typeof(Settings.EndSize) == 'Vector3' and Settings.EndSize-Size or typeof(Settings.EndSize) == 'number' and V3.N(Settings.EndSize)) | |
| 534 | if(Settings.EndIsIncrement)then | |
| 535 | Prt.Size = Prt.Size + Settings.EndSize | |
| 536 | else | |
| 537 | Prt.Size = Prt.Size + grow/Frames | |
| 538 | end | |
| 539 | Prt.Transparency = (i/Frames) | |
| 540 | elseif(FX == 'Fade')then | |
| 541 | Prt.Transparency = (i/Frames) | |
| 542 | end | |
| 543 | if(Settings.RandomizeCFrame)then | |
| 544 | Prt.CFrame = Prt.CFrame * CF.A(M.RRNG(-360,360),M.RRNG(-360,360),M.RRNG(-360,360)) | |
| 545 | end | |
| 546 | if(MoveDir and MoveSpeed)then | |
| 547 | local Orientation = Prt.Orientation | |
| 548 | Prt.CFrame = CF.N(Prt.Position,MoveDir)*CF.N(0,0,-MoveSpeed) | |
| 549 | Prt.Orientation = Orientation | |
| 550 | end | |
| 551 | if(swait and typeof(swait) == 'function')then | |
| 552 | swait() | |
| 553 | else | |
| 554 | wait() | |
| 555 | end | |
| 556 | end | |
| 557 | Prt:destroy() | |
| 558 | else | |
| 559 | local start,third,fourth,endP = Settings.Start,Settings.Third,Settings.Fourth,Settings.End | |
| 560 | if(not Settings.End and Settings.Home)then endP = Settings.Home.CFrame end | |
| 561 | local quarter = third or start:lerp(endP, 0.25) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25)) | |
| 562 | local threequarter = fourth or start:lerp(endP, 0.75) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25)) | |
| 563 | assert(start ~= nil,"You need to specify a start point!") | |
| 564 | assert(endP ~= nil,"You need to specify an end point!") | |
| 565 | for i = 0, 1, Settings.Speed or 0.01 do | |
| 566 | if(Settings.Home)then | |
| 567 | endP = Settings.Home.CFrame | |
| 568 | end | |
| 569 | Prt.CFrame = Bezier(start, quarter, threequarter, endP, i) | |
| 570 | if(swait and typeof(swait) == 'function')then | |
| 571 | swait() | |
| 572 | else | |
| 573 | wait() | |
| 574 | end | |
| 575 | end | |
| 576 | if(Settings.RemoveOnGoal)then | |
| 577 | Prt:destroy() | |
| 578 | end | |
| 579 | end | |
| 580 | end)() | |
| 581 | return Prt,Msh,Snd | |
| 582 | end | |
| 583 | ||
| 584 | ||
| 585 | function SoulSteal(whom) | |
| 586 | local torso = (whom:FindFirstChild'Head' or whom:FindFirstChild'Torso' or whom:FindFirstChild'UpperTorso' or whom:FindFirstChild'LowerTorso' or whom:FindFirstChild'HumanoidRootPart') | |
| 587 | print(torso) | |
| 588 | if(torso and torso:IsA'BasePart')then | |
| 589 | local Model = Instance.new("Model",Effects)
| |
| 590 | Model.Name = whom.Name.."'s Soul" | |
| 591 | whom:BreakJoints() | |
| 592 | local Soul = Part(Model,BrickColor.new'Really red','Glass',V3.N(.5,.5,.5),torso.CFrame,true,false) | |
| 593 | Soul.Name = 'Head' | |
| 594 | NewInstance("Humanoid",Model,{Health=0,MaxHealth=0})
| |
| 595 | Effect{
| |
| 596 | Effect="Arc", | |
| 597 | Manual = Soul, | |
| 598 | FXSettings={
| |
| 599 | Start=torso.CFrame, | |
| 600 | Home = Torso, | |
| 601 | RemoveOnGoal = true, | |
| 602 | } | |
| 603 | } | |
| 604 | local lastPoint = Soul.CFrame.p | |
| 605 | ||
| 606 | for i = 0, 1, 0.01 do | |
| 607 | local point = CFrame.new(lastPoint, Soul.Position) * CFrame.Angles(-math.pi/2, 0, 0) | |
| 608 | local mag = (lastPoint - Soul.Position).magnitude | |
| 609 | Effect{
| |
| 610 | Effect = "Fade", | |
| 611 | CFrame = point * CF.N(0, mag/2, 0), | |
| 612 | Size = V3.N(.5,mag+.5,.5), | |
| 613 | Color = Soul.BrickColor | |
| 614 | } | |
| 615 | lastPoint = Soul.CFrame.p | |
| 616 | swait() | |
| 617 | end | |
| 618 | for i = 1, 5 do | |
| 619 | Effect{
| |
| 620 | Effect="Fade", | |
| 621 | Color = BrickColor.new'Really red', | |
| 622 | MoveDirection = (Torso.CFrame*CFrame.new(M.RNG(-40,40),M.RNG(-40,40),M.RNG(-40,40))).p | |
| 623 | } | |
| 624 | end | |
| 625 | end | |
| 626 | end | |
| 627 | ||
| 628 | --// Other Functions \\ -- | |
| 629 | ||
| 630 | function getRegion(point,range,ignore) | |
| 631 | return workspace:FindPartsInRegion3WithIgnoreList(R3.N(point-V3.N(1,1,1)*range/2,point+V3.N(1,1,1)*range/2),ignore,100) | |
| 632 | end | |
| 633 | ||
| 634 | function clerp(startCF,endCF,alpha) | |
| 635 | return startCF:lerp(endCF, alpha) | |
| 636 | end | |
| 637 | ||
| 638 | function GetTorso(char) | |
| 639 | return char:FindFirstChild'Torso' or char:FindFirstChild'UpperTorso' or char:FindFirstChild'LowerTorso' or char:FindFirstChild'HumanoidRootPart' | |
| 640 | end | |
| 641 | ||
| 642 | function RandomEnum(enum) | |
| 643 | local t = enum:GetEnumItems() | |
| 644 | if(#t < 1)then t = 1 end | |
| 645 | local choice = M.RNG(1,#t) | |
| 646 | return t[choice] | |
| 647 | end | |
| 648 | ||
| 649 | function Chat(text) | |
| 650 | coroutine.wrap(function() | |
| 651 | if Char:FindFirstChild("TalkingBillBoard")~= nil then
| |
| 652 | Char:FindFirstChild("TalkingBillBoard"):destroy()
| |
| 653 | end | |
| 654 | local oText = text; | |
| 655 | text = "" | |
| 656 | for i = 1, #oText do | |
| 657 | local lol = M.RNG(1,24) | |
| 658 | if(lol == 1 or lol == 2)then | |
| 659 | text = text..(oText:sub(i,i):upper()) | |
| 660 | elseif(lol == 3 or lol == 4)then | |
| 661 | text = text..Zalgo(oText:sub(i,i),M.RNG(1,2) == 1,true,M.RNG(1,2) == 1,M.RNG(1,3)) | |
| 662 | elseif(lol == 5 or lol == 6)then | |
| 663 | text = text.." "..(oText:sub(i,i):lower()) | |
| 664 | elseif(lol == 7)then | |
| 665 | text = text..(string.rep(oText:sub(i,i):lower(),M.RNG(5,9))) | |
| 666 | else | |
| 667 | text = text..(oText:sub(i,i):lower()) | |
| 668 | end | |
| 669 | end | |
| 670 | local Bill = Instance.new("BillboardGui",Char)
| |
| 671 | Bill.Size = UDim2.new(0,100,0,40) | |
| 672 | Bill.StudsOffset = Vector3.new(0,3,0) | |
| 673 | Bill.Adornee = Char.Head | |
| 674 | Bill.Name = "TalkingBillBoard" | |
| 675 | local Hehe = Instance.new("TextLabel",Bill)
| |
| 676 | Hehe.BackgroundTransparency = 1 | |
| 677 | Hehe.BorderSizePixel = 0 | |
| 678 | Hehe.Text = "" | |
| 679 | Hehe.Font = "Bodoni" | |
| 680 | Hehe.TextSize = 40 | |
| 681 | Hehe.TextStrokeTransparency = 0 | |
| 682 | Hehe.Size = UDim2.new(1,0,0.5,0) | |
| 683 | coroutine.resume(coroutine.create(function() | |
| 684 | while Hehe ~= nil do | |
| 685 | swait() | |
| 686 | Hehe.Font = RandomEnum(Enum.Font) | |
| 687 | Hehe.Position = UDim2.new(math.random(-.4,.4),math.random(-5,5),.05,math.random(-5,5)) | |
| 688 | Hehe.Rotation = M.RNG(-M.RNG(5,15),M.RNG(5,15)) | |
| 689 | local aa = math.random(0, 255)/255 | |
| 690 | local bb = math.random(0, 255)/255 | |
| 691 | Hehe.TextColor3 = C3.N(aa,aa,aa) | |
| 692 | Hehe.TextStrokeColor3 = C3.N(bb,bb,bb) | |
| 693 | end | |
| 694 | end)) | |
| 695 | for i = 1,string.len(text),1 do | |
| 696 | if(not IsZalgoChar(text:sub(i,i)) and not IsUnicode(text:sub(i,i)))then swait(5) end | |
| 697 | Hehe.Text = string.sub(text,1,i) | |
| 698 | end | |
| 699 | swait(90) | |
| 700 | for i = 0, 1, .025 do | |
| 701 | swait() | |
| 702 | Hehe.TextStrokeTransparency = i | |
| 703 | Hehe.TextTransparency = i | |
| 704 | Bill.ExtentsOffset = Vector3.new(math.random(-i, i), math.random(-i, i), math.random(-i, i)) | |
| 705 | end | |
| 706 | Bill:Destroy() | |
| 707 | end)() | |
| 708 | end | |
| 709 | ||
| 710 | function ShowDamage(Pos, Text, Time, Color) | |
| 711 | coroutine.wrap(function() | |
| 712 | local Pos = (Pos or Vector3.new(0, 0, 0)) | |
| 713 | local Text = (Text or "") | |
| 714 | local Time = (Time or 2) | |
| 715 | local Color = (Color or Color3.new(1, 0, 1)) | |
| 716 | local EffectPart = NewInstance("Part",Effects,{
| |
| 717 | Material=Enum.Material.SmoothPlastic, | |
| 718 | Reflectance = 0, | |
| 719 | Transparency = 1, | |
| 720 | BrickColor = BrickColor.new(Color), | |
| 721 | Name = "Effect", | |
| 722 | Size = Vector3.new(0,0,0), | |
| 723 | Anchored = true | |
| 724 | }) | |
| 725 | local BillboardGui = NewInstance("BillboardGui",EffectPart,{
| |
| 726 | Size = UDim2.new(1.25, 0, 1.25, 0), | |
| 727 | Adornee = EffectPart, | |
| 728 | }) | |
| 729 | local TextLabel = NewInstance("TextLabel",BillboardGui,{
| |
| 730 | BackgroundTransparency = 1, | |
| 731 | Size = UDim2.new(1, 0, 1, 0), | |
| 732 | Text = Text, | |
| 733 | Font = "Arial", | |
| 734 | TextColor3 = Color, | |
| 735 | TextStrokeColor3 = Color3.new(0,0,0), | |
| 736 | TextStrokeTransparency=0, | |
| 737 | TextScaled = true, | |
| 738 | }) | |
| 739 | EffectPart.Parent = game:GetService("Workspace")
| |
| 740 | delay(0, function() | |
| 741 | local Frames = (Time / (1/Frame_Speed)) | |
| 742 | for Frame = 1, Frames do | |
| 743 | swait() | |
| 744 | local Percent = (Frame / Frames) | |
| 745 | EffectPart.CFrame = CF.N(Pos+ V3.N(0, Percent, 0)) * CF.A(0,0,M.RRNG(-90,90)) | |
| 746 | TextLabel.Rotation = M.RNG(-6,6) | |
| 747 | TextLabel.Position = UDim2.new(M.RNG(-1,1)/10,M.RNG(-1,1)/10,.05,M.RNG(-1,1)/10) | |
| 748 | end | |
| 749 | for i = 0, 1, .025 do | |
| 750 | swait() | |
| 751 | TextLabel.TextStrokeTransparency = i | |
| 752 | TextLabel.TextTransparency = i | |
| 753 | TextLabel.Position = UDim2.new(M.RNG(-15,15)/10,M.RNG(-15,15)/10,M.RNG(-15,15)/10,M.RNG(-15,15)/10) | |
| 754 | end | |
| 755 | if EffectPart and EffectPart.Parent then | |
| 756 | EffectPart:Destroy() | |
| 757 | end | |
| 758 | end) end)() | |
| 759 | end | |
| 760 | ||
| 761 | ||
| 762 | function DealDamage(who,minDam,maxDam,Knock,Type,critChance,critMult) | |
| 763 | if(who)then | |
| 764 | local hum = who:FindFirstChildOfClass'Humanoid' | |
| 765 | local Damage = M.RNG(minDam,maxDam) | |
| 766 | local canHit = true | |
| 767 | if(hum)then | |
| 768 | for _, p in pairs(Hit) do | |
| 769 | if p[1] == hum then | |
| 770 | if(time() - p[2] < 0.1) then | |
| 771 | canHit = false | |
| 772 | else | |
| 773 | Hit[_] = nil | |
| 774 | end | |
| 775 | end | |
| 776 | end | |
| 777 | if(canHit)then | |
| 778 | if(hum.Health >= math.huge)then | |
| 779 | who:BreakJoints() | |
| 780 | if(who:FindFirstChild'Head' and hum.Health > 0)then | |
| 781 | ShowDamage((who.Head.CFrame * CF.N(0, 0, (who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)), "INSTANT", 1.5, C3.N(1,0,0)) | |
| 782 | end | |
| 783 | else | |
| 784 | local player = S.Players:GetPlayerFromCharacter(who) | |
| 785 | if(Type == "Fire")then | |
| 786 | --idk.. | |
| 787 | else | |
| 788 | local c = Instance.new("ObjectValue",hum)
| |
| 789 | c.Name = "creator" | |
| 790 | c.Value = Plr | |
| 791 | game:service'Debris':AddItem(c,0.35) | |
| 792 | if(M.RNG(1,100) <= (critChance or 0))then | |
| 793 | if(who:FindFirstChild'Head' and hum.Health > 0)then | |
| 794 | ShowDamage((who.Head.CFrame * CF.N(0, 0, (who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)), "[CRIT] "..Damage*(critMult or 2), 1.5, BrickColor.new'New Yeller'.Color) | |
| 795 | end | |
| 796 | hum.Health = hum.Health - Damage*(critMult or 2) | |
| 797 | else | |
| 798 | if(who:FindFirstChild'Head' and hum.Health > 0)then | |
| 799 | ShowDamage((who.Head.CFrame * CF.N(0, 0, (who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)), Damage, 1.5, DamageColor.Color) | |
| 800 | end | |
| 801 | hum.Health = hum.Health - Damage | |
| 802 | end | |
| 803 | if(Type == 'Knockback' and GetTorso(who))then | |
| 804 | local angle = GetTorso(who).Position - Root.Position + Vector3.new(0, 0, 0).unit | |
| 805 | local body = NewInstance('BodyVelocity',GetTorso(who),{
| |
| 806 | P = 500, | |
| 807 | maxForce = V3.N(math.huge,0,math.huge), | |
| 808 | velocity = Root.CFrame.lookVector * Knock + Root.Velocity / 1.05 | |
| 809 | }) | |
| 810 | game:service'Debris':AddItem(body,.5) | |
| 811 | elseif(Type == 'Knockdown' and GetTorso(who))then | |
| 812 | local rek = GetTorso(who) | |
| 813 | print(rek) | |
| 814 | hum.PlatformStand = true | |
| 815 | delay(1,function() | |
| 816 | hum.PlatformStand = false | |
| 817 | end) | |
| 818 | local angle = (GetTorso(who).Position - (Root.Position + Vector3.new(0, 0, 0))).unit | |
| 819 | local bodvol = NewInstance("BodyVelocity",rek,{
| |
| 820 | velocity = angle * Knock, | |
| 821 | P = 5000, | |
| 822 | maxForce = Vector3.new(8e+003, 8e+003, 8e+003), | |
| 823 | }) | |
| 824 | local rl = NewInstance("BodyAngularVelocity",rek,{
| |
| 825 | P = 3000, | |
| 826 | maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000, | |
| 827 | angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)), | |
| 828 | }) | |
| 829 | game:GetService("Debris"):AddItem(bodvol, .5)
| |
| 830 | game:GetService("Debris"):AddItem(rl, .5)
| |
| 831 | end | |
| 832 | end | |
| 833 | end | |
| 834 | end | |
| 835 | table.insert(Hit,{hum,time()})
| |
| 836 | end | |
| 837 | end | |
| 838 | end | |
| 839 | ||
| 840 | function AOEDamage(where,range,minDam,maxDam,Knock,Type) | |
| 841 | for _,v in next, getRegion(where,range,{Char}) do
| |
| 842 | if(v.Parent and v.Parent:FindFirstChildOfClass'Humanoid')then | |
| 843 | DealDamage(v.Parent,minDam,maxDam,Knock,Type) | |
| 844 | end | |
| 845 | end | |
| 846 | end | |
| 847 | function AOEHeal(where,range,amount) | |
| 848 | local healed = {}
| |
| 849 | for _,v in next, getRegion(where,range,{Char}) do
| |
| 850 | local hum = (v.Parent and v.Parent:FindFirstChildOfClass'Humanoid' or nil) | |
| 851 | if(hum and not healed[hum])then | |
| 852 | hum.Health = hum.Health + amount | |
| 853 | if(v.Parent:FindFirstChild'Head' and hum.Health > 0)then | |
| 854 | 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) | |
| 855 | end | |
| 856 | end | |
| 857 | end | |
| 858 | end | |
| 859 | ||
| 860 | --// Wrap it all up \\-- | |
| 861 | ||
| 862 | pcall(function() | |
| 863 | Char.ReaperShadowHead.Eye1.BrickColor = BrickColor.new'White' | |
| 864 | Char.ReaperShadowHead.Eye2.BrickColor = BrickColor.new'White' | |
| 865 | end) | |
| 866 | Plr.Chatted:connect(function(text) | |
| 867 | if(text == "/e filter")then | |
| 868 | Filter = not Filter | |
| 869 | else | |
| 870 | if(Filter)then | |
| 871 | local succ,text = pcall(function() return game:service'Chat':FilterStringForBroadcast(text,Plr) end) | |
| 872 | if(not succ)then | |
| 873 | text = string.rep("_",#text)
| |
| 874 | end | |
| 875 | Chat(text) | |
| 876 | else | |
| 877 | Chat(text) | |
| 878 | end | |
| 879 | end | |
| 880 | end) | |
| 881 | ||
| 882 | coroutine.wrap(function() | |
| 883 | while true do | |
| 884 | swait(M.RNG(0,50)/100) | |
| 885 | if(NeutralAnims and not Twitching)then | |
| 886 | local GlitchEffect = M.RNG(1,200) | |
| 887 | if(GlitchEffect == 1)then | |
| 888 | TwitchTime = time() | |
| 889 | Twitching = true | |
| 890 | TimePos = Music.TimePosition | |
| 891 | for _,v in next, Char:children() do | |
| 892 | if(v:IsA'BasePart')then | |
| 893 | Effect{
| |
| 894 | Effect='Fade', | |
| 895 | Color = BrickColor.Random(), | |
| 896 | Material = RandomEnum(Enum.Material), | |
| 897 | Size = v.Size + V3.N(M.RNG(-75,75)/100,M.RNG(-75,75)/100,M.RNG(-75,75)/100), | |
| 898 | CFrame=v.CFrame * CF.A(M.RRNG(-15,15),M.RRNG(-15,15),M.RNG(-15,15)), | |
| 899 | Frames = M.RNG(35,120) | |
| 900 | } | |
| 901 | end | |
| 902 | end | |
| 903 | end | |
| 904 | end | |
| 905 | if(not ForcedTwitching and time()-TwitchTime > M.RNG(150,350)/100)then | |
| 906 | Twitching = false | |
| 907 | end | |
| 908 | end | |
| 909 | end)() | |
| 910 | ||
| 911 | ||
| 912 | while true do | |
| 913 | swait() | |
| 914 | Sine = Sine + Change | |
| 915 | Music.Parent = Char | |
| 916 | Music.Playing = true | |
| 917 | Music.Volume = 2 | |
| 918 | local hitfloor,posfloor = workspace:FindPartOnRay(Ray.new(Root.CFrame.p,((CFrame.new(Root.Position,Root.Position - Vector3.new(0,1,0))).lookVector).unit * 4), Char) | |
| 919 | local State = ((math.abs(Root.Velocity.x) > 1 or math.abs(Root.Velocity.z) > 1) and "Walk" or "Idle") | |
| 920 | local wsVal = 28 / (Hum.WalkSpeed/16) | |
| 921 | if(State == 'Walk')then | |
| 922 | Change = 3 | |
| 923 | RH.C1 = clerp(RH.C1,CF.N(0,1,0)*CF.N(0,0-.5*M.S(Sine/wsVal),.05+.15*M.C(Sine/wsVal))*CF.A(M.R(0+60*M.C(Sine/wsVal)+-M.S(Sine/wsVal)),0,0),.2*(Hum.WalkSpeed/16)) | |
| 924 | LH.C1 = clerp(LH.C1,CF.N(0,1,0)*CF.N(0,0+.5*M.S(Sine/wsVal),.05-.15*M.C(Sine/wsVal))*CF.A(M.R(0-60*M.C(Sine/wsVal)+M.S(Sine/wsVal)),0,0),.2*(Hum.WalkSpeed/16)) | |
| 925 | else | |
| 926 | RH.C1 = clerp(RH.C1,CF.N(0,1,0),.1) | |
| 927 | LH.C1 = clerp(LH.C1,CF.N(0,1,0),.1) | |
| 928 | end | |
| 929 | if(not Twitching)then | |
| 930 | pcall(function() | |
| 931 | Char.ReaperShadowHead.Eye1.Material = Enum.Material.Neon | |
| 932 | Char.ReaperShadowHead.Eye2.Material = Enum.Material.Neon | |
| 933 | end) | |
| 934 | Hum.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None | |
| 935 | Music.Pitch = 1 | |
| 936 | local lol = {0,3}
| |
| 937 | local lol2 = {-1,1}
| |
| 938 | RS.C1 = CF.N(0,.5,0)*CF.N(M.RNG(unpack(lol))/100,M.RNG(unpack(lol))/100,M.RNG(unpack(lol))/100)*CF.A(M.RRNG(unpack(lol2)),M.RRNG(unpack(lol2)),M.RRNG(unpack(lol2))) | |
| 939 | LS.C1 = CF.N(0,.5,0)*CF.N(M.RNG(unpack(lol))/100,M.RNG(unpack(lol))/100,M.RNG(unpack(lol))/100)*CF.A(M.RRNG(unpack(lol2)),M.RRNG(unpack(lol2)),M.RRNG(unpack(lol2))) | |
| 940 | NK.C1 = CF.N(M.RNG(unpack(lol))/100,M.RNG(unpack(lol))/100,M.RNG(unpack(lol))/100)*CF.A(M.RRNG(unpack(lol2)),M.RRNG(unpack(lol2)),M.RRNG(unpack(lol2))) | |
| 941 | else | |
| 942 | pcall(function() | |
| 943 | Char.ReaperShadowHead.Eye1.Material = RandomEnum(Enum.Material) | |
| 944 | Char.ReaperShadowHead.Eye2.Material = RandomEnum(Enum.Material) | |
| 945 | end) | |
| 946 | Hum.DisplayDistanceType = RandomEnum(Enum.HumanoidDisplayDistanceType) | |
| 947 | Music.Pitch = 1.25 | |
| 948 | if(time()-ReverseTime >= 1)then | |
| 949 | Music.TimePosition = TimePos | |
| 950 | ReverseTime = time() | |
| 951 | for _,v in next, Char:children() do | |
| 952 | if(v:IsA'BasePart')then | |
| 953 | Effect{
| |
| 954 | Effect='Fade', | |
| 955 | Color = BrickColor.Random(), | |
| 956 | Material = RandomEnum(Enum.Material), | |
| 957 | Size = v.Size + V3.N(M.RNG(-75,75)/100,M.RNG(-75,75)/100,M.RNG(-75,75)/100), | |
| 958 | CFrame=v.CFrame * CF.A(M.RRNG(-15,15),M.RRNG(-15,15),M.RNG(-15,15)), | |
| 959 | Frames = M.RNG(35,120) | |
| 960 | } | |
| 961 | end | |
| 962 | end | |
| 963 | end | |
| 964 | local lol = {5,12}
| |
| 965 | local lol2 = {-16,8}
| |
| 966 | RS.C1 = CF.N(0,.5,0)*CF.N(M.RNG(unpack(lol))/100,M.RNG(unpack(lol))/100,M.RNG(unpack(lol))/100)*CF.A(M.RRNG(unpack(lol2)),M.RRNG(unpack(lol2)),M.RRNG(unpack(lol2))) | |
| 967 | LS.C1 = CF.N(0,.5,0)*CF.N(M.RNG(unpack(lol))/100,M.RNG(unpack(lol))/100,M.RNG(unpack(lol))/100)*CF.A(M.RRNG(unpack(lol2)),M.RRNG(unpack(lol2)),M.RRNG(unpack(lol2))) | |
| 968 | NK.C1 = CF.N(M.RNG(unpack(lol))/100,M.RNG(unpack(lol))/100,M.RNG(unpack(lol))/100)*CF.A(M.RRNG(unpack(lol2)),M.RRNG(unpack(lol2)),M.RRNG(unpack(lol2))) | |
| 969 | end | |
| 970 | if(NeutralAnims)then | |
| 971 | if(Twitching)then | |
| 972 | if(State == 'Walk')then | |
| 973 | local Alpha = .3 | |
| 974 | RJ.C0 = clerp(RJ.C0,CFrame.new(3.20649757e-13, 0.00629579648, 1.42956924e-06, 0.999999225, 5.09317033e-11, 0, -4.38656264e-11, 0.999980271, -0.00628618058, 0, 0.00628617639, 0.999979496)*CF.N(0,0+.1*-M.C(Sine/(wsVal/2)),0)*CF.A(0,M.R(0-7*M.S(Sine/(wsVal))),0),Alpha) | |
| 975 | LH.C0 = clerp(LH.C0,CFrame.new(-0.496493757, -0.99082166, 0.0216114372, 0.999877751, -4.38656264e-11, 0.0156119959, -9.81397825e-05, 0.999980271, 0.0062854127, -0.0156116877, -0.00628618058, 0.999858022),Alpha) | |
| 976 | RH.C0 = clerp(RH.C0,CFrame.new(0.498526245, -0.990985215, 0.0154614942, 0.999877751, -4.38656264e-11, 0.0156119959, -9.81397825e-05, 0.999980271, 0.0062854127, -0.0156116877, -0.00628618058, 0.999858022),Alpha) | |
| 977 | LS.C0 = clerp(LS.C0,CFrame.new(-1.39200604, 0.795008898, -0.00658137258, 0.819051921, 0.573506355, 0.0156119522, -0.573645532, 0.819079638, 0.0062854127, -0.00918270461, -0.0141038094, 0.999858022)*CF.A(0,0,M.RRNG(-25,45)),Alpha) | |
| 978 | RS.C0 = clerp(RS.C0,CFrame.new(1.32559943, 0.709226727, 0.00863117818, 0.819051921, -0.573506355, 0.0156119522, 0.573484719, 0.819192171, 0.0062854127, -0.0163939148, 0.00380513305, 0.999858022)*CF.A(0,0,M.RRNG(-45,25)),Alpha) | |
| 979 | NK.C0 = clerp(NK.C0,CFrame.new(4.20771539e-06, 1.49895704, -0.0143941138, 0.902309358, -0.0976699144, -0.419878155, 0.104237564, 0.994525492, -0.00733707333, 0.418296129, -0.0371467769, 0.907550335)*CF.A(M.RRNG(-5,15),M.RRNG(-5,15),M.RRNG(-5,15)),Alpha) | |
| 980 | else | |
| 981 | local Alpha = .3 | |
| 982 | RJ.C0 = clerp(RJ.C0,CFrame.new(3.20649757e-13, 0.00629579648, 1.42956924e-06, 0.999999225, 5.09317033e-11, 0, -4.38656264e-11, 0.999980271, -0.00628618058, 0, 0.00628617639, 0.999979496),Alpha) | |
| 983 | LH.C0 = clerp(LH.C0,CFrame.new(-0.496493757, -0.99082166, 0.0216114372, 0.999877751, -4.38656264e-11, 0.0156119959, -9.81397825e-05, 0.999980271, 0.0062854127, -0.0156116877, -0.00628618058, 0.999858022),Alpha) | |
| 984 | RH.C0 = clerp(RH.C0,CFrame.new(0.498526245, -0.990985215, 0.0154614942, 0.999877751, -4.38656264e-11, 0.0156119959, -9.81397825e-05, 0.999980271, 0.0062854127, -0.0156116877, -0.00628618058, 0.999858022),Alpha) | |
| 985 | LS.C0 = clerp(LS.C0,CFrame.new(-1.39200604, 0.795008898, -0.00658137258, 0.819051921, 0.573506355, 0.0156119522, -0.573645532, 0.819079638, 0.0062854127, -0.00918270461, -0.0141038094, 0.999858022)*CF.A(0,0,M.RRNG(-25,45)),Alpha) | |
| 986 | RS.C0 = clerp(RS.C0,CFrame.new(1.32559943, 0.709226727, 0.00863117818, 0.819051921, -0.573506355, 0.0156119522, 0.573484719, 0.819192171, 0.0062854127, -0.0163939148, 0.00380513305, 0.999858022)*CF.A(0,0,M.RRNG(-45,25)),Alpha) | |
| 987 | NK.C0 = clerp(NK.C0,CFrame.new(4.20771539e-06, 1.49895704, -0.0143941138, 0.902309358, -0.0976699144, -0.419878155, 0.104237564, 0.994525492, -0.00733707333, 0.418296129, -0.0371467769, 0.907550335)*CF.A(M.RRNG(-5,15),M.RRNG(-5,15),M.RRNG(-5,15)),Alpha) | |
| 988 | end | |
| 989 | else | |
| 990 | if(State == 'Idle')then | |
| 991 | local Alpha = .3 | |
| 992 | RJ.C0 = clerp(RJ.C0,CFrame.new(-0.0055502113, 0.046844326, -0.355196595, 0.999991238, -0.00595695665, -0.00113933254, 0.0059490581, 0.926876307, 0.37534529, -0.00117987115, -0.375341475, 0.926886022),Alpha) | |
| 993 | LH.C0 = clerp(LH.C0,CFrame.new(-0.497515112, -1.09223986, -0.0431248844, 0.984844744, 0.00594900129, 0.173336849, 0.0596322678, 0.926867485, -0.370622098, -0.162865102, 0.375341654, 0.91246587),Alpha) | |
| 994 | RH.C0 = clerp(RH.C0,CFrame.new(0.497499257, -1.09597111, -0.0500149131, 0.991716266, 0.00594900129, -0.128311232, -0.0536306985, 0.926867485, -0.371538013, 0.116717227, 0.375341654, 0.919508636),Alpha) | |
| 995 | LS.C0 = clerp(LS.C0,CFrame.new(-1.12519193, 0.738982558, -0.468318224, 0.769806862, -0.638114333, -0.014411577, -0.591974616, -0.705338001, -0.389954329, 0.238670424, 0.308720797, -0.920721531),Alpha) | |
| 996 | RS.C0 = clerp(RS.C0,CFrame.new(1.20966697, 0.671781361, -0.540282011, 0.762095451, 0.647304416, -0.014411577, 0.591827035, -0.70546186, -0.389954329, -0.262585998, 0.288653284, -0.920721531),Alpha) | |
| 997 | NK.C0 = clerp(NK.C0,CFrame.new(-0.00318176579, 1.58153725, -0.218282402, 0.99997586, -0.00669310382, -0.00194420572, 0.00678409031, 0.87074405, 0.49168992, -0.00159802474, -0.491691202, 0.870768249),Alpha) | |
| 998 | elseif(State == 'Walk')then | |
| 999 | local Alpha = .3 | |
| 1000 | RJ.C0 = clerp(RJ.C0,CF.N(0,0+.1*-M.C(Sine/(wsVal/2)),0)*CF.A(0,M.R(0-7*M.S(Sine/(wsVal))),0),Alpha) | |
| 1001 | LS.C0 = clerp(LS.C0,CFrame.new(-1.12519193, 0.738982558, -0.468318224, 0.769806862, -0.638114333, -0.014411577, -0.591974616, -0.705338001, -0.389954329, 0.238670424, 0.308720797, -0.920721531),Alpha) | |
| 1002 | RS.C0 = clerp(RS.C0,CFrame.new(1.20966697, 0.671781361, -0.540282011, 0.762095451, 0.647304416, -0.014411577, 0.591827035, -0.70546186, -0.389954329, -0.262585998, 0.288653284, -0.920721531),Alpha) | |
| 1003 | NK.C0 = clerp(NK.C0,CFrame.new(-0.00318176579, 1.58153725, -0.218282402, 0.99997586, -0.00669310382, -0.00194420572, 0.00678409031, 0.87074405, 0.49168992, -0.00159802474, -0.491691202, 0.870768249),Alpha) | |
| 1004 | LH.C0 = clerp(LH.C0,LHC0*CF.N(0,0+.1*M.C(Sine/(wsVal/2)),0),Alpha) | |
| 1005 | RH.C0 = clerp(RH.C0,RHC0*CF.N(0,0+.1*M.C(Sine/(wsVal/2)),0),Alpha) | |
| 1006 | end | |
| 1007 | end | |
| 1008 | end | |
| 1009 | end |