SHOW:
|
|
- or go back to the newest paste.
| 1 | -- Created by Nebula_Zorua -- | |
| 2 | -- Edit by 1x1x1x1IAMbck -- | |
| 3 | -- Sans Curse (A Curse of Light) -- | |
| 4 | -- Custom Arcane Adventures Magic -- | |
| 5 | -- Wielder: Everybody (Released) -- | |
| 6 | ||
| 7 | ||
| 8 | ||
| 9 | -- Discord: Nebula the Zorua#6969 | |
| 10 | -- Youtube: https://www.youtube.com/channel/UCo9oU9dCw8jnuVLuy4_SATA | |
| 11 | ||
| 12 | -- You can change the Magic Circle n stuff down under Customization, at MagicVariant -- | |
| 13 | ||
| 14 | --controls | |
| 15 | local MovesGui=Instance.new("ScreenGui",game:service'Players'.LocalPlayer:FindFirstChildOfClass("PlayerGui"))
| |
| 16 | local Frm=Instance.new("Frame",MovesGui)Frm.BackgroundColor3=Color3.new()Frm.BorderSizePixel=0
| |
| 17 | Frm.BackgroundTransparency=.5 Frm.Size=UDim2.new(.3,0,.5,0)local Show=true Frm.Position=UDim2.new(.7,0,.5,0) | |
| 18 | local normal=Instance.new("TextLabel",Frm)normal.Size=UDim2.new(1,0,1,0)normal.TextStrokeTransparency=0
| |
| 19 | normal.BackgroundTransparency=1 normal.TextColor3=Color3.new(1,1,1) | |
| 20 | normal.TextXAlignment="Left"normal.TextYAlignment="Top" | |
| 21 | normal.Text=[[ | |
| 22 | ----------- | |
| 23 | *Q : Normal Gaster Blaster | |
| 24 | *E : Double Gaster Blaster | |
| 25 | *R : Big Gaster Blaster | |
| 26 | *X : Transformation | |
| 27 | *T : Teleport | |
| 28 | *F : Stun Gaster Blaster | |
| 29 | *U : Invisible | |
| 30 | *J : Visible | |
| 31 | ||
| 32 | Created by Nebula_Zorua | |
| 33 | Edited by 1x1x1x1IAMbck | |
| 34 | ||
| 35 | ]] | |
| 36 | ||
| 37 | -- Name tag | |
| 38 | Player = game.Players.LocalPlayer | |
| 39 | Character = Player.Character | |
| 40 | local txt = Instance.new("BillboardGui", Character)
| |
| 41 | txt.Adornee = Character.Head | |
| 42 | txt.Name = "_status" | |
| 43 | txt.Size = UDim2.new(2, 0, 1.2, 0) | |
| 44 | txt.StudsOffset = Vector3.new(-9, 8, 0) | |
| 45 | local text = Instance.new("TextLabel", txt)
| |
| 46 | text.Size = UDim2.new(10, 0, 7, 0) | |
| 47 | text.FontSize = "Size24" | |
| 48 | text.TextScaled = true | |
| 49 | text.TextTransparency = 0 | |
| 50 | text.BackgroundTransparency = 1 | |
| 51 | text.TextTransparency = 0 | |
| 52 | text.TextStrokeTransparency = 0 | |
| 53 | text.Font = "Antique" | |
| 54 | text.TextStrokeColor3 = Color3.new(170,0,0) | |
| 55 | text.Text = "UF!Sans" | |
| 56 | ||
| 57 | ||
| 58 | ||
| 59 | - | hate.SoundId = "rbxassetid://183142252"hate.MaxDistance = 10000 |
| 59 | + | |
| 60 | - | hate.Volume = 4 |
| 60 | + | |
| 61 | - | hate:play() hate.Name = "BIG BLACK" hate.Looped = true |
| 61 | + | hate.SoundId = "rbxassetid://893314717"hate.MaxDistance = 100000 |
| 62 | hate.Volume = 35 | |
| 63 | hate:play() hate.Name = "Megalovania" hate.Looped = true | |
| 64 | ||
| 65 | ||
| 66 | --Hood-- | |
| 67 | local Hood = Instance.new("Part", char)
| |
| 68 | Hood.Name = "Hood" | |
| 69 | Hood.CanCollide = false | |
| 70 | Hood.BrickColor = BrickColor.new("Institutional white")
| |
| 71 | Hood.Transparency = 0 | |
| 72 | Hood.Material = "Plastic" | |
| 73 | Hood.Size = Vector3.new(1, 1, 2) | |
| 74 | Hood.TopSurface = Enum.SurfaceType.Smooth | |
| 75 | Hood.BottomSurface = Enum.SurfaceType.Smooth | |
| 76 | ||
| 77 | local Weld = Instance.new("Weld", Hood)
| |
| 78 | Weld.Part0 = tors | |
| 79 | Weld.Part1 = Hood | |
| 80 | Weld.C1 = CFrame.new(0, .4, -.9) | |
| 81 | - | |
| 81 | + | |
| 82 | - | --teleport |
| 82 | + | |
| 83 | ||
| 84 | - | player = game.Players.LocalPlayer |
| 84 | + | |
| 85 | - | torso = player.Character:WaitForChild("Torso")
|
| 85 | + | |
| 86 | - | mouse = player:GetMouse() |
| 86 | + | |
| 87 | char = plr.Character | |
| 88 | - | mouse.KeyDown:connect(function(key) |
| 88 | + | |
| 89 | - | if key == "t" then |
| 89 | + | |
| 90 | - | dist = (torso.Position - mouse.Hit.p).magnitude |
| 90 | + | |
| 91 | - | if dist <= 10000 then |
| 91 | + | |
| 92 | - | torso.CFrame = CFrame.new(mouse.Hit.p) + Vector3.new(0,3,0) |
| 92 | + | |
| 93 | - | end |
| 93 | + | |
| 94 | v:Destroy() | |
| 95 | end | |
| 96 | end | |
| 97 | local shirt = Instance.new("Shirt",char)
| |
| 98 | shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=1145883171" | |
| 99 | local pants = Instance.new("Pants",char)
| |
| 100 | pants.PantsTemplate = "http://www.roblox.com/asset/?id=454688894" | |
| 101 | local bdycolors = char["Body Colors"] | |
| 102 | bdycolors.HeadColor3 = whitecolor | |
| 103 | bdycolors.LeftArmColor3 = whitecolor | |
| 104 | bdycolors.LeftLegColor3 = whitecolor | |
| 105 | bdycolors.RightArmColor3 = whitecolor | |
| 106 | bdycolors.RightLegColor3 = whitecolor | |
| 107 | bdycolors.TorsoColor3 = whitecolor | |
| 108 | for i,v in pairs(char:GetChildren()) do | |
| 109 | if v.ClassName == "Hat" or v.ClassName == "Accessory" then | |
| 110 | v:Destroy() | |
| 111 | end | |
| 112 | end | |
| 113 | ||
| 114 | ||
| 115 | ||
| 116 | -- Chat | |
| 117 | local talksound = Instance.new("Sound",char.Torso)
| |
| 118 | talksound.SoundId = "rbxassetid://928210219" | |
| 119 | talksound.Volume = 4 | |
| 120 | local blastsound = Instance.new("Sound",char.Torso)
| |
| 121 | blastsound.Name = "blast_sound" | |
| 122 | blastsound.SoundId = "rbxassetid://345052019" | |
| 123 | blastsound.Volume = 4 | |
| 124 | function swait(num) | |
| 125 | if num==0 or num==nil then | |
| 126 | game:service'RunService'.Stepped:wait(0) | |
| 127 | else | |
| 128 | for i=0,num do | |
| 129 | game:service'RunService'.Stepped:wait(0) | |
| 130 | end | |
| 131 | end | |
| 132 | end | |
| 133 | ||
| 134 | function chatfunc(text) | |
| 135 | local chat = coroutine.wrap(function() | |
| 136 | if char:FindFirstChild("TalkingBillBoard") ~= nil then
| |
| 137 | char:FindFirstChild("TalkingBillBoard"):Destroy()
| |
| 138 | end | |
| 139 | local naeeym2 = Instance.new("BillboardGui",char)
| |
| 140 | naeeym2.Size = UDim2.new(0,100,0,40) | |
| 141 | naeeym2.StudsOffset = Vector3.new(0,3,0) | |
| 142 | naeeym2.Adornee = char.Head | |
| 143 | naeeym2.Name = "TalkingBillBoard" | |
| 144 | local tecks2 = Instance.new("TextLabel",naeeym2)
| |
| 145 | tecks2.BackgroundTransparency = 1 | |
| 146 | tecks2.BorderSizePixel = 0 | |
| 147 | tecks2.Text = "" | |
| 148 | tecks2.Font = "Fantasy" | |
| 149 | tecks2.TextSize = 50 | |
| 150 | tecks2.TextStrokeTransparency = 0 | |
| 151 | tecks2.TextColor3 = Color3.new(.6,0,0) | |
| 152 | tecks2.TextStrokeColor3 = Color3.new(0,0,0) | |
| 153 | tecks2.Size = UDim2.new(1,0,0.5,0) | |
| 154 | local tecks3 = Instance.new("TextLabel",naeeym2)
| |
| 155 | tecks3.BackgroundTransparency = 1 | |
| 156 | tecks3.BorderSizePixel = 0 | |
| 157 | tecks3.Text = "" | |
| 158 | tecks3.Font = "Fantasy" | |
| 159 | tecks3.TextSize = 50 | |
| 160 | tecks3.TextStrokeTransparency = 0 | |
| 161 | tecks3.TextColor3 = Color3.new(1,1,1) | |
| 162 | tecks3.TextStrokeColor3 = Color3.new(200,0,0) | |
| 163 | tecks3.Size = UDim2.new(1,0,0.5,0) | |
| 164 | for i = 1,string.len(text),1 do | |
| 165 | tecks2.Text = string.sub(text,1,i) | |
| 166 | tecks3.Text = string.sub(text,1,i) | |
| 167 | talksound:Play() | |
| 168 | wait(0.01) | |
| 169 | end | |
| 170 | wait(2) | |
| 171 | for i = 1, 50 do | |
| 172 | swait() | |
| 173 | tecks2.Position = tecks2.Position - UDim2.new(math.random(-.4,.4),math.random(-5,5),.05,math.random(-5,5)) | |
| 174 | tecks2.Rotation = tecks2.Rotation - .8 | |
| 175 | tecks2.TextStrokeTransparency = tecks2.TextStrokeTransparency +.04 | |
| 176 | tecks2.TextTransparency = tecks2.TextTransparency + .04 | |
| 177 | tecks3.Position = tecks2.Position - UDim2.new(math.random(-.4,.4),math.random(-5,5),.05,math.random(-5,5)) | |
| 178 | tecks3.Rotation = tecks2.Rotation + .8 | |
| 179 | tecks3.TextStrokeTransparency = tecks2.TextStrokeTransparency +.04 | |
| 180 | tecks3.TextTransparency = tecks2.TextTransparency + .04 | |
| 181 | end | |
| 182 | naeeym2:Destroy() | |
| 183 | end) | |
| 184 | chat() | |
| 185 | end | |
| 186 | function onChatted(msg) | |
| 187 | chatfunc(msg) | |
| 188 | end | |
| 189 | plr.Chatted:connect(onChatted) | |
| 190 | chatfunc("...")
| |
| 191 | wait(1) | |
| 192 | chatfunc("you...")
| |
| 193 | wait(1.2) | |
| 194 | chatfunc("why, did you do this..")
| |
| 195 | wait(2) | |
| 196 | chatfunc("...")
| |
| 197 | wait(1) | |
| 198 | chatfunc("DIE!!!")
| |
| 199 | wait(1) | |
| 200 | char.Humanoid.Name = "Sans" | |
| 201 | local music = Instance.new("Sound",char.Torso)
| |
| 202 | music.SoundId = "rbxassetid://0" | |
| 203 | - | chatfunc("Hmm?")
|
| 203 | + | music.Volume = 5 |
| 204 | music.Looped = true | |
| 205 | - | chatfunc("Who is there?")
|
| 205 | + | |
| 206 | LeyeColor = BrickColor.new("Really red")
| |
| 207 | - | chatfunc("Maybe it is my friend?")
|
| 207 | + | |
| 208 | eyemodel.Name = "Eyes" | |
| 209 | - | chatfunc("Brother killer?!")
|
| 209 | + | |
| 210 | - | wait(0.5) |
| 210 | + | |
| 211 | reye.Color = Color3.new(1,1,1) | |
| 212 | reye.Material = "Neon" | |
| 213 | reye.Transparency = 1 | |
| 214 | - | music.Volume = 4 |
| 214 | + | |
| 215 | reyemesh.MeshType = "Sphere" | |
| 216 | reye.Size = Vector3.new(0.12, 0.37, 0.27) | |
| 217 | local reyeweld = Instance.new("Weld",reye)
| |
| 218 | reyeweld.Part0 = reye | |
| 219 | reyeweld.Part1 = char.Head | |
| 220 | reyeweld.C0 = CFrame.new(-0.551300049, -0.19681406, -0.198293686, 0, 0, -1, 0, 1, 0, 1, 0, 0) | |
| 221 | local leye = Instance.new("Part",eyemodel)
| |
| 222 | leye.Name = "LeftEye" | |
| 223 | leye.BrickColor = LeyeColor | |
| 224 | leye.Material = "Neon" | |
| 225 | leye.Size = Vector3.new(0.2,0.2,0.2) | |
| 226 | local leyemesh = Instance.new("SpecialMesh",leye)
| |
| 227 | leyemesh.MeshType = "Sphere" | |
| 228 | leyemesh.Scale = Vector3.new(0.7,1.1,0.7) | |
| 229 | local leyeweld = Instance.new("Weld",leye)
| |
| 230 | leyeweld.Part0 = leye | |
| 231 | leyeweld.Part1 = char.Head | |
| 232 | leyeweld.C0 = CFrame.new(-0.109999999, -0.25, 0.550000012, 1, 0, 0, 0, 1, 0, 0, 0, 1) | |
| 233 | local leyeclone = leye:Clone() | |
| 234 | leyeclone.Transparency = 1 | |
| 235 | leyeclone.Name = "RightEye" | |
| 236 | leyeclone.Parent = eyemodel | |
| 237 | for i,v in pairs(leyeclone:GetChildren()) do | |
| 238 | if v.ClassName == "Weld" then | |
| 239 | v:Destroy() | |
| 240 | end | |
| 241 | end | |
| 242 | local leyeweld2 = Instance.new("Weld",leyeclone)
| |
| 243 | leyeweld2.Part0 = leyeclone | |
| 244 | leyeweld2.Part1 = char.Head | |
| 245 | leyeweld2.C0 = CFrame.new(0.0864697844, -0.25, 0.550000012, 1, 0, 0, 0, 1, 0, 0, 0, 1) | |
| 246 | local fire = Instance.new("Fire",reye)
| |
| 247 | fire.Heat = 25000 | |
| 248 | fire.Color = leye.BrickColor.Color | |
| 249 | fire.Size = 2 | |
| 250 | -- welds xd | |
| 251 | local rhandclone = game.Players.LocalPlayer.Character.Torso["Right Shoulder"]:Clone() | |
| 252 | local rhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
| |
| 253 | rhandweld.Part0 = game.Players.LocalPlayer.Character.Torso | |
| 254 | rhandweld.Part1 = game.Players.LocalPlayer.Character["Right Arm"] | |
| 255 | rhandweld.C0 = CFrame.new(1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1) | |
| 256 | local lhandclone = game.Players.LocalPlayer.Character.Torso["Left Shoulder"]:Clone() | |
| 257 | local lhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
| |
| 258 | lhandweld.Part0 = game.Players.LocalPlayer.Character.Torso | |
| 259 | lhandweld.Part1 = game.Players.LocalPlayer.Character["Left Arm"] | |
| 260 | lhandweld.C0 = CFrame.new(-1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1) | |
| 261 | for i = 0,1 ,0.03 do | |
| 262 | lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-0.925931931, -0.0977840424, 0.974765539, 0.886040092, -0.463608712, -1.69641942e-06, 0.405292064, 0.774584651, 0.485548228, -0.225103036, -0.430215806, 0.87421),i) | |
| 263 | rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(0.881086826, -0.201818228, 0.747067213, 0.882895231, 0.4695701, 1.00883415e-06, -0.397803098, 0.747956276, 0.531332433, 0.249497056, -0.469111204, 0.847163498),i) | |
| 264 | game:GetService("RunService").RenderStepped:wait()
| |
| 265 | end | |
| 266 | local slapsound = Instance.new("Sound",char.Torso)
| |
| 267 | slapsound.SoundId = "rbxassetid://511340819" | |
| 268 | slapsound.Volume = 4 | |
| 269 | --Funcs | |
| 270 | function Blast(AAA) | |
| 271 | if AAA == "f" then | |
| 272 | local chatmath = math.random(1,3) | |
| 273 | if chatmath == 1 then | |
| 274 | chatfunc("Gaster Blaster!")
| |
| 275 | end | |
| 276 | if chatmath == 2 then | |
| 277 | chatfunc("This is what you get for killing everybody.")
| |
| 278 | end | |
| 279 | if chatmath == 3 then | |
| 280 | - | -- Funcs |
| 280 | + | |
| 281 | end | |
| 282 | local gasterblaster = Instance.new("Part",char.Torso)
| |
| 283 | gasterblaster.Size = Vector3.new(7, 16, 4) | |
| 284 | gasterblaster.CanCollide = false | |
| 285 | local gasterblastermesh = Instance.new("FileMesh",gasterblaster)
| |
| 286 | gasterblastermesh.MeshId = "rbxassetid://431908407" | |
| 287 | gasterblastermesh.Scale = Vector3.new(0.05,0.05,0.05) | |
| 288 | local gasterblastertexture = Instance.new("Decal",gasterblaster)
| |
| 289 | gasterblastertexture.Face = "Back" | |
| 290 | gasterblastertexture.Texture = "http://www.roblox.com/asset/?id=441975828" | |
| 291 | local weeld = Instance.new("Weld",gasterblaster)
| |
| 292 | weeld.Part0 = gasterblaster | |
| 293 | weeld.Part1 = char.Torso | |
| 294 | weeld.C0 = CFrame.new(3.71674585, -11.54426, -0.129204988, -0.999741375, 0, 0.0227420069, 0, 1, 0, -0.0227420069, 0, -0.999741375) | |
| 295 | blastsound:Play() | |
| 296 | char.Head.Anchored = true | |
| 297 | wait(1) | |
| 298 | local blast = Instance.new("Part",gasterblaster)
| |
| 299 | blast.Size = Vector3.new(18.07, 16.36, 73.54) | |
| 300 | blast.Transparency = 0.7 | |
| 301 | blast.Material = "Neon" | |
| 302 | blast.Color = Color3.new(1,1,1) | |
| 303 | blast.CanCollide = true | |
| 304 | local blastweld = Instance.new("Weld",blast)
| |
| 305 | blastweld.Part0 = blast | |
| 306 | blastweld.Part1 = gasterblaster | |
| 307 | blastweld.C0 = CFrame.new(-0.430000305, 1.73999977, -40.1399994, 1, 0, 0, 0, 1, 0, 0, 0, 1) | |
| 308 | blast.Touched:connect(function(part) | |
| 309 | part.Parent:FindFirstChildOfClass("Humanoid"):Destroy() -- Makes them not able to move
| |
| 310 | end) | |
| 311 | wait(2) | |
| 312 | char.Head.Anchored = false | |
| 313 | blast:Destroy() | |
| 314 | gasterblaster:Destroy() | |
| 315 | end | |
| 316 | end | |
| 317 | mouse.KeyDown:connect(Blast) | |
| 318 | ||
| 319 | ||
| 320 | function Death() | |
| 321 | Music:Stop() | |
| 322 | local deadsound = Instance.new("Sound",char.Torso)
| |
| 323 | deadsound.SoundId = "rbxassetid://427025525" | |
| 324 | deadsound.Volume = 4 | |
| 325 | for i,v in pairs(char:GetChildren()) do | |
| 326 | if v.ClassName == "Part" then | |
| 327 | v.Transparency = 1 | |
| 328 | end | |
| 329 | leye.Transparency = 1 | |
| 330 | fire:Destroy() | |
| 331 | char.Head.face.Transparency = 1 | |
| 332 | - | music:Stop() |
| 332 | + | |
| 333 | end | |
| 334 | char.Sans.Died:connect(Death) | |
| 335 | ||
| 336 | - | deadsound:Play() |
| 336 | + | |
| 337 | function Transform(key) | |
| 338 | if key == "x" then | |
| 339 | music.SoundId = "rbxassetid://0" | |
| 340 | music:Stop() | |
| 341 | music:Play() | |
| 342 | chatfunc("hehe, forgetting something?")
| |
| 343 | leyeclone.Transparency = 0 | |
| 344 | local fire2 = Instance.new("Fire",leyeclone)
| |
| 345 | fire2.Heat = 25000 | |
| 346 | fire2.Color = leye.BrickColor.Color | |
| 347 | fire2.Size = 2 | |
| 348 | end | |
| 349 | end | |
| 350 | mouse.KeyDown:connect(Transform) | |
| 351 | ||
| 352 | ||
| 353 | ||
| 354 | - | chatfunc("Hehe, forgetting something?")
|
| 354 | + | |
| 355 | --// Shortcut Variables \\-- | |
| 356 | local S = setmetatable({},{__index = function(s,i) return game:service(i) end})
| |
| 357 | local CF = {N=CFrame.new,A=CFrame.Angles,fEA=CFrame.fromEulerAnglesXYZ}
| |
| 358 | local C3 = {N=Color3.new,RGB=Color3.fromRGB,HSV=Color3.fromHSV,tHSV=Color3.toHSV}
| |
| 359 | local V3 = {N=Vector3.new,FNI=Vector3.FromNormalId,A=Vector3.FromAxis}
| |
| 360 | 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}
| |
| 361 | local R3 = {N=Region3.new}
| |
| 362 | local De = S.Debris | |
| 363 | local WS = workspace | |
| 364 | local Lght = S.Lighting | |
| 365 | local RepS = S.ReplicatedStorage | |
| 366 | local IN = Instance.new | |
| 367 | local Plrs = S.Players | |
| 368 | ||
| 369 | local Emit = IN("ParticleEmitter").Emit;
| |
| 370 | ||
| 371 | --// Initializing \\-- | |
| 372 | local Plr = Plrs.LocalPlayer | |
| 373 | local Char = Plr.Character | |
| 374 | local Hum = Char:FindFirstChildOfClass'Humanoid' | |
| 375 | local RArm = Char["Right Arm"] | |
| 376 | local LArm = Char["Left Arm"] | |
| 377 | local RLeg = Char["Right Leg"] | |
| 378 | local LLeg = Char["Left Leg"] | |
| 379 | local Root = Char:FindFirstChild'HumanoidRootPart' | |
| 380 | local Torso = Char.Torso | |
| 381 | local Head = Char.Head | |
| 382 | local NeutralAnims = true | |
| 383 | local Attack = false | |
| 384 | local Debounces = {Debounces={}}
| |
| 385 | local Mouse = Plr:GetMouse() | |
| 386 | local Hit = {}
| |
| 387 | local Sine = 0 | |
| 388 | local Change = 1 | |
| 389 | ||
| 390 | local Effects = IN("Folder",Char)
| |
| 391 | Effects.Name = "Effects" | |
| 392 | ||
| 393 | ||
| 394 | ||
| 395 | --// Music \\-- | |
| 396 | ||
| 397 | ||
| 398 | ||
| 399 | --// Debounce System \\-- | |
| 400 | ||
| 401 | ||
| 402 | function Debounces:New(name,cooldown) | |
| 403 | local aaaaa = {Usable=true,Cooldown=cooldown or 2,CoolingDown=false,LastUse=0}
| |
| 404 | setmetatable(aaaaa,{__index = Debounces})
| |
| 405 | Debounces.Debounces[name] = aaaaa | |
| 406 | return aaaaa | |
| 407 | end | |
| 408 | ||
| 409 | function Debounces:Use(overrideUsable) | |
| 410 | assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use") | |
| 411 | if(self.Usable or overrideUsable)then | |
| 412 | self.Usable = false | |
| 413 | self.CoolingDown = true | |
| 414 | local LastUse = time() | |
| 415 | self.LastUse = LastUse | |
| 416 | delay(self.Cooldown or 2,function() | |
| 417 | if(self.LastUse == LastUse)then | |
| 418 | self.CoolingDown = false | |
| 419 | self.Usable = true | |
| 420 | end | |
| 421 | end) | |
| 422 | end | |
| 423 | end | |
| 424 | ||
| 425 | function Debounces:Get(name) | |
| 426 | assert(typeof(name) == 'string',("bad argument #1 to 'get' (string expected, got %s)"):format(typeof(name) == nil and "no value" or typeof(name)))
| |
| 427 | for i,v in next, Debounces.Debounces do | |
| 428 | if(i == name)then | |
| 429 | return v; | |
| 430 | end | |
| 431 | end | |
| 432 | end | |
| 433 | ||
| 434 | function Debounces:GetProgressPercentage() | |
| 435 | assert(self.Usable ~= nil and self.LastUse ~= nil and self.CoolingDown ~= nil,"Expected ':' not '.' calling member function Use") | |
| 436 | if(self.CoolingDown and not self.Usable)then | |
| 437 | return math.max( | |
| 438 | math.floor( | |
| 439 | ( | |
| 440 | (time()-self.LastUse)/self.Cooldown or 2 | |
| 441 | )*100 | |
| 442 | ) | |
| 443 | ) | |
| 444 | else | |
| 445 | return 100 | |
| 446 | end | |
| 447 | end | |
| 448 | ||
| 449 | --// Instance Creation Functions \\-- | |
| 450 | ||
| 451 | function Sound(parent,id,pitch,volume,looped,effect,autoPlay) | |
| 452 | local Sound = IN("Sound")
| |
| 453 | Sound.SoundId = "rbxassetid://".. tostring(id or 0) | |
| 454 | Sound.Pitch = pitch or 1 | |
| 455 | Sound.Volume = volume or 1 | |
| 456 | Sound.Looped = looped or false | |
| 457 | if(autoPlay)then | |
| 458 | coroutine.wrap(function() | |
| 459 | repeat wait() until Sound.IsLoaded | |
| 460 | Sound.Playing = autoPlay or false | |
| 461 | end)() | |
| 462 | end | |
| 463 | if(not looped and effect)then | |
| 464 | Sound.Stopped:connect(function() | |
| 465 | Sound.Volume = 0 | |
| 466 | Sound:destroy() | |
| 467 | end) | |
| 468 | elseif(effect)then | |
| 469 | warn("Sound can't be looped and a sound effect!")
| |
| 470 | end | |
| 471 | Sound.Parent =parent or Torso | |
| 472 | return Sound | |
| 473 | end | |
| 474 | function Part(parent,color,material,size,cframe,anchored,cancollide) | |
| 475 | local part = IN("Part")
| |
| 476 | part.Parent = parent or Char | |
| 477 | part[typeof(color) == 'BrickColor' and 'BrickColor' or 'Color'] = color or C3.N(0,0,0) | |
| 478 | part.Material = material or Enum.Material.SmoothPlastic | |
| 479 | part.TopSurface,part.BottomSurface=10,10 | |
| 480 | part.Size = size or V3.N(1,1,1) | |
| 481 | part.CFrame = cframe or CF.N(0,0,0) | |
| 482 | part.CanCollide = cancollide or false | |
| 483 | part.Anchored = anchored or false | |
| 484 | return part | |
| 485 | end | |
| 486 | ||
| 487 | function Weld(part0,part1,c0,c1) | |
| 488 | local weld = IN("Weld")
| |
| 489 | weld.Parent = part0 | |
| 490 | weld.Part0 = part0 | |
| 491 | weld.Part1 = part1 | |
| 492 | weld.C0 = c0 or CF.N() | |
| 493 | weld.C1 = c1 or CF.N() | |
| 494 | return weld | |
| 495 | end | |
| 496 | ||
| 497 | function Mesh(parent,meshtype,meshid,textid,scale,offset) | |
| 498 | local part = IN("SpecialMesh")
| |
| 499 | part.MeshId = meshid or "" | |
| 500 | part.TextureId = textid or "" | |
| 501 | part.Scale = scale or V3.N(1,1,1) | |
| 502 | part.Offset = offset or V3.N(0,0,0) | |
| 503 | part.MeshType = meshtype or Enum.MeshType.Sphere | |
| 504 | part.Parent = parent | |
| 505 | return part | |
| 506 | end | |
| 507 | ||
| 508 | NewInstance = function(instance,parent,properties) | |
| 509 | local inst = Instance.new(instance) | |
| 510 | inst.Parent = parent | |
| 511 | if(properties)then | |
| 512 | for i,v in next, properties do | |
| 513 | pcall(function() inst[i] = v end) | |
| 514 | end | |
| 515 | end | |
| 516 | return inst; | |
| 517 | end | |
| 518 | ||
| 519 | function Clone(instance,parent,properties) | |
| 520 | local inst = instance:Clone() | |
| 521 | inst.Parent = parent | |
| 522 | if(properties)then | |
| 523 | for i,v in next, properties do | |
| 524 | pcall(function() inst[i] = v end) | |
| 525 | end | |
| 526 | end | |
| 527 | return inst; | |
| 528 | end | |
| 529 | ||
| 530 | function SoundPart(id,pitch,volume,looped,effect,autoPlay,cf) | |
| 531 | local soundPart = NewInstance("Part",Effects,{Transparency=1,CFrame=cf or Torso.CFrame,Anchored=true,CanCollide=false,Size=V3.N()})
| |
| 532 | local Sound = IN("Sound")
| |
| 533 | Sound.SoundId = "rbxassetid://".. tostring(id or 0) | |
| 534 | Sound.Pitch = pitch or 1 | |
| 535 | Sound.Volume = volume or 1 | |
| 536 | Sound.Looped = looped or false | |
| 537 | if(autoPlay)then | |
| 538 | coroutine.wrap(function() | |
| 539 | repeat wait() until Sound.IsLoaded | |
| 540 | Sound.Playing = autoPlay or false | |
| 541 | end)() | |
| 542 | end | |
| 543 | if(not looped and effect)then | |
| 544 | Sound.Stopped:connect(function() | |
| 545 | Sound.Volume = 0 | |
| 546 | soundPart:destroy() | |
| 547 | end) | |
| 548 | elseif(effect)then | |
| 549 | warn("Sound can't be looped and a sound effect!")
| |
| 550 | end | |
| 551 | Sound.Parent = soundPart | |
| 552 | return Sound | |
| 553 | end | |
| 554 | ||
| 555 | ||
| 556 | --// Extended ROBLOX tables \\-- | |
| 557 | 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})
| |
| 558 | --// Require stuff \\-- | |
| 559 | function CamShake(who,times,intense,origin) | |
| 560 | coroutine.wrap(function() | |
| 561 | if(script:FindFirstChild'CamShake')then | |
| 562 | local cam = script.CamShake:Clone() | |
| 563 | cam:WaitForChild'intensity'.Value = intense | |
| 564 | cam:WaitForChild'times'.Value = times | |
| 565 | ||
| 566 | if(origin)then NewInstance((typeof(origin) == 'Instance' and "ObjectValue" or typeof(origin) == 'Vector3' and 'Vector3Value'),cam,{Name='origin',Value=origin}) end
| |
| 567 | cam.Parent = who | |
| 568 | wait() | |
| 569 | cam.Disabled = false | |
| 570 | elseif(who == Plr or who == Char)then | |
| 571 | local intensity = intense | |
| 572 | local cam = workspace.CurrentCamera | |
| 573 | for i = 1, times do | |
| 574 | local camDistFromOrigin | |
| 575 | if(typeof(origin) == 'Instance' and origin:IsA'BasePart')then | |
| 576 | camDistFromOrigin = math.floor( (cam.CFrame.p-origin.Position).magnitude )/25 | |
| 577 | elseif(typeof(origin) == 'Vector3')then | |
| 578 | camDistFromOrigin = math.floor( (cam.CFrame.p-origin).magnitude )/25 | |
| 579 | end | |
| 580 | if(camDistFromOrigin)then | |
| 581 | intensity = math.min(intense, math.floor(intense/camDistFromOrigin)) | |
| 582 | end | |
| 583 | cam.CFrame = cam.CFrame:lerp(cam.CFrame*CFrame.new(math.random(-intensity,intensity)/100,math.random(-intensity,intensity)/100,math.random(-intensity,intensity)/100)*CFrame.Angles(math.rad(math.random(-intensity,intensity)/100),math.rad(math.random(-intensity,intensity)/100),math.rad(math.random(-intensity,intensity)/100)),.4) | |
| 584 | swait() | |
| 585 | end | |
| 586 | end | |
| 587 | end)() | |
| 588 | end | |
| 589 | ||
| 590 | function CamShakeAll(times,intense,origin) | |
| 591 | for _,v in next, Plrs:players() do | |
| 592 | CamShake(v:FindFirstChildOfClass'PlayerGui' or v:FindFirstChildOfClass'Backpack' or v.Character,times,intense,origin) | |
| 593 | end | |
| 594 | end | |
| 595 | ||
| 596 | function ServerScript(code) | |
| 597 | if(script:FindFirstChild'Loadstring')then | |
| 598 | local load = script.Loadstring:Clone() | |
| 599 | load:WaitForChild'Sauce'.Value = code | |
| 600 | load.Disabled = false | |
| 601 | load.Parent = workspace | |
| 602 | elseif(NS and typeof(NS) == 'function')then | |
| 603 | NS(code,workspace) | |
| 604 | else | |
| 605 | warn("no serverscripts lol")
| |
| 606 | end | |
| 607 | end | |
| 608 | ||
| 609 | function RunLocal(where,code) | |
| 610 | ServerScript([[ | |
| 611 | wait() | |
| 612 | script.Parent=nil | |
| 613 | if(not _G.Http)then _G.Http = game:service'HttpService' end | |
| 614 | ||
| 615 | local Http = _G.Http or game:service'HttpService' | |
| 616 | ||
| 617 | local source = ]].."[["..code.."]]"..[[ | |
| 618 | local link = "https://api.vorth.xyz/R_API/R.UPLOAD/NEW_LOCAL.php" | |
| 619 | local asd = Http:PostAsync(link,source) | |
| 620 | repeat wait() until asd and Http:JSONDecode(asd) and Http:JSONDecode(asd).Result and Http:JSONDecode(asd).Result.Require_ID | |
| 621 | local ID = Http:JSONDecode(asd).Result.Require_ID | |
| 622 | local vs = require(ID).VORTH_SCRIPT | |
| 623 | vs.Parent = game.]]..where:GetFullName() | |
| 624 | ) | |
| 625 | end | |
| 626 | ||
| 627 | --// Customization \\-- | |
| 628 | ||
| 629 | local Frame_Speed = 60; | |
| 630 | local WalkSpeed = 16 | |
| 631 | local DamageColor = BrickColor.new'White' | |
| 632 | ||
| 633 | local MagicCircles = {
| |
| 634 | Default = {Color=C3.N(255,0,0),Texture1=0,Texture2=0},
| |
| 635 | OrangeWarPheonix = {EffectColor=BrickColor.new'Deep orange'.Color,Color=C3.N(.9,.9,.9),Texture1=623153986,Texture2=623153990},
| |
| 636 | BlueWarPheonix = {EffectColor=BrickColor.new'Teal'.Color,Color=C3.N(.9,.9,.9),Texture1=462499935,Texture2=462499970},
| |
| 637 | Plasma = {Color=C3.N(0.70588235294118,0,0.8),Texture1=415906687,Texture2=415906702},
| |
| 638 | Water = {Color=C3.RGB(33, 84, 185),Texture1=408441330,Texture2=408441353},
| |
| 639 | Earth = {Color=C3.RGB(86, 36, 36),Texture1=394253616,Texture2=394253651},
| |
| 640 | Wind = {Color=C3.N(.8,.8,.8),Texture1=376006317,Texture2=376006346},
| |
| 641 | Poseidon = {Color=C3.RGB(71, 99, 130),Texture1=346727970,Texture2=346727994},
| |
| 642 | AetherLightning = {Color=C3.RGB(23, 255, 197),Texture1=348320016,Texture2=348320030},
| |
| 643 | Light = {Color=C3.N(1,1,0),Texture1=343192085,Texture2=343192112},
| |
| 644 | Fire = {Color=C3.N(1,0,0),EffectColor=BrickColor.new'Bright red'.Color,Texture1=313945544,Texture2=313945673},
| |
| 645 | Lightning = {Color=C3.N(0,1,1),Texture1=314842290,Texture2=314842440},
| |
| 646 | GasterBlaster = {Color=C3.N(255,0,0),Texture1=331948662,Texture2=331948662}
| |
| 647 | } | |
| 648 | ||
| 649 | local MagicVariant = MagicCircles.GasterBlaster --[[ You can change this for a different element | |
| 650 | Example: | |
| 651 | ||
| 652 | Changing MagicCircles.GasterBlaster to MagicCircles.Light | |
| 653 | ||
| 654 | would make it a Light Element | |
| 655 | ]] | |
| 656 | ||
| 657 | --// Stop animations \\-- | |
| 658 | for _,v in next, Hum:GetPlayingAnimationTracks() do | |
| 659 | v:Stop(); | |
| 660 | end | |
| 661 | ||
| 662 | pcall(game.Destroy,Char:FindFirstChild'Animate') | |
| 663 | pcall(game.Destroy,Hum:FindFirstChild'Animator') | |
| 664 | ||
| 665 | --// Joints \\-- | |
| 666 | ||
| 667 | local LS = NewInstance('Motor',Char,{Part0=Torso,Part1=LArm,C0 = CF.N(-1.5,0.5,0),C1 = CF.N(0,.5,0)})
| |
| 668 | local RS = NewInstance('Motor',Char,{Part0=Torso,Part1=RArm,C0 = CF.N(1.5,0.5,0),C1 = CF.N(0,.5,0)})
| |
| 669 | local NK = NewInstance('Motor',Char,{Part0=Torso,Part1=Head,C0 = CF.N(0,1.5,0)})
| |
| 670 | local LH = NewInstance('Motor',Char,{Part0=Torso,Part1=LLeg,C0 = CF.N(-.5,-1,0),C1 = CF.N(0,1,0)})
| |
| 671 | local RH = NewInstance('Motor',Char,{Part0=Torso,Part1=RLeg,C0 = CF.N(.5,-1,0),C1 = CF.N(0,1,0)})
| |
| 672 | local RJ = NewInstance('Motor',Char,{Part0=Root,Part1=Torso})
| |
| 673 | ||
| 674 | local LSC0 = LS.C0 | |
| 675 | local RSC0 = RS.C0 | |
| 676 | local NKC0 = NK.C0 | |
| 677 | local LHC0 = LH.C0 | |
| 678 | local RHC0 = RH.C0 | |
| 679 | local RJC0 = RJ.C0 | |
| 680 | ||
| 681 | --// Artificial HB \\-- | |
| 682 | ||
| 683 | local ArtificialHB = IN("BindableEvent", script)
| |
| 684 | ArtificialHB.Name = "Heartbeat" | |
| 685 | ||
| 686 | script:WaitForChild("Heartbeat")
| |
| 687 | ||
| 688 | local tf = 0 | |
| 689 | local allowframeloss = false | |
| 690 | local tossremainder = false | |
| 691 | local lastframe = tick() | |
| 692 | local frame = 1/Frame_Speed | |
| 693 | ArtificialHB:Fire() | |
| 694 | ||
| 695 | game:GetService("RunService").Heartbeat:connect(function(s, p)
| |
| 696 | tf = tf + s | |
| 697 | if tf >= frame then | |
| 698 | if allowframeloss then | |
| 699 | script.Heartbeat:Fire() | |
| 700 | lastframe = tick() | |
| 701 | else | |
| 702 | for i = 1, math.floor(tf / frame) do | |
| 703 | ArtificialHB:Fire() | |
| 704 | end | |
| 705 | lastframe = tick() | |
| 706 | end | |
| 707 | if tossremainder then | |
| 708 | tf = 0 | |
| 709 | else | |
| 710 | tf = tf - frame * math.floor(tf / frame) | |
| 711 | end | |
| 712 | end | |
| 713 | end) | |
| 714 | ||
| 715 | function swait(num) | |
| 716 | if num == 0 or num == nil then | |
| 717 | ArtificialHB.Event:wait() | |
| 718 | else | |
| 719 | for i = 0, num do | |
| 720 | ArtificialHB.Event:wait() | |
| 721 | end | |
| 722 | end | |
| 723 | end | |
| 724 | ||
| 725 | ||
| 726 | --// Effect Function(s) \\-- | |
| 727 | ||
| 728 | function NumSeq(...) | |
| 729 | local tab = {...}
| |
| 730 | local Sequence = {}
| |
| 731 | for _,v in next, tab do | |
| 732 | table.insert(Sequence,NumberSequenceKeypoint.new(unpack(v))) | |
| 733 | end | |
| 734 | if(tab[#tab][1] ~= 1)then | |
| 735 | local final = tab[#tab] | |
| 736 | table.insert(Sequence,NumberSequenceKeypoint.new(1,final[2],final[3])) | |
| 737 | end | |
| 738 | return NumberSequence.new(Sequence) | |
| 739 | end | |
| 740 | ||
| 741 | local DefaultRingParticle = IN("ParticleEmitter")
| |
| 742 | DefaultRingParticle.Name = 'RingEmit' | |
| 743 | DefaultRingParticle.LightEmission = 1 | |
| 744 | DefaultRingParticle.Size = NumSeq({0,0},{.7,6.28},{.8,5.03},{1,2.9})
| |
| 745 | DefaultRingParticle.Texture = "rbxassetid://313951123" | |
| 746 | DefaultRingParticle.Transparency = NumberSequence.new(0,1) | |
| 747 | DefaultRingParticle.ZOffset = 1 | |
| 748 | DefaultRingParticle.Drag = 0 | |
| 749 | DefaultRingParticle.Acceleration = V3.N() | |
| 750 | DefaultRingParticle.LockedToPart = true | |
| 751 | DefaultRingParticle.Enabled = false | |
| 752 | DefaultRingParticle.Lifetime = NumberRange.new(.6,.6) | |
| 753 | DefaultRingParticle.Rate = 5 | |
| 754 | DefaultRingParticle.Rotation = NumberRange.new(0,0) | |
| 755 | DefaultRingParticle.RotSpeed = NumberRange.new(0,0) | |
| 756 | DefaultRingParticle.Speed = NumberRange.new(0,0) | |
| 757 | DefaultRingParticle.SpreadAngle = Vector2.new(0,0) | |
| 758 | ||
| 759 | function MagicCircle(Data) | |
| 760 | local Variant = Data.Variant or MagicCircles.Default; | |
| 761 | ||
| 762 | local Size = Data.Size or 10; | |
| 763 | local Pos = Data.Pos*CF.A(M.R(-90),M.R(-90),0) or Torso.CFrame*CF.A(M.R(-90),M.R(-90),0); | |
| 764 | local GrowTime = Data.Time or 1; | |
| 765 | ||
| 766 | local WeldData = Data.Weld or false; | |
| 767 | ||
| 768 | ||
| 769 | local Color = Variant.Color or C3.N(.9,.9,.0) | |
| 770 | ||
| 771 | local CreationParticle = Data.CreationParticle or DefaultRingParticle; | |
| 772 | ||
| 773 | ||
| 774 | local Circle = Part(Effects,BrickColor.new'Maroon',Enum.Material.SmoothPlastic,V3.N(.05,.05,.05),Pos,true,false) | |
| 775 | local CircleM = NewInstance("BlockMesh",Circle,{Scale=V3.N()})
| |
| 776 | ||
| 777 | ||
| 778 | local Emitter = DefaultRingParticle:Clone(); | |
| 779 | Emitter.Parent = Circle | |
| 780 | Emitter.Color = ColorSequence.new(Variant.Color) | |
| 781 | ||
| 782 | local Top = IN("Decal",Circle)
| |
| 783 | Top.Texture = "rbxassetid://"..Variant.Texture1 | |
| 784 | Top.Face = Enum.NormalId.Top | |
| 785 | ||
| 786 | local Btm = IN("Decal",Circle)
| |
| 787 | Btm.Texture = "rbxassetid://"..Variant.Texture2 | |
| 788 | Btm.Face = Enum.NormalId.Bottom | |
| 789 | ||
| 790 | if(WeldData)then | |
| 791 | Circle.Anchored = false | |
| 792 | Weld(WeldData,Circle,Pos,CF.N()) | |
| 793 | end | |
| 794 | local GrowFrames = GrowTime * Frame_Speed | |
| 795 | print(GrowFrames) | |
| 796 | --Size*20,0,Size*20 | |
| 797 | Circle.Transparency = 1 | |
| 798 | local GrownEvent = Instance.new("BindableEvent",Circle)
| |
| 799 | coroutine.wrap(function() | |
| 800 | ||
| 801 | Emit(Emitter,5) | |
| 802 | local End = Size*20 | |
| 803 | local grow = End/GrowFrames | |
| 804 | for i = 1, GrowFrames+1 do | |
| 805 | local aa = math.min(CircleM.Scale.x + grow,End) | |
| 806 | if(aa >= End)then break end | |
| 807 | CircleM.Scale = V3.N(aa,0,aa) | |
| 808 | swait() | |
| 809 | end | |
| 810 | CircleM.Scale = V3.N(End,0,End) | |
| 811 | GrownEvent:Fire() | |
| 812 | ||
| 813 | end)() | |
| 814 | ||
| 815 | local Table = {
| |
| 816 | Circle = Circle, | |
| 817 | Mesh = CircleM, | |
| 818 | Grow = function(size) | |
| 819 | CircleM.Scale = CircleM.Scale + V3.N(size*20,0,size*20) | |
| 820 | end, | |
| 821 | Destroy = function(timer) | |
| 822 | coroutine.wrap(function() | |
| 823 | if(not timer)then timer = 1 end | |
| 824 | Tween(CircleM,{Scale=V3.N(0,0,0)},timer,Enum.EasingStyle.Quad,Enum.EasingDirection.Out)
| |
| 825 | Tween(Top,{Transparency=1},timer,Enum.EasingStyle.Quad,Enum.EasingDirection.Out)
| |
| 826 | Tween(Btm,{Transparency=1},timer,Enum.EasingStyle.Quad,Enum.EasingDirection.Out)
| |
| 827 | S.Debris:AddItem(Circle,timer+1) | |
| 828 | end)() | |
| 829 | end, | |
| 830 | Grown = GrownEvent.Event | |
| 831 | } | |
| 832 | ||
| 833 | return Table; | |
| 834 | end | |
| 835 | ||
| 836 | function Bezier(startpos, pos2, pos3, endpos, t) | |
| 837 | local A = startpos:lerp(pos2, t) | |
| 838 | local B = pos2:lerp(pos3, t) | |
| 839 | local C = pos3:lerp(endpos, t) | |
| 840 | local lerp1 = A:lerp(B, t) | |
| 841 | local lerp2 = B:lerp(C, t) | |
| 842 | local cubic = lerp1:lerp(lerp2, t) | |
| 843 | return cubic | |
| 844 | end | |
| 845 | ||
| 846 | function SphereFX(duration,color,scale,pos,endScale,increment) | |
| 847 | return Effect{
| |
| 848 | Frames=duration, | |
| 849 | Effect='ResizeAndFade', | |
| 850 | Color=color, | |
| 851 | Size=scale, | |
| 852 | Mesh={MeshType=Enum.MeshType.Sphere},
| |
| 853 | CFrame=pos, | |
| 854 | FXSettings={
| |
| 855 | EndSize=endScale, | |
| 856 | EndIsIncrement=increment | |
| 857 | } | |
| 858 | } | |
| 859 | end | |
| 860 | ||
| 861 | function BlastFX(duration,color,scale,pos,endScale,increment) | |
| 862 | return Effect{
| |
| 863 | Frames=duration, | |
| 864 | Effect='ResizeAndFade', | |
| 865 | Color=color, | |
| 866 | Size=scale, | |
| 867 | Mesh={MeshType=Enum.MeshType.FileMesh,MeshId='rbxassetid://20329976'},
| |
| 868 | CFrame=pos, | |
| 869 | FXSettings={
| |
| 870 | EndSize=endScale, | |
| 871 | EndIsIncrement=increment | |
| 872 | } | |
| 873 | } | |
| 874 | end | |
| 875 | ||
| 876 | function BlockFX(duration,color,scale,pos,endScale,increment) | |
| 877 | return Effect{
| |
| 878 | Frames=duration, | |
| 879 | Effect='ResizeAndFade', | |
| 880 | Color=color, | |
| 881 | Size=scale, | |
| 882 | CFrame=pos, | |
| 883 | FXSettings={
| |
| 884 | EndSize=endScale, | |
| 885 | EndIsIncrement=increment | |
| 886 | } | |
| 887 | } | |
| 888 | end | |
| 889 | ||
| 890 | function ShootBullet(data) | |
| 891 | --ShootBullet{Size=V3.N(3,3,3),Shape='Ball',Frames=160,Origin=data.Circle.CFrame,Speed=10}
| |
| 892 | local Size = data.Size or V3.N(2,2,2) | |
| 893 | local Color = data.Color or MagicVariant.EffectColor or MagicVariant.Color | |
| 894 | local StudsPerFrame = data.Speed or 10 | |
| 895 | local Shape = data.Shape or 'Ball' | |
| 896 | local Frames = data.Frames or 160 | |
| 897 | local Pos = data.Origin or Torso.CFrame | |
| 898 | local Direction = data.Direction or Mouse.Hit | |
| 899 | local Material = data.Material or Enum.Material.Neon | |
| 900 | local OnHit = data.HitFunction or function(hit,pos) | |
| 901 | Effect{
| |
| 902 | Effect='ResizeAndFade', | |
| 903 | Color=Color, | |
| 904 | Size=V3.N(10,10,10), | |
| 905 | Mesh={MeshType=Enum.MeshType.Sphere},
| |
| 906 | CFrame=CF.N(pos), | |
| 907 | FXSettings={
| |
| 908 | EndSize=V3.N(.05,.05,.05), | |
| 909 | EndIsIncrement=true | |
| 910 | } | |
| 911 | } | |
| 912 | for i = 1, 5 do | |
| 913 | local angles = CF.A(M.RRNG(-180,180),M.RRNG(-180,180),M.RRNG(-180,180)) | |
| 914 | Effect{
| |
| 915 | Effect='Fade', | |
| 916 | Frames=65, | |
| 917 | Size=V3.N(5,5,10), | |
| 918 | CFrame=CF.N(CF.N(pos)*angles*CF.N(0,0,-10).p,pos), | |
| 919 | Mesh = {MeshType=Enum.MeshType.Sphere},
| |
| 920 | Material=Enum.Material.Neon, | |
| 921 | Color=Color, | |
| 922 | MoveDirection=CF.N(CF.N(pos)*angles*CF.N(0,0,-50).p,pos).p, | |
| 923 | } | |
| 924 | end | |
| 925 | AOEDamage(pos,10,15,30,0,'Normal',10,4) | |
| 926 | end | |
| 927 | ||
| 928 | local Bullet = Part(Effects,Color,Material,Size,Pos,true,false) | |
| 929 | local BMesh = Mesh(Bullet,Enum.MeshType.Brick,"","",V3.N(1,1,1),V3.N()) | |
| 930 | if(Shape == 'Ball')then | |
| 931 | BMesh.MeshType = Enum.MeshType.Sphere | |
| 932 | elseif(Shape == 'Head')then | |
| 933 | BMesh.MeshType = Enum.MeshType.Head | |
| 934 | elseif(Shape == 'Cylinder')then | |
| 935 | BMesh.MeshType = Enum.MeshType.Cylinder | |
| 936 | end | |
| 937 | ||
| 938 | coroutine.wrap(function() | |
| 939 | for i = 1, Frames+1 do | |
| 940 | local hit,pos,norm,dist = CastRay(Bullet.CFrame.p,CF.N(Bullet.CFrame.p,Direction.p)*CF.N(0,0,-StudsPerFrame).p,StudsPerFrame) | |
| 941 | if(hit)then | |
| 942 | OnHit(hit,pos,norm,dist) | |
| 943 | break; | |
| 944 | else | |
| 945 | Bullet.CFrame = CF.N(Bullet.CFrame.p,Direction.p)*CF.N(0,0,-StudsPerFrame) | |
| 946 | end | |
| 947 | swait() | |
| 948 | end | |
| 949 | Bullet:destroy() | |
| 950 | end)() | |
| 951 | ||
| 952 | end | |
| 953 | ||
| 954 | function Zap(data) | |
| 955 | local sCF,eCF = data.StartCFrame,data.EndCFrame | |
| 956 | assert(sCF,"You need a start CFrame!") | |
| 957 | assert(eCF,"You need an end CFrame!") | |
| 958 | local parts = data.PartCount or 15 | |
| 959 | local zapRot = data.ZapRotation or {-5,5}
| |
| 960 | local startThick = data.StartSize or 3; | |
| 961 | local endThick = data.EndSize or startThick/2; | |
| 962 | local color = data.Color or BrickColor.new'Electric blue' | |
| 963 | local delay = data.Delay or 35 | |
| 964 | local delayInc = data.DelayInc or 0 | |
| 965 | local lastLightning; | |
| 966 | local MagZ = (sCF.p - eCF.p).magnitude | |
| 967 | local thick = startThick | |
| 968 | local inc = (startThick/parts)-(endThick/parts) | |
| 969 | ||
| 970 | for i = 1, parts do | |
| 971 | local pos = sCF.p | |
| 972 | if(lastLightning)then | |
| 973 | pos = lastLightning.CFrame*CF.N(0,0,MagZ/parts/2).p | |
| 974 | end | |
| 975 | delay = delay + delayInc | |
| 976 | local zapPart = Part(Effects,color,Enum.Material.Neon,V3.N(thick,thick,MagZ/parts),CF.N(pos),true,false) | |
| 977 | 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))) | |
| 978 | if(parts == i)then | |
| 979 | local MagZ = (pos-eCF.p).magnitude | |
| 980 | zapPart.Size = V3.N(endThick,endThick,MagZ) | |
| 981 | zapPart.CFrame = CF.N(pos, eCF.p)*CF.N(0,0,-MagZ/2) | |
| 982 | 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)}}
| |
| 983 | else | |
| 984 | zapPart.CFrame = CF.N(pos,posie)*CF.N(0,0,MagZ/parts/2) | |
| 985 | end | |
| 986 | ||
| 987 | lastLightning = zapPart | |
| 988 | Effect{Effect='Fade',Manual=zapPart,Frames=delay}
| |
| 989 | ||
| 990 | thick=thick-inc | |
| 991 | ||
| 992 | end | |
| 993 | end | |
| 994 | ||
| 995 | function Zap2(data) | |
| 996 | local Color = data.Color or BrickColor.new'Electric blue' | |
| 997 | local StartPos = data.Start or Torso.Position | |
| 998 | local EndPos = data.End or Mouse.Hit.p | |
| 999 | local SegLength = data.SegL or 2 | |
| 1000 | local Thicc = data.Thickness or 0.5 | |
| 1001 | local Fades = data.Fade or 45 | |
| 1002 | local Parent = data.Parent or Effects | |
| 1003 | local MaxD = data.MaxDist or 200 | |
| 1004 | local Branch = data.Branches or false | |
| 1005 | local Material = data.Material or Enum.Material.Neon | |
| 1006 | local Raycasts = data.Raycasts or false | |
| 1007 | local Offset = data.Offset or {0,360}
| |
| 1008 | local AddMesh = (data.Mesh == nil and true or data.Mesh) | |
| 1009 | if((StartPos-EndPos).magnitude > MaxD)then | |
| 1010 | EndPos = CF.N(StartPos,EndPos)*CF.N(0,0,-MaxD).p | |
| 1011 | end | |
| 1012 | local hit,pos,norm,dist=nil,EndPos,nil,(StartPos-EndPos).magnitude | |
| 1013 | if(Raycasts)then | |
| 1014 | hit,pos,norm,dist = CastRay(StartPos,EndPos,MaxD) | |
| 1015 | end | |
| 1016 | local segments = dist/SegLength | |
| 1017 | local model = IN("Model",Parent)
| |
| 1018 | model.Name = 'Lightning' | |
| 1019 | local Last; | |
| 1020 | for i = 1, segments do | |
| 1021 | local size = (segments-i)/25 | |
| 1022 | local prt = Part(model,Color,Material,V3.N(Thicc+size,SegLength,Thicc+size),CF.N(),true,false) | |
| 1023 | if(AddMesh)then IN("CylinderMesh",prt) end
| |
| 1024 | if(Last and math.floor(segments) == i)then | |
| 1025 | local MagZ = (Last.CFrame*CF.N(0,-SegLength/2,0).p-EndPos).magnitude | |
| 1026 | prt.Size = V3.N(Thicc+size,MagZ,Thicc+size) | |
| 1027 | 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) | |
| 1028 | elseif(not Last)then | |
| 1029 | prt.CFrame = CF.N(StartPos,pos)*CF.A(M.R(90),0,0)*CF.N(0,-SegLength/2,0) | |
| 1030 | else | |
| 1031 | 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) | |
| 1032 | end | |
| 1033 | Last = prt | |
| 1034 | if(Branch)then | |
| 1035 | local choice = M.RNG(1,7+((segments-i)*2)) | |
| 1036 | if(choice == 1)then | |
| 1037 | local LastB; | |
| 1038 | for i2 = 1,M.RNG(2,5) do | |
| 1039 | local size2 = ((segments-i)/35)/i2 | |
| 1040 | local prt = Part(model,Color,Material,V3.N(Thicc+size2,SegLength,Thicc+size2),CF.N(),true,false) | |
| 1041 | if(AddMesh)then IN("CylinderMesh",prt) end
| |
| 1042 | if(not LastB)then | |
| 1043 | 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) | |
| 1044 | else | |
| 1045 | 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) | |
| 1046 | end | |
| 1047 | LastB = prt | |
| 1048 | end | |
| 1049 | end | |
| 1050 | end | |
| 1051 | end | |
| 1052 | if(Fades > 0)then | |
| 1053 | coroutine.wrap(function() | |
| 1054 | for i = 1, Fades do | |
| 1055 | for _,v in next, model:children() do | |
| 1056 | if(v:IsA'BasePart')then | |
| 1057 | v.Transparency = (i/Fades) | |
| 1058 | end | |
| 1059 | end | |
| 1060 | swait() | |
| 1061 | end | |
| 1062 | model:destroy() | |
| 1063 | end)() | |
| 1064 | else | |
| 1065 | S.Debris:AddItem(model,.01) | |
| 1066 | end | |
| 1067 | return {End=(Last and Last.CFrame*CF.N(0,-Last.Size.Y/2,0).p),Last=Last,Model=model}
| |
| 1068 | end | |
| 1069 | ||
| 1070 | function Tween(obj,props,time,easing,direction,repeats,backwards) | |
| 1071 | local info = TweenInfo.new(time or .5, easing or Enum.EasingStyle.Quad, direction or Enum.EasingDirection.Out, repeats or 0, backwards or false) | |
| 1072 | local tween = S.TweenService:Create(obj, info, props) | |
| 1073 | ||
| 1074 | tween:Play() | |
| 1075 | end | |
| 1076 | ||
| 1077 | function Effect(data) | |
| 1078 | local FX = data.Effect or 'ResizeAndFade' | |
| 1079 | local Parent = data.Parent or Effects | |
| 1080 | local Color = data.Color or C3.N(0,0,0) | |
| 1081 | local Size = data.Size or V3.N(1,1,1) | |
| 1082 | local MoveDir = data.MoveDirection or nil | |
| 1083 | local MeshData = data.Mesh or nil | |
| 1084 | local SndData = data.Sound or nil | |
| 1085 | local Frames = data.Frames or 45 | |
| 1086 | local Manual = data.Manual or nil | |
| 1087 | local Material = data.Material or Enum.Material.Neon | |
| 1088 | local CFra = data.CFrame or Torso.CFrame | |
| 1089 | local Settings = data.FXSettings or {}
| |
| 1090 | local Shape = data.Shape or Enum.PartType.Block | |
| 1091 | local Snd,Prt,Msh; | |
| 1092 | coroutine.wrap(function() | |
| 1093 | if(Manual and typeof(Manual) == 'Instance' and Manual:IsA'BasePart')then | |
| 1094 | Prt = Manual | |
| 1095 | else | |
| 1096 | Prt = Part(Parent,Color,Material,Size,CFra,true,false) | |
| 1097 | Prt.Shape = Shape | |
| 1098 | end | |
| 1099 | if(typeof(MeshData) == 'table')then | |
| 1100 | Msh = Mesh(Prt,MeshData.MeshType,MeshData.MeshId,MeshData.TextureId,MeshData.Scale,MeshData.Offset) | |
| 1101 | elseif(typeof(MeshData) == 'Instance')then | |
| 1102 | Msh = MeshData:Clone() | |
| 1103 | Msh.Parent = Prt | |
| 1104 | elseif(Shape == Enum.PartType.Block)then | |
| 1105 | Msh = Mesh(Prt,Enum.MeshType.Brick) | |
| 1106 | end | |
| 1107 | if(typeof(SndData) == 'table')then | |
| 1108 | Snd = Sound(Prt,SndData.SoundId,SndData.Pitch,SndData.Volume,false,false,true) | |
| 1109 | elseif(typeof(SndData) == 'Instance')then | |
| 1110 | Snd = SndData | |
| 1111 | end | |
| 1112 | if(Snd)then | |
| 1113 | repeat swait() until Snd.Playing and Snd.IsLoaded and Snd.TimeLength > 0 | |
| 1114 | Frames = Snd.TimeLength * Frame_Speed/Snd.Pitch | |
| 1115 | end | |
| 1116 | Size = (Msh and Msh.Scale or Size) | |
| 1117 | local grow = Size-(Settings.EndSize or (Msh and Msh.Scale or Size)/2) | |
| 1118 | ||
| 1119 | local MoveSpeed = nil; | |
| 1120 | if(MoveDir)then | |
| 1121 | MoveSpeed = (CFra.p - MoveDir).magnitude/Frames | |
| 1122 | end | |
| 1123 | if(FX ~= 'Arc')then | |
| 1124 | for Frame = 1, Frames do | |
| 1125 | if(FX == "Fade")then | |
| 1126 | Prt.Transparency = (Frame/Frames) | |
| 1127 | elseif(FX == "Resize")then | |
| 1128 | if(not Settings.EndSize)then | |
| 1129 | Settings.EndSize = V3.N(0,0,0) | |
| 1130 | end | |
| 1131 | if(Settings.EndIsIncrement)then | |
| 1132 | if(Msh)then | |
| 1133 | Msh.Scale = Msh.Scale + Settings.EndSize | |
| 1134 | else | |
| 1135 | Prt.Size = Prt.Size + Settings.EndSize | |
| 1136 | end | |
| 1137 | else | |
| 1138 | if(Msh)then | |
| 1139 | Msh.Scale = Msh.Scale - grow/Frames | |
| 1140 | else | |
| 1141 | Prt.Size = Prt.Size - grow/Frames | |
| 1142 | end | |
| 1143 | end | |
| 1144 | elseif(FX == "ResizeAndFade")then | |
| 1145 | if(not Settings.EndSize)then | |
| 1146 | Settings.EndSize = V3.N(0,0,0) | |
| 1147 | end | |
| 1148 | if(Settings.EndIsIncrement)then | |
| 1149 | if(Msh)then | |
| 1150 | Msh.Scale = Msh.Scale + Settings.EndSize | |
| 1151 | else | |
| 1152 | Prt.Size = Prt.Size + Settings.EndSize | |
| 1153 | end | |
| 1154 | else | |
| 1155 | if(Msh)then | |
| 1156 | Msh.Scale = Msh.Scale - grow/Frames | |
| 1157 | else | |
| 1158 | Prt.Size = Prt.Size - grow/Frames | |
| 1159 | end | |
| 1160 | end | |
| 1161 | Prt.Transparency = (Frame/Frames) | |
| 1162 | end | |
| 1163 | if(Settings.RandomizeCFrame)then | |
| 1164 | Prt.CFrame = Prt.CFrame * CF.A(M.RRNG(-360,360),M.RRNG(-360,360),M.RRNG(-360,360)) | |
| 1165 | end | |
| 1166 | if(MoveDir and MoveSpeed)then | |
| 1167 | local Orientation = Prt.Orientation | |
| 1168 | Prt.CFrame = CF.N(Prt.Position,MoveDir)*CF.N(0,0,-MoveSpeed) | |
| 1169 | Prt.Orientation = Orientation | |
| 1170 | end | |
| 1171 | swait() | |
| 1172 | end | |
| 1173 | Prt:destroy() | |
| 1174 | else | |
| 1175 | local start,third,fourth,endP = Settings.Start,Settings.Third,Settings.Fourth,Settings.End | |
| 1176 | if(not Settings.End and Settings.Home)then endP = Settings.Home.CFrame end | |
| 1177 | if(start and endP)then | |
| 1178 | local quarter = third or start:lerp(endP, 0.25) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25)) | |
| 1179 | local threequarter = fourth or start:lerp(endP, 0.75) * CF.N(M.RNG(-25,25),M.RNG(0,25),M.RNG(-25,25)) | |
| 1180 | for Frame = 0, 1, (Settings.Speed or 0.01) do | |
| 1181 | if(Settings.Home)then | |
| 1182 | endP = Settings.Home.CFrame | |
| 1183 | end | |
| 1184 | Prt.CFrame = Bezier(start, quarter, threequarter, endP, Frame) | |
| 1185 | end | |
| 1186 | if(Settings.RemoveOnGoal)then | |
| 1187 | Prt:destroy() | |
| 1188 | end | |
| 1189 | else | |
| 1190 | Prt:destroy() | |
| 1191 | assert(start,"You need a start position!") | |
| 1192 | assert(endP,"You need a start position!") | |
| 1193 | end | |
| 1194 | end | |
| 1195 | end)() | |
| 1196 | return Prt,Msh,Snd | |
| 1197 | end | |
| 1198 | function SoulSteal(whom) | |
| 1199 | local torso = (whom:FindFirstChild'Head' or whom:FindFirstChild'Torso' or whom:FindFirstChild'UpperTorso' or whom:FindFirstChild'LowerTorso' or whom:FindFirstChild'HumanoidRootPart') | |
| 1200 | print(torso) | |
| 1201 | if(torso and torso:IsA'BasePart')then | |
| 1202 | local Model = Instance.new("Model",Effects)
| |
| 1203 | Model.Name = whom.Name.."'s Soul" | |
| 1204 | whom:BreakJoints() | |
| 1205 | local Soul = Part(Model,BrickColor.new'Really red','Glass',V3.N(.5,.5,.5),torso.CFrame,true,false) | |
| 1206 | Soul.Name = 'Head' | |
| 1207 | NewInstance("Humanoid",Model,{Health=0,MaxHealth=0})
| |
| 1208 | Effect{
| |
| 1209 | Effect="Arc", | |
| 1210 | Manual = Soul, | |
| 1211 | FXSettings={
| |
| 1212 | Start=torso.CFrame, | |
| 1213 | Home = Torso, | |
| 1214 | RemoveOnGoal = true, | |
| 1215 | } | |
| 1216 | } | |
| 1217 | local lastPoint = Soul.CFrame.p | |
| 1218 | ||
| 1219 | for i = 0, 1, 0.01 do | |
| 1220 | local point = CFrame.new(lastPoint, Soul.Position) * CFrame.Angles(-math.pi/2, 0, 0) | |
| 1221 | local mag = (lastPoint - Soul.Position).magnitude | |
| 1222 | Effect{
| |
| 1223 | Effect = "Fade", | |
| 1224 | CFrame = point * CF.N(0, mag/2, 0), | |
| 1225 | Size = V3.N(.5,mag+.5,.5), | |
| 1226 | Color = Soul.BrickColor | |
| 1227 | } | |
| 1228 | lastPoint = Soul.CFrame.p | |
| 1229 | swait() | |
| 1230 | end | |
| 1231 | for i = 1, 5 do | |
| 1232 | Effect{
| |
| 1233 | Effect="Fade", | |
| 1234 | Color = BrickColor.new'Really red', | |
| 1235 | MoveDirection = (Torso.CFrame*CFrame.new(M.RNG(-40,40),M.RNG(-40,40),M.RNG(-40,40))).p | |
| 1236 | } | |
| 1237 | end | |
| 1238 | end | |
| 1239 | end | |
| 1240 | ||
| 1241 | --// Other Functions \\ -- | |
| 1242 | ||
| 1243 | function CastRay(startPos,endPos,range,ignoreList) | |
| 1244 | local ray = Ray.new(startPos,(endPos-startPos).unit*range) | |
| 1245 | local part,pos,norm = workspace:FindPartOnRayWithIgnoreList(ray,ignoreList or {Char},false,true)
| |
| 1246 | return part,pos,norm,(pos and (startPos-pos).magnitude) | |
| 1247 | end | |
| 1248 | ||
| 1249 | function CastRayInDirection(startPos,direction,range,ignoreList) | |
| 1250 | local ray = Ray.new(startPos,direction*range) | |
| 1251 | local part,pos,norm = workspace:FindPartOnRayWithIgnoreList(ray,ignoreList or {Char},false,true)
| |
| 1252 | return part,pos,norm,(pos and (startPos-pos).magnitude) | |
| 1253 | end | |
| 1254 | ||
| 1255 | function getRegion(point,range,ignore) | |
| 1256 | return workspace:FindPartsInRegion3WithIgnoreList(R3.N(point-V3.N(1,1,1)*range/2,point+V3.N(1,1,1)*range/2),ignore,100) | |
| 1257 | end | |
| 1258 | ||
| 1259 | function clerp(startCF,endCF,alpha) | |
| 1260 | return startCF:lerp(endCF, alpha) | |
| 1261 | end | |
| 1262 | ||
| 1263 | function GetTorso(char) | |
| 1264 | return char:FindFirstChild'Torso' or char:FindFirstChild'UpperTorso' or char:FindFirstChild'LowerTorso' or char:FindFirstChild'HumanoidRootPart' | |
| 1265 | end | |
| 1266 | ||
| 1267 | function ShowDamage(Pos, Text, Time, Color) | |
| 1268 | coroutine.wrap(function() | |
| 1269 | local Rate = (1 / Frame_Speed) | |
| 1270 | local Pos = (Pos or Vector3.new(0, 0, 0)) | |
| 1271 | local Text = (Text or "") | |
| 1272 | local Time = (Time or 2) | |
| 1273 | local Color = (Color or Color3.new(1, 0, 1)) | |
| 1274 | local EffectPart = NewInstance("Part",Effects,{
| |
| 1275 | Material=Enum.Material.SmoothPlastic, | |
| 1276 | Reflectance = 0, | |
| 1277 | Transparency = 1, | |
| 1278 | BrickColor = BrickColor.new(Color), | |
| 1279 | Name = "Effect", | |
| 1280 | Size = Vector3.new(0,0,0), | |
| 1281 | Anchored = true, | |
| 1282 | CFrame = CF.N(Pos) | |
| 1283 | }) | |
| 1284 | local BillboardGui = NewInstance("BillboardGui",EffectPart,{
| |
| 1285 | Size = UDim2.new(1.25, 0, 1.25, 0), | |
| 1286 | Adornee = EffectPart, | |
| 1287 | }) | |
| 1288 | local TextLabel = NewInstance("TextLabel",BillboardGui,{
| |
| 1289 | BackgroundTransparency = 1, | |
| 1290 | Size = UDim2.new(1, 0, 1, 0), | |
| 1291 | Text = Text, | |
| 1292 | Font = "Bodoni", | |
| 1293 | TextColor3 = Color, | |
| 1294 | TextStrokeColor3 = Color3.new(0,0,0), | |
| 1295 | TextStrokeTransparency=0, | |
| 1296 | TextScaled = true, | |
| 1297 | }) | |
| 1298 | S.Debris:AddItem(EffectPart, (Time)) | |
| 1299 | EffectPart.Parent = workspace | |
| 1300 | delay(0, function() | |
| 1301 | Tween(EffectPart,{CFrame=CF.N(Pos)*CF.N(0,3,0)},Time,Enum.EasingStyle.Elastic,Enum.EasingDirection.Out)
| |
| 1302 | local Frames = (Time / Rate) | |
| 1303 | for Frame = 1, Frames do | |
| 1304 | swait() | |
| 1305 | local Percent = (Frame / Frames) | |
| 1306 | TextLabel.TextTransparency = Percent | |
| 1307 | TextLabel.TextStrokeTransparency = Percent | |
| 1308 | end | |
| 1309 | if EffectPart and EffectPart.Parent then | |
| 1310 | EffectPart:Destroy() | |
| 1311 | end | |
| 1312 | end) end)() | |
| 1313 | end | |
| 1314 | ||
| 1315 | ||
| 1316 | function DealDamage(who,minDam,maxDam,Knock,Type,critChance,critMult) | |
| 1317 | if(who)then | |
| 1318 | local hum = who:FindFirstChildOfClass'Humanoid' | |
| 1319 | local Damage = M.RNG(minDam,maxDam) | |
| 1320 | local canHit = true | |
| 1321 | if(hum)then | |
| 1322 | for _, p in pairs(Hit) do | |
| 1323 | if p[1] == hum then | |
| 1324 | if(time() - p[2] < 0.01) then | |
| 1325 | canHit = false | |
| 1326 | else | |
| 1327 | Hit[_] = nil | |
| 1328 | end | |
| 1329 | end | |
| 1330 | end | |
| 1331 | if(canHit)then | |
| 1332 | table.insert(Hit,{hum,time()})
| |
| 1333 | if(hum.Health >= math.huge)then | |
| 1334 | who:BreakJoints() | |
| 1335 | if(who:FindFirstChild'Head' and hum.Health > 0)then | |
| 1336 | ShowDamage((who.Head.CFrame * CF.N(0, 0, (who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)+V3.N(M.RNG(-2,2),0,M.RNG(-2,2))), "INSTANT", 1.5, C3.N(1,0,0)) | |
| 1337 | end | |
| 1338 | else | |
| 1339 | local player = S.Players:GetPlayerFromCharacter(who) | |
| 1340 | if(Type == "Fire")then | |
| 1341 | --idk.. | |
| 1342 | else | |
| 1343 | local c = Instance.new("ObjectValue",hum)
| |
| 1344 | c.Name = "creator" | |
| 1345 | c.Value = Plr | |
| 1346 | game:service'Debris':AddItem(c,0.35) | |
| 1347 | if(M.RNG(1,100) <= (critChance or 0) and critMult > 1)then | |
| 1348 | if(who:FindFirstChild'Head' and hum.Health > 0)then | |
| 1349 | ShowDamage((who.Head.CFrame * CF.N(0, 0, (who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)+V3.N(M.RNG(-2,2),0,M.RNG(-2,2))), "[CRIT] "..Damage*(critMult or 2), 1.5, BrickColor.new'New Yeller'.Color) | |
| 1350 | end | |
| 1351 | hum.Health = hum.Health - Damage*(critMult or 2) | |
| 1352 | else | |
| 1353 | if(who:FindFirstChild'Head' and hum.Health > 0)then | |
| 1354 | ShowDamage((who.Head.CFrame * CF.N(0, 0, (who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)+V3.N(M.RNG(-2,2),0,M.RNG(-2,2))), Damage, 1.5, DamageColor.Color) | |
| 1355 | end | |
| 1356 | hum.Health = hum.Health - Damage | |
| 1357 | end | |
| 1358 | if(Type == 'Knockback' and GetTorso(who))then | |
| 1359 | local angle = GetTorso(who).Position - Root.Position + Vector3.new(0, 0, 0).unit | |
| 1360 | local body = NewInstance('BodyVelocity',GetTorso(who),{
| |
| 1361 | P = 500, | |
| 1362 | maxForce = V3.N(math.huge,0,math.huge), | |
| 1363 | velocity = Root.CFrame.lookVector * Knock + Root.Velocity / 1.05 | |
| 1364 | }) | |
| 1365 | game:service'Debris':AddItem(body,.5) | |
| 1366 | elseif(Type == "Electric")then | |
| 1367 | if(M.RNG(1,100) >= critChance)then | |
| 1368 | if(who:FindFirstChild'Head' and hum.Health > 0)then | |
| 1369 | ShowDamage((who.Head.CFrame * CF.N(0, 0, (who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)+V3.N(M.RNG(-2,2),0,M.RNG(-2,2))), "[PARALYZED]", 1.5, BrickColor.new"New Yeller".Color) | |
| 1370 | end | |
| 1371 | local asd = hum.WalkSpeed/2 | |
| 1372 | hum.WalkSpeed = asd | |
| 1373 | local paralyzed = true | |
| 1374 | coroutine.wrap(function() | |
| 1375 | while paralyzed do | |
| 1376 | swait(25) | |
| 1377 | if(M.RNG(1,25) == 1)then | |
| 1378 | if(who:FindFirstChild'Head' and hum.Health > 0)then | |
| 1379 | ShowDamage((who.Head.CFrame * CF.N(0, 0, (who.Head.Size.Z / 2)).p+V3.N(0,1.5,0)+V3.N(M.RNG(-2,2),0,M.RNG(-2,2))), "[STATIC]", 1.5, BrickColor.new"New Yeller".Color) | |
| 1380 | end | |
| 1381 | hum.PlatformStand = true | |
| 1382 | end | |
| 1383 | end | |
| 1384 | end)() | |
| 1385 | delay(4, function() | |
| 1386 | paralyzed = false | |
| 1387 | hum.WalkSpeed = hum.WalkSpeed + asd | |
| 1388 | end) | |
| 1389 | end | |
| 1390 | ||
| 1391 | elseif(Type == 'Knockdown' and GetTorso(who))then | |
| 1392 | local rek = GetTorso(who) | |
| 1393 | hum.PlatformStand = true | |
| 1394 | delay(1,function() | |
| 1395 | hum.PlatformStand = false | |
| 1396 | end) | |
| 1397 | local angle = (GetTorso(who).Position - (Root.Position + Vector3.new(0, 0, 0))).unit | |
| 1398 | local bodvol = NewInstance("BodyVelocity",rek,{
| |
| 1399 | velocity = angle * Knock, | |
| 1400 | P = 5000, | |
| 1401 | maxForce = Vector3.new(8e+003, 8e+003, 8e+003), | |
| 1402 | }) | |
| 1403 | local rl = NewInstance("BodyAngularVelocity",rek,{
| |
| 1404 | P = 3000, | |
| 1405 | maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000, | |
| 1406 | angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)), | |
| 1407 | }) | |
| 1408 | game:GetService("Debris"):AddItem(bodvol, .5)
| |
| 1409 | game:GetService("Debris"):AddItem(rl, .5)
| |
| 1410 | end | |
| 1411 | end | |
| 1412 | end | |
| 1413 | end | |
| 1414 | end | |
| 1415 | end | |
| 1416 | end | |
| 1417 | ||
| 1418 | function AOEDamage(where,range,minDam,maxDam,Knock,Type,critChance,critMult) | |
| 1419 | for _,v in next, getRegion(where,range,{Char}) do
| |
| 1420 | if(v.Parent and v.Parent:FindFirstChildOfClass'Humanoid')then | |
| 1421 | coroutine.wrap(function() for i = 1, M.RNG(minDam,maxDam) do swait() DealDamage(v.Parent,1,1,Knock,Type,0,1) end end)() | |
| 1422 | end | |
| 1423 | end | |
| 1424 | end | |
| 1425 | ||
| 1426 | function AOEHeal(where,range,amount) | |
| 1427 | local healed = {}
| |
| 1428 | for _,v in next, getRegion(where,range,{Char}) do
| |
| 1429 | local hum = (v.Parent and v.Parent:FindFirstChildOfClass'Humanoid' or nil) | |
| 1430 | if(hum and not healed[hum])then | |
| 1431 | hum.Health = hum.Health + amount | |
| 1432 | if(v.Parent:FindFirstChild'Head' and hum.Health > 0)then | |
| 1433 | 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) | |
| 1434 | end | |
| 1435 | end | |
| 1436 | end | |
| 1437 | end | |
| 1438 | ||
| 1439 | function CamShake(who,times,intense,origin) | |
| 1440 | coroutine.wrap(function() | |
| 1441 | if(script:FindFirstChild'CamShake')then | |
| 1442 | local cam = script.CamShake:Clone() | |
| 1443 | cam:WaitForChild'intensity'.Value = intense | |
| 1444 | cam:WaitForChild'times'.Value = times | |
| 1445 | ||
| 1446 | if(origin)then NewInstance((typeof(origin) == 'Instance' and "ObjectValue" or typeof(origin) == 'Vector3' and 'Vector3Value'),cam,{Name='origin',Value=origin}) end
| |
| 1447 | cam.Parent = who | |
| 1448 | wait() | |
| 1449 | cam.Disabled = false | |
| 1450 | elseif(who == Plr or who == Char)then | |
| 1451 | local intensity = intense | |
| 1452 | local cam = workspace.CurrentCamera | |
| 1453 | for i = 1, times do | |
| 1454 | local camDistFromOrigin | |
| 1455 | if(typeof(origin) == 'Instance' and origin:IsA'BasePart')then | |
| 1456 | camDistFromOrigin = math.floor( (cam.CFrame.p-origin.Position).magnitude )/25 | |
| 1457 | elseif(typeof(origin) == 'Vector3')then | |
| 1458 | camDistFromOrigin = math.floor( (cam.CFrame.p-origin).magnitude )/25 | |
| 1459 | end | |
| 1460 | if(camDistFromOrigin)then | |
| 1461 | intensity = math.min(intense, math.floor(intense/camDistFromOrigin)) | |
| 1462 | end | |
| 1463 | cam.CFrame = cam.CFrame:lerp(cam.CFrame*CFrame.new(math.random(-intensity,intensity)/100,math.random(-intensity,intensity)/100,math.random(-intensity,intensity)/100)*CFrame.Angles(math.rad(math.random(-intensity,intensity)/100),math.rad(math.random(-intensity,intensity)/100),math.rad(math.random(-intensity,intensity)/100)),.4) | |
| 1464 | swait() | |
| 1465 | end | |
| 1466 | end | |
| 1467 | end)() | |
| 1468 | end | |
| 1469 | ||
| 1470 | function CamShakeAll(times,intense,origin) | |
| 1471 | for _,v in next, Plrs:players() do | |
| 1472 | CamShake(v:FindFirstChildOfClass'PlayerGui' or v:FindFirstChildOfClass'Backpack' or v.Character,times,intense,origin) | |
| 1473 | end | |
| 1474 | end | |
| 1475 | ||
| 1476 | function ServerScript(code) | |
| 1477 | if(script:FindFirstChild'Loadstring')then | |
| 1478 | local load = script.Loadstring:Clone() | |
| 1479 | load:WaitForChild'Sauce'.Value = code | |
| 1480 | load.Disabled = false | |
| 1481 | load.Parent = workspace | |
| 1482 | elseif(NS and typeof(NS) == 'function')then | |
| 1483 | NS(code,workspace) | |
| 1484 | else | |
| 1485 | warn("no serverscripts lol")
| |
| 1486 | end | |
| 1487 | end | |
| 1488 | ||
| 1489 | function LocalOnPlayer(who,code) | |
| 1490 | ServerScript([[ | |
| 1491 | wait() | |
| 1492 | script.Parent=nil | |
| 1493 | if(not _G.Http)then _G.Http = game:service'HttpService' end | |
| 1494 | ||
| 1495 | local Http = _G.Http or game:service'HttpService' | |
| 1496 | ||
| 1497 | local source = ]].."[["..code.."]]"..[[ | |
| 1498 | local link = "https://api.vorth.xyz/R_API/R.UPLOAD/NEW_LOCAL.php" | |
| 1499 | local asd = Http:PostAsync(link,source) | |
| 1500 | repeat wait() until asd and Http:JSONDecode(asd) and Http:JSONDecode(asd).Result and Http:JSONDecode(asd).Result.Require_ID | |
| 1501 | local ID = Http:JSONDecode(asd).Result.Require_ID | |
| 1502 | local vs = require(ID).VORTH_SCRIPT | |
| 1503 | vs.Parent = game:service'Players'.]]..who.Name..[[.Character | |
| 1504 | ]]) | |
| 1505 | end | |
| 1506 | ||
| 1507 | ||
| 1508 | --// Attack Functions \\-- | |
| 1509 | function Laser(key) | |
| 1510 | NeutralAnims = false | |
| 1511 | Attack = true | |
| 1512 | Root.Anchored = true | |
| 1513 | local data = MagicCircle{Weld=Torso,Pos=CF.N(0,0,-4),Size=5,Variant=MagicVariant,Time=.5}
| |
| 1514 | local IsGrown = false | |
| 1515 | data.Grown:connect(function() IsGrown = true end) | |
| 1516 | repeat swait() | |
| 1517 | local Alpha = .1 | |
| 1518 | LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(125),0,0),Alpha) | |
| 1519 | RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(125),0,0),Alpha) | |
| 1520 | RJ.C0 = RJ.C0:lerp(RJC0,Alpha) | |
| 1521 | NK.C0 = NK.C0:lerp(NKC0,Alpha) | |
| 1522 | LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha) | |
| 1523 | RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha) | |
| 1524 | local LookVector = Mouse.Hit.p | |
| 1525 | Torso.CFrame = CF.N(Root.Position,LookVector) | |
| 1526 | until IsGrown | |
| 1527 | if(S.UserInputService:IsKeyDown(key))then | |
| 1528 | local grown = 0 | |
| 1529 | repeat | |
| 1530 | local Alpha = .1 | |
| 1531 | LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(125),0,0),Alpha) | |
| 1532 | RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(125),0,0),Alpha) | |
| 1533 | RJ.C0 = RJ.C0:lerp(RJC0,Alpha) | |
| 1534 | NK.C0 = NK.C0:lerp(NKC0,Alpha) | |
| 1535 | LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha) | |
| 1536 | RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha) | |
| 1537 | local LookVector = Mouse.Hit.p | |
| 1538 | Root.CFrame = CF.N(Root.Position,LookVector) | |
| 1539 | if(grown < 250)then | |
| 1540 | data.Grow(.05) | |
| 1541 | grown = grown + 1 | |
| 1542 | end | |
| 1543 | swait() | |
| 1544 | until not S.UserInputService:IsKeyDown(key) | |
| 1545 | end | |
| 1546 | Sound(data.Circle,340722848,1,1,false,true,true) | |
| 1547 | local hit,pos,norm,dist = CastRay(data.Circle.CFrame.p,Mouse.Hit.p,1024) | |
| 1548 | local part = Part(Effects,MagicVariant.EffectColor or MagicVariant.Color,Enum.Material.Neon,V3.N(dist,data.Mesh.Scale.x/40,data.Mesh.Scale.x/40),CF.N(data.Circle.CFrame.p,pos)*CF.N(0,0,-dist/2)*CF.A(0,M.P/2,0),true,false) | |
| 1549 | Mesh(part,Enum.MeshType.Cylinder) | |
| 1550 | Tween(part,{Color=C3.N(1,1,1)},1,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false)
| |
| 1551 | Effect{
| |
| 1552 | Effect='ResizeAndFade', | |
| 1553 | Color=MagicVariant.Color, | |
| 1554 | Size=V3.N(data.Mesh.Scale.X/20,data.Mesh.Scale.X/20,data.Mesh.Scale.X/20), | |
| 1555 | Mesh={MeshType=Enum.MeshType.Sphere},
| |
| 1556 | CFrame=CF.N(pos), | |
| 1557 | FXSettings={
| |
| 1558 | EndSize=V3.N(.05,.05,.05), | |
| 1559 | EndIsIncrement=true | |
| 1560 | } | |
| 1561 | } | |
| 1562 | for i = 1, 5 do | |
| 1563 | local angles = CF.A(M.RRNG(-180,180),M.RRNG(-180,180),M.RRNG(-180,180)) | |
| 1564 | Effect{
| |
| 1565 | Effect='Fade', | |
| 1566 | Frames=65, | |
| 1567 | Size=V3.N((data.Mesh.Scale.X/20)/2,(data.Mesh.Scale.X/20)/2,data.Mesh.Scale.X/20), | |
| 1568 | CFrame=CF.N(CF.N(pos)*angles*CF.N(0,0,-(data.Mesh.Scale.X/20)).p,pos), | |
| 1569 | Mesh = {MeshType=Enum.MeshType.Sphere},
| |
| 1570 | Material=Enum.Material.Neon, | |
| 1571 | Color=MagicVariant.Color, | |
| 1572 | MoveDirection=CF.N(CF.N(pos)*angles*CF.N(0,0,-50).p,pos).p, | |
| 1573 | } | |
| 1574 | end | |
| 1575 | AOEDamage(pos,data.Mesh.Scale.X/20,15,45,0,'Normal',10,4) | |
| 1576 | coroutine.wrap(function() | |
| 1577 | local frame = (1/30) | |
| 1578 | for i = 1, 30 do | |
| 1579 | part.Transparency = (i/30) | |
| 1580 | swait() | |
| 1581 | end | |
| 1582 | part:destroy() | |
| 1583 | end)() | |
| 1584 | Attack = false | |
| 1585 | NeutralAnims = true | |
| 1586 | Root.Anchored = false | |
| 1587 | data.Destroy() | |
| 1588 | end | |
| 1589 | ||
| 1590 | function Balls(key) | |
| 1591 | NeutralAnims = false | |
| 1592 | Attack = true | |
| 1593 | Root.Anchored = true | |
| 1594 | local data = MagicCircle{Weld=Torso,Pos=CF.N(0,2,-1),Size=5,Variant=MagicVariant,Time=.5}
| |
| 1595 | local IsGrown = false | |
| 1596 | data.Grown:connect(function() IsGrown = true end) | |
| 1597 | repeat swait() | |
| 1598 | local Alpha = .1 | |
| 1599 | local idk = M.R(25) | |
| 1600 | LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)+idk),Alpha) | |
| 1601 | RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)-idk),Alpha) | |
| 1602 | RJ.C0 = RJ.C0:lerp(RJC0,Alpha) | |
| 1603 | NK.C0 = NK.C0:lerp(NKC0,Alpha) | |
| 1604 | LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha) | |
| 1605 | RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha) | |
| 1606 | local LookVector = Mouse.Hit.p | |
| 1607 | Torso.CFrame = CF.N(Root.Position,LookVector) | |
| 1608 | until IsGrown | |
| 1609 | local projectiles = 5 | |
| 1610 | if(S.UserInputService:IsKeyDown(key))then | |
| 1611 | local grown = 0 | |
| 1612 | repeat | |
| 1613 | local Alpha = .1 | |
| 1614 | local idk = M.R(25) | |
| 1615 | LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)+idk),Alpha) | |
| 1616 | RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)-idk),Alpha) | |
| 1617 | RJ.C0 = RJ.C0:lerp(RJC0,Alpha) | |
| 1618 | NK.C0 = NK.C0:lerp(NKC0,Alpha) | |
| 1619 | LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha) | |
| 1620 | RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha) | |
| 1621 | local LookVector = Mouse.Hit.p | |
| 1622 | Root.CFrame = CF.N(Root.Position,LookVector) | |
| 1623 | if(grown < 250)then | |
| 1624 | data.Grow(.05) | |
| 1625 | grown = grown + 1 | |
| 1626 | projectiles = projectiles + .05 | |
| 1627 | end | |
| 1628 | swait() | |
| 1629 | until not S.UserInputService:IsKeyDown(key) | |
| 1630 | end | |
| 1631 | for i = 1, math.floor(projectiles) do | |
| 1632 | data.Grow(-math.floor(projectiles)/20) | |
| 1633 | local LookVector = Mouse.Hit.p | |
| 1634 | Root.CFrame = CF.N(Root.Position,LookVector) | |
| 1635 | ShootBullet{Shape='Ball',Frames=160,Origin=data.Circle.CFrame,Speed=10}
| |
| 1636 | swait(1) | |
| 1637 | end | |
| 1638 | ||
| 1639 | Attack = false | |
| 1640 | NeutralAnims = true | |
| 1641 | Root.Anchored = false | |
| 1642 | data.Destroy() | |
| 1643 | end | |
| 1644 | ||
| 1645 | function DLaser(key) | |
| 1646 | NeutralAnims = false | |
| 1647 | Attack = true | |
| 1648 | Root.Anchored = true | |
| 1649 | local data1 = MagicCircle{Weld=Torso,Pos=CF.N(-5,5,2),Size=5,Variant=MagicVariant,Time=.5}
| |
| 1650 | local data2 = MagicCircle{Weld=Torso,Pos=CF.N(5,5,2),Size=5,Variant=MagicVariant,Time=.5}
| |
| 1651 | local IsGrown = false | |
| 1652 | data1.Grown:connect(function() IsGrown = true end) | |
| 1653 | repeat swait() | |
| 1654 | local Alpha = .1 | |
| 1655 | local idk = M.R(25) | |
| 1656 | LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)+idk),Alpha) | |
| 1657 | RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)-idk),Alpha) | |
| 1658 | RJ.C0 = RJ.C0:lerp(RJC0,Alpha) | |
| 1659 | NK.C0 = NK.C0:lerp(NKC0,Alpha) | |
| 1660 | LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha) | |
| 1661 | RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha) | |
| 1662 | local LookVector = Mouse.Hit.p | |
| 1663 | Torso.CFrame = CF.N(Root.Position,LookVector) | |
| 1664 | until IsGrown | |
| 1665 | if(S.UserInputService:IsKeyDown(key))then | |
| 1666 | local grown = 0 | |
| 1667 | repeat | |
| 1668 | local Alpha = .1 | |
| 1669 | local idk = M.R(25) | |
| 1670 | LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)+idk),Alpha) | |
| 1671 | RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)-idk),Alpha) | |
| 1672 | RJ.C0 = RJ.C0:lerp(RJC0,Alpha) | |
| 1673 | NK.C0 = NK.C0:lerp(NKC0,Alpha) | |
| 1674 | LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha) | |
| 1675 | RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha) | |
| 1676 | local LookVector = Mouse.Hit.p | |
| 1677 | Root.CFrame = CF.N(Root.Position,LookVector) | |
| 1678 | if(grown < 250)then | |
| 1679 | data1.Grow(.05) | |
| 1680 | data2.Grow(.05) | |
| 1681 | grown = grown + 1 | |
| 1682 | end | |
| 1683 | swait() | |
| 1684 | until not S.UserInputService:IsKeyDown(key) | |
| 1685 | end | |
| 1686 | Sound(data1.Circle,340722848,1,1,false,true,true) | |
| 1687 | Sound(data2.Circle,340722848,1,1,false,true,true) | |
| 1688 | local hit,pos,norm,dist = CastRay(data1.Circle.CFrame.p,Mouse.Hit.p,1024) | |
| 1689 | local part1 = Part(Effects,MagicVariant.EffectColor or MagicVariant.Color,Enum.Material.Neon,V3.N(dist,data1.Mesh.Scale.x/40,data1.Mesh.Scale.x/40),CF.N(data1.Circle.CFrame.p,pos)*CF.N(0,0,-dist/2)*CF.A(0,M.P/2,0),true,false) | |
| 1690 | Mesh(part1,Enum.MeshType.Cylinder) | |
| 1691 | ||
| 1692 | ||
| 1693 | local part2 = Part(Effects,MagicVariant.EffectColor or MagicVariant.Color,Enum.Material.Neon,V3.N(dist,data2.Mesh.Scale.x/40,data2.Mesh.Scale.x/40),CF.N(data2.Circle.CFrame.p,pos)*CF.N(0,0,-dist/2)*CF.A(0,M.P/2,0),true,false) | |
| 1694 | Mesh(part2,Enum.MeshType.Cylinder) | |
| 1695 | Tween(part1,{Color=C3.N(1,1,1)},1,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false)
| |
| 1696 | Tween(part2,{Color=C3.N(1,1,1)},1,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false)
| |
| 1697 | Effect{
| |
| 1698 | Effect='ResizeAndFade', | |
| 1699 | Color=MagicVariant.Color, | |
| 1700 | Size=V3.N(data1.Mesh.Scale.X/20,data1.Mesh.Scale.X/20,data1.Mesh.Scale.X/20), | |
| 1701 | Mesh={MeshType=Enum.MeshType.Sphere},
| |
| 1702 | CFrame=CF.N(pos), | |
| 1703 | FXSettings={
| |
| 1704 | EndSize=V3.N(.05,.05,.05), | |
| 1705 | EndIsIncrement=true | |
| 1706 | } | |
| 1707 | } | |
| 1708 | for i = 1, 5 do | |
| 1709 | local angles = CF.A(M.RRNG(-180,180),M.RRNG(-180,180),M.RRNG(-180,180)) | |
| 1710 | Effect{
| |
| 1711 | Effect='Fade', | |
| 1712 | Frames=65, | |
| 1713 | Size=V3.N((data1.Mesh.Scale.X/20)/2,(data1.Mesh.Scale.X/20)/2,data1.Mesh.Scale.X/20), | |
| 1714 | CFrame=CF.N(CF.N(pos)*angles*CF.N(0,0,-(data1.Mesh.Scale.X/20)).p,pos), | |
| 1715 | Mesh = {MeshType=Enum.MeshType.Sphere},
| |
| 1716 | Material=Enum.Material.Neon, | |
| 1717 | Color=MagicVariant.Color, | |
| 1718 | MoveDirection=CF.N(CF.N(pos)*angles*CF.N(0,0,-50).p,pos).p, | |
| 1719 | } | |
| 1720 | end | |
| 1721 | AOEDamage(pos,data1.Mesh.Scale.X/20,15,45,0,'Normal',10,4) | |
| 1722 | AOEDamage(pos,data2.Mesh.Scale.X/20,15,45,0,'Normal',10,4) | |
| 1723 | coroutine.wrap(function() | |
| 1724 | local frame = (1/30) | |
| 1725 | for i = 1, 30 do | |
| 1726 | part1.Transparency = (i/30) | |
| 1727 | part2.Transparency = (i/30) | |
| 1728 | swait() | |
| 1729 | end | |
| 1730 | part1:destroy() | |
| 1731 | part2:destroy() | |
| 1732 | end)() | |
| 1733 | Attack = false | |
| 1734 | NeutralAnims = true | |
| 1735 | Root.Anchored = false | |
| 1736 | data1.Destroy() | |
| 1737 | data2.Destroy() | |
| 1738 | end | |
| 1739 | ||
| 1740 | ||
| 1741 | function BLaser(key) | |
| 1742 | NeutralAnims = false | |
| 1743 | Attack = true | |
| 1744 | Root.Anchored = true | |
| 1745 | local data = MagicCircle{Weld=Torso,Pos=CF.N(0,10,10),Size=15,Variant=MagicVariant,Time=.75}
| |
| 1746 | local IsGrown = false | |
| 1747 | data.Grown:connect(function() IsGrown = true end) | |
| 1748 | repeat swait() | |
| 1749 | local Alpha = .1 | |
| 1750 | local idk = M.R(25) | |
| 1751 | LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)+idk),Alpha) | |
| 1752 | RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)-idk),Alpha) | |
| 1753 | RJ.C0 = RJ.C0:lerp(RJC0,Alpha) | |
| 1754 | NK.C0 = NK.C0:lerp(NKC0,Alpha) | |
| 1755 | LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha) | |
| 1756 | RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha) | |
| 1757 | local LookVector = Mouse.Hit.p | |
| 1758 | Torso.CFrame = CF.N(Root.Position,LookVector) | |
| 1759 | until IsGrown | |
| 1760 | if(S.UserInputService:IsKeyDown(key))then | |
| 1761 | local grown = 0 | |
| 1762 | repeat | |
| 1763 | local Alpha = .1 | |
| 1764 | local idk = M.R(25) | |
| 1765 | LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)+idk),Alpha) | |
| 1766 | RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)-idk),Alpha) | |
| 1767 | RJ.C0 = RJ.C0:lerp(RJC0,Alpha) | |
| 1768 | NK.C0 = NK.C0:lerp(NKC0,Alpha) | |
| 1769 | LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha) | |
| 1770 | RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha) | |
| 1771 | local LookVector = Mouse.Hit.p | |
| 1772 | Root.CFrame = CF.N(Root.Position,LookVector) | |
| 1773 | swait() | |
| 1774 | until not S.UserInputService:IsKeyDown(key) | |
| 1775 | end | |
| 1776 | ||
| 1777 | local hit,pos,norm,dist = CastRay(data.Circle.CFrame.p,Mouse.Hit.p,1024) | |
| 1778 | local part = Part(Effects,MagicVariant.EffectColor or MagicVariant.Color,Enum.Material.Neon,V3.N(dist,data.Mesh.Scale.x/40,data.Mesh.Scale.x/40),CF.N(data.Circle.CFrame.p,pos)*CF.N(0,0,-dist/2)*CF.A(0,M.P/2,0),true,false) | |
| 1779 | Mesh(part,Enum.MeshType.Cylinder) | |
| 1780 | Tween(part,{Color=C3.N(1,1,1)},1,Enum.EasingStyle.Quad,Enum.EasingDirection.Out,0,false)
| |
| 1781 | local aa = data.Circle:Clone(); | |
| 1782 | aa.Parent = Effects | |
| 1783 | aa.Anchored = true | |
| 1784 | local blast = Sound(aa,334702766,1,5,false,true,true) | |
| 1785 | data.Circle:destroy() | |
| 1786 | if(not blast.IsLoaded)then repeat swait() until blast.IsLoaded end | |
| 1787 | Effect{
| |
| 1788 | Effect='ResizeAndFade', | |
| 1789 | Color=MagicVariant.Color, | |
| 1790 | Size=V3.N(data.Mesh.Scale.X/20,data.Mesh.Scale.X/20,data.Mesh.Scale.X/20), | |
| 1791 | Mesh={MeshType=Enum.MeshType.Sphere},
| |
| 1792 | CFrame=CF.N(pos), | |
| 1793 | Sound=blast, | |
| 1794 | FXSettings={
| |
| 1795 | EndSize=V3.N(.05,.05,.05), | |
| 1796 | EndIsIncrement=true | |
| 1797 | } | |
| 1798 | } | |
| 1799 | for i = 1, 5 do | |
| 1800 | local angles = CF.A(M.RRNG(-180,180),M.RRNG(-180,180),M.RRNG(-180,180)) | |
| 1801 | Effect{
| |
| 1802 | Effect='Fade', | |
| 1803 | Frames=65, | |
| 1804 | Sound=blast, | |
| 1805 | Size=V3.N((data.Mesh.Scale.X/20)/2,(data.Mesh.Scale.X/20)/2,data.Mesh.Scale.X/20), | |
| 1806 | CFrame=CF.N(CF.N(pos)*angles*CF.N(0,0,-(data.Mesh.Scale.X/20)).p,pos), | |
| 1807 | Mesh = {MeshType=Enum.MeshType.Sphere},
| |
| 1808 | Material=Enum.Material.Neon, | |
| 1809 | Color=MagicVariant.Color, | |
| 1810 | MoveDirection=CF.N(CF.N(pos)*angles*CF.N(0,0,-50).p,pos).p, | |
| 1811 | } | |
| 1812 | end | |
| 1813 | AOEDamage(pos,data.Mesh.Scale.X/20,45,75,0,'Normal',10,4) | |
| 1814 | coroutine.wrap(function() | |
| 1815 | for i = 1, (blast.TimeLength*Frame_Speed) do | |
| 1816 | part.Transparency = (i/(blast.TimeLength*Frame_Speed)) | |
| 1817 | for _,v in next, aa:children() do if v:IsA'Decal' then v.Transparency = (i/(blast.TimeLength*Frame_Speed)) end end | |
| 1818 | swait() | |
| 1819 | end | |
| 1820 | aa:destroy() | |
| 1821 | part:destroy() | |
| 1822 | end)() | |
| 1823 | ||
| 1824 | Attack = false | |
| 1825 | NeutralAnims = true | |
| 1826 | Root.Anchored = false | |
| 1827 | Root.Velocity = Mouse.Hit.lookVector*-125 | |
| 1828 | end | |
| 1829 | ||
| 1830 | function Skill1() | |
| 1831 | Laser(Enum.KeyCode.Q) | |
| 1832 | end | |
| 1833 | ||
| 1834 | function Skill2() | |
| 1835 | DLaser(Enum.KeyCode.Z) | |
| 1836 | end | |
| 1837 | ||
| 1838 | function Skill3() | |
| 1839 | BLaser(Enum.KeyCode.X) | |
| 1840 | end | |
| 1841 | ||
| 1842 | --// Wrap it all up \\-- | |
| 1843 | ||
| 1844 | Mouse.KeyDown:connect(function(k) | |
| 1845 | if(Attack)then return end | |
| 1846 | if(k == 'q')then Skill1() end | |
| 1847 | if(k == 'e')then Skill2() end | |
| 1848 | if(k == 'r')then Skill3() end | |
| 1849 | end) | |
| 1850 | ||
| 1851 | Plr.Chatted:connect(function(m) | |
| 1852 | ||
| 1853 | if(m:sub(1,3) == '/e ')then | |
| 1854 | local msg = m:sub(4) | |
| 1855 | --emote commands (gotta do) | |
| 1856 | end | |
| 1857 | end) | |
| 1858 | while true do | |
| 1859 | swait() | |
| 1860 | Sine = Sine + Change | |
| 1861 | ||
| 1862 | 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) | |
| 1863 | ||
| 1864 | local Walking = (math.abs(Root.Velocity.x) > 1 or math.abs(Root.Velocity.z) > 1) | |
| 1865 | 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 "Run" or "Walk") or hitfloor and "Idle") | |
| 1866 | if(not Effects or not Effects.Parent)then | |
| 1867 | Effects = IN("Model",Char)
| |
| 1868 | Effects.Name = "Effects" | |
| 1869 | end | |
| 1870 | if(State == 'Run')then | |
| 1871 | local wsVal = 20 / (Hum.WalkSpeed/16) | |
| 1872 | local Alpha = math.min(.2 * (Hum.WalkSpeed/16),1) | |
| 1873 | Change = 3 | |
| 1874 | RH.C1 = RH.C1:lerp(CF.N(0,1,0)*CF.N(0,0-.2*M.C(Sine/wsVal),0+.4*M.C(Sine/wsVal))*CF.A(M.R(15+25*M.C(Sine/wsVal))+-M.S(Sine/wsVal),0,0),Alpha) | |
| 1875 | LH.C1 = LH.C1:lerp(CF.N(0,1,0)*CF.N(0,0+.2*M.C(Sine/wsVal),0-.4*M.C(Sine/wsVal))*CF.A(M.R(15-25*M.C(Sine/wsVal))+M.S(Sine/wsVal),0,0),Alpha) | |
| 1876 | elseif(State == 'Walk')then | |
| 1877 | local wsVal = 20 / (Hum.WalkSpeed/16) | |
| 1878 | local Alpha = math.min(.3 * (Hum.WalkSpeed/8),1) | |
| 1879 | Change = 3 | |
| 1880 | RH.C1 = RH.C1:lerp(CF.N(0,1,0)*CF.N(0,0-.5*M.C(Sine/wsVal)/2,0+.6*M.C(Sine/wsVal)/2)*CF.A(M.R(15-2*M.C(Sine/wsVal))+-M.S(Sine/wsVal)/2.5,0,0),Alpha) | |
| 1881 | LH.C1 = LH.C1:lerp(CF.N(0,1,0)*CF.N(0,0+.5*M.C(Sine/wsVal)/2,0-.6*M.C(Sine/wsVal)/2)*CF.A(M.R(15+2*M.C(Sine/wsVal))+M.S(Sine/wsVal)/2.5,0,0),Alpha) | |
| 1882 | else | |
| 1883 | RH.C1 = RH.C1:lerp(CF.N(0,1,0),.2) | |
| 1884 | LH.C1 = LH.C1:lerp(CF.N(0,1,0),.2) | |
| 1885 | end | |
| 1886 | ||
| 1887 | Hum.WalkSpeed = WalkSpeed | |
| 1888 | ||
| 1889 | if(NeutralAnims)then | |
| 1890 | if(State == 'Idle')then | |
| 1891 | local Alpha = .1 | |
| 1892 | Change = .75 | |
| 1893 | RJ.C0 = RJ.C0:lerp(RJC0*CF.N(0+.2*M.C(Sine/12),.2*M.C(Sine/6),0)*CF.A(M.R(-5+5*M.C(Sine/12)),0,0),Alpha) | |
| 1894 | NK.C0 = NK.C0:lerp(NKC0*CF.A(M.R(-5+5*M.C(Sine/12)),0,0),Alpha) | |
| 1895 | LS.C0 = LS.C0:lerp(LSC0*CF.N(.25,0,0)*CF.A(M.R(-45),0,M.R(45+5*M.C(Sine/12))),Alpha) | |
| 1896 | RS.C0 = RS.C0:lerp(RSC0*CF.N(-.25,0,0)*CF.A(M.R(-45),0,M.R(-45-5*M.C(Sine/12))),Alpha) | |
| 1897 | LH.C0 = LH.C0:lerp(LHC0*CF.N(0-.2*M.C(Sine/12),-.2*M.C(Sine/6),0)*CF.A(M.R(5-5*M.C(Sine/12)),M.R(10),0),Alpha) | |
| 1898 | RH.C0 = RH.C0:lerp(RHC0*CF.N(0-.2*M.C(Sine/12),-.2*M.C(Sine/6),0)*CF.A(M.R(5-5*M.C(Sine/12)),M.R(-10),0),Alpha) | |
| 1899 | -- idle | |
| 1900 | elseif(State == 'Run')then | |
| 1901 | local wsVal = 20 / (Hum.WalkSpeed/16) | |
| 1902 | local Alpha = math.min(.2 * (Hum.WalkSpeed/16),1) | |
| 1903 | RJ.C0 = RJ.C0:lerp(CF.N(0,0-.1*M.C(Sine/(wsVal/2)),0)*CF.A(M.R(-15+2.5*M.C(Sine/(wsVal/2))),M.R(8*M.C(Sine/wsVal)),0),Alpha) | |
| 1904 | NK.C0 = NK.C0:lerp(NKC0,Alpha) | |
| 1905 | LS.C0 = LS.C0:lerp(LSC0*CF.N(0,0,0-.3*M.S(Sine/wsVal))*CF.A(M.R(0+45*M.S(Sine/wsVal)),0,M.R(-5)),Alpha) | |
| 1906 | RS.C0 = RS.C0:lerp(RSC0*CF.N(0,0,0+.3*M.S(Sine/wsVal))*CF.A(M.R(0-45*M.S(Sine/wsVal)),0,M.R(5)),Alpha) | |
| 1907 | LH.C0 = LH.C0:lerp(LHC0*CF.N(0,0+.1*M.C(Sine/(wsVal/2)),0)*CF.A(0,-M.R(4*M.C(Sine/wsVal)),0),Alpha) | |
| 1908 | RH.C0 = RH.C0:lerp(RHC0*CF.N(0,0+.1*M.C(Sine/(wsVal/2)),0)*CF.A(0,-M.R(4*M.C(Sine/wsVal)),0),Alpha) | |
| 1909 | elseif(State == 'Walk')then | |
| 1910 | local wsVal = 20 / (Hum.WalkSpeed/16) | |
| 1911 | local Alpha = math.min(.3 * (Hum.WalkSpeed/16),1) | |
| 1912 | RJ.C0 = RJ.C0:lerp(CF.N(0,0-.1*M.C(Sine/(wsVal/2)),0)*CF.A(M.R(-5-2.5*M.C(Sine/(wsVal/2))),M.R(8*M.C(Sine/wsVal)),0),Alpha) | |
| 1913 | NK.C0 = NK.C0:lerp(NKC0,Alpha) | |
| 1914 | LS.C0 = LS.C0:lerp(LSC0*CF.N(0,0,-.22*M.C(Sine/wsVal))*CF.A(M.R(37*M.C(Sine/wsVal)),0,M.R(-5)),Alpha) | |
| 1915 | RS.C0 = RS.C0:lerp(RSC0*CF.N(0,0,.22*M.C(Sine/wsVal))*CF.A(M.R(-37*M.C(Sine/wsVal)),0,M.R(5)),Alpha) | |
| 1916 | LH.C0 = LH.C0:lerp(LHC0*CF.N(0,0+.1*M.C(Sine/(wsVal/2)),0)*CF.A(0,-M.R(4*M.C(Sine/wsVal)),0),Alpha) | |
| 1917 | RH.C0 = RH.C0:lerp(RHC0*CF.N(0,0+.1*M.C(Sine/(wsVal/2)),0)*CF.A(0,-M.R(4*M.C(Sine/wsVal)),0),Alpha) | |
| 1918 | elseif(State == 'Jump')then | |
| 1919 | local Alpha = .1 | |
| 1920 | local idk = math.min(math.max(Root.Velocity.Y/50,-M.R(90)),M.R(90)) | |
| 1921 | LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)),Alpha) | |
| 1922 | RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)),Alpha) | |
| 1923 | RJ.C0 = RJ.C0:lerp(RJC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),Alpha) | |
| 1924 | NK.C0 = NK.C0:lerp(NKC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),Alpha) | |
| 1925 | LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha) | |
| 1926 | RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha) | |
| 1927 | elseif(State == 'Fall')then | |
| 1928 | local Alpha = .1 | |
| 1929 | local idk = math.min(math.max(Root.Velocity.Y/50,-M.R(90)),M.R(90)) | |
| 1930 | LS.C0 = LS.C0:lerp(LSC0*CF.A(M.R(-5),0,M.R(-90)+idk),Alpha) | |
| 1931 | RS.C0 = RS.C0:lerp(RSC0*CF.A(M.R(-5),0,M.R(90)-idk),Alpha) | |
| 1932 | RJ.C0 = RJ.C0:lerp(RJC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),Alpha) | |
| 1933 | NK.C0 = NK.C0:lerp(NKC0*CF.A(math.min(math.max(Root.Velocity.Y/100,-M.R(45)),M.R(45)),0,0),Alpha) | |
| 1934 | LH.C0 = LH.C0:lerp(LHC0*CF.A(0,0,M.R(-5)),Alpha) | |
| 1935 | RH.C0 = RH.C0:lerp(RHC0*CF.N(0,1,-1)*CF.A(M.R(-5),0,M.R(5)),Alpha) | |
| 1936 | elseif(State == 'Paralyzed')then | |
| 1937 | -- paralyzed | |
| 1938 | elseif(State == 'Sit')then | |
| 1939 | -- sit | |
| 1940 | end | |
| 1941 | end | |
| 1942 | ||
| 1943 | end |